def test_load_co_modes_from_qchem_log(self): """ Uses a QChem log file for CO to test that its molecular degrees of freedom can be properly read. """ log = QChemLog(os.path.join(self.data_path, 'co.out')) conformer, unscaled_frequencies = log.load_conformer() 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, LinearRotor) ]) == 1) self.assertTrue( len([ mode for mode in conformer.modes if isinstance(mode, NonlinearRotor) ]) == 0) 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)
def test_energy_from_qchem_log(self): """ Uses QChem log files to test that molecular energies can be properly read. """ log = QChemLog(os.path.join(self.data_path, 'npropyl.out')) self.assertAlmostEqual(log.load_energy(), -310896203.5432524, delta=1e-7) log = QChemLog(os.path.join(self.data_path, 'co.out')) self.assertAlmostEqual(log.load_energy(), -297402545.0217114, delta=1e-7) log = QChemLog(os.path.join(self.data_path, 'CH4_sp.out')) self.assertAlmostEqual(log.load_energy(), -106356735.53661588, delta=1e-7)