Skip to content

Commit

Permalink
Enforce copy-on-set for md
Browse files Browse the repository at this point in the history
  • Loading branch information
smcolby committed Aug 17, 2023
1 parent 6dec1dd commit d718fb6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion isicle/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def md(self, program="xtb", **kwargs):
"""

return isicle.md.md(self.__copy__(), program=program, **kwargs)
return isicle.md.md(self, program=program, **kwargs)

def ionize(self, ion_path=None, ion_list=None, **kwargs):
"""
Expand Down
8 changes: 5 additions & 3 deletions isicle/md.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def set_geometry(self, geom):
"""

# Assign geometry
self.geom = geom
self.geom = geom.__copy__()
self.basename = self.geom.basename

# Save geometry
Expand Down Expand Up @@ -426,7 +426,9 @@ def run(self, geom, task='optimize', forcefield='gfn2', charge=None,
self.set_geometry(geom)

# Configure
self.configure(**kwargs)
self.configure(task=task, forcefield=forcefield, charge=charge,
ewin=ewin, ion=ion, optlevel=optlevel, dryrun=dryrun, processes=processes,
solvation=solvation, ignore_topology=ignore_topology)

# Run QM simulation
self.submit()
Expand Down Expand Up @@ -716,7 +718,7 @@ def set_geometry(self, geom):
"""

# Assign geometry
self.geom = geom
self.geom = geom.__copy__()
self.basename = self.geom.basename

self.tinkerxyz = self._convert_to_tinkerxyz()
Expand Down

0 comments on commit d718fb6

Please sign in to comment.