diff --git a/atomate/vasp/firetasks/write_inputs.py b/atomate/vasp/firetasks/write_inputs.py index 7035684b0..54af1f2d0 100644 --- a/atomate/vasp/firetasks/write_inputs.py +++ b/atomate/vasp/firetasks/write_inputs.py @@ -314,7 +314,7 @@ def run_task(self, fw_spec): sym_prec=self.get("sym_prec", 0.1), international_monoclinic=self.get("international_monoclinic", True), mode=self.get("mode", "uniform"), - nedos=self.get("nedos", 601), + nedos=self.get("nedos", 2001), optics=self.get("optics", False), **self.get("other_params", {})) vis.write_input(".") diff --git a/atomate/vasp/fireworks/core.py b/atomate/vasp/fireworks/core.py index ca7d78da8..075a56e5f 100644 --- a/atomate/vasp/fireworks/core.py +++ b/atomate/vasp/fireworks/core.py @@ -231,14 +231,16 @@ def __init__(self, parents=None, prev_calc_dir=None, structure=None, mode="gap", class NonSCFFW(Firework): - def __init__(self, parents=None, prev_calc_dir=None, structure=None, name="nscf", mode="uniform", vasp_cmd="vasp", - copy_vasp_outputs=True, db_file=None, **kwargs): + def __init__(self, parents=None, prev_calc_dir=None, structure=None, + name="nscf", mode="uniform", vasp_cmd="vasp", + copy_vasp_outputs=True, db_file=None, + input_set_overrides=None, **kwargs): """ - Standard NonSCF Calculation Firework supporting both - uniform and line modes. + Standard NonSCF Calculation Firework supporting uniform and line modes. Args: - structure (Structure): Input structure - used only to set the name of the FW. + structure (Structure): Input structure - used only to set the name + of the FW. name (str): Name for the Firework. mode (str): "uniform" or "line" mode. vasp_cmd (str): Command to run vasp. @@ -248,16 +250,26 @@ def __init__(self, parents=None, prev_calc_dir=None, structure=None, name="nscf" db_file (str): Path to file specifying db credentials. parents (Firework): Parents of this particular Firework. FW or list of FWS. + input_set_overrides (dict): Arguments passed to the + "from_prev_calc" method of the MPNonSCFSet. This parameter + allows a user to modify the default values of the input set. + For example, passing the key value pair + {'reciprocal_density': 1000} + will override default k-point meshes for uniform calculations. \*\*kwargs: Other kwargs that are passed to Firework.__init__. """ - fw_name = "{}-{} {}".format(structure.composition.reduced_formula if structure else "unknown", name, - mode) + input_set_overrides = input_set_overrides or {} + + fw_name = "{}-{} {}".format(structure.composition.reduced_formula if + structure else "unknown", name, mode) t = [] if prev_calc_dir: - t.append(CopyVaspOutputs(calc_dir=prev_calc_dir, additional_files=["CHGCAR"])) + t.append(CopyVaspOutputs(calc_dir=prev_calc_dir, + additional_files=["CHGCAR"])) elif parents: - t.append(CopyVaspOutputs(calc_loc=True, additional_files=["CHGCAR"])) + t.append(CopyVaspOutputs(calc_loc=True, + additional_files=["CHGCAR"])) else: raise ValueError("Must specify previous calculation for NonSCFFW") @@ -265,19 +277,21 @@ def __init__(self, parents=None, prev_calc_dir=None, structure=None, name="nscf" if mode == "uniform": t.append( WriteVaspNSCFFromPrev(prev_calc_dir=".", mode="uniform", - reciprocal_density=1000)) + **input_set_overrides)) else: t.append(WriteVaspNSCFFromPrev(prev_calc_dir=".", mode="line", - reciprocal_density=20)) + **input_set_overrides)) - t.append(RunVaspCustodian(vasp_cmd=vasp_cmd, auto_npar=">>auto_npar<<")) + t.append(RunVaspCustodian(vasp_cmd=vasp_cmd, + auto_npar=">>auto_npar<<")) t.append(PassCalcLocs(name=name)) t.append(VaspToDb(db_file=db_file, additional_fields={"task_label": name + " " + mode}, parse_dos=(mode == "uniform"), bandstructure_mode=mode)) - super(NonSCFFW, self).__init__(t, parents=parents, name=fw_name, **kwargs) + super(NonSCFFW, self).__init__(t, parents=parents, name=fw_name, + **kwargs) class LepsFW(Firework):