Commit 681ab7ff authored by Peter Eastman's avatar Peter Eastman
Browse files

Implement __copy__() and __deepcopy__() for Forces

parent dea037c3
......@@ -202,3 +202,15 @@
return copyVVec3ToList(values);
}
}
%extend OpenMM::Force {
%pythoncode {
def __copy__(self):
copy = self.__class__.__new__(self.__class__)
copy.__init__(self)
return copy
def __deepcopy__(self, memo):
return self.__copy__()
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment