Skip to content

Commit

Permalink
datafile name need not be default, can be user input
Browse files Browse the repository at this point in the history
  • Loading branch information
vtripath65 committed Nov 15, 2024
1 parent a878d0f commit 018cc32
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
23 changes: 22 additions & 1 deletion src/modules/quick_files_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,28 @@ subroutine set_quick_files(api,ierr)

end subroutine

subroutine read_data_file(line)
use quick_exception_module
use quick_input_parser_module

implicit none

character line*(*)

call read(line,'$DATA',datafilename)

end subroutine

subroutine print_data_file(io)
implicit none

! pass-in Parameter
integer io

write (io,'("| DATA FILE = ",a)') trim(dataFileName)

end subroutine

subroutine read_basis_file(keywd,ierr)

use quick_exception_module
Expand Down Expand Up @@ -272,7 +294,6 @@ subroutine print_quick_io_file(io,ierr)

write (io,'("| INPUT FILE : ",a)') trim(inFileName)
write (io,'("| OUTPUT FILE: ",a)') trim(outFileName)
write (io,'("| DATA FILE : ",a)') trim(dataFileName)
write (io,'("| BASIS SET PATH: ",a)') trim(basisdir)

return
Expand Down
13 changes: 11 additions & 2 deletions src/read_job_and_atom.f90
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,15 @@ subroutine read_job_and_atom(ierr)
do while(.true.)
read (inFile,'(A100)') tempstring
if(trim(tempstring).eq.'') exit
keyWD=trim(keyWD)//' '//trim(tempstring)
if(tempstring(1:1).eq.'$')then
call upcase(tempstring(2:2),4)
if (tempstring(2:5).eq.'DATA')then
! read data file
SAFE_CALL(read_data_file(tempstring))
endif
else
keyWD=trim(keyWD)//' '//trim(tempstring)
endif
end do
endif

Expand All @@ -65,7 +73,8 @@ subroutine read_job_and_atom(ierr)
! read basis file
SAFE_CALL(read_basis_file(keywd,ierr))
call print_basis_file(iOutFile)
if (quick_method%ecp) call print_ecp_file(iOutFile)
call print_data_file(iOutFile)
if (quick_method%ecp) call print_ecp_file(iOutFile)

! If PDB flag is on, then call readPDB to read PDB file and
! rewrite input file so that there will be no difference between
Expand Down

0 comments on commit 018cc32

Please sign in to comment.