Allow Thermodynamic State to skip serializing the system it was fed in
@@ -923,6 +923,8 @@ class ThermodynamicState(object):
def __getstate__(self, **kwargs):
"""Return a dictionary representation of the state."""
+ serialized_system = None
+ if 'skip_system' not in kwargs:
serialized_system = openmm.XmlSerializer.serialize(self._standard_system)
return dict(standard_system=serialized_system, temperature=self.temperature,
pressure=self.pressure)
