Esempio n. 1
0
    def __init__(self, user_incar_settings, 
                 constrain_total_magmom=False, sort_structure=False,
                 kpoints_density=1000, sym_prec=0.1):
        self.sym_prec = sym_prec
        
        DictVaspInputSet.__init__(
            self, "MaterialsProject Static",
            loadfn(os.path.join(MODULE_DIR, "MPVaspInputSet.yaml")),
            constrain_total_magmom=constrain_total_magmom,
            sort_structure=sort_structure)

        self.user_incar_settings = user_incar_settings

        # impose tetrahedron method
        self.incar_settings.update(
            {"IBRION": -1, "ISMEAR": -5, "LCHARG": False,
             "LORBIT": 11, "LWAVE": False, "NSW": 0, "ISYM": 0, "ICHARG": 11})

        # this variable may have been used in the  ground state calculation,
        #  but is not relevant to the tetrahedron DOS calculation; its superfluous
        # presence in the INCAR leads to (human) confusion (VASP doesn't care).
        self.incar_settings.pop('SIGMA',None) 

        self.kpoints_settings.update({"kpoints_density": kpoints_density})

        # Set dense DOS output
        self.incar_settings.update({"NEDOS": 2001})

        if "NBANDS" not in user_incar_settings:
            raise KeyError("For NonSCF runs, NBANDS value from SC runs is "
                           "required!")
        else:
            self.incar_settings.update(user_incar_settings)
Esempio n. 2
0
 def __init__(self, user_incar_settings=None, constrain_total_magmom=False):
     module_dir = os.path.dirname(os.path.abspath(__file__))
     with open(os.path.join(module_dir, "QiminGWVaspInputSet.json")) as f:
         DictVaspInputSet.__init__(
             self, "Qimin GW", json.load(f),
             constrain_total_magmom=constrain_total_magmom)
     if user_incar_settings:
         self.incar_settings.update(user_incar_settings)
Esempio n. 3
0
 def __init__(self, structure, spec, functional='PBE', sym_prec=0.01, **kwargs):
     """
     Supports the same kwargs as :class:`JSONVaspInputSet`.
     """
     with open(GWVaspInputSet) as f:
         DictVaspInputSet.__init__(
             self, "MP Static Self consistent run for GW", json.load(f), **kwargs)
     self.structure = structure
     self.tests = self.__class__.get_defaults_tests()
     self.convs = self.__class__.get_defaults_convs()
     self.functional = functional
     self.set_dens(spec)
     self.sym_prec = sym_prec
Esempio n. 4
0
 def __init__(self, structure, spec, functional='PBE', sym_prec=0.01, **kwargs):
     """
     Supports the same kwargs as :class:`JSONVaspInputSet`.
     """
     with open(os.path.join(MODULE_DIR, "GWVaspInputSet.json")) as f:
         DictVaspInputSet.__init__(
             self, "MP Static Self consistent run for GW", json.load(f), **kwargs)
     self.structure = structure
     self.tests = self.__class__.get_defaults_tests()
     self.convs = self.__class__.get_defaults_convs()
     self.functional = functional
     self.set_dens(spec)
     self.sym_prec = sym_prec
Esempio n. 5
0
 def __init__(self, structure, spec, functional='PBE', sym_prec=0.01, **kwargs):
     """
     Supports the same kwargs as :class:`JSONVaspInputSet`.
     """
     with open(GWVaspInputSet) as f:
         DictVaspInputSet.__init__(
             self, "MP Static exact diagonalization", json.load(f), **kwargs)
     self.structure = structure
     self.tests = self.__class__.get_defaults_tests()
     self.convs = self.__class__.get_defaults_convs()
     self.functional = functional
     self.sym_prec = sym_prec
     self.set_dens(spec)
     npar = self.get_npar(self.structure)
     #single step exact diagonalization, output WAVEDER
     self.incar_settings.update({"ALGO": "Exact", "NELM": 1, "LOPTICS": "TRUE"})
     # for large systems exact diagonalization consumes too much memory
     self.set_gw_bands(15)
     self.incar_settings.update({"NPAR": npar})
Esempio n. 6
0
 def __init__(self, structure, spec, functional='PBE', sym_prec=0.01, **kwargs):
     """
     Supports the same kwargs as :class:`JSONVaspInputSet`.
     """
     with open(os.path.join(MODULE_DIR, "GWVaspInputSet.json")) as f:
         DictVaspInputSet.__init__(
             self, "MP Static exact diagonalization", json.load(f), **kwargs)
     self.structure = structure
     self.tests = self.__class__.get_defaults_tests()
     self.convs = self.__class__.get_defaults_convs()
     self.functional = functional
     self.sym_prec = sym_prec
     self.set_dens(spec)
     npar = self.get_npar(self.structure)
     #single step exact diagonalization, output WAVEDER
     self.incar_settings.update({"ALGO": "Exact", "NELM": 1, "LOPTICS": "TRUE"})
     # for large systems exact diagonalization consumes too much memory
     self.set_gw_bands(15)
     self.incar_settings.update({"NPAR": npar})
Esempio n. 7
0
 def __init__(self, structure, spec, functional='PBE', sym_prec=0.01, **kwargs):
     """
     Supports the same kwargs as :class:`JSONVaspInputSet`.
     """
     with open(GWVaspInputSet) as f:
         DictVaspInputSet.__init__(
             self, "MP Static G0W0", json.load(f), **kwargs)
     self.structure = structure
     self.tests = self.__class__.get_defaults_tests()
     self.convs = self.__class__.get_defaults_convs()
     self.functional = functional
     self.sym_prec = sym_prec
     npar = self.get_npar(structure)
     # G0W0 calculation with reduced cutoff for the response function
     self.incar_settings.update({"ALGO": "GW0", "ENCUTGW": 250, "LWAVE": "FALSE", "NELM": 1})
     self.set_dens(spec)
     self.nomega_max = 2 * self.get_kpoints(structure).kpts[0][0]**3
     nomega = npar * int(self.nomega_max / npar)
     self.set_gw_bands(15)
     self.incar_settings.update({"NPAR": npar})
     self.incar_settings.update({"NOMEGA": nomega})
     self.tests = self.__class__.get_defaults_tests()
Esempio n. 8
0
 def __init__(self, structure, spec, functional='PBE', sym_prec=0.01, **kwargs):
     """
     Supports the same kwargs as :class:`JSONVaspInputSet`.
     """
     with open(os.path.join(MODULE_DIR, "GWVaspInputSet.json")) as f:
         DictVaspInputSet.__init__(
             self, "MP Static G0W0", json.load(f), **kwargs)
     self.structure = structure
     self.tests = self.__class__.get_defaults_tests()
     self.convs = self.__class__.get_defaults_convs()
     self.functional = functional
     self.sym_prec = sym_prec
     npar = self.get_npar(structure)
     # G0W0 calculation with reduced cutoff for the response function
     self.incar_settings.update({"ALGO": "GW0", "ENCUTGW": 250, "LWAVE": "FALSE", "NELM": 1})
     self.set_dens(spec)
     self.nomega_max = 2 * self.get_kpoints(structure).kpts[0][0]**3
     nomega = npar * int(self.nomega_max / npar)
     self.set_gw_bands(15)
     self.incar_settings.update({"NPAR": npar})
     self.incar_settings.update({"NOMEGA": nomega})
     self.tests = self.__class__.get_defaults_tests()