You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@property
def reduced_composition(self) -> Self:
"""The reduced composition, i.e. amounts normalized by greatest common denominator.
E.g. "Fe4 P4 O16".reduced_composition = "Fe P O4".
"""
I would expect to do just that, but Cs4 O4 turns into Cs2 O2 rather than Cs O. Unsure if its because some single element, for example:
Composition("O").reduced_composition # O2
Expected Behavior
I would expect that Cs4 O4 turns into Cs O rather than Cs2 O2. Unsure if its because some single element, for example:
Composition("O").reduced_composition # O2
Minimal example
frompymatgen.coreimportCompositioncomp=Composition('Cs4 O4')
print(comp.reduced_composition) # prints out Cs2 O2, should be Cs O per doc string?
Relevant files to reproduce this bug
No response
The text was updated successfully, but these errors were encountered:
Python version
Python 3.11
Pymatgen version
'2024.11.13'
Operating system version
MacOSX
Current behavior
From the docstring for reduced_composition:
I would expect to do just that, but
Cs4 O4
turns intoCs2 O2
rather thanCs O
. Unsure if its because some single element, for example:Composition("O").reduced_composition # O2
Expected Behavior
I would expect that
Cs4 O4
turns intoCs O
rather thanCs2 O2
. Unsure if its because some single element, for example:Composition("O").reduced_composition # O2
Minimal example
Relevant files to reproduce this bug
No response
The text was updated successfully, but these errors were encountered: