aiida_vasp.workchains.v2.converge#

Module Contents#

Classes#

VaspConvergenceWorkChain

A workchain to perform convergence tests.

Functions#

get_conv_data

Convenient method for extracting convergence data

plot_conv_data

Make two combined plots for the convergence test results.

get_convergence_builder

Short cut for getting an VaspBuilderUpdater ready to use

API#

class aiida_vasp.workchains.v2.converge.VaspConvergenceWorkChain(inputs: dict | None = None, logger: logging.Logger | None = None, runner: aiida.engine.runners.Runner | None = None, enable_persistence: bool = True)[source]#

Bases: aiida.engine.WorkChain, aiida_vasp.workchains.v2.mixins.WithBuilderUpdater, aiida_vasp.protocols.ProtocolMixin

A workchain to perform convergence tests.

The inputs are essentially the same as for VaspWorChain but instead of launching a single calculation it launches many calculations with different kpoint spacing and the cut off energy.

A conv_setting input controls the range of cut off energies and kpoint spacings. The available options are:

  • cutoff_start

  • cutoff_stop

  • cutoff_step

  • kspacing_start

  • kspacing_stop

  • kspacing_step

  • cutoff_kconv : cut-off energy for the kpoints convergence tests.

  • kspacing_cutconv : the kpoint spacing to be used for cut-off energy convergence tests.

The the output data are collected and stored in two Dict output nodes.

Initialization

Construct a WorkChain instance.

Construct the instance only if it is a sub class of WorkChain, otherwise raise InvalidOperation.

Parameters:
  • inputs – work chain inputs

  • logger – aiida logger

  • runner – work chain runner

  • enable_persistence – whether to persist this work chain

_sub_workchain_string = 'vasp.v2.vasp'#
_sub_workchain = None#
_protocol_tag = 'conv'#
ENERGY_KEY = 'energy_extrapolated'#
option_class = None#
classmethod define(spec: aiida.engine.ProcessSpec) None[source]#
classmethod get_builder_from_protocol(code: aiida.orm.AbstractCode, structure: aiida.orm.StructureData, protocol: None | str = None, overrides: None | dict = None, **kwargs)[source]#

Return a builder based on a protocol

setup() None[source]#

Setup the convergence workflow

launch_conv_calcs() None[source]#

Setup and launch the convergence calculations

analyse() None[source]#

Analyse the output of the calculations. Collect data to be plotted/analysed against the cut off energy and kpoints spacing

static get_conv_data(conv_work: aiida.orm.WorkChainNode, plot: bool = False, **plot_kwargs: Any) tuple[Any, Any][source]#

Convenient method for extracting convergence data

Args: conv_work (orm.WorkChainNode): Convergence workflow node

Returns: A tuple of cut-off convergence and k-point convergence result dataframe

aiida_vasp.workchains.v2.converge.get_conv_data(conv_work: aiida.orm.WorkChainNode) tuple[Any, Any][source]#

Convenient method for extracting convergence data

Args:

conv_work (orm.WorkChainNode): Convergence workflow node

Returns:

A tuple of cut-off convergence and k-point convergence result data frame

aiida_vasp.workchains.v2.converge.plot_conv_data(cdf: Any, kdf: Any, **kwargs: Any) list[Any][source]#

Make two combined plots for the convergence test results.

aiida_vasp.workchains.v2.converge.get_convergence_builder(structure: aiida.orm.StructureData, config: dict[str, Any])[source]#

Short cut for getting an VaspBuilderUpdater ready to use

Structure StructureData:

The input structure node.

Config dict:

Configuration dictionary specifying the protocol.

The following files are used from the configuration: code, inputset, conv, options, resources.