v

March 22, 2026 · View on GitHub

A simple X11 molecular viewer.

Animation of 128 molecules


Supported formats

  • Priroda input and output files
  • .xyz files
  • extended .xyz files (currently the extra columns are ignored)
  • various quantum-chemical outputs with cclib, see the Python wrapper page.

Python package (wrapper / API) available

See python package page here.

Provides wrapper scripts with a simple installation and allows to open unsupported file formats with cclib.

Download

# uncomment your OS:
#OS=Linux
#OS=macOS
wget https://github.com/briling/v/releases/latest/download/v.${OS}.exe --output-document=./v
chmod +x ./v

Build

See build instructions.

Requirements:

  • GNU/Linux / Cygwin / macOS
  • X11 / XQuartz

Usage

./v file [file2 ... fileN] [options]

A filename - stands for the standard input (xyz files only).

Show the reference:

./v

Options

Command-line options
vib:%dforce to show geometries (0) / vibrations (1)
bonds:0disable bonds
bohr:1assume input files are in Bohr (default is Å)
dt:%lfdelay between frames in seconds (default 0.02)
symtol:%lftolerance for symmetry determination in Å (default 0.001)
bmax:%lfmax. length of a bond to display
z:%d,%d,%d,%d,%dshow an internal coordinate (1,i,j,0,0 — distance i-j; 2,i,j,k,0 — angle i-j-k; 3,i,j,k,l — torsion i-j-k-l)
rot:%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lfrotation matrix to start with (default identity matrix)
frame:%dframe to start with (default 1)
font:%sfont (xlfd)
colors:%scolorscheme (v (default) or cpk)
cell:b%lf,%lf,%lfcuboid size in a.u. (for periodical boundary conditions)
cell:%lf,%lf,%lfcuboid size in Å
cell:b%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lfcell parameters in a.u.
cell:%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lfcell parameters in Å
shell:b%lf,%lfspheres radii in a.u.
shell:%lf,%lfspheres radii in Å
cell:0disable PBC from the extended xyz file header
cell:b%%lf[,%%lf,%%lf[,%%lf,%%lf,%%lf,%%lf,%%lf,%%lf]]cubic / orthogonal / non-orhogonal cell parameters in a.u.
cell:%%lf[,%%lf,%%lf[,%%lf,%%lf,%%lf,%%lf,%%lf,%%lf]]cubic / orthogonal / non-orhogonal cell parameters in Å
`shell:b%%lf[,%%lf]sphere(s) radii in a.u.
`shell:%%lf[,%%lf]sphere(s) radii in Å
center:%dorigin is geometric center (1, default) / center of mass (2) / as is (0)
inertia:%dif rotate molecules wrt axis of inertia (1) or not (0, default)
gui:%dgui (default 1) / headless (0) mode
com:%scommand sequence for gui:0
exitcom:%scommand sequence to run on exit (same as for gui:0)
startcom:%scommand sequence to run on startup

Keyboard

Keyboard reference
////pgup/pgdnrotate (slower with ctrl or shift)
w/a/s/d or /// on numpadmove (slower with ctrl or shift)
0go to the first point
=go to the last point
enter/backspacenext/previous point
insplay forwards / stop (vibration mode: animate selected normal mode / stop)
delplay backwards / stop
home/endzoom in/out
1/2scale bond lengths
3/4scale atom sizes
.show point group
nshow/hide atom numbers
tshow/hide atom types
lshow/hide bond lengths
bshow/hide bonds
tabread new points
rreread file
xprint molecule (Priroda input + bonds)
zprint molecule (.xyz)
pprint molecule (input for an .svg generator)
uprint the current rotation matrix
msave the current frame (.xpm format)
fsave all frames starting from the current one (vibration mode: save all frames to animate the selected normal mode)
jjump to a frame (will be prompted): enter to confirm, esc to cancel
q / escquit

Mouse

One can also use the mouse to rotate the molecule and zoom in/out.

Additional commands

Headless mode

If run in the headless mode with gui:0, the symbols from the standard input are processed as if the corresponding keys were pressed in the gui mode. Right now, p, x, z, u, and . are available. Command-line option com:%s overrides the standard input. These examples are equivalent:

> echo . | ./v mol/mol0001.xyz gui:0
D*h

> ./v mol/mol0001.xyz gui:0 com:.
D*h

> cat mol/mol0001.xyz | ./v - gui:0 com:.
D*h

