TABLE OF CONTENTS
ABINIT/gwls_GWanalyticPart [ Modules ]
NAME
gwls_GWanalyticPart
FUNCTION
.
COPYRIGHT
Copyright (C) 2009-2018 ABINIT group (JLJ, BR, MC) This file is distributed under the terms of the GNU General Public License, see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt .
PARENTS
CHILDREN
SOURCE
21 #if defined HAVE_CONFIG_H 22 #include "config.h" 23 #endif 24 25 #include "abi_common.h" 26 27 28 29 module gwls_GWanalyticPart 30 !---------------------------------------------------------------------------------------------------- 31 ! This module contains routines to compute the contribution to the GW correlation energy coming 32 ! from the analytic integral of the trial frequency function. 33 !---------------------------------------------------------------------------------------------------- 34 ! local modules 35 use m_gwls_utility 36 use gwls_wf 37 use gwls_hamiltonian 38 use gwls_lineqsolver 39 use gwls_GWlanczos 40 use gwls_GenerateEpsilon 41 use gwls_LanczosBasis 42 use gwls_model_polarisability 43 use gwls_polarisability 44 !use gwls_ComplementSpacePolarizability 45 use gwls_GWlanczos 46 use gwls_TimingLog 47 48 ! abinit modules 49 use defs_basis 50 use m_profiling_abi 51 52 implicit none 53 save 54 private
m_hamiltonian/get_projection_band_indices [ Functions ]
[ Top ] [ m_hamiltonian ] [ Functions ]
NAME
get_projection_band_indices
FUNCTION
.
INPUTS
OUTPUT
PARENTS
gwls_Projected_AT
CHILDREN
SOURCE
92 subroutine get_projection_band_indices(omega,band_index_below, band_index_above) 93 !---------------------------------------------------------------------------------------------------- 94 ! This subroutine computes the band indices necessary for properly projecting the Sternheimer equations 95 ! where 96 ! Pe : projection on states such that epsilon_n < omega 97 ! Qe : projection on states such that epsilon_n > omega 98 !---------------------------------------------------------------------------------------------------- 99 100 !This section has been created automatically by the script Abilint (TD). 101 !Do not modify the following lines by hand. 102 #undef ABI_FUNC 103 #define ABI_FUNC 'get_projection_band_indices' 104 !End of the abilint section 105 106 implicit none 107 108 real(dp),intent(in) :: omega 109 integer, intent(out) :: band_index_below, band_index_above 110 111 ! ************************************************************************* 112 113 ! First, find the indices for the projections 114 115 band_index_below = 1 116 ! it is assumed that the eigenvalues are sorted. As soon as the current eigenvalue 117 ! is equal or larger than epsilon_e, exit! 118 do 119 if ( omega - eig(band_index_below) <= 1.0e-8 ) exit 120 band_index_below = band_index_below + 1 121 122 if (band_index_below > size(eig)) then 123 124 write(std_out,*) '************************************************************' 125 write(std_out,*) '*** ERROR IN ROUTINE get_projection_band_indices ***' 126 write(std_out,*) '*** ***' 127 write(std_out,*) '*** The index of the DFT eigenvalue larger than ***' 128 write(std_out,*) '*** the target frequency is larger than the number ***' 129 write(std_out,*) '*** of explicitly calculated DFT eigenvalues. ***' 130 write(std_out,*) '*** The computation cannot go on to produce a ***' 131 write(std_out,*) '*** meaningful result: review your input! ***' 132 write(std_out,*) '*** ***' 133 write(std_out,*) '*** program stops. ***' 134 write(std_out,*) '************************************************************' 135 stop 136 end if 137 end do 138 ! We have overshooted in order to exit the do loop , so decrement by 1 139 band_index_below = band_index_below - 1 140 141 ! band_index_below is now the index of the highest eigenvalue BELOW omega 142 ! NOTE THAT band_index_below = 0 if omega is smaller than all eigenvalues! 143 ! A test should be performed on the indices obtained from this routine 144 145 band_index_above = band_index_below+1 146 do 147 if ( eig(band_index_above)-omega > 1.0e-8 ) exit 148 band_index_above = band_index_above + 1 149 end do 150 ! band_index_above is now the index of the lowest eigenvalue ABOVE eig(e) 151 band_index_above = band_index_above - 1 152 ! band_index_above is now the highest index with eigenvalue equal to eig(e). 153 ! This is the correct index to remove the states with energy <= eig(e) 154 155 end subroutine get_projection_band_indices