Commit 1e7300bb authored by Robert McGibbon's avatar Robert McGibbon
Browse files

add test

parent ac25ece0
import unittest
import tempfile
from simtk.openmm import app
import simtk.openmm as mm
from simtk import unit
class TestCheckpointReporter(unittest.TestCase):
def setUp(self):
pdb = app.PDBFile('systems/alanine-dipeptide-implicit.pdb')
forcefield = app.ForceField('amber99sbildn.xml')
system = forcefield.createSystem(pdb.topology,
nonbondedMethod=app.CutoffNonPeriodic, nonbondedCutoff=1.0*unit.nanometers,
constraints=app.HBonds)
self.simulation = app.Simulation(pdb.topology, system, mm.VerletIntegrator(0.002*unit.picoseconds))
self.simulation.context.setPositions(pdb.positions)
def test_1(self):
file = tempfile.NamedTemporaryFile()
self.simulation.reporters.append(app.CheckpointReporter(file, 1))
self.simulation.step(1)
if __name__ == '__main__':
unittest.main()
\ No newline at end of file
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