atomate.vasp.firetasks package

Submodules

atomate.vasp.firetasks.glue_tasks module

class atomate.vasp.firetasks.glue_tasks.CheckBandgap(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Checks the band gap of an entry. If band gap is >min_gap or <max_gap, then the task will return a FWAction that will defuse all remaining tasks.

Required params:

(none) - but you should set either min_gap or max_gap

Optional params:

min_gap: (float) minimum gap energy in eV to proceed max_gap: (float) maximum gap energy in eV to proceed vasprun_path: (str) path to vasprun.xml file

optional_params = ['min_gap', 'max_gap', 'vasprun_path']
required_params = []
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.glue_tasks.CheckStability(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Checks the stability of the entry against the Materials Project database. If the stability is less than the cutoff (default is 0.1 eV/atom), then the task will return a FWAction that will defuse all remaining tasks.

Required params:

(none) - but your MAPI key must be set as an environ var in this case

Optional params:
ehull_cutoff: (float) energy in eV/atom to use as ehull cutoff. Default

is 0.05 eV/atom.

MAPI_KEY: (str) set MAPI key directly. Supports env_chk. calc_dir: (str) string to path containing vasprun.xml (default currdir)

optional_params = ['ehull_cutoff', 'MAPI_KEY', 'calc_dir']
required_params = []
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.glue_tasks.CopyVaspOutputs(*args, **kwargs)

Bases: atomate.common.firetasks.glue_tasks.CopyFiles

Copy files from a previous VASP run directory to the current directory. By default, copies ‘INCAR’, ‘POSCAR’ (default: via ‘CONTCAR’), ‘KPOINTS’, ‘POTCAR’, ‘OUTCAR’, and ‘vasprun.xml’. Additional files, e.g. ‘CHGCAR’, can also be specified. Automatically handles files that have a “.gz” extension (copies and unzips).

Note that you must specify either “calc_loc” or “calc_dir” to indicate the directory containing the previous VASP run.

Required params:

(none) - but you must specify either “calc_loc” OR “calc_dir”

Optional params:
calc_loc (str OR bool): if True will set most recent calc_loc. If str

search for the most recent calc_loc with the matching name

calc_dir (str): path to dir that contains VASP output files. filesystem (str): remote filesystem. e.g. username@host additional_files ([str]): additional files to copy,

e.g. [“CHGCAR”, “WAVECAR”]. Use $ALL if you just want to copy everything

contcar_to_poscar(bool): If True (default), will move CONTCAR to

POSCAR (original POSCAR is not copied).

copy_files()

Defines the copy operation. Override this to customize copying.

optional_params = ['calc_loc', 'calc_dir', 'filesystem', 'additional_files', 'contcar_to_poscar']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.glue_tasks.GetInterpolatedPOSCAR(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Grabs CONTCARS from two previous calculations to create interpolated structure.

The code gets the CONTCAR locations using get_calc_loc of two calculations indicated by the start and end params, creates a folder named “interpolate” in the current FireWork directory, and copies the two CONTCARs to this folder. The two CONTCARs are then used to create nimages interpolated structures using pymatgen.core.structure.Structure.interpolate. Finally, the structure indicated by this_image is written as a POSCAR file.

Required params:

start (str): name of fw for start of interpolation. end (str): name of fw for end of interpolation. this_image (int): which interpolation this is. nimages (int) : number of interpolations.

Optional params:
autosort_tol (float): parameter used by Structure.interpolate.

a distance tolerance in angstrom in which to automatically sort end_structure to match to the closest points in this particular structure. Default is 0.0.

interpolate_poscar(fw_spec)
optional_params = ['autosort_tol']
required_params = ['start', 'end', 'this_image', 'nimages']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

atomate.vasp.firetasks.glue_tasks.pass_vasp_result(pass_dict=None, calc_dir='.', filename='vasprun.xml.gz', parse_eigen=False, parse_dos=False, **kwargs)

Function that gets a PassResult firework corresponding to output from a Vasprun. Covers most use cases in which user needs to pass results from a vasp run to child FWs (e. g. analysis FWs)

pass_vasp_result(pass_dict={‘stress’: “>>ionic_steps.-1.stress”})

Args:
pass_dict (dict): dictionary designating keys and values to pass

to child fireworks. If value is a string beginning with ‘>>’, the firework will search the parsed VASP output dictionary for the designated property by following the sequence of keys separated with periods, e. g. “>>ionic_steps.-1.stress” is used to designate the stress from the last ionic_step. If the value is not a string or does not begin with “>>” or “a>>” (for an object attribute, rather than nested key of .as_dict() conversion), it is passed as is. Defaults to pass the computed entry of the Vasprun.

calc_dir (str): path to dir that contains VASP output files, defaults

to ‘.’, e. g. current directory

filename (str): filename for vasp xml file to parse, defaults to

“vasprun.xml.gz”

parse_eigen (bool): flag on whether or not to parse eigenvalues,

defaults to false

parse_eigen (bool): flag on whether or not to parse dos,

defaults to false

**kwargs (keyword args): other keyword arguments passed to PassResult

e.g. mod_spec_key or mod_spec_cmd

atomate.vasp.firetasks.neb_tasks module

class atomate.vasp.firetasks.neb_tasks.RunNEBVaspFake(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Vasp Emulator for NEB, which has a different file arrangement. Similar to RunVaspFake class.

Required params:
ref_dir (string): Path to reference vasp run directory with input files in the folder named

‘inputs’ and output files in the folder named ‘outputs’.

Optional params:

params_to_check (list): optional list of incar parameters to check.

optional_params = ['params_to_check']
required_params = ['ref_dir']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.neb_tasks.TransferNEBTask(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

This class transfers NEB outputs from current directory to destination directory. “label” is used to determine the step of calculation and hence the final path. The corresponding structure will be updated in fw_spec before files transferring.

Required params:
label (str): Type of calculation outputs being transferred, choose from “parent”, “ep0”,

“ep1”, “neb1”, “neb2” and etc..

Optional params:
d_img (float): Distance between neighbouring images, used to determine the number of images

if “IMAGES” not provided in user_incar_settings, in Angstrom.

optional_params = ['d_img']
required_params = ['label']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.neb_tasks.WriteNEBFromEndpoints(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Generate NEB input sets using endpoint structures, default writes CI-NEB input. MVLCINEBSet is the only vasp_input_set supported now.

The number of images:
  1. search in “user_incar_settings”;

  2. otherwise, calculated using “d_img”.

Required parameters:

user_incar_settings (dict): additional INCAR settings.

Optional parameters:

user_kpoints_settings (dict): additional KPOINTS settings. sort_tol (float): Distance tolerance (in Angstrom) used to match the atomic indices between

start and end structures. If it is set 0, then no sorting will be performed.

d_img (float): distance in Angstrom, used in calculating number of images. Default 0.7

Angstrom.

interpolation_type (str): method to do image interpolation from two endpoints.

Choose from [“IDPP”, “linear”], default “IDPP”

optional_params = ['user_kpoints_settings', 'sort_tol', 'd_img', 'interpolation_type']
required_params = ['user_incar_settings']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.neb_tasks.WriteNEBFromImages(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Generate CI-NEB input sets using given images and endpoints structures. The structures correspond to structures nested in subfolders (“00”, “01”, “02”, etc.)

Required parameters:

neb_label (str): “1”, “2”, etc., labels the running sequence of NEB

Optional parameters:

user_incar_settings (dict): Additional INCAR settings. user_kpoints_settings (dict): Additional KPOINTS settings.

optional_params = ['user_incar_settings', 'user_kpoints_settings']
required_params = ['neb_label']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

atomate.vasp.firetasks.parse_outputs module

class atomate.vasp.firetasks.parse_outputs.BoltztrapToDBTask(*args, **kwargs)

Bases: atomate.vasp.firetasks.parse_outputs.BoltztrapToDb

class atomate.vasp.firetasks.parse_outputs.BoltztrapToDb(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Enter a BoltzTraP run into the database. Note that this assumes you are in a current dir that has the uniform band structure data with a sub-directory called “boltztrap” containing the BoltzTraP information.

Optional params:
db_file (str): path to file containing the database credentials.

Supports env_chk. Default: write data to JSON file.

hall_doping (bool): set True to retain hall_doping in dict additional_fields (dict): fields added to the document such as user-defined tags or name, ids, etc

optional_params = ['db_file', 'hall_doping', 'additional_fields']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.parse_outputs.ElasticTensorToDb(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Analyzes the stress/strain data of an elastic workflow to produce an elastic tensor and various other quantities.

Required params:
structure (Structure): structure to use for symmetrization,

input structure. If an optimization was used, will look for relaxed structure in calc locs

Optional params:
db_file (str): path to file containing the database credentials.

Supports env_chk. Default: write data to JSON file.

order (int): order of fit to perform fw_spec_field (str): if set, will update the task doc with the contents

of this key in the fw_spec.

fitting_method (str): if set, will use one of the specified

fitting methods from pymatgen. Supported methods are “independent”, “pseudoinverse”, and “finite_difference.” Note that order 3 and higher required finite difference fitting, and will override.

optional_params = ['db_file', 'order', 'fw_spec_field', 'fitting_method']
required_params = ['structure']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.parse_outputs.ElasticTensorToDbTask(*args, **kwargs)

Bases: atomate.vasp.firetasks.parse_outputs.ElasticTensorToDb

class atomate.vasp.firetasks.parse_outputs.FitEOSToDb(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Retrieve the energy and volume data and fit it to the given equation of state. The summary dict is written to ‘bulk_modulus.json’ file.

Required parameters:
tag (str): unique tag appended to the task labels in other fireworks so that all the

required data can be queried directly from the database.

db_file (str): path to the db file

Optional parameters:

to_db (bool): if True, the data will be inserted to “eos” collection; otherwise, dumped to a .json file. eos (str): equation of state used for fitting the energies and the volumes.

options supported by pymatgen: “quadratic”, “murnaghan”, “birch”, “birch_murnaghan”, “pourier_tarantola”, “vinet”, “deltafactor”. Default: “vinet”

optional_params = ['to_db', 'eos']
required_params = ['tag', 'db_file']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.parse_outputs.FitEquationOfStateTask(*args, **kwargs)

Bases: atomate.vasp.firetasks.parse_outputs.FitEOSToDb

class atomate.vasp.firetasks.parse_outputs.GibbsAnalysisToDb(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Compute the quasi-harmonic gibbs free energy. There are 2 options available for the quasi-harmonic approximation (set via ‘qha_type’ parameter): 1. use the phonopy package quasi-harmonic approximation interface or 2. use the debye model. Note: Instead of relying on fw_spec, this task gets the required data directly from the tasks collection for processing. The summary dict is written to ‘gibbs.json’ file.

required_params:
tag (str): unique tag appended to the task labels in other fireworks so that all the

required data can be queried directly from the database.

db_file (str): path to the db file

optional_params:
qha_type(str): quasi-harmonic approximation type: “debye_model” or “phonopy”,

default is “debye_model”

t_min (float): min temperature t_step (float): temperature step t_max (float): max temperature mesh (list/tuple): reciprocal space density eos (str): equation of state used for fitting the energies and the volumes.

options supported by phonopy: “vinet”, “murnaghan”, “birch_murnaghan”.

pressure (float): in GPa, optional. poisson (float): poisson ratio. Defaults to 0.25. anharmonic_contribution (bool): consider anharmonic contributions to

Gibbs energy from the Debye model. Defaults to False.

pressure (float): in GPa, optional. metadata (dict): meta data

optional_params = ['qha_type', 't_min', 't_step', 't_max', 'mesh', 'eos', 'pressure', 'poisson', 'anharmonic_contribution', 'metadata']
required_params = ['tag', 'db_file']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.parse_outputs.GibbsFreeEnergyTask(*args, **kwargs)

Bases: atomate.vasp.firetasks.parse_outputs.GibbsAnalysisToDb

class atomate.vasp.firetasks.parse_outputs.JsonToDb(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Insert the a JSON file (default: task.json) directly into the tasks database. Note that if the JSON file contains a “task_id” key, that task_id must not already be present in the tasks collection.

Optional params:

json_filename (str): name of the JSON file to insert (default: “task.json”) db_file (str): path to file containing the database credentials. Supports env_chk. calc_dir (str): path to dir (on current filesystem) that contains VASP output files.

Default: use current working directory.

optional_params = ['json_filename', 'db_file', 'calc_dir']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.parse_outputs.JsonToDbTask(*args, **kwargs)

Bases: atomate.vasp.firetasks.parse_outputs.JsonToDb

class atomate.vasp.firetasks.parse_outputs.MagneticDeformationToDB(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Used to calculate magnetic deformation from get_wf_magnetic_deformation workflow. See docstring for that workflow for more information. Required parameters:

db_file (str): path to the db file that holds your tasks collection and that you want to hold the magnetic_orderings collection wf_uuid (str): auto-generated from get_wf_magnetic_orderings, used to make it easier to retrieve task docs

Optional parameters:

to_db (bool): if True, the data will be inserted into dedicated collection in database, otherwise, will be dumped to a .json file.

optional_params = ['to_db']
required_params = ['db_file', 'wf_uuid']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.parse_outputs.MagneticOrderingsToDB(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Used to aggregate tasks docs from magnetic ordering workflow. For large-scale/high-throughput use, would recommend a specific builder, this is intended for easy, automated use for calculating magnetic orderings directly from the get_wf_magnetic_orderings workflow. It’s unlikely you will want to call this directly. Required parameters:

db_file (str): path to the db file that holds your tasks collection and that you want to hold the magnetic_orderings collection wf_uuid (str): auto-generated from get_wf_magnetic_orderings, used to make it easier to retrieve task docs parent_structure: Structure of parent crystal (not magnetically ordered)

optional_params = ['origins', 'input_index']
required_params = ['db_file', 'wf_uuid', 'parent_structure', 'perform_bader', 'scan']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.parse_outputs.PolarizationToDb(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Recovers the same branch polarization and spontaneous polarization for a ferroelectric workflow.

optional_params = ['db_file']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.parse_outputs.RamanSusceptibilityTensorToDbTask(*args, **kwargs)

Bases: atomate.vasp.firetasks.parse_outputs.RamanTensorToDb

class atomate.vasp.firetasks.parse_outputs.RamanTensorToDb(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Raman susceptibility tensor for each mode = Finite difference derivative of the dielectric

tensor wrt the displacement along that mode.

See: 10.1103/PhysRevB.73.104304. The frequencies are in the units of cm^-1. To convert the frequency to THz: multiply by 0.1884.

optional_params:

db_file (str): path to the db file

optional_params = ['db_file']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.parse_outputs.ThermalExpansionCoeffTask(*args, **kwargs)

Bases: atomate.vasp.firetasks.parse_outputs.ThermalExpansionCoeffToDb

class atomate.vasp.firetasks.parse_outputs.ThermalExpansionCoeffToDb(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Compute the quasi-harmonic thermal expansion coefficient using phonopy.

required_params:
tag (str): unique tag appended to the task labels in other fireworks so that all the

required data can be queried directly from the database.

db_file (str): path to the db file

optional_params:

t_min (float): min temperature t_step (float): temperature step t_max (float): max temperature mesh (list/tuple): reciprocal space density eos (str): equation of state used for fitting the energies and the volumes.

options supported by phonopy: “vinet” (default), “murnaghan”, “birch_murnaghan”.

pressure (float): in GPa, optional.

optional_params = ['t_min', 't_step', 't_max', 'mesh', 'eos', 'pressure']
required_params = ['tag', 'db_file']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.parse_outputs.VaspToDb(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

Enter a VASP run into the database. Uses current directory unless you specify calc_dir or calc_loc.

Optional params:
calc_dir (str): path to dir (on current filesystem) that contains VASP

output files. Default: use current working directory.

calc_loc (str OR bool): if True will set most recent calc_loc. If str

search for the most recent calc_loc with the matching name

parse_dos (bool): whether to parse the DOS and store in GridFS.

Defaults to False.

bandstructure_mode (str): Set to “uniform” for uniform band structure.

Set to “line” for line mode. If not set, band structure will not be parsed.

additional_fields (dict): dict of additional fields to add db_file (str): path to file containing the database credentials.

Supports env_chk. Default: write data to JSON file.

fw_spec_field (str): if set, will update the task doc with the contents

of this key in the fw_spec.

defuse_unsuccessful (bool): this is a three-way toggle on what to do if

your job looks OK, but is actually unconverged (either electronic or ionic). True -> mark job as COMPLETED, but defuse children. False –> do nothing, continue with workflow as normal. “fizzle” –> throw an error (mark this job as FIZZLED)

task_fields_to_push (dict): if set, will update the next Firework/Firetask

spec using fields from the task document. Format: {key : path} -> fw.spec[key] = task_doc[path] The path is a full mongo-style path so subdocuments can be referneced using dot notation and array keys can be referenced using the index. E.g “calcs_reversed.0.output.outar.run_stats”

optional_params = ['calc_dir', 'calc_loc', 'parse_dos', 'bandstructure_mode', 'additional_fields', 'db_file', 'fw_spec_field', 'defuse_unsuccessful', 'task_fields_to_push', 'parse_chgcar', 'parse_aeccar']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Args:
fw_spec (dict): A Firework spec. This comes from the master spec.

In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class atomate.vasp.firetasks.parse_outputs.VaspToDbTask(*args, **kwargs)

Bases: atomate.vasp.firetasks.parse_outputs.VaspToDb

atomate.vasp.firetasks.run_calc module

atomate.vasp.firetasks.write_inputs module

Module contents