Commit 7da6d7eb authored by ccavazzoni's avatar ccavazzoni

- removing redundant code

git-svn-id: c92efa57-630b-4861-b058-cf58834340f0
parent fe2ab9e2
......@@ -37,6 +37,7 @@ SUBROUTINE vol_clu(rho_real,rho_g,s_fac,flag)
USE io_global, ONLY: ionode
USE mp, ONLY: mp_bcast, mp_sum
USE mp_bands, ONLY: intra_bgrp_comm
USE fft_rho
implicit none
......@@ -60,7 +61,7 @@ SUBROUTINE vol_clu(rho_real,rho_g,s_fac,flag)
complex(kind=8) s_fac(ngms,nsp), ci
complex(kind=8) sum_sf, aux, auxx, fact, rho_g(ngm,nspin)
complex(kind=8), allocatable :: psi(:), rhofill(:), rhotmp(:,:)
complex(kind=8), allocatable :: rhofill(:), rhotmp(:,:)
integer ir, ir1, ir2, ir3, is, iss, ia, flag, ierr
integer i, j, k, l, ig, cnt, nmin, nmax, n_at
......@@ -75,7 +76,6 @@ SUBROUTINE vol_clu(rho_real,rho_g,s_fac,flag)
if (abisur) allocate(dxdyrho(dfftp%nnr))
if (abisur) allocate(dxdzrho(dfftp%nnr))
if (abisur) allocate(dydzrho(dfftp%nnr))
call start_clock( 'vol_clu' )
......@@ -245,27 +245,7 @@ SUBROUTINE vol_clu(rho_real,rho_g,s_fac,flag)
if (abisur) &
& call gradrho(nspin,rhotmp,drho,d2rho,dxdyrho,dxdzrho,dydzrho)
psi = (0.d0,0.d0)
if (nspin.eq.1) then
do ig = 1,ngm
psi(nl(ig)) = rhotmp(ig,1)
psi(nlm(ig))= conjg(rhotmp(ig,1))
end do
call invfft('Dense',psi, dfftp )
do ir = 1,dfftp%nnr
rho_gaus(ir) = real(psi(ir))
end do
do ig = 1,ngm
psi(nl(ig)) = rhotmp(ig,1) + ci*rhotmp(ig,2)
psi(nlm(ig))= conjg(rhotmp(ig,1)) + ci*conjg(rhotmp(ig,2))
end do
call invfft('Dense',psi, dfftp )
do ir = 1,dfftp%nnr
rho_gaus(ir) = real(psi(ir))+aimag(psi(ir))
end do
end if
CALL rho_g2r( rhotmp, rho_gaus )
e_j = 0.d0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment