Make "pawprtwf 1" work for SOC case (pawspnorb 1)  [SOLVED]

Documentation, Web site and code modifications

Moderators: baguetl, routerov

Locked
goodluck
Posts: 8
Joined: Thu Apr 05, 2012 6:25 am

Make "pawprtwf 1" work for SOC case (pawspnorb 1)  [SOLVED]

Post by goodluck » Fri Apr 20, 2012 3:06 pm

About the original problem, see the post http://forum.abinit.org/viewtopic.php?f=9&t=1620.

Now, I have modified the file 66_paw/pawmkaewf.F90 to make the output of AEWF work for nspinor=2.

For nspinor=1 case, the addition of PAW on-site contribution is done by (only pseudo code):

Code: Select all

  ur = ur  +  Cprj_k* (phj - tphj)  

where Cprj_k=<pj|Cnk>. For given k point and given j, there are nband numbers Cprj_k(1:nband).

However, for nspinor=2 case, I note that for given k and j there are nband*2 numbers Cprj_k(1:nband*2) and Cprj_k(1:nband) for ispinor=1 and Cprj_k(nband:nband*2) for ispinor=2. So I just do the addition for different spinors respectly:

Code: Select all

 do ispinor=1,2
   ur[ispinor] = ur[ispinor]  +  Cprj_k[ispinor]* (phj - tphj)
enddo


I'm not very sure whether what I do is right. However, from the resulting norm's, the modification seems reasonable.
ikpt,iband, norm (G,PSWF)= 1 1 1.2819441113614474 norm (R,AEWF)= 1.27108327367824
ikpt,iband, norm (G,PSWF)= 1 2 1.2819441113614480 norm (R,AEWF)= 1.27108327367823
ikpt,iband, norm (G,PSWF)= 1 3 0.9746615480577480 norm (R,AEWF)= 0.993896250490052
ikpt,iband, norm (G,PSWF)= 1 4 0.9746615480577479 norm (R,AEWF)= 0.993896250490051
ikpt,iband, norm (G,PSWF)= 1 5 0.9811217071638316 norm (R,AEWF)= 0.994019299345327
ikpt,iband, norm (G,PSWF)= 1 6 0.9811217071638323 norm (R,AEWF)= 0.994019299345333
ikpt,iband, norm (G,PSWF)= 1 7 0.9797370847830850 norm (R,AEWF)= 0.994313568065132
ikpt,iband, norm (G,PSWF)= 1 8 0.9797370847830846 norm (R,AEWF)= 0.994313568065128
ikpt,iband, norm (G,PSWF)= 1 9 1.0545130328131975 norm (R,AEWF)= 1.05968146838542
ikpt,iband, norm (G,PSWF)= 1 10 1.0545130328131977 norm (R,AEWF)= 1.05968146838542
ikpt,iband, norm (G,PSWF)= 1 11 0.9802085959611944 norm (R,AEWF)= 1.00307286905404
ikpt,iband, norm (G,PSWF)= 1 12 0.9802085959816478 norm (R,AEWF)= 1.00307286904567

The above output is for the test input file located at ~abinit/tests/etsf_io/Input/t09.in.
Note, two changes: nband 12 pawspnorb 1

Another problem about nspinor=2, for file 59_io_mpi/rwwf.F90:line 1051

Code: Select all

 main_folder%wfs_coeff__number_of_coefficients = npw * nspinor

It does not work for "accesswff 3" and "pawspnorb 1". It should be

Code: Select all

 main_folder%wfs_coeff__number_of_coefficients = npw 


There are many other similar problems about nspinor=2, e.g. cut3d can not work for nspinor=2. I hope these problems will be resolved in the near future.

The modified file is attached.
Attachments
pawmkaewf.F90.in
only a F90 file
(43.24 KiB) Downloaded 385 times

User avatar
torrent
Posts: 127
Joined: Fri Aug 14, 2009 7:40 pm

Re: Make "pawprtwf 1" work for SOC case (pawspnorb 1)

Post by torrent » Tue Aug 21, 2012 12:19 pm

Hi,

Thanks for the proposed modifications.
I have included them in the future v7.0 version of ABINIT.

Hope this works,
Marc Torrent
Marc Torrent
CEA - Bruyères-le-Chatel
France

Locked