예제 #1
0
 def run_task(self, fw_spec):
     user_incar_settings = self.get("user_incar_settings", {})
     user_kpoints_settings = self.get("user_kpoints_settings", {})
     neb_label = self.get("neb_label")
     assert neb_label.isdigit() and int(neb_label) >= 1
     images = fw_spec["neb"][int(neb_label) - 1]
     try:
         images = [Structure.from_dict(i) for i in images]
     except:
         images = images
     vis = MVLCINEBSet(images, user_incar_settings=user_incar_settings,
                       user_kpoints_settings=user_kpoints_settings)
     vis.write_input(".")
예제 #2
0
파일: neb_tasks.py 프로젝트: FilipchukB/P1
 def run_task(self, fw_spec):
     user_incar_settings = self.get("user_incar_settings", {})
     user_kpoints_settings = self.get("user_kpoints_settings", {})
     neb_label = self.get("neb_label")
     assert neb_label.isdigit() and int(neb_label) >= 1
     images = fw_spec["neb"][int(neb_label) - 1]
     try:
         images = [Structure.from_dict(i) for i in images]
     except:
         images = images
     vis = MVLCINEBSet(images, user_incar_settings=user_incar_settings,
                       user_kpoints_settings=user_kpoints_settings)
     vis.write_input(".")
예제 #3
0
    def test_incar(self):
        m = MVLCINEBSet(self.structures)

        incar_string = m.incar.get_string(sort_keys=True)
        incar_expect ="""ALGO = Fast
EDIFF = 5e-05
EDIFFG = -0.02
ENCUT = 520
IBRION = 3
ICHAIN = 0
ICHARG = 1
IMAGES = 1
IOPT = 1
ISIF = 2
ISMEAR = 0
ISPIN = 2
ISYM = 0
LCHARG = False
LCLIMB = True
LORBIT = 0
LREAL = Auto
LWAVE = False
MAGMOM = 35*0.6
NELM = 200
NELMIN = 6
NSW = 200
POTIM = 0
PREC = Accurate
SIGMA = 0.05
SPRING = -5"""
        self.assertEqual(incar_string.strip(), incar_expect.strip())
예제 #4
0
    def test_incar_user_setting(self):
        user_incar_settings = {
            "IOPT": 3,
            "EDIFFG": -0.05,
            "NPAR": 4,
            "ISIF": 3
        }
        m = MVLCINEBSet(self.structures,
                        user_incar_settings=user_incar_settings)
        incar_string = m.incar.get_string(sort_keys=True, pretty=True)
        incar_expect = """ALGO    =  Fast
EDIFF   =  5e-05
EDIFFG  =  -0.05
ENCUT   =  520
IBRION  =  3
ICHAIN  =  0
ICHARG  =  1
IMAGES  =  1
IOPT    =  3
ISIF    =  3
ISMEAR  =  0
ISPIN   =  2
ISYM    =  0
LCHARG  =  False
LCLIMB  =  True
LORBIT  =  0
LREAL   =  Auto
LWAVE   =  False
MAGMOM  =  35*0.6
NELM    =  100
NELMIN  =  6
NPAR    =  4
NSW     =  200
POTIM   =  0
PREC    =  Accurate
SIGMA   =  0.05
SPRING  =  -5"""

        self.assertEqual(incar_string, incar_expect)
        pass