The Elk Code
 
Loading...
Searching...
No Matches
readdyn.f90
Go to the documentation of this file.
1
2! Copyright (C) 2002-2005 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine readdyn
7use modmain
8use modphonon
9implicit none
10! local variables
11logical exist
12integer iq,is,js,ia,ja
13integer ip,jp,i,j
14real(8) a,b
15character(256) fext
16do iq=1,nqpt
17 i=0
18 do is=1,nspecies
19 do ia=1,natoms(is)
20 do ip=1,3
21 i=i+1
22 call dynfext(iq,is,ia,ip,fext)
23 inquire(file='DYN'//trim(fext),exist=exist)
24 if (.not.exist) then
25 write(*,*)
26 write(*,'("Error(readdyn): file not found :")')
27 write(*,'(A)') ' DYN'//trim(fext)
28 write(*,*)
29 stop
30 end if
31 open(50,file='DYN'//trim(fext),status='OLD',form='FORMATTED')
32 j=0
33 do js=1,nspecies
34 do ja=1,natoms(js)
35 do jp=1,3
36 j=j+1
37 read(50,*) a,b
38 dynq(i,j,iq)=cmplx(a,b,8)
39 end do
40 end do
41 end do
42 close(50)
43 end do
44! end loops over atoms and species
45 end do
46 end do
47! symmetrise the dynamical matrix
48 call dynsym(vql(:,iq),dynq(:,:,iq))
49! end loop over q-vectors
50end do
51end subroutine
52
subroutine dynfext(iq, is, ia, ip, fext)
Definition dynfext.f90:7
subroutine dynsym(vpl, dq)
Definition dynsym.f90:7
integer, dimension(maxspecies) natoms
Definition modmain.f90:36
integer nqpt
Definition modmain.f90:525
real(8), dimension(:,:), allocatable vql
Definition modmain.f90:545
integer nspecies
Definition modmain.f90:34
complex(8), dimension(:,:,:), allocatable dynq
Definition modphonon.f90:27
subroutine readdyn
Definition readdyn.f90:7