romerogroup / pyprocar

A Python library for electronic structure pre/post-processing
GNU General Public License v3.0
171 stars 75 forks source link

Clarification on Spin Texture Plotting: Components and Arrow Representation #163

Open aktariitkgp opened 2 months ago

aktariitkgp commented 2 months ago

Dear PyProcar Developers, I am currently working with spin texture plots using PyProcar (QE-DFT data) and have a question regarding the interpretation of the arrows in these plots. Specifically:

  1. Arrow Direction and Size: ◦ I understand that the direction of the arrows represents the spin vector direction, and the size indicates the magnitude of the spin. Is this magnitude representing the total spin ∣S∣ (i.e., the magnitude of the spin vector), or is it normalized in some way? If it is normalized, could you explain how this normalization is performed?
  2. Plotting Custom Spin Component Combinations: ◦ I am interested in plotting specific combinations of spin components, such as Sx​+Sy​ or Sx​+Sy​+Sz​. How can I modify the plotting routine or configuration to visualize these custom combinations? Is there a specific option or parameter in PyProcar that allows for plotting such combinations, or do I need to preprocess the data to achieve this? Thank you for your assistance! Best regards, Aktar
lllangWV commented 2 months ago

Hi @aktariitkgp,

Is this magnitude representing the total spin ∣S∣ (i.e., the magnitude of the spin vector), or is it normalized in some way? If it is normalized, could you explain how this normalization is performed?

Is this question regarding a 2D or 3D Fermi surface?

For the 2D Fermi surface, we calculate the projections for Sx, Sy, Sz, Sx^2, Sy^2, and Sz^2. However, we currently do not provide an option to plot the magnitude of the total spin. This is a useful feature that we should include, and I'll work on adding this functionality.

For the 3D Fermi surface, the total spin magnitude is already plotted by default.

I am interested in plotting specific combinations of spin components, such as Sx​+Sy​ or Sx​+Sy​+Sz​. How can I modify the plotting routine or configuration to visualize these custom combinations? Is there a specific option or parameter in PyProcar that allows for plotting such combinations, or do I need to preprocess the data to achieve this?

Just to clarify, are you asking for the color scale to represent the combination of spin components (e.g., Sx + Sy, or Sx + Sy + Sz)? Also, is this for a 2D or 3D Fermi surface?

Currently, we don't support this directly, but I can investigate how we might add this capability.

Best,
Logan Lang

aktariitkgp commented 2 months ago

Hi @lllangWV Thank you for your response.

My question is regarding a 2D fermi surface. So, in 2D fermi surface plot arrow and color plot represent the same thing. For example, If I am plotting Sx projection, the color plot and arrow size both represent the magnitude of sx. Is my understanding correct?

I would like to know if it’s possible to plot the arrows as in-plane spin vectors (Sx + Sy) while using the color plot to represent the projection of Sz. All of this would be in a 2D Fermi surface.

Thank you for your consideration, and I appreciate your help.

Best regards, Aktar

lllangWV commented 1 month ago

Hey,

In a 2D Fermi surface plot, do the arrows and color plot represent the same thing? For example, if I'm plotting the Sx projection, both the color plot and arrow size indicate the magnitude of Sx. Is my understanding correct?

Yes, that's correct. Currently, the available options for spin_projection are x, y, z, x^2, y^2, and z^2. You can modify the spin_projection in the code as follows:

pyprocar.fermi2D(code='vasp',
                 dirname=data_dir,
                 # energy=0.60,
                 energy=-0.90,
                 fermi=-1.1904,
                 spin_texture=True,
                 no_arrow=False,
                 arrow_size=1,
                 arrow_density=8,
                 spin_projection='x',
                 clim=[-0.2, 0.2],
                 plot_color_bar=True)

I would like to know if it’s possible to plot the arrows as in-plane spin vectors (Sx + Sy) while using the color plot to represent the projection of Sz. All of this would be in a 2D Fermi surface.

Yes, this is possible. We assume Sz is always out-of-plane, while Sx and Sy are in-plane. The options mentioned above can be used to adjust accordingly.

Best,
Logan Lang