"examples/OpenMM_CWrapper.cpp" did not exist on "81720686ed484162dde9e2de40567093142b1fba"
Commit 697ab72e authored by Charlles Abreu's avatar Charlles Abreu
Browse files

Fixed TestMetadynamics

parent 82bad78d
......@@ -293,6 +293,8 @@ class BiasVariable(object):
self.minValue = self._standardize(minValue)
self.maxValue = self._standardize(maxValue)
self.biasWidth = self._standardize(biasWidth)
if not isinstance(periodic, Bool):
raise ValueError("BiasVariable: invalid argument")
self.periodic = periodic
if gridWidth is None:
self.gridWidth = int(np.ceil(5*(maxValue-minValue)/biasWidth))
......
......@@ -16,9 +16,10 @@ class TestMetadynamics(unittest.TestCase):
system.addForce(force)
cv = CustomBondForce('r')
cv.addBond(0, 1)
bias = BiasVariable(cv, 0.94, 1.06, 0.02)
bias = BiasVariable(cv, 0.94, 1.06, 0.00431, gridWidth=31)
meta = Metadynamics(system, [bias], 300*kelvin, 2.0, 5.0, 10)
integrator = LangevinIntegrator(300*kelvin, 10/picosecond, 0.001*picosecond)
integrator.setRandomNumberSeed(4321)
topology = Topology()
chain = topology.addChain()
residue = topology.addResidue('H2', chain)
......
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