The Elk Code
 
Loading...
Searching...
No Matches
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
6subroutine writeaxsf
7use modmain
8use modtddft
9implicit none
10! local variables
11integer is,ia
12! write header at first time step
13if (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)
22end if
23open(50,file='crystal.axsf',form='FORMATTED',position='APPEND')
24write(50,*)
25write(50,'("PRIMCOORD ",I8)') (itimes-1)/ntsforce+1
26write(50,'(2I8)') natmtot,1
27do 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
31end do
32close(50)
33end subroutine
34
real(8), dimension(3, maxatoms, maxspecies) atposc
Definition modmain.f90:54
integer, dimension(maxspecies) natoms
Definition modmain.f90:36
real(8), parameter br_ang
Definition modmain.f90:1268
real(8), dimension(3, 3) avec
Definition modmain.f90:12
integer natmtot
Definition modmain.f90:40
character(64), dimension(maxspecies) spsymb
Definition modmain.f90:78
integer nspecies
Definition modmain.f90:34
integer ntsforce
Definition modtddft.f90:98
integer itimes
Definition modtddft.f90:46
integer ntimes
Definition modtddft.f90:42
subroutine writeaxsf
Definition writeaxsf.f90:7