atomate.vasp.workflows.base package

Submodules

atomate.vasp.workflows.base.adsorption module

atomate.vasp.workflows.base.adsorption.get_slab_fw(slab, bulk_structure=None, slab_gen_params={}, db_file=None, vasp_input_set=None, parents=None, vasp_cmd='vasp', name='')

Function to generate a a slab firework. Returns a TransmuterFW if bulk_structure is specified, constructing the necessary transformations from the slab and slab generator parameters, or an OptimizeFW if only a slab is specified.

Args:
slab (Slab or Structure): structure or slab corresponding
to the slab to be calculated
bulk_structure (Structure): bulk structure corresponding to slab, if
provided, slab firework is constructed as a TransmuterFW using the necessary transformations to get the slab from the bulk
slab_gen_params (dict): dictionary of slab generation parameters
used to generate the slab, necessary to get the slab that corresponds to the bulk structure
vasp_input_set (VaspInputSet): vasp_input_set corresponding to
the slab calculation

parents (Fireworks or list of ints): parent FWs db_file (string): path to database file vasp_cmd (string): vasp command

Returns:
Firework
atomate.vasp.workflows.base.adsorption.get_wf_surface(slabs, molecules=[], bulk_structure=None, slab_gen_params=None, vasp_cmd='vasp', db_file=None, ads_structures_params={}, add_molecules_in_box=False)
Args:

slabs (list of Slabs or Structures): slabs to calculate molecules (list of Molecules): molecules to place as adsorbates bulk_structure (Structure): bulk structure from which generate slabs

after reoptimization. If supplied, workflow will begin with bulk structure optimization.
slab_gen_params (dict): dictionary of slab generation parameters
used to generate the slab, necessary to get the slab that corresponds to the bulk structure if in that mode
ads_structures_params (dict): parameters to be supplied as
kwargs to AdsorbateSiteFinder.generate_adsorption_structures
add_molecules_in_box (boolean): flag to add calculation of molecule
energies to the workflow

db_file (string): path to database file vasp_cmd (string): vasp command

Returns:
Workflow
atomate.vasp.workflows.base.adsorption.get_wf_surface_all_slabs(bulk_structure, molecules, max_index=1, slab_gen_params=None, **kwargs)

Convenience constructor that allows a user to construct a workflow that finds all adsorption configurations (or slabs) for a given max miller index.

Args:
bulk_structure (Structure): bulk structure from which to construct slabs molecules (list of Molecules): adsorbates to place on surfaces max_index (int): max miller index slab_gen_params (dict): dictionary of kwargs for generate_all_slabs
Returns:
Workflow

atomate.vasp.workflows.base.bulk_modulus module

atomate.vasp.workflows.base.bulk_modulus.get_wf_bulk_modulus(structure, deformations, vasp_input_set=None, vasp_cmd='vasp', db_file=None, user_kpoints_settings=None, eos='vinet', tag=None, user_incar_settings=None)

Returns the workflow that computes the bulk modulus by fitting to the given equation of state.

Args:

structure (Structure): input structure. deformations (list): list of deformation matrices(list of lists). vasp_input_set (VaspInputSet): for the static deformation calculations vasp_cmd (str): vasp command to run. db_file (str): path to the db file. user_kpoints_settings (dict): example: {“grid_density”: 7000} eos (str): equation of state used for fitting the energies and the volumes.

supported equation of states: “quadratic”, “murnaghan”, “birch”, “birch_murnaghan”, “pourier_tarantola”, “vinet”, “deltafactor”. See pymatgen.analysis.eos.py
tag (str): something unique to identify the tasks in this workflow. If None a random uuid
will be assigned.

user_incar_settings (dict):

Returns:
Workflow

atomate.vasp.workflows.base.core module

atomate.vasp.workflows.base.core.get_wf(structure, wf_filename, params=None, common_params=None, vis=None, wf_metadata=None)

Get a workflow given a structure and a name of file from the workflow library.

Possible options for wf_filename are listed in: atomate.vasp.workflows.base.library and include band structure, dielectric constant, NEB, and more.

You can also override some of the parameters via the function arguments.

Args:

structure: (Structure) structure to run wf_filename: filename in library subdir, e.g. “band_structure.yaml” params: (list of dicts) set params for each Firework; format is list

that is same length as # of fws in the workflow

common_params: (dict) set common params vis: (VaspInputSet) A VaspInputSet to use for the first FW wf_metadata: (dict) workflow metadata

Returns:
A Workflow

atomate.vasp.workflows.base.deformations module

atomate.vasp.workflows.base.deformations.get_wf_deformations(structure, deformations, name='deformation', vasp_input_set=None, vasp_cmd='vasp', db_file=None, tag='', copy_vasp_outputs=True, metadata=None)

Returns a structure deformation workflow.

Firework 1 : structural relaxation Firework 2 - len(deformations): Deform the optimized structure and run static calculations.

Args:

structure (Structure): input structure to be optimized and run deformations (list of 3x3 array-likes): list of deformations name (str): some appropriate name for the transmuter fireworks. vasp_input_set (DictVaspInputSet): vasp input set for static deformed structure calculation. vasp_cmd (str): command to run db_file (str): path to file containing the database credentials. tag (str): some unique string that will be appended to the names of the fireworks so that

the data from those tagged fireworks can be queried later during the analysis.
copy_vasp_outputs (bool): whether or not copy the outputs from the previous calc(usually
structure optimization) before the transmuter fireworks.

metadata (dict): meta data

Returns:
Workflow

atomate.vasp.workflows.base.elastic module

atomate.vasp.workflows.base.elastic.get_default_strain_states(order=2)

Generates a list of “strain-states”

atomate.vasp.workflows.base.elastic.get_wf_elastic_constant(structure, strain_states=None, stencils=None, db_file=None, conventional=False, order=2, vasp_input_set=None, analysis=True, sym_reduce=False, tag='elastic', copy_vasp_outputs=False, **kwargs)

Returns a workflow to calculate elastic constants.

Firework 1 : write vasp input set for structural relaxation,
run vasp, pass run location, database insertion.

Firework 2 - number of total deformations: Static runs on the deformed structures

last Firework : Analyze Stress/Strain data and fit the elastic tensor

Args:

structure (Structure): input structure to be optimized and run. strain_states (list of Voigt-notation strains): list of ratios of nonzero elements

of Voigt-notation strain, e. g. [(1, 0, 0, 0, 0, 0), (0, 1, 0, 0, 0, 0), etc.].
stencils (list of floats, or list of list of floats): values of strain to multiply
by for each strain state, i. e. stencil for the perturbation along the strain state direction, e. g. [-0.01, -0.005, 0.005, 0.01]. If a list of lists, stencils must correspond to each strain state provided.

db_file (str): path to file containing the database credentials. conventional (bool): flag to convert input structure to conventional structure,

defaults to False.
order (int): order of the tensor expansion to be determined. Defaults to 2 and
currently supports up to 3.
vasp_input_set (VaspInputSet): vasp input set to be used. Defaults to static
set with ionic relaxation parameters set. Take care if replacing this, default ensures that ionic relaxation is done and that stress is calculated for each vasp run.
analysis (bool): flag to indicate whether analysis task should be added
and stresses and strains passed to that task

sym_reduce (bool): Whether or not to apply symmetry reductions tag (str): copy_vasp_outputs (bool): whether or not to copy previous vasp outputs. kwargs (keyword arguments): additional kwargs to be passed to get_wf_deformations

Returns:
Workflow

atomate.vasp.workflows.base.ferroelectric module

atomate.vasp.workflows.base.ferroelectric.get_wf_ferroelectric(polar_structure, nonpolar_structure, vasp_cmd='vasp', db_file=None, vasp_input_set_polar='MPStaticSet', vasp_input_set_nonpolar='MPStaticSet', relax=False, vasp_relax_input_set_polar=None, vasp_relax_input_set_nonpolar=None, nimages=9, hse=False, add_analysis_task=False, wfid=None, tags=None)

Returns a workflow to calculate the spontaneous polarization of polar_structure using a nonpolar reference phase structure and linear interpolations between the polar and nonpolar structure.

The nonpolar and polar structures must be in the same space group setting and atoms ordered such that a linear interpolation can be performed to create intermediate structures along the distortion.

For example, to calculate the polarization of orthorhombic BaTiO3 (space group 38) using the cubic structure (space group 221) as the nonpolar reference phase, we must transform the cubic to the orthorhombic setting. This can be accomplished using Bilbao Crystallographic Server’s Structure Relations tool. (http://www.cryst.ehu.es/cryst/rel.html)

Args:

polar_structure (Structure): polar structure of candidate ferroelectric nonpolar_structure (Structure): nonpolar reference structure in polar setting vasp_input_set_polar (DictVaspInputSet): VASP polar input set. Defaults to MPStaticSet. vasp_input_set_nonpolar (DictVaspInputSet): VASP nonpolar input set. Defaults to MPStaticSet. vasp_relax_input_set_polar (DictVaspInputSet): VASP polar input set. Defaults to MPRelaxSet. vasp_relax_input_set_nonpolar (DictVaspInputSet): VASP nonpolar input set. Defaults to MPRelaxSet. vasp_cmd (str): command to run db_file (str): path to file containing the database credentials. nimages: Number of interpolations calculated from polar to nonpolar structures, including the nonpolar.

For example, nimages = 9 will calculate 8 interpolated structures. 8 interpolations + nonpolar = 9.

add_analysis_task: Analyze polarization and energy trends as part of workflow. Default False. wfid (string): Unique worfklow id starting with “wfid_”. If None this is atomatically generated (recommended). tags (list of strings): Additional tags to add such as identifiers for structures.

Returns:

atomate.vasp.workflows.base.gibbs module

atomate.vasp.workflows.base.gibbs.get_wf_gibbs_free_energy(structure, deformations, vasp_input_set=None, vasp_cmd='vasp', db_file=None, user_kpoints_settings=None, t_step=10, t_min=0, t_max=1000, mesh=(20, 20, 20), eos='vinet', qha_type='debye_model', pressure=0.0, poisson=0.25, anharmonic_contribution=False, metadata=None, tag=None)

Returns quasi-harmonic gibbs free energy workflow. Note: phonopy package is required for the final analysis step if qha_type=”phonopy”

Args:

structure (Structure): input structure. deformations (list): list of deformation matrices(list of lists). vasp_input_set (VaspInputSet) vasp_cmd (str): vasp command to run. db_file (str): path to the db file. user_kpoints_settings (dict): example: {“grid_density”: 7000} t_step (float): temperature step (in K) t_min (float): min temperature (in K) t_max (float): max temperature (in K) 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”. Note: pymatgen supports more options than phonopy. see pymatgen.analysis.eos.py
qha_type(str): quasi-harmonic approximation type: “debye_model” or “phonopy”,
default is “debye_model”

pressure (float): in GPa poisson (float): poisson ratio anharmonic_contribution (bool): consider anharmonic contributions to

Gibbs energy from the Debye model. Defaults to False.

metadata (dict): meta data tag (str): something unique to identify the tasks in this workflow. If None a random uuid

will be assigned.
Returns:
Workflow

atomate.vasp.workflows.base.neb module

This module defines the Nudged Elastic Band (NEB) workflow.

atomate.vasp.workflows.base.neb.get_wf_neb_from_endpoints(parent, endpoints, user_incar_settings=None, additional_spec=None, user_kpoints_settings=None, additional_cust_args=None)

Get a CI-NEB workflow from given endpoints. Workflow: (Endpoints relax – ) NEB_1 – NEB_2 - … - NEB_r

endpoints not optimized: ep–neb(r) endpoints are optimized: neb(r)
Args:

parent (Structure): parent structure. endpoints (list[Structure]): The endpoint structures. user_incar_settings([dict]): Additional user_incar_settings. Note that the order of the

list is set as: “parent”, “ep_relax”, “neb1”, “neb2” etc., which contains at least three elements. The first dict is for parent structure relaxation, the second dict is for endpoints relaxation, and the rest are for NEB calculations. For example, [{}, {}, {“IOPT”: 7}, {“IOPT”: 1}]. Besides, user_incar_settings is used to determine how many NEB rounds will be. Default is [{}, {}, {}].

additional_spec (dict): User spec settings to overwrite default_spec. user_kpoints_settings ([dict]): Additional user_kpoints_settings, which contains at at

least three elements, which is similar to user_incar_settings. For example, [{}, {}, {“grid_density”: 100}] for the workflow from the parent structure relaxation, then the endpoint relaxation followed by one-round NEB simulation. Default values depend on the selected VaspInputSet.
additional_cust_args ([dict]): Optional parameters for RunVaspCustodian, same structure
with user_incar_settings and user_kpoints_settings.
Returns:
Workflow
atomate.vasp.workflows.base.neb.get_wf_neb_from_images(parent, images, user_incar_settings, additional_spec=None, user_kpoints_settings=None, additional_cust_args=None)

Get a CI-NEB workflow from given images. Workflow: NEB_1 – NEB_2 - … - NEB_n

Args:

parent (Structure): parent structure. images ([Structure]): All images and two endpoints. user_incar_settings([dict]): Additional user_incar_settings. Note that the order of the

list is set as: “parent”, “ep_relax”, “neb1”, “neb2” etc., which contains at least three elements. The first dict is for parent structure relaxation, the second dict is for endpoints relaxation, and the rest are for NEB calculations. For example, [{}, {}, {“IOPT”: 7}, {“IOPT”: 1}]. Besides, user_incar_settings is used to determine how many NEB rounds will be. Default is [{}, {}, {}].

additional_spec (dict): User spec settings to overwrite default_spec. user_kpoints_settings ([dict]): Additional user_kpoints_settings, which contains at at

least three elements, which is similar to user_incar_settings. For example, [{}, {}, {“grid_density”: 100}] for the workflow from the parent structure relaxation, then the endpoint relaxation followed by one-round NEB simulation. Default values depend on the selected VaspInputSet.
additional_cust_args ([dict]): Optional parameters for RunVaspCustodian, same structure
with user_incar_settings and user_kpoints_settings.
Returns:
Workflow
atomate.vasp.workflows.base.neb.get_wf_neb_from_structure(structure, user_incar_settings=None, additional_spec=None, user_kpoints_settings=None, additional_cust_args=None)

Obtain the CI-NEB workflow staring with a parent structure. This works only under the single vacancy diffusion mechanism.

Workflow: (parent relaxation) –> Endpoints relaxation –> NEB_1 –> NEB_2 –> … –> NEB_r
  1. If parent is not relaxed: then parent relaxation–ep–neb(r)
    (r rounds of NEB)
  2. If parent is relaxed: ep–neb(r) (r rounds of NEB)
Args:

structure (Structure): The parent structure. user_incar_settings([dict]): Additional user_incar_settings. Note that the order of the

list is set as: “parent”, “ep_relax”, “neb1”, “neb2” etc., which contains at least three elements. The first dict is for parent structure relaxation, the second dict is for endpoints relaxation, and the rest are for NEB calculations. For example, [{}, {}, {“IOPT”: 7}, {“IOPT”: 1}]. Besides, user_incar_settings is used to determine how many NEB rounds will be. Default is [{}, {}, {}].

additional_spec (dict): User spec settings to overwrite default_spec. user_kpoints_settings ([dict]): Additional user_kpoints_settings, which contains at at

least three elements, which is similar to user_incar_settings. For example, [{}, {}, {“grid_density”: 100}] for the workflow from the parent structure relaxation, then the endpoint relaxation followed by one-round NEB simulation. Default values depend on the selected VaspInputSet.
additional_cust_args ([dict]): Optional parameters for RunVaspCustodian, same structure
with user_incar_settings and user_kpoints_settings.
Returns:
Workflow

atomate.vasp.workflows.base.raman module

atomate.vasp.workflows.base.raman.get_wf_raman_spectra(structure, modes=None, step_size=0.005, vasp_cmd='vasp', db_file=None)
Raman susceptibility tensor workflow:
Calculation of phonon normal modes followed by the computation of dielectric tensor for structures displaced along the normal modes. Finally the dielectric tensors corresponding to each mode are used to compute the Raman susceptibility tensor using finite difference (central difference scheme).
Args:

structure (Structure): Input structure. modes (tuple/list): list of modes for which the Raman spectra need to be calculated.

The default is to use all the 3N modes.
step_size (float): site displacement along the normal mode in Angstroms. Used to compute
the finite difference(central difference scheme) first derivative of the dielectric constant along the normal modes.

vasp_cmd (str): vasp command to run. db_file (str): path to file containing the database credentials.

Returns:
Workflow

atomate.vasp.workflows.base.thermal_expansion module

atomate.vasp.workflows.base.thermal_expansion.get_wf_thermal_expansion(structure, deformations, vasp_input_set=None, vasp_cmd='vasp', db_file=None, user_kpoints_settings=None, t_step=10, t_min=0, t_max=1000, mesh=(20, 20, 20), eos='vinet', pressure=0.0, tag=None)

Returns quasi-harmonic thermal expansion workflow. Note: phonopy package is required for the final analysis step.

Args:

structure (Structure): input structure. deformations (list): list of deformation matrices(list of lists). vasp_input_set (VaspInputSet) vasp_cmd (str): vasp command to run. db_file (str): path to the db file. user_kpoints_settings (dict): example: {“grid_density”: 7000} t_step (float): temperature step (in K) t_min (float): min temperature (in K) t_max (float): max temperature (in K) 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”. Note: pymatgen supports more options than phonopy. see pymatgen.analysis.eos.py

pressure (float): in GPa tag (str): something unique to identify the tasks in this workflow. If None a random uuid

will be assigned.
Returns:
Workflow

Module contents