Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Molecular dynamics

Molecular dynamics (MD) simulates the time evolution of a molecular system by numerically integrating Newton’s equations of motion. At each timestep, forces acting on every atom are derived from the potential energy function of the underlying force field, and atomic positions and velocities are updated accordingly. By propagating the system over many timesteps, MD generates a trajectory from which thermodynamic quantities (temperature, pressure, free energy) and structural properties (radial distribution functions, conformational populations) can be extracted via statistical mechanics.

VeloxChem provides the OpenMMDynamics class as a high-level interface to run MD simulations with use of the OpenMM engine, see Gracia Trivino et al. (2025). Starting from a force field topology prepared with the MMForceFieldGenerator, a simulation can be set up and executed in a few lines of Python.

Creating solute force field

import veloxchem as vlx

molecule = vlx.Molecule.read_name("ethanol")

ff_gen = vlx.MMForceFieldGenerator()
ff_gen.create_topology(molecule)

Running MD simulation

You can directly solvate your system by using the solvent option when you create a system. For more information about solvation, please visit the system solvation page.

opm_dyn = vlx.OpenMMDynamics()

opm_dyn.create_system_from_molecule(
    molecule,
    ff_gen,
    filename="ethanol",  # system parameters and coordinates written to .xml and .pdb
    solvent="tip3p",
    residue_name="ETH",
)

opm_dyn.run_md(
    ensemble="NVT",
    temperature=300,  # in Kelvin
    timestep=2.0,  # in fs
    nsteps=10000,
    snapshots=200,
    traj_file="ethanol_md.pdb",
)
Loading...
References
  1. de Gracia Trivino, J. A., Brumboiu, I. E., Carrasco-Busturia, D., Li, X., Li, C., Linares, M., Lindfeld, V., Rhee, Y. M., Rune, J., Van Hoorn, B., Norman, P., & Ahlquist, M. S. G. (2025). VeloxChem Quantum–Classical Interoperability for Modeling of Complex Molecular Systems. J. Phys. Chem. A, 129(32), 7575–7587. 10.1021/acs.jpca.5c03187