Page 1 of 1

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

Posted: Thu Apr 10, 2025 12:55 pm
by tilak_das3

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


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

Posted: Thu Apr 10, 2025 2:56 pm
by michael_wolloch

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.


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

Posted: Fri Apr 11, 2025 7:53 am
by tilak_das3

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


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

Posted: Fri Apr 11, 2025 7:58 am
by michael_wolloch

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