From 96a70ea0aa3e0c2337e0ec42871903dc7ff10272 Mon Sep 17 00:00:00 2001 From: JayTheDog Date: Fri, 6 Aug 2021 20:58:58 +0200 Subject: [PATCH] corrected use statement --- src/input.f90 | 2 +- src/read_coordinates.f90 | 105 +++++++++++++++++++++------------------ 2 files changed, 57 insertions(+), 50 deletions(-) diff --git a/src/input.f90 b/src/input.f90 index d934fbc..b91076b 100644 --- a/src/input.f90 +++ b/src/input.f90 @@ -10,7 +10,7 @@ subroutine input(tstep,tmax,ntraj,iseed,etemp,Tinit, use cidcommon use common1 use newcommon - use print_output, only: qcstring + use qcxms_info, only: qcstring use xtb_mctc_accuracy, only: wp use xtb_mctc_convert implicit none diff --git a/src/read_coordinates.f90 b/src/read_coordinates.f90 index 90345f4..4cd2f43 100644 --- a/src/read_coordinates.f90 +++ b/src/read_coordinates.f90 @@ -93,38 +93,45 @@ subroutine rd(init,fname,nuc,xyz,iat) tmcoord = .false. ! this is not yet finished -start: if ( init ) then - inquire(file='coord',exist=ex) +!start: if ( init ) then +! inquire(file='coord',exist=ex) +! +!exst: if ( ex ) then +! fname = 'coord' +! +! else ! get argument line input file or give file name +! +! call get_command_argument(1, value=xyzfile, status=check) +! fname = xyzfile +! +! if (check > 0 ) then +! write(*,*) '- Which input file ? - ' +! read(*,'(a)') xyzfile +! +! if (xyzfile /= ' ') then +! tmcoord = .false. +! fname = xyzfile +! write(*,*) ' Reading input file : ', fname +! else +! stop '- No input provided - E X I T - ' +! endif +! +! endif +! +! endif exst +! +! endif start + +! if (fname == 'coord') tmcoord = .true. + inquire(file='coord',exist=ex) exst: if ( ex ) then fname = 'coord' else ! get argument line input file or give file name - - call get_command_argument(1, value=xyzfile, status=check) - fname = xyzfile - - if (check > 0 ) then - write(*,*) '- Which input file ? - ' - read(*,'(a)') xyzfile - - if (xyzfile /= ' ') then - tmcoord = .false. - fname = xyzfile - write(*,*) ' Reading input file : ', fname - else - stop '- No input provided - E X I T - ' - endif - - endif - + stop ' - No coord file available - E X I T - ' endif exst - endif start - - ! this check is important for '.not. init' call - if (fname == 'coord') tmcoord = .true. - open(file=fname, newunit=io_coord, status='old', iostat=io_error) if (io_error > 0) then @@ -138,7 +145,7 @@ subroutine rd(init,fname,nuc,xyz,iat) ! either turbomole coord file or xyz file - if (tmcoord) then +! if (tmcoord) then do read(io_coord,'(a)',iostat=iocheck)line if (iocheck < 0) exit @@ -162,29 +169,29 @@ subroutine rd(init,fname,nuc,xyz,iat) enddo - else ! no coord file (here we take xyz) - read(io_coord,*) nuc - read(io_coord,*) - - if (.not. init) then - - nuc = 0 - do - read(io_coord, '(a)',iostat=iocheck) line - if (iocheck > 0) stop 'error in xyz file' - if (iocheck < 0) exit ! EOF - - nuc=nuc+1 - - call readl(line,xx,nn) - iat(nuc)=toNumber(line) - xyz(1,nuc)=xx(1)*aatoau - xyz(2,nuc)=xx(2)*aatoau - xyz(3,nuc)=xx(3)*aatoau - - end do - endif - endif +! else ! no coord file (here we take xyz) +! read(io_coord,*) nuc +! read(io_coord,*) +! +! if (.not. init) then +! +! nuc = 0 +! do +! read(io_coord, '(a)',iostat=iocheck) line +! if (iocheck > 0) stop 'error in xyz file' +! if (iocheck < 0) exit ! EOF +! +! nuc=nuc+1 +! +! call readl(line,xx,nn) +! iat(nuc)=toNumber(line) +! xyz(1,nuc)=xx(1)*aatoau +! xyz(2,nuc)=xx(2)*aatoau +! xyz(3,nuc)=xx(3)*aatoau +! +! end do +! endif +! endif close(io_coord)