Unit of atomic_orbitals energy

pymatgen/core/periodic_table.py says the unit of orbitals energies is eV. However, it is in Hartree in the NIST database pymatgen refers to.

How can I understand this difference…?

Energy values stored in periodic_table.json seem to be the same values in the NIST database.

Hi @NaokiM, thanks for bringing this to our attention. You’re right that the units of Element.atomic_orbitals are not correct. I’ll try to get a fix in shortly.

For now, you can use the following to get the orbital energies in eV:

# recommended, use ase for up to date units
from ase.units import Hartree
# To avoid installing ase, uncomment
# Hartree = 27.211386024367243

from pymatgen.core import Element

def get_orbital_energies_from_element(element):
    return {k: v*Hartree for k, v in Element(element).atomic_orbitals.items()}

This is now fixed in pymatgen. Each Element now has an atomic_orbitals_eV property that gives the energy of the LDA orbitals in eV. If you’d like to use this feature before the next pymatgen release, you can pip install pymatgen from git:
pip install git+https://github.com/materialsproject/pymatgen.git

For backwards compatibility, the atomic_orbitals property still exists, but the documentation has been updated.

Hi @Aaron_Kaplan ,
Thank you so much for checking the question and fixing!!!