コード例 #1
0
ファイル: test_sets.py プロジェクト: mhsiron/pymatgen
 def test_prints(self):
     cis = RelaxSet(Si_structure, print_ldos=False, print_pdos=False)
     self.assertFalse(cis.check("FORCE_EVAL/DFT/PRINT/PRINT/PDOS"))
     cis = RelaxSet(Si_structure,
                    print_ldos=True,
                    print_hartree_potential=True)
     self.assertTrue(cis.check("FORCE_EVAL/DFT/PRINT/PDOS/LDOS 1"))
     self.assertTrue(cis.check("FORCE_EVAL/DFT/PRINT/V_HARTREE_CUBE"))
コード例 #2
0
ファイル: test_sets.py プロジェクト: mhsiron/pymatgen
    def test_all_sets(self):
        for s in [Si_structure, molecule]:
            cis = Cp2kInputSet(s)
            self.assertMSONable(cis)
            cis = Cp2kInputSet.from_dict(cis.as_dict())
            cis = Cp2kInputSet.from_string(cis.get_string())

            cis = DftSet(s)
            self.assertMSONable(cis)
            cis = DftSet.from_dict(cis.as_dict())
            cis = DftSet.from_string(cis.get_string())

            cis = StaticSet(s)
            self.assertMSONable(cis)
            cis = StaticSet.from_dict(cis.as_dict())
            cis = StaticSet.from_string(cis.get_string())

            cis = HybridStaticSet(s)
            self.assertMSONable(cis)
            cis = HybridStaticSet.from_dict(cis.as_dict())
            cis = HybridStaticSet.from_string(cis.get_string())

            cis = RelaxSet(s)
            self.assertMSONable(cis)
            cis = RelaxSet.from_dict(cis.as_dict())
            cis = RelaxSet.from_string(cis.get_string())

            cis = HybridRelaxSet(s)
            self.assertMSONable(cis)
            cis = HybridRelaxSet.from_dict(cis.as_dict())
            cis = HybridRelaxSet.from_string(cis.get_string())

            cis = CellOptSet(s)
            self.assertMSONable(cis)
            cis = CellOptSet.from_dict(cis.as_dict())
            cis = CellOptSet.from_string(cis.get_string())

            cis = HybridCellOptSet(s)
            self.assertMSONable(cis)
            cis = HybridCellOptSet.from_dict(cis.as_dict())
            cis = HybridCellOptSet.from_string(cis.get_string())