Skip to content
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

Spin Texture #6

Open
apezol opened this issue Jun 9, 2020 · 9 comments
Open

Spin Texture #6

apezol opened this issue Jun 9, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@apezol
Copy link

apezol commented Jun 9, 2020

Hello, I've been trying to calculate the spin-texture using mcu. I've followed what Is presented in the page for the MoS2 case but when I try to run my case I get the following:

ValueError: cannot reshape array of size 0 into shape (3,8,8)

Any idea?,

Regards,

@hungpham2017
Copy link
Owner

Can you post a full or a longer error message?
I guess it has something to do with an empty array but I do now know exactly which one?

@apezol
Copy link
Author

apezol commented Jun 11, 2020

Yes, the full error is:

Traceback (most recent call last):
File "mcu_run.py", line 3, in
mymcu.plot_spin(band=2)
File "/armando/packages/mcu/mcu/vasp/vasprun.py", line 1155, in plot_spin
spin_text = spin_text.reshape(3,npoint[0],npoint[1])
ValueError: cannot reshape array of size 0 into shape (3,8,8)

The lines used to run mcu were:
import mcu
mymcu = mcu.VASP()
mymcu.plot_spin(band=2)

and the INCAR file is:

SYSTEM = MoTe2
EDIFF = 1E-5
PREC = N
LSORBIT = .TRUE.
ICHARG = 11 #charge read file
ENCUT = 300.00 eV
ISMEAR = 0; SIGMA = 0.1;
LORBIT = 11

I ran this one after copying the IBZKPT into KPOINTS which was generated also with mcu.

@hungpham2017
Copy link
Owner

It looks to me that the spin_text array wasn't generated for some reason (needed before passed to plot function). Hence, it is empty.
Would you mind to share your KPOINTS and vasprun.xml?
I can have a look to see why

@apezol
Copy link
Author

apezol commented Jun 11, 2020

No problem, they're attached below

text.zip

@hungpham2017
Copy link
Owner

hungpham2017 commented Jun 11, 2020

The problem was due to the incorrect number of k-point in KPOINTS file.
It should be 128 (64 + 64) instead of 64. Basically, the first 64 kpts are used for SCF, the last 64 kpts are used to generate the spin texture (kpt with zero weight). That's why no spin-texture info was computed at the desired k grid, resulting in an empty array spin_text.
I should have had a better guideline that user need to do an addtion themself .

Generated mesh by mcu: xy  0.0200  0.0200  8  8
     128                # = 64 for spin texture + 64 k-points from IBZKPT for SCF
Reciprocal lattice
    0.00000000000000    0.00000000000000    0.00000000000000             1
    0.12500000000000   -0.00000000000000    0.00000000000000             1
    0.25000000000000   -0.00000000000000    0.00000000000000             1
    0.37500000000000    0.00000000000000    0.00000000000000             1
...

@apezol
Copy link
Author

apezol commented Jun 11, 2020

Dear Hung,

Indeed, that was the problem, thank you very much. Perhaps it'd be appropriate to ask you, How can I select the energy on which the spin-texture is calculated?, from the arguments the I've checked in that function, it seems to me that there are nothing related to this, Do I need only choose the band?.

@hungpham2017 hungpham2017 added the enhancement New feature or request label Jun 11, 2020
@hungpham2017
Copy link
Owner

You choose the band and the spherical harmonics orbs via the argument lm, for example, lm='s,p'.
Are you interested in plotting the spin texture on a constant-energy plane like the Fermi surface?

If that's the case, this function is being implemented and will be released in the next version which will support more comprehensive plotting functions for 2D/3D properties.

@apezol
Copy link
Author

apezol commented Jun 15, 2020

Dear @hungpham2017 , Yes, I was expecting that. Well, then I'll wait for the next version, thanks again.

@binodgit12
Copy link

binodgit12 commented Aug 8, 2022

Dear Dr. hungpham
I've been trying to plot spin-texture using mcu. I've followed what is presented on the page for the MoS2 case. I used a 2x2 supercell for low computational cost. I did not get what you have shown in your mcu documentation.

step 1:  self-consistent calculation with SOC tags
MoS2-spintexture.zip

Step 2: Took the CHGCAR and WAVECAR from the self-consistent calculation and run the band structure calculation with SOC tags. In this step, I used new KPOINTS generated by mcu. While generating KPOINTS, I used IBZKPT file co-ordinates having weight 1 in the front and then KPOINTS made by mcu. I would beware of updating the total number at the top of new KPOINTS.

My POSCAR, new KPOINTS, spin_texture.png, and vasprun.xml are attached. Please let me know what I did wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants