The Elk Code
writemom.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 
6 subroutine writemom(fnum)
7 use modmain
8 implicit none
9 ! arguments
10 integer, intent(in) :: fnum
11 ! local variables
12 integer is,ia,ias
13 write(fnum,*)
14 write(fnum,'("Moments :")')
15 write(fnum,'(" interstitial",T30,": ",3G18.10)') momir(1:ndmag)
16 write(fnum,'(" muffin-tins")')
17 do is=1,nspecies
18  write(fnum,'(" species : ",I4," (",A,")")') is,trim(spsymb(is))
19  do ia=1,natoms(is)
20  ias=idxas(ia,is)
21  write(fnum,'(" atom ",I4,T30,": ",3G18.10)') ia,mommt(1:ndmag,ias)
22  end do
23 end do
24 write(fnum,'(" total in muffin-tins",T30,": ",3G18.10)') mommttot(1:ndmag)
25 write(fnum,'(" total moment",T30,": ",3G18.10)') momtot(1:ndmag)
26 flush(fnum)
27 end subroutine
28 
real(8), dimension(:,:), allocatable mommt
Definition: modmain.f90:744
real(8), dimension(3) momtot
Definition: modmain.f90:738
integer, dimension(maxatoms, maxspecies) idxas
Definition: modmain.f90:42
integer ndmag
Definition: modmain.f90:238
real(8), dimension(3) mommttot
Definition: modmain.f90:746
real(8), dimension(3) momir
Definition: modmain.f90:742
integer, dimension(maxspecies) natoms
Definition: modmain.f90:36
integer nspecies
Definition: modmain.f90:34
subroutine writemom(fnum)
Definition: writemom.f90:7
character(64), dimension(maxspecies) spsymb
Definition: modmain.f90:78