[DFTB-Plus-User] consistency check for "makeDensityMatrix"
Sharma SRK Chaitanya Yamijala
sharmajncasr at gmail.com
Thu Nov 30 17:46:06 CET 2017
Dear DFTB+ developers,
I am using the output of "makeDensityMatrix" subroutine from a nonSCC
calculation (on Benzene) for testing our lab code on PLDM.
As
\rho_{\mu \nu} = \sum_{i}^{Occ} n_{i} c_{\mu i}c_{\nu i} \\
and
\langle \Phi_{i}| \Phi_{i}\rangle = \sum_{\mu \nu}^{nAOs} c_{\mu i}c_{\nu
i} S_{\mu \nu} = 1 ~ \forall ~ i\\
I was expecting that sum over (rho(mu,nu) * S(mu,nu)) will give me the
summation over the fillings of all occupied orbitals (as given by the below
equation).
\sum_{\mu \nu}^{nAOs} \rho_{\mu \nu} S_{\mu \nu} = \sum_{\mu \nu}
\sum_{i}^{Occ} n_{i} c_{\mu i}c_{\nu i} S_{\mu \nu} = \sum_{i}^{Occ} n_{i}
\left(\sum_{\mu \nu} c_{\mu i}c_{\nu i} S_{\mu \nu} \right) =
\sum_{i}^{Occ} n_{i}
If the above equation is right, then for the case of benzene and for
the nonSCC calculation this should give me 30 as the answer (15 occupied
levels and with an occupation number of 2 for each). With the minimum
modifications to the DFTB+ code, I was not able to get this answer.
*The minimal modifications I did were below:*
Before the scc loop, I saved the overlap matrix and I have used this and
the output of "makeDensityMatrix" routine
if (tCheck) then
call unpackHS(overlapReal, over, neighborList%iNeighbor, nNeighbor,&
& iAtomStart, iPair, img2CentCell)
call blockSymmetrizeHS(overlapReal, iAtomStart)
currentOverlap = overlapReal
end if
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! SCC-loop
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
....
....
if (tDensON2) then
call makeDensityMatrix(SSqrReal, HSqrReal(:,:,iSpin2),
filling(:,1,iSpin),&
& neighborlist%iNeighbor, nNeighbor, orb, iAtomStart,
img2CentCell)
else
call makeDensityMatrix(SSqrReal, HSqrReal(:,:,iSpin2),
filling(:,1,iSpin))
!********************************************************************
sumFilling=0.0d0
do iSurf=1,sqrHamSize
sumFilling=sumFilling+SSqrReal(iSurf,iSurf)*currentOverlap(iSurf,iSurf)
end do
do iSurf=1,sqrHamSize-1
do jSurf=iSurf+1,sqrHamSize
sumFilling=sumFilling+2.0d0*SSqrReal(iSurf,jSurf)*currentOverlap(iSurf,jSurf)
end do
end do
write(*,*)"sumFilling",sumFilling
!********************************************************************
end if
I believe I am doing something wrong (either in the code or in the
equation) and any advice on your end is highly appreciated.
Thanking you,
Sincerely,
Sharma.
P.S.: You can use https://www.codecogs.com/latex/eqneditor.php to visualize
the above equations (by copying and pasting them)
--------------------------------------------------------------------
Sharma
http://www.chem.rochester.edu/groups/huo/people/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.zfn.uni-bremen.de/pipermail/dftb-plus-user/attachments/20171130/d3025371/attachment.htm>
More information about the DFTB-Plus-User
mailing list