Beispiel #1
0
    def incar(self):
        parent_incar = super(PRLRoughStaticSet, self).incar
        incar = Incar(self.prev_incar) if self.prev_incar is not None else \
            Incar(parent_incar)

        for k in ["MAGMOM", "NUPDOWN"] + list(
                self.kwargs.get("user_incar_settings", {}).keys()):
            # For these parameters as well as user specified settings, override
            # the incar settings.
            if parent_incar.get(k, None) is not None:
                incar[k] = parent_incar[k]
            else:
                incar.pop(k, None)

        # use new LDAUU when possible b/c the Poscar might have changed
        # representation
        if incar.get('LDAU'):
            u = incar.get('LDAUU', [])
            j = incar.get('LDAUJ', [])
            if sum([u[x] - j[x] for x, y in enumerate(u)]) > 0:
                for tag in ('LDAUU', 'LDAUL', 'LDAUJ'):
                    incar.update({tag: parent_incar[tag]})
            # ensure to have LMAXMIX for GGA+U static run
            if "LMAXMIX" not in incar:
                incar.update({"LMAXMIX": parent_incar["LMAXMIX"]})

        # Compare ediff between previous and staticinputset values,
        # choose the tighter ediff
        incar["EDIFF"] = min(incar.get("EDIFF", 1), parent_incar["EDIFF"])
        return incar
Beispiel #2
0
    def incar(self):
        parent_incar = super(PRLStaticSet, self).incar
        incar = Incar(self.prev_incar) if self.prev_incar is not None else \
            Incar(parent_incar)

        incar.update({
            "IBRION": -1,
            "ISMEAR": -5,
            "LAECHG": True,
            "LCHARG": True,
            "LORBIT": 11,
            "LVHAR": True,
            "LWAVE": False,
            "NSW": 0,
            "ICHARG": 0,
            "ALGO": "Normal"
        })

        if self.lepsilon:
            incar["IBRION"] = 8
            incar["LEPSILON"] = True

            # LPEAD=T: numerical evaluation of overlap integral prevents
            # LRF_COMMUTATOR errors and can lead to better expt. agreement
            # but produces slightly different results
            incar["LPEAD"] = True

            # Note that DFPT calculations MUST unset NSW. NSW = 0 will fail
            # to output ionic.
            incar.pop("NSW", None)
            incar.pop("NPAR", None)

        if self.lcalcpol:
            incar["LCALCPOL"] = True

        for k in ["MAGMOM", "NUPDOWN"] + list(
                self.kwargs.get("user_incar_settings", {}).keys()):
            # For these parameters as well as user specified settings, override
            # the incar settings.
            if parent_incar.get(k, None) is not None:
                incar[k] = parent_incar[k]
            else:
                incar.pop(k, None)

        # use new LDAUU when possible b/c the Poscar might have changed
        # representation
        if incar.get('LDAU'):
            u = incar.get('LDAUU', [])
            j = incar.get('LDAUJ', [])
            if sum([u[x] - j[x] for x, y in enumerate(u)]) > 0:
                for tag in ('LDAUU', 'LDAUL', 'LDAUJ'):
                    incar.update({tag: parent_incar[tag]})
            # ensure to have LMAXMIX for GGA+U static run
            if "LMAXMIX" not in incar:
                incar.update({"LMAXMIX": parent_incar["LMAXMIX"]})

        # Compare ediff between previous and staticinputset values,
        # choose the tighter ediff
        incar["EDIFF"] = min(incar.get("EDIFF", 1), parent_incar["EDIFF"])
        return incar
Beispiel #3
0
    def incar(self):
        """
        Custom Incar attribute for HubbardHundLinRespSet
        """
        parent_incar = super().incar
        incar = Incar(parent_incar)

        incar.update({"ISYM": -1, "ISMEAR": 0, "LREAL": False, "LASPH": True})
        incar.update({"ISTART": 1})
        # incar.update({"ALGO": "Fast"})
        incar.pop("NSW", None)

        if self.kwargs.get("user_incar_settings")["LDAUU"]:

            incar.update(
                {"LDAUL": self.kwargs.get("user_incar_settings")["LDAUL"]})
            incar.update(
                {"LDAUU": self.kwargs.get("user_incar_settings")["LDAUU"]})
            incar.update(
                {"LDAUJ": self.kwargs.get("user_incar_settings")["LDAUJ"]})

            incar["LDAUL"] = [
                incar["LDAUL"][key] for key in incar["LDAUL"].keys()
            ]
            incar["LDAUU"] = [
                incar["LDAUU"][key] for key in incar["LDAUU"].keys()
            ]
            incar["LDAUJ"] = [
                incar["LDAUJ"][key] for key in incar["LDAUJ"].keys()
            ]

            incar["LDAU"] = self.kwargs.get("user_incar_settings")["LDAU"]
            incar["LDAUTYPE"] = self.kwargs.get(
                "user_incar_settings")["LDAUTYPE"]
            incar["LDAUPRINT"] = self.kwargs.get(
                "user_incar_settings")["LDAUPRINT"]
            incar["LORBIT"] = self.kwargs.get("user_incar_settings")["LORBIT"]

        return incar