File: writelat.f90

package info (click to toggle)
elkcode 5.4.24-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 12,840 kB
  • sloc: f90: 48,415; fortran: 22,457; perl: 965; makefile: 384; sh: 369; python: 105; ansic: 67
file content (54 lines) | stat: -rw-r--r-- 1,701 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

! Copyright (C) 2006 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
! This file is distributed under the terms of the GNU General Public License.
! See the file COPYING for license details.

subroutine writelat
use modmain
implicit none
open(50,file='LATTICE'//trim(filext),form='FORMATTED')
write(50,*)
write(50,'("+----------------------------+")')
write(50,'("| Real-space lattice vectors |")')
write(50,'("+----------------------------+")')
write(50,*)
write(50,'("vector a1 : ",3G18.10)') avec(:,1)
write(50,'("vector a2 : ",3G18.10)') avec(:,2)
write(50,'("vector a3 : ",3G18.10)') avec(:,3)
write(50,*)
write(50,'("Stored column-wise as a matrix :")')
write(50,'(3G18.10)') avec(1,:)
write(50,'(3G18.10)') avec(2,:)
write(50,'(3G18.10)') avec(3,:)
write(50,*)
write(50,'("Inverse of matrix :")')
write(50,'(3G18.10)') ainv(1,:)
write(50,'(3G18.10)') ainv(2,:)
write(50,'(3G18.10)') ainv(3,:)
write(50,*)
write(50,'("Unit cell volume : ",G18.10)') omega
write(50,*)
write(50,*)
write(50,'("+----------------------------------+")')
write(50,'("| Reciprocal-space lattice vectors |")')
write(50,'("+----------------------------------+")')
write(50,*)
write(50,'("vector b1 : ",3G18.10)') bvec(:,1)
write(50,'("vector b2 : ",3G18.10)') bvec(:,2)
write(50,'("vector b3 : ",3G18.10)') bvec(:,3)
write(50,*)
write(50,'("Stored column-wise as a matrix :")')
write(50,'(3G18.10)') bvec(1,:)
write(50,'(3G18.10)') bvec(2,:)
write(50,'(3G18.10)') bvec(3,:)
write(50,*)
write(50,'("Inverse of matrix :")')
write(50,'(3G18.10)') binv(1,:)
write(50,'(3G18.10)') binv(2,:)
write(50,'(3G18.10)') binv(3,:)
write(50,*)
write(50,'("Brillouin zone volume : ",G18.10)') omegabz
close(50)
return
end subroutine