diff --git a/src/prog/dock.f90 b/src/prog/dock.f90 index c59bcd7ef..aca020e50 100644 --- a/src/prog/dock.f90 +++ b/src/prog/dock.f90 @@ -108,6 +108,17 @@ subroutine xtbDock(env, argParser) !> Print an informative banner call dockingHeader(env%unit) + !> make sure you cannot blame us for destroying your computer + call disclamer(env%unit) + !> Citations + write(env%unit,'(3x,a)') & + "Cite this work as:", & + "* C. Plett, S. Grimme, Angew. Chem. Int. Ed. 2023, 62, e202214477.",& + "DOI: 10.1002/anie.202214477",& + "" + + !> Check .CHRG, .UHF + call check_for_files(env) !> Parse arguments call parseArguments(env, argParser, fname) @@ -156,6 +167,14 @@ subroutine xtbDock(env, argParser) call reader%close call env%checkpoint("Could not read geometry from '"//fnameB//"'") + !> Set molecular charges + molA%chrg = chrg(1) + molB%chrg = chrg(2) + + !> Set molecular charges + molA%uhf = uhf(1) + molB%uhf = uhf(2) + !> Print current time call prdate('S') @@ -166,9 +185,6 @@ subroutine xtbDock(env, argParser) call set_iff_param fnam = 'xtblmoinfo' - !> Check .CHRG, .UHF and xcontrol - call check_for_files(env, molA, molB) - !> Printout Settings call dockingPrintout(env%unit, fnameA, fnameB, molA, molB) @@ -760,12 +776,10 @@ subroutine dockingHelp(iunit) end subroutine dockingHelp - subroutine check_for_files(env, molA, molB) + subroutine check_for_files(env) !> Calculation environment type(TEnvironment), intent(inout) :: env - !> Molecular structure data - type(TMolecule), intent(inout) :: molA, molB character(len=*), parameter :: source = "iff_file_read" @@ -791,7 +805,7 @@ subroutine check_for_files(env, molA, molB) call env%warning('.CHRG has only one line!') else if (getValue(env, cdum, charge)) then - molA%chrg = charge + chrg(1) = charge end if end if !> Charge molB @@ -800,7 +814,7 @@ subroutine check_for_files(env, molA, molB) call env%warning('.CHRG has only two lines!') else if (getValue(env, cdum, charge)) then - molB%chrg = charge + chrg(2) = charge end if end if @@ -812,12 +826,17 @@ subroutine check_for_files(env, molA, molB) !> Number of unpaired electrons call open_file(ich, '.UHF', 'r') if (ich .ne. -1) then + !> Total number + call getline(ich, cdum, iostat=err) + if (err /= 0) then + call env%error('.UHF is empty!', source) + end if call getline(ich, cdum, iostat=err) if (err /= 0) then call env%error('.UHF is empty!', source) else if (getValue(env, cdum, elect)) then - molA%uhf = elect + uhf(1) = elect end if end if call getline(ich, cdum, iostat=err) @@ -825,7 +844,7 @@ subroutine check_for_files(env, molA, molB) call env%warning('.UHF has only one line!') else if (getValue(env, cdum, elect)) then - molB%uhf = elect + uhf(2) = elect end if end if call close_file(ich)