Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecesary isotope conversion in core.periodic_table.get_el_sp #4193

Merged
2 changes: 0 additions & 2 deletions src/pymatgen/core/periodic_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -1631,8 +1631,6 @@ def get_el_sp(obj: int | SpeciesLike) -> Element | Species | DummySpecies:
"""
# If obj is already an Element or Species, return as is
if isinstance(obj, Element | Species | DummySpecies):
if getattr(obj, "_is_named_isotope", False):
return Element(obj.name) if isinstance(obj, Element) else Species(str(obj))
return obj

# If obj is an integer, return the Element with atomic number obj
Expand Down
Loading