Skip to content

Commit 1233861

Browse files
authored
Resolve compatibility issue with pyscf 2.8 (pyscf#306)
* be compatible with pyscf 2.8 * remove an example * check convergence * max_memory = 32000
1 parent 9b694fa commit 1233861

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

gpu4pyscf/dft/tests/test_libxc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def test_u_LDA(self):
9292

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

gpu4pyscf/mp/mp2.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,8 @@ def init_amps(self, mo_energy=None, mo_coeff=None, eris=None, with_t2=WITH_T2):
349349
# to_cpu can be reused only when __init__ still takes mf
350350
def to_cpu(self):
351351
mf = self._scf.to_cpu()
352+
if mf.converged:
353+
mf.kernel() # create intermediate variables if converged
352354
from importlib import import_module
353355
mod = import_module(self.__module__.replace('gpu4pyscf', 'pyscf'))
354356
cls = getattr(mod, self.__class__.__name__)

gpu4pyscf/mp/tests/test_mp2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def setUpModule():
3737
'O': 'cc-pvdz',}
3838
mol.build()
3939
mol.incore_anyway = True
40+
mol.max_memory = 32000
4041
mf = scf.RHF(mol)
4142
mf.conv_tol = 1e-12
4243
mf.scf()

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def initialize_with_default_plat_name(self):
134134
],
135135
cmdclass={'build_py': CMakeBuildPy},
136136
install_requires=[
137-
'pyscf~=2.7.0',
137+
'pyscf~=2.8.0',
138138
'pyscf-dispersion',
139139
f'cupy-cuda{CUDA_VERSION}>=13.0', # Due to expm in cupyx.scipy.linalg and cutensor 2.0
140140
'geometric',

0 commit comments

Comments
 (0)