16.2 Interfaces to Visualization Tools

Visualization of Molecular Geometry

The tool t2x can be used to convert the atomic coordinates stored in the $grad and $coord data groups into the xyz-format, which is supported by most viewers, e.g. jmol (http://jmol.sourceforge.net/). Typing

t2x > opt.xyz

in a directory containing the control file generates a series of frames using the information of $grad. Note t2x writes to standard output which here is redirected to a file. If you are only interested in the most recent structure, type

t2x -c > str.xyz

which only extracts the information on $coord.

Visualization of Densities, MOs, Electrostatic Potentials and Fields

There are several possibilities to visualize molecular orbitals or densities. tm2molden simply converts MO and geometry information to molden format. The conversion program is interactive and self-explanatory. The generated file can be visualized using either molden (http://www.cmbi.ru.nl/molden/molden.html) or molekel (http://www.cscs.ch/molekel/). For larger systems this may become very time-consuming, as plotting data (values on grids) are calculated by the respective programs (molden, molekel). It is more efficient to calculate the data for plots (MO amplitudes, densities, etc.) by TURBOMOLE modules and to use a visualization tool afterwards, a way, that is described in the following.

Calculation of data on grids to be used for plots with visualization tools (e.g. gOpenMol, available via http://www.csc.fi/gopenmol/) is driven by the keyword $pointval. This keyword is evaluated by all density matrix generating TURBOMOLE modules, i.e. by dscf, ridft, rimp2 mpgrad, ricc2 (see Section 10.3.3) and egrad. Note, that all of the following quantities may be calculated simultaneusly, and that for programs dscf, ridft, rimp2 and mpgrad the density matrix generating steps may be skipped by typing "<program> -proper".

Electron densities For the above mentioned programs setting of keyword

$pointval dens

or simply


yields calculation of densities

ρ(⃗R  ) = ∑  D   ϕ (⃗R  )ϕ  (⃗R  )
    P         νμ ν  P   μ  P


on an orthogonal grid (RP ), the size of which is automatically adjusted to the size of the molecule and the resolution is adjusted to yield acceptable gOpenMol plots (for specification of non-default grid types (planes, lines) and non-default output formats see Section 20.2.21).

Names of output files are:


total density (UHF: α density plus β density )


spin density (α density minus β density )


MP2 density


MP2 spin density


differential density for excited state


differential spin density for excited state


general density passed e.g. by the ricc2 program.

The .plt files may directly be visualized by gOpenMol; the file coord.xyz, which is also necessary for gOpenMol, is generated by the above programs, if $pointval is set in the control-file.

Two-component wave functions (only module ridft and only if $soghf is set): Total density is on file td.plt like for one-component wave functions; this is also true for all other quantities depending only on the density matrix (electrostatic potential etc.). sd.plt contains the absolute value of the spin vector density, which is the absolute value of the following vector:

                     (     )
si(r) = ( Ψ *α Ψ* ) σi   Ψα       i = x,y,z
               β        Ψβ

$pointval fmt=txt

leads to a file containing the spin vector density vectors, which can be used by gOpenMol. It is advisable to choose ca. one Bohr as the distance between two gridpoints.

Electrostatic potentials In an analogous way electrostatic potentials can be calculated on grids.

$pointval pot

leads to calculation of the electrostatic potential of electrons and nuclei (and external constant electric fields and point charges Q if present).

           ∫                      (               )
V (⃗R  ) = -   ρ(⃗r)d3⃗r + ∑  -ZA--+  ⃗R  ⃗E + ∑   -Q---
    P         rPr          RP A      P        RP Q
                        A                  Q

In order to prevent the calculation of singularities at the positions of nuclei, for gridpoints that are closer to a nucleus than 10-6 a.u. the charge of the respective nucleus is omitted in the calculation of the electrostatic potential for these points. The output files are termed tp.plt, sp.plt, etc.

Electric fields (as derivatives of potentials) are calculated by

$pointval fld

The absolute values of electric fields are written to files tf.plt, sf.plt, etc. For non-default grid types and outputs that allow also for displaying of components of electric fields see Section 20.2.21.

Exchange-correlation potentials (Only for DFT) Computation of the Kohn-Sham exchange-correlation potential on a grid

$pointval xc

Canonical molecular orbitals. Visualization of molecular orbitals, i.e. generation of .plt-files containing amplitudes of MOs i

Ai(⃗RP ) =    ciνϕν(⃗RP )

or in the two-component case

  Γ       ∑    Γ
A i (⃗RP ) =   ciνϕ ν(R⃗P )

with Γ as a part of the coefficient matrix (Re(α), Im(α), Re(β), Im(β)), is achieved e.g. by

$pointval mo 10-12,15

This yields amplitudes for MOs/spinors 10-12 and 15 on the default grid. The numbering of MOs refers to that you get from the first column of the output of the tool Eiger, the one for spinors refers to the file EIGS. The filenames contain the type of the irreducible representation (irrep) of the MO, the current number within this irrep and in case of UHF calculations also the spin, e.g. 2a1g_a.plt contains amplitudes for the second alpha-spin MO of a1g type. For more-dimensional irreps columns are written to separate files, e.g. 1t2g1_a.plt, 1t2g2_a.plt and 1t2g3_a.plt contain the amplitutes of the three columns of the first irrep (alpha spin) of type t2g.

Two-component wavefunctions (only module ridft and only if $soghf is set): By default only the density of the chosen spinors is written in files named e.g. 10a_d.plt. Visualization of the amplitudes of the different spinor parts is achieved e.g. by

$pointval mo 10-12,15 minco real,

where real is a plotting threshold that may take values between zero and one. The corresponding part Γ of the spinor (Re(α, Im(α, Re(β, Im(β)) will be written to file, if NΓ (see below) is larger than that threshold.

 NΓ  =   tr(D Γ S )
  Γ      ∑   Γ * Γ
D μν =      ciν ciμ
The filenames consist of the number of the spinor according to file EIGS and an additional number for the respective part Γ of the spinor (1 for Re(α), 2 for Im(α), 3 and 4 for the corresponding β-parts) e.g. 10a_4.plt for the Im(β) of spinor 10.

Localised molecular orbitals If one has generated localized molecular orbitals (LMOs, see above) they can also be visualized.

$pointval lmo 3-6,8

as an example, leads to calculation of amplitudes for LMOs 3-6 and 8. The coefficients are read from file lmos (UHF: lalp and lbet), the numbering is due to the output from the localizaton section. For an UHF case this means: If you included in the localization procedure e.g. 5 α-type orbitals and 3 β-type orbitals, then, if you are interested in plotting the β-type LMOs only, you have to type

$pointval lmo 6-8

Natural molecular orbitals for two-component wavefunctions (only module ridft and only if $soghf is set): In two-component calculations it is often useful to visualize natural molecular orbitals. In contrast to one-component calculations the occupation numbers are no longer close to zero, one or two, but can take any value between zero and two. Therefor

$natural orbitals    file=natural
$natural orbital occupation    file=natural

has to be set additionally to $soghf (also possible via define).
By setting

$pointval nmo 9

in control-file a gOpenMol-compatible file named nmo_9.plt is written.

Natural atomic orbitals If one has generated natural molecular orbitals (NAOs, see above) they can be visualized with the following command in the control file:

$pointval nao 7-9,12

where the numbers of the NAOs are in the output of the population analysis.

Natural transition orbitals If natural transition orbitals (NTOs) for electronic excitations are available in files named nto_nocc and nto_vir for, respectively, the occupied and virtual NTOs, plot files for visualizing them can be generated by setting

$pointval nto 1-5

This will generate plot files for the first five occupied and virtual NTOs. The plot file are named nto_vir_n.plt, where n is the NTO index.

Non-default grids are decribed in detail in Sections 20.2.21. Calculation of the above quantities at single points is needed quite often, thus an example is given here.

$pointval geo=point  
7 5 3  
0 0 7  
1 2 3

calculates densities at points (7,5,3), (0,0,7) and (1,2,3). Output is (x,y,z, density), output file suffix is .xyz.

We note in passing that calculation of electrostatic potential at positions of nuclei may be used as an efficient tool to distinguish atoms of similiar atomic numbers thus providing a complement to X-Ray Structure Analysis (details see ref.  [158]).