def grad_elec(cc_grad, t1=None, t2=None, l1=None, l2=None, eris=None, atmlst=None, verbose=lib.logger.INFO): mycc = cc_grad.base if t1 is None: t1 = mycc.t1 if t2 is None: t2 = mycc.t2 if l1 is None: l1 = mycc.l1 if l2 is None: l2 = mycc.l2 if eris is None: eris = mycc.ao2mo() d1 = uccsd_t_rdm._gamma1_intermediates(mycc, t1, t2, l1, l2, eris, for_grad=True) fd2intermediate = lib.H5TmpFile() d2 = uccsd_t_rdm._gamma2_outcore(mycc, t1, t2, l1, l2, eris, fd2intermediate, True) cc_grad = uccsd_grad.Gradients(mycc) de = uccsd_grad.grad_elec(cc_grad, t1, t2, l1, l2, eris, atmlst, d1, d2, verbose) return de
def nuc_grad_method(self): from pyscf.grad import uccsd return uccsd.Gradients(self)