Skip to content

Commit

Permalink
Merge pull request #2172 from utf/dfpt
Browse files Browse the repository at this point in the history
Use tighter EDIFF for DFPT calculations
  • Loading branch information
shyuep committed Jun 11, 2021
2 parents 77c6dd6 + d1ee3c7 commit afa2cb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pymatgen/io/vasp/sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,9 @@ def incar(self):
incar.pop("NSW", None)
incar.pop("NPAR", None)

# tighter ediff for DFPT
incar["EDIFF"] = 1e-5

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

Expand Down
1 change: 1 addition & 0 deletions pymatgen/io/vasp/tests/test_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ def test_init(self):
leps_vis = MPStaticSet.from_prev_calc(prev_calc_dir=prev_run, lepsilon=True)
self.assertTrue(leps_vis.incar["LEPSILON"])
self.assertEqual(leps_vis.incar["IBRION"], 8)
self.assertEqual(leps_vis.incar["EDIFF"], 1e-5)
self.assertNotIn("NPAR", leps_vis.incar)
self.assertNotIn("NSW", leps_vis.incar)
self.assertEqual(non_prev_vis.kpoints.kpts, [[11, 10, 10]])
Expand Down

0 comments on commit afa2cb9

Please sign in to comment.