The Elk Code
 
Loading...
Searching...
No Matches
genmcph.f90
Go to the documentation of this file.
1
2! Copyright (C) 2015 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6pure subroutine genmcph(wq,ev,a)
7use modmain
8use modphonon
9implicit none
10! arguments
11real(8), intent(in) :: wq(nbph)
12complex(8), intent(in) :: ev(nbph,nbph)
13complex(8), intent(out) :: a(nbph,nbph)
14! local variables
15integer is,ia,ip,i,j
16real(8) t1
17! generate the matrix for converting between Cartesian and phonon coordinates
18do j=1,nbph
19 i=0
20 do is=1,nspecies
21 t1=2.d0*spmass(is)*wq(j)
22 if (t1 > 1.d-8) then
23 t1=1.d0/sqrt(t1)
24 else
25 t1=0.d0
26 end if
27 do ia=1,natoms(is)
28 do ip=1,3
29 i=i+1
30 a(i,j)=t1*ev(i,j)
31 end do
32 end do
33 end do
34end do
35end subroutine
36
pure subroutine genmcph(wq, ev, a)
Definition genmcph.f90:7
integer, dimension(maxspecies) natoms
Definition modmain.f90:36
integer nspecies
Definition modmain.f90:34
real(8), dimension(maxspecies) spmass
Definition modmain.f90:101
integer nbph
Definition modphonon.f90:13