22.2 Interfaces to Visualization Tools

There are several possibilities to visualize structures, vibrational frequencies, molecular orbitals, densities and a large number of properties.

The easiest one is to use the graphical user interface of TURBOMOLE TmoleX. TmoleX is either included in your TURBOMOLE distribution or can be downloaded for free from the BIOVIA web site TmoleX version (with DEMO version of TURBOMOLE ).

TmoleX can be used to create input, run TURBOMOLE jobs on either the local machine or on remote Linux systems or clusters (directly or using queuing systems) and to visualize the results.

Visualization of Molecular Geometries

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. Typing

t2x > opt.xyz

in a directory containing the control file generates a series of frames using the information in $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

Note that the easiest way to visualize orbitals, densities and electrostatic properties is to use the graphical user interface TmoleX.

There are several other possibilities to visualize molecular orbitals or densities.

The molden option in the export menu of proper converts the MO and geometry information to the molden format. Alternatively one can use the conversion program tm2molden, which is interactive and self-explanatory. The generated file can be read in by the molden program (see molden web site).

For larger systems this may become very time-consuming, as plotting data (values on grids) are calculated by the respective programs (e.g. molden). It is more efficient to calculate the data for plots (MO amplitudes, densities, etc.) with TURBOMOLE 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 gopenmol download) can be generated with the options in the grid menu of proper. Alternatively one can use the keyword $pointval in combination with the -proper option. This keyword is obeyed by all TURBOMOLE program that generate densities as dscf, ridft, rimp2mpgrad, ricc2 (see Section 10.3.3) and egrad. Note, that with -proper and $pointval 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

The option dens in the grid menu of proper or with the above mentioned programs setting of the keyword

$pointval dens

or simply

$pointval

results in the calculation of densities

\[\begin{equation} \rho(\vec{R}_P)=\sum_{\nu\mu} D_{\nu\mu}\phi_{\nu}(\vec{R}_P)\phi_{\mu}(\vec{R}_P) \end{equation}\](22.7) on an orthogonal grid of point \(\vec{R}_P\). The size of the grid is automatically adjusted to the size of the molecule and the resolution is adjusted to yield acceptable plots (for specification of non-default grid types (planes, lines) and non-default output formats see Section 25.2.29).

The names of the output files are:

td.plt

total density (UHF: \(\alpha\) density plus \(\beta\) density )

sd.plt

spin density (\(\alpha\) density minus \(\beta\) density )

mp2d.plt

MP2 density

mp2sd.plt

MP2 spin density

ed.plt

differential density for excited state

esd.plt

differential spin density for excited state

<myname>.plt

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

The .plt files may be visualized with 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.

