Commit a82139b0 authored by timrov's avatar timrov

Minor changes


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/[email protected] c92efa57-630b-4861-b058-cf58834340f0
parent d83e3039
!
! Copyright (C) 2007 Quantum ESPRESSO group
! Copyright (C) 2001-2016 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
......@@ -44,6 +44,7 @@ SUBROUTINE compute_vsgga( rhoout, grho, vsgga )
!
!
IF ( .NOT. dft_is_gradient() ) RETURN
IF ( .NOT. (noncolin.and.domag) ) &
call errore('compute_vsgga','routine called in the wrong case',1)
......
......@@ -8,28 +8,27 @@
!-----------------------------------------------------------------------
subroutine setup_dgc
!-----------------------------------------------------------------------
!
! Allocate and setup all variable needed in the gradient correction case
!
! GGA+LSDA is allowed. ADC (September 1999).
! GGA+LSDA+NLCC is allowed. ADC (November 1999).
! GGA+noncollinear+NLCC is allowed. ADC (June 2007).
! GGA+LSDA is allowed. ADC (September 1999).
! GGA+LSDA+NLCC is allowed. ADC (November 1999).
! GGA+noncollinear+NLCC is allowed. ADC (June 2007).
!
USE constants,ONLY : e2
USE fft_base, ONLY : dfftp
USE fft_interfaces, ONLY: fwfft
USE gvect, ONLY : ngm, g, nl
USE spin_orb, ONLY : domag
USE scf, ONLY : rho, rho_core, rhog_core
USE noncollin_module, ONLY : noncolin, ux, nspin_gga, nspin_mag
USE constants, ONLY : e2
USE fft_base, ONLY : dfftp
USE fft_interfaces, ONLY : fwfft
USE gvect, ONLY : ngm, g, nl
USE spin_orb, ONLY : domag
USE scf, ONLY : rho, rho_core, rhog_core
USE noncollin_module, ONLY : noncolin, ux, nspin_gga, nspin_mag
USE wavefunctions_module, ONLY : psic
USE kinds, only : DP
use funct, only : dft_is_gradient, gcxc, gcx_spin, gcc_spin, dgcxc, &
dgcxc_spin
USE uspp, ONLY : nlcc_any
USE gc_lr, ONLY : grho, gmag, dvxc_rr, dvxc_sr, dvxc_ss, dvxc_s, &
vsgga, segni
USE kinds, ONLY : DP
USE funct, ONLY : dft_is_gradient, gcxc, gcx_spin, &
gcc_spin, dgcxc, dgcxc_spin
USE uspp, ONLY : nlcc_any
USE gc_lr, ONLY : grho, gmag, dvxc_rr, dvxc_sr, &
dvxc_ss, dvxc_s, vsgga, segni
implicit none
integer :: k, is, ipol, jpol, ir
......@@ -42,7 +41,8 @@ subroutine setup_dgc
real(DP), allocatable :: rhoout(:,:)
real (DP), parameter :: epsr = 1.0d-6, epsg = 1.0d-10
if ( .not. dft_is_gradient() ) return
IF ( .NOT. dft_is_gradient() ) RETURN
IF (noncolin.AND.domag) THEN
allocate (segni (dfftp%nnr))
allocate (vsgga (dfftp%nnr))
......@@ -170,5 +170,6 @@ subroutine setup_dgc
DEALLOCATE(rhoout)
return
RETURN
end subroutine setup_dgc
......@@ -53,9 +53,7 @@ SUBROUTINE lr_dv_setup
! 1) Set the nonlinear core correction stuff
!
nlcc_any = ANY ( upf(1:ntyp)%nlcc )
!do nt = 1, ntyp
! nlcc_any = nlcc_any.or.nlcc (nt)
!enddo
!
IF (nlcc_any) ALLOCATE(drc( ngm, ntyp))
!
! 2) Computes the derivative of the XC potential
......@@ -114,7 +112,7 @@ SUBROUTINE lr_dv_setup
psic(:) = (0.0_dp, 0.0_dp)
ENDIF
!
CALL setup_dgc
CALL setup_dgc()
!
IF (ALLOCATED(psic)) DEALLOCATE(psic)
!
......
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