File: emdplot.f90

package info (click to toggle)
elkcode 5.4.24-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,840 kB
  • sloc: f90: 48,415; fortran: 22,457; perl: 965; makefile: 384; sh: 369; python: 105; ansic: 67
file content (49 lines) | stat: -rw-r--r-- 1,144 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

! Copyright (C) 2014 D. Ernsting, S. Dugdale and J. K. Dewhurst.
! This file is distributed under the terms of the GNU General Public License.
! See the file COPYING for license details.

subroutine emdplot
use modmain
use modpw
implicit none
! local variables
real(8) t1
! allocatable arrays
real(4), allocatable :: emds(:,:)
t1=sum(abs(vkloff(:)))
if (t1.gt.epslat) then
  write(*,*)
  write(*,'("Error(emdplot): use vkloff = 0 for the ground-state run")')
  write(*,*)
  stop
end if
! initialise universal variables
call init0
call init1
call init4
! read in the electron momentum density
allocate(emds(nhkmax,nkpt))
call reademd(emds)
! write the density plot to file
select case(task)
case(171)
  call emdplot1d(emds)
  write(*,*)
  write(*,'("Info(emdplot): 1D electron momentum density written to &
   &EMD1D.OUT")')
case(172)
  call emdplot2d(emds)
  write(*,*)
  write(*,'("Info(emdplot): 2D electron momentum density written to &
   &EMD2D.OUT")')
case(173)
  call emdplot3d(emds)
  write(*,*)
  write(*,'("Info(emdplot): 3D electron momentum density written to &
   &EMD3D.OUT")')
end select
deallocate(emds)
return
end subroutine