"docs-source/vscode:/vscode.git/clone" did not exist on "f08a1cf8ee42ff42dae1d2d72c2a207805cd2df8"
Commit 681ab7ff authored by Peter Eastman's avatar Peter Eastman
Browse files

Implement __copy__() and __deepcopy__() for Forces

parent dea037c3
...@@ -201,4 +201,16 @@ ...@@ -201,4 +201,16 @@
self->getPerDofVariable(index, values); self->getPerDofVariable(index, values);
return copyVVec3ToList(values); return copyVVec3ToList(values);
} }
} }
\ No newline at end of file
%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