The Elk Code
 
Loading...
Searching...
No Matches
writetdforces.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 writetdforces
7use modmain
8use modtddft
9implicit none
10! local variables
11integer is,ia,ias
12! write the total force on each atom
13open(50,file='FORCETOT_TD.OUT',form='FORMATTED',position='APPEND')
14write(50,'(I8,G18.10)') itimes,times(itimes)
15do is=1,nspecies
16 do ia=1,natoms(is)
17 ias=idxas(ia,is)
18 write(50,'(2I4,3G18.10)') is,ia,forcetot(1:3,ias)
19 end do
20end do
21close(50)
22! write the maximum force magnitude over all atoms
23open(50,file='FORCEMAX_TD.OUT',form='FORMATTED',position='APPEND')
24write(50,'(2G18.10)') times(itimes),forcemax
25close(50)
26end subroutine
27
real(8) forcemax
Definition modmain.f90:994
integer, dimension(maxspecies) natoms
Definition modmain.f90:36
integer, dimension(maxatoms, maxspecies) idxas
Definition modmain.f90:42
real(8), dimension(:,:), allocatable forcetot
Definition modmain.f90:990
integer nspecies
Definition modmain.f90:34
real(8), dimension(:), allocatable times
Definition modtddft.f90:48
integer itimes
Definition modtddft.f90:46
subroutine writetdforces