def test_to_from_dict(self):
    self.mitparamset = MITVaspInputSet()
    self.mithseparamset = MITHSEVaspInputSet()
    self.paramset = MPVaspInputSet()
    self.userparamset = MPVaspInputSet(user_incar_settings={'MAGMOM': {'Fe': 10, 'S': (- 5), 'Mn3+': 100}})
    d = self.mitparamset.as_dict()
    v = dec.process_decoded(d)
    self.assertEqual(v.incar_settings['LDAUU']['O']['Fe'], 4)
    d = self.mitggaparam.as_dict()
    v = dec.process_decoded(d)
    self.assertNotIn('LDAUU', v.incar_settings)
    d = self.mithseparamset.as_dict()
    v = dec.process_decoded(d)
    self.assertEqual(v.incar_settings['LHFCALC'], True)
    d = self.mphseparamset.as_dict()
    v = dec.process_decoded(d)
    self.assertEqual(v.incar_settings['LHFCALC'], True)
    d = self.paramset.as_dict()
    v = dec.process_decoded(d)
    self.assertEqual(v.incar_settings['LDAUU']['O']['Fe'], 5.3)
    d = self.userparamset.as_dict()
    v = dec.process_decoded(d)
    self.assertEqual(v.incar_settings['MAGMOM'], {'Fe': 10, 'S': (- 5), 'Mn3+': 100})
def test_to_from_dict(self):
    self.mitparamset = MITVaspInputSet()
    self.mithseparamset = MITHSEVaspInputSet()
    self.paramset = MPVaspInputSet()
    self.userparamset = MPVaspInputSet(user_incar_settings={'MAGMOM': {'Fe': 10, 'S': (- 5), 'Mn3+': 100}})
    d = self.mitparamset.as_dict()
    v = dec.process_decoded(d)
    self.assertEqual(v.incar_settings['LDAUU']['O']['Fe'], 4)
    d = self.mitggaparam.as_dict()
    v = dec.process_decoded(d)
    self.assertNotIn('LDAUU', v.incar_settings)
    d = self.mithseparamset.as_dict()
    v = dec.process_decoded(d)
    self.assertEqual(v.incar_settings['LHFCALC'], True)
    d = self.mphseparamset.as_dict()
    v = dec.process_decoded(d)
    self.assertEqual(v.incar_settings['LHFCALC'], True)
    d = self.paramset.as_dict()
    v = dec.process_decoded(d)
    self.assertEqual(v.incar_settings['LDAUU']['O']['Fe'], 5.3)
    d = self.userparamset.as_dict()
    v = dec.process_decoded(d)
    self.assertEqual(v.incar_settings['MAGMOM'], {'Fe': 10, 'S': (- 5), 'Mn3+': 100})