Skip to content

Commit

Permalink
Merge pull request #34 from cmelab/update-n-steps
Browse files Browse the repository at this point in the history
Move n_steps from init to run_optimization
  • Loading branch information
marjanalbooyeh committed Feb 23, 2024
2 parents f082627 + f973e22 commit ecb2762
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dependencies:
- hoomd>=4.0
- cmeutils
- more-itertools
- jupyter
5 changes: 2 additions & 3 deletions msibi/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ def __init__(
thermostat_kwargs,
dt,
gsd_period,
n_steps,
r_cut,
nlist_exclusions=["bond", "angle"],
seed=42,
Expand All @@ -90,7 +89,6 @@ def __init__(
self.thermostat_kwargs = thermostat_kwargs
self.dt = dt
self.gsd_period = gsd_period
self.n_steps = n_steps
self.r_cut = r_cut
self.seed = seed
self.nlist_exclusions = nlist_exclusions
Expand Down Expand Up @@ -139,6 +137,7 @@ def _add_optimize_force(self, force):

def run_optimization(
self,
n_steps,
n_iterations,
backup_trajectories=False,
_dir=None
Expand All @@ -155,7 +154,7 @@ def run_optimization(
print(f"---Optimization: {n+1} of {n_iterations}---")
for state in self.states:
state._run_simulation(
n_steps=self.n_steps,
n_steps=n_steps,
nlist=self.nlist,
nlist_exclusions=self.nlist_exclusions,
integrator_method=self.integrator_method,
Expand Down

0 comments on commit ecb2762

Please sign in to comment.