Closed savya10 closed 3 years ago
This is a tricky case for the pymatgen --> abipy converter as it's a magnetic semiconductor. In this case one has to specify the number of electrons per unit cell with:
from abipy.electrons import ElectronBands
ebands = ElectronBands.from_mpid('mp-565814', line_mode=True, nelect=???)
print(ebands)
ebands.plot()
where nelect depends on the structure and the pseudopotentials used in the Vasp calculation Please consult the MP database.
Specifying nelect will allow you to construct an AbiPy band structure and plot the results. Note however that the values of the fundamental/direct gaps reported by AbiPy are wrong because the Fermi level reported by the MP database is inside the bands. Very likely because this is the Fermi level computed at the SCF level using a shifted k-mesh.
Perhaps the AbipY converter should use the band_index entry to compute the HOMO energy
{'band_index': defaultdict(<class 'list'>,
{<Spin.up: 1>: [221, 222, 223],
<Spin.down: -1>: []}),
)
but this requires some refactoring of the implementation
Fixed in 2e1ed12
Code to reproduce this error:
Produces the error:
Any help would be greatly appreciated!