From cc7fb040a79339f3e9c2258acfabf266f57785ac Mon Sep 17 00:00:00 2001 From: degironc Date: Thu, 19 Aug 2010 13:24:00 +0000 Subject: [PATCH] adding some variables needed for the Adiabatic-Coupling Fluctation-Dissipation Theory part. They should be harmless in all other cases where are not used SdG and nnlinh git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@6993 c92efa57-630b-4861-b058-cf58834340f0 --- Modules/input_parameters.f90 | 7 ++++++- Modules/read_namelists.f90 | 2 ++ PW/input.f90 | 2 +- PW/kpoint_grid.f90 | 11 +++++++++++ PW/pwcom.f90 | 1 + PW/setup.f90 | 6 +++++- 6 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Modules/input_parameters.f90 b/Modules/input_parameters.f90 index 5be9d46ca..cf567ca9f 100644 --- a/Modules/input_parameters.f90 +++ b/Modules/input_parameters.f90 @@ -242,6 +242,10 @@ MODULE input_parameters LOGICAL :: use_wannier = .false. ! use or not Wannier functions + LOGICAL :: lecrpa = .FALSE. + ! if true symmetry in scf run is neglected for RPA Ec calculation + ! + #if defined (__MS2) LOGICAL :: MS2_enabled = .false. ! Enable the shared memory exchange in MS2 CHARACTER(len=256) :: MS2_handler = '' ! Name for the shared memory handler in MS2 @@ -252,7 +256,8 @@ MODULE input_parameters prefix, wfcdir, max_seconds, ekin_conv_thr, etot_conv_thr, & forc_conv_thr, pseudo_dir, disk_io, tefield, dipfield, lberry, & gdir, nppstr, wf_collect, printwfc, lelfield, nberrycyc, refg, & - tefield2, saverho, tabps, lkpoint_dir, use_wannier + tefield2, saverho, tabps, lkpoint_dir, use_wannier, lecrpa + #if defined ( __MS2) NAMELIST / control / MS2_enabled, MS2_handler diff --git a/Modules/read_namelists.f90 b/Modules/read_namelists.f90 index 60b39d1a4..a53efd9d2 100644 --- a/Modules/read_namelists.f90 +++ b/Modules/read_namelists.f90 @@ -105,6 +105,7 @@ MODULE read_namelists_module lelfield = .FALSE. nberrycyc = 1 lkpoint_dir = .TRUE. + lecrpa = .TRUE. ! saverho = .TRUE. ! @@ -696,6 +697,7 @@ MODULE read_namelists_module CALL mp_bcast( lelfield, ionode_id ) CALL mp_bcast( nberrycyc, ionode_id ) CALL mp_bcast( saverho, ionode_id ) + CALL mp_bcast( lecrpa, ionode_id ) ! RETURN ! diff --git a/PW/input.f90 b/PW/input.f90 index 0eb854bd3..50485ac58 100644 --- a/PW/input.f90 +++ b/PW/input.f90 @@ -227,7 +227,7 @@ SUBROUTINE iosys() wfcdir, prefix, etot_conv_thr, forc_conv_thr, & pseudo_dir, disk_io, tefield, dipfield, lberry, & gdir, nppstr, wf_collect,lelfield, efield, & - nberrycyc, lkpoint_dir, efield_cart + nberrycyc, lkpoint_dir, efield_cart, lecrpa #if defined __MS2 USE input_parameters, ONLY : MS2_enabled, MS2_handler #endif diff --git a/PW/kpoint_grid.f90 b/PW/kpoint_grid.f90 index 4476d4950..bd5b41741 100644 --- a/PW/kpoint_grid.f90 +++ b/PW/kpoint_grid.f90 @@ -13,6 +13,7 @@ subroutine kpoint_grid ( nrot, time_reversal, s, t_rev, bg, npk, & ! Automatic generation of a uniform grid of k-points ! USE kinds, only: DP + USE input_parameters, only: lecrpa implicit none ! integer, intent(in):: nrot, npk, k1, k2, k3, nk1, nk2, nk3, & @@ -55,6 +56,9 @@ subroutine kpoint_grid ( nrot, time_reversal, s, t_rev, bg, npk, & equiv(nk)=nk end do + if ( .not.lecrpa ) then + ! + do nk=1,nkr ! check if this k-point has already been found equivalent to another if (equiv(nk) == nk) then @@ -112,6 +116,13 @@ subroutine kpoint_grid ( nrot, time_reversal, s, t_rev, bg, npk, & end do end if end do + ! + else + call infomsg('kpoint_grid', 'ATTENTION: skip check of k-points equivalence') + wkk = 1.d0 + end if + ! + ! count irreducible points and order them diff --git a/PW/pwcom.f90 b/PW/pwcom.f90 index 50c2a0cb0..0aeb582a0 100644 --- a/PW/pwcom.f90 +++ b/PW/pwcom.f90 @@ -124,6 +124,7 @@ MODULE klist REAL(DP) :: & xk(3,npk), &! coordinates of k points wk(npk), &! weight of k points + xqq(3), &! coordinates of q point (used in the ACFDT part) degauss, &! smearing parameter nelec, &! number of electrons nelup=0.0_dp, &! number of spin-up electrons (if two_fermi_energies=t) diff --git a/PW/setup.f90 b/PW/setup.f90 index fc11c11d0..6f9049a76 100644 --- a/PW/setup.f90 +++ b/PW/setup.f90 @@ -75,7 +75,7 @@ SUBROUTINE setup() angle1, angle2, bfield, ux, nspin_lsda, & nspin_gga, nspin_mag USE pw_restart, ONLY : pw_readfile - USE input_parameters, ONLY : restart_mode + USE input_parameters, ONLY : restart_mode, lecrpa #if defined (EXX) USE exx, ONLY : exx_grid_init, exx_div_check #endif @@ -435,6 +435,10 @@ SUBROUTINE setup() ! call set_sym_bl(ibrav, symm_type) ! + ! ... If lecrpa is true, nosym must be set to true also + ! + IF ( lecrpa ) nosym = .TRUE. + ! ! ... If nosym is true do not use any point-group symmetry ! IF ( nosym ) nrot = 1