Commit 7106e6ca authored by dceresoli's avatar dceresoli

Reduced Density Gradient (RDG) as plot_num 9.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@8555 c92efa57-630b-4861-b058-cf58834340f0
parent 1df7efda
......@@ -81,7 +81,9 @@ input_description -distribution {Quantum Espresso} -package PWscf -program pp.x
8 = electron localization function (ELF)
9 = no longer in use
9 = Reduced density gradient (J. Chem. Theory Comput. 7, 625 (2011))
Set the isosurface between 0.3 and 0.6 to plot the non-covalent
interactions
10 = integrated local density of states (ILDOS)
from emin to emax (emin, emax in eV)
......
......@@ -183,6 +183,7 @@ Quantities that can be read or calculated are:
STM images\\
selected squared wavefunction\\
ELF (electron localization function)\\
RDG (reduced density gradient)\\
planar averages\\
integrated local density of states
\end{quote}
......
......@@ -180,3 +180,53 @@ SUBROUTINE do_elf (elf)
DEALLOCATE (aux, aux2, tbos, kkin)
RETURN
END SUBROUTINE do_elf
!-----------------------------------------------------------------------
SUBROUTINE do_rdg (rdg)
!-----------------------------------------------------------------------
!
! reduced density gradient
! rdg(r) = (1/2) (1/(3*pi**2))**(1/3) * |\nabla rho(r)|/rho(r)**(4/3)
!
USE kinds, ONLY: DP
USE constants, ONLY: pi
USE cell_base, ONLY: omega, tpiba, tpiba2
USE fft_base, ONLY: dfftp
USE scf, ONLY: rho
USE gvect, ONLY: g, ngm, nl
USE lsda_mod, ONLY: nspin
IMPLICIT NONE
real(dp), intent(out) :: rdg (dfftp%nnr)
real(dp), allocatable :: grho(:,:)
real(dp), parameter :: fac = (1.d0/2.d0) * 1.d0/(3.d0*pi**2)**(1.d0/3.d0)
real(dp), parameter :: rho_cut = 0.05d0
integer :: is, i
! gradient of rho
allocate( grho(3,dfftp%nnr) )
! put the total (up+down) charge density in rho%of_r(*,1)
do is = 2, nspin
rho%of_g(:,1) = rho%of_g(:,1) + rho%of_g(:,is)
rho%of_r(:,1) = rho%of_r(:,1) + rho%of_r(:,is)
enddo
! gradient of rho
call gradrho(dfftp%nnr, rho%of_g(1,1), ngm, g, nl, grho)
! calculate rdg
do i = 1, dfftp%nnr
if (rho%of_r(i,1) > rho_cut) then
rdg(i) = fac * 100.d0 / abs(rho%of_r(i,1))**(4.d0/3.d0)
else
rdg(i) = fac * sqrt(grho(1,i)**2 + grho(2,i)**2 + grho(3,i)**2) / abs(rho%of_r(i,1))**(4.d0/3.d0)
endif
enddo
deallocate( grho )
return
END SUBROUTINE do_rdg
......@@ -173,7 +173,8 @@ SUBROUTINE punch_plot (filplot, plot_num, sample_bias, z, dz, &
ELSEIF (plot_num == 9) THEN
CALL errore('punch_plot','no longer implemented, see PP/plan_avg.f90',1)
IF (noncolin) CALL errore('punch_plot','rdg+noncolin not yet implemented',1)
CALL do_rdg (raux) ! in elf.f90
ELSEIF (plot_num == 10) THEN
......
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