Skip to content

Commit

Permalink
fix factor
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielYang59 committed Jan 25, 2025
1 parent d1d9fdd commit e13a607
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pymatgen/core/composition.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def get_reduced_formula_and_factor(self, iupac_ordering: bool = False) -> tuple[
# Do not "completely reduce" certain formulas
if formula in type(self).special_formulas:
formula = type(self).special_formulas[formula]
factor //= 2 # factor will always be "2", use `//` to ensure int type
factor /= 2

return formula, factor

Expand Down

0 comments on commit e13a607

Please sign in to comment.