Skip to content

Commit

Permalink
allow and prefer simple-dftd3 and mctc-gcp (#2791)
Browse files Browse the repository at this point in the history
* allow and prefer simple-dftd3 and mctc-gcp

* sdftd3: fixups

* compensate dftd3 pairwise matrix

* fix up last tests

* actually have the right qcng now

* some docs

* qcng 0.26

* fixes

* more docs

* yaml format fixes

* bit more docs
  • Loading branch information
loriab committed Dec 6, 2022
1 parent e6e8deb commit 406c0e8
Show file tree
Hide file tree
Showing 32 changed files with 599 additions and 307 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
pytest-xdist \
msgpack-python \
conda-forge::qcelemental \
conda-forge::qcengine=0.25.0 \
conda-forge::qcengine=0.26.0 \
conda-forge::optking \
scipy
source activate p4env
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
conda-forge::libxc ^
psi4/label/dev::libint2=*=h2e52968_4 ^
conda-forge::qcelemental ^
conda-forge::qcengine=0.25.0 ^
conda-forge::qcengine=0.26.0 ^
conda-forge::optking ^
scipy
conda install --only-deps anaconda-client
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/ecosystem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
- psi4/label/dev::gau2grid
- psi4/label/dev::libint2
- psi4/label/dev::qcelemental
- psi4/label/dev::qcengine=0.25.0
- psi4/label/dev::qcengine=0.26.0
- psi4/label/dev::libxc
# qc opt'l
- psi4/label/dev::ambit
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
- psi4/label/dev::gau2grid
- psi4/label/dev::libint2
- psi4/label/dev::qcelemental
- psi4/label/dev::qcengine=0.25.0
- psi4/label/dev::qcengine=0.26.0
- psi4/label/dev::libxc
# qc req'd from buildtime
- psi4/label/dev::ambit
Expand All @@ -190,10 +190,10 @@ jobs:
- psi4/label/dev::pcmsolver
- psi4/label/dev::simint
# qc opt'l
- psi4/label/dev::dftd3
#- psi4/label/dev::dftd3
- psi4/label/dev::pylibefp
- psi4/label/dev::fockci
- psi4/label/dev::gcp
#- psi4/label/dev::gcp
- psi4/label/dev::mp2d
- psi4/label/dev::resp
- psi4/label/dev::snsmp2
Expand All @@ -217,13 +217,15 @@ jobs:
# qc opt'l
- adcc
- cppe
- dftd3-python
- dftd4-python
- gcp-correction
- geometric
- openfermion>=1.0
- openfermionpsi4
- pyddx
- pymdi
- qcengine=0.25.0
- qcengine=0.26.0
- qcfractal
- qcportal
Expand Down Expand Up @@ -265,7 +267,7 @@ jobs:
- gau2grid
- psi4/label/dev::libint2
- qcelemental
- qcengine=0.25.0
- qcengine=0.26.0
- libxc
# qc req'd from buildtime
#- psi4/label/dev::ambit
Expand All @@ -278,11 +280,13 @@ jobs:
# qc opt'l
#- adcc
#- cppe
- psi4/label/dev::dftd3
#- psi4/label/dev::dftd3
- dftd3-python
- dftd4-python
#- psi4/label/dev::pylibefp
#- psi4/label/dev::fockci
- psi4/label/dev::gcp
#- psi4/label/dev::gcp
- gcp-correction
- geometric
#- psi4/label/dev::mp2d
#- openfermionpsi4
Expand Down
7 changes: 4 additions & 3 deletions conda/win/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ requirements:
- pytest>=7.0.1
- python={{ PY_VER }}
- qcelemental=0.25.1
- qcengine=0.25.0
- qcengine=0.26.0
- msgpack-python
- optking
- gau2grid
- libint2 2.6.0 h2e52968_4
- libxc
- dftd3
- gcp
- dftd3-python
- gcp-correction
- scipy

build:
Expand Down
6 changes: 6 additions & 0 deletions doc/sphinxman/source/build_planning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,14 @@ Additionally, there are runtime-loaded capabilities:

* dftd3 |w---w| :ref:`[what is DFTD3?] <sec:dftd3>`

* simple-dftd3 |w---w| :ref:`[what is DFTD3?] <sec:dftd3>` (Nov 2022; added by v1.7) preferred alternative to dftd3 https://github.com/dftd3/simple-dftd3

* gcp |w---w| :ref:`[what is gCP?] <sec:gcp>`

* mctc-gcp |w---w| :ref:`[what is gCP?] <sec:gcp>` (Nov 2022; added by v1.7) preferred alternative to gcp https://github.com/grimme-lab/gcp

* dftd4 |w---w| <sec:dftd3> https://github.com/dftd4/dftd4

* mrcc |w---w| :ref:`[what is MPCC?] <sec:mrcc>`

* v2rdm_casscf |w---w| :ref:`[what is v2rdm_casscf?] <sec:v2rdm_casscf>`
Expand Down
144 changes: 96 additions & 48 deletions doc/sphinxman/source/dftd3.rst

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions doc/sphinxman/source/fisapt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,23 @@ be breaking down. We also *strongly discourage* the cutting of double,
triple, or aromatic bonding motifs when partitioning the molecule into fragments
|w--w| cuts across only simple sigma bonds are encouraged.

.. caution:: November 2022, previous to QCEngine v0.26.0 and Psi4
v1.7.0, there was a scaling inconsistency in the pairwise analysis
such that :psivar:`2-BODY PAIRWISE DISPERSION CORRECTION ANALYSIS`
was doubled when generated from dftd3 compared to the output from other
programs (s-dftd3 and dftd4). This shows up in the QCVariable and in the
``Empirical_Disp.dat`` file written during ``energy("fisapt0-d3")`` (all
-D3 variants). Fortunately, the ``fsapt.py`` script compensated
for dftd3 (by far the most used program for this task). Users of the
pairwise analysis should take care to use the new QCEngine
AND ``fsapt.py`` script distributed with NEW Psi4. ``fisapt0-d4`` run
with previous Psi4/fsapt.py will be wrong. ``fisapt0-d3`` run with previous
Psi4/fsapt.py but new QCEngine will be wrong. If you've got legacy
calculations, it is extremely easy to check or reanalyze them to
salvage them, so please contact the developers with the circumstances
for guidance.


Order-1 Visualization with PyMol
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
28 changes: 18 additions & 10 deletions doc/sphinxman/source/gcp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,24 @@ Installation
* .. image:: https://anaconda.org/psi4/gcp/badges/version.svg
:target: https://anaconda.org/psi4/gcp

* gCP is available as a conda package for Linux and macOS (and Windows, through the Ubuntu shell).
* There are two implementations of gCP; see :ref:`table:empdispimpl` . The newer
"mctc" one is preferred, while the older "classic" one will work for the immediate future.
|PSIfour| will automatically select whichever is available.

* gCP is available as a conda package for Linux and macOS and Windows.

* If using the Psi4conda installer, gCP has already been installed alongside.

* If using the |PSIfour| conda package, the gcp conda package can
be obtained through ``conda install gcp -c psi4`` or ``conda install
psi4-rt -c psi4``.
* If using the |PSIfour| conda package, the classic gcp conda package can
be obtained through ``conda install gcp -c psi4`` or the newer implementation
through ``conda install gcp-correction -c conda-forge``.

* If using |PSIfour| built from source, and anaconda or miniconda has
already been installed (instructions at :ref:`sec:quickconda`),
the gcp executable can be obtained through ``conda install gcp -c psi4``.
the gcp executable can be obtained through ``conda install gcp -c psi4``
or ``conda install gcp-correction -c conda-forge``.

* To remove a conda installation, ``conda remove gcp``.
* To remove a conda installation, ``conda remove gcp`` or ``conda remove gcp-correction``.

**Source**

Expand All @@ -81,8 +86,9 @@ Installation
(essentially, download the freely available tarball, unpack the source,
edit the Makefile to select a Fortran compiler, and run make).

To be used by |PSIfour|, the program binary (``gcp``) must be
found in your :envvar:`PSIPATH` or :envvar:`PATH` (in that order). If
To be used by |PSIfour|, the program binary (``gcp`` or ``mctc-gcp``) must be
found in your :envvar:`PATH` so that QCEngine can detect it. Check if and where
found through ``qcengine info``. If
|PSIfour| is unable to execute the binary, an error will be reported.
To preferentially use a particular gcp compilation, simply adjust its
position in the path environment variables.
Expand All @@ -93,8 +99,10 @@ Running gCP

At present there is a limited interface to gCP that is used
only to implement the "HF-3c" [Sure:2013:1672]_ and "PBEh-3c"
[Grimme:2015:054107]_ methods (both energy and gradient). The :ref:`DFTD3
<sec:dftd3>` executable must also be available for these methods to
[Grimme:2015:054107]_ methods (both energy and gradient). The interface
can use classic or mctc-gcp executables interchangeably and will prefer the latter.
A :ref:`DFTD3 <sec:dftd3>` executable, classic or simple-dftd3,
must also be available for these methods to
run. Unlike every other method in |PSIfour|, if a basis set has not been
set, these will default to their intended basis sets: MINIX for HF-3c
and def2-mSVP for PBEh-3c. If a basis has previously been set, but you
Expand Down
5 changes: 5 additions & 0 deletions doc/sphinxman/source/glossary_psivariables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2033,3 +2033,8 @@ PSI Variables by Alpha

Vibrational zero-point energy [E_h] at 0 [K].

.. psivar:: 2-BODY PAIRWISE DISPERSION CORRECTION ANALYSIS

The interatomic contributions to the dispersion correction [E_h].
Sums to the dispersion energy.

4 changes: 2 additions & 2 deletions external/upstream/qcengine/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if(NOT (${CMAKE_DISABLE_FIND_PACKAGE_qcengine}))
include(FindPythonModule)
find_python_module(qcengine ATLEAST 0.25.0 QUIET)
find_python_module(qcengine ATLEAST 0.26.0 QUIET)
endif()

if(${qcengine_FOUND})
Expand All @@ -21,7 +21,7 @@ else()
ExternalProject_Add(qcengine_external
DEPENDS qcelemental_external
BUILD_ALWAYS 1
URL https://github.com/MolSSI/QCEngine/archive/v0.25.0.tar.gz
URL https://github.com/MolSSI/QCEngine/archive/v0.26.0.tar.gz
CONFIGURE_COMMAND ""
UPDATE_COMMAND ""
BUILD_COMMAND ${Python_EXECUTABLE} setup.py build
Expand Down
8 changes: 4 additions & 4 deletions psi4/driver/procrouting/dft/dh_functionals.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"ss": 0.40,
},
"dispersion": {
"type": "d3bj",
"type": "d3bj2b",
"params": {
"s6": 0.57,
"a2": 5.4,
Expand Down Expand Up @@ -325,7 +325,7 @@
"ss": 0.22
},
"dispersion": {
"type": "d3bj",
"type": "d3bj2b",
"params": {
"s6": 0.48,
"a2": 5.6,
Expand Down Expand Up @@ -480,7 +480,7 @@
"citation": ' S. Kozuch, J.M.L. Martin, J. Comp. Chem., 34, 2327-2344, 2013\n',
"description": ' DSD-PBEPBE-D3BJ Dispersion-corrected SCS Double Hybrid XC Functional\n',
"dispersion": {
"type": "d3bj",
"type": "d3bj2b",
"params": {
"s6": 0.78,
"a2": 6.1,
Expand Down Expand Up @@ -758,7 +758,7 @@ def get_pwpb95_tweaks():
"citation": ' S. Kozuch, J.M.L. Martin, J. Comp. Chem., 34, 2327-2344, 2013\n',
"description": ' DSD-PBEB95-D3BJ Dispersion-corrected SCS Double Hybrid Meta-GGA XC Functional\n',
"dispersion": {
"type": "d3bj",
"type": "d3bj2b",
"params": {
"s6": 0.61,
"a2": 6.2,
Expand Down
8 changes: 4 additions & 4 deletions psi4/driver/procrouting/dft/gga_functionals.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
"GGA_XC_B97_D": {}
},
"dispersion": {
"type": "d3zero",
"type": "d3zero2b",
"params": {
's6': 1.0,
's8': 0.909,
Expand All @@ -256,7 +256,7 @@
"GGA_XC_B97_D": {}
},
"dispersion": {
"type": "d3bj",
"type": "d3bj2b",
"params": {
's6': 1.000,
's8': 2.2609,
Expand All @@ -272,7 +272,7 @@
"GGA_XC_B97_D": {}
},
"dispersion": {
"type": "d3mzero",
"type": "d3mzero2b",
"params": {
's6': 1.000,
's8': 1.020078,
Expand All @@ -288,7 +288,7 @@
"GGA_XC_B97_D": {}
},
"dispersion": {
"type": "d3mbj",
"type": "d3mbj2b",
"params": {
's6': 1.000,
's8': 1.206988,
Expand Down
8 changes: 4 additions & 4 deletions psi4/driver/procrouting/dft/hyb_functionals.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
},
"c_functionals": {},
"dispersion": {
"type": "d3bj",
"type": "d3bj2b",
"params": {
's6': 1.000,
's8': 0.8777,
Expand Down Expand Up @@ -149,7 +149,7 @@
}
},
"dispersion": {
"type": "d3bj",
"type": "d3bj2b",
"params": {
's6': 1.000,
's8': 0.0000,
Expand Down Expand Up @@ -534,7 +534,7 @@ def get_pw6b95_tweaks():
},
"dispersion": {
"nlc": False,
"type": "d3bj",
"type": "d3bj2b",
"citation": ' A. Najib, L. Goerigk, J. Comput. Theory Chem.,14, 5725, 2018\n',
"params": {
's6': 1.000,
Expand All @@ -557,7 +557,7 @@ def get_pw6b95_tweaks():
},
"dispersion": {
"nlc": False,
"type": "d3bj",
"type": "d3bj2b",
"citation": ' A. Najib, L. Goerigk, J. Comput. Theory Chem.,14 5725, 2018\n',
"params": {
's6': 1.000,
Expand Down
2 changes: 1 addition & 1 deletion psi4/driver/procrouting/dft/libxc_functionals.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
funcs.append({"name": "wB97" , "xc_functionals": {"HYB_GGA_XC_WB97" : {}}})
funcs.append({"name": "wB97X" , "xc_functionals": {"HYB_GGA_XC_WB97X" : {}}})
funcs.append({"name": "wB97X-D" , "xc_functionals": {"HYB_GGA_XC_WB97X_D" : {}}, "dispersion": {"type": "chg", "params": {"s6": 1.0}}})
funcs.append({"name": "wB97X-D3" , "xc_functionals": {"HYB_GGA_XC_WB97X_D3" : {}}, "dispersion": {"type": "d3zero", "params": {'s6': 1.0,'s8':1.0,'sr6': 1.281,'sr8': 1.094,'alpha6': 14.0}}})
funcs.append({"name": "wB97X-D3" , "xc_functionals": {"HYB_GGA_XC_WB97X_D3" : {}}, "dispersion": {"type": "d3zero2b", "params": {'s6': 1.0,'s8':1.0,'sr6': 1.281,'sr8': 1.094,'alpha6': 14.0}}})
funcs.append({"name": "LRC-wPBEh" , "xc_functionals": {"HYB_GGA_XC_LRC_WPBEH" : {}}})
funcs.append({"name": "wB97X-V" , "xc_functionals": {"HYB_GGA_XC_WB97X_V" : {}}, "alias": ["WB97XV"]})
#funcs.append({"name": "LCY-PBE" , "xc_functionals": {"HYB_GGA_XC_LCY_PBE" : {}}}) # LCY range separation not supported by psi4
Expand Down
2 changes: 1 addition & 1 deletion psi4/driver/procrouting/dft/mgga_functionals.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
"MGGA_XC_B97M_V": {}
},
"dispersion": {
"type": "d3bj",
"type": "d3bj2b",
"nlc": False,
"params": {
's6': 1.0000,
Expand Down
Loading

0 comments on commit 406c0e8

Please sign in to comment.