Skip to content

Quantum Chemistry

jzador edited this page Oct 21, 2026 · 9 revisions

Note the three levels:

  • L1: level for exploration
  • L2 = high-level: level for good geometries and frequencies
  • L3 = single-point : level for accurate electronic energies

Pro tip: If you want to add additional keywords to your calculations, you can type them as part of the basis set. E.g., adding dispersion correction at the L2 level looks like "high_level_basis": "6-311++G** EmpiricalDispersion=GD2" in the json input file.

parameter default description use with...
qc "gauss" The quantum chemistry package for all levels unless profiles are given (see Independent L0, L1 and L2 methods below): "gauss" (Gaussian), "qchem" (Q-Chem), "orca" (ORCA), "fc" (FairChem MLIP).
qc_command "g16" Command to run the quantum chemistry code. For ORCA, set to the full path of the ORCA executable. Not used for fc. all except fc
method "b3lyp" Low-level (L1) method for reaction and conformational searches. all except fc
basis "6-31G" Low-level (L1) basis set for reaction and conformational searches. all except fc
scan_method "mp2" Method for the constrained scans of reaction families that locate the TS by scanning a bond length (scan_step points). ORCA and FairChem run these scans at the L1 method. Gaussian, Q-Chem
scan_basis "6-31G" Basis set for those scans. Gaussian, Q-Chem
calcall_ts 1 1: Use CalcAll in the final optimization of saddle points at the L1 level. For Gaussian this sets the CalcAll keyword; for ORCA and fc it sets gamma=0.0 in Sella. 0: do not. all
high_level_method "M062X" High-level (L2) method for energy and frequency calculations. With qc: "fc" L2 is only available through l2_profile. all except fc
high_level_basis "6-311++G(d,p)" High-level (L2) basis set for energy and frequency calculations. all except fc
integral '' Integral grid, only used for the high-level (L2) calculations. Gaussian
opt '' Convergence threshold in L2 calculations, as in Opt=VeryTight. Gaussian
guessmix 0 1: use Guess=(Mix,Always) in Gaussian to break spatial symmetry. Gaussian
irc_maxpoints 30 Maximum number of steps in IRC calculations. all
irc_stepsize 20 Step size in IRC calculations in units of 0.01 Bohr. all
irc_maxcycle 999 Maximum number of iterations to converge each point along the IRC path (IRC(MaxCycle=n)). Gaussian
use_sella false Use the Sella optimizer instead of the quantum chemistry code's own. Automatically enabled for orca and fc; with Gaussian the code evaluates energies and forces and Sella drives the optimization. all
sella_kwargs {} Dictionary of keyword arguments passed to Sella, e.g. {"internal": true}. internal and gamma are set automatically when needed. use_sella, orca, fc
sella_fmax 0.005 Maximum force (eV/Å) for Sella convergence. use_sella, orca, fc
sella_steps 250 Maximum number of Sella optimization steps. use_sella, orca, fc
calc_kwargs {} Additional keyword arguments merged into the calculator setup. With profiles, calculator_kwargs inside a profile overrides these for that level. all
imagfreq_threshold 50.0 Threshold (cm⁻¹) below which spurious imaginary frequencies are accepted for floppy structures. all
orcablocks '' Additional ORCA block input appended to the input file, e.g. "%scf MaxIter 300 end". The %pal nprocs block is set automatically from ppn. ORCA
orcasimpleinput '' Additional keywords appended to the ORCA simple input line (after method and basis). ORCA
fc_model_path '' Required when qc = "fc". Local FairChem checkpoint file, e.g. "/scratch/models/uma-s-1p2.pt", or a pretrained model name such as "uma-s-1p2". fc
fc_task_name "omol" FairChem task name. Options: "omol" (gas-phase molecules, default), "omat" (bulk inorganic), "oc20" (heterogeneous catalysis), "oc22", "odac", "omc". fc
fc_device "cpu" Device for FairChem inference: "cpu", "cuda", "cuda:0", etc. Use "cuda" for GPU-accelerated runs. fc
fc_compile false Compile the UMA model with torch.compile at the first evaluation of each job. Off by default because KinBot's jobs are short and compilation can cost more than it saves; set to true for long jobs. Applies to every FairChem level and can be changed on restart. fc
L3_calc 0 Turn on or off the generation of L3 input files and the reading of the L3 output files.
single_point_qc "molpro" Code to use for single-point (L3) energies.
single_point_template '' If not specified, the default template is used. The user can specify a path to a modified file. An example is shown below this table. all
single_point_command '' Command line string to run Molpro. User should always define this parameter if running single point calculations. If -n option for Molpro is used, the value (i.e. -n 4) should match the single_point_ppn value defined below. Molpro
single_point_key "mytza" String to parse when searching for the energy in output. User should always define. Molpro

Independent L0, L1 and L2 methods (theory profiles)

By default one code (qc) with method/basis is used for L1 and high_level_method/high_level_basis for L2. Theory profiles let each level use its own code, method and optimizer: for example a small UMA model for the preliminary (L0) conformer search, a larger UMA model for reaction discovery (L1) and Gaussian for the final geometries and frequencies (L2).

level covers profile key
L0 preliminary conformer searches (l0_conformer_search) and ring-conformer preparation l0_profile
L1 well and conformer optimizations, reaction search, IRCs, hindered rotors when high_level: 0 l1_profile
L2 refinement of stationary points when high_level: 1, hindered rotors when high_level: 1 l2_profile

L3 single points keep their own settings (single_point_*). Each profile is a dictionary with these fields:

field default description
calculator required "gaussian", "qchem", "orca" or "fairchem" (aliases gauss, fc, uma are accepted).
method, basis from method/basis (L1), high_level_* (L2), l0_method (L0) Level of theory. Ignored for FairChem.
command from qc_command Executable. Can be changed on restart.
calculator_kwargs {} Extra calculator keywords for this level, e.g. {"integral": "UltraFine"}; override calc_kwargs.
optimizer "sella" ("native" for Gaussian/Q-Chem without use_sella) "native": the code's own optimizer (Gaussian, Q-Chem). "sella": Sella drives the optimization (Gaussian, ORCA, FairChem). "bfgs": BFGS for wells, Sella for saddles. Q-Chem requires "native"; ORCA and FairChem require "sella" or "bfgs".
frequency_mode "auto" "auto": the code's usual frequency calculation. "ase_forces": finite differences of forces (Sella/BFGS only). "native_hessian": a Gaussian or Q-Chem Hessian after a Sella optimization. Harmonic frequencies only.
model_path, task_name, device from fc_model_path, fc_task_name, fc_device FairChem model (checkpoint file or pretrained name), task and device. device can be changed on restart.
label '' Free text used to describe the level in the MESS and PES output.

Fields that are not given are inherited from the ordinary settings, so a single l1_profile is enough to switch one level. l0, l1 and l2 with a calculator alias ("l1": "fc") are shorthand for a profile with only the calculator set. Example (uma-s is the small model, uma-m the larger one):

{
  "l0_profile": {"calculator": "fairchem", "model_path": "uma-s-1p1", "task_name": "omol", "device": "cuda"},
  "l1_profile": {"calculator": "fairchem", "model_path": "uma-m-1p1", "task_name": "omol", "device": "cuda"},
  "l2_profile": {"calculator": "gaussian", "method": "M062X", "basis": "6-31G(d)", "command": "g16",
                 "optimizer": "native", "calculator_kwargs": {"integral": "UltraFine"}},
  "conformer_search": 1, "l0_conformer_search": 1, "high_level": 1
}

The keywords that select the profiles:

parameter default description
l0_profile, l1_profile, l2_profile {} Profile of each level, with the fields in the table above.
l0, l1, l2 '' Shorthand for a profile with only the calculator set, e.g. "l1": "fc".
l0_qc qc Instead of a full l0_profile: calculator for the L0 conformer search ("gaussian", "qchem", "orca", "fairchem" or an alias).
l0_basis '' Basis set of the L0 method.
l0_qc_command qc_command if l0_qc is the same code, otherwise '' Executable for the L0 jobs.
l0_calc_kwargs calc_kwargs if l0_qc is the same code, otherwise {} Extra calculator keywords for the L0 jobs.
profiled_theory 0 1: use the profile machinery (and its restart records) even when no profile is given. Any profile key, including the l0_* keywords above, switches it on.
profiled_l1_reuse_only 0 1: continue a profiled run without submitting new L1 jobs (see Restarts below).

Notes:

  • L0 does not control the TS search. For Gaussian the constrained steps always use AM1 (Q-Chem: B3LYP/STO-3G) and bond scans scan_method/scan_basis; for FairChem every step of the search uses the L1 model. The final TS optimization uses L1.
  • Q-Chem cannot prepare ring conformers; use Gaussian or FairChem at L0 when ring preparation is needed.
  • Inputs without any profile key behave exactly as before.

Restarts. KinBot records the profiles in .kinbot_theory_jobs.json before the first job and the level of every job before submission, and reads each result through the level that produced it. Methods, basis sets, models, optimizer and frequency mode must stay fixed in a directory; changing them, adding profiles to a directory started without them, or removing them, is refused with a message to start a fresh directory. command and device may change. Changing high_level after rotor scans exist is refused as well, because L1 and L2 rotor scans share their file names. profiled_l1_reuse_only: 1 continues a profiled run without submitting any new L1 job: completed L1 results are reused, a reaction whose L1 result is missing is marked failed, and L0/L2 jobs are still submitted.

FairChem MLIP (qc = "fc")

FairChem provides machine-learned interatomic potentials (MLIPs) trained on large DFT datasets. When qc = "fc", KinBot uses the UMA models via FAIRChemCalculator.

Important notes:

  • With qc: "fc" alone, FairChem is used at every level and high_level_method/high_level_basis are ignored. To combine UMA exploration with DFT refinement, use theory profiles (next section), e.g. a FairChem l1_profile and a Gaussian l2_profile.
  • method, basis, and qc_command are ignored.
  • Sella is always used as the optimizer (set automatically).
  • Charge and spin multiplicity are passed to the calculator via mol.info.

Recommended model: uma-s-1p2 (best accuracy/speed tradeoff for gas-phase molecules). Download from HuggingFace:

pip install huggingface_hub hf_xet
python -c "
from huggingface_hub import hf_hub_download
hf_hub_download(repo_id='facebook/UMA', filename='uma-s-1p2.pt', local_dir='/path/to/models/')
"

Example input:

{
  "qc": "fc",
  "fc_model_path": "/path/to/models/uma-s-1p2.pt",
  "fc_task_name": "omol",
  "fc_device": "cuda",
  "sella_fmax": 0.05,
  "reaction_search": 1,
  "conformer_search": 1,
  "rotor_scan": 1
}

ORCA (qc = "orca")

ORCA is a free quantum chemistry package. When qc = "orca", Sella is used as the optimizer (set automatically). Both L1 and L2 calculations are supported.

Example input:

{
  "qc": "orca",
  "qc_command": "/path/to/orca",
  "method": "PBE",
  "basis": "def2-SVP",
  "high_level_method": "DLPNO-CCSD(T)",
  "high_level_basis": "def2-TZVP",
  "orcablocks": "%scf MaxIter 300 end",
  "high_level": 1
}

Parameters marked with an asterisk (*) must not change when a run is restarted, see Restarting.KinBot's internal Molpro template:

***,{name}
memory,1600,M
geomtyp=xyz
geometry={{
{natom}
{name}
{geom}
}}
{{uhf;wf,{nelectron},1,{spin},{charge}}}

basis=cc-pvdz-f12
rhf
CCSD(T)-F12

myena(1) = energy(1)
myenb(1) = energy(2)

basis=cc-pvtz-f12
rhf
CCSD(T)-F12

myenergy(2) = energy(1)
myenb(2) = energy(2)
---

Clone this wiki locally