The Elk Code
 
Loading...
Searching...
No Matches
writephn.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 writephn
7use modmain
8use modphonon
9implicit none
10! local variables
11integer iq,i,j,is,ia,ip
12! allocatable arrays
13real(8), allocatable :: wq(:)
14complex(8), allocatable :: dq(:,:),ev(:,:)
15! initialise universal variables
16call init0
17call init2
18call initph
19allocate(wq(nbph),dq(nbph,nbph),ev(nbph,nbph))
20open(50,file='PHONON.OUT',form='FORMATTED')
21do iq=1,nphwrt
22 call dynrtoq(vqlwrt(:,iq),dynr,dq)
23 call dynev(dq,wq,ev)
24 write(50,*)
25 write(50,'(I6,3G18.10," : q-point, vqlwrt")') iq,vqlwrt(:,iq)
26 do j=1,nbph
27 write(50,*)
28 write(50,'(I6,G18.10," : mode, frequency")') j,wq(j)
29 i=0
30 do is=1,nspecies
31 do ia=1,natoms(is)
32 do ip=1,3
33 i=i+1
34 if (i == 1) then
35 write(50,'(3I4,2G18.10," : species, atom, polarisation, &
36 &eigenvector")') is,ia,ip,ev(i,j)
37 else
38 write(50,'(3I4,2G18.10)') is,ia,ip,ev(i,j)
39 end if
40 end do
41 end do
42 end do
43 end do
44 write(50,*)
45end do
46close(50)
47write(*,*)
48write(*,'("Info(writephn): phonon frequencies and eigenvectors written to &
49 &PHONON.OUT")')
50write(*,'(" for all q-vectors in the phwrite list")')
51deallocate(wq,dq,ev)
52end subroutine
53
subroutine dynev(dq, wq, ev)
Definition dynev.f90:7
subroutine dynrtoq(vpl, dr, dq)
Definition dynrtoq.f90:7
subroutine init0
Definition init0.f90:10
subroutine init2
Definition init2.f90:7
subroutine initph
Definition initph.f90:7
integer, dimension(maxspecies) natoms
Definition modmain.f90:36
integer nspecies
Definition modmain.f90:34
integer nbph
Definition modphonon.f90:13
real(8), dimension(:,:,:), allocatable dynr
Definition modphonon.f90:29
real(8), dimension(:,:), allocatable vqlwrt
Definition modphonon.f90:21
integer nphwrt
Definition modphonon.f90:19
subroutine writephn
Definition writephn.f90:7