Skip to content

Commit

Permalink
Resolve compatibility issue with pyscf 2.8 (pyscf#306)
Browse files Browse the repository at this point in the history
* be compatible with pyscf 2.8

* remove an example

* check convergence

* max_memory = 32000
  • Loading branch information
wxj6000 authored Jan 16, 2025
1 parent 9b694fa commit 1233861
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gpu4pyscf/dft/tests/test_libxc.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_u_LDA(self):

def test_u_GGA(self):
# large errors found in B88 for the spin polarized case
self._check_xc('HYB_GGA_XC_B3LYP', spin=1, fxc_tol=1e-3)
self._check_xc('HYB_GGA_XC_B3LYP', spin=1, fxc_tol=1e-2)
self._check_xc('GGA_X_B88', spin=1, fxc_tol=1e-1)
self._check_xc('GGA_C_PBE', spin=1, fxc_tol=1e-4)

Expand Down
2 changes: 2 additions & 0 deletions gpu4pyscf/mp/mp2.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ def init_amps(self, mo_energy=None, mo_coeff=None, eris=None, with_t2=WITH_T2):
# to_cpu can be reused only when __init__ still takes mf
def to_cpu(self):
mf = self._scf.to_cpu()
if mf.converged:
mf.kernel() # create intermediate variables if converged
from importlib import import_module
mod = import_module(self.__module__.replace('gpu4pyscf', 'pyscf'))
cls = getattr(mod, self.__class__.__name__)
Expand Down
1 change: 1 addition & 0 deletions gpu4pyscf/mp/tests/test_mp2.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def setUpModule():
'O': 'cc-pvdz',}
mol.build()
mol.incore_anyway = True
mol.max_memory = 32000
mf = scf.RHF(mol)
mf.conv_tol = 1e-12
mf.scf()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def initialize_with_default_plat_name(self):
],
cmdclass={'build_py': CMakeBuildPy},
install_requires=[
'pyscf~=2.7.0',
'pyscf~=2.8.0',
'pyscf-dispersion',
f'cupy-cuda{CUDA_VERSION}>=13.0', # Due to expm in cupyx.scipy.linalg and cutensor 2.0
'geometric',
Expand Down

0 comments on commit 1233861

Please sign in to comment.