From 51ec1d4dd149a321a9fa790b88aa30736031a441 Mon Sep 17 00:00:00 2001 From: Philipp Pracht Date: Tue, 23 Apr 2024 22:10:29 +0100 Subject: [PATCH 1/2] numerical hessian command line option Signed-off-by: Philipp Pracht --- src/axis_module.f90 | 6 +++++- src/confparse.f90 | 20 +++++++++++++++++--- src/legacy_algos/protonate.f90 | 5 +++++ src/legacy_algos/tautomerize.f90 | 5 +++++ 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/src/axis_module.f90 b/src/axis_module.f90 index 45e757fd..50f045b1 100644 --- a/src/axis_module.f90 +++ b/src/axis_module.f90 @@ -73,8 +73,12 @@ module axis_module module procedure CMAxyz module procedure CMAv end interface cma + public :: CMAtrf -contains +!========================================================================================! +!========================================================================================! +contains !> MODULE PROCEDURES START HERE +!========================================================================================! !========================================================================================! !> subroutine axis_0 !> This is the original axis routine for calculating the diff --git a/src/confparse.f90 b/src/confparse.f90 index 868fb447..fd946be6 100644 --- a/src/confparse.f90 +++ b/src/confparse.f90 @@ -710,6 +710,12 @@ subroutine parseflags(env,arg,nra) if(argument.eq.'-ohess') env%crest_ohess=.true. exit + case ('-hess','-numhess') !> Numerical hessian + env%preopt = .false. + env%crestver = crest_numhessian + env%legacy = .false. + exit + case ('-trialopt') !> test optimization with topocheck env%preopt = .false. env%crestver = crest_trialopt @@ -2425,9 +2431,17 @@ subroutine inputcoords(env,arg) !>-- after this point there should always be an coord file present if (.not.allocated(env%inputcoords)) env%inputcoords = 'coord' call mol%open('coord') -!>-- shift to CMA and align according to rot.const. - if (env%crestver /= crest_solv .and. env%crestver /= crest_sp & - & .and. env%crestver /= crest_optimize) call axis(mol%nat,mol%at,mol%xyz) +!>-- shift to CMA and/or align according to rot.const. We have to be careful about this. + if (any((/ crest_sp, crest_optimize, crest_numhessian, crest_trialopt /) == env%crestver))then + !> some runtypes should only do a CMA translation, but no rotation + call CMAtrf(mol%nat,mol%nat,mol%at,mol%xyz) + else if (env%crestver == crest_solv)then + !> runtypes like qcg must not modify input coordinates! + continue + else + !> all other can align with rot. axis + call axis(mol%nat,mol%at,mol%xyz) + endif !>-- overwrite coord call mol%write('coord') diff --git a/src/legacy_algos/protonate.f90 b/src/legacy_algos/protonate.f90 index 4e021ea5..8a911a44 100644 --- a/src/legacy_algos/protonate.f90 +++ b/src/legacy_algos/protonate.f90 @@ -75,6 +75,11 @@ end subroutine xtblmo call protclean call prothead +!>--- check method + if(trim(env%gfnver) .eq. '--gff')then + error stop 'protonate unavailable with GFN-FF -> need LMOs' + endif + if (.not.allocated(env%ptb%atmap)) allocate (env%ptb%atmap(env%nat)) if (.not.env%ptb%strictPDT.and..not.env%ptb%fixPDT) then !--- sort the input file (H atoms to the bottom) diff --git a/src/legacy_algos/tautomerize.f90 b/src/legacy_algos/tautomerize.f90 index 40605051..1366909d 100644 --- a/src/legacy_algos/tautomerize.f90 +++ b/src/legacy_algos/tautomerize.f90 @@ -62,6 +62,11 @@ subroutine tautomerize(env,tim) call tautclean call tauthead +!>--- check method + if(trim(env%gfnver) .eq. '--gff')then + error stop 'tautomerize unavailable with GFN-FF -> need LMOs' + endif + if (.not.allocated(env%ptb%atmap)) allocate (env%ptb%atmap(env%nat)) if (.not.env%ptb%strictPDT.and..not.env%ptb%fixPDT) then !--- sort the input file (H atoms to the bottom) From 65f87c54207edc2bc1df25a66bfd26323feb96ad Mon Sep 17 00:00:00 2001 From: Philipp Pracht Date: Wed, 24 Apr 2024 13:16:48 +0100 Subject: [PATCH 2/2] Track (empty) include directory to supress gcc CMake warning Signed-off-by: Philipp Pracht --- include/.gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 include/.gitignore diff --git a/include/.gitignore b/include/.gitignore new file mode 100644 index 00000000..e69de29b