Skip to content

Commit

Permalink
tests for kpoint override in NSCF calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
dyllamt committed Mar 26, 2019
1 parent 56e6e1e commit c2049c2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pymatgen/io/vasp/tests/test_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,18 @@ def test_optics(self):
self.assertTrue(vis.incar["LOPTICS"])
self.assertEqual(vis.kpoints.style, Kpoints.supported_modes.Reciprocal)

def test_user_kpoint_override(self):
user_kpoints_override = Kpoints(
style=Kpoints.supported_modes.Gamma,
kpts=((1, 1, 1))) # the default kpoints style is reciprocal

prev_run = self.TEST_FILES_DIR / "relaxation"
vis = MPNonSCFSet.from_prev_calc(
prev_calc_dir=prev_run, copy_chgcar=False, optics=True,
mode="Uniform", nedos=2001,
user_kpoints_settings=user_kpoints_override)
self.assertEqual(vis.kpoints.style, Kpoints.supported_modes.Gamma)

def tearDown(self):
shutil.rmtree(self.tmp)
warnings.simplefilter("default")
Expand Down

0 comments on commit c2049c2

Please sign in to comment.