The Elk Code
readatdvc.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2020 J. K. Dewhurst and S. Sharma.
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 readatdvc
7 use modmain
8 implicit none
9 ! local variables
10 integer is,ia,is_,ia_,ios
11 open(50,file='ATDVC.OUT',form='FORMATTED',action='READ',status='OLD',iostat=ios)
12 if (ios /= 0) then
13  write(*,*)
14  write(*,'("Error(readatdvc): error opening ATDVC.OUT")')
15  write(*,*)
16  stop
17 end if
18 do is=1,nspecies
19  do ia=1,natoms(is)
20  read(50,*) is_,ia_,atdvc(:,:,ia,is)
21  if ((is /= is_).or.(ia /= ia_)) then
22  write(*,*)
23  write(*,'("Error(readatdvc): species or atom number mismatch")')
24  write(*,'(" internal : ",2I4)') is,ia
25  write(*,'(" ATDVC.OUT : ",2I4)') is_,ia_
26  write(*,*)
27  stop
28  end if
29  end do
30 end do
31 close(50)
32 end subroutine
33 
real(8), dimension(3, 0:1, maxatoms, maxspecies) atdvc
Definition: modmain.f90:64
integer, dimension(maxspecies) natoms
Definition: modmain.f90:36
subroutine readatdvc
Definition: readatdvc.f90:7
integer nspecies
Definition: modmain.f90:34