VIEWMOL can be easily adapted to read outputs of other programs or other file formats. All you have to do is to write a new input filter which extracts the data from the corresponding file. These input filter are stand-alone programs and can be written in every programming language you want. Examples in C and awk are included.
The input filter has to read the following data from the output file and write them to its standard output in the format described below. This format follows the file format of TURBOMOLE very closely. A few sections had to be extended to allow data which are currently not supported by TURBOMOLE (e. g. unit cells).
$coord factor x1 y1 z1 symbol1 xyz x2 y2 z2 symbol2 xyz ...
factor
is the conversion factor the coordinates have to be multiplied
with to convert them to Ångstrøms. Any combination of x, y, and z at the
end of the line (optional) indicates that the corresponding atom has been kept
fixed in that direction during a geometry optimization. Consequently, VIEWMOL
will not draw the forces acting on this atom in the fixed direction.$title title
$vibrational spectrum symmetry1 wavenumber1 IR-intensity1 Raman-intensity1 symmetry2 wavenumber2 IR-intensity2 Raman-intensity2 ...
symmetry
is the symmetry label for the vibrational mode,
wavenumber
is its wave number and IR-intensity
and
Raman-intensity
are its IR and Raman intensity, respectively. If the
symmetry labels for the vibrational modes are unknown they should be set to a
default (e. g. A1).$vibrational normal modes i1 i2 nm(1,1) nm(2,1) nm(3,1) nm(4,1) nm(5,1) i1 i2 nm(6,1) ... nm(3*natom,1) i1 i2 nm(1,2) nm(2,2) nm(3,2) nm(4,2) nm(5,2) i1 i2 nm(6,2) ... nm(3*natom,2) ... i1 i2 nm(1,nmodes) ... nm(5,nmodes) i1 i2 nm(6,nmodes) ... nm(3*natom,nmodes)
i1
and i2
are integers which are skipped during reading.
nm(i,j)
are the normal mode coefficients. They have to be provided
ordered by cartesian coordinates (all x components of the first atom first,
then all y components of the first atom etc.).$grad cartesian gradients cycle = nc SCF energy = E_nc |dE/dxyz| = gradnorm_nc [unitcell a b c alpha beta gamma] x1 y1 z1 symbol1 x2 y2 z2 symbol2 ... xn yn zn symboln gx1 gy1 gz1 gx2 gy2 gz2 ... gxn gyn gzn cycle = nc+1 SCF energy = E_nc+1 |dE/dxyz| = gradnorm_nc+1 ...
nc
is a counter for the cycle, E_nc
is the energy for the
configuration of cycle nc, and gradnorm_nc
is the gradient norm of cycle
nc. The line starting with unitcell
is optional and can be used to
specify the current unit cell e. g. during a constant pressure MD run. The
x
, y
, and z
are the cartesian coordinates for each atom,
symbol
is the atomic symbol. The gx
, gy
, and gz
are the gradients for each atom. This structure can be repeated for as many
cycles as necessary.$scfmo [symmetrized] [gaussian] n symmetry_label_n eigenvalue=MO_E_n nsaos=norb moc(n,1) moc(n,2) moc(n,3) moc(n,4) moc(n,5) ... moc(n,norb) n+1 symmetry_label_n+1 eigenvalue=MO_E_n+1 nsaos=norb ...The string
symmetrized
after $scfmo
is optional and can be used to
notify VIEWMOL of the fact that the MO coefficients are with respect to
symmetrized AOs rather than with respect to AOs. VIEWMOL needs moloch from
the TURBOMOLE package to handle symmetrized AOs. If moloch is not
installed and symmetrized AOs are input, MOs and electron densities cannot be
drawn. The string gaussian
is also optional and notifies VIEWMOL
that the MO coefficients are normalized and ordered GAUSSIAN style.
n
is a counter counting the MOs, symmetry_label_n
is the symmetry
label for MO n, MO_E_n
is the MO energy for MO n, and norb
is the
total number of orbitals. The moc(n,i)
are the MO coefficients for MO n.$atoms atom_symbol1 list_of_indices1 \ basis=basis_set_name1 atom_symbol2 list_of_indices2 \ basis=basis_set_name2 ... $basis * basis_set_name1 * number_of_primitives angular_momentum exponent1 coefficient1 exponent2 coefficient2 ... exponentn coefficientn number_of_primitives angular_momentum ... * basis_set_name2 * ... * $closed shells symmetry_label list_of_indices (2) $pople [6d/10f/15g]
atom_symbol
is the atom symbol of an element and list_of_indices
contains the indices of all atoms of the particular element according to the
list of coordinates read in under $coord
. The list can be either comma
separated and/or contain hyphens for indicating ranges (e. g. c 1,3,7-10 is a
valid descriptor). Basis_set_name
can be an arbitrary string describing
a particular basis set. It is only used to find the corresponding basis set in
the list read under basis
. This list simply states the name for a basis
set and then lists the primitive functions which make up a contracted Gaussians
starting with the number of primitives in that particular contracted Gaussian
and its angular momentum (s, p, d, f, ...). Than the exponents and contraction
coefficients are listed line by line. This is repeated for all contracted
Gaussians of that particular basis set. $closed shells
is used to tell
VIEWMOL which MOs are occupied and which are not. symmetry_label
is the symmetry label for a number of MOs and list_of_indices
is a list
of integers stating which of the MOs of that particular symmetry are occupied.
This list can be either comma-separated or contain hyphens to indicate ranges
of MOs. Note: $closed shells
has to appear after $scfmo
in
the output written by the input filter. $pople
is used to indicate that
d, f, or g functions have 6, 10, or 15 components instead of 5, 7, or 9.
Note: This data group has to appear after the $coord
or $grad
in the output. Otherwise VIEWMOL will fail.$unitcell a b c alpha beta gamma
$error errorLabel severity additionalInformation
errorLabel
is an arbitrary one word label which refers to an error
message in the resources. severity
is a label for the severity of the
error. Set it to 0 if the program can continue despite this error. Set it to
1 if the program must stop. additionalInformation
is any additional
information you want to be displayed in the error message (e. g. the name of a
file which was not found). Currently, the following errorLabels are in use:
noFile
, notConverged
, unsupportedVersion
,
wrongFiletype
, noCoordinates
, noEnergy
, and
unknownErrorMessage
. If your input filter wants to
return an error because it is missing coordinates in the input file "dummy.inp"
you can have it writing the following line to standard output:
$error missingCoordinates 1 dummy.inpThen you have to specify a resource for the error message in
$HOME/.Xdefaults
:
Viewmol.missingCoordinates: The file %s does not contain any coordinates.With these two lines in place any encounter of no coordinates in an input file will lead to the display of the error dialog in the Figure. There is no need to recompile VIEWMOL to achieve this.
$end
.
Figure 14: The error dialog produced by the sample error
message
The input filter can be installed by adding a line to the viewmolrc
file.