Example #1
0
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.assertEquals(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.assertEquals(kpoints.kpts, [(1, 1, 1)])
        self.assertEquals(kpoints.style, 'Gamma')

    def test_to_from_dict(self):
        d = self.mitmdparam.to_dict
        v = dec.process_decoded(d)
        self.assertEqual(type(v), MITMDVaspInputSet)
        self.assertEqual(v.incar_settings["TEBEG"], 300)
Example #2
0
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.assertEquals(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.assertEquals(kpoints.kpts, [(1, 1, 1)])
        self.assertEquals(kpoints.style, 'Gamma')

    def test_to_from_dict(self):
        d = self.mitmdparam.to_dict
        v = dec.process_decoded(d)
        self.assertEqual(type(v), MITMDVaspInputSet)
        self.assertEqual(v.incar_settings["TEBEG"], 300)
Example #3
0
 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)
Example #4
0
 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)