subroutine rddos(ierror) implicit double precision(a-h,o-z) #include "divcon.dim" #include "divcon.h" C Density of State analysis C C dos C 1-458 0.3 C 558-960 0.2 C end_dos C C this means that a density of state analysis will be performed C for the subsystems in which atoms 1-458 are, with sampling interval C of 0.3 eV, and also for the subsystems of atoms 558-960 with C sampling of 0.2 eV C C by Arjan van der Vaart logical int, min, float character*80 line C-RDC WRITE(IOUT,'(//" DENSITY OF STATE PARAMETERS:", C-RDC & /" ---------------------------"/)') 5 read (inpt,fmt='(A80)') line call upcase1(line,80) if (index(line,'END_DOS').ne.0) then return endif istart = 1 C find first number ndos = ndos + 1 if (ndos.gt.maxdos) then C-RDC write(iout,'(/" ERROR: MAXIMUM NUMBER OF DOS ANALYSIS", C-RDC $ " REACHED.", C-RDC $ /" INCREASE MAXDOS IN divcon.dim AND", C-RDC $ " RECOMPILE")') ierror = 1 return endif in2 = 2*ndos in1 = in2-1 i=1 10 if (i.lt.80) then call whatis2(line(i:i),int, mini) if (int) then call iatoi(line, i, lstr, idos(in1), ierror) if ((idos(in1).lt.1).or.(idos(in1).gt.natoms)) then C-RDC write(iout,'(/" ERROR: ATOM ",i6," IS OUT OF RANGE")') C-RDC $ idos(in1) ierror = 1 return endif goto 20 endif i=i+1 goto 10 else C-RDC write(iout,'(/" ERROR: WRONG SYNTAX IN DOS PARAMETERS", C-RDC $ " LINE",/,1x,a20,"...")') line(1:20) ierror = 1 return endif 20 i=lstr+1 C find - j = index(line,'-') if (j.lt.i) then C-RDC write(iout,'(/" ERROR: WRONG SYNTAX IN DOS PARAMETERS", C-RDC $ " LINE",/,1X,A20,"...")') line(1:20) ierror = 1 return endif i = j+1 C find second number 30 if (i.lt.80) then call whatis2(line(i:i),int, mini) if (int) then call iatoi(line, i, lstr, idos(in2), ierror) if ((idos(in2).lt.idos(in1)).or. $ (idos(in2).gt.natoms)) then C-RDC write(iout,'(/" ERROR: ATOM ",i6," IS OUT OF RANGE")') C-RDC $ idos(in2) ierror = 1 return endif goto 40 endif i=i+1 goto 30 else C-RDC write(iout,'(/" ERROR: WRONG SYNTAX IN DOS PARAMETERS", C-RDC $ " LINE",/,1x,a20,"...")') line(1:20) ierror = 1 return endif 40 i=lstr+1 C find third number 50 if (i.lt.80) then call whatis1(line(i:i),float) if (float) then do j=i+1,80 if (line(j:j).eq.' ') then iend = j-1 goto 55 endif enddo 55 call getnum(line,i,iend,ddos(ndos),ierror) if (ierror.ne.0) then C-RDC write(iout,'(/" ERROR: WRONG FLOAT IN DOS PARAMETERS", C-RDC $ " LINE",/,1X,A20,"...")') line(1:20) return elseif (ddos(ndos).lt.1.0e-2) then C-RDC write(iout,'(/" ERROR: INTERVAL (",F15.8, C-RDC $ ") SHOULD BE ", C-RDC $ ">= 0.01")') C-RDC $ ddos(ndos) ierror = 1 return endif goto 60 endif i=i+1 goto 50 else C-RDC write(iout,'(/" ERROR: WRONG SYNTAX IN DOS PARAMETERS", C-RDC $ " LINE",/,1x,a20,"...")') line(1:20) ierror = 1 return endif 60 continue C-RDC 60 write(iout,'(" DOS OF ATOMS ",i6," - ",i6, C-RDC $ " WITH INTERVAL OF ",F12.3," eV")') C-RDC $ idos(in1),idos(in2),ddos(ndos) goto 5 end