From 4c2176d27caec750c15a0cec9b85660bd13e0851 Mon Sep 17 00:00:00 2001 From: Christoph Plett <82893466+cplett@users.noreply.github.com> Date: Mon, 4 Dec 2023 18:49:22 +0100 Subject: [PATCH 1/5] aISS writes best structure in file format of input (#919) Signed-off-by: cplett <82893466+cplett@users.noreply.github.com> --- src/docking/search_nci.f90 | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/src/docking/search_nci.f90 b/src/docking/search_nci.f90 index 51428aa4f..82db2814a 100644 --- a/src/docking/search_nci.f90 +++ b/src/docking/search_nci.f90 @@ -52,6 +52,8 @@ module xtb_docking_search_nci use xtb_scc_core, only: iniqshell use xtb_eeq, only: goedecker_chrgeq use xtb_basis, only: newBasisset + use xtb_io_writer, only : writeMolecule + use xtb_mctc_filetypes, only : generateFileName implicit none private @@ -172,6 +174,8 @@ END SUBROUTINE Quicksort real(wp) :: tmp_e !> Minimumposition integer :: minpos + !> For outprint + character(len=:),allocatable :: extension, fin_name !> Parameter real(wp), parameter :: pi2 = 2*3.14159265358979_wp @@ -946,14 +950,29 @@ END SUBROUTINE Quicksort call remove_file(iopt) - call open_file(ifinal, 'best.xyz', 'w') - write (ifinal, '(i0)') comb%n - write (ifinal, '(f20.14)') final_e(1) - do j = 1, comb%n - write (ifinal, '(a4,2x,3f20.14)') comb%sym(j), xyz_opt(1, j, 1)*autoang, & - & xyz_opt(2, j, 1)*autoang, xyz_opt(3, j, 1)*autoang - end do + ! Write best structure in format of the largest input molecule + comb%xyz(:,:) = xyz_opt(:,:,1) + if(molA%n >= molB%n) then + comb%ftype=molA%ftype + else + comb%ftype=molB%ftype + end if + call generateFileName(fin_name, 'best', '', comb%ftype) + call open_file(ifinal, fin_name, 'w') + call writeMolecule(comb, ifinal, energy=final_e(1)) + !If not xyz then best.xyz is written to not have api break + if(comb%ftype /= 1)then + call open_file(ifinal, 'best.xyz', 'w') + write (ifinal, '(i0)') comb%n + write (ifinal, '(f20.14)') final_e(1) + do j = 1, comb%n + write (ifinal, '(a4,2x,3f20.14)') comb%sym(j), xyz_opt(1, j, 1)*autoang, & + & xyz_opt(2, j, 1)*autoang, xyz_opt(3, j, 1)*autoang + end do + end if call close_file(ifinal) + + call delete_file(set%opt_logfile) !> Printout Interaction Energy From 74d163968cdfa8d9fe4fb34277105cfad1308203 Mon Sep 17 00:00:00 2001 From: Marcel Stahn <70513124+MtoLStoN@users.noreply.github.com> Date: Wed, 6 Dec 2023 17:28:20 +0100 Subject: [PATCH 2/5] Update xcontrol.7.adoc (#923) Typo --- man/xcontrol.7.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/xcontrol.7.adoc b/man/xcontrol.7.adoc index 229840948..73ba08cd2 100644 --- a/man/xcontrol.7.adoc +++ b/man/xcontrol.7.adoc @@ -448,7 +448,7 @@ $scc *guess*=gasteiger|goedecker|sad:: different possible guess charges for GFN2-xTB SCC calculation -*maxiteration*='int':: +*maxiterations*='int':: adjusts the number of SCC iterations in the first/last SCC calculation $split From 0eace6f2d2eacf6f6ff9067c6368e9c2d9a2433b Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Wed, 6 Dec 2023 11:29:02 -0500 Subject: [PATCH 3/5] add CMake option INSTALL_MODULES (#921) Signed-off-by: Jinzhe Zeng --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index da67f5bb2..f5aeea57e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ cmake_minimum_required(VERSION 3.17) option(WITH_OBJECT "To build using object library" TRUE) +option(INSTALL_MODULES "Install Fortran module files to include directory." FALSE) # Buggy CMake versions if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.27.0) @@ -249,6 +250,15 @@ install( "${CMAKE_INSTALL_INCLUDEDIR}" ) +if (INSTALL_MODULES) + install( + DIRECTORY + "${PROJECT_BINARY_DIR}/include/" + DESTINATION + "${CMAKE_INSTALL_INCLUDEDIR}" + ) +endif() + # xtb-parameters install( FILES From 08efe5bd71a0cf11577112a439920ba8f597c110 Mon Sep 17 00:00:00 2001 From: albert <92109627+Albkat@users.noreply.github.com> Date: Wed, 6 Dec 2023 17:50:04 +0100 Subject: [PATCH 4/5] consistent SCC options (#924) Signed-off-by: albert <92109627+Albkat@users.noreply.github.com> --- man/xcontrol.7.adoc | 4 ++-- man/xtb.1.adoc | 7 +++++-- src/prog/main.F90 | 4 ++-- src/set_module.f90 | 4 ++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/man/xcontrol.7.adoc b/man/xcontrol.7.adoc index 73ba08cd2..4bc12d183 100644 --- a/man/xcontrol.7.adoc +++ b/man/xcontrol.7.adoc @@ -439,7 +439,7 @@ NOTE: the scan parser will always terminate in error if the instruction could $scc ~~~~ -*temp*='real':: +*temp, etemp*='real':: electronic temperature for the Fermi smearing *broydamp*='real':: @@ -448,7 +448,7 @@ $scc *guess*=gasteiger|goedecker|sad:: different possible guess charges for GFN2-xTB SCC calculation -*maxiterations*='int':: +*iterations, maxiterations*='int':: adjusts the number of SCC iterations in the first/last SCC calculation $split diff --git a/man/xtb.1.adoc b/man/xtb.1.adoc index 9b885e59a..df8e4e669 100644 --- a/man/xtb.1.adoc +++ b/man/xtb.1.adoc @@ -91,8 +91,8 @@ OPTIONS The inner region is given as comma-separated indices directly in the commandline or in a file with each index on a separate line. -*--etemp* 'REAL':: - electronic temperature (default = 300K) +*--etemp, --temp* 'REAL':: + electronic temperature for SCC (default = 300K) *--esp* :: calculate electrostatic potential on VdW-grid @@ -103,6 +103,9 @@ OPTIONS *-a, --acc* 'REAL':: accuracy for SCC calculation, lower is better (default = 1.0) +*--iterations, --maxiterations* 'INT':: + maximum number of SCC iterations per single point calculation (default = 250) + *--vparam* 'FILE':: Parameter file for xTB calculation diff --git a/src/prog/main.F90 b/src/prog/main.F90 index ef530ea72..2ae08a39e 100644 --- a/src/prog/main.F90 +++ b/src/prog/main.F90 @@ -1470,7 +1470,7 @@ subroutine parseArguments(env, args, inputFile, paramFile, lgrad, & case('--cut') call set_cut - case('--etemp') + case('--etemp', '--temp') call args%nextArg(sec) if (allocated(sec)) then call set_scc(env,'temp',sec) @@ -1552,7 +1552,7 @@ subroutine parseArguments(env, args, inputFile, paramFile, lgrad, & call set_write(env,'fod','true') call set_scc(env,'temp','5000.0') - case('--iterations') + case('--iterations', '--maxiterations') call args%nextArg(sec) if (allocated(sec)) then call set_scc(env,'maxiterations',sec) diff --git a/src/set_module.f90 b/src/set_module.f90 index 736166a88..9b2107f1f 100644 --- a/src/set_module.f90 +++ b/src/set_module.f90 @@ -1517,7 +1517,7 @@ subroutine set_scc(env,key,val) select case(key) case default ! do nothing call env%warning("the key '"//key//"' is not recognized by scc",source) - case('temp') + case('etemp','temp') if (getValue(env,val,ddum).and.set1) set%eTemp = ddum set1 = .false. case('broydamp') @@ -1535,7 +1535,7 @@ subroutine set_scc(env,key,val) set%guess_charges = p_guess_multieq endif set3 = .false. - case('maxiterations') + case('iterations','maxiterations') if (getValue(env,val,idum).and.set4) then if (idum.le.0) then call env%warning('negative SCC-Iterations make no sense',source) From a05faa317878bd3d72997de033381dbed5a24d0d Mon Sep 17 00:00:00 2001 From: Thomas3R <39367840+Thomas3R@users.noreply.github.com> Date: Tue, 12 Dec 2023 13:37:33 +0100 Subject: [PATCH 5/5] Update search_nci.f90 resolves merge conflict --- src/docking/search_nci.f90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/docking/search_nci.f90 b/src/docking/search_nci.f90 index 00e584dcd..50226b122 100644 --- a/src/docking/search_nci.f90 +++ b/src/docking/search_nci.f90 @@ -53,6 +53,8 @@ module xtb_docking_search_nci use xtb_eeq, only: goedecker_chrgeq use xtb_basis, only: newBasisset use xtb_gfnff_neighbor, only: TNeigh + use xtb_io_writer, only : writeMolecule + use xtb_mctc_filetypes, only : generateFileName implicit none private