The Elk Code
 
Loading...
Searching...
No Matches
potplot.f90
Go to the documentation of this file.
1
2! Copyright (C) 2002-2005 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6!BOP
7! !ROUTINE: potplot
8! !INTERFACE:
9subroutine potplot
10! !USES:
11use modmain
12! !DESCRIPTION:
13! Outputs the exchange, correlation and Coulomb potentials, read in from
14! {\tt STATE.OUT}, for 1D, 2D or 3D plotting.
15!
16! !REVISION HISTORY:
17! Created June 2003 (JKD)
18!EOP
19!BOC
20implicit none
21! initialise universal variables
22call init0
23! read the density and potentials from file
24call readstate
25! write the potential plots to file
26select case(task)
27case(41)
28 open(50,file='VCL1D.OUT',form='FORMATTED',action='WRITE')
29 open(51,file='VLINES.OUT',form='FORMATTED',action='WRITE')
30 call plot1d(50,51,1,vclmt,vclir)
31 close(50)
32 close(51)
33 open(50,file='VXC1D.OUT',form='FORMATTED',action='WRITE')
34 open(51,file='VLINES.OUT',form='FORMATTED',action='WRITE')
35 call plot1d(50,51,1,vxcmt,vxcir)
36 close(50)
37 close(51)
38 write(*,*)
39 write(*,'("Info(potplot):")')
40 write(*,'(" 1D Coulomb potential plot written to VCL1D.OUT")')
41 write(*,'(" 1D exchange-correlation potential plot written to VXC1D.OUT")')
42 write(*,'(" vertex location lines written to VLINES.OUT")')
43case(42)
44 open(50,file='VCL2D.OUT',form='FORMATTED',action='WRITE')
45 call plot2d(.false.,50,1,vclmt,vclir)
46 close(50)
47 open(50,file='VXC2D.OUT',form='FORMATTED',action='WRITE')
48 call plot2d(.false.,50,1,vxcmt,vxcir)
49 close(50)
50 write(*,*)
51 write(*,'("Info(potplot):")')
52 write(*,'(" 2D Coulomb potential plot written to VCL2D.OUT")')
53 write(*,'(" 2D exchange-correlation potential plot written to VXC2D.OUT")')
54case(43)
55 open(50,file='VCL3D.OUT',form='FORMATTED',action='WRITE')
56 call plot3d(50,1,vclmt,vclir)
57 close(50)
58 open(50,file='VXC3D.OUT',form='FORMATTED',action='WRITE')
59 call plot3d(50,1,vxcmt,vxcir)
60 close(50)
61 write(*,*)
62 write(*,'("Info(potplot):")')
63 write(*,'(" 3D Coulomb potential plot written to VCL3D.OUT")')
64 write(*,'(" 3D exchange-correlation potential plot written to VXC3D.OUT")')
65end select
66end subroutine
67!EOC
68
subroutine init0
Definition init0.f90:10
real(8), dimension(:), allocatable vxcir
Definition modmain.f90:634
real(8), dimension(:), allocatable vclir
Definition modmain.f90:624
integer task
Definition modmain.f90:1298
real(8), dimension(:,:), allocatable vclmt
Definition modmain.f90:624
real(8), dimension(:,:), allocatable vxcmt
Definition modmain.f90:634
subroutine plot1d(fnum1, fnum2, nf, rfmt, rfir)
Definition plot1d.f90:10
subroutine plot2d(tproj, fnum, nf, rfmt, rfir)
Definition plot2d.f90:10
subroutine plot3d(fnum, nf, rfmt, rfir)
Definition plot3d.f90:10
subroutine potplot
Definition potplot.f90:10
subroutine readstate
Definition readstate.f90:10