Exemplo n.º 1
0
 def test_load_mrci_e0(self):
     """
     Load the MRCI and MRCI+Davidson energies from a molpro output file
     """
     mrci_log = MolproLog(os.path.join(self.data_path, 'molpro_mrci.out'))
     mrciq_log = MolproLog(os.path.join(self.data_path, 'molpro_mrci+q.out'))
     mrci_e0 = mrci_log.load_energy()
     mrciq_e0 = mrciq_log.load_energy()
     self.assertAlmostEqual(mrci_e0, -293217091.0381712, places=7)
     self.assertAlmostEqual(mrciq_e0, -293284017.3925107, places=7)
Exemplo n.º 2
0
 def test_load_non_f12_e0(self):
     """
     Load E0 for CCSD(T) (without F12) from a molpro output file
     """
     molpro_log = MolproLog(os.path.join(self.data_path, 'TS_CCSD(T)_no_F12_sp_molpro.out'))
     e0 = molpro_log.load_energy()
     self.assertAlmostEqual(e0, -301585968.58196217, places=7)
Exemplo n.º 3
0
    def test_load_hosi_from_molpro_log(self):
        """
        Uses a molpro log file for HOSI to test that its
        molecular degrees of freedom can be properly read.
        """

        log = MolproLog(os.path.join(self.data_path, 'HOSI_ccsd_t1.out'))
        conformer, unscaled_frequencies = log.load_conformer(spin_multiplicity=1)
        e0 = log.load_energy()

        self.assertTrue(len([mode for mode in conformer.modes if isinstance(mode, IdealGasTranslation)]) == 1)
        self.assertTrue(len([mode for mode in conformer.modes if isinstance(mode, NonlinearRotor)]) == 1)
        self.assertTrue(len([mode for mode in conformer.modes if isinstance(mode, HarmonicOscillator)]) == 1)
        self.assertTrue(len([mode for mode in conformer.modes if isinstance(mode, HinderedRotor)]) == 0)

        trans = [mode for mode in conformer.modes if isinstance(mode, IdealGasTranslation)][0]
        rot = [mode for mode in conformer.modes if isinstance(mode, NonlinearRotor)][0]
        vib = [mode for mode in conformer.modes if isinstance(mode, HarmonicOscillator)][0]
        t_list = np.array([298.15], np.float64)

        self.assertAlmostEqual(trans.get_partition_function(t_list), 9.175364e7, delta=1e1)
        self.assertAlmostEqual(rot.get_partition_function(t_list), 1.00005557e5, delta=1e-2)
        self.assertAlmostEqual(vib.get_partition_function(t_list), 1.9734989e0, delta=1e-4)

        self.assertAlmostEqual(e0 / constants.Na / constants.E_h, -768.275662, 4)
        self.assertEqual(conformer.spin_multiplicity, 1)
        self.assertEqual(conformer.optical_isomers, 1)
Exemplo n.º 4
0
    def test_load_rad_from_molpro_log_f12(self):
        """
        Uses a Molpro log file for OH (C2H4) to test that radical
        energy can be properly read.
        """

        log = MolproLog(os.path.join(self.data_path, 'OH_f12.out'))
        e0 = log.load_energy()

        self.assertAlmostEqual(e0 / constants.Na / constants.E_h, -75.663696424380, 5)
Exemplo n.º 5
0
    def test_load_qz_from_molpro_log_f12(self):
        """
        Uses a Molpro log file for ethylene_qz (C2H4) to test that F12b
        energy can be properly read.
        """

        log = MolproLog(os.path.join(self.data_path, 'ethylene_f12_qz.out'))
        e0 = log.load_energy()

        self.assertAlmostEqual(e0 / constants.Na / constants.E_h, -78.472682755635, 5)