Exemplo n.º 1
0
    def build_Fme(self, F, L, t1):
        terms = []
        terms.append(self.get_F(F, 'ov').copy())
        terms.append(ndot('nf,mnef->me', t1, self.get_ERI(L, 'oovv')))

        Fme = careful_sum(terms, self.precision)

        return Fme
Exemplo n.º 2
0
    def build_Wmnij(self, ERI, t1, t2):
        terms = []
        terms.append(self.get_ERI(ERI, 'oooo').copy())
        terms.append(ndot('je,mnie->mnij', t1, self.get_ERI(ERI, 'ooov')))
        terms.append(ndot('ie,mnej->mnij', t1, self.get_ERI(ERI, 'oovo')))
        terms.append(
            ndot('ijef,mnef->mnij', self.build_tau(t1, t2),
                 self.get_ERI(ERI, 'oovv')))

        Wmnij = careful_sum(terms, self.precision)

        return Wmnij
Exemplo n.º 3
0
    def build_Fmi(self, F, L, t1, t2):
        terms = []
        terms.append(self.get_F(F, 'oo').copy())
        terms.append(ndot('ie,me->mi', t1, self.get_F(F, 'ov'), prefactor=0.5))
        terms.append(ndot('ne,mnie->mi', t1, self.get_ERI(L, 'ooov')))
        terms.append(
            ndot('inef,mnef->mi', self.build_tilde_tau(t1, t2),
                 self.get_ERI(L, 'oovv')))

        Fmi = careful_sum(terms, self.precision)

        return Fmi
Exemplo n.º 4
0
    def r_T2(self, F, ERI, L, t1, t2, Fae, Fme, Fmi, Wmnij, Wmbej, Wmbje,
             Zmbij):

        terms = []
        if self.precision == "mixed":
            terms.append(0.5 * self.ERI64)
        else:
            terms.append(0.5 * self.get_ERI(ERI, 'oovv').copy())
        terms.append(ndot('ijae,be->ijab', t2, Fae))
        tmp = ndot('mb,me->be', t1, Fme)
        terms.append(ndot('ijae,be->ijab', t2, tmp, prefactor=-0.5))
        terms.append(ndot('imab,mj->ijab', t2, Fmi, prefactor=-1.0))
        tmp = ndot('je,me->jm', t1, Fme)
        terms.append(ndot('imab,jm->ijab', t2, tmp, prefactor=-0.5))
        tmp = self.build_tau(t1, t2)
        terms.append(ndot('mnab,mnij->ijab', tmp, Wmnij, prefactor=0.5))
        terms.append(
            ndot('ijef,abef->ijab',
                 tmp,
                 self.get_ERI(ERI, 'vvvv'),
                 prefactor=0.5))
        terms.append(ndot('ma,mbij->ijab', t1, Zmbij, prefactor=-1.0))
        tmp = t2 - t2.swapaxes(2, 3)
        terms.append(ndot('imae,mbej->ijab', tmp, Wmbej))
        tmp = Wmbej + Wmbje.swapaxes(2, 3)
        terms.append(ndot('imae,mbej->ijab', t2, tmp))
        terms.append(ndot('mjae,mbie->ijab', t2, Wmbje))
        tmp = ndot('ie,ma->imea', t1, t1)
        terms.append(
            ndot('imea,mbej->ijab',
                 tmp,
                 self.get_ERI(ERI, 'ovvo'),
                 prefactor=-1.0))
        tmp = ndot('ie,mb->imeb', t1, t1)
        terms.append(
            ndot('imeb,maje->ijab',
                 tmp,
                 self.get_ERI(ERI, 'ovov'),
                 prefactor=-1.0))
        terms.append(ndot('ie,abej->ijab', t1, self.get_ERI(ERI, 'vvvo')))
        terms.append(
            ndot('ma,mbij->ijab',
                 t1,
                 self.get_ERI(ERI, 'ovoo'),
                 prefactor=-1.0))

        r_T2 = careful_sum(terms, self.precision)
        r_T2 += r_T2.swapaxes(0, 1).swapaxes(2, 3)

        return r_T2
Exemplo n.º 5
0
    def build_Fae(self, F, L, t1, t2):
        terms = []
        terms.append(self.get_F(F, 'vv').copy())
        terms.append(ndot('me,ma->ae', self.get_F(F, 'ov'), t1,
                          prefactor=-0.5))
        terms.append(ndot('mf,mafe->ae', t1, self.get_ERI(L, 'ovvv')))
        terms.append(
            ndot('mnaf,mnef->ae',
                 self.build_tilde_tau(t1, t2),
                 self.get_ERI(L, 'oovv'),
                 prefactor=-1.0))

        Fae = careful_sum(terms, self.precision)

        return Fae
Exemplo n.º 6
0
    def r_T1(self, F, ERI, L, t1, t2, Fae, Fme, Fmi):
        terms = []
        terms.append(self.get_F(F, 'ov').copy())
        terms.append(ndot('ie,ae->ia', t1, Fae))
        terms.append(ndot('ma,mi->ia', t1, Fmi, prefactor=-1.0))
        t2_spinad = 2.0 * t2 - t2.swapaxes(2, 3)
        terms.append(ndot('imae,me->ia', t2_spinad, Fme))
        terms.append(ndot('nf,nafi->ia', t1, self.get_ERI(L, 'ovvo')))
        terms.append(
            ndot('mief,maef->ia', t2_spinad, self.get_ERI(ERI, 'ovvv')))
        terms.append(
            ndot('mnae,nmei->ia', t2, self.get_ERI(L, 'oovo'), prefactor=-1.0))

        r_T1 = careful_sum(terms, self.precision)

        return r_T1
Exemplo n.º 7
0
    def build_Wmbje(self, ERI, t1, t2):
        terms = []
        terms.append(-1.0 * (self.get_ERI(ERI, 'ovov').copy()))
        terms.append(
            ndot('jf,mbfe->mbje',
                 t1,
                 self.get_ERI(ERI, 'ovvv'),
                 prefactor=-1.0))
        terms.append(ndot('nb,mnje->mbje', t1, self.get_ERI(ERI, 'ooov')))
        tmp = (0.5 * t2)
        tmp += np.einsum('jf,nb->jnfb', t1, t1)
        terms.append(ndot('jnfb,mnfe->mbje', tmp, self.get_ERI(ERI, 'oovv')))

        Wmbje = careful_sum(terms, self.precision)

        return Wmbje
Exemplo n.º 8
0
    def build_Wmbej(self, ERI, L, t1, t2):
        terms = []
        terms.append(self.get_ERI(ERI, 'ovvo').copy())
        terms.append(ndot('jf,mbef->mbej', t1, self.get_ERI(ERI, 'ovvv')))
        terms.append(
            ndot('nb,mnej->mbej',
                 t1,
                 self.get_ERI(ERI, 'oovo'),
                 prefactor=-1.0))
        tmp = (0.5 * t2)
        tmp += np.einsum('jf,nb->jnfb', t1, t1)
        terms.append(
            ndot('jnfb,mnef->mbej',
                 tmp,
                 self.get_ERI(ERI, 'oovv'),
                 prefactor=-1.0))
        terms.append(
            ndot('njfb,mnef->mbej', t2, self.get_ERI(L, 'oovv'),
                 prefactor=0.5))

        Wmbej = careful_sum(terms, self.precision)

        return Wmbej