The Elk Code
 
Loading...
Searching...
No Matches
writeftm.f90
Go to the documentation of this file.
1
2! Copyright (C) 2014 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine writeftm
7use modmain
8use moddftu
9implicit none
10! local variables
11integer is,ia,ias,i
12integer l,k,p,r,t
13real(8) t0
14! automatic arrays
15real(8) wkpr(-lmmaxdm:lmmaxdm)
16! open FTM.OUT
17open(50,file='FTM.OUT',form='FORMATTED',action='WRITE')
18do i=1,ntmfix
19 is=itmfix(1,i)
20 ia=itmfix(2,i)
21 ias=idxas(ia,is)
22 l=itmfix(3,i)
23 k=itmfix(4,i)
24 p=itmfix(5,i)
25 r=itmfix(6,i)
26 t=itmfix(7,i)
27 write(50,*)
28 write(50,'("Species : ",I4," (",A,"), atom : ",I4)') is,trim(spsymb(is)),ia
29 write(50,'(" l = ",I2)') l
30! scale factor for conventional normalisation
31 t0=sqrt(dble((2*l+1)*nspinor))
32 write(50,'(" k = ",I2,", p = ",I2,", r = ",I2,", t = ",I2)') k,p,r,t
33! decompose density matrix in 3-index tensor moment components
34 call dmtotm3(l,k,p,r,lmmaxdm,dmatmt(:,:,:,:,ias),wkpr)
35 write(50,'(" tensor moment")')
36 write(50,'(" current : ",G18.10)') t0*wkpr(t)
37 write(50,'(" target : ",G18.10)') wkprfix(i)
38end do
39close(50)
40end subroutine
41
subroutine dmtotm3(l, k, p, r, ld, dm, wkpr)
Definition dmtotm3.f90:10
real(8), dimension(:), allocatable wkprfix
Definition moddftu.f90:78
integer, dimension(:,:), allocatable itmfix
Definition moddftu.f90:76
complex(8), dimension(:,:,:,:,:), allocatable dmatmt
Definition moddftu.f90:16
integer ntmfix
Definition moddftu.f90:72
integer nspinor
Definition modmain.f90:267
integer, dimension(maxatoms, maxspecies) idxas
Definition modmain.f90:42
character(64), dimension(maxspecies) spsymb
Definition modmain.f90:78
subroutine writeftm
Definition writeftm.f90:7