Skip to content

Commit

Permalink
step and time are numpy arrays and should be copied as such
Browse files Browse the repository at this point in the history
  • Loading branch information
stefdoerr committed Oct 24, 2023
1 parent 779e5b3 commit f1db6f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moleculekit/molecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -1008,12 +1008,12 @@ def copy(self, frames=None, sel=None):
if self.__dict__[field] is not None:
newmol.__dict__[field] = deepcopy(self.__dict__[field])
else:
for field in ("coords", "box", "boxangles"):
for field in ("coords", "box", "boxangles", "step", "time"):
if self.__dict__[field] is not None:
newmol.__dict__[field] = self.__dict__[field][
..., frames
].copy()
for field in ("fileloc", "step", "time"):
for field in ("fileloc",):
if self.__dict__[field] is not None:
newmol.__dict__[field] = [
deepcopy(self.__dict__[field][f]) for f in frames
Expand Down

0 comments on commit f1db6f7

Please sign in to comment.