The Elk Code
writeaxsf.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2023 J. K. Dewhurst and S. Sharma.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
5 
6 subroutine writeaxsf
7 use modmain
8 use modtddft
9 implicit none
10 ! local variables
11 integer is,ia
12 ! write header at first time step
13 if (itimes <= 1) then
14  open(50,file='crystal.axsf',form='FORMATTED')
15  write(50,'("ANIMSTEPS ",I8)') (ntimes-2)/ntsforce+1
16  write(50,'("CRYSTAL")')
17  write(50,'("PRIMVEC")')
18  write(50,'(3G18.10)') avec(:,1)*br_ang
19  write(50,'(3G18.10)') avec(:,2)*br_ang
20  write(50,'(3G18.10)') avec(:,3)*br_ang
21  close(50)
22 end if
23 open(50,file='crystal.axsf',form='FORMATTED',position='APPEND')
24 write(50,*)
25 write(50,'("PRIMCOORD ",I8)') (itimes-1)/ntsforce+1
26 write(50,'(2I8)') natmtot,1
27 do is=1,nspecies
28  do ia=1,natoms(is)
29  write(50,'(A,3G18.10)') trim(spsymb(is)),atposc(:,ia,is)*br_ang
30  end do
31 end do
32 close(50)
33 end subroutine
34 
integer ntimes
Definition: modtddft.f90:42
real(8), dimension(3, 3) avec
Definition: modmain.f90:12
integer ntsforce
Definition: modtddft.f90:98
integer, dimension(maxspecies) natoms
Definition: modmain.f90:36
real(8), parameter br_ang
Definition: modmain.f90:1269
integer itimes
Definition: modtddft.f90:46
integer nspecies
Definition: modmain.f90:34
integer natmtot
Definition: modmain.f90:40
subroutine writeaxsf
Definition: writeaxsf.f90:7
real(8), dimension(3, maxatoms, maxspecies) atposc
Definition: modmain.f90:54
character(64), dimension(maxspecies) spsymb
Definition: modmain.f90:78