The Elk Code
 
Loading...
Searching...
No Matches
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
6subroutine readatdvc
7use modmain
8implicit none
9! local variables
10integer is,ia,is_,ia_,ios
11open(50,file='ATDVC.OUT',form='FORMATTED',action='READ',status='OLD',iostat=ios)
12if (ios /= 0) then
13 write(*,*)
14 write(*,'("Error(readatdvc): error opening ATDVC.OUT")')
15 write(*,*)
16 stop
17end if
18do 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
30end do
31close(50)
32end subroutine
33
integer, dimension(maxspecies) natoms
Definition modmain.f90:36
integer nspecies
Definition modmain.f90:34
real(8), dimension(3, 0:1, maxatoms, maxspecies) atdvc
Definition modmain.f90:64
subroutine readatdvc
Definition readatdvc.f90:7