Skip to content

Commit 99eaf3f

Browse files
committed
fix static mag wf
1 parent ac89978 commit 99eaf3f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

atomate/vasp/fireworks/core.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,10 @@ def __init__(
333333
vasptodb_kwargs["additional_fields"] = {}
334334
vasptodb_kwargs["additional_fields"]["task_label"] = name
335335

336-
formula = structure.composition.reduced_formula if structure else "unknown"
336+
formula = structure.composition.reduced_formula if structure is not None else "unknown"
337337
fw_name = f"{formula}-{name}"
338-
338+
print(formula,spec_structure_key,type(structure),len(structure.structures))
339+
339340
if spec_structure_key is not None:
340341
vasp_input_set = vasp_input_set or MPStaticSet(
341342
structure, **vasp_input_set_params
@@ -356,7 +357,8 @@ def __init__(
356357
CopyVaspOutputs(calc_loc=prev_calc_loc, contcar_to_poscar=True)
357358
)
358359
t.append(WriteVaspStaticFromPrev(other_params=vasp_input_set_params))
359-
elif structure:
360+
elif structure is not None:
361+
print('here')
360362
vasp_input_set = vasp_input_set or MPStaticSet(
361363
structure, **vasp_input_set_params
362364
)

atomate/vasp/workflows/base/magnetism.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def _add_metadata(structure):
293293
user_incar_settings.update({"LAECHG": True})
294294
user_incar_settings.update(c.get("user_incar_settings", {}))
295295
c["user_incar_settings"] = user_incar_settings
296-
296+
print(len(ordered_structures))
297297
for idx, ordered_structure in enumerate(ordered_structures):
298298

299299
analyzer = CollinearMagneticStructureAnalyzer(ordered_structure)
@@ -328,8 +328,8 @@ def _add_metadata(structure):
328328
vasp_cmd=c["VASP_CMD"],
329329
db_file=c["DB_FILE"],
330330
name=name + " static",
331-
prev_calc_loc=True,
332-
parents=fws[-1],
331+
prev_calc_loc = True if not self.static else False,
332+
parents=fws[-1] if not self.static else None,
333333
vasptodb_kwargs={"parse_chgcar": True, "parse_aeccar": True},
334334
)
335335
)

0 commit comments

Comments
 (0)