def test_modifyincar(self): # create an INCAR incar = self.ref_incar incar.write_file(os.path.join(module_dir, "INCAR")) # modify and test ft = ModifyIncar({ "incar_update": { "ISMEAR": 1000 }, "incar_multiply": { "ENCUT": 1.5 }, "incar_dictmod": { "_inc": { "ISPIN": -1 } } }) ft = load_object(ft.to_dict()) # simulate database insertion ft.run_task({}) incar_mod = Incar.from_file("INCAR") self.assertEqual(incar_mod['ISMEAR'], 1000) self.assertEqual(incar_mod['ENCUT'], 780) self.assertEqual(incar_mod['ISPIN'], 1)
def test_modify_incar(self): # create an INCAR incar = self.ref_incar incar.write_file("INCAR") # modify and test ft = ModifyIncar( {"incar_update": {"ISMEAR": 1000}, "incar_multiply": {"ENCUT": 1.5}, "incar_dictmod": {"_inc": {"ISPIN": -1}}}) ft = load_object(ft.to_dict()) # simulate database insertion ft.run_task({}) incar_mod = Incar.from_file("INCAR") self.assertEqual(incar_mod['ISMEAR'], 1000) self.assertEqual(incar_mod['ENCUT'], 780) self.assertEqual(incar_mod['ISPIN'], 1)
def test_modify_incar(self): # create an INCAR incar = self.ref_incar incar.write_file("INCAR") # modify and test ft = ModifyIncar( incar_update={"ISMEAR": 1000}, incar_multiply={"ENCUT": 1.5}, incar_dictmod={"_inc": { "ISPIN": -1 }}, ) ft = load_object(ft.to_dict()) # simulate database insertion ft.run_task({}) incar_mod = Incar.from_file("INCAR") self.assertEqual(incar_mod["ISMEAR"], 1000) self.assertEqual(incar_mod["ENCUT"], 780) self.assertEqual(incar_mod["ISPIN"], 1)