def test_addBarostat(self): print('Testing MonteCarloBarostat') forces = self.system.getForces() npt_system = SimulationFactory.addBarostat(self.system) npt_forces = npt_system.getForces() #Check that forces have been added to the system. self.assertNotEqual(len(forces), len(npt_forces)) #Check that it has added the MonteCarloBarostat self.assertIsInstance(npt_forces[-1], openmm.MonteCarloBarostat)
def test_addBarostat(self, system): print('Testing MonteCarloBarostat') forces = system.getForces() npt_system = SimulationFactory.addBarostat(system) npt_forces = npt_system.getForces() #Check that forces have been added to the system. assert len(forces) != len(npt_forces) #Check that it has added the MonteCarloBarostat assert isinstance(npt_forces[-1], openmm.MonteCarloBarostat)
def test_addBarostat(self, system): print('Testing MonteCarloBarostat') forces = system.getForces() npt_system = SimulationFactory.addBarostat(system) npt_forces = npt_system.getForces() #Check that forces have been added to the system. assert len(forces) != len(npt_forces) #Check that it has added the MonteCarloBarostat assert isinstance(npt_forces[-1], openmm.MonteCarloBarostat)