mirror of https://gitlab.com/QEF/q-e.git
modifications to the phonon code that are activated only when
ACFDT is used. All additions are skipped when the acdft_is_active variable is .FALSE. sdg+nnlinh git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@7558 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
b4445aa835
commit
36c758fe95
|
@ -45,6 +45,7 @@ module funct
|
|||
! subroutines/functions managing dft name and indices
|
||||
PUBLIC :: set_dft_from_indices, set_dft_from_name
|
||||
PUBLIC :: enforce_input_dft, write_dft_name, dft_name
|
||||
PUBLIC :: init_dft_exxrpa, enforce_dft_exxrpa
|
||||
PUBLIC :: get_dft_name, get_iexch, get_icorr, get_igcx, get_igcc
|
||||
PUBLIC :: dft_is_gradient, dft_is_meta, dft_is_hybrid, dft_is_vdW
|
||||
|
||||
|
@ -508,6 +509,42 @@ CONTAINS
|
|||
|
||||
return
|
||||
end subroutine enforce_input_dft
|
||||
|
||||
!-----------------------------------------------------------------------
|
||||
subroutine enforce_dft_exxrpa ( )
|
||||
!
|
||||
implicit none
|
||||
!
|
||||
!character(len=*), intent(in) :: dft_
|
||||
!logical, intent(in), optional :: nomsg
|
||||
|
||||
iexch = 0; icorr = 1; igcx = 0; igcc = 0
|
||||
exx_fraction = 1.0_DP
|
||||
ishybrid = ( exx_fraction /= 0.0_DP )
|
||||
|
||||
write (stdout,'(/,5x,a)') "XC functional enforced to be EXXRPA"
|
||||
call write_dft_name
|
||||
write (stdout,'(5x,a)') "!!! Any further DFT definition will be discarded"
|
||||
write (stdout,'(5x,a/)') "!!! Please, verify this is what you really want !"
|
||||
|
||||
return
|
||||
end subroutine enforce_dft_exxrpa
|
||||
|
||||
!-----------------------------------------------------------------------
|
||||
subroutine init_dft_exxrpa ( )
|
||||
!
|
||||
implicit none
|
||||
!
|
||||
exx_fraction = 1.0_DP
|
||||
ishybrid = ( exx_fraction /= 0.0_DP )
|
||||
|
||||
write (stdout,'(/,5x,a)') "Only exx_fraction is set to 1.d0"
|
||||
write (stdout,'(5x,a)') "XC functional still not changed"
|
||||
call write_dft_name
|
||||
|
||||
return
|
||||
end subroutine init_dft_exxrpa
|
||||
|
||||
!-----------------------------------------------------------------------
|
||||
subroutine start_exx
|
||||
if (.not. ishybrid) &
|
||||
|
|
|
@ -15,6 +15,10 @@ MODULE acfdtest
|
|||
SAVE
|
||||
LOGICAL :: acfdt_is_active=.FALSE.
|
||||
LOGICAL :: acfdt_num_der=.FALSE.
|
||||
LOGICAL :: acfdt_term1 = .FALSE.
|
||||
LOGICAL :: acfdt_term2 = .FALSE.
|
||||
LOGICAL :: acfdt_term3 = .FALSE.
|
||||
LOGICAL :: test_oep=.FALSE.
|
||||
INTEGER :: ir_point=0
|
||||
REAL(DP):: delta_vrs=0.0_DP
|
||||
REAL(DP):: f1=1.0_DP
|
||||
|
|
|
@ -38,6 +38,7 @@ SUBROUTINE openfilq()
|
|||
USE mp_global, ONLY : me_pool
|
||||
USE io_global, ONLY : ionode
|
||||
USE ramanm, ONLY: lraman, elop, iuchf, iud2w, iuba2, lrchf, lrd2w, lrba2
|
||||
USE acfdtest, ONLY : acfdt_is_active, acfdt_num_der
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
|
@ -60,7 +61,17 @@ SUBROUTINE openfilq()
|
|||
! written by pw.x. In the other cases those calculated by ph.x
|
||||
!
|
||||
tmp_dir=tmp_dir_phq
|
||||
IF (lgamma.AND.modenum==0) tmp_dir=tmp_dir_save
|
||||
!!!!!!!!!!!!!!!!!!!!!!!! ACFDT TEST !!!!!!!!!!!!!!!!
|
||||
IF (acfdt_is_active) THEN
|
||||
! ACFDT -test always the wfc is read/written from/to file in tmp_dir_phq
|
||||
IF (.not.acfdt_num_der) then
|
||||
IF (lgamma.AND.modenum==0) tmp_dir=tmp_dir_save
|
||||
ENDIF
|
||||
ELSE
|
||||
! this is the standard treatment
|
||||
IF (lgamma.AND.modenum==0) tmp_dir=tmp_dir_save
|
||||
ENDIF
|
||||
!!!!!!!!!!!!!!!!!!!!!!!! END OF ACFDT TEST !!!!!!!!!!!!!!!!
|
||||
iuwfc = 20
|
||||
lrwfc = 2 * nbnd * npwx * npol
|
||||
CALL diropn (iuwfc, 'wfc', lrwfc, exst)
|
||||
|
|
|
@ -58,7 +58,7 @@ SUBROUTINE phq_init()
|
|||
|
||||
USE mp_global, ONLY : intra_pool_comm
|
||||
USE mp, ONLY : mp_sum
|
||||
|
||||
USE acfdtest, ONLY : acfdt_is_active, acfdt_num_der
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
|
@ -191,8 +191,21 @@ SUBROUTINE phq_init()
|
|||
END DO
|
||||
!
|
||||
!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!! ACFDT TEST !!!!!!!!!!!!!!!!
|
||||
IF (acfdt_is_active) THEN
|
||||
! ACFDT -test always read calculated wcf from non_scf calculation
|
||||
IF(acfdt_num_der) then
|
||||
CALL davcio( evq, lrwfc, iuwfc, ikq, -1 )
|
||||
ELSE
|
||||
IF ( .NOT. lgamma ) &
|
||||
CALL davcio( evq, lrwfc, iuwfc, ikq, -1 )
|
||||
ENDIF
|
||||
ELSE
|
||||
! this is the standard treatment
|
||||
IF ( .NOT. lgamma ) &
|
||||
CALL davcio( evq, lrwfc, iuwfc, ikq, -1 )
|
||||
ENDIF
|
||||
!!!!!!!!!!!!!!!!!!!!!!!! END OF ACFDT TEST !!!!!!!!!!!!!!!!
|
||||
!
|
||||
! diagonal elements of the unperturbed Hamiltonian,
|
||||
! needed for preconditioning
|
||||
|
|
|
@ -61,7 +61,7 @@ SUBROUTINE run_pwscf(do_band)
|
|||
!!!!!!!!!!!!!!!!!!!!!!!! ACFDT TEST !!!!!!!!!!!!!!!!
|
||||
IF (acfdt_is_active) THEN
|
||||
! ACFDT mumerical derivative test: modify the potential
|
||||
if (acfdt_num_der) vrs(ir_point,1)=vrs(ir_point,1) + delta_vrs
|
||||
IF (acfdt_num_der) vrs(ir_point,1)=vrs(ir_point,1) + delta_vrs
|
||||
ENDIF
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!END OF ACFDT TEST !!!!!!!!!!!!!!!!
|
||||
!
|
||||
|
|
Loading…
Reference in New Issue