psi4 / psi4

Open-Source Quantum Chemistry – an electronic structure package in C++ driven by Python
http://psicode.org
GNU Lesser General Public License v3.0
978 stars 448 forks source link

PCMSolver Error w/ B97-3c #3202

Open corinwagen opened 3 months ago

corinwagen commented 3 months ago

I can't get CPCM(water) to work with B97-3c for my molecule. Here's my input file:

molecule {
  -1 1
  O       -3.79496408 -2.36260414 1.70152926
  C       -2.93101645 -1.66904914 1.14430726
  C       -2.13005829 -0.68789893 1.86141181
  C       -1.14196217 0.05066703 1.29086101
  C       -0.47856119 1.13396394 2.09829283
  C       -0.80787855 -0.19207110 -0.09443095
  N       0.25723669 0.27990621 -0.79382718
  O       1.28867817 0.69574040 0.13535844
  S       2.75258017 0.18914236 -0.18685693
  O       2.81552768 -0.50840706 -1.42180252
  O       3.61564541 1.27844179 0.09948727
  O       2.95557380 -0.82533526 1.00298083
  C       2.03019476 -1.93245912 1.04782605
  C       -1.66037059 -1.05786431 -0.87382233
  C       -1.39498496 -1.19960129 -2.34816003
  C       -2.65299201 -1.76249051 -0.27337471
  H       -2.37740040 -0.54585648 2.90523863
  H       2.38954139 -2.56465364 1.84992540
  H       1.02863634 -1.57685304 1.27002537
  H       2.04236674 -2.46241236 0.09951447
  H       -2.15541649 -1.82673633 -2.80763054
  H       -0.41234738 -1.64107180 -2.50716877
  H       -1.37758315 -0.22482435 -2.83713913
  H       -3.27599978 -2.43724084 -0.84607768
  S       -0.34233722 2.35735393 -1.83532763
  C       1.36095190 2.94818139 -1.81407535
  H       1.71979201 3.09855604 -0.79815280
  H       2.02802634 2.25554347 -2.32132745
  H       1.39841688 3.90181231 -2.33199310
  H       0.52648693 0.85272557 2.39744759
  H       -0.38901252 2.05630112 1.52833438
  H       -1.06736839 1.33094835 2.99083304
}

set {
  pcm true
  pcm_scf_type total
}

pcm = {
   Units = Angstrom
   Medium {
   SolverType = IEFPCM
   Solvent = Water
   }

   Cavity {
   RadiiSet = UFF
   Type = GePol
   Scaling = False
   Area = 0.3
   Mode = Implicit
   }
}

gradient("b97-3c")

And here's what happens when I run the calculation:

$ psi4 input.dat
PCMSolver fatal error.
 In function computeS at line 51 of file /Users/runner/miniforge3/conda-bld/pcmsolver-split_1696645993753/work/src/bi_operators/IBoundaryIntegralOperator.cpp
S matrix is not positive-definite!
Consider changing the average area of the cavity finite elements.
Please report this issue: https://github.com/PCMSolver/pcmsolver/issues

If I delete the PCM sections, the B97-3c gradient runs just fine. The molecule looks normal:

image

All calculations run on a MacBook Pro using Psi4 1.9.1 from conda-forge.

(I know the message says to report this to PCMSolver but that repository hasn't had any updates in 3+ years...)

loriab commented 3 months ago

I know, it's this issue: https://github.com/PCMSolver/pcmsolver/issues/206 . An additional check was added to pcmsolver that hits larger molecules, and when I updated from v1.2.1 to v1.2.3 when doing the conda-forge transition, that check got turned on. I should do a new binary version commenting out that check so that calcs at least run as before, even if they're slightly less to be trusted.

corinwagen commented 3 months ago

Ah gotcha - makes sense, thanks for quick response

corinwagen commented 1 month ago

FWIW - I'm still running into this issue on a bunch of systems, using a variety of methods (not just B97-3c).

corinwagen commented 1 month ago

If anyone else is having issues here, we've just configured the ddx interface to Psi4 and now solvent is working again on our systems—unfortunately there are no analytical gradients w/ the current interface, but I think this will change in the future (see discussion in #2767). The interface is documented nicely here.