diff --git a/pyscf/tdscf/_lr_eig.py b/pyscf/tdscf/_lr_eig.py index 328c17319..41206dead 100644 --- a/pyscf/tdscf/_lr_eig.py +++ b/pyscf/tdscf/_lr_eig.py @@ -174,7 +174,7 @@ def eigh(aop, x0, precond, tol_residual=1e-5, lindep=1e-12, nroots=1, if x0sym is not None: xs_ir = xs_ir[:row0] - t_size = max(nroots, max_space-len(xs)) + t_size = min(nroots, len(xs)) xt = -w[:t_size,None] * xs[:t_size] xt += ax[:t_size] if x0sym is not None: