예제 #1
0
 def test_analytical_freq(self):
     filename = join(test_dir, "adf", "analytical_freq", "adf.out")
     o = AdfOutput(filename)
     self.assertAlmostEqual(o.final_energy, -0.54340325)
     self.assertEqual(len(o.energies), 4)
     self.assertEqual(len(o.structures), 4)
     self.assertAlmostEqual(o.frequencies[0], 1553.931)
     self.assertAlmostEqual(o.frequencies[2], 3793.086)
     self.assertAlmostEqual(o.normal_modes[0][2], 0.071)
     self.assertAlmostEqual(o.normal_modes[0][6], 0.000)
     self.assertAlmostEqual(o.normal_modes[0][7], -0.426)
     self.assertAlmostEqual(o.normal_modes[0][8], -0.562)
예제 #2
0
 def test_numerical_freq(self):
     filename = join(test_dir, "adf", "numerical_freq", "adf.out")
     o = AdfOutput(filename)
     self.assertEqual(o.freq_type, 'Numerical')
     self.assertEqual(o.final_structure.num_sites, 4)
     self.assertEqual(len(o.frequencies), 6)
     self.assertEqual(len(o.normal_modes), 6)
     self.assertAlmostEqual(o.frequencies[0], 938.21)
     self.assertAlmostEqual(o.frequencies[3], 3426.64)
     self.assertAlmostEqual(o.frequencies[4], 3559.35)
     self.assertAlmostEqual(o.frequencies[5], 3559.35)
     self.assertAlmostEqual(o.normal_modes[1][0], 0.067)
     self.assertAlmostEqual(o.normal_modes[1][3], -0.536)
     self.assertAlmostEqual(o.normal_modes[1][7], 0.000)
     self.assertAlmostEqual(o.normal_modes[1][9], -0.536)
예제 #3
0
 def test_single_point(self):
     filename = join(test_dir, "adf", "sp", "adf.out")
     o = AdfOutput(filename)
     self.assertAlmostEqual(o.final_energy, -0.74399276)
     self.assertEqual(len(o.final_structure), 4)