Beispiel #1
0
def UCASSCF(mf_or_mol, ncas, nelecas, ncore=None, frozen=None):
    from pyscf import gto
    from pyscf import scf
    if isinstance(mf_or_mol, gto.Mole):
        mf = scf.UHF(mf_or_mol)
    else:
        mf = mf_or_mol

    if not isinstance(mf, scf.uhf.UHF):
        mf = scf.addons.convert_to_uhf(mf, remove_df=True)
    mc = umc1step.UCASSCF(mf, ncas, nelecas, ncore, frozen)
    return mc
Beispiel #2
0
        ['O', (0., 0., 0.)],
        ['H', (0., -0.757, 0.587)],
        ['H', (0., 0.757, 0.587)],
    ]
    mol.basis = {
        'H': 'sto-3g',
        'O': 'sto-3g',
    }
    mol.charge = 1
    mol.spin = 1
    mol.build()

    m = scf.UHF(mol)
    ehf = m.scf()

    mc = umc1step.UCASSCF(m, 4, 4)
    mc.verbose = 4
    mo = m.mo_coeff

    eris0 = _ERIS(mc, mo, 'incore')
    eris1 = _ERIS(mc, mo, 'outcore')
    print('jkcpp', numpy.allclose(eris1.jkcpp, eris0.jkcpp))
    print('jkcPP', numpy.allclose(eris1.jkcPP, eris0.jkcPP))
    print('jC_pp', numpy.allclose(eris1.jC_pp, eris0.jC_pp))
    print('jc_PP', numpy.allclose(eris1.jc_PP, eris0.jc_PP))
    print('aapp ', numpy.allclose(eris1.aapp, eris0.aapp))
    print('aaPP ', numpy.allclose(eris1.aaPP, eris0.aaPP))
    print('AApp ', numpy.allclose(eris1.AApp, eris0.AApp))
    print('AAPP ', numpy.allclose(eris1.AAPP, eris0.AAPP))
    print('appa ', numpy.allclose(eris1.appa, eris0.appa))
    print('apPA ', numpy.allclose(eris1.apPA, eris0.apPA))