@@ -177,9 +177,8 @@ def __init__(
177
177
vasptodb_kwargs ["additional_fields" ] = {}
178
178
vasptodb_kwargs ["additional_fields" ]["task_label" ] = name
179
179
180
- fw_name = "{}-{}" .format (
181
- structure .composition .reduced_formula if structure else "unknown" , name
182
- )
180
+ formula = structure .composition .reduced_formula if structure else "unknown"
181
+ fw_name = f"{ formula } -{ name } "
183
182
184
183
has_previous_calc = False
185
184
@@ -336,9 +335,8 @@ def __init__(
336
335
vasptodb_kwargs ["additional_fields" ] = {}
337
336
vasptodb_kwargs ["additional_fields" ]["task_label" ] = name
338
337
339
- fw_name = "{}-{}" .format (
340
- structure .composition .reduced_formula if structure else "unknown" , name
341
- )
338
+ formula = structure .composition .reduced_formula if structure else "unknown"
339
+ fw_name = f"{ formula } -{ name } "
342
340
343
341
if spec_structure_key is not None :
344
342
vasp_input_set = vasp_input_set or MPStaticSet (
@@ -473,9 +471,8 @@ def __init__(
473
471
"""
474
472
name = name if name else f"hse { mode } "
475
473
476
- fw_name = "{}-{}" .format (
477
- structure .composition .reduced_formula if structure else "unknown" , name
478
- )
474
+ formula = structure .composition .reduced_formula if structure else "unknown"
475
+ fw_name = f"{ formula } -{ name } "
479
476
480
477
t = []
481
478
if prev_calc_dir :
@@ -544,11 +541,8 @@ def __init__(
544
541
"""
545
542
input_set_overrides = input_set_overrides or {}
546
543
547
- fw_name = "{}-{} {}" .format (
548
- structure .composition .reduced_formula if structure else "unknown" ,
549
- name ,
550
- mode ,
551
- )
544
+ formula = structure .composition .reduced_formula if structure else "unknown"
545
+ fw_name = f"{ formula } -{ name } { mode } "
552
546
t = []
553
547
554
548
if prev_calc_dir :
@@ -625,9 +619,8 @@ def __init__(
625
619
"""
626
620
name = "static dielectric" if lepsilon else "phonon"
627
621
628
- fw_name = "{}-{}" .format (
629
- structure .composition .reduced_formula if structure else "unknown" , name
630
- )
622
+ formula = structure .composition .reduced_formula if structure else "unknown"
623
+ fw_name = f"{ formula } -{ name } "
631
624
632
625
user_incar_settings = user_incar_settings or {}
633
626
t = []
@@ -720,10 +713,9 @@ def __init__(
720
713
user_incar_settings (dict): Parameters in INCAR to override
721
714
**kwargs: Other kwargs that are passed to Firework.__init__.
722
715
"""
723
- name = f"{ name } _{ str (mode )} _{ str (displacement )} "
724
- fw_name = "{}-{}" .format (
725
- structure .composition .reduced_formula if structure else "unknown" , name
726
- )
716
+ name = f"{ name } _{ mode } _{ displacement } "
717
+ formula = structure .composition .reduced_formula if structure else "unknown"
718
+ fw_name = f"{ formula } -{ name } "
727
719
728
720
user_incar_settings = user_incar_settings or {}
729
721
@@ -796,9 +788,8 @@ def __init__(
796
788
FW or list of FWS.
797
789
**kwargs: Other kwargs that are passed to Firework.__init__.
798
790
"""
799
- fw_name = "{}-{}" .format (
800
- structure .composition .reduced_formula if structure else "unknown" , name
801
- )
791
+ formula = structure .composition .reduced_formula if structure else "unknown"
792
+ fw_name = f"{ formula } -{ name } "
802
793
803
794
t = []
804
795
if prev_calc_dir :
@@ -1057,9 +1048,8 @@ def __init__(
1057
1048
additional_fields (dict): fields added to the document such as user-defined tags or name, ids, etc
1058
1049
**kwargs: Other kwargs that are passed to Firework.__init__.
1059
1050
"""
1060
- fw_name = "{}-{}" .format (
1061
- structure .composition .reduced_formula if structure else "unknown" , name
1062
- )
1051
+ formula = structure .composition .reduced_formula if structure else "unknown"
1052
+ fw_name = f"{ formula } -{ name } "
1063
1053
1064
1054
additional_fields = additional_fields or {}
1065
1055
0 commit comments