VIEWMOL can be easily adapted to write files in any format. All you have to do is to write a new output filter which formats the data provided by VIEWMOL. These output filters are stand-alone programs and can be written in every programming language you want. Examples in awk are included.
The output filter has to accept the following data from its standard input and write them to a file whose name is given as a command line parameter to the filter. VIEWMOL passes the following data groups to the output filter:
$unitcell a b c alpha beta gamma
$coord x1 y1 z1 symbol1 x2 y2 z2 symbol2 ...
$bonds atom1 atom2 bond_order ...where
atom1
and atom2
are the numbers of the atoms
according to the list in $coord
which form the bond.
bond_order
is the actual order of the bond, if the
bond is part of a conjugated system, or if it is a hydrogen
bond.
$end
is passed to the output filter as last line.