Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAPT(DFT) MO disk I/O optimization & Exchange-Dispersion scaling scheme update #2481

Merged
merged 46 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
d681040
Added stub for computing GRAC shift
yxie326 Mar 5, 2021
2e29673
dfhelper.cc
yxie326 Mar 6, 2021
157493b
debug
yxie326 Mar 7, 2021
1025257
SAPT(DFT) exch-disp scaling
yxie326 Jul 30, 2021
4d4adcf
timer revised
yxie326 Sep 24, 2021
72c782a
in-core AO integral release
yxie326 Oct 5, 2021
f02179b
direct_iaQ
yxie326 Nov 9, 2021
8782131
minor bug fix
yxie326 Nov 12, 2021
03fbee4
bug fixes and SAPT(HF) optimization
yxie326 Mar 16, 2022
f9eeac9
Removed GRAC shift computations
yxie326 Mar 16, 2022
7e79ca3
Removed clear_AO()
yxie326 Mar 30, 2022
8bdb7a4
update reference
yxie326 Mar 30, 2022
822183f
Add release AO flag for DFHelper
yxie326 Apr 18, 2022
e9b7c86
fix delta HF
yxie326 Apr 19, 2022
a0e4701
Fix SAPT(HF) delta HF issue
yxie326 Apr 19, 2022
c8fbbcd
comments fix
yxie326 May 9, 2022
cbb6fee
Create new tests for FIXED exchange-dispersion scaling
yxie326 Oct 15, 2022
2c1edad
Added warning message for changing in default exchdisp scaling scheme
yxie326 Oct 15, 2022
9e48e73
Update psi4/src/read_options.cc
yxie326 Oct 15, 2022
009bde5
Update psi4/src/psi4/lib3index/dfhelper.cc
yxie326 Oct 15, 2022
863b5d5
Redefined set_release_AO()
yxie326 Oct 15, 2022
4e3fc2b
Redefined set_release_AO()
yxie326 Oct 15, 2022
66b9e43
Update tests/sapt-dft2/input.dat
yxie326 Oct 19, 2022
75cd87a
Update tests/sapt-dft1/input.dat
yxie326 Oct 19, 2022
aaa1f46
Update psi4/src/read_options.cc
yxie326 Oct 19, 2022
8e3298d
Update psi4/src/read_options.cc
yxie326 Oct 19, 2022
36643bb
Update doc/sphinxman/source/sapt.rst
yxie326 Oct 19, 2022
c935162
Update doc/sphinxman/source/sapt.rst
yxie326 Oct 19, 2022
71eca23
Added output for exch-disp scaling
yxie326 Oct 19, 2022
98d2830
Clean up exch-disp scaling blocks
yxie326 Oct 19, 2022
f2f6ded
Added delta HF to SAPT(DFT) tests
yxie326 Oct 19, 2022
2ba18ce
LAB suggestions
yxie326 Oct 20, 2022
8f77f26
Update psi4/src/psi4/lib3index/dfhelper.h
yxie326 Oct 27, 2022
e014dfe
Update psi4/src/psi4/lib3index/dfhelper.h
yxie326 Oct 27, 2022
ac516e4
Update psi4/src/psi4/lib3index/dfhelper.cc
yxie326 Oct 27, 2022
5c35ec4
Update psi4/src/psi4/libsapt_solver/fdds_disp.cc
yxie326 Oct 27, 2022
f61c9e7
Update psi4/src/psi4/libsapt_solver/fdds_disp.cc
yxie326 Oct 27, 2022
3cab8db
Update psi4/src/libsapt_solver/fdds_disp.cc
yxie326 Oct 27, 2022
f49e2e3
Update psi4/driver/procrouting/sapt/sapt_proc.py
yxie326 Oct 27, 2022
a53c5e3
Update quicktest to CMakeLists.txt
yxie326 Oct 27, 2022
410b991
updated psi4/tests/sapt-compare/test_input.py
yxie326 Oct 28, 2022
8e5f410
trigger test
yxie326 Nov 2, 2022
4ad5683
Update doc/sphinxman/source/sapt.rst
yxie326 Nov 4, 2022
3d248f6
updating docs
yxie326 Nov 7, 2022
ed77db3
updating docs
yxie326 Nov 7, 2022
1902af1
Update doc/sphinxman/source/sapt.rst
loriab Nov 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion doc/sphinxman/source/bibliography.rst
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,14 @@ Bibliography
A. Hesselmann and T. Korona,
*J. Chem. Phys.* **141**, 094107 (2014).

.. [Podeszwa:2006:400]
R. Podeszwa, R. Bukowski, and K. Szalewicz,
*J. Chem. Theory Comput.* **2**, 400 (2006).

.. [Xie:2022:024801]
Y. Xie, D. G. A. Smith, and C. D. Sherrill,
*J. Chem. Phys.*, **157**, 024801 (2022)

.. [Hylleraas:1930:209]
E. Hylleraas
*Z. Phys.* **65**, 209 (1930).
Expand Down Expand Up @@ -613,4 +621,3 @@ Bibliography
"Two new unitary-invariant and size-consistent perturbation theoretical approaches to the electron correlation energy",
R. F. Fink
*Chem. Phys. Lett.*, **428**, 461 (2006)

24 changes: 16 additions & 8 deletions doc/sphinxman/source/sapt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ the molecule as given, and the molecule after one electron has been removed
(e.g., the energy difference between a neutral molecule and its cation).

