The Elk Code
 
Loading...
Searching...
No Matches
writechg.f90
Go to the documentation of this file.
1
2! Copyright (C) 2002-2006 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3! This file is distributed under the terms of the GNU Lesser General Public
4! License. See the file COPYING for license details.
5
6subroutine writechg(fnum)
7use modmain
8implicit none
9! arguments
10integer, intent(in) :: fnum
11! local variables
12integer is,ia,ias
13! write charges
14write(fnum,*)
15write(fnum,'("Charges :")')
16write(fnum,'(" core",T30,": ",G18.10)') chgcrtot
17write(fnum,'(" valence",T30,": ",G18.10)') chgval
18write(fnum,'(" interstitial",T30,": ",G18.10)') chgir
19write(fnum,'(" muffin-tins (core leakage)")')
20do is=1,nspecies
21 write(fnum,'(" species : ",I4," (",A,")")') is,trim(spsymb(is))
22 do ia=1,natoms(is)
23 ias=idxas(ia,is)
24 write(fnum,'(" atom ",I4,T30,": ",G18.10," (",G18.10,")")') ia, &
25 chgmt(ias),chgcrlk(ias)
26 end do
27end do
28write(fnum,'(" total in muffin-tins",T30,": ",G18.10)') chgmttot
29if (chgexs /= 0.d0) then
30 write(fnum,'(" excess",T30,": ",G18.10)') chgexs
31end if
32write(fnum,'(" total calculated charge",T30,": ",G18.10)') chgcalc
33write(fnum,'(" total charge",T30,": ",G18.10)') chgtot
34write(fnum,'(" error",T30,": ",G18.10)') abs(chgtot-chgcalc)
35flush(fnum)
36end subroutine
37
real(8) chgmttot
Definition modmain.f90:734
real(8), dimension(:), allocatable chgcrlk
Definition modmain.f90:720
real(8) chgcalc
Definition modmain.f90:728
integer, dimension(maxspecies) natoms
Definition modmain.f90:36
integer, dimension(maxatoms, maxspecies) idxas
Definition modmain.f90:42
real(8) chgcrtot
Definition modmain.f90:718
real(8) chgval
Definition modmain.f90:722
real(8) chgtot
Definition modmain.f90:726
character(64), dimension(maxspecies) spsymb
Definition modmain.f90:78
real(8), dimension(:), allocatable chgmt
Definition modmain.f90:732
real(8) chgexs
Definition modmain.f90:724
real(8) chgir
Definition modmain.f90:730
integer nspecies
Definition modmain.f90:34
subroutine writechg(fnum)
Definition writechg.f90:7