Workflows

This section describes the aiida-kkr workflows.

Generate KKR start potential

In this module you find the base workflow for a dos calculation and some helper methods to do so with AiiDA

aiida_kkr.workflows.voro_start.create_vorostart_result_nodes(*args, **kwargs)[source]

Pseudo work function to create output nodes of vorostart in correct graph structure returns outdict {linkname: node}

class aiida_kkr.workflows.voro_start.kkr_startpot_wc[source]

Workchain create starting potential for a KKR calculation by running voronoi and getting the starting DOS for first checks on the validity of the input setting. Starts from a structure together with a KKR parameter node.

Parameters:
  • wf_parameters – (ParameterData), Workchain specifications
  • structure – (StructureData), aiida structure node to begin calculation from (needs to contain vacancies, if KKR needs empty spheres)
  • kkr – (Code)
  • voronoi – (Code)
  • calc_parameters – (ParameterData), KKR parameter set, passed on to voronoi run.
Return result_kkr_startpot_wc:
 

(ParameterData), Information of workflow results like Success, last result node, dos array data

check_dos()[source]

checks if dos of starting potential is ok

check_voronoi()[source]

check voronoi output. return True/False if voronoi output is ok/problematic if output is problematic try to increase some parameters (e.g. cluster radius) and rerun up tp N_rerun_max times initializes with returning True

control_end_wc(errormsg)[source]

Controled way to shutdown the workchain. will initalize the output nodes

classmethod define(spec)[source]

Defines the outline of the workflow.

do_iteration_check()[source]

check if another iteration should be done

get_dos()[source]

call to dos sub workflow passing the appropriate input and submitting the calculation

classmethod get_wf_defaults()[source]

Print and return _wf_defaults dictionary. Can be used to easily create set of wf_parameters. returns _wf_defaults

return_results()[source]

return the results of the dos calculations This should run through and produce output nodes even if everything failed, therefore it only uses results from context.

run_voronoi()[source]

run voronoi calculation with parameters from input

start()[source]

init context and some parameters

aiida_kkr.workflows.voro_start.update_voro_input(*args, **kwargs)[source]

Pseudo wf used to keep track of updated parameters in voronoi calculation. voro_output only enters as dummy argument for correct connection but logic using this value is done somewhere else.

KKR scf cycle

In this module you find the base workflow for converging a kkr calculation and some helper methods to do so with AiiDA

aiida_kkr.workflows.kkr_scf.create_scf_result_node(*args, **kwargs)[source]

This is a pseudo wf, to create the right graph structure of AiiDA. This workfunction will create the output node in the database. It also connects the output_node to all nodes the information commes from. So far it is just also parsed in as argument, because so far we are to lazy to put most of the code overworked from return_results in here.

class aiida_kkr.workflows.kkr_scf.kkr_scf_wc[source]

Workchain for converging a KKR calculation (SCF).

It converges the charge potential. Two paths are possible:

(1) Start from a structure and run a voronoi calculation first, optional with calc_parameters (2) Start from an existing Voronoi or KKR calculation, with a remoteData

Parameters:
  • wf_parameters – (ParameterData), Workchain Spezifications
  • structure – (StructureData), Crystal structure
  • calc_parameters – (ParameterData), Vornoi/Kkr Parameters
  • remote_data – (RemoteData), from a KKR, or Vornoi calculation
  • voronoi – (Code)
  • kkr – (Code)
Return output_kkr_scf_wc_para:
 

(ParameterData), Information of workflow results like Success, last result node, list with convergence behavior

minimum input example: 1. Code1, Code2, Structure, (Parameters), (wf_parameters) 2. Code2, remote_data, (Parameters), (wf_parameters)

maximum input example: 1. Code1, Code2, Structure, Parameters

wf_parameters: {
‘queue’ : String, ‘resources’ : dict({“num_machines”: int, “num_mpiprocs_per_machine” : int}) ‘walltime’ : int}
  1. Code2, (remote-data), wf_parameters as in 1.

Hints: 1. This workflow does not work with local codes!

check_dos()[source]

checks if dos of final potential is ok

check_input_params(params, is_voronoi=False)[source]

Checks input parameter consistency and aborts wf if check fails.

check_voronoi()[source]

check output of kkr_startpot_wc workflow that creates starting potential, shapefun etc.

condition()[source]

check convergence condition

control_end_wc(errormsg)[source]

Controled way to shutdown the workchain. will initalize the output nodes

convergence_on_track()[source]