The values of GRAC shifts should be given in Hartree. For the example above,
the GRAC shift value of both molecules are calculated to be 0.1307, and the
user would specify them using the following keywords::
the GRAC shift value of both molecules are calculated to be 0.1307 (using experimental
IP from CCCBDB), and the user would specify them using the following keywords::


set globals {
Expand Down Expand Up @@ -530,12 +530,20 @@ term needs to be computed with orbital response for good accuracy,
and it is recommended to enable |sapt__sapt_dft_do_hybrid| (set to
``True`` by default). The coupled exchange-dispersion energy is usually
estimated by scaling from the uncoupled value either by a fitted fixed
value as suggested by [Hesselmann:2014:094107]_, or by the ratio of
coupled and uncoupled dispersion energy. This can be controlled by
keyword |sapt__sapt_dft_exch_disp_scale_scheme|, with ``FIXED`` being
the former approach, ``DISP`` being the latter and ``NONE`` for not
scaling and use the uncoupled exchange-dispersion energy directly.

value (suggested initially by [Hesselmann:2014:094107]_ for a local Hartree--Fock (LHF) formulation and then revised
by [Xie:2022:024801]_ for non-LHF) or
by the ratio of
coupled and uncoupled dispersion energy (suggested by [Podeszwa:2006:400]_ ).
This can be controlled by keyword |sapt__sapt_dft_exch_disp_scale_scheme|,
with ``FIXED`` using the Hesselmann/Xie approach (|PSIfours| default prior
to Nov 2022), ``DISP`` using the Podeszwa approach (|PSIfours| default after Nov 2022),
or ``NONE`` for not scaling and using the uncoupled exchange-dispersion
energy directly.

.. warning:: Since Nov 2022, the defaults of options |sapt__sapt_dft_exch_disp_scale_scheme| and |sapt__sapt_dft_exch_disp_fixed_scale|
have been changed. Before, the former defaulted to ``FIXED`` with Hesselmann value of 0.686 for the latter. Now, the former defaults to ``DISP`` and should you instead select ``FIXED``, the default for the latter is the Xie value of 0.770. This might cause
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to the Xie paper the first time you mention it. (The first mention may be in one of my suggestions.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the paper. Rephrased a bit on "Hesselmann appraoch" and "Xie approach"; I would call them "Podeszwa approach" and "Hesselmann approach" respectively instead (see references).

an older version of |PSIfour| to produce a different value of
exchange-dispersion energy from the latest version.
loriab marked this conversation as resolved.
Show resolved Hide resolved

Basic Keywords for SAPT(DFT)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion psi4/driver/procrouting/proc_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def print_ci_results(ciwfn, rname, scf_e, ci_e, print_opdm_no=False):

def prepare_sapt_molecule(sapt_dimer: core.Molecule, sapt_basis: str) -> Tuple[core.Molecule, core.Molecule, core.Molecule]:
"""
Prepares a dimer molecule for a SAPT computations. Returns the dimer, monomerA, and monomerB.
Prepares a dimer molecule for a SAPT computation. Returns the dimer, monomerA, and monomerB.
"""

# Shifting to C1 so we need to copy the active molecule
Expand Down
6 changes: 6 additions & 0 deletions psi4/driver/procrouting/sapt/sapt_mp2_terms.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,18 @@ def df_fdds_dispersion(primary, auxiliary, cache, is_hybrid, x_alpha, leg_points
core.print_out(" (P|Fxc|Q) Thresh: % 8.3e\n" % rho_thresh)

# Build object
core.timer_on("Form FDDS object")
df_matrix_keys = ["Cocc_A", "Cvir_A", "Cocc_B", "Cvir_B"]
fdds_matrix_cache = {key: cache[key] for key in df_matrix_keys}

df_vector_keys = ["eps_occ_A", "eps_vir_A", "eps_occ_B", "eps_vir_B"]
fdds_vector_cache = {key: cache[key] for key in df_vector_keys}

fdds_obj = core.FDDS_Dispersion(primary, auxiliary, fdds_matrix_cache, fdds_vector_cache, is_hybrid)
core.timer_off("Form FDDS object")

# Aux Densities
core.timer_on("Form xc kernel")
D = fdds_obj.project_densities([cache["D_A"], cache["D_B"]])

# Temps
Expand All @@ -125,11 +128,13 @@ def df_fdds_dispersion(primary, auxiliary, cache, is_hybrid, x_alpha, leg_points

# Nuke the densities
del D
core.timer_off("Form xc kernel")

metric = fdds_obj.metric().clone().to_array()
metric_inv = fdds_obj.metric_inv().clone().to_array()

# Integrate
core.timer_on("Time Integration")
core.print_out("\n => Time Integration <= \n\n")

val_pack = ("Omega", "Weight", "Disp20,u", "Disp20", "time [s]")
Expand Down Expand Up @@ -235,6 +240,7 @@ def df_fdds_dispersion(primary, auxiliary, cache, is_hybrid, x_alpha, leg_points

Disp20_uc = -1.0 / (2.0 * np.pi) * total_uc
Disp20_c = -1.0 / (2.0 * np.pi) * total_c
core.timer_off("Time Integration")

core.print_out("\n")
core.print_out(print_sapt_var("Disp20,u", Disp20_uc, short=True) + "\n")
Expand Down
Loading