def test_state_specific(self):
    mc = mcscf.CASSCF(mfr, 4, 4)
    mc.fcisolver = fci.solver(mol, singlet=False)
    mc.state_specific_(state=1)
    e = mc.kernel()[0]
    self.assertAlmostEqual(e, (- 108.70065770892457), 7)
    dm1 = mc.analyze()
    self.assertAlmostEqual(lib.fp(dm1[0]), 0.5460528313909851, 4)
    mc = mcscf.CASSCF(mfr, 4, 4)
    mc.state_specific_(state=0)
    e = mc.kernel()[0]
    self.assertAlmostEqual(mc.e_tot, mcr.e_tot, 7)
    dm1 = mc.analyze()
    dmref = mcr.analyze()
    self.assertAlmostEqual(float(abs((dm1[0] - dmref[0])).max()), 0, 4)
def test_state_specific(self):
    mc = mcscf.CASSCF(mfr, 4, 4)
    mc.fcisolver = fci.solver(mol, singlet=False)
    mc.state_specific_(state=1)
    e = mc.kernel()[0]
    self.assertAlmostEqual(e, (- 108.70065770892457), 7)
    dm1 = mc.analyze()
    self.assertAlmostEqual(lib.fp(dm1[0]), 0.5460528313909851, 4)
    mc = mcscf.CASSCF(mfr, 4, 4)
    mc.state_specific_(state=0)
    e = mc.kernel()[0]
    self.assertAlmostEqual(mc.e_tot, mcr.e_tot, 7)
    dm1 = mc.analyze()
    dmref = mcr.analyze()
    self.assertAlmostEqual(float(abs((dm1[0] - dmref[0])).max()), 0, 4)