5. Generating data for TAMkin¶
TAMkin can read information from CHARMM, Gaussian, GAMESS, CP2K, CPMD, Q-CHEM and VASP. Some of these programs offer freedom in the amount of output that is printed to the output file. To produce output that TAMkin can read from, we suggest the following settings.
Although most packages can do the standard frequency computation, the actual frequencies are never read by TAMkin. Instead, TAMkin reads all the ingredients (such as the Hessian and the atomic masses) required for the computation the frequencies. This makes it possible to compute frequencies with different types of normal mode analysis methods.
5.1. CHARMM¶
The CHARMM-input file should contain a VIBRAN
section:
CALC k = 3 * ?NATOM
VIBRan NMODes @k
OPEN WRITe CARD UNIT 20 NAME filename.hessian
WRITe SECOnd CARD UNIT 20
* title - Full Hessian
*
END
where the WRITe SECOnd
command will write the Hessian to the file
filename.hessian
. In addition, the statement
SCALar MASS SHOW
should be called before writing the coordinates to a coordinate file, such that the atomic masses will be included in the coordinate file.
5.2. CP2K¶
The optimization:
&GLOBAL RUN_TYPE GEO_OPT PRINT_LEVEL LOW &END GLOBAL
The calculation of the energy (one SCF optimization):
&GLOBAL RUN_TYPE ENERGY_FORCE PRINT_LEVEL HIGH &END GLOBAL
The frequency calculation:
&VIBRATIONAL_ANALYSIS FULLY_PERIODIC T &END VIBRATIONAL_ANALYSIS ... &MOTION # Optionally constrain some atoms, such that only a partial Hessian is # computed. The same constraints can be used in the optimization. # You should not use _more_ constraints in the optimization. Less is OK but # sometimes not needed. &CONSTRAINT &FIXED_ATOMS COMPONENTS_TO_FIX XYZ LIST {integer} or a range {integer}..{integer} &END FIXED_ATOMS &END CONSTRAINT &END MOTION ... &GLOBAL RUN_TYPE vibrational_analysis PRINT_LEVEL medium &END GLOBAL
5.3. CPMD¶
TODO
5.4. GAMESS¶
TODO
5.5. Gaussian 98/03/09¶
Always let Gaussian keep the checkpoint file by adding the following line on top of the Gaussian input:
%chk=prefix.chk
Replace prefix
by the prefix of the .com
file. After the computation,
immediately transform the checkpoint file into a formatted checkpoint file:
toon@poony ~> formchk prefix.chk prefix.fchk
The original checkpoint file is in binary format and is not transferable from
one CPU architecture to another, so the formchk
command must be executed on
the (type of) machine where the computation was done. The formmated checkpoint
file is a text file that is used by TAMkin to extract all the results from a
Gaussian computation.
For optimizations we recommend the opt(tight)
option as it improves the
reproducibility of the frequencies. For frequency calculations, one can use
freq(noraman)
to skip the computation of Raman intensities. They are not
used by TAMkin and require about 10% of the computation time in a frequency job.
It is not recommended to work with link jobs because the formatted checkpoint
file only contains information about the last link.
5.7. Q-Chem/CHARMM (QM/MM)¶
TODO
5.8. VASP¶
TODO
6. Loading data into TAMkin¶
Once the proper output is created with a computational chemistry package, it can be loaded into TAMkin to perform a normal mode analysis and thermochemistry computations. Detailed instructions per package are listed below.
6.5. Gaussian 98¶
For the details, see tamkin.io.gaussian.load_molecule_g98fchk()
.
Given a formatted checkpoint file, it is loaded as follows:
molecule = load_molecule_g98fchk("freq.fchk")
where "freq.fchk"
is the name of the formatted checkpoint file of a
frequency computation in Gaussian98. One may also provide a second formatted
checkpoint with a refined energy computation:
molecule = load_molecule_g98fchk("freq.fchk", "ener.fchk")
It is also possible to give a numerical value for the refined energy (in internal units, i.e. Hartree):
molecule = load_molecule_g98fchk("freq.fchk", energy=-135.12597)
Gaussian98 does not write the atomic masses to the formatted checkpoint file.
Therefore the atomic masses used by Gaussian98 are added in a rather artificial
way inside the load_molecule_g98fchk
routine. If you wish to override these
masses with the IUPAC 2005 values, use the following snippet:
from molmod.periodci import periodic
import numpy
molecule = load_molecule_g98fchk("gaussian.fchk")
new_masses = numpy.array([periodic[n].mass for n in molecule.numbers])
molecule = molecule.copy_with(masses=new_masses)
6.6. Gaussian 03/09¶
For the details, see tamkin.io.gaussian.load_molecule_g03fchk()
.
Note: Formatted checkpoint files of Gaussian03 and Gaussian09 can both be
read with load_molecule_g03fchk
Given a formatted checkpoint file, it is loaded as follows:
molecule = load_molecule_g03fchk("freq.fchk")
where "freq.fchk"
is the name of the formatted checkpoint file of a
frequency computation in Gaussian03 or Gaussian09. One may also provide a second
formatted checkpoint with a refined energy computation:
molecule = load_molecule_g03fchk("freq.fchk", "ener.fchk")
It is also possible to give a numerical value for the refined energy (in internal units, i.e. Hartree):
molecule = load_molecule_g03fchk("freq.fchk", energy=-135.12597)
6.6.1. Torsional potentials¶
For the details, see tamkin.io.gaussian.load_rotscan_g03log()
.
For the treatment of hindered internal rotors one must load the torsional potential data from a relaxed potential energy surface scan.
load_rotscan_g03log("scan.log")
where "scan.log"
refers to the Gaussian log file of the PES scan. (The
formatted checkpoint file is not used here as it does not specify the dihedral
angle that was used for the scan.) The routine load_rotscan_g03log
tries
to figure out which atoms belong to the rotor top. It will always take the
smallest of the two possibilities. In case this does not work for some reason,
one may manually specify the atom indexes of the rotor top:
top_indexes = [0, 1, 3, 5] # Counting starts from zero.
load_rotscan_g03log("scan.log", top_indexes)