The Elk Code
 
Loading...
Searching...
No Matches
initph.f90
Go to the documentation of this file.
1
2! Copyright (C) 2024 J. K. Dewhurst and S. Sharma.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine initph
7use modmain
8use modphonon
9implicit none
10! allocate global arrays
11if (allocated(dynq)) deallocate(dynq)
12allocate(dynq(nbph,nbph,nqpt))
13if (allocated(dynr)) deallocate(dynr)
14allocate(dynr(nbph,nbph,nqptnr))
15if (allocated(wphq)) deallocate(wphq)
16allocate(wphq(nbph,nqpt))
17! read in the dynamical matrices
18call readdyn
19! apply the acoustic sum rule
20call sumrule
21! if the non-analytic term is required then read in the Born effective charge
22! tensor for each atom as well as the static dielectric tensor
23if (allocated(bec)) deallocate(bec)
24if (tphnat) then
25 allocate(bec(3,3,natmtot))
26 call readbec
27 call readepsw0
28end if
29! Fourier transform the dynamical matrices to real-space
30call dynqtor(dynq,dynr)
31end subroutine
32
subroutine dynqtor(dq, dr)
Definition dynqtor.f90:7
subroutine initph
Definition initph.f90:7
integer nqptnr
Definition modmain.f90:527
integer nqpt
Definition modmain.f90:525
integer natmtot
Definition modmain.f90:40
integer nbph
Definition modphonon.f90:13
real(8), dimension(:,:,:), allocatable dynr
Definition modphonon.f90:29
complex(8), dimension(:,:,:), allocatable dynq
Definition modphonon.f90:27
logical tphnat
Definition modphonon.f90:34
real(8), dimension(:,:), allocatable wphq
Definition modphonon.f90:31
real(8), dimension(:,:,:), allocatable bec
Definition modphonon.f90:36
subroutine readbec
Definition readbec.f90:7
subroutine readdyn
Definition readdyn.f90:7
subroutine readepsw0
Definition readepsw0.f90:7
subroutine sumrule
Definition sumrule.f90:10