The Elk Code
 
Loading...
Searching...
No Matches
readbec.f90
Go to the documentation of this file.
1
2! Copyright (C) 2024 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 readbec
7use modmain
8use modphonon
9implicit none
10! local variables
11logical exist
12integer is,ia,ias,ip,jp
13character(256) fext
14do is=1,nspecies
15 do ia=1,natoms(is)
16 ias=idxas(ia,is)
17 do ip=1,3
18 call becfext(is,ia,ip,fext)
19 inquire(file='BEC'//trim(fext),exist=exist)
20 if (.not.exist) then
21 write(*,*)
22 write(*,'("Error(readbec): file not found :")')
23 write(*,'(A)') ' BEC'//trim(fext)
24 write(*,*)
25 stop
26 end if
27 open(50,file='BEC'//trim(fext),status='OLD',form='FORMATTED')
28 do jp=1,3
29 read(50,*) bec(ip,jp,ias)
30 end do
31 close(50)
32 end do
33 end do
34end do
35end subroutine
36
subroutine becfext(is, ia, ip, fext)
Definition becfext.f90:7
integer, dimension(maxspecies) natoms
Definition modmain.f90:36
integer, dimension(maxatoms, maxspecies) idxas
Definition modmain.f90:42
integer nspecies
Definition modmain.f90:34
real(8), dimension(:,:,:), allocatable bec
Definition modphonon.f90:36
subroutine readbec
Definition readbec.f90:7