OpenMM

I just saw this in my twitter timeline. This notebook sets up a template for you to play with OpenMM on the GPU in your browser.

This notebook runs OpenMM on the GPU. Let's first verify the installation:

python -m simtk.testInstallation
14.1s
Bash in Python
OpenMM

And run our first sample:

input.pdb
from simtk.openmm.app import *
from simtk.openmm import *
from simtk.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 = LangevinIntegrator(300*kelvin, 1/picosecond, 0.002*picoseconds)
simulation = Simulation(pdb.topology, system, integrator)
simulation.context.setPositions(pdb.positions)
simulation.minimizeEnergy()
simulation.reporters.append(PDBReporter('output.pdb', 1000))
simulation.reporters.append(StateDataReporter(stdout, 1000, step=True,
        potentialEnergy=True, temperature=True))
simulation.step(10000)
25.4s
Python
OpenMM

Remix this notebook to play with OpenMM yourself.

Environment Setup

This installs OpenMM into a reusable environment.

conda install -c omnia -c conda-forge openmm
57.1s
OpenMM (Bash)
OpenMM
Runtimes (2)