From 4033044df10d42fce0611fcde8b3ea4cd8d362e8 Mon Sep 17 00:00:00 2001 From: rpseng Date: Sat, 12 Apr 2025 13:05:31 -0300 Subject: [PATCH] SES and YK not allowed, mfactor fix. --- src/solvation/cosmo_input.F | 6 ++++++ src/solvation/hnd_cosmo_lib.F | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/solvation/cosmo_input.F b/src/solvation/cosmo_input.F index 9b3af836e6..216b1a8cc1 100644 --- a/src/solvation/cosmo_input.F +++ b/src/solvation/cosmo_input.F @@ -370,6 +370,8 @@ c c default for each model: c - CAVITY SES : with the Klamt-Schuurmann model c - CAVITY VDW : with the York-Karplus model +c +c For now, SES cavity cannot be used with the YK model c else if(inp_compare(.false.,'cavity',field)) then if (.not.inp_a(token)) @@ -378,6 +380,10 @@ c cosmo_cavity = COSMO_CAVITY_VDW else if (inp_compare(.false.,'ses',token)) then cosmo_cavity = COSMO_CAVITY_SES +c Only accept SES if the model is not YK + if(do_cosmo_model.eq.DO_COSMO_YK) call errquit( + $ "cosmo_input: SES cavity incompatible with YK method", + $ 911,INPUT_ERR) else write(luout,*)"invalid option for CAVITY, valid options are:" write(luout,*)"- VDW for a van der Waals cavity" diff --git a/src/solvation/hnd_cosmo_lib.F b/src/solvation/hnd_cosmo_lib.F index 217e479ff7..270f7c66d2 100644 --- a/src/solvation/hnd_cosmo_lib.F +++ b/src/solvation/hnd_cosmo_lib.F @@ -803,11 +803,11 @@ c Accumulate the area on the largest segment. if(segarea(iseg).lt.segarea(jseg)) then segarea(jseg) = segarea(jseg) + segarea(iseg) segarea(iseg) = zero; + exit else segarea(iseg) = segarea(iseg) + segarea(jseg); segarea(jseg) = zero; end if - exit end if end do if(segarea(iseg).eq.zero) cycle @@ -818,7 +818,8 @@ c dbl_mb(k_efcc+3*(ief-1)+2)=xyzseg(3,iseg) dbl_mb(k_efcs+ief-1) = segarea(iseg) ! KS area -c Also store the YK variables. +c Store the YK variables as well, although they are currently unused +c because this combination is blocked in comso_input.F. dbl_mb(k_msrf+ief-1) = segarea(iseg) ! YK area zetai=zeta/sqrt(segarea(iseg)) ! YK zeta dbl_mb(k_efczz+ief-1) = zetai ! YK, store zeta