The Elk Code
writetm.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2009 F. Bultmark, F. Cricchio and L. Nordstrom.
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 writetm
7 use modmain
8 use moddftu
9 implicit none
10 if (dftu == 0) then
11  write(*,*)
12  write(*,'("Error(writetmdu): dftu = 0")')
13  write(*,*)
14  stop
15 end if
16 ! initialize universal variables
17 call init0
18 call init1
19 ! read the potential from file
20 call readstate
21 ! read density matrix from file DMATMT.OUT
22 call readdmatmt
23 ! generate the DFT+U muffin-tin potential matrices
24 call genvmatmt
25 ! write tensor moments to TENSMOM.OUT file
26 call writetm3
27 write(*,*)
28 write(*,'("Info(writetm): tensor moment decomposition of density matrix")')
29 write(*,'(" in the spherical basis written to TENSMOM.OUT")')
30 end subroutine
31 
subroutine writetm3
Definition: writetm3.f90:10
subroutine writetm
Definition: writetm.f90:7
subroutine init1
Definition: init1.f90:10
integer dftu
Definition: moddftu.f90:32
subroutine readstate
Definition: readstate.f90:10
subroutine init0
Definition: init0.f90:10
subroutine genvmatmt
Definition: genvmatmt.f90:10
subroutine readdmatmt
Definition: readdmatmt.f90:7