Skip to content

Commit

Permalink
update PCMSolver interface to v1.2.3 (#2903)
Browse files Browse the repository at this point in the history
* update PCMSolver interface to v1.2.3

* update cm

* remove pcm from ecosys
  • Loading branch information
loriab committed May 8, 2023
1 parent 5b0daac commit e8c5544
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 22 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ecosystem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
- psi4/label/dev::libecpint
- psi4/label/dev::dkh
- psi4/label/dev::gdma
- psi4/label/dev::pcmsolver
#- psi4/label/dev::pcmsolver
- psi4/label/dev::simint
# runtime
EOF
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
sed -i "s;- psi4/label/dev::libecpint;;g" build.yaml
sed -i "s;- psi4/label/dev::dkh;;g" build.yaml
sed -i "s;- psi4/label/dev::gdma;;g" build.yaml
sed -i "s;- psi4/label/dev::pcmsolver;;g" build.yaml
#sed -i "s;- psi4/label/dev::pcmsolver;;g" build.yaml
sed -i "s;- psi4/label/dev::simint;;g" build.yaml
fi
#
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
- psi4/label/dev::dkh
- psi4/label/dev::libecpint
- psi4/label/dev::gdma
- psi4/label/dev::pcmsolver
#- psi4/label/dev::pcmsolver
- psi4/label/dev::simint
# qc opt'l
#- psi4/label/dev::dftd3
Expand Down Expand Up @@ -374,8 +374,8 @@ jobs:
-D CMAKE_INSIST_FIND_PACKAGE_ecpint=ON \
-D ENABLE_gdma=ON \
-D CMAKE_INSIST_FIND_PACKAGE_gdma=ON \
-D ENABLE_PCMSolver=ON \
-D CMAKE_INSIST_FIND_PACKAGE_PCMSolver=ON \
-D ENABLE_PCMSolver=OFF \
-D CMAKE_INSIST_FIND_PACKAGE_PCMSolver=OFF \
-D ENABLE_simint=ON \
-D SIMINT_VECTOR=sse \
-D CMAKE_INSIST_FIND_PACKAGE_simint=ON \
Expand Down Expand Up @@ -415,8 +415,8 @@ jobs:
-D CMAKE_INSIST_FIND_PACKAGE_ecpint=ON \
-D ENABLE_gdma=ON \
-D CMAKE_INSIST_FIND_PACKAGE_gdma=ON \
-D ENABLE_PCMSolver=ON \
-D CMAKE_INSIST_FIND_PACKAGE_PCMSolver=ON \
-D ENABLE_PCMSolver=OFF \
-D CMAKE_INSIST_FIND_PACKAGE_PCMSolver=OFF \
-D ENABLE_simint=ON \
-D SIMINT_VECTOR=sse \
-D CMAKE_INSIST_FIND_PACKAGE_simint=ON \
Expand Down
12 changes: 8 additions & 4 deletions external/upstream/pcmsolver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${ENABLE_PCMSolver})
find_package(PCMSolver 1.2.1 CONFIG QUIET)
find_package(PCMSolver 1.2.3 CONFIG QUIET)

if(${PCMSolver_FOUND})
get_property(_loc TARGET PCMSolver::pcm PROPERTY LOCATION)
Expand All @@ -21,9 +21,12 @@
set(_so_only OFF)
endif()

set(_pcmsolver_dir "share/cmake/PCMSolver")

ExternalProject_Add(pcmsolver_external
#URL https://github.com/PCMSolver/pcmsolver/archive/v1.3.1.tar.gz
URL https://github.com/loriab/pcmsolver/archive/v1211.tar.gz
#URL https://github.com/loriab/pcmsolver/archive/v1211.tar.gz
URL https://github.com/loriab/pcmsolver/archive/v123_plus_ming.tar.gz
UPDATE_COMMAND ""
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
Expand All @@ -35,7 +38,8 @@
-DPYMOD_INSTALL_LIBDIR=${PYMOD_INSTALL_LIBDIR}
-DCMAKE_INSTALL_DATADIR=${CMAKE_INSTALL_DATADIR}
-DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR}
-DPYTHON_INTERPRETER=${Python_EXECUTABLE}
-DCMAKECONFIG_INSTALL_DIR=${_pcmsolver_dir}
-DPython_EXECUTABLE=${Python_EXECUTABLE}
-DSTATIC_LIBRARY_ONLY=${_a_only}
-DSHARED_LIBRARY_ONLY=${_so_only}
-DENABLE_OPENMP=OFF
Expand All @@ -55,7 +59,7 @@
-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS})

