"...ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "cf8a03e833ae2dc49853b8935ecb09a4872bce71"
Commit 5e6d705e authored by Peter Eastman's avatar Peter Eastman
Browse files

Created simulateGromacs.py example

parent e4b38cce
This diff is collapsed.
This diff is collapsed.
from simtk.openmm.app import *
from simtk.openmm import *
from simtk.unit import *
from sys import stdout
gro = GromacsGroFile('input.gro')
top = GromacsTopFile('input.top', unitCellDimensions=gro.getUnitCellDimensions(), includeDir='/usr/local/gromacs/share/gromacs/top')
system = top.createSystem(nonbondedMethod=PME, nonbondedCutoff=1*nanometer, constraints=HBonds)
integrator = LangevinIntegrator(300*kelvin, 1/picosecond, 0.002*picoseconds)
simulation = Simulation(top.topology, system, integrator)
simulation.context.setPositions(gro.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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment