Skip to content

Commit

Permalink
Add MPMetalRelaxSet.
Browse files Browse the repository at this point in the history
  • Loading branch information
shyuep committed Mar 25, 2019
1 parent 19f56d4 commit 1da439a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pymatgen/io/vasp/sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,27 @@ def __init__(self, structure, **kwargs):
self.kwargs = kwargs


class MPMetalRelaxSet(MPRelaxSet):
"""
Implementation of VaspInputSet utilizing parameters in the public
Materials Project, but with tuning for metals. Key things are a denser
k point density, and a
"""
CONFIG = _load_yaml_config("MPRelaxSet")

def __init__(self, structure, **kwargs):
super(MPMetalRelaxSet, self).__init__(
structure, **kwargs)
self._config_dict["INCAR"].update({
"ISMEAR": 1,
"SIGMA": 0.2
})
self._config_dict["KPOINTS"].update({
"reciprocal_density": 200
})
self.kwargs = kwargs


class MPHSERelaxSet(DictSet):
"""
Same as the MPRelaxSet, but with HSE parameters.
Expand Down
8 changes: 8 additions & 0 deletions pymatgen/io/vasp/tests/test_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,14 @@ def test_get_vasp_input(self):
d = paramset.get_vasp_input()
self.assertEqual(d["INCAR"]["ISMEAR"], 0)

def test_MPMetalRelaxSet(self):
mpmetalset = MPMetalRelaxSet(self.get_structure("Sn"))
incar = mpmetalset.incar
self.assertEqual(incar["ISMEAR"], 1)
self.assertEqual(incar["SIGMA"], 0.2)
kpoints = mpmetalset.kpoints
self.assertArrayAlmostEqual(kpoints.kpts[0], [5, 5, 5])

def test_as_from_dict(self):
mitset = MITRelaxSet(self.structure)
mpset = MPRelaxSet(self.structure)
Expand Down

0 comments on commit 1da439a

Please sign in to comment.