コード例 #1
0
ファイル: test_vasp_input.py プロジェクト: sikisis/pymatgen
 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)
コード例 #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)
コード例 #3
0
ファイル: test_vasp_input.py プロジェクト: sikisis/pymatgen
 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"))
コード例 #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"))