diff --git a/pyscf/solvent/test/test_ddcosmo_tdscf_grad.py b/pyscf/solvent/test/test_ddcosmo_tdscf_grad.py index dda53462e8..0a1ef08a67 100644 --- a/pyscf/solvent/test/test_ddcosmo_tdscf_grad.py +++ b/pyscf/solvent/test/test_ddcosmo_tdscf_grad.py @@ -242,3 +242,14 @@ def test_b3lyp_tda(self): if __name__ == "__main__": print("Full Tests for ddcosmo TDDFT gradients") unittest.main() +# import numpy as np +# import scipy.linalg +# heff = np.array( +#[[ 1.41617869e+00, 7.15502977e-02, 2.67682770e-17, 3.66756402e-18], +# [ 7.15502977e-02, 8.13834263e-01, 2.38005396e-17,-2.78892710e-18], +# [ 2.56907012e-17, 2.18916621e-17, 4.26074310e-01,-8.67361738e-18], +# [ 1.35867264e-18,-4.94616573e-18, 1.73472348e-18, 4.26074310e-01],]) +# e, u = scipy.linalg.eig(heff) +# print(e) +# print(u) +# diff --git a/pyscf/tdscf/rhf.py b/pyscf/tdscf/rhf.py index 70b41545ac..16f7b50344 100644 --- a/pyscf/tdscf/rhf.py +++ b/pyscf/tdscf/rhf.py @@ -743,7 +743,9 @@ def trunc_workspace(self, vind, x0, nstates=None, pick=None): heff = lib.einsum('xa,ya->xy', x0.conj(), vind(x0)) e, u = scipy.linalg.eig(heff) # heff not necessarily Hermitian print('heff') - print(heff) + print(abs(heff - heff.conj().T).max()) + print(e) + print(abs(u.imag).max()) e = e.real order = numpy.argsort(e) e = e[order]