GUI mode

In the GUI mode, the symbols from the CLI option exitcom: are executed immediately before closing. For example,

./v mol/mol0001.xyz exitcom:z

automatically prints the last xyz coordinates when the user closes the window.

The symbols from the CLI option startcom: are executed before the main loop. For example,

./v mol/mol0001.xyz startcom:aaaaaaa

moves the molecule to the left, and

./v mol/mol0001.xyz startcom:.mq

opens the file, computes the point group, save a picture to mol/mol0001.xyz_1.xpm and closes the window. For other examples, see fig/regenerate.bash for the commands used to generate the figures on this page.

Click to see currently available commands
CLI regime symbolGUI keyboard commandGUI (exitcom:/startcom:)headless (com)
w/a/s/dw/a/s/dmove++ (PBC)
+ / -home/endzoom+
>insanimate+
3/43/4scale atom sizes+
n/t/ln/t/ltoggle atom view+
m/fm/fsaving frame(s)+
qqquit+
1/21/2scale bonds++
b/lb/ltoggle bond view++
..point group++
x,z,p,ux,z,p,uprinting++

Note

The size depends on my screen and window layout, you might need to adjust the number of move/zoom in commands or the window size.

Warning

Currently this option is unstable. Please let me know if you encounter any problems.

Boundary conditions

Two types of boundary conditions are recognized:

  • PBC (3D)
  • spherical confinement

PBC

PBC can be read from the xyz file header by specifying Lattice="ax ay az bx by bz cx cy cz":

./v mol/MOL_3525.ext.xyz

Currently, only the PBC in all three dimensions are supported. Every molecule can have its own lattice:

./v mol/MOL_3525.ext.xyz mol/Si8.extended.xyz

The lattice can be passed via the command-line, in which case it overrides the one from the file and applies to all the molecules:

./v mol/MOL_3525.xyz cell:8.929542,0,0,4.197206,8.892922,0,0.480945,2.324788,10.016044

For orthogonal/cubic cell:

./v mol/1372_D02.340_1.out bonds:0 cell:20.23,20.23,20.23
./v mol/1372_D02.340_1.out bonds:0 cell:20.23

In Bohr instead of Å:

./v mol/1372_D02.340_1.out bonds:0 cell:b10.7

Finally, to disable the cell from the file:

./v mol/MOL_3525.ext.xyz cell:0

Spherical confinement

Spherical confinement can be specified from the command-line by the following:

./v mol/mol0001.xyz shell:2     #  sphere with r = 2 Å is put around the molecule
./v mol/mol0001.xyz shell:b4    #  sphere with r = 2 Bohr
./v mol/mol0001.xyz shell:2,3   #  spheres with r = 2 and 3 Å (e.g., soft and hard boundaries)
./v mol/mol0001.xyz shell:b4,5  #  spheres with r = 4 and 5 Bohr

Examples

  • mol/C3H6~mCPBA_01x11.qm.out — geometries + vibrations
./v mol/C3H6~mCPBA_01x11.qm.out

Transition state mode animation

./v mol/C3H6~mCPBA_01x11.qm.out vib:0 z:1,23,24,0,0

Transition state optimization

  • mol/S8.qm.out — geometries
./v mol/S8.qm.out z:1,1,2,0,0

S8 equilibrium structure

  • mol/C10H16.qm.out — vibrations
./v mol/C10H16.qm.out

Adamantane mode animation

  • mol/1372_D02.340_1.out — PBC simulation
./v mol/1372_D02.340_1.out bonds:0 cell:b10.7

Atoms in cell with PBC

  • mol/mol0001.xyz, mol/mol0002.xyz.xyz files with atomic numbers and atomic symbols
./v mol/mol0001.xyz mol/mol0002.xyz symtol:1e-2

Dimethyl ether structure

  • mol/MOL_3525.xyz — organic crystal with non-orthogonal cell
./v mol/MOL_3525.ext.xyz
./v mol/MOL_3525.xyz cell:8.929542,0.0,0.0,4.197206,8.892922,0.0,0.480945,2.324788,10.016044

Organic crystal cell

  • Currently two colorschemes are supported (thanks to @iribirii)
v mol/periodic.in bonds:0 colors:v    # default
v mol/periodic.in bonds:0 colors:cpk

Periodic table of elements with animated change of colorschemes


The figures are generated with

fig/regenerate.bash