Getting NELECT parameter from the queried DOS

Hi everyone. I am querying/in use of density of states (DOS) from the MP, and would also like to get the ‘NELECT’ number for this VASP calculation. I see I can integrate the DOS to get a number, which however somewhat deviates from the actual ‘NELECT’ of VASP calculations. Can anyone help suggest a way for getting the ‘NELECT’?

Thanks a lot!

Solution: The MP DOS carries a structure obj which I could use to get the NELECT using the MPRelaxSet.

Hi @Zhenkun_Yuan, the most straightforward way for getting NELECT is by getting the task_id for the DOS entry you want, and then querying the tasks endpoint directly.

Suppose you want the value of NELECT for mp-149:

from mp_api.client import MPRester

with MPRester("api_key") as mpr:
    summary_doc =["mp-149"])[0]
    task_id = str(["1"].task_id)
    task_doc =[task_id])[0]

Be aware that because the POTCARs we use in calculations has changed over time, the value of NELECT is not always determined by the MPRelaxSet. If a DOS was generated with r2SCAN, then the right set to use is MPScanRelaxSet.

The method above circumvents this by letting you directly retrieve the value of NELECT.

1 Like

Hi @Aaron_Kaplan , Thank you very much! This is very helpful!