class MITMDVaspInputSetTest(unittest.TestCase): def setUp(self): filepath = os.path.join(test_dir, 'POSCAR') poscar = Poscar.from_file(filepath) self.struct = poscar.structure self.mitmdparam = MITMDVaspInputSet(300, 1200, 10000) def test_get_potcar_symbols(self): syms = self.mitmdparam.get_potcar_symbols(self.struct) self.assertEqual(syms, ['Fe', 'P', 'O']) def test_get_incar(self): incar = self.mitmdparam.get_incar(self.struct) self.assertNotIn("LDAUU", incar) self.assertAlmostEqual(incar['EDIFF'], 2.4e-5) def test_get_kpoints(self): kpoints = self.mitmdparam.get_kpoints(self.struct) self.assertEqual(kpoints.kpts, [(1, 1, 1)]) self.assertEqual(kpoints.style, Kpoints.supported_modes.Gamma) def test_to_from_dict(self): d = self.mitmdparam.as_dict() v = dec.process_decoded(d) self.assertEqual(type(v), MITMDVaspInputSet) self.assertEqual(v.incar_settings["TEBEG"], 300)
def setUp(self): filepath = os.path.join(test_dir, 'POSCAR') poscar = Poscar.from_file(filepath) self.struct = poscar.structure self.mitmdparam = MITMDVaspInputSet(300, 1200, 10000)