OpenMM

OpenMM is a high-performance toolkit for molecular simulation. Use it as an application, a library, or a flexible programming environment. We include extensive language bindings for Python, C, C++, and even Fortran.

Policy

OpenMM is available to users at HPC2N, under the permissive MIT and LGPL licenses.

Citations

If you use OpenMM for scientific research, please cite it.

Peter Eastman, Raimondas Galvelis, Raúl P. Peláez, Charlles R. A. Abreu, Stephen E. Farr, Emilio Gallicchio, Anton Gorenko, Michael M. Henry, Frank Hu, Jing Huang, Andreas Krämer, Julien Michel, Joshua A. Mitchell, Vijay S. Pande, João PGLM Rodrigues, Jaime Rodriguez-Guerra, Andrew C. Simmonett, Sukrit Singh, Jason Swails, Philip Turner, Yuanqing Wang, Ivy Zhang, John D. Chodera, Gianni De Fabritiis, Thomas E. Markland. “OpenMM 8: Molecular Dynamics Simulation with Machine Learning Potentials.” J. Phys. Chem. B 128(1), pp 109-116 (2023). DOI: 10.1021/acs.jpcb.3c06662

Overview

In contrast to most common MD software which rely on a monolithic architecture, OpenMM is built upon a layered architecture which gives it a high degree of reusability, extensibility, and hardware non-specificity. Within the layered architecture of OpenMM one finds, at the lowest level, the highly optimized kernels (OpenCL/CUDA, …) and at higher levels one can find the platform and the application layers. In most of the cases, the users deal only with the higher layers as the lowest layers are already well optimized.

The layered architecture provides OpenMM with a modularity character where new algorithms/methods can be easily incorporated to the software as modules without the need to compile the entire code to add those modules.

Features of OpenMM:

  • Highly Optimized: Optimized for the latest generation of compute hardware, including NVIDIA, AMD, and Intel GPUs. We also heavily optimize for CPUs.
  • Custom Forces: Want a custom force between atoms? Write your force expression as a string and OpenMM wiull generate blazing fast code to compute it.
  • User Friendly: OpenMM-Setup årovides a simple UI to prepare input files, configure options, and run simulations.

Usage at HPC2N

On HPC2N we have OpenMM available as a module.

Loading

To use the OpenMM module, add it to your environment. You can find versions with

module spider OpenMM

and you can then find how to load a specific version (including prerequisites), with

module spider OpenMM/<VERSION>

Versions that support GPU acceleration can be recognized by having “CUDA” in the version name.

Running

The OpenMM platforms supported on Kebnekaise are currently all GPU enabled.

You can find some OpenMM examples under the directory pointed to by $EBROOTOPENMM/examples. The easiest way to access them is to copy the $EBROOTOPENMM/examples directory to your own home directory/project storage and then do make in the examples directory.

There is an explanation on how to run simulations on OpenMM’s user guide.

Submit script examples

You need to write a batch script to run OpenMM on GPUs.

Using OpenMM on GPUs

#!/bin/bash
#SBATCH -A hpc2nXXXX-YYY
# Asking for 10 min.
#SBATCH -t 00:10:00
# Number of nodes
#SBATCH -N 1
# Two GPU cards - here l40s
#SBATCH --gpus-per-node=2
#SBATCH -C l40s 

# Load modules necessary for running OpenMM
ml GCC/13.2.0 OpenMPI/4.1.6
ml OpenMM/8.1.2-CUDA-12.4.0

# Execute OpenMM
python <my-openmm.py> 

Additional info

More information can be found