The Elk Code
wxcplot.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2018 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 wxcplot
7 use modmain
8 implicit none
9 ! initialise universal variables
10 call init0
11 if (all(xcgrad /= [3,4,5,6])) then
12  write(*,*)
13  write(*,'("Error(wxcplot): meta-GGA not in use")')
14  write(*,*)
15  stop
16 end if
17 ! read the density and potentials from file
18 call readstate
19 ! write the potential plots to file
20 select case(task)
21 case(341)
22  open(50,file='WXC1D.OUT',form='FORMATTED')
23  open(51,file='WLINES.OUT',form='FORMATTED')
24  call plot1d(50,51,1,wxcmt,wxcir)
25  close(50)
26  close(51)
27  write(*,*)
28  write(*,'("Info(wxcplot):")')
29  write(*,'(" 1D meta-GGA exchange-correlation potential written to &
30  &WXC1D.OUT")')
31  write(*,'(" vertex location lines written to WLINES.OUT")')
32 case(342)
33  open(50,file='WXC2D.OUT',form='FORMATTED')
34  call plot2d(.false.,50,1,wxcmt,wxcir)
35  close(50)
36  write(*,*)
37  write(*,'("Info(wxcplot):")')
38  write(*,'(" 2D meta-GGA exchange-correlation potential written to &
39  &WXC2D.OUT")')
40 case(343)
41  open(50,file='WXC3D.OUT',form='FORMATTED')
42  call plot3d(50,1,wxcmt,wxcir)
43  close(50)
44  write(*,*)
45  write(*,'("Info(wxcplot):")')
46  write(*,'(" 3D meta-GGA exchange-correlation potential written to &
47  &WXC3D.OUT")')
48 end select
49 end subroutine
50 
subroutine wxcplot
Definition: wxcplot.f90:7
real(8), dimension(:), allocatable wxcir
Definition: modmain.f90:676
integer task
Definition: modmain.f90:1297
subroutine plot3d(fnum, nf, rfmt, rfir)
Definition: plot3d.f90:10
subroutine plot1d(fnum1, fnum2, nf, rfmt, rfir)
Definition: plot1d.f90:10
real(8), dimension(:,:), allocatable wxcmt
Definition: modmain.f90:676
subroutine plot2d(tproj, fnum, nf, rfmt, rfir)
Definition: plot2d.f90:10
subroutine readstate
Definition: readstate.f90:10
subroutine init0
Definition: init0.f90:10
integer xcgrad
Definition: modmain.f90:602