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 6subroutine wxcplot 7use modmain 8implicit none 9! initialise universal variables 10call init0 11if (xcgrad.ne.4) then 12 write(*,*) 13 write(*,'("Error(wxcplot): meta-GGA not in use")') 14 write(*,*) 15 stop 16end if 17! read the density and potentials from file 18call readstate 19! write the potential plots to file 20select case(task) 21case(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")') 32case(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")') 40case(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")') 48end select 49end subroutine 50 51