[Pw_forum] possible bug in scatter_forw.f90
Manoj Srivastava
manoj at phys.ufl.edu
Tue Oct 14 17:49:46 CEST 2008
Dear Alexader,
Thank you very much for your reply. I was out of town and could not see
the message till yesterday. I have some questions on it, it would be great
if you could answer them.
On Fri, 10 Oct 2008, Alexander wrote:
> Dear Manoj
>
> On Friday 10 October 2008 05:20, Manoj Srivastava wrote:
> > Any follow ups on the message below? Alexander?
> >
> > Regards,
> > Manoj
> >
> > On Wed, 8 Oct 2008, Manoj Srivastava wrote:
> > > Dear All,
> > > Is any body familiar with the scatter_forw.f90 subroutine of PWCOND? I
> > > think there is a bug in this subroutine at the place where you calculate
> > > intw2, which is z integration of nonlocal wavefunction with beta
> > > function. I have looked up the necessary formulae in the Choi & Ihm's
> > > paper (PRB 59, 2267, Jan 1999). In the paper, nonlocal wavefunction has 3
> > > terms, one of which contains beta function, say W. The other two parts
> > > dont have any W in them, rather they are just plane wave solution.
> > > (Please have a look at equation 24 and 26 of the paper ). So, when we are
> > > doing z integration of nonlocal wavefunction with beta function W, we
> > > should have three terms, one of which should contain two W, but rest
> > > should just have one W. On the other hand in the code all three terms
> > > contain two beta functions!! (please have a look at line 228 of
> > > scatter_forw.f90). I am wondering if my understanding is right?
>
> Your understanding is wrong. On the line 228 you add to the integral ONLY
> contribution with two beta functions (from the 1st term in the nonlocal
> function, see Eq. 24) but on the line 393 the contribution from the 2nd term
> is added too. There is no 3rd term since every step you rotate your local
> solutions \psi_n in such a way that b_{\lambda \alpha lm} vanish (see the
> paragraph after Eq. 37).
I believe that the equations 40, 41 and 42 implemented in the code are
in the momentum space. In the code, intw2 has 3 terms. We can tell this by
looking at the subroutine integrals.f90, where int2d is defined. Now, by
looking at the choi& Ihm 's paper, the very first term of psi{alpha,l,m}
has f{lambda,alpha,l,m}(equation26).And, if we substitute this in equation
40, we should just get one term. I am just confuesd on the fact that how
come this one term in paper gets transformed into 3 terms of the code!
Would you mind explaining? Also, the integrals that are defined in the
code are only in the slabs (nz1), so how are you taking the integration in
the region (0,d), which we need according to equations 40, 41 and 42 ?
>
> > > I have one more question in the later part of the same subroutine. What
> > > does the lapack subroutine
> > > ZGESV(2*n2d,2*n2d+norb*npol,amat,2*n2d,ipiv,xmat,2*n2d,info)
> > > do?
> > > I tried to look it up and i got the idea that it is trying to solve
> > > amat*x=xmat, with amat and xmat known and x unknown, and at the end of
> > > calculation it stores x in xmat.
> > > so, basically it does-- x=[(amat)^(-1)]*xmat. Am i right? So, it changes
> > > the structure of xmat from what is defined in 'constructs matrices'
> > > part. Is it correct?
>
> Here, you are right.
>
> > > Also, afterwards in this code where it 'rotates integrals' is not very
> > > clear to me.
> > > Could somebody please tell me in little detail, what is going on
> > > here?
> As I explained before rotation means that every step (at each slab)
> you make a linear combination of local solutions \psi_n with the
> transformation matrix h_{nn'} (see the last paragraph on the p. 2270).
> so that the new solutions have the property:
> b_{\lambda n} = \delta_{\lambda n} and the new nonlocal solutions have
> b_{\lambda \alpha lm}=0. Doing this transformation of local and nonlocal
> solutions you should also perform the corresponding transformations
> of the integrals.
>
> > > Also, is this subroutine written just on the basis of Choi and Ihm
> > > paper, or are there more reference to it? If yes, would someone mind
> > > mentioning them?
> Unfortunately, the paper of Choi and Ihm is very detail, and in the
> PWCOND code we followed it very closely, so no more references
> are needed. In our papers we just extended those ideas to ultrasoft
> pseudopotentials, magnetism, spin-orbit coupling and so on.
>
> Hope this helped you,
> regards, Alexander
>
> > >
> > > Regards,
> > > Manoj Srivastava
> > > Physics Graduate Student
> > > University of Florida,
> > > Gainesville,FL, USA
> >
> > _______________________________________________
> > Pw_forum mailing list
> > Pw_forum at pwscf.org
> > http://www.democritos.it/mailman/listinfo/pw_forum
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum
>
Once again thank you very much for your help. I appreciate it.
Regards,
Manoj Srivastava
More information about the users
mailing list