For two-component wavefunctions (only module ridft with $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: \[\begin{equation*} s_i(\mathbf{r})=\left(\begin{array}{cc}\Psi_\alpha^*&\Psi_\beta^*\end{array}\right) \boldsymbol\sigma_i\left(\begin{array}{c}\Psi_\alpha\\\Psi_\beta\end{array}\right) ~~~~~i=x,y,z \end{equation*}\]

$pointval fmt=txt

leads to a file containing the spin density vectors, which can be used by gOpenMol. It is advisable to choose ca. one Bohr as the distance between two grid points. The options for visualizing two-component wavefunctions are not yet available in the proper program.

TDDFT Transition densities

The escf program can plot the TDDFT transition densities. For the excited state \(n\) the transition density is \[\begin{align} \rho^n(r)&= \sqrt{2} \sum_{ia} (X^n+Y^n)_{ia} \phi_i(r) \phi_a(r) \\ &= \sqrt{2} \sum_{ia} \sqrt{\omega_{ia}/\omega_n} Z^n_{ia} \phi_i(r) \phi_a(r) \end{align}\](22.8–22.9) where \(i\) (\(a\)) are occupied (virtual) orbitals, \(\omega_n\) is the excitation energy, \(\omega_{ia}=\epsilon_i-\epsilon_a\), and \(Z^n\) contains of the TDDFT vector coefficients (for singlet closed-shell). Note that TDDFT transition density are different from the differential and non-relaxed densities. Transition density can be plotted setting:

$pointval transdens

By default the first excited state (of the first irrep) will be printed. To print other states add the group

$tdlist
 irrep1 num1 col1
 irrep2 num2 col2
 ....

where irrep is the number of the irrep considered in the $soes data group, num is the number of the state, col is the column number in the case of degenerate irreps.

The plot are stored in files named:

vcao_td_<irrep>_<num>.<col>.plt

or with different extension for the different formats.

Available output formats:

To get a list of the available output formats of the proper program invoke the format option with the flag help. For the direct generation of graphics output different formats are available for 3D and 2D plots. They depend furthermore on the graphics libraries linked to proper. Use the format option with the help flag for a 2D and a 3D grid to get the list of formats available for the two cases. For the output formats available in combination with -proper keyword to export data on grids see Section 25.2.29.

Electrostatic potentials

In an analogous way electrostatic potentials can be calculated on grids. The option ($pointval) pot leads to the calculation of the electrostatic potential of electrons and nuclei (and external constant electric fields and point charges \(Q\) if present). \[\begin{equation} V(\vec{R}_P)=- \int \frac{\rho(\vec{r})}{r_{Pr}} \mathrm{d}^3\vec{r} +\sum_{A}\frac{Z_A}{R_{PA}} +\Big( \vec{R}_P\vec{E} +\sum_{Q}\frac{Q}{R_{PQ}} \Big) \end{equation}\](22.10) In order to prevent the calculation of singularities at the positions of nuclei, for grid points 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 with ($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 25.2.29.

Exchange-correlation potentials

(Only for DFT) Computation of the Kohn-Sham exchange-correlation potential on a grid is requested with

$pointval xc

This functionality is not (yet) available in the proper program.

Canonical molecular orbitals.

Visualization of molecular orbitals, i.e. generation of .plt-files containing amplitudes of MOs \(i\) \[\begin{equation} A_i(\vec{R}_P)=\sum_{\nu}c_{i\nu}\phi_{\nu}(\vec{R}_P) \end{equation}\](22.11) or in the two-component case \[\begin{equation} A_i^{\Gamma}(\vec{R}_P)=\sum_{\nu}c_{i\nu}^{\Gamma}\phi_{\nu}(\vec{R}_P) \end{equation}\](22.12) with \(\Gamma\) as a part of the coefficient matrix (Re(\(\alpha\)), Im(\(\alpha\)), Re(\(\beta\)), Im(\(\beta\))), is achieved e.g. by ($pointval) mo 10-12,15. This triggers the calculation of amplitudes for the MOs/spinors 10-12 and 15 on the 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 a\(_{1g}\) 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 t\(_{2g}\).

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 \(\Gamma\) of the spinor (Re(\(\alpha\)), Im(\(\alpha\)), Re(\(\beta\)), Im(\(\beta\))) will be written to file, if \(N^\Gamma\) (see below) is larger than that threshold. \[\begin{align*} N^\Gamma&= \text{tr}(\mathbf{D}^\Gamma\mathbf{S})\\ D_{\mu\nu}^\Gamma&= \sum_ic_{i\nu}^{\Gamma *} c_{i\mu}^\Gamma \end{align*}\] The filenames consist of the number of the spinor according to file EIGS and an additional number for the respective part \(\Gamma\) of the spinor (1 for Re(\(\alpha\)), 2 for Im(\(\alpha\)), 3 and 4 for the corresponding \(\beta\)-parts) e.g. 10a_4.plt for the Im(\(\beta\)) 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 refers to the output from the localization section. For an UHF case the \(\beta\) spin orbitals get an offset of \(N_{\text{MO}}\), where \(N_{\text{MO}}\) is the total number molecular orbitals for each spin case. If one has e.g. 22 orbitals per spin case and is interested in plotting the first 3 \(\beta\)-type LMOs only, one have to type

$pointval lmo 23-25

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 which can also be visualized with TmoleX.

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 described in detail in Sections 25.2.29. In the proper program non-default grids can be specified with the grid option. 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 similar atomic numbers thus providing a complement to X-Ray Structure Analysis (for details, see ref. [390]).

Electron localization function

(ELF) [391] is calculated with ($pointval) elf, the ELF is defined as \[\begin{equation} \text{ELF}(\vec{r}) = \left( 1 + \chi_{\sigma}(\vec{r})^2 \right)^{-1}, \end{equation}\](22.13) where the index \(\sigma\) describes the spin and \(\chi\) is a dimensionless localization index defined with respect to the uniform electron gas, \[\begin{align} \chi_{\sigma}(\vec{r}) & = D_{\sigma}(\vec{r}) / D_{\sigma}^0(\vec{r}) \\ D_{\sigma}^0(\vec{r}) & = \frac{3}{5} (6 \pi^2)^{2/3} \rho_{\sigma}(\vec{r})^{5/3}. \end{align}\](22.14–22.15) Possible values of the ELF range from 0 to 1. \(\text{ELF} = 1\) corresponds to perfect localization and \(\text{ELF} = 0.5\) to electron-gas like pair probability.