The Elk Code
writemomqu.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2025 Wenhan Chen, 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 writemomqu
7 use modmain
8 use modulr
9 implicit none
10 ! local variables
11 integer idm,is,ia,ias,iq,ifq
12 open(50,file='MOMENTQU.OUT',form='FORMATTED')
13 do ifq=1,nfqrz
14  iq=iqrzf(ifq)
15  write(50,*)
16  write(50,'("Q-point number : ",I6)') iq
17  write(50,'("Q-point (lattice coordinates) :")')
18  write(50,'(3G18.10)') vql(:,iq)
19  write(50,'("Q-point (Cartesian coordinates) :")')
20  write(50,'(3G18.10)') vqc(:,iq)
21  write(50,'("Moments (complex):")')
22  write(50,'(" interstitial :")')
23  do idm=1,ndmag
24  write(50,'(2G18.10)') momirqu(idm,ifq)
25  end do
26  write(50,'(" muffin-tins")')
27  do is=1,nspecies
28  write(50,'(" species : ",I0," (",A,")")') is,trim(spsymb(is))
29  do ia=1,natoms(is)
30  ias=idxas(ia,is)
31  write(50,'(" atom ",I0," :")') ia
32  do idm=1,ndmag
33  write(50,'(2G18.10)') mommtqu(idm,ias,ifq)
34  end do
35  end do
36  end do
37  write(50,'(" total moment :")')
38  do idm=1,ndmag
39  write(50,'(2G18.10)') momtotqu(idm,ifq)
40  end do
41 end do
42 close(50)
43 end subroutine
44 
complex(8), dimension(:,:,:), allocatable mommtqu
Definition: modulr.f90:63
integer, dimension(maxatoms, maxspecies) idxas
Definition: modmain.f90:42
integer ndmag
Definition: modmain.f90:240
integer, dimension(:), allocatable iqrzf
Definition: modmain.f90:546
real(8), dimension(:,:), allocatable vqc
Definition: modmain.f90:550
real(8), dimension(:,:), allocatable vql
Definition: modmain.f90:548
integer, dimension(maxspecies) natoms
Definition: modmain.f90:36
integer nfqrz
Definition: modmain.f90:542
integer nspecies
Definition: modmain.f90:34
complex(8), dimension(:,:), allocatable momirqu
Definition: modulr.f90:63
Definition: modulr.f90:6
complex(8), dimension(:,:), allocatable momtotqu
Definition: modulr.f90:63
character(64), dimension(maxspecies) spsymb
Definition: modmain.f90:78
subroutine writemomqu
Definition: writemomqu.f90:7