Basically, this program converts geometries from one program to another one (like Babel). But also, it can also calculate distances, angles, zmatrix, adds dummy atoms... (sorry it can't make coffee, maybe the next version).
What does-it do?
Read cartesian coordinates from g92, monstergauss (an old ab initio program), exthuc (extended Hückel), ampac, gamess, molpro.
Write cartesian coordinates for xmol, rasmol, molecule, chem3d, molplt.
Read a zmatrix.
Write zmatrix for g92, monstergauss, exthuc.
Calculate rotational constants.
How does-it work?
The program reads "namelist" (here, only 4 letters of a word -French-)
which correspond to a command and then it does it.
So, when you add a dummy atom, you can use it for another command.
download a copy of cart cart.tar.gz
uncompress and compile it.
gunzip cart.tar.gz tar xvf cart.tar cd cart make
There are more examples in cart/examples
a simple example: read (lecture) and write (ecriture) cartesian coordinates.
$lect na=4 prog='molpro' $end 1 O 8.00 1.374606665 1.374606665 -0.344635602 2 O 8.00 1.374606665 -1.374606665 0.344635602 4 O 8.00 -1.374606665 -1.374606665 -0.344635602 3 O 8.00 -1.374606665 1.374606665 0.344635602 $eras $end $fini
With the first namelist ($lect), the program reads the number of atoms (na) and the format of the cartesian coordinates (prog='molpro').
With $eras, it's write the same geometry in xyz for rasmol.
The last one ($fini) is use to specify the end of the file.
you get:
4 O 0.727410 0.727410 -0.182373 O 0.727410 -0.727410 0.182373 O -0.727410 -0.727410 -0.182373 O -0.727410 0.727410 0.182373
You need to specify the number of atoms "nb=??" and the format of xyz with a program name
(prog='g92', 'monst', 'ampac', 'gamess', 'exthuc' and 'molpro') in the namelist.
You can also specify the unit (bohr=.true. or .false.)
and a convention flag (convert=.true. or .false.). If convert=.true. then it does the conversion (Bohr->Ångström or the reverse).
Then you need to give "na" lines which define your cartesian coordinates.
the complete example:
$lect na=3 prog='gamess' convert=f $end O 8.0 0.0000000000 0.5000000000 -0.1344680200 H 1.0 1.4326043750 0.5000000000 1.0670525220 H 1.0 -1.4326043750 0.5000000000 1.0670525220 $puri $end $cart $end $rota $end $fini
Also example for the rotational constants (the units MUST be in Bohr).
you get:
8 0.000000000 0.000000000 0.000000000 1 0.000000000 0.000000000 1.869761190 1 -1.841201533 0.000000000 -0.325551565 txx,tyy,tzz,txy,txz,tyz (masse au * bohr^2) 6372.11125974603 12251.4586000692 5879.34734032315 0.000000000000000E+000 -1393.44696872439 0.000000000000000E+000 moments of inertia in masse au * bohr^2 4710.66798520812 7540.79061486106 12251.4586000692 moments of inertia in kg * cm^2 1.201661451093768E-043 1.923607739093903E-043 3.125269190187670E-043 rotational constants in cm-1 23.2954828331759 14.5524906852527 8.95707921517093
For these namelists you don't need other data.
You need to specify the number of operation "nb=??" (nb=1 default) in the namelist. Then on the next line(s) ("nb" lines) the atoms involve in the "nb" operation(s).
example:
$dist nb=2 $end 1 2 1 3 $angl $end 3 2 1 $dihe nb=1 $end 5 1 2 3 $prod $end 3 2 1 $proj $end 1 2 3 4 5
$dist: calculate 2 distances (nb=2) between atoms 1-2 and 1-3.
$angl: calculate 1 valence angle (nb=1, default) between atoms 3, 2 and 1.
$dihe: calculate 1 dihedral angle (nb=1) between atoms 5 1 2 3 (the angle between the plans 5-1-2 and 1-2-3).
$prod: add a dummy atom # at 1.000 (Ångström or Bohr) from 2 such the vector #-2 is perpendicular to the vectors 3-2 and 1-2 (vector product).
$proj: add a dummy atom # from 4 such the vector 4-# is the projection of the vector 4-5 on the plan 1-2-3.
the complete example:
$lect na=5 prog='molpro' convert=.false. $end 1 O 8.00 0.000000000 0.000000000 0.000000000 2 O 8.00 0.000000000 0.000000000 0.500000000 3 O 8.00 0.000000000 0.500000000 0.000000000 5 O 8.00 0.000000000 0.000000000 0.000000000 4 O 8.00 0.500000000 0.000000000 0.500000000 $oper $end $dist nb=2 $end 1 2 1 3 $angl $end 3 2 1 $dihe nb=1 $end 5 1 2 3 $prod $end 3 2 1 $proj $end 1 2 3 4 5 $fiop $cart $end $fini
you get:
oper 5 dist 5 1 2 0.50000000 1 3 0.50000000 angl 5 3 2 0.70710678 1 45.000 dihe 5 5 1 0.70710678 2 45.000 3 90.000 prod 5 point : 6 -1.00000000 0.00000000 0.50000000 proj 6 point : 7 0.00000000 0.00000000 0.50000000 fiop 7 8 0.000000000 0.000000000 0.000000000 8 0.000000000 0.000000000 0.500000000 8 0.000000000 0.500000000 0.000000000 8 0.000000000 0.000000000 0.000000000 8 0.500000000 0.000000000 0.500000000 0 -1.000000000 0.000000000 0.500000000 0 0.000000000 0.000000000 0.500000000
You need to specify the number of operation "nb=??" and "norm=??" in the namelist (nb=1 and norm=1.000 default). Then on the next ligne(s) ("nb" lines) the atoms involve in the "nb" operation(s)
example:
$biss nb=1 norm=0.5 $end 2 1 3
$biss: add 1 dummy atom # (nb=1) at 0.5 (norm=0.5) from 1, such the vector 1-# is the bisector of the vectors 1-2 and 1-3.
the complete example:
$lect na=5 prog='molpro' convert=.false. $end 1 O 8.00 0.000000000 0.000000000 0.000000000 2 O 8.00 0.000000000 0.000000000 0.500000000 3 O 8.00 0.000000000 0.500000000 0.000000000 5 O 8.00 0.000000000 0.000000000 0.000000000 4 O 8.00 0.500000000 0.000000000 0.500000000 $oper $end $biss nb=1 norm=0.5 $end 2 1 3 $fiop $cart $end $fini
you get:
oper 5 biss 5 fiop 6 8 0.000000000 0.000000000 0.000000000 8 0.000000000 0.000000000 0.500000000 8 0.000000000 0.500000000 0.000000000 8 0.000000000 0.000000000 0.000000000 8 0.500000000 0.000000000 0.500000000 0 0.000000000 0.353553391 0.353553391
Add a dummy atom between 2 atoms.
You need to specify "n1=??" and "n2=??" the first and the second atom, respectively and also "r=??" for the position of this atom between the two atoms (r=0.0 add an atom in n1 and r=1.0 add an atom in n2).
example:
$fic2 n1=1 n2=2 r=0.2 $end
$fic2: add 1 dummy atom # at 0.2*distance(1-2) (r=0.2) from 1.
the complete example:
$lect na=5 prog='molpro' convert=.false. $end 1 O 8.00 0.000000000 0.000000000 0.000000000 2 O 8.00 0.000000000 0.000000000 0.500000000 3 O 8.00 0.000000000 0.500000000 0.000000000 5 O 8.00 0.000000000 0.000000000 0.000000000 4 O 8.00 0.500000000 0.000000000 0.500000000 $oper $end $fic2 n1=1 n2=2 r=0.2 $end $fiop $cart $end $fini
you get:
oper 5 fic2 5 6 0.000000000000000E+000 0.000000000000000E+000 0.100000001490116 fiop 6 8 0.000000000 0.000000000 0.000000000 8 0.000000000 0.000000000 0.500000000 8 0.000000000 0.500000000 0.000000000 8 0.000000000 0.000000000 0.000000000 8 0.500000000 0.000000000 0.500000000 0 0.000000000 0.000000000 0.100000001
Add a dummy atom(s) like in a zmatrix (from a distance, a valence angle and a dihedral angle).
You need to specify the number of operation "nb=??" (nb=1 default) in the namelist.
Then on the next line(s) ("nb" lines):
the first atom number, a distance, the second atom number, the valence angle, the third atom number and the dihedral angle.
example:
$fict $end 1 2.0 2 90. 3 45.
$fict: add a dummy atom # at 2.0 (second number) from 1 such the valence angle #-1-2 is 90. (fourth number) and the dihedral angle #-1-2-3 is 45. (last number).
the complete example:
$lect na=5 prog='molpro' convert=.false. $end 1 O 8.00 0.000000000 0.000000000 0.000000000 2 O 8.00 0.000000000 0.000000000 0.500000000 3 O 8.00 0.000000000 0.500000000 0.000000000 5 O 8.00 0.000000000 0.000000000 0.000000000 4 O 8.00 0.500000000 0.000000000 0.500000000 $oper $end $fict $end 1 2.0 2 90. 3 45. $fiop $cart $end $fini
you get:
oper 5 fict 5 point : 6 1.41421356 1.41421356 0.00000000 fiop 6 8 0.000000000 0.000000000 0.000000000 8 0.000000000 0.000000000 0.500000000 8 0.000000000 0.500000000 0.000000000 8 0.000000000 0.000000000 0.000000000 8 0.500000000 0.000000000 0.500000000 0 1.414213563 1.414213562 0.000000000
Rotate the geometry such the first atom is on the origin and the second on the z-axis.
the complete example:
$lect na=4 prog='molpro' convert=f $end 1 O 8.00 -1.300720025 1.300720025 -0.237043517 2 O 8.00 -1.300720025 -1.300720025 0.237043517 3 O 8.00 1.300720025 1.300720025 0.237043517 4 O 8.00 1.300720025 -1.300720025 -0.237043517 $puri $end $cart $end $fini
you get:
8 0.000000000 0.000000000 0.000000000 8 0.000000000 0.000000000 2.644286076 8 2.601440050 0.466405284 0.084997806 8 2.601440050 -0.466405284 2.559288269
Write a zmatrix for some programs.
You need to specify the number of atoms "nb=??"
(nb= number of atoms previously defined, default)
involve in the zmatrix. Also the name of the program
(prog='g92' (default) or prog='monster' or prog='exthuc').
Then you need to give nb lines which define your zmatrix.
the complete example:
$lect na=4 prog='molpro' $end 1 O 8.00 1.374606665 1.374606665 -0.344635602 2 O 8.00 1.374606665 -1.374606665 0.344635602 4 O 8.00 -1.374606665 -1.374606665 -0.344635602 3 O 8.00 -1.374606665 1.374606665 0.344635602 $oper $end $zmat nb=4 prog='g92' $end 1 2 1 3 2 1 4 3 2 1 $fiop $fini
you get:
oper 4 zmat 4 g92 O1 O2 O1 R1 O3 O2 R2 O1 A4 O4 O3 R3 O2 A5 O1 DH6 R1 1.49984751 R2 1.49984751 R3 1.49984751 A4 86.6094972 A5 86.6094972 DH6 -27.3367493 fiop 4
Read a zmatrix.
You need to specify the number of atoms "nb=??" involve in the zmatrix.
Then you need to give nb lines which define your zmatrix.
the complete example:
$lecz nb=4 $end 0. 0. 1 1. 1. 2 4.1 1 90. 1. 3 1.34 2 110. 1 90. $cart $end $fini
you get:
0 0.000000000 0.000000000 0.000000000 0 0.000000000 0.000000000 1.000000000 1 4.100000000 0.000000000 1.000000001 1 4.558306992 1.259188112 1.000000001