Yep, this should work. Note that you don’t necessarily need to convert to dict, but could use the attributes of the DOS object, e. g.
import numpy as np
from pymatgen.ext.matproj import MPRester
mpr = MPRester()
dos = mpr.get_dos_by_material_id("mp-134")
total_density = sum(dos.densities.values()) # Sum over both spins, if present
min_index = np.argmin(abs(dos.energies - dos.efermi))
total_density[min_index]
Thank you for this piece for code, it has been very helpful!
I am trying to teak this for getting the numeric values of each projected Dos contribution (for s, for d, for d, and for f) at the Fermi level, but without any luck. Any ideas?