File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1376,6 +1376,7 @@ def run_task(self, fw_spec):
13761376 {"wf_meta.wf_uuid" : uuid , "task_label" : optimize_task_label }
13771377 )
13781378 )
1379+
13791380 # used to determine if ordering changed during relaxation
13801381 # stored for checking suitable convergence is reached
13811382 energy_diff_relax_static = (
@@ -1384,6 +1385,7 @@ def run_task(self, fw_spec):
13841385 )
13851386 else :
13861387 energy_diff_relax_static = None
1388+ optimize_task = d
13871389
13881390 input_structure = Structure .from_dict (optimize_task ["input" ]["structure" ])
13891391 input_magmoms = optimize_task ["input" ]["incar" ]["MAGMOM" ]
@@ -1459,8 +1461,8 @@ def run_task(self, fw_spec):
14591461 d ["calcs_reversed" ][0 ]["output" ]["outcar" ]["total_magnetization" ]
14601462 )
14611463 num_formula_units = sum (
1462- d ["calcs_reversed" ][0 ]["composition_reduced " ].values ()
1463- ) / sum (d ["calcs_reversed" ][0 ]["composition_unit_cell " ].values ())
1464+ d ["calcs_reversed" ][0 ]["composition_unit_cell " ].values ()
1465+ ) / sum (d ["calcs_reversed" ][0 ]["composition_reduced " ].values ())
14641466 total_magnetization_per_formula_unit = (
14651467 total_magnetization / num_formula_units
14661468 )
Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ def __init__(
341341 vasptodb_kwargs ["additional_fields" ] = {}
342342 vasptodb_kwargs ["additional_fields" ]["task_label" ] = name
343343
344- formula = structure .composition .reduced_formula if structure else "unknown"
344+ formula = structure .composition .reduced_formula if structure is not None else "unknown"
345345 fw_name = f"{ formula } -{ name } "
346346
347347 if spec_structure_key is not None :
@@ -364,7 +364,7 @@ def __init__(
364364 CopyVaspOutputs (calc_loc = prev_calc_loc , contcar_to_poscar = True )
365365 )
366366 t .append (WriteVaspStaticFromPrev (other_params = vasp_input_set_params ))
367- elif structure :
367+ elif structure is not None :
368368 vasp_input_set = vasp_input_set or MPStaticSet (
369369 structure , ** vasp_input_set_params
370370 )
Original file line number Diff line number Diff line change @@ -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 )
You can’t perform that action at this time.
0 commit comments