How to get valence electron occupancy through Materials Project API?

Dear users and developers,

I’d like to get electron occupancy information from Material Project API.

I know that OUTCAR in VASP contains the information about electron occupancy.

However, when I see the document about API, https://materialsproject.org/docs/api#Operations1

magnetic properties are not indicated in “basic properties”

Is there any way to gather valence electron occupancy in API?

or Can I get atomic orbital configuration like N = 1s2 2s2 2p3?

Thanks a lot

Is this what you need?

import pymatgen as pm                                                             
                                                                                  
nitrogen = pm.Element('N')                                                        
print(nitrogen.full_electronic_structure)                                         

Output

[(1, 's', 2), (2, 's', 2), (2, 'p', 3)]

For more information, see the pymatgen documentation

1 Like

Thank you for information about electronic structure of atom.

Could I get electron occupancy in crystal?

I can extract “NELECT”, input parameter for the number of valence electron in crystal

But I want to analyze the number of electron depends on its orbital character in crystal.

Can I extract the related output in OUTCAR using API?

Thanks a lot

1 Like

Hi 11112,

I’m not 100% sure what you’re looking for. You could, for example, use a bader analysis of the CHGCAR at the end of a calculation, but that’s not currently available via the API. You could also use the bond valence analyzer in pymatgen to get an estimate of the electron occupancy. Something like this:

from pymatgen.analysis.bond_valence import BVAnalyzer

bv = BVAnalyzer()
print(bv.get_valences(data[0]))