def test_number_of_atoms_from_orca_log(self): """ Uses a Orca log files to test that number of atoms can be properly read. """ log = OrcaLog(os.path.join(self.data_path, 'Orca_opt_freq_test.log')) self.assertEqual(log.get_number_of_atoms(), 3) log = OrcaLog(os.path.join(self.data_path, 'Orca_dlpno_test.log')) self.assertEqual(log.get_number_of_atoms(), 30)
def test_read_coordinates_from_orca_log(self): """ Uses a Orca log files to test that coordinate can be properly read. """ log1 = OrcaLog(os.path.join(self.data_path, 'Orca_opt_freq_test.log')) coord, number, mass = log1.load_geometry() self.assertEqual(len(coord), 3) log2 = OrcaLog(os.path.join(self.data_path, 'Orca_dlpno_test.log')) coord, number, mass = log2.load_geometry() self.assertEqual(len(coord), 30)
def test_load_zero_point_energy_from_orca_log(self): """ Uses a Orca log files to test that molecular zero point_energy can be properly read. """ log = OrcaLog(os.path.join(self.data_path, 'Orca_opt_freq_test.log')) self.assertAlmostEqual(log.load_zero_point_energy(), 55502.673180815, delta=1e-3) log = OrcaLog(os.path.join(self.data_path, 'Orca_TS_test.log')) self.assertAlmostEqual(log.load_zero_point_energy(), 93500.08860598055, delta=1e-3)
def test_energy_from_orca_log(self): """ Uses a Orca log files to test that molecular energies can be properly read. """ log = OrcaLog(os.path.join(self.data_path, 'Orca_opt_freq_test.log')) self.assertAlmostEqual(log.load_energy(), -200656222.56292167, delta=1e-3) log = OrcaLog(os.path.join(self.data_path, 'Orca_TS_test.log')) self.assertAlmostEqual(log.load_energy(), -88913623.10592663, delta=1e-3) log = OrcaLog(os.path.join(self.data_path, 'Orca_dlpno_test.log')) self.assertAlmostEqual(log.load_energy(), -1816470909.1153, delta=1e-3)
def test_check_for_errors(self): """ Uses an Orca log file with SCF error to test if errors are properly parsed. """ with self.assertRaises(LogError): OrcaLog(os.path.join(self.data_path, 'Orca_scf_error.log'))
def test_T1_diagnostic_from_orca_log(self): """ Uses a Orca log file for npropyl to test that its T1_diagnostic of freedom can be properly read. """ log = OrcaLog(os.path.join(self.data_path, 'Orca_dlpno_test.log')) self.assertAlmostEqual(log.get_T1_diagnostic(), 0.009872238, delta=1e-3)
def test_load_negative_frequency_from_orca_log(self): """ Uses a orca log file for npropyl to test that its negative frequency can be properly read. """ log = OrcaLog(os.path.join(self.data_path, 'Orca_TS_test.log')) self.assertAlmostEqual(log.load_negative_frequency(), -503.24, delta=1e-1)