예제 #1
0
def trans_rdm1s(cibra, ciket, norb, nelec, link_index=None):
    if link_index is None:
        if isinstance(nelec, (int, numpy.integer)):
            neleca = nelec // 2
        else:
            neleca, nelecb = nelec
            assert neleca == nelecb
        link_index = cistring.gen_linkstr_index(range(norb), neleca)
    rdm1a = rdm.make_rdm1("FCItrans_rdm1a", cibra, ciket, norb, nelec, link_index)
    rdm1b = rdm.make_rdm1("FCItrans_rdm1b", cibra, ciket, norb, nelec, link_index)
    return rdm1a, rdm1b
예제 #2
0
def trans_rdm1s(cibra, ciket, norb, nelec, link_index=None):
    if link_index is None:
        if isinstance(nelec, (int, numpy.number)):
            neleca = nelec // 2
        else:
            neleca, nelecb = nelec
            assert (neleca == nelecb)
        link_index = cistring.gen_linkstr_index(range(norb), neleca)
    rdm1a = rdm.make_rdm1('FCItrans_rdm1a', cibra, ciket, norb, nelec,
                          link_index)
    rdm1b = rdm.make_rdm1('FCItrans_rdm1b', cibra, ciket, norb, nelec,
                          link_index)
    return rdm1a, rdm1b
예제 #3
0
def make_rdm1s(fcivec, norb, nelec, link_index=None):
    rdm1 = rdm.make_rdm1('FCImake_rdm1a', fcivec, fcivec,
                         norb, nelec, link_index)
    return (rdm1, rdm1)
예제 #4
0
def make_rdm1s(fcivec, norb, nelec, link_index=None):
    rdm1 = rdm.make_rdm1('FCImake_rdm1a', fcivec, fcivec, norb, nelec,
                         link_index)
    return rdm1, rdm1
예제 #5
0
def make_rdm1(fcivec, norb, nelec, link_index=None):
    rdm1 = rdm.make_rdm1("FCImake_rdm1a", fcivec, fcivec, norb, nelec, link_index)
    return rdm1 * 2