def test_nr_CASCI(self): mf = scf.RHF(mol) mf.verbose = 0 mf.kernel() mc = cosmo.cosmo_(mcscf.CASCI(mf, 4, 4)) self.assertAlmostEqual(mc.kernel(mc.sort_mo([3,4,6,7]))[0], -76.0107164465, 8)
def test_nr_CASCI(self): mf = scf.RHF(mol) mf.verbose = 0 mf.kernel() mc = cosmo.cosmo_(mcscf.CASCI(mf, 4, 4)) self.assertAlmostEqual( mc.kernel(mc.sort_mo([3, 4, 6, 7]))[0], -76.0107164465, 8)
def test_nr_CASSCF(self): mf = scf.RHF(mol) mf.verbose = 0 mf.kernel() mc = cosmo.cosmo_(mcscf.CASSCF(mf, 4, 4)) mc.verbose = 4 self.assertAlmostEqual( mc.kernel(mc.sort_mo([3, 4, 6, 7]))[0], -76.0656799183, 8)
def test_nr_CASSCF(self): mf = scf.RHF(mol) mf.verbose = 0 mf.kernel() mc = cosmo.cosmo_(mcscf.CASSCF(mf, 4, 4)) mc.verbose = 4 self.assertAlmostEqual(mc.kernel(mc.sort_mo([3,4,6,7]))[0], -76.0656799183, 8)
def test_nr_rks(self): mf = cosmo.cosmo_(dft.RKS(mol)) mf.xc = 'b3lypg' mf.conv_tol = 1e-11 self.assertAlmostEqual(mf.kernel(), -76.407553915, 9)
def test_nr_rhf(self): mf = cosmo.cosmo_(scf.RHF(mol)) mf.conv_tol = 1e-11 self.assertAlmostEqual(mf.kernel(), -76.0030675691, 9)
################################################## # # Vertical excitation # ################################################## # # 1. Equilibrium solvation for ground state # # "sol.dm = None" allows the solvation relaxing to equilibruim wrt the system # ground state # sol = cosmo.COSMO(mol) sol.dm = None mc = cosmo.cosmo_(mcscf.CASSCF(mf, 5, 6), sol) mo = mc.sort_mo_by_irrep({'Ag':2, 'B1g':1, 'B2g':1, 'B3g':1}) mc.kernel(mo) mo = mc.mo_coeff # # 2. Frozen solvation of ground state for excited states # # Assigning certain density matrix to sol.dm can force the solvent object to # compute the solvation correction with the given density matrix. # sol._dm_guess is the system density matrix of the last iteration from # previous calculation. Setting "sol.dm = sol._dm_guess" freezes the # ground state solvent effects in the excitated calculation. # sol.dm = sol._dm_guess mc = cosmo.cosmo_(mcscf.CASCI(mf, 5, 6), sol)