-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Band plot data (some questions) #164
Comments
Hi @BlessedAkarat,
The PDOS files contain the partial density of states. In Quantum ESPRESSO, these values are obtained through an interpolation method for both the projections and the energies. This explains why you won’t find the usual band values within these files.
That’s correct. However, we actually obtain the band and k-point information from the
You can achieve this using the import pyprocar
parser = pyprocar.io.Parser(code=code, dir=data_dir)
ebs = parser.ebs
def find_kpoints_crossing_fermi(bands, fermi_level, tolerance=1e-5):
nk, nbands, nspin = bands.shape
kpoints_crossing_fermi = []
for iband in range(nbands):
for k in range(1, nk): # Start from 1 to compare with the previous k-point
# Band energies at consecutive k-points
energy_k = bands[k, iband, 0]
energy_k_prev = bands[k - 1, iband, 0]
# Check if the band crosses the Fermi level
if (energy_k - fermi_level) * (energy_k_prev - fermi_level) < 0:
kpoints_crossing_fermi.append(k)
return kpoints_crossing_fermi
kpoint_indices = find_kpoints_crossing_fermi(ebs.bands, fermi_level)
print("K-points crossing the Fermi level:", kpoint_indices)
kpoints_crossing = ebs.kpoints[kpoint_indices, :] This function checks for sign changes in the energy levels relative to the Fermi level, indicating a crossing. Let me know if this works for you. Best, |
Hi,
I wanted to ask you a bit about band plots, so I created this issue.
Main question is this.
How can I figure out the exact (or near) k-point positions of the bands that cross the Fermi level?
Usually, when using Quantum ESPRESSO for a band plot, the calculations are carried out with the pw.x package.
After performing a self-consistent calculation (SCF), the band structure is calculated, and finally, the kpdos is computed using the projwfc.x package to draw the bands.
In this case I can check the band data for each k-points at the scf.out (self-consistent calculation output file) like below fig.
And in bands.in, the input file of band calculation, I wrote the k-point option with high symmetry point.
After finish band calculation, bands.out include only few information like calculation methods, cell information, and calculation time.
After all calculations, including the kpdos, I can see that the k.pdos_atm#~ and k.pdos_tot files have been created in the directory.
But non of these seems like to show the band value for each k-points.
So in the end, this system is using the k-points and band values from the scf.out file to create a graph, and the high symmetry points specified in bands.in are meant to mark each point when plotting the bands.
But importantly, in the case of a point moving from Gamma - M in the HCP structure, the point changes from (0, 0, 0) to (0.5, 0, 0), but in the actual scf.out file, ky, kz are fixed as 0, and there is no k-point that changes only kx.
So I wonder, how can I find the k-point of bands that cross the Fermi level.
Thank you for read this.
Best regards,
G. H.
The text was updated successfully, but these errors were encountered: