Make ThermodynamicState __getstate__ accept the explicit kwarg
@@ -921,10 +921,10 @@ class ThermodynamicState(object):
new_state.__dict__['_standard_system'] = self._standard_system
return new_state
- def __getstate__(self, **kwargs):
+ def __getstate__(self, skip_system=False):
"""Return a dictionary representation of the state."""
serialized_system = None
- if 'skip_system' not in kwargs and kwargs['skip_system'] is False:
+ if skip_system:
serialized_system = openmm.XmlSerializer.serialize(self._standard_system)
return dict(standard_system=serialized_system, temperature=self.temperature,
pressure=self.pressure)
