Skip to content

Commit

Permalink
Merge 74dcb44 into 9276567
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-S-Rosen committed Nov 15, 2021
2 parents 9276567 + 74dcb44 commit ded7d6e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pymatgen/io/vasp/sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,18 @@ def incar(self) -> Incar:
elif any(el.Z > 20 for el in structure.composition):
incar["LMAXMIX"] = 4

# Warn user about LASPH for +U, meta-GGAs, hybrids, and vdW-DF
if not settings.get("LASPH", False) and (
settings.get("METAGGA", False)
or settings.get("LHFCALC", False)
or settings.get("LDAU", False)
or settings.get("LUSE_VDW", False)
):
warnings.warn(
"LASPH = True should be set for +U, meta-GGAs, hybrids, and vdW-DFT",
BadInputSetWarning,
)

if self.constrain_total_magmom:
nupdown = sum([mag if abs(mag) > 0.6 else 0 for mag in incar["MAGMOM"]])
incar["NUPDOWN"] = nupdown
Expand Down

0 comments on commit ded7d6e

Please sign in to comment.