-
Notifications
You must be signed in to change notification settings - Fork 78
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
Projected bandstructure cannot mix colors #179
Comments
No, the projections are summed together. The sum of all projections should equal to 1 or close to it. For instance if you do pyprocar.bandsplot(... orbitals=[0,3]) This will sum the projection contribution from all atoms, spins, s orbitals, and the p_z orbitals. if you do pyprocar.bandsplot(... orbitals=[0,3], atoms=[0]) This will sum the projection contribution from the first atom, spins, s orbitals, and the p_z orbitals. Does this answer your question or am I misunderstanding? |
When I do |
Yes, this is what happens For Here is a summary of the implementation in eps_plot:452-505 For SrVO3 weight has a length of 3 for s, p, d for iweight, weight in enumerate(weights):
....
for ispin in spins:
...
for iband in range(self.ebs.nbands):
segments = np.delete(segments, np.where(x[1:] == x[:-1])[0], axis=0)
lc = LineCollection(
segments,
cmap=plt.get_cmap(color_map[iweight]),
norm=norm,
alpha=self.config.opacity[ispin],
)
lc.set_array(weight[:, iband, ispin]) # scaling of the color happens here
lc.set_linewidth(weight[:, iband, ispin] * linewidth[ispin]) # Scaling of the linewidth happens here
handle = self.ax.add_collection(lc) |
If I understand the current implementation correctly, for any (k, E) point of the bandstructure the color will be determined solely by the highest projection component. For example, if a point is 0.31 s character and 0.30 p character, then it will be only red, but 0.30 s and 0.31 p point will be colored blue.
The text was updated successfully, but these errors were encountered: