OpenMM

Software name: 
OpenMM
Policy 

The code is open source and actively maintained on Github, licensed under MIT and LGPL.

General 

OpenMM is a high performance toolkit for molecular simulation. Use it as a library, or as an application. It includes extensive language bindings for Python, C, C++, and even Fortran.

Description 

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.   

Availability 

On HPC2N we have OpenMM available as a module on Kebnekaise.

Usage at HPC2N 

Users can find the installed versions of OpenMM by typing:

ml spider openmm

the following versions are installed on Kebnekaise:

OpenMM/7.1.1-Python-2.7.12
OpenMM/7.1.1-Python-3.6.1

both versions support GPU acceleration.

Submit file examples

the OpenMM platforms supported on Kebnekaise are Reference and CUDA. The Reference platform  is the default one and you won't need to modify your input scripts. This is the slowest platform and is meant to be used as, its name indicates, a reference with which you can compare your results from other platforms. The following script shows how to run a script with the Reference platform using 6 threads: 

Single node using 6 cores

#!/bin/bash
#SBATCH -A SNICXXXX-Y-ZZ
#Asking for 10 min.
#SBATCH -t 00:10:00
#Number of nodes
#SBATCH -N 1
#Ask for 6 processes
#SBATCH -c 6

#Load modules necessary for running OpenMM
ml icc/2017.1.132-GCC-5.4.0-2.26 ifort/2017.1.132-GCC-5.4.0-2.26 CUDA/8.0.44  impi/2017.1.132
ml OpenMM/7.1.1-Python-3.6.1

#Execute OpenMM
export OPENMM_CPU_THREADS=6
python -u openmm_run.py

a much faster platform is CUDA where OpenMM runs entirely on GPUs.  In this case, you need to modify the wrapper script openmm_run.py to include the platform name and properties:

platform = Platform.getPlatformByName('CUDA')
prop = {'CudaDeviceIndex': '0,1,2,3', 'CudaPrecision': 'single'}

and add them to the simulation setup:

simulation = Simulation(psf.topology, system, integrator, platform, prop)

Notice that in the present case we will be using the four devices in the two GPU cards. We recommend to check the performance of your simulation with different number of engines and use the best option for you. In addition to the number of devices one can specify the precision of the simulation on the GPUs which in this case is set to 'single'. The following script for OpenMM will use two GPU cards:

Using OpenMM on GPUs

#!/bin/bash
#SBATCH -A SNICXXXX-Y-ZZ
#Asking for 10 min.
#SBATCH -t 00:10:00
#Number of nodes
#SBATCH -N 1
#Two GPU cards
#SBATCH --gres=gpu:k80:2
#SBATCH --exclusive

#Load modules necessary for running OpenMM
ml icc/2017.1.132-GCC-5.4.0-2.26 ifort/2017.1.132-GCC-5.4.0-2.26 CUDA/8.0.44  impi/2017.1.132
ml OpenMM/7.1.1-Python-3.6.1

#Execute OpenMM
python -u openmm_run.py


Additional info 

Documentation is available on the OpenMM Online Reference page.

Citations (Principal Papers)

  1. P. Eastman, et al. (2013) J. Chem. Theory Comput. 9: 461-469. (DOI, Citations of this paper)
  2. P. Eastman, et al. (2017) PLOS Comput. Biol. (DOI, Citations of this paper)
Updated: 2024-04-17, 14:47