def test_spin_multiplicity_from_qchem_log(self): """ Uses QChem log files to test that molecular degrees of freedom can be properly read. """ log = QChemLog(os.path.join(self.data_path, 'npropyl.out')) conformer, unscaled_frequencies = log.load_conformer() self.assertEqual(conformer.spin_multiplicity, 2) log = QChemLog(os.path.join(self.data_path, 'co.out')) conformer, unscaled_frequencies = log.load_conformer() self.assertEqual(conformer.spin_multiplicity, 1)
def test_load_vibrations_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')) conformer, unscaled_frequencies = log.load_conformer() self.assertEqual(len(conformer.modes[2]._frequencies.value), 24) self.assertEqual(conformer.modes[2]._frequencies.value[5], 881.79) log = QChemLog(os.path.join(self.data_path, 'co.out')) conformer, unscaled_frequencies = log.load_conformer() self.assertEqual(len(conformer.modes[2]._frequencies.value), 1) self.assertEqual(conformer.modes[2]._frequencies.value, 2253.16)
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)