Skip to content

Commit a2d9f07

Browse files
cleanup
1 parent 2e511f6 commit a2d9f07

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/atomate2/common/flows/electrode.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ def make(
135135
relax_maker=self.relax_maker,
136136
get_charge_density=self.get_charge_density,
137137
n_steps=n_steps,
138+
insertions_per_step=insertions_per_step,
138139
n_inserted=1,
139140
)
140141
relaxed_summary = RelaxJobSummary(

src/atomate2/common/jobs/electrode.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,11 @@ def get_stable_inserted_results(
8484
The number of ions inserted so far, used to help assign a unique name to the
8585
different jobs.
8686
"""
87-
if structure is None:
88-
return []
89-
if n_inserted > n_steps if n_steps is not None else float("inf"):
87+
if (
88+
(structure is None)
89+
or (n_steps is not None and n_steps <= 0)
90+
or (n_inserted > n_steps)
91+
):
9092
return []
9193
# append job name
9294
_shown_steps = str(n_steps) if n_steps else "inf"
@@ -121,8 +123,6 @@ def get_stable_inserted_results(
121123
n_inserted=n_inserted + 1,
122124
)
123125

124-
# for job_ in [static_job, insertion_job, min_en_job, relax_jobs, next_step]:
125-
# job_.append_name(f" {add_name}")
126126
combine_job = get_computed_entries(next_step.output, min_en_job.output)
127127
replace_flow = Flow(
128128
jobs=[

0 commit comments

Comments
 (0)