Problem about outputing AE_WFK file in case of SOC

Total energy, geometry optimization, DFT+U, spin....

Moderator: bguster

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

Problem about outputing AE_WFK file in case of SOC

Post by goodluck » Wed Apr 18, 2012 8:07 pm

I need the all-electron wave functions (AEWF), so I use pawprtwf 1 to output it. It works all right for system without SOC, but not SOC cases.

That is to say, pawprtwf 1 confilits with pawspnorb 1 !

I read the source file 66_paw/pawmkaewf.F90 and found that from line 729

Code: Select all

 ABI_ALLOCATE(ur,(2,n1*n2*n3))
the variable dtset%nspinor is not accounted for. That is to say, SOC cases (nspinor=2) are not implented at all! I want to change the code to add the second spinor component for wavefunctions, but I am not clear about how to deal with the PAW on-site contributions.

I know that, in case of non-spinor wavefunctions, we have

|Ψn> =|tΨn>+ Σ (φi - tφi) <tpi |tΨn >

In case of SOC, the PSWF |tΨn> is a two-component spinor WF: {|tΨn>_1, |tΨn>_2}
But what about the partial waves (φi, tφi) and projectors (tpi)? Are they also spinors?
Are the PAW on-site contributions to each spinor component of a spinor WF the same?

Does the Cprj_k contains the both spinor components?
How to modify the following code except doubling the dimension of ur?

Code: Select all

!      === Add onsite term on the augmented FFT mesh ===
       do iatom=1,natom
         itypat  =typat(iatom)
         lmn_size=Pawtab(itypat)%lmn_size
         ln_size =Pawtab(itypat)%basis_size ! no. of nl elements in PAW basis
         nfgd    =local_pawfgrtab(iatom)%nfgd ! no. of points in the fine grid for this PAW sphere

         ibsp=(iband-1)*dtset%nspinor
         do ispinor=1,dtset%nspinor
           ibsp=ibsp+1
           do jlmn=1,lmn_size
             jl=Psps%indlmn(1,jlmn,itypat)
             jm=Psps%indlmn(2,jlmn,itypat)
             cp_fact(1) = Cprj_k(iatom,ibsp)%cp(1,jlmn) *sqrt(ucvol) ! Magic factor
             cp_fact(2) = Cprj_k(iatom,ibsp)%cp(2,jlmn) *sqrt(ucvol)

             do ifgd=1,nfgd ! loop over fine grid points in current PAW sphere.
               ifftsph = local_pawfgrtab(iatom)%ifftsph(ifgd) ! index of the point on the grid
               phj  = Paw_onsite(iatom)% phi(ifgd,jlmn)
               tphj = Paw_onsite(iatom)%tphi(ifgd,jlmn)
!              old code
!              re_p = cp_fact(1)
!              im_p = cp_fact(2)
!              apply the phase
               re_p = cp_fact(1) * phk_atm(1,ifgd,iatom) - cp_fact(2) * phk_atm(2,ifgd,iatom)
               im_p = cp_fact(1) * phk_atm(2,ifgd,iatom) + cp_fact(2) * phk_atm(1,ifgd,iatom)

               ur(1,ifftsph) = ur(1,ifftsph) + re_p * (phj-tphj)
               ur(2,ifftsph) = ur(2,ifftsph) + im_p * (phj-tphj)
               ur_ae_onsite(1,ifftsph) = ur_ae_onsite(1,ifftsph) + re_p * phj
               ur_ae_onsite(2,ifftsph) = ur_ae_onsite(2,ifftsph) + im_p * phj
               ur_ps_onsite(1,ifftsph) = ur_ps_onsite(1,ifftsph) + re_p * tphj
               ur_ps_onsite(2,ifftsph) = ur_ps_onsite(2,ifftsph) + im_p * tphj
               ur_mask(ifftsph) = one
             end do

           end do !jlmn
         end do !ispinor
       end do !iatom


Hope someone can help me, thanks in advance!

BTW: I use tha latest 6.12.3 version. I want to know if this problem is fixed in the development version 6.13, if yes how to get it?

stankovski
Posts: 2
Joined: Sat Oct 15, 2011 5:51 pm

Re: Problem about outputing AE_WFK file in case of SOC

Post by stankovski » Sat Apr 28, 2012 8:46 am

Hello,

I was among the people who developed this section, mostly to investigate issues with PAW calculations. We never did any SOC calculations, however, so we never extended it for full non-collinear magnetism, although it should work in the collinear case. To add this functionality might take some time, since it has to be implemented, tested (this is the difficult part) and preferably done by someone who is very familiar with the machinery of non-collinear PAW calculations in ABINIT (and I am unfortunately not very familiar with it).

You can try to hack the code yourself, as you pointed out, the temporary arrays starting with ur_..need to have two components, and the loop adding the onsite part needs to be modified, so that the correct first and second components are being filled in (now the first component is simply overwritten by the second, since there is no spinor dimension in th ur_... arrays). As far as I can see, the coefficients Cprj_k are already dimensioned correctly, but there is a commented section relating to the fourier transform from reiprocal to real space of the second spinor plane-wave component that would have to be uncommented and probably corrected with the right arrays allocated and so forth.

In summary it would probably not be that difficult to implement, but the real difficulty is testing that it works properly with a clear simple case, where you know what the answer should look like. I can look into it, but I cannot promise to have anything ready soon. In the meantime, we should probably modify the code to issue a warning that pawprtwf 1 does not work with pawspinorb 1.

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

Re: Problem about outputing AE_WFK file in case of SOC

Post by goodluck » Mon Apr 30, 2012 1:48 pm

stankovski wrote: As far as I can see, the coefficients Cprj_k are already dimensioned correctly, but there is a commented section relating to the fourier transform from reiprocal to real space of the second spinor plane-wave component that would have to be uncommented and probably corrected with the right arrays allocated and so forth.

In summary it would probably not be that difficult to implement,......


Thanks for your reply!

I have modified the related code, see this post
viewtopic.php?f=19&t=1627

And the calculated "norm's" seem right.

temok
Posts: 39
Joined: Tue Jun 08, 2010 1:44 am

Re: Problem about outputing AE_WFK file in case of SOC

Post by temok » Fri Jun 27, 2014 7:01 pm

Hi Goodluck,

I am also facing problems to output the AE_WFK when SCO is active. I am using ABINIT 7.6.2

In my case the files are produced, but seem corrupted; ABINIT reaches the usual final messages in the log file, but I get lots of error messages, which surprisingly don't stop the run. I posted further details on this post http://forum.abinit.org/viewtopic.php?f=7&t=2716

I know you posted a patch for ABINIT 6.12.3 for the module 66_paw/pawmkaewf.F90, http://forum.abinit.org/viewtopic.php?f=19&t=1627.
Did you get **indeed** correct AE_WFK?

I am interested in these full wavefunctions, with spin-orbit included, in order to compute some effective parameters of the system I am studying.

Cheers,
Temok

Locked