File tree 3 files changed +8
-6
lines changed
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):
1376
1376
{"wf_meta.wf_uuid" : uuid , "task_label" : optimize_task_label }
1377
1377
)
1378
1378
)
1379
+
1379
1380
# used to determine if ordering changed during relaxation
1380
1381
# stored for checking suitable convergence is reached
1381
1382
energy_diff_relax_static = (
@@ -1384,6 +1385,7 @@ def run_task(self, fw_spec):
1384
1385
)
1385
1386
else :
1386
1387
energy_diff_relax_static = None
1388
+ optimize_task = d
1387
1389
1388
1390
input_structure = Structure .from_dict (optimize_task ["input" ]["structure" ])
1389
1391
input_magmoms = optimize_task ["input" ]["incar" ]["MAGMOM" ]
@@ -1459,8 +1461,8 @@ def run_task(self, fw_spec):
1459
1461
d ["calcs_reversed" ][0 ]["output" ]["outcar" ]["total_magnetization" ]
1460
1462
)
1461
1463
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 ())
1464
1466
total_magnetization_per_formula_unit = (
1465
1467
total_magnetization / num_formula_units
1466
1468
)
Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ def __init__(
341
341
vasptodb_kwargs ["additional_fields" ] = {}
342
342
vasptodb_kwargs ["additional_fields" ]["task_label" ] = name
343
343
344
- formula = structure .composition .reduced_formula if structure else "unknown"
344
+ formula = structure .composition .reduced_formula if structure is not None else "unknown"
345
345
fw_name = f"{ formula } -{ name } "
346
346
347
347
if spec_structure_key is not None :
@@ -364,7 +364,7 @@ def __init__(
364
364
CopyVaspOutputs (calc_loc = prev_calc_loc , contcar_to_poscar = True )
365
365
)
366
366
t .append (WriteVaspStaticFromPrev (other_params = vasp_input_set_params ))
367
- elif structure :
367
+ elif structure is not None :
368
368
vasp_input_set = vasp_input_set or MPStaticSet (
369
369
structure , ** vasp_input_set_params
370
370
)
Original file line number Diff line number Diff line change @@ -328,8 +328,8 @@ def _add_metadata(structure):
328
328
vasp_cmd = c ["VASP_CMD" ],
329
329
db_file = c ["DB_FILE" ],
330
330
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 ,
333
333
vasptodb_kwargs = {"parse_chgcar" : True , "parse_aeccar" : True },
334
334
)
335
335
)
You can’t perform that action at this time.
0 commit comments