romerogroup / pyprocar

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

2D spin-texture - Question about KPOINTS #147

Closed TheGreatDeadOne closed 3 weeks ago

TheGreatDeadOne commented 1 month ago

In the documentation to plot the 2D spin texture, you need a 2D grid centered on a certain special point in the Brillouin zone, and this can be generated by kmesh_generator. However, in the example in the documentation (Fe spin texture) a regular mesh is used (Monkhorst Pack - 15 15 15). Is there any difference or advantages and disadvantages? Can you use this type of kpoints for Rashba effect?

TheGreatDeadOne commented 1 month ago

I used the following KPOINTS: https://pastebin.com/abiaAGDG (2D monolayer - noncollinear)

ahromero commented 1 month ago

Gabriel

I am lost, what is what you want?... no sure I followed you..

__::::__ Prof. Aldo Humberto Romero Director Research Computing, West Virginia University Eberly Family Distinguished Professor Fellow American Physical Society Editor Physica B, Assistant Editor EPJB, Editor Frontiers in Physics Section Editor Papers in Physics Member of the Editorial Board of “Materials” and “Symmetry Physics”

Physics and Astronomy Department West Virginia University 135 Willey Street, PO Box 6315 111 White Hall Morgantown, WV 26506 Phone: 304-293-6317 Fax: 304-293-5732 email: @.***

From: Gabriel Elyas @.> Date: Thursday, May 30, 2024 at 9:19 AM To: romerogroup/pyprocar @.> Cc: Subscribed @.***> Subject: Re: [romerogroup/pyprocar] 2D spin-texture - Question about KPOINTS (Issue #147)

I used the following KPOINTS: https://pastebin.com/abiaAGDG (2D monolayer - noncollinear)

— Reply to this email directly, view it on GitHubhttps://github.com/romerogroup/pyprocar/issues/147#issuecomment-2139541427, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB24DTN2KOGJ5YQCC4QV3NDZE4ROVAVCNFSM6AAAAABIJNIGZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZZGU2DCNBSG4. You are receiving this because you are subscribed to this thread.Message ID: @.***>

TheGreatDeadOne commented 1 month ago

Gabriel I am lost, what is what you want?... no sure I followed you.. __::::__ Prof. Aldo Humberto Romero Director Research Computing, West Virginia University Eberly Family Distinguished Professor Fellow American Physical Society Editor Physica B, Assistant Editor EPJB, Editor Frontiers in Physics Section Editor Papers in Physics Member of the Editorial Board of “Materials” and “Symmetry Physics” Physics and Astronomy Department West Virginia University 135 Willey Street, PO Box 6315 111 White Hall Morgantown, WV 26506 Phone: 304-293-6317 Fax: 304-293-5732 email: @. From: Gabriel Elyas @.> Date: Thursday, May 30, 2024 at 9:19 AM To: romerogroup/pyprocar @.> Cc: Subscribed @.> Subject: Re: [romerogroup/pyprocar] 2D spin-texture - Question about KPOINTS (Issue #147) I used the following KPOINTS: https://pastebin.com/abiaAGDG (2D monolayer - noncollinear) — Reply to this email directly, view it on GitHub<#147 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB24DTN2KOGJ5YQCC4QV3NDZE4ROVAVCNFSM6AAAAABIJNIGZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZZGU2DCNBSG4. You are receiving this because you are subscribed to this thread.Message ID: @.***>

It's just that in the example listed (Fe) on the site for the spin texture, i realised that the KPOINTS file came with the regular mesh (Monkhorst Pack - 15 15 15), but elsewhere in the documentation, it is recommended to use explicit k-points path, and I understand the need (and also in the example for the rashba effect, I didn't see what type of KPOINTS was used). But I wanted to know if it's possible to use the regular mesh to plot the spin texture as in the two examples, or will I lose any information/precision if I don't use explicit k-points path?

ps: The KPOINT I sent is an explicit k-points path that I generated for the calculation, using vaspkit.

lllangWV commented 1 month ago

Hi Gabriel,

both methods should work effectively. I have created an example for Fe using the Monkhorst Pack grid (15 15 15). The main difference is that I have generalized the fermi2D function to work with 3D k-meshes and added an option for users to select which k_z_plane (in Cartesian coordinates) to plot.

Below is the code snippet illustrating how to select the specific k_z_plane. We retain only the k-points defined between k_z_plane and k_z_plane_tol. The default values are k_z_plane=0.0 and k_z_plane_tol=0.01. For the Rashba example, which uses a 2D grid centered on a particular point, nothing changes since the k-points lie in the k_z=0 plane.

# Selecting kpoints in a constant k_z plane
i_kpoints_near_z_0 = np.where(np.logical_and(kpoints[:,2] < k_z_plane + k_z_plane_tol, 
                                             kpoints[:,2] > k_z_plane - k_z_plane_tol))
kpoints = kpoints[i_kpoints_near_z_0,:][0]
ebs.bands = ebs.bands[i_kpoints_near_z_0,:][0]
ebs.projected = ebs.projected[i_kpoints_near_z_0,:][0]

Please let me know if you have any questions or need further clarification.

Logan Lang

TheGreatDeadOne commented 3 weeks ago

Thanks @lllangWV and @ahromero ! And sorry for the poorly worded question.