From f24800e6662917b3dd7223707a6fdf096246a2b7 Mon Sep 17 00:00:00 2001 From: Matthew R Hermes Date: Thu, 30 Jan 2025 13:18:36 -0600 Subject: [PATCH 1/3] Fix LAS-PDFT conventional-integral-direct (#139) Check for the "with_df" attribute properly, using getattr --- my_pyscf/mcpdft/laspdft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/my_pyscf/mcpdft/laspdft.py b/my_pyscf/mcpdft/laspdft.py index a676036d..d4b02041 100644 --- a/my_pyscf/mcpdft/laspdft.py +++ b/my_pyscf/mcpdft/laspdft.py @@ -53,7 +53,7 @@ def get_h2eff(self, mo_coeff=None): if getattr(self._scf, '_eri', None) is not None: eri = ao2mo.full(self._scf._eri, mo_coeff, max_memory=self.max_memory) - elif self.with_df: + elif getattr (self, 'with_df', False): eri = self.with_df.ao2mo(mo_coeff) else: From 7c82c9688f1a3d5e246d4fbc2a9f48abcaf7485d Mon Sep 17 00:00:00 2001 From: Matthew R Hermes Date: Fri, 31 Jan 2025 14:26:46 -0600 Subject: [PATCH 2/3] Try to garbage-collect lassi get_ovlp The get_ovlp function used to ensure we have an orthnormal basis is apparently carrying along the whole lassi op_o2 cruncher object in memory. Set it to None after using it to free things up? --- my_pyscf/lassi/citools.py | 5 ++++- my_pyscf/lassi/lassi.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/my_pyscf/lassi/citools.py b/my_pyscf/lassi/citools.py index f9ac4acb..c3785d38 100644 --- a/my_pyscf/lassi/citools.py +++ b/my_pyscf/lassi/citools.py @@ -128,6 +128,7 @@ def get_orth_basis (ci_fr, norb_f, nelec_frs, _get_ovlp=None): unique, uniq_idx, inverse, cnts = np.unique (nelec_frs, axis=1, return_index=True, return_inverse=True, return_counts=True) if not np.count_nonzero (cnts>1): + _get_ovlp = None def raw2orth (rawarr): return rawarr def orth2raw (ortharr): @@ -153,7 +154,9 @@ def orth2raw (ortharr): xmat = canonical_orth_(ovlp, thr=LINDEP_THRESH) north += xmat.shape[1] manifolds_xmat.append (xmat) - + + _get_ovlp = None + nraw = offs1[-1] def raw2orth (rawarr): col_shape = rawarr.shape[1:] diff --git a/my_pyscf/lassi/lassi.py b/my_pyscf/lassi/lassi.py index 006689ca..b048c780 100644 --- a/my_pyscf/lassi/lassi.py +++ b/my_pyscf/lassi/lassi.py @@ -425,6 +425,7 @@ def _eig_block (las, e0, h1, h2, ci_blk, nelec_blk, rootsym, soc, orbsym, wfnsym # Error catch: linear dependencies in basis raw2orth, orth2raw = citools.get_orth_basis (ci_blk, las.ncas_sub, nelec_blk, _get_ovlp=get_ovlp) + get_ovlp = None xhx = raw2orth (ham_blk.T).T lib.logger.info (las, '%d/%d linearly independent model states', xhx.shape[1], xhx.shape[0]) From 27ed3b0afb24537a42faee453b0639a61e1d3752 Mon Sep 17 00:00:00 2001 From: Matthew R Hermes Date: Mon, 3 Feb 2025 09:50:23 -0600 Subject: [PATCH 3/3] PySCF(-forge) compat check --- pyscf-forge_version.txt | 3 ++- pyscf_version.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyscf-forge_version.txt b/pyscf-forge_version.txt index e704c75d..adcf5b59 100644 --- a/pyscf-forge_version.txt +++ b/pyscf-forge_version.txt @@ -1 +1,2 @@ -git+https://github.com/pyscf/pyscf-forge.git@bc57364652373484eb5ef407a2d53b3c4b6584e2 +git+https://github.com/pyscf/pyscf-forge.git@c6b7f4e6e7b6a045599abcd8ff62c074be3734c6 + diff --git a/pyscf_version.txt b/pyscf_version.txt index c6b221a9..e909bdeb 100644 --- a/pyscf_version.txt +++ b/pyscf_version.txt @@ -1 +1 @@ -git+https://github.com/pyscf/pyscf.git@ccedc56f9b48a024b5727efbdd7f261c4e6194fc +git+https://github.com/pyscf/pyscf.git@fb281dda04a72d77a9d154b0fb8fc06793978bcd