Only test available platforms
@@ -273,10 +273,11 @@ class TestExternalPerturbationLangevinIntegrator(TestCase):
parameter_name = 'lambda_electrostatics'
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))
- name = '%s with nonbondedMethod=%s' % (testsystem.name, nonbonded_method)
- for platform_name in ['CPU', 'OpenCL', 'Reference']:
+ 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 compare_external_protocol_work_accumulation(self, testsystem, parameter_name, parameter_initial, parameter_final, platform_name='Reference', name=None):
