def test_project_init_guess_usehfcore(self):
    mo1 = mcscf.addons.project_init_guess(mcr_prg, mfr.mo_coeff, use_hf_core=True)
    s1 = reduce(numpy.dot, (mo1.T, mfr_prg.get_ovlp(), mo1))
    self.assertEqual(numpy.count_nonzero((numpy.linalg.eigh(s1)[0] > 1e-10)), s1.shape[0])
    self.assertAlmostEqual(numpy.linalg.norm(s1), 5.291502622129184, 9)
    s2 = reduce(numpy.dot, (mo1[:, :5].T, mfr_prg.get_ovlp(), mfr_prg.mo_coeff[:, :5]))
    self.assertEqual(numpy.count_nonzero((numpy.linalg.eigh(s2)[0] > 1e-10)), s2.shape[0])
    self.assertAlmostEqual(numpy.linalg.norm(s2), 2.23606797749979, 9)
def test_project_init_guess_usehfcore(self):
    mo1 = mcscf.addons.project_init_guess(mcr_prg, mfr.mo_coeff, use_hf_core=True)
    s1 = reduce(numpy.dot, (mo1.T, mfr_prg.get_ovlp(), mo1))
    self.assertEqual(numpy.count_nonzero((numpy.linalg.eigh(s1)[0] > 1e-10)), s1.shape[0])
    self.assertAlmostEqual(numpy.linalg.norm(s1), 5.291502622129184, 9)
    s2 = reduce(numpy.dot, (mo1[:, :5].T, mfr_prg.get_ovlp(), mfr_prg.mo_coeff[:, :5]))
    self.assertEqual(numpy.count_nonzero((numpy.linalg.eigh(s2)[0] > 1e-10)), s2.shape[0])
    self.assertAlmostEqual(numpy.linalg.norm(s2), 2.23606797749979, 9)