MolTUI

May 3, 2026 · View on GitHub

MolTUI is a terminal molecular and crystallographic viewer designed for quick inspection of geometries, trajectories, orbitals and normal modes directly in the terminal using Unicode characters. Ideal for remote SSH sessions and lightweight analyses.

benzene

Installation

pip install moltui
# or
uv tool install moltui

Usage

moltui <file>

Features

MolTUI is organized in a series of modes that can be cycled using the m (forward) and M (backward) keys. Each mode opens a respective sidebar which can be toggled on and off with S. The modes consist of molecular orbitals, normal modes and geometry and availability depends on the file format that was opened.

Visualize Orbitals

  • The rendering of orbitals can be toggled via o.
  • Molden and .gbw files can contain multiple molecular orbitals. Cycle through MOs with next and prev.
image

Analyze Geometry

  • Bond lengths, angles and dihedrals can be viewed using the geometry key which opens a sidebar. Navigate between tabs via <tab>.
  • The quantity is highlighted in yellow on the molecule.
  • Sort the quantity in increasing magnitude via s.
  • Atom indices can be toggled via #.
image

Periodic Systems

  • Periodic systems can be provided using the extended XYZ and CIF file formats
  • The toggling of the periodicity is achieved via the b key
  • The rendering of the box can be toggled in the visual pane
image

Animations

Trajectories

Trajectories can be provided in the multi-XYZ file format (essentially multiple XYZ files concatenated together). Toggle a looping animation of the trajectory using <space> and cycle individual frames using [ and ]. The geometry sidebar values updates live with the current frame's geometry.

geom-opt

Normal Modes

Normal modes can be provided either via the Molden or Orca .hess file formats. Animation playing can be toggled with <space>.

normal-modes2

Export to PNG Format

The e key exports the current scene to a PNG.

benzene_hf 021

Tune Visuals

The V key opens a sidebar where the isovalue, molecule style and lighting can be modified.

image

The lower case v cycles between the styles.

CPKLicoriceVDW

Toggle between light and dark mode with i.

LightDark

Supported formats

FormatGeometryTrajectoryOrbitalsNormal Modes
XYZ / extXYZ
CIF
Gaussian ZMAT
Gaussian Cube
Molden
Gaussian .fchk
Orca .GBW¹
Orca .hess
TrexIO²

✓ supported; — not part of the file format

¹ Requires orca_2mkl in PATH

² Requires installing moltui[trexio]

Quantum Chemistry Inputs

The molecular structures can be viewed from the inputs of the following programs

  • Orca, Molcas, Q-Chem, Gaussian, NWChem, Turbomole, Molpro, MRCC, CFOUR, Psi4, GAMESS Jaguar

Keybindings

KeyAction
h/j/k/l or arrowsRotate left/down/up/right
,/.Roll clockwise/counter-clockwise
J/K or +/-Zoom out/in
tToggle pan/rotation mode
cCenter view
rReset view

Display

KeyAction
oToggle orbital isosurfaces
iToggle dark/light theme
BToggle bonds
bToggle periodicity
eExport PNG
vToggle style (CPK, Licorice, VDW)
#Toggle atom numbers

Panels

KeyAction
m / MCycle sidebar mode forward/backward (Geometry, MO, Normal Modes)
SToggle current sidebar (hide/show)
VToggle Visual settings panel
n/pNext/previous row in the active sidebar table
d/uHalf page down/up in datatable
g/GTop/bottom of the datatable

Geometry panel

KeyAction
Tab/Shift+TabSwitch Bonds/Angles/Dihedrals tab
sToggle sort by value for active tab

Visual panel

KeyAction
n/pMove focus to next/previous control
Tab/Shift+TabIncrease/decrease focused slider, or cycle style option

Animation and modes

KeyAction
SpaceToggle play/pause trajectory or normal mode animation
[ / ]Previous/next animation step (frame/phase)

General

KeyAction
qQuit

Known Issues

  • Only up to g-shells are implemented as this is the highest orbital shell officially supported by the Molden format.
  • The content is rendered using braille Unicode characters and, therefore, the quality of rendering can depend on the font and terminal emulator. All figures in the repository have been generated using the JetBrains Mono Nerd Font in the Kitty terminal.
  • The Orca GBW file format is typically incompatible between versions. Therefore, the orca_2mkl should ideally be of the same version as the Orca version used to produce the GBW file. Newer version of Orca can try to recover earlier GBW files using the rescue feature.

Acknowledgements

Parser tests are cross-validated with data and reference parsers from IODATA, cclib / cclib-data, PySCF, and ASE.