TABLE OF CONTENTS


ABINIT/m_gwls_valenceWavefunctions [ Modules ]

[ Top ] [ Modules ]

NAME

 m_gwls_valenceWavefunctions

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 module m_gwls_valenceWavefunctions
29 
30 ! local modules
31 use m_gwls_utility
32 use m_gwls_hamiltonian
33 
34 ! abinit modules
35 use defs_basis
36 use m_abicore
37 use m_xmpi
38 implicit none
39 save
40 private

m_hamiltonian/cleanupValenceWavefunctions [ Functions ]

[ Top ] [ m_hamiltonian ] [ Functions ]

NAME

  cleanupValenceWavefunctions

FUNCTION

  .

INPUTS

OUTPUT

PARENTS

      gwls_sternheimer

CHILDREN

SOURCE

154 subroutine cleanupValenceWavefunctions()
155 !--------------------------------------------------------------------------------
156 !
157 ! This subroutine deallocates the array valence_wfr once it is no longer needed.
158 !
159 !--------------------------------------------------------------------------------
160 
161 !This section has been created automatically by the script Abilint (TD).
162 !Do not modify the following lines by hand.
163 #undef ABI_FUNC
164 #define ABI_FUNC 'cleanupValenceWavefunctions'
165 !End of the abilint section
166 
167 implicit none
168 
169 ! *************************************************************************
170 
171 !if (allocated(valence_wfr)) ABI_DEALLOCATE(valence_wfr)
172 !if (allocated(valence_wfr_fftpac)) ABI_DEALLOCATE(valence_wfr_fftpac)
173 
174 end subroutine cleanupValenceWavefunctions

m_hamiltonian/compute_Exchange_and_Correlation_energies [ Functions ]

[ Top ] [ m_hamiltonian ] [ Functions ]

NAME

  compute_Exchange_and_Correlation_energies

FUNCTION

  .

INPUTS

OUTPUT

PARENTS

      gwls_sternheimer

CHILDREN

SOURCE

195 subroutine compute_Exchange_and_Correlation_energies(e_index, exchange_energy, Vxc_energy)
196 
197 !--------------------------------------------------------------------------------
198 !
199 ! This subroutine computes the exchange and correlation energies.
200 !
201 !--------------------------------------------------------------------------------
202 
203 !This section has been created automatically by the script Abilint (TD).
204 !Do not modify the following lines by hand.
205 #undef ABI_FUNC
206 #define ABI_FUNC 'compute_Exchange_and_Correlation_energies'
207 !End of the abilint section
208 
209 implicit none
210 
211 integer, intent(in)    :: e_index
212 real(dp), intent(out)  :: exchange_energy
213 real(dp), intent(out)  :: vxc_energy
214 
215 ! *************************************************************************
216 
217 vxc_energy         = dft_xc_energy(e_index)
218 
219 exchange_energy    = exchange(e_index)
220 
221 end subroutine compute_Exchange_and_Correlation_energies

m_hamiltonian/prepareValenceWavefunctions [ Functions ]

[ Top ] [ m_hamiltonian ] [ Functions ]

NAME

  prepareValenceWavefunctions

FUNCTION

  .

INPUTS

OUTPUT

PARENTS

      gwls_sternheimer

CHILDREN

SOURCE

 72 subroutine prepareValenceWavefunctions()
 73 !--------------------------------------------------------------------------------
 74 !
 75 ! This subroutine allocates and fills an array valence_wfr which will contain
 76 ! the valence wavefunctions in real space. We do this once and for all, instead
 77 ! of constantly performing FFTs throughout the program.
 78 !
 79 ! NOTE: fftpac is not reversible while using MPI!  At first, we tried storing
 80 !       valence wavefunctions in real space using fftpac, but the unpacking routine
 81 !       doesn't return the original (n4,n5,n6) array !
 82 !
 83 !      Valence wavefunctions will be stored in Fourier space instead.
 84 !
 85 !--------------------------------------------------------------------------------
 86 
 87 !This section has been created automatically by the script Abilint (TD).
 88 !Do not modify the following lines by hand.
 89 #undef ABI_FUNC
 90 #define ABI_FUNC 'prepareValenceWavefunctions'
 91 !End of the abilint section
 92 
 93 implicit none
 94 
 95 !integer  :: v, kmin, kmax
 96 !
 97 !
 98 !real(dp), allocatable :: psir(:,:,:,:)
 99 
100 ! *************************************************************************
101 
102 
103 ! Routine is left blank for now
104 
105 
106 ! old code, broken because fftpac isn't invertible !
107 ! ABI_ALLOCATE(valence_wfr_fftpac,(2,nfft,nbandv)) ! nfft is a public variable from the gwls_hamiltonian module
108 
109 ! ABI_ALLOCATE(psir,(2,n4,n5,n6))
110 ! psir = zero
111 ! do v=1,nbandv
112 !        kmin = 1+(v-1)*npw_k
113 !        kmax =    v   *npw_k
114 !
115 !       ! transform from k to r, storing wavefunction in real space in work array psir1
116 !       call g_to_r(psir,cg(:,kmin:kmax))
117 !
118 !       ! pack the real-space wavefunction in the purpose-made array
119 !       call sg_to_dg(valence_wfr_fftpac(:,:,v), psir)
120 ! end do
121 ! ABI_DEALLOCATE(psir)
122 
123 ! old code!
124 !ABI_ALLOCATE(valence_wfr,(2,n4,n5,n6,nbandv))
125 !valence_wfr = zero
126 
127 !do v=1,nbandv
128 !       kmin = 1+(v-1)*npw_k
129 !       kmax =    v   *npw_k
130 !       call g_to_r(valence_wfr(:,:,:,:,v),cg(:,kmin:kmax))
131 !end do
132 
133 end subroutine prepareValenceWavefunctions