@@ -72,7 +72,6 @@ def from_composition_and_pd(cls, comp, pd, working_ion_symbol="Li", allow_unstab
72
72
profile .reverse ()
73
73
if len (profile ) < 2 :
74
74
return None
75
- working_ion_entry = working_ion_entry
76
75
working_ion = working_ion_entry .composition .elements [0 ].symbol
77
76
normalization_els = {}
78
77
for el , amt in comp .items ():
@@ -83,7 +82,7 @@ def from_composition_and_pd(cls, comp, pd, working_ion_symbol="Li", allow_unstab
83
82
framework .pop (working_ion )
84
83
framework = Composition (framework )
85
84
86
- vpairs = [
85
+ v_pairs = [
87
86
ConversionVoltagePair .from_steps (
88
87
profile [i ],
89
88
profile [i + 1 ],
@@ -94,7 +93,7 @@ def from_composition_and_pd(cls, comp, pd, working_ion_symbol="Li", allow_unstab
94
93
]
95
94
96
95
return ConversionElectrode ( # pylint: disable=E1123
97
- voltage_pairs = vpairs ,
96
+ voltage_pairs = v_pairs ,
98
97
working_ion_entry = working_ion_entry ,
99
98
initial_comp_formula = comp .reduced_formula ,
100
99
framework_formula = framework .reduced_formula ,
@@ -338,26 +337,24 @@ def from_steps(cls, step1, step2, normalization_els, framework_formula):
338
337
sum (curr_rxn .all_comp [i ].weight * abs (curr_rxn .coeffs [i ]) for i in range (len (curr_rxn .all_comp ))) / 2
339
338
)
340
339
mass_charge = prev_mass_dischg
341
- mass_discharge = mass_discharge
342
340
vol_discharge = sum (
343
341
abs (curr_rxn .get_coeff (e .composition )) * e .structure .volume
344
342
for e in step2 ["entries" ]
345
343
if e .composition .reduced_formula != working_ion
346
344
)
347
345
348
- totalcomp = Composition ({})
346
+ total_comp = Composition ({})
349
347
for comp in prev_rxn .products :
350
348
if comp .reduced_formula != working_ion :
351
- totalcomp += comp * abs (prev_rxn .get_coeff (comp ))
352
- frac_charge = totalcomp .get_atomic_fraction (Element (working_ion ))
349
+ total_comp += comp * abs (prev_rxn .get_coeff (comp ))
350
+ frac_charge = total_comp .get_atomic_fraction (Element (working_ion ))
353
351
354
- totalcomp = Composition ({})
352
+ total_comp = Composition ({})
355
353
for comp in curr_rxn .products :
356
354
if comp .reduced_formula != working_ion :
357
- totalcomp += comp * abs (curr_rxn .get_coeff (comp ))
358
- frac_discharge = totalcomp .get_atomic_fraction (Element (working_ion ))
355
+ total_comp += comp * abs (curr_rxn .get_coeff (comp ))
356
+ frac_discharge = total_comp .get_atomic_fraction (Element (working_ion ))
359
357
360
- rxn = rxn
361
358
entries_charge = step1 ["entries" ]
362
359
entries_discharge = step2 ["entries" ]
363
360
0 commit comments