Skip to content


OpenMM is a open-source high-performance toolkit for molecular simulation. You can use it as an application, a library, or a flexible programming environment.

Keywords: biology, physics, chemistry, molecular dynamics

Available modules

There are several OpenMM modules on Midway3 that you can check via module avail opemm:

---------------------------- /software/modulefiles -----------------------------
openmm/7.5.1(default)  openmm/8.1.0

OpenMM is under active development. You are encouraged to build the latest stable version from source code in your own space using the provided compilers.


You can also install OpenMM into your conda environment. See for more information

module load python/anaconda-2022.05
conda create -n your-env python=3.8
source activate your-env
conda install -c conda-forge openmm cudatoolkit=11.5

The OpenMM documentation contain useful information for improving performance of your specific calculations:

Example job script

An example batch script to run GROMACS for Midway3 is given as below

#SBATCH --job-name=gmx-bench
#SBATCH --account=pi-[cnetid]
#SBATCH --time=01:00:00
#SBATCH --partition=gpu
#SBATCH --gres=gpu:1
#SBATCH --constraint=v100
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1

module load openmm


n=$(( ntasks_per_node * numnodes ))


where is a python script that sets up the system.

Example python scripts can be found at Below is an example script that reads in a protein PDB structure, selects a force field, defines a system, specifies a time integrator, performs energy minimization, sets up the output log and snapshots and finally runs the MD simulation. You can use this script as in the job script above.

from import *
from openmm import *
from openmm.unit import *
from sys import stdout

pdb = PDBFile('input.pdb')
forcefield = ForceField('amber14-all.xml', 'amber14/tip3pfb.xml')
system = forcefield.createSystem(pdb.topology, nonbondedMethod=PME, nonbondedCutoff=1*nanometer, constraints=HBonds)
integrator = LangevinMiddleIntegrator(300*kelvin, 1/picosecond, 0.004*picoseconds)
simulation = Simulation(pdb.topology, system, integrator)
simulation.reporters.append(PDBReporter('output.pdb', 1000))
simulation.reporters.append(StateDataReporter(stdout, 1000, step=True, potentialEnergy=True, temperature=True))