Fix alchemy test that was previously trying to alchemically modify only part of a TIP4P-Ew molecule
@@ -1269,11 +1269,16 @@ class TestAbsoluteAlchemicalFactory(object):
cls.test_regions['LennardJonesCluster'] = AlchemicalRegion(alchemical_atoms=range(2))
cls.test_regions['LennardJonesFluid'] = AlchemicalRegion(alchemical_atoms=range(10))
cls.test_regions['TIP3P WaterBox'] = AlchemicalRegion(alchemical_atoms=range(3))
- cls.test_regions['TIP4P-EW WaterBox and NaCl'] = AlchemicalRegion(alchemical_atoms=range(4)) # Modify ions.
cls.test_regions['Toluene'] = AlchemicalRegion(alchemical_atoms=range(6)) # Only partially modified.
cls.test_regions['AlanineDipeptide'] = AlchemicalRegion(alchemical_atoms=range(22))
cls.test_regions['HostGuestExplicit'] = AlchemicalRegion(alchemical_atoms=range(126, 156))
+ # Modify ions.
+ for atom in cls.test_systems['TIP4P-EW WaterBox and NaCl with PME'].topology.atoms():
+ if atom.name in ['Na', 'Cl']:
+ cls.test_regions['TIP4P-EW WaterBox and NaCl'] = AlchemicalRegion(alchemical_atoms=range(atom.index, atom.index+1))
+
+
@classmethod
def generate_cases(cls):
"""Generate all test cases in cls.test_cases combinatorially."""
