The Elk Code
potuplot.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2019 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 
6 subroutine potuplot
7 use modmain
8 use modulr
9 implicit none
10 ! local variables
11 integer ifq,ias,is
12 ! initialise universal variables
13 call init0
14 call init1
15 ! initialise the ultra long-range variables
16 call initulr
17 ! read in the Kohn-Sham potential from STATE_ULR.OUT
18 call readstulr
19 ! convert potential to spherical harmonics
20 do ifq=1,nfqrz
21  do ias=1,natmtot
22  is=idxis(ias)
23  call zfshtip(nrcmt(is),nrcmti(is),vsqmt(:,ias,ifq))
24  end do
25 end do
26 ! write the density plot to file
27 select case(task)
28 case(741)
29  open(50,file='VSU1D.OUT',form='FORMATTED')
30  open(51,file='VSULINES.OUT',form='FORMATTED')
31  call plotu1d(50,51,1,vsqmt,vsqir)
32  close(50)
33  close(51)
34  write(*,*)
35  write(*,'("Info(potuplot):")')
36  write(*,'(" 1D ultra long-range Kohn-Sham potential plot written to &
37  &VSU1D.OUT")')
38  write(*,'(" vertex location lines written to VSULINES.OUT")')
39 case(742)
40  open(50,file='VSU2D.OUT',form='FORMATTED')
41  call plotu2d(.false.,50,1,vsqmt,vsqir)
42  open(50)
43  write(*,*)
44  write(*,'("Info(potuplot):")')
45  write(*,'(" 2D ultra long-range Kohn-Sham potential plot written to &
46  &VSU2D.OUT")')
47 case(743)
48  open(50,file='VSU3D.OUT',form='FORMATTED')
49  call plotu3d(50,1,vsqmt,vsqir)
50  close(50)
51  write(*,*)
52  write(*,'("Info(potuplot):")')
53  write(*,'(" 3D ultra long-range Kohn-Sham potential plot written to &
54  &VSU3D.OUT")')
55 end select
56 end subroutine
57 
subroutine readstulr
Definition: readstulr.f90:7
complex(8), dimension(:,:,:), pointer, contiguous vsqmt
Definition: modulr.f90:82
subroutine plotu2d(tproj, fnum, nf, zfmt, zfir)
Definition: plotu2d.f90:7
integer task
Definition: modmain.f90:1297
complex(8), dimension(:,:), pointer, contiguous vsqir
Definition: modulr.f90:82
subroutine zfshtip(nr, nri, zfmt)
Definition: zfshtip.f90:7
subroutine init1
Definition: init1.f90:10
integer, dimension(maxatoms *maxspecies) idxis
Definition: modmain.f90:44
integer nfqrz
Definition: modmain.f90:539
subroutine plotu3d(fnum, nf, zfmt, zfir)
Definition: plotu3d.f90:7
subroutine init0
Definition: init0.f90:10
subroutine plotu1d(fnum1, fnum2, nf, zfmt, zfir)
Definition: plotu1d.f90:7
integer natmtot
Definition: modmain.f90:40
subroutine potuplot
Definition: potuplot.f90:7
integer, dimension(maxspecies) nrcmt
Definition: modmain.f90:173
integer, dimension(maxspecies) nrcmti
Definition: modmain.f90:211
Definition: modulr.f90:6
subroutine initulr
Definition: initulr.f90:7