question about the code: lm_size

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

Moderator: bguster

Locked
chen
Posts: 13
Joined: Mon Apr 19, 2010 4:58 am

question about the code: lm_size

Post by chen » Mon Apr 19, 2010 5:06 am

Hi there,

I am a graduate student, and currently working with the ABINIT 6 code. Everything looks very clear to me (what a great code!), however I have been puzzled for a while that why the internal variable (for PAW only) lm_size is set to be (2*lmax-1)**2. Since I think lm_size is just the size of (l,m) pair, right? so lm_size should be simply lmax**2? Many thanks for your comment in advance!

Chen

mverstra
Posts: 655
Joined: Wed Aug 19, 2009 12:01 pm

Re: question about the code: lm_size

Post by mverstra » Tue Apr 20, 2010 12:14 am

l is actually the angular quantum number +1: s should be 0, not 1.

2 l_max -1 is the number of m values which are accessible:
s lmax=0 and there is just 1 value m=0
p lmax=1 so m=-1,0,1 : 3 values

etc...
Squared because you have a full matrix of (m,m') values.

Matthieu
Matthieu Verstraete
University of Liege, Belgium

chen
Posts: 13
Joined: Mon Apr 19, 2010 4:58 am

Re: question about the code: lm_size

Post by chen » Tue Apr 20, 2010 3:35 am

Hi Matthieu,

Thanks for your detailed reply. I understand your point. I find that the size of (l,m) set for l=0...L and m=-l....+l is indeed to be (l_max)**2. The lm_size in ABINIT is set to l_size**2, and l_size is defined to be the "Maximum value of l+1 leading to non zero Gaunt coeffs'. Do you think this is why that lm_size is (2*l_max-1)**2 instead of a smaller value: l_max**2? Because in order to make Gaunt coeffs zero, one sufficient condition is L1>L2+L3, and this just makes L1=2*(l_max-1). Then the size of (l,m) set is of (L1+1)**2=(2l_max-1)**2

Please let me know if you think my understanding is incorrect.

One example to support the size of (l,m) is of l_max**2 is located in the code 66_paw/denfgr.F90 at line 189:

ipsang = 1 + (pawtab(itypat)%l_size - 1)/2 ! recall l_size=2*l_max+1
allocate(ylm(ipsang*ipsang,nfgd))
option = 1 ! compute Ylm(r-R) for vectors
normchoice = 1 ! use computed norms of input vectors
call initylmr(ipsang,normchoice,nfgd,nrm,option,pawfgrtab(iatom)%rfgd,ylm,ylmgr)

You see here ipsang is of l_max, and then subroutine initylmr() calculates the ylm which is of size l_max**2 for each element in the (L,m) set.

Thank you very much.

Best
Chen

Locked