The Elk Code
 
Loading...
Searching...
No Matches
writelat.f90
Go to the documentation of this file.
1
2! Copyright (C) 2006 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 writelat
7use modmain
8implicit none
9open(50,file='LATTICE'//trim(filext),form='FORMATTED',action='WRITE')
10call writebox(50,"Real-space lattice vectors")
11write(50,*)
12write(50,'("vector a1 : ",3G18.10)') avec(:,1)
13write(50,'("vector a2 : ",3G18.10)') avec(:,2)
14write(50,'("vector a3 : ",3G18.10)') avec(:,3)
15write(50,*)
16write(50,'("Stored column-wise as a matrix :")')
17write(50,'(3G18.10)') avec(1,:)
18write(50,'(3G18.10)') avec(2,:)
19write(50,'(3G18.10)') avec(3,:)
20write(50,*)
21write(50,'("Inverse of matrix :")')
22write(50,'(3G18.10)') ainv(1,:)
23write(50,'(3G18.10)') ainv(2,:)
24write(50,'(3G18.10)') ainv(3,:)
25write(50,*)
26write(50,'("Unit cell volume : ",G18.10)') omega
27write(50,*)
28call writebox(50,"Reciprocal-space lattice vectors")
29write(50,*)
30write(50,'("vector b1 : ",3G18.10)') bvec(:,1)
31write(50,'("vector b2 : ",3G18.10)') bvec(:,2)
32write(50,'("vector b3 : ",3G18.10)') bvec(:,3)
33write(50,*)
34write(50,'("Stored column-wise as a matrix :")')
35write(50,'(3G18.10)') bvec(1,:)
36write(50,'(3G18.10)') bvec(2,:)
37write(50,'(3G18.10)') bvec(3,:)
38write(50,*)
39write(50,'("Inverse of matrix :")')
40write(50,'(3G18.10)') binv(1,:)
41write(50,'(3G18.10)') binv(2,:)
42write(50,'(3G18.10)') binv(3,:)
43write(50,*)
44write(50,'("Brillouin zone volume : ",G18.10)') omegabz
45close(50)
46end subroutine
47
character(256) filext
Definition modmain.f90:1300
real(8), dimension(3, 3) bvec
Definition modmain.f90:16
real(8) omega
Definition modmain.f90:20
real(8), dimension(3, 3) binv
Definition modmain.f90:18
real(8), dimension(3, 3) avec
Definition modmain.f90:12
real(8) omegabz
Definition modmain.f90:22
real(8), dimension(3, 3) ainv
Definition modmain.f90:14
subroutine writebox(fnum, str)
Definition writebox.f90:7
subroutine writelat
Definition writelat.f90:7