Check if convergence behavior of the last calculation is on track (i.e. going down)

classmethod define(spec)[source]

Defines the outline of the workflow.

get_dos()[source]

call to dos sub workflow passing the appropriate input and submitting the calculation

classmethod get_wf_defaults()[source]

Print and return _wf_defaults dictionary. Can be used to easily create set of wf_parameters. returns _wf_defaults

inspect_kkr()[source]

check for convergence and store some of the results of the last calculation to context

return_results()[source]

return the results of the calculations This shoudl run through and produce output nodes even if everything failed, therefore it only uses results from context.

run_kkr()[source]

submit a KKR calculation

run_voronoi()[source]

run the voronoi step calling voro_start workflow

start()[source]

init context and some parameters

update_kkr_params()[source]

update set of KKR parameters (check for reduced mixing, change of mixing strategy, change of accuracy setting)

validate_input()[source]

# validate input and find out which path (1, or 2) to take # return True means run voronoi if false run kkr directly

Density of states

In this module you find the base workflow for a dos calculation and some helper methods to do so with AiiDA

aiida_kkr.workflows.dos.create_dos_result_node(*args, **kwargs)[source]

This is a pseudo wf, to create the right graph structure of AiiDA.

aiida_kkr.workflows.dos.create_dos_result_node_minimal(*args, **kwargs)[source]

This is a pseudo wf, to create the right graph structure of AiiDA. minimal if dosrun unsuccesful

class aiida_kkr.workflows.dos.kkr_dos_wc[source]

Workchain a DOS calculation with KKR starting from the remoteData node of a previous calculation (either Voronoi or KKR).

Parameters:
  • wf_parameters – (ParameterData); Workchain specifications
  • remote_data – (RemoteData), mandatory; from a KKR or Vornoi calculation
  • kkr – (Code), mandatory; KKR code running the dos calculation
Return result_kkr_dos_wc:
 

(ParameterData), Information of workflow results like Success, last result node, list with convergence behavior

control_end_wc(errormsg)[source]

Controled way to shutdown the workchain. will initalize the output nodes

classmethod define(spec)[source]

Defines the outline of the workflow.

get_dos()[source]

submit a dos calculation and interpolate result if returns complete

classmethod get_wf_defaults()[source]

Print and return _wf_defaults dictionary. Can be used to easily create set of wf_parameters. returns _wf_defaults

return_results()[source]

return the results of the dos calculations This should run through and produce output nodes even if everything failed, therefore it only uses results from context.

set_params_dos()[source]

take input parameter node and change to DOS contour according to input from wf_parameter input internally calls the update_params work function to keep track of provenance

start()[source]

init context and some parameters

validate_input()[source]

# validate input and find out which path (1, or 2) to take # return True means run voronoi if false run kkr directly

aiida_kkr.workflows.dos.parse_dosfiles(dospath)[source]

parse dos files to XyData nodes

Equation of states

In this module you find the base workflow for a dos calculation and some helper methods to do so with AiiDA

class aiida_kkr.workflows.eos.kkr_eos_wc[source]

Workchain of an equation of states calculation with KKR.

classmethod define(spec)[source]

Defines the outline of the workflow.

Check KKR parameter convergence

In this module you find the base workflow for a dos calculation and some helper methods to do so with AiiDA

class aiida_kkr.workflows.check_para_convergence.kkr_check_para_wc[source]

Workchain a set of KKR calculations checking the convergence. Starts from the remoteData node of a previous KKR calculation.

Parameters:
  • wf_parameters – (ParameterData), Workchain specifications
  • remote_data – (RemoteData), from a KKR calculation
  • kkr – (Code)
Return results_kkr_check_para_wc:
 

(ParameterData), Information of workflow results like Success, last result node, …

classmethod define(spec)[source]

Defines the outline of the workflow.

Find magnetic ground state

In this module you find the base workflow for a dos calculation and some helper methods to do so with AiiDA

class aiida_kkr.workflows.check_magnetic_state.kkr_check_mag_wc[source]

Workchain used to initialize a magnetic KKR calculation starting from the remoteData node of a previous calculation (either Voronoi or KKR).

Parameters:
  • wf_parameters – (ParameterData), Workchain specifications
  • remote_data – (RemoteData), from a KKR, or Vornoi calculation
  • kkr – (Code)
Return results_kkr_maginit_wc:
 

(ParameterData), Information of workflow results like Success, last result node, list with convergence behavior

classmethod define(spec)[source]

Defines the outline of the workflow.