Skip to content

Commit

Permalink
possible work around for starting sim with walls
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjonesBSU committed Jul 9, 2024
1 parent ee5109c commit 2f4e6d1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion flowermd/base/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,18 @@ def from_simulation_pickle(cls, file_path):
forces = data["forcefield"]
for force in forces:
if isinstance(force, hoomd.md.external.wall.LJ):
pass
new_walls = []
for _wall in force.walls:
new_walls.append(

Check warning on line 173 in flowermd/base/simulation.py

View check run for this annotation

Codecov / codecov/patch

flowermd/base/simulation.py#L171-L173

Added lines #L171 - L173 were not covered by tests
hoomd.wall.Plane(
origin=_wall.origin, normal=_wall.normal
)
)
new_wall = hoomd.md.external.wall.LJ(walls=new_walls)
for param in force.params:
new_wall.params[param] = force.params[param]
forces.remove(force)
forces.append(new_wall)

Check warning on line 182 in flowermd/base/simulation.py

View check run for this annotation

Codecov / codecov/patch

flowermd/base/simulation.py#L178-L182

Added lines #L178 - L182 were not covered by tests
ref_values = data["reference_values"]
sim_kwargs = data["sim_kwargs"]
return cls(
Expand Down

0 comments on commit 2f4e6d1

Please sign in to comment.