Пример #1
0
 def test_serialization(self):
     task = AdfTask()
     o = AdfTask.from_dict(task.as_dict())
     self.assertEqual(task.title, o.title)
     self.assertEqual(task.basis_set, o.basis_set)
     self.assertEqual(task.scf, o.scf)
     self.assertEqual(task.geo, o.geo)
     self.assertEqual(task.operation, o.operation)
     self.assertEqual(task.units, o.units)
     self.assertEqual(str(task), str(o))
Пример #2
0
 def test_serialization(self):
     task = AdfTask()
     o = AdfTask.from_dict(task.as_dict())
     self.assertEqual(task.title, o.title)
     self.assertEqual(task.basis_set, o.basis_set)
     self.assertEqual(task.scf, o.scf)
     self.assertEqual(task.geo, o.geo)
     self.assertEqual(task.operation, o.operation)
     self.assertEqual(task.units, o.units)
     self.assertEqual(str(task), str(o))
Пример #3
0
 def test_main(self):
     o = Molecule.from_str(rhb18xyz, "xyz")
     o.set_charge_and_spin(-1, 3)
     task = AdfTask("optimize", **rhb18)
     inp = AdfInput(task)
     inp.write_file(o, self.tempfile)
     s = readfile(join(test_dir, "adf", "RhB18_adf.inp"))
     self.assertEqual(readfile(self.tempfile), s)
Пример #4
0
 def test_energy(self):
     task = AdfTask()
     self.assertEqual(str(task), energy_task)