diff --git a/gpu4pyscf/df/tests/test_df_geomopt.py b/gpu4pyscf/df/tests/test_df_geomopt.py index a25267c5..4bb7ae1e 100644 --- a/gpu4pyscf/df/tests/test_df_geomopt.py +++ b/gpu4pyscf/df/tests/test_df_geomopt.py @@ -82,7 +82,8 @@ def test_df_rhf_geomopt(self): assert np.linalg.norm(coords - coords_qchem) < 1e-4 def test_df_uks_geomopt(self): - mf = uks.UKS(mol, xc=xc, disp=disp).density_fit() + mf = uks.UKS(mol, xc=xc).density_fit() + mf.disp = disp mf.grids.level = grids_level mf.kernel() mol_eq = optimize(mf, maxsteps=20) diff --git a/gpu4pyscf/dft/roks.py b/gpu4pyscf/dft/roks.py index 58843d78..aeed01ad 100644 --- a/gpu4pyscf/dft/roks.py +++ b/gpu4pyscf/dft/roks.py @@ -24,7 +24,6 @@ from gpu4pyscf.lib import utils class ROKS(rks.KohnShamDFT, ROHF): - from gpu4pyscf.lib.utils import to_cpu, to_gpu, device def __init__(self, mol, xc='LDA,VWN'): ROHF.__init__(self, mol) diff --git a/gpu4pyscf/grad/tests/test_geomopt.py b/gpu4pyscf/grad/tests/test_geomopt.py index a8506d14..ef4520d9 100644 --- a/gpu4pyscf/grad/tests/test_geomopt.py +++ b/gpu4pyscf/grad/tests/test_geomopt.py @@ -81,7 +81,8 @@ def test_rhf_geomopt(self): assert np.linalg.norm(coords - coords_qchem) < 1e-4 def test_uks_geomopt(self): - mf = uks.UKS(mol, xc=xc, disp=disp) + mf = uks.UKS(mol, xc=xc) + mf.disp = disp mf.grids.level = grids_level mf.kernel() mol_eq = optimize(mf, maxsteps=20) diff --git a/gpu4pyscf/tdscf/tests/test_tdrhf.py b/gpu4pyscf/tdscf/tests/test_tdrhf.py index 4d17f1c6..3817051f 100644 --- a/gpu4pyscf/tdscf/tests/test_tdrhf.py +++ b/gpu4pyscf/tdscf/tests/test_tdrhf.py @@ -33,7 +33,7 @@ def setUpClass(cls): mol.basis = '631g' mol.symmetry = True cls.mol = mol.build() - cls.mf = mf = scf.RHF(mol).to_gpu().run() + cls.mf = scf.RHF(mol).to_gpu().run() cls.df_mf = scf.RHF(mol).to_gpu().density_fit().run() cls.nstates = 5 # make sure first 3 states are converged