If rel=2 the core charge is calculated with both components of the

solution of the radial Dirac equation.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1642 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
dalcorso 2005-02-11 17:12:27 +00:00
parent aa57f13daa
commit 3ca34d2ad7
1 changed files with 13 additions and 3 deletions

View File

@ -29,13 +29,23 @@ subroutine set_rho_core
rhov(n) = 0.0_dp
rhoc(n) = 0.0_dp
do ns=1,nwf
if (rel==2) then
if (core_state(ns)) then
rhoc(n)=rhoc(n)+oc(ns)*(psi_dir(n,1,ns)**2+psi_dir(n,2,ns)**2)
else
rhov(n)=rhov(n)+oc(ns)*(psi_dir(n,1,ns)**2+psi_dir(n,2,ns)**2)
endif
else
if (core_state(ns)) then
rhoc(n) = rhoc(n) + oc(ns)*psi(n,ns)**2
else
rhov(n) = rhov(n) + oc(ns)*psi(n,ns)**2
endif
endif
enddo
enddo
! totrho = int_0_inf_dr(rhoc,r,r2,dx,mesh,2)
! write(6,'("Integrated core charge",f15.10)') totrho
rhoco(:) = rhoc(1:mesh)
if (lpaw) aeccharge(1:mesh) = rhoc(1:mesh)
!