openmmqmmm¶
Electrostatically embedded QM/MM for biomolecular systems, combining the ORCA quantum chemistry program with the OpenMM molecular-mechanics library. Mechanically embedded ML/MM is also available through optional OpenMM-ML potentials.
The package is derived from the ASH multiscale modelling program, reduced to the ORCA + OpenMM QM/MM stack and given a PEP 8 Python API. It covers the whole path from a raw PDB file to a QM/MM trajectory: system preparation and solvation, minimization and equilibration, single points, geometry optimization, frequencies, classical and QM/MM molecular dynamics, and ring-polymer dynamics for nuclear quantum effects.
Installation¶
bash build_tools/conda_install.sh
One command: it creates the openmmqmmm conda environment, compiles PLUMED and the
OpenMM-PLUMED plugin into it, and installs this package and forcefill. ORCA is installed
separately. See Installation for the pip-only route, the cluster route, and what each one
leaves out.
A QM/MM calculation¶
from openmmqmmm import (
Fragment,
OpenMMTheory,
ORCATheory,
QMMMTheory,
configure_logging,
openmm_md,
optimize_geometry,
)
configure_logging()
fragment = Fragment(pdbfile="system.pdb")
qm = ORCATheory(orcasimpleinput="! r2SCAN-3c tightscf", numcores=8)
# Single points and optimizations need an MM theory without automatic constraints.
mm = OpenMMTheory(
xmlfiles=["charmm36.xml", "charmm36/water.xml", "specialresidue.xml"],
pdbfile="system.pdb",
periodic=True,
autoconstraints=None,
rigidwater=False,
)
qmatoms = [93, 94, 95, 96, 97, 133, 134, 135, 2001, 2002]
qm_mm = QMMMTheory(
qm_theory=qm, mm_theory=mm, fragment=fragment, qm_charge=-1, qm_mult=6, qmatoms=qmatoms
)
# Optimize the QM region ...
optimize_geometry(theory=qm_mm, fragment=fragment, actatoms=qmatoms)
# ... or run QM/MM molecular dynamics (ps).
openmm_md(fragment=fragment, theory=qm_mm, timestep=0.0005, simulation_time=2)
Where to go next¶
Installation — the installation routes, and configuring ORCA.
Quick start — a first gas-phase calculation, start to finish.
Fragments — building the
Fragmentevery job function takes.QM/MM — QM region, link atoms, embedding and the active region.
ML/MM — ML potentials for complete molecules in an MM environment.
Preparing a system — going from a raw PDB file to a solvated, parameterized system.
Molecular dynamics and Ring-polymer and quantum-thermal-bath dynamics — classical, QM/MM and ring-polymer dynamics.
API reference — every name in the public API.