LNONCOLLINEAR=.TRUE to print PROCAR up to 9th decimal

Questions regarding the compilation of VASP on various platforms: hardware, compilers and libraries, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
tilak_das3
Newbie
Newbie
Posts: 2
Joined: Thu Jan 19, 2023 2:17 pm

LNONCOLLINEAR=.TRUE to print PROCAR up to 9th decimal

#1 Post by tilak_das3 » Thu Apr 10, 2025 12:55 pm

Dear Admin,
I need in the LNONCOLLINEAR=.TRUE runs, to print "PROCAR up to 9th decimal"

Can you please suggest in which folder and or which programs of the source code of VASP6.4.3 need to be edited to get this issue fixed?

thank you in advance.

Best regards,
Tilak Das
Dept. of Physics, IIT KGP, WB, India


michael_wolloch
Global Moderator
Global Moderator
Posts: 147
Joined: Tue Oct 17, 2023 10:17 am

Re: LNONCOLLINEAR=.TRUE to print PROCAR up to 9th decimal

#2 Post by michael_wolloch » Thu Apr 10, 2025 2:56 pm

Dear Tilak Das,

I would advise you to use the hdf5 output of VASP to get better precision. Projectors are accessible in the vaspout.h5 file via the projector class in py4vasp.

However, if you want to keep using the PROCAR file, the fix is an easy change in sphpro.F:

Change the format specifiers in lines 1631 to 1634 so that instead of F6.3 they use F12.9 (or similar) and recompile the code.
It should look like this:

Code: Select all

 
 3204 FORMAT(I5,17(1X,F12.9))
 3214 FORMAT(I5,17(1X,F12.9,1X,F12.9,1X))
 3205 FORMAT('tot  ',17(1X,F12.9)/)
 3215 FORMAT('charge',17(F12.9,1X,'      ',2X)/)
 

I attach 2 PROCAR files, both resulting from the Tl_x test in the vasp testsuite. PROCAR_new is using the changed format, PROCAR_old is the original.

Note that you can also adjust the spacing of the

Code: Select all

ion      s     py     pz     px    dxy    dyz    dz2    dxz  x2-y2    tot

lines to fit the new data layout by modifying the variables LCHAR, LMCHAR and LMCHAR_LONG right in the beginning of the file.

If you also want to change the output of PROCAR_OPT, you will have to change the corresponding format specifiers in lines 1753 to 1756 of sphpro.F.

You do not have the required permissions to view the files attached to this post.

tilak_das3
Newbie
Newbie
Posts: 2
Joined: Thu Jan 19, 2023 2:17 pm

Re: LNONCOLLINEAR=.TRUE to print PROCAR up to 9th decimal

#3 Post by tilak_das3 » Fri Apr 11, 2025 7:53 am

Dear Michael, thank you for your promote reply and important details.

One of the method you have suggested, is used herein in my implementation and got the desired output. Here is a quick screen short at the moment without SOC.

----
PROCAR lm decomposed
# of k-points: 4352 # of bands: 72 # of ions: 4

k-point 1 : 0.00000000 0.00000000 0.00000000 weight = 0.00003472

band 1 # energy -70.22287748 # occ. 1.00000000

ion s py pz px dxy dyz dz2 dxz x2-y2 tot
1 0.996243221 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000306 0.000000000 0.000000000 0.996243527
2 0.000007362 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000097 0.000000000 0.000000000 0.000007459
3 0.000009969 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000973 0.000000000 0.000005007 0.000015949
4 0.000009969 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000973 0.000000000 0.000005007 0.000015949
tot 0.996270520 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000002349 0.000000000 0.000010014 0.996282883

-----
The other calculation with SOC yet to complete, thank you again.

best regards,
Tilak Das


michael_wolloch
Global Moderator
Global Moderator
Posts: 147
Joined: Tue Oct 17, 2023 10:17 am

Re: LNONCOLLINEAR=.TRUE to print PROCAR up to 9th decimal

#4 Post by michael_wolloch » Fri Apr 11, 2025 7:58 am

Dear Tilak Das,

I am happy to help!

I forgot to mention that this change will affect all PROCAR output, not just for noncollinear calculations. But you figured that out already.

If you have no further questions on this topic, please indicate so, so I can lock the thread.

Cheers, Michael


Post Reply