aiida_vasp.workchains.v2.converge#

Redesigned convergence testing workchain.

Make it more simple and easy to use.

Inputs - just like a normal VaspWorkChain - run with different cut off energies - run with different k spacing - summarise the results

No added wrapper etc.

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

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 = 'WorkflowFactory(...)'#
ENERGY_KEY = 'energy_extrapolated'#
option_class = None#
classmethod define(spec)[source]#
setup()[source]#

Setup the convergence workflow

launch_conv_calcs()[source]#

Setup and launch the convergence calculations

analyse()[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, plot=False, **plot_kwargs)[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)[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, kdf, **kwargs)[source]#

Make two combined plots for the convergence test results.

aiida_vasp.workchains.v2.converge.get_convergence_builder(structure, config)[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.