set(PCMSolver_DIR ${STAGED_INSTALL_PREFIX}/share/cmake/PCMSolver CACHE PATH "path to internally built PCMSolverConfig.cmake" FORCE)
set(PCMSolver_DIR ${STAGED_INSTALL_PREFIX}/${_pcmsolver_dir} CACHE PATH "path to internally built PCMSolverConfig.cmake" FORCE)
endif()
else()
add_library(pcmsolver_external INTERFACE) # dummy
Expand Down
1 change: 1 addition & 0 deletions psi4/src/psi4/libpsipcm/psipcm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ PCM::PCM(const std::string &pcmsolver_parsed_fname, int print_level, std::shared

context_ = detail::init_PCMSolver(pcmsolver_parsed_fname_, molecule);
outfile->Printf(" **PSI4:PCMSOLVER Interface Active**\n");
pcmsolver_citation(detail::host_writer);
pcmsolver_print(context_.get());
ntess_ = pcmsolver_get_cavity_size(context_.get());
ntessirr_ = pcmsolver_get_irreducible_cavity_size(context_.get());
Expand Down
2 changes: 1 addition & 1 deletion tests/pcmsolver/dft/input.dat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

nucenergy = 12.0367196636183458 # TEST
polenergy = -0.0060921680888660 # TEST
totalenergy = -56.55724707152022 # TEST
totalenergy = -56.55724704841 # TEST # adjusted after PEDRA pruning in v1.2.3 -56.55724707152022

molecule NH3 {
N -0.0000000001 -0.1040380466 0.0000000000
Expand Down
9 changes: 5 additions & 4 deletions tests/pcmsolver/dipole/input.dat
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ ref_energies = { 'HF' : [-76.0203919443, -76.0223213132, # TEST
-76.4165432999241, -76.42017454551062] # TEST
}
# Reference values, in atomic units, for finite difference formulas
ref_3pt = { 'HF' : 0.9646844572, # TEST
'B3LYP' : 0.9078186547597511 # TEST
# * adjusted after PEDRA pruning in v1.2.3
ref_3pt = { 'HF' : 0.9646843842, #TEST 0.9646844572
'B3LYP' : 0.9078185863, #TEST 0.9078186547597511
}
ref_5pt = { 'HF' : 0.9646862512, # TEST
'B3LYP' : 0.9078210741364501 # TEST
ref_5pt = { 'HF' : 0.9646861782, #TEST 0.9646862512
'B3LYP' : 0.9078210056, #TEST 0.9078210741364501
}

molecule h2o {
Expand Down
2 changes: 1 addition & 1 deletion tests/pcmsolver/ghost/input.dat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

nucenergy = 12.0367196636183458 #TEST
polenergy = -0.0059568153047844 #TEST
totalenergy = -55.802798823871 #TEST
totalenergy = -55.802798786575 #TEST # adjusted after PEDRA pruning in v1.2.3 -55.802798823871

ref={}
ref['noCP'] = 0.011128150727074626 #TEST
Expand Down
6 changes: 3 additions & 3 deletions tests/pcmsolver/scf/input.dat
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

nucenergy = 12.0367196636183458 #TEST
polenergy = -0.0053060443528559 #TEST
totalenergy = -55.4559426361734040 #TEST
totalenergy = -55.455942603983 #TEST # adjusted after PEDRA pruning in v1.2.3 -55.4559426361734040

df_polenergy = -0.0053052777747797 #TEST
df_totalenergy = -55.4560830407201300 #TEST
df_totalenergy = -55.456083008532 #TEST # ditto v1.2.3 -55.4560830407201300
cd_polenergy = -0.0053065685148796 #TEST
cd_totalenergy = -55.4559161829875300 #TEST
cd_totalenergy = -55.455916150789 #TEST # ditto v1.2.3 -55.4559161829875300

molecule NH3 {
N -0.0000000001 -0.1040380466 0.0000000000
Expand Down
2 changes: 1 addition & 1 deletion tests/pytests/test_addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def test_pcmsolver(how, request):

nucenergy = 12.0367196636183458
polenergy = -0.0053060443528559
totalenergy = -55.4559426361734040
totalenergy = -55.455942603983 # adjusted after PEDRA pruning in v1.2.3 -55.4559426361734040

NH3 = psi4.geometry("""
symmetry c1
Expand Down
2 changes: 1 addition & 1 deletion tests/pytests/test_addons_qcschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def test_pcmsolver():

nucenergy = 12.0367196636183458
polenergy = -0.0053060443528559
totalenergy = -55.4559426361734040
totalenergy = -55.455942603983 # adjusted after PEDRA pruning in v1.2.3 -55.4559426361734040

# pcm_string = """
# Units = Angstrom
Expand Down

0 comments on commit e8c5544

Please sign in to comment.