Examples¶
The OpenQP example inputs are the preferred source of runnable input decks. Use them as templates before writing a new input from scratch.
For self-contained inputs with reference results and explanations, start with the Worked Examples.
Use the canonical .oqp examples. Shared Cartesian coordinates live in examples/geometries.
| Folder | Contents |
|---|---|
examples/HF |
RHF, ROHF, and UHF Hartree-Fock energies and gradients. |
examples/DFT |
DFT energies, gradients, and optimization examples. |
examples/MP2 |
Standalone MP2 energy and analytic RHF-gradient reference examples. |
examples/SCF |
SCF convergence controls such as DIIS variants, MOM, pFON, and SOSCF. |
examples/TDHF |
TDHF energy and gradient examples. |
examples/TDDFT |
TDDFT energy and gradient examples. |
examples/SF-TDDFT |
Spin-flip TDDFT examples. |
examples/MRSF-TDDFT |
MRSF-TDDFT energies, gradients, and optimization data. |
examples/OPT |
Native optimization including frozen-distance constraints, MECI including the BaekA multistate regression, MECP, TS, IRC, NEB, and MEP; the TCI-named deck is retained for compatibility. |
examples/HESS |
Analytic and numerical Hessian workflows. |
examples/PCM |
ddX reference-SCF PCM energy cases. |
examples/SOC |
MRSF-TDDFT SOC cases. |
examples/NMR |
NMR shielding examples. |
examples/TRAH |
TRAH SCF examples. |
examples/ISPHER |
Spherical-harmonic AO convention examples. |
examples/ECP |
Effective-core-potential examples. |
examples/UMRSF-TDDFT |
UMRSF-TDDFT energy and analytic-gradient examples (Cartesian and spherical-harmonic bases). |
examples/XAS |
X-ray absorption examples. |
examples/MD |
Gas-phase ground-state Born--Oppenheimer MD with md(...). |
examples/ODP |
ODP umbrella windows for MRSF-TDDFT NAMD: an NVE window, the same window in Langevin NVT, a checkpoint-continuation script (odp_restart.py) and the WHAM analysis script (odp_wham.py); see ODP Umbrella Sampling. |
examples/QMMM |
ESPF electrostatic QM/MM (requires OpenMM): NAMD / SOC-NAMD dynamics, ground-state QM/MM MD with checkpoints and phase-space snapshots, QM/MM optimization, covalent-boundary (link atom + frontier_scheme), and single-point energies. |
Run a single example:
openqp examples/HF/H2O_RHF-HF_ENERGY.oqp
For the standalone MP2 example:
openqp examples/MP2/h2o_ump2_6-31g.oqp
For the analytic RHF-MP2 gradient example:
openqp examples/MP2/h2o_rmp2_6-31g_grad.oqp
Run the packaged example tests:
openqp --run_tests all --input-format oqp # standard suite through .oqp
Use --input-format oqp for canonical-file regression. The standard suite retains its slow/non-self-contained exclusions; each calculation gets an isolated output folder.
Geometry and reaction-path examples use the native OpenQP engine, including
HCN_RHF-DFT_CONSTRAINED_OQP.oqp,
which demonstrates a frozen C-N distance. The optional geomeTRIC adapter is
retained for external compatibility but is not required by the standard
example suite.
QM/MM examples¶
The examples/QMMM decks exercise ESPF electrostatic QM/MM (a QM region embedded
in an OpenMM MM environment). They require the optional OpenMM backend
(pip install openmm) and read their *.pdb / *.xml auxiliary files from the
same folder. The nonadiabatic (runtype=namd) decks are part of
openqp --run_tests all and are reported SKIPPED without OpenMM; the
ground-state (runtype=md) and single-point decks are skipped by the suite —
run them directly.
| Deck | Type | What it shows |
|---|---|---|
H2CO-water_BHHLYP-MRSF-NAMD-QMMM.oqp |
NAMD | MRSF-TDDFT Tully FSSH (internal conversion, md(soc=false)) with ESPF QM/MM: formaldehyde QM + 5 TIP3P waters, NoCutoff cluster. |
H2CO-water_BHHLYP-SOC-NAMD-QMMM.oqp |
SOC-NAMD | Intersystem crossing on the spin-adiabatic manifold with ESPF QM/MM, using the same system. |
H2CO-water_BHHLYP-MRSF-NAMD-QMMM-SCHEME.oqp |
NAMD | The unified form: namd(...) names the state and the complete scheme, md(...) the nuclear controls, qmmm(...) the embedding. |
H2CO-water_BHHLYP-MRSF-NAMD-QMMM-NAC.oqp |
NAMD | QM/MM surface hopping with analytic MRSF NAC (scheme=NAC). |
H2CO-water_BHHLYP-MRSF-NAMD-QMMM.restart.oqp |
NAMD restart | Continues H2CO-water_BHHLYP-MRSF-NAMD-QMMM.oqp from its checkpoint; run the producer first. |
H2CO-water_RKS-QMMM-MD-SNAPSHOTS.oqp |
Ground-state MD | NVT QM/MM equilibration that writes a checkpoint and numbered phase-space snapshots. |
H2CO-water_BHHLYP-MRSF-NAMD-QMMM-SNAPSHOT.oqp |
NAMD | QM/MM surface hopping started with md(snapshot=...) from an equilibrated snapshot. |
ala-dipeptide_BHHLYP-MRSF-NAMD-QMMM-linkatom.oqp |
NAMD | QM/MM surface hopping across a covalent boundary with a scheme that does not use analytic NAC. |
ala-dipeptide_RKS-QMMM-GROUND-STATE-MD.oqp |
Ground-state MD | Ground-state QM/MM MD in the unified md(...) qmmm(...) form. |
ala-dipeptide_RHF-QMMM-OPT-linkatom.oqp |
Optimization | QM/MM geometry optimization across a covalent boundary. |
ala-box_BHHLYP-MRSF-NAMD-QMMM-PME.oqp |
NAMD | The same covalent boundary in a periodic TIP3P box (cutoff=PME, Ewald QM/MM electrostatics), exercising ewald_tol, lj_switch, h_lj and mm_charge_width. |
ala-box_BHHLYP-MRSF-NAMD-QMMM-PME-FLEXIBLE-ODP.oqp |
NAMD (NVT, ODP) | The periodic box with one water moved into the QM region and kept near the solute by the FlexiBLE boundary, sampled as one ODP umbrella window in Langevin NVT. |
ala-dipeptide_BHHLYP-QMMM-MD-RCD.oqp |
Ground-state MD | QM/MM MD across a covalent boundary: alanine dipeptide, QM = the C-terminal amide, hydrogen link-atom cap + frontier_scheme=rcd. |
run.oqp |
Ground-state MD | Whole-molecule QM region: one water of a water dimer. |
ala.oqp |
Single-point | QM/MM energy of the alanine amide. |
2E4E_RHF-DFT-QMMM_energy.oqp |
Single-point | QM/MM energy on a protein fragment. |
Run a NAMD-QMMM example:
openqp examples/QMMM/H2CO-water_BHHLYP-MRSF-NAMD-QMMM.oqp
Run the covalent-boundary ground-state QM/MM MD example (from the folder, so the PDB/force-field files resolve):
cd examples/QMMM && openqp ala-dipeptide_BHHLYP-QMMM-MD-RCD.oqp
Repository maintainers can regenerate and audit the concise companions after
editing legacy examples with python tools/convert_legacy_examples.py --write.
Running the command without --write performs a dry-run audit. The
converter refuses a file when an explicitly written legacy setting cannot be
represented faithfully; it does not silently create a reduced calculation.
See the qmmm keyword page for the input contract and
covalent QM/MM boundaries, and the
SOC-NAMD-QMMM workflow for the nonadiabatic path.
When adding a new manual page, link to an OpenQP repository example whenever possible instead of pasting a long input deck into prose.