[Pw_forum] Projection?
Paolo Giannozzi
giannozz at nest.sns.it
Mon Nov 10 11:06:12 CET 2003
On Friday 07 November 2003 21:57, Hong, SamPyo wrote:
> As far as I know, before doing projection of each |phi_i> to |evc>, we
> should have a set of the orthogonized wavefunctions i.e, <phi_i|S|phi_j>
> = 0 if i&j are different. For example, in the following routine,
> if we replace
>
> temp = ZDOTC(npw,swfcatom(1,i),1,evc(1,ibnd),1)
> by
> temp = ZDOTC(npw,swfcatom(1,i),1,wfcatom(1,i),1)
>
> Then, temp must be zero. However, it seems not to be true. Why is that?
>
> ---------------PWSCF 1.03
> projwave.F----------------------------------------
> c
> c make the projection
> c
> do ibnd = 1, nbnd
> psum = 0.d0
> do i=1,natomwfc
> temp = ZDOTC(npw,swfcatom(1,i),1,evc(1,ibnd),1)
> work(i,1) = temp
> enddo
> #ifdef PARA
> call reduce(2*natomwfc,work)
> #endif
swfcatom does not contain S|phi_i> (S is the ultrasoft overlap
matrix: S=1 for norm-conserving pseudopotentials), but
O^(-1/2) S|phi_i>, where O_(ij) = <phi_i|S|phi_j>. This is done
in the lines just above those you show:
c
c trasform atomic orbitals O^-1 psi
c
do i=1,npw
call setv(2*natomwfc,0.d0,work,1)
call ZGEMV('n',natomwfc,natomwfc,(1.d0,0.d0),overlap,
* natomwfc,swfcatom(i,1),npwx, (0.d0,0.d0),work,1)
call ZCOPY(natomwfc,work,1,swfcatom(i,1),npwx)
end do
The orthonormal atomic wavefunctions are O^(-1/2) |phi_i>
(orthonormal wrt the S operator for ultrasoft potentials).
The comment to these lines ("trasform atomic orbitals O^-1 psi")
was - as most comments in computer codes are - obscure and
misleading. It is correct in more recent versions of the code.
Paolo
--
Paolo Giannozzi e-mail: giannozz at nest.sns.it
Scuola Normale Superiore Phone: +39/050509412
Piazza dei Cavalieri 7 Fax: +39/050509417, 050563513
I-56126 Pisa, Italy Office: Lab. NEST, Via della Faggiola 19
More information about the Pw_forum
mailing list