TeraChem
TeraChem is general purpose quantum chemistry software designed to run on Nvidia CUDA-enabled GPU architectures under a 64-bit Linux operating system.
Installed versions
TeraChem version 1.96H-beta-230511 [c1cd18840b1d12df7afe4db064ccb603c02c0810]
TeraChem manual can be downloaded here: TeraChem User’s Guide (PDF)
Submitting a TeraChem calculation
TeraChem requires two inputs. In this example TeraChem performs a DFT single-point energy and gradient calculation using B3LYP/6-31+G* with D3 dispersion on the structure provided in the cis-decalin.xyz file. The input.in specifies the job parameters:
# basis set
basis 6-31+gs
sphericalbasis yes
# coordinates file
coordinates cis-decalin.xyz
# net charge
charge 0
# SCF method (rhf/blyp/b3lyp/etc...): DFT-B3LYP
method b3lyp
convthre 1.0e-5
threall 1.0e-9
# specify the DFT grid type (0/1/2/3/4/5)
# 2 means 6000-7000 points per atom
dftgrid 2
# add dispersion correction (DFT-D)
dftd d3
# type of the job (energy/gradient/md/minimize/ts): single-point energy
run gradient
end
cis-decalin.xyz contains the molecule geometry in “.xyz” format:
28
C -2.360531 -0.566955 -0.556000
C -1.547996 -1.213282 0.597000
H -1.619087 -2.311341 0.530000
H -2.005250 -0.906660 1.553000
C -0.055357 -0.776046 0.597000
C 2.243811 -0.978142 -0.497000
C 1.547996 1.213282 0.597000
C 2.360531 0.566955 -0.556000
C 0.055357 0.776046 0.597000
C 0.758172 -1.415373 -0.570000
H 2.692116 -1.345771 0.441000
H 2.005250 0.906660 1.553000
H 2.005229 0.931661 -1.532000
C -0.758172 1.415373 -0.570000
H 0.356938 -1.132705 -1.553000
H 0.397951 -1.148671 1.531000
H 2.805185 -1.429678 -1.337000
H 1.619087 2.311341 0.530000
H 3.421293 0.854833 -0.457000
H -0.397951 1.148671 1.531000
H 0.699082 -2.514422 -0.497000
C -2.243811 0.978142 -0.497000
H -0.356938 1.132705 -1.553000
H -0.699082 2.514422 -0.497000
H -3.421293 -0.854833 -0.457000
H -2.005229 -0.931661 -1.532000
H -2.805185 1.429678 -1.337000
H -2.692116 1.345771 0.441000
Most importantly, TeraChem can also be used to run a GPU-accelerated ab initio NVT molecular dynamics simulation of cis-decalin, using DFT at the B3LYP/6-31+G* level with Grimme D3 dispersion, propagating 2000 MD steps (0.5 fs timestep) under a Langevin thermostat at 300 K, with an input file (input.in) such as the following:
# ============================================
# Ab Initio Molecular Dynamics (DFT-based NVT)
# ============================================
# basis set
basis 6-31+gs
sphericalbasis yes
# coordinates file
coordinates cis-decalin.xyz
# net charge and spin multiplicity
charge 0
spinmult 1
# SCF method (rhf/blyp/b3lyp/etc...): DFT-B3LYP
method b3lyp
# SCF convergence
convthre 1.0e-5
threall 1.0e-9
# specify the DFT grid type (0/1/2/3/4/5)
# 2 means 6000-7000 points per atom
dftgrid 2
# add dispersion correction (DFT-D)
dftd d3
# ============================================
# Molecular Dynamics Setup (Born–Oppenheimer)
# ============================================
run md
# --- Total MD steps ---
nstep 2000
# --- Integration timestep (fs) ---
timestep 0.5
# --- Thermostat: Langevin NVT ---
thermostat langevin
# Target temperature (K)
t0 300.0
# Initial velocity temperature (K)
tinit 300.0
# Langevin damping time (fs)
lnvtime 1000.0
# --- Initial velocities ---
velocities random
# --- Restart handling (optional) ---
#restartmd scr/restart.md
restartmdfreq 100
end
Job submission script (subTerachem.sh) for a TeraChem job looks like this (initiation of the TeraChem environment included):
#!/bin/bash
#SBATCH --job-name=TeraChem
#SBATCH --time=01:00:00
#SBATCH --nodes=1
#SBATCH --partition=gpu
#SBATCH --gres=gpu:1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=8
#SBATCH -o slurm-%j.out
#SBATCH -e slurm-%j.err
set -eo pipefail
# --- Clean module environment ---
module purge
# --- Load TeraChem environment (once per session) ---
source /opt/software/packages/TeraChem/SetTCVars.sh
# --- Threading setup ---
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}
echo "JobID: ${SLURM_JOB_ID}"
echo "Node: ${SLURM_NODELIST}"
echo "GPUs allocated: ${SLURM_GPUS:-1}"
echo "OMP threads: ${OMP_NUM_THREADS}"
echo "Working dir: $(pwd)"
# --- Run TeraChem ---
terachem input.in > terachem.out
Then to submit the TeraChem job via SLURM to the KOMONDOR gpu queue:
sbatch subTerachem.sh
Typical TeraChem Output Files
File |
Content |
Visualization Tools |
|---|---|---|
|
Input molecular geometry in XYZ format. |
Avogadro, VMD |
|
Main output file containing energies, SCF iterations, and runtime information. |
ChemCraft |
|
Ab initio molecular dynamics trajectory file. |
VMD |
|
Molecular orbitals or electron density cube files. |
VMD, GaussView, IQmol |
|
Nuclear gradients (forces) computed during the calculation. |
ASE, custom analysis scripts |
Citing TeraChem
Core TeraChem References
Ufimtsev, I. S.; Martínez, T. J. Quantum Chemistry on Graphical Processing Units. 3. Analytical Energy Gradients and First Principles Molecular Dynamics. J. Chem. Theory Comput. 2009, 5, 2619–2628.
Titov, A. V.; Ufimtsev, I. S.; Luehr, N.; Martínez, T. J. Generating Efficient Quantum Chemistry Codes for Novel Architectures. J. Chem. Theory Comput. 2013, 9, 213–221.
Module-Specific References
Song, C.; Wang, L.-P.; Martínez, T. J. Automated Code Engine for Graphical Processing Units: Application to Effective Core Potential Integrals and Gradients. J. Chem. Theory Comput. 2016, 12, 92–106.
Isborn, C. M.; Luehr, N.; Ufimtsev, I. S.; Martínez, T. J. Excited-State Electronic Structure with Configuration Interaction Singles and Tamm–Dancoff Time-Dependent Density Functional Theory on Graphical Processing Units. J. Chem. Theory Comput. 2011, 7, 1814–1823.
Fales, B. S.; Levine, D. S.; Ufimtsev, I. S.; Martínez, T. J. Quantum Chemistry for Solvated Molecules on Graphical Processing Units Using Polarizable Continuum Models. J. Chem. Theory Comput. 2015, 11, 4708–4716.
Bannwarth, C.; Yu, J. K.; Hohenstein, E. G.; Martínez, T. J. Hole–Hole Tamm–Dancoff-Approximated Density Functional Theory: A Highly Efficient Electronic Structure Method Incorporating Dynamic and Static Correlation. J. Chem. Phys. 2020, 153, 024110. https://doi.org/10.1063/5.0004046
Third-Party Codes Used in TeraChem
Kästner, J.; Carr, J. M.; Keal, T. W.; Thiel, W.; Wander, A.; Sherwood, P. DL-FIND: An Open-Source Geometry Optimizer for Atomistic Simulations. J. Phys. Chem. A 2009, 113, 11856–11865.
Goumans, T. P. M.; Catlow, C. R. A.; Brown, W. A.; Kästner, J.; Sherwood, P. An Embedded Cluster Study of the Formation of Water on Interstellar Dust Grains. Phys. Chem. Chem. Phys. 2009, 11, 5431–5436.
Grimme, S.; Antony, J.; Ehrlich, S.; Krieg, H. A Consistent and Accurate Ab Initio Parametrization of Density Functional Dispersion Correction (DFT-D) for the 94 Elements H–Pu. J. Chem. Phys. 2010, 132, 154104. https://doi.org/10.1063/1.3382344
Grimme, S.; Ehrlich, S.; Goerigk, L. Effect of the Damping Function in Dispersion Corrected Density Functional Theory. J. Comput. Chem. 2011, 32, 1456–1465. https://doi.org/10.1002/jcc.21759
Tomov, S.; Dongarra, J.; Baboulin, M. Towards Dense Linear Algebra for Hybrid GPU Accelerated Manycore Systems. Parallel Comput. 2010, 36, 232–240. https://doi.org/10.1016/j.parco.2009.12.005
Last update by Milán SZŐRI: 2026-01-27