Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
esoteric-ephemera committed Jan 13, 2025
1 parent e06ae74 commit 366e413
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/atomate2/common/flows/electrode.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def make(
relax_maker=self.relax_maker,
get_charge_density=self.get_charge_density,
n_steps=n_steps,
insertions_per_step=insertions_per_step,
n_inserted=1,
)
relaxed_summary = RelaxJobSummary(
Expand Down
10 changes: 5 additions & 5 deletions src/atomate2/common/jobs/electrode.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ def get_stable_inserted_results(
The number of ions inserted so far, used to help assign a unique name to the
different jobs.
"""
if structure is None:
return []
if n_inserted > n_steps if n_steps is not None else float("inf"):
if (
(structure is None)
or (n_steps is not None and n_steps <= 0)
or (n_inserted > n_steps)
):
return []
# append job name
_shown_steps = str(n_steps) if n_steps else "inf"
Expand Down Expand Up @@ -121,8 +123,6 @@ def get_stable_inserted_results(
n_inserted=n_inserted + 1,
)

# for job_ in [static_job, insertion_job, min_en_job, relax_jobs, next_step]:
# job_.append_name(f" {add_name}")
combine_job = get_computed_entries(next_step.output, min_en_job.output)
replace_flow = Flow(
jobs=[
Expand Down

0 comments on commit 366e413

Please sign in to comment.