Reduce runtime for AlchemicalWaterBox tests
@@ -328,16 +328,16 @@ class TestExternalPerturbationLangevinIntegrator(TestCase):
parameter_initial = 1.0
parameter_final = 0.0
platform_names = [ openmm.Platform.getPlatform(index).getName() for index in range(openmm.Platform.getNumPlatforms()) ]
- for nonbonded_method in ['CutoffPeriodic', 'PME']:
- testsystem = testsystems.AlchemicalWaterBox(nonbondedMethod=getattr(app, nonbonded_method))
+ for nonbonded_method in ['CutoffPeriodic']:
+ testsystem = testsystems.AlchemicalWaterBox(nonbondedMethod=getattr(app, nonbonded_method), box_edge=12.0*unit.angstroms, cutoff=5.0*unit.angstroms)
for platform_name in platform_names:
name = '%s %s %s' % (testsystem.name, nonbonded_method, platform_name)
self.compare_external_protocol_work_accumulation(testsystem, parameter_name, parameter_initial, parameter_final, platform_name=platform_name, name=name)
def test_protocol_work_accumulation_waterbox_barostat(self):
"""
- Testing protocol work accumulation for ExternalPerturbationLangevinIntegrator with AlchemicalWaterBox
- with an active barostat. For brevity, only using CutoffPeriodic as the non-bonded method.
+ Testing protocol work accumulation for ExternalPerturbationLangevinIntegrator with AlchemicalWaterBox with barostat.
+ For brevity, only using CutoffPeriodic as the non-bonded method.
"""
from simtk.openmm import app
parameter_name = 'lambda_electrostatics'
@@ -345,7 +345,7 @@ class TestExternalPerturbationLangevinIntegrator(TestCase):
parameter_final = 0.0
platform_names = [ openmm.Platform.getPlatform(index).getName() for index in range(openmm.Platform.getNumPlatforms()) ]
nonbonded_method = 'CutoffPeriodic'
- testsystem = testsystems.AlchemicalWaterBox(nonbondedMethod=getattr(app, nonbonded_method))
+ testsystem = testsystems.AlchemicalWaterBox(nonbondedMethod=getattr(app, nonbonded_method), box_edge=12.0*unit.angstroms, cutoff=5.0*unit.angstroms)
# Adding the barostat with a high frequency
testsystem.system.addForce(openmm.MonteCarloBarostat(1*unit.atmospheres, 300*unit.kelvin, 2))
