I got stuck with the following problem: I want to directly check the orthogonality and normalization of Kohn-Sham
orbitals (before doing more complicated stuff), i.e. I want to evaluate the following integral
<psi_{nk}|psi_{n'k'}>. First I construct the complex charge
density by vnlrho and then I integrate it over primitive cell by zfint for any combination of n n' k k':
do ik=1,nkptnr
! generate wave-functions at k
call getevecfv(vklnr(1,ik),vgklnr(:,:,ik),evecfv)
call getevecsv(vklnr(1,ik),evecsv)
call match(ngknr(ik),gkcnr(:,ik),tpgkcnr(:,:,ik),sfacgknr(:,:,ik),apwalm)
call genwfsv(.false.,ngknr(ik),igkignr(:,ik),evalsv(1,1),apwalm,evecfv, &
evecsv,wfmt1,wfir1)
do jk=ik,nkptnr
! generate wave-functions at k'
call getevecfv(vklnr(1,jk),vgklnr(:,:,jk),evecfv)
call getevecsv(vklnr(1,jk),evecsv)
call match(ngknr(jk),gkcnr(:,jk),tpgkcnr(:,:,jk),sfacgknr(:,:,jk),apwalm)
call genwfsv(.false.,ngknr(jk),igkignr(:,jk),evalsv(1,1),apwalm,evecfv, &
evecsv,wfmt2,wfir2)
do i=1,nstsv
do j=1,nstsv
call vnlrho(.true.,wfmt1(:,:,:,:,i),wfmt2(:,:,:,:,j),wfir1(:,:,i), &
wfir2(:,:,j),zrhomt,zrhoir)
znorm1=zfint(zrhomt,zrhoir)
For k=k' I get the expected \delta_{nn'} relation. For k!=k' I should get zeroes for any combination of n,n' but
I get anything in the interval 0.0~0.9 Right now I have only one explanation: the phase exp^{ikr} is not correctly
handled. Any your help or advise is kindly appreciated.
BTW, I'm doing this for the simple BCC Lithium without symmetry.
With best regards,
Anton.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem was in mathematics: the integral <psi_{nk}|psi_{n'k'> is evaluated over whole macro-crystal, not over primitive cell. Using Bloch theorem it's easy to show that <psi_{nk}|psi_{n'k'>_{over V} = \sum_{R}exp^{i{k'-k}R}<psi_{nk}|psi_{n'k'>_{over V0} and the orthogonality comes from \sum_{R}exp^{i{k'-k}R}. The integral <psi_{nk}|psi_{n'k'>_{over V0} makes no sense - it's an arbitrary complex number.
Good luck.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The second-variational wavefunctions are orthogonal when integrated over the unit cell. I'm not sure why you're not getting delta_ij. Have you made any progress?
Cheers,
Kay.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Kay.
yes, everything is ok with orthonormality. For a given k-point I got \delta_{ij} relation. I didn't check spin-polarized cases (collinear and non-collinear) but I'm pretty sure that they are fine too. As I mentioned before, for k!=k' the orthogonality comes from mathematics.
Best regards,
Anton.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear Exciting developers!
I got stuck with the following problem: I want to directly check the orthogonality and normalization of Kohn-Sham
orbitals (before doing more complicated stuff), i.e. I want to evaluate the following integral
<psi_{nk}|psi_{n'k'}>. First I construct the complex charge
density by vnlrho and then I integrate it over primitive cell by zfint for any combination of n n' k k':
do ik=1,nkptnr
! generate wave-functions at k
call getevecfv(vklnr(1,ik),vgklnr(:,:,ik),evecfv)
call getevecsv(vklnr(1,ik),evecsv)
call match(ngknr(ik),gkcnr(:,ik),tpgkcnr(:,:,ik),sfacgknr(:,:,ik),apwalm)
call genwfsv(.false.,ngknr(ik),igkignr(:,ik),evalsv(1,1),apwalm,evecfv, &
evecsv,wfmt1,wfir1)
do jk=ik,nkptnr
! generate wave-functions at k'
call getevecfv(vklnr(1,jk),vgklnr(:,:,jk),evecfv)
call getevecsv(vklnr(1,jk),evecsv)
call match(ngknr(jk),gkcnr(:,jk),tpgkcnr(:,:,jk),sfacgknr(:,:,jk),apwalm)
call genwfsv(.false.,ngknr(jk),igkignr(:,jk),evalsv(1,1),apwalm,evecfv, &
evecsv,wfmt2,wfir2)
do i=1,nstsv
do j=1,nstsv
call vnlrho(.true.,wfmt1(:,:,:,:,i),wfmt2(:,:,:,:,j),wfir1(:,:,i), &
wfir2(:,:,j),zrhomt,zrhoir)
znorm1=zfint(zrhomt,zrhoir)
For k=k' I get the expected \delta_{nn'} relation. For k!=k' I should get zeroes for any combination of n,n' but
I get anything in the interval 0.0~0.9 Right now I have only one explanation: the phase exp^{ikr} is not correctly
handled. Any your help or advise is kindly appreciated.
BTW, I'm doing this for the simple BCC Lithium without symmetry.
With best regards,
Anton.
The problem was in mathematics: the integral <psi_{nk}|psi_{n'k'> is evaluated over whole macro-crystal, not over primitive cell. Using Bloch theorem it's easy to show that <psi_{nk}|psi_{n'k'>_{over V} = \sum_{R}exp^{i{k'-k}R}<psi_{nk}|psi_{n'k'>_{over V0} and the orthogonality comes from \sum_{R}exp^{i{k'-k}R}. The integral <psi_{nk}|psi_{n'k'>_{over V0} makes no sense - it's an arbitrary complex number.
Good luck.
Hi Anton,
The second-variational wavefunctions are orthogonal when integrated over the unit cell. I'm not sure why you're not getting delta_ij. Have you made any progress?
Cheers,
Kay.
Hi Kay.
yes, everything is ok with orthonormality. For a given k-point I got \delta_{ij} relation. I didn't check spin-polarized cases (collinear and non-collinear) but I'm pretty sure that they are fine too. As I mentioned before, for k!=k' the orthogonality comes from mathematics.
Best regards,
Anton.