-
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
Changing distance along the kpath (QE) #139
Comments
Hey, I'm trying to clarify: is the left plot your current result, and you're aiming for the right plot instead? Currently, I do not believe there is a way to change the distance of certain paths. But I do not think it will be that difficult to add this feature. I provide the code we use to calculate the path below. To change this I would have to add a scaling factor to the calculated distance between the special kpoints. I am open to suggestions, but I think the best way to implement this is to introduce a list filled with scaling factors for each segment of the path. In your case, you have 6 kpath segments between special kpoints, so the proposed keyword argument you would have to give to bandsplot would be:
Here, I shrink the distance between Is this solution okay for you? If it is, I'll go ahead and add this. In the code, we calculate the path with the following: for isegment in range(self.kpath.nsegments):
kstart, kend = self.kpath.special_kpoints[isegment]
if self.kdirect is False:
kstart=np.dot(self.ebs.reciprocal_lattice,kstart)
kend=np.dot(self.ebs.reciprocal_lattice,kend)
distance = np.linalg.norm(kend - kstart)
if isegment == 0:
x = np.linspace(pos, pos + distance,
self.kpath.ngrids[isegment])
else:
x = np.append(
x,
np.linspace(pos, pos + distance,
self.kpath.ngrids[isegment]),
axis=0,
)
pos += distance |
Thank you for your attention, The left plot is my current result, and I'm aiming for the right plot instead. The method you suggested is to add scaling_factors like this "pyprocar.bandsplot(code='qe', elimit = [-8,2], mode='plain',dirname=data_dir, scaling_factors=[1,1,0.5,0.5,1,1])"? |
Sir, I have another question. And using a k-points in units of 2 pi/a, , I calculated the distance between adjacent points again. If I plot a band structure using gnuplot for the same crystal Kpoint with another dft tool, the kpath distance is automatically plotted as [1.330 1.021 0.287 0.287 0.860 0.551] which is resulted from tipiba_b |
Hello! You may have tried it already, but if you haven’t did you check if setting i.e. Best, |
Hello! I have already tried 'kdirect=False', but it did not help. Manual notice that, for 'kdirect=False', an OUTCAR must be supplied for this case to retrieve the reciprocal lattice vectors to transform the coordinates from reduced to cartesian. |
Yes, if the Quantum Espresso output file is present, it will parse the reciprocal lattice vectors from it and apply it to the coordinate transformation required to depict the k-path in cartesian coordinates which is a more accurate representation for non-orthogonal systems. This was the case for PyProcar v.5.6.6 and below. @lllangWV might be able to provide some insight on how this is done in the newer versions. |
Hi, i'm trying to plot the weyl semimetal band structure
Firstly, I'm using pyprocar with quantum espresso
Using the bands.in, I succeeded in creating the band plot I wanted.
**bands.in
K_POINTS {crystal_b}
7
0.000000 0.000000 0.500000 80 !X
0.000000 0.000000 0.000000 80 !G
-0.271448 0.271448 0.271448 80 !Sigma
0.000000 0.500000 0.000000 80 !N
0.271448 0.728552 -0.271448 80 !Sigma1
0.500000 0.500000 -0.500000 80 !Z
0.000000 0.000000 0.000000 80 !G
The figure below is the band structure I plot.
** pyprocar.bandsplot(code='qe', elimit = [-8,2], mode='plain',dirname=data_dir)
I wnat to change the distance along the kpath(Sigma - N - Sigma1)
Thank you for letting me know how to change the kpath distance.
Or if you have any examples worth referencing, please let me know.
The text was updated successfully, but these errors were encountered: