Exemple #1
0
 def test_from_directory(self):
     vi = VaspInput.from_directory(test_dir, optional_files={"CONTCAR.Li2O": Poscar})
     self.assertEqual(vi["INCAR"]["ALGO"], "Damped")
     self.assertIn("CONTCAR.Li2O", vi)
     d = vi.to_dict
     vinput = VaspInput.from_dict(d)
     self.assertIn("CONTCAR.Li2O", vinput)
Exemple #2
0
 def test_from_directory(self):
     vi = VaspInput.from_directory(test_dir,
                                   optional_files={"CONTCAR.Li2O": Poscar})
     self.assertEqual(vi["INCAR"]["ALGO"], "Damped")
     self.assertIn("CONTCAR.Li2O", vi)
     d = vi.to_dict
     vinput = VaspInput.from_dict(d)
     self.assertIn("CONTCAR.Li2O", vinput)
Exemple #3
0
 def test_to_from_dict(self):
     d = self.vinput.to_dict
     vinput = VaspInput.from_dict(d)
     comp = vinput["POSCAR"].structure.composition
     self.assertEqual(comp, Composition.from_formula("Fe4P4O16"))
Exemple #4
0
 def test_to_from_dict(self):
     d = self.vinput.to_dict
     vinput = VaspInput.from_dict(d)
     comp = vinput["POSCAR"].structure.composition
     self.assertEqual(comp, Composition.from_formula("Fe4P4O16"))