Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
sunqm committed Sep 20, 2023
1 parent 52adda7 commit 37aee50
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions pyscf/solvent/test/test_ddcosmo_tdscf_grad.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
#
4 changes: 3 additions & 1 deletion pyscf/tdscf/rhf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 37aee50

Please sign in to comment.