Fleur input generator plug-in

Fleurinputgen Calculation

Input plug-in for the FLEUR input generator ‘inpgen’. The input generator for the Fleur code is a preprocessor and should be run locally (with the direct scheduler) or inline, because it does not take many resources.

class aiida_fleur.calculation.fleurinputgen.FleurinputgenCalculation(*args: Any, **kwargs: Any)[source]

JobCalculationClass for the inpgen, which is a preprocessor for a FLEUR calculation. For more information about produced files and the FLEUR-code family, go to http://www.flapw.de/.

classmethod define(spec)[source]

Define the process specification, including its inputs, outputs and known exit codes.

Ports are added to the metadata input namespace (inherited from the base Process), and a code input Port, a remote_folder output Port and retrieved folder output Port are added.

Parameters

spec – the calculation job process spec to define.

prepare_for_submission(folder)[source]

This is the routine to be called when you want to create the input files for the inpgen with the plug-in.

Parameters

folder – a aiida.common.folders.Folder subclass where the plugin should put all its files.

aiida_fleur.calculation.fleurinputgen.write_inpgen_file_aiida_struct(structure, file, input_params=None, settings=None)[source]

Wraps around masci_tools write inpgen_file, unpacks aiida structure

Fleurinputgen Parser

This module contains the parser for a inpgen calculation and methods for parsing different files produced by inpgen.

class aiida_fleur.parsers.fleur_inputgen.Fleur_inputgenParser(node)[source]

This class is the implementation of the Parser class for the FLEUR inpgen. It takes the files received from an inpgen calculation and creates AiiDA nodes for the Database. From the inp.xml file a FleurinpData object is created, also some information from the out file is stored in a ParameterData node.

parse(**kwargs)[source]

Takes inp.xml generated by inpgen calculation and created an FleurinpData node.

Returns

a dictionary of AiiDA nodes to be stored in the database.

Fleur-code plugin

Fleur Calculation

This file contains a CalcJob that represents FLEUR calculation.

class aiida_fleur.calculation.fleur.FleurCalculation(*args: Any, **kwargs: Any)[source]

A CalcJob class that represents FLEUR DFT calculation. For more information about the FLEUR-code family go to http://www.flapw.de/

classmethod define(spec)[source]

Define the process specification, including its inputs, outputs and known exit codes.

Ports are added to the metadata input namespace (inherited from the base Process), and a code input Port, a remote_folder output Port and retrieved folder output Port are added.

Parameters

spec – the calculation job process spec to define.

prepare_for_submission(folder)[source]

This is the routine to be called when you make a FLEUR calculation. This routine checks the inputs and modifies copy lists accordingly. The standard files to be copied are given here.

Parameters

folder – a aiida.common.folders.Folder subclass where the plugin should put all its files.

Fleur Parser

This module contains the parser for a FLEUR calculation and methods for parsing different files produced by FLEUR.

Please implement file parsing routines that they can be executed from outside the parser. Makes testing and portability easier.

class aiida_fleur.parsers.fleur.FleurParser(node: CalcJobNode)[source]

This class is the implementation of the Parser class for FLEUR. It parses the FLEUR output if the calculation was successful, i.e checks if all files are there that should be and their condition. Then it parses the out.xml file and returns a (simple) parameterData node with the results of the last iteration. Other files (DOS.x, bands.x, relax.xml, …) are also parsed if they are retrieved.

get_linkname_outparams()[source]

Returns the name of the link to the output_complex Node contains the Fleur output in a rather complex dictionary.

get_linkname_outparams_complex()[source]

Returns the name of the link to the output_complex Node contains the Fleur output in a rather complex dictionary.

parse(**kwargs)[source]

Receives in input a dictionary of retrieved nodes. Does all the logic here. Checks presents of files. Calls routines to parse them and returns parameter nodes and success.

Return successful

Bool, if overall parsing was successful or not

Return new_nodes_list

list of tuples of two (linkname, Dataobject), nodes to be stored by AiiDA

aiida_fleur.parsers.fleur.parse_relax_file(relax_file, schema_dict)[source]

This function parsers relax.xml output file and returns a Dict containing all the data given there.

Fleur input Data structure

Fleur input Data structure

In this module is the FleurinpData class, and methods for FLEUR input manipulation plus methods for extration of AiiDA data structures.

class aiida_fleur.data.fleurinp.FleurinpData(files: Optional[list[str]] = None, node: Optional[Union[aiida.orm.nodes.node.Node, str, int]] = None, **kwargs: Any)[source]

AiiDA data object representing everything a FLEUR calculation needs.

It is initialized with an absolute path to an inp.xml file or a FolderData node containing inp.xml. Other files can also be added that will be copied to the remote machine, where the calculation takes place.

It stores the files in the repository and stores the input parameters of the inp.xml file of FLEUR in the database as a python dictionary (as internal attributes). When an inp.xml (name important!) file is added to files, parsed into a XML tree and validated against the XML schema file for the given file version. These XML schemas are provided by the masci-tools library

FleurinpData also provides the user with methods to extract AiiDA StructureData, KpointsData nodes and Dict nodes with LAPW parameters.

Remember that most attributes of AiiDA nodes can not be changed after they have been stored in the database! Therefore, you have to use the FleurinpModifier class and its methods if you want to change somthing in the inp.xml file. You will retrieve a new FleurinpData that way and start a new calculation from it.

__init__(files: Optional[list[str]] = None, node: Optional[Union[aiida.orm.nodes.node.Node, str, int]] = None, **kwargs: Any) None[source]

Initialize a FleurinpData object set the files given

convert_inpxml(to_version: aiida.orm.nodes.data.str.Str) aiida_fleur.data.fleurinp.FleurinpData[source]

Convert the fleurinp data node to a different inp.xml version and return a clone of the node

Note

If the Fleurinp contains included xml trees the resulting FleurinpData will contain only the combined inp.xml

convert_inpxml_ncf(to_version: str) aiida_fleur.data.fleurinp.FleurinpData[source]

Convert the fleurinp data node to a different inp.xml version and return a clone of the node

Note

If the Fleurinp contains included xml trees the resulting FleurinpData will contain only the combined inp.xml

del_file(filename: str) None[source]

Remove a file from FleurinpData instancefind

Parameters

filename – name of the file to be removed from FleurinpData instance

property files: list[str]

Returns the list of the names of the files stored

get_content(filename: str = 'inp.xml') str[source]

Returns the content of the single file stored for this data node.

Returns

A string of the file content

get_fleur_modes() dict[str, Any][source]

Analyses inp.xml file to set up a calculation mode. ‘Modes’ are paths a FLEUR calculation can take, resulting in different output. This files can be automatically addded to the retrieve_list of the calculation.

Common modes are: scf, jspin2, dos, band, pot8, lda+U, eels, …

Returns

a dictionary containing all possible modes.

get_kpointsdata(name: Optional[aiida.orm.nodes.data.str.Str] = None, index: Optional[aiida.orm.nodes.data.int.Int] = None, only_used: Optional[aiida.orm.nodes.data.bool.Bool] = None) aiida.orm.nodes.data.array.kpoints.KpointsData | dict[str, aiida.orm.nodes.data.array.kpoints.KpointsData][source]

This routine returns an AiiDA KpointsData type produced from the inp.xml file. This only works if the kpoints are listed in the in inpxml. This is a calcfunction and keeps the provenance!

Returns

KpointsData node

get_kpointsdata_ncf(name: Optional[str] = None, index: Optional[int] = None, only_used: bool = False) aiida.orm.nodes.data.array.kpoints.KpointsData | dict[str, aiida.orm.nodes.data.array.kpoints.KpointsData][source]

This routine returns an AiiDA KpointsData type produced from the inp.xml file. This only works if the kpoints are listed in the in inpxml. This is NOT a calcfunction and does not keep the provenance!

Parameters
  • name – str, optional, if given only the kpoint set with the given name is returned

  • index – int, optional, if given only the kpoint set with the given index is returned

Returns

KpointsData node

get_nkpts() int[source]

This routine returns the number of kpoints used in the fleur calculation defined in this input

Returns

int with the number of kPoints

get_parameterdata(inpgen_ready: Optional[aiida.orm.nodes.data.bool.Bool] = None, write_ids: Optional[aiida.orm.nodes.data.bool.Bool] = None) aiida.orm.nodes.data.dict.Dict[source]

This routine returns an AiiDA Dict type produced from the inp.xml file. The returned node can be used for inpgen as calc_parameters. This is a calcfunction and keeps the provenance!

Returns

Dict node

get_parameterdata_ncf(inpgen_ready: bool = True, write_ids: bool = True) aiida.orm.nodes.data.dict.Dict[source]

This routine returns an AiiDA Dict type produced from the inp.xml file. This node can be used for inpgen as calc_parameters. This is NOT a calcfunction and does NOT keep the provenance!

Returns

Dict node

get_structuredata(normalize_kind_name: Optional[aiida.orm.nodes.data.bool.Bool] = None) aiida.orm.nodes.data.structure.StructureData[source]

This routine return an AiiDA Structure Data type produced from the inp.xml file. If this was done before, it returns the existing structure data node. This is a calcfunction and therefore keeps the provenance.

Parameters

fleurinp – a FleurinpData instance to be parsed into a StructureData

Returns

StructureData node

get_structuredata_ncf(normalize_kind_name: bool = True) aiida.orm.nodes.data.structure.StructureData[source]

This routine returns an AiiDA Structure Data type produced from the inp.xml file. not a calcfunction

Parameters

self – a FleurinpData instance to be parsed into a StructureData

Returns

StructureData node, or None

property inp_dict: dict[str, Any]

Returns the inp_dict (the representation of the inp.xml file) as it will or is stored in the database.

property inp_version: str | None

Returns the version string corresponding to the inp.xml file

load_inpxml(validate_xml_schema: bool = True, return_included_tags: bool = False, **kwargs: Any) tuple[lxml.etree._ElementTree, masci_tools.io.parsers.fleur_schema.schema_dict.InputSchemaDict] | tuple[lxml.etree._ElementTree, masci_tools.io.parsers.fleur_schema.schema_dict.InputSchemaDict, set[str]][source]

Returns the lxml etree and the schema dictionary corresponding to the version. If validate_xml_schema=True the file will also be validated against the schema

Keyword arguments are passed on to the parser

open(path: str = 'inp.xml', mode: str = 'r') ContextManager[BinaryIO | TextIO][source]

Returns an open file handle to the content of this data node.

Parameters
  • key – name of the file to be opened

  • mode – the mode with which to open the file handle

Returns

A file handle in read mode

property parser_info: dict[str, Any]

Dict property, with the info and warnings from the inpxml_parser

set_file(filename: str, dst_filename: Optional[str] = None, node: Optional[Union[aiida.orm.nodes.node.Node, str, int]] = None) None[source]

Add a file to the FleurinpData instance.

Parameters
  • filename – absolute path to the file or a filename of node is specified

  • node – a FolderData node containing the file

set_files(files: list[str], node: Optional[Union[aiida.orm.nodes.node.Node, str, int]] = None) None[source]

Add the list of files to the FleurinpData instance. Can by used as an alternative to the setter.

Parameters
  • files – list of abolute filepaths or filenames of node is specified

  • node – a FolderData node containing files from the filelist

aiida_fleur.data.fleurinp.convert_inpxml(fleurinp: aiida_fleur.data.fleurinp.FleurinpData, to_version: aiida.orm.nodes.data.str.Str) aiida_fleur.data.fleurinp.FleurinpData[source]

Convert the fleurinp data node to a different inp.xml version and return a clone of the node

Note

If the Fleurinp contains included xml trees the resulting FleurinpData will contain only the combined inp.xml

aiida_fleur.data.fleurinp.get_fleurinp_from_folder_data(folder_node: aiida.orm.nodes.data.folder.FolderData, store: bool = False, additional_files: Optional[list[str]] = None) aiida_fleur.data.fleurinp.FleurinpData[source]

Create FleurinpData object from the given RemoteData object

Parameters
  • remote_node – RemoteData to use for the generation of the FleurinpData

  • store – bool, if True the FleurinpData object will be stored after generation

Returns

FleurinpData object with the input xml files from the retrieved folder of the calculation associated RemoteData

aiida_fleur.data.fleurinp.get_fleurinp_from_folder_data_cf(folder_node: aiida.orm.nodes.data.folder.FolderData, additional_files: aiida.orm.nodes.data.list.List | None = None) aiida_fleur.data.fleurinp.FleurinpData[source]

Create FleurinpData object from the given FolderData object

Parameters

remote_node – FolderData to use for the generation of the FleurinpData

Returns

FleurinpData object with the input xml files from the FolderData

aiida_fleur.data.fleurinp.get_fleurinp_from_remote_data(remote_node: aiida.orm.nodes.data.remote.base.RemoteData, store: bool = False, additional_files: Optional[list[str]] = None) aiida_fleur.data.fleurinp.FleurinpData[source]

Create FleurinpData object from the given RemoteData object

Parameters
  • remote_node – RemoteData to use for the generation of the FleurinpData

  • store – bool, if True the FleurinpData object will be stored after generation

Returns

FleurinpData object with the input xml files from the retrieved folder of the calculation associated RemoteData

aiida_fleur.data.fleurinp.get_fleurinp_from_remote_data_cf(remote_node: aiida.orm.nodes.data.remote.base.RemoteData, additional_files: aiida.orm.nodes.data.list.List | None = None) aiida_fleur.data.fleurinp.FleurinpData[source]

Create FleurinpData object from the given RemoteData object

Parameters
  • remote_node – RemoteData to use for the generation of the FleurinpData

  • store – bool, if True the FleurinpData object will be stored after generation

Returns

FleurinpData object with the input xml files from the retrieved folder of the calculation associated RemoteData

aiida_fleur.data.fleurinp.get_kpointsdata(fleurinp: aiida_fleur.data.fleurinp.FleurinpData, name: aiida.orm.nodes.data.str.Str | None = None, index: aiida.orm.nodes.data.int.Int | None = None, only_used: aiida.orm.nodes.data.bool.Bool | None = None) aiida.orm.nodes.data.array.kpoints.KpointsData | dict[str, aiida.orm.nodes.data.array.kpoints.KpointsData][source]

This routine returns an AiiDA KpointsData type produced from the inp.xml file. This only works if the kpoints are listed in the in inpxml. This is a calcfunction and keeps the provenance!

Returns

KpointsData node or dict of KpointsData

aiida_fleur.data.fleurinp.get_parameterdata(fleurinp: aiida_fleur.data.fleurinp.FleurinpData, inpgen_ready: aiida.orm.nodes.data.bool.Bool | None = None, write_ids: aiida.orm.nodes.data.bool.Bool | None = None) aiida.orm.nodes.data.dict.Dict[source]

This routine returns an AiiDA Dict type produced from the inp.xml file. The returned node can be used for inpgen as calc_parameters. This is a calcfunction and keeps the provenance!

Returns

Dict node

aiida_fleur.data.fleurinp.get_structuredata(fleurinp: aiida_fleur.data.fleurinp.FleurinpData, normalize_kind_name: aiida.orm.nodes.data.bool.Bool | None = None) aiida.orm.nodes.data.structure.StructureData[source]

This routine return an AiiDA Structure Data type produced from the inp.xml file. If this was done before, it returns the existing structure data node. This is a calcfunction and therefore keeps the provenance.

Parameters

fleurinp – a FleurinpData instance to be parsed into a StructureData

Returns

StructureData node

Fleurinp modifier

In this module is the FleurinpModifier class, which is used to manipulate FleurinpData objects in a way which keeps the provernance.

class aiida_fleur.data.fleurinpmodifier.FleurinpModifier(validate_signatures=True)[source]

A class which represents changes to the FleurinpData object.

add_number_to_attrib(*args: Any, **kwargs: Any) None

Appends a add_number_to_attrib() to the list of tasks that will be done on the xmltree.

Adds a given number to the attribute value in a xmltree specified by the name of the attribute and optional further specification If there are no nodes under the specified xpath an error is raised

Parameters
  • name – the attribute name to change

  • number_to_add – number to add/multiply with the old attribute value

  • complex_xpath – an optional xpath to use instead of the simple xpath for the evaluation

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

  • mode – str (either rel/relative or abs/absolute). rel/relative multiplies the old value with number_to_add abs/absolute adds the old value and number_to_add

  • occurrences – int or list of int. Which occurrence of the node to set. By default all are set.

Kwargs:
param tag_name

str, name of the tag where the attribute should be parsed

param contains

str, this string has to be in the final path

param not_contains

str, this string has to NOT be in the final path

param exclude

list of str, here specific types of attributes can be excluded valid values are: settable, settable_contains, other

add_number_to_first_attrib(*args: Any, **kwargs: Any) None

Appends a add_number_to_first_attrib() to the list of tasks that will be done on the xmltree.

Adds a given number to the first occurrence of an attribute value in a xmltree specified by the name of the attribute and optional further specification If there are no nodes under the specified xpath an error is raised

Parameters
  • name – the attribute name to change

  • number_to_add – number to add/multiply with the old attribute value

  • complex_xpath – an optional xpath to use instead of the simple xpath for the evaluation

  • mode – str (either rel/relative or abs/absolute). rel/relative multiplies the old value with number_to_add abs/absolute adds the old value and number_to_add

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

Kwargs:
param tag_name

str, name of the tag where the attribute should be parsed

param contains

str, this string has to be in the final path

param not_contains

str, this string has to NOT be in the final path

param exclude

list of str, here specific types of attributes can be excluded valid values are: settable, settable_contains, other

add_task_list(task_list: list[tuple[str, dict[str, Any]]]) None

Add a list of tasks to be added

Parameters

task_list – list of tuples first index is the name of the method second is defining the arguments by keyword in a dict

align_nmmpmat_to_sqa(*args: Any, **kwargs: Any) None

Appends a align_nmmpmat_to_sqa() to the list of tasks that will be done on the xmltree.

Align the density matrix with the given SQA of the associated species

Parameters
  • species_name – string, name of the species you want to change

  • orbital – integer or string (‘all’), orbital quantum number of the LDA+U procedure to be modified

  • phi_before – float or list of floats, angle (radian), values for phi for the previous alignment of the density matrix

  • theta_before – float or list of floats, angle (radian), values for theta for the previous alignment of the density matrix

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

Raises
  • ValueError – If something in the input is wrong

  • KeyError – If no LDA+U procedure is found on a species

classmethod apply_fleurinp_modifications(new_fleurinp: aiida_fleur.data.fleurinp.FleurinpData, modification_tasks: list[masci_tools.io.fleurxmlmodifier.ModifierTask]) None[source]

Apply the modifications working directly on the cloned FleurinpData instance. The functions will warn the user if one of the methods executed here are after XML modifications in the task list, since this method will implictly reorder the order of the execution

Warning

These should be performed BEFORE the XML Modification methods in any of the functions doing modifcations (FleurinpModifier.show(), FleurinpModifier.validate(), FleurinpModifier.freeze()).

Parameters
  • new_fleurinp – The Fleurinpdata instance cloned from the original

  • modification_tasks – a list of modification tuples

classmethod apply_modifications(xmltree: lxml.etree._ElementTree, nmmp_lines: list[str] | None, modification_tasks: list[masci_tools.io.fleurxmlmodifier.ModifierTask], validate_changes: bool = True, adjust_version_for_dev_version: bool = True) tuple[lxml.etree._ElementTree, list[str] | None]

Applies given modifications to the fleurinp lxml tree. It also checks if a new lxml tree is validated against schema. Does not rise an error if inp.xml is not validated, simple prints a message about it.

Parameters
  • xmltree – a lxml tree to be modified (IS MODIFIED INPLACE)

  • nmmp_lines – a n_mmp_mat file to be modified (IS MODIFIED INPLACE)

  • modification_tasks – a list of modification tuples

  • validate_changes – bool optional (default True), if True after all tasks are performed both the xmltree and nmmp_lines are checked for consistency

  • adjust_version_for_dev_version – bool optional (default True), if True and the schema_dict and file version differ, e.g. a development version is used the version is temporarily modified to swallow the validation error that would occur

Returns

a modified lxml tree and a modified n_mmp_mat file

changes() list[masci_tools.io.fleurxmlmodifier.ModifierTask]

Prints out all changes currently registered on this instance

clone_species(*args: Any, **kwargs: Any) None

Appends a clone_species() to the list of tasks that will be done on the xmltree.

Method to create a new species from an existing one with evtl. modifications

For reference of the changes dictionary look at set_species()

Parameters
  • species_name – string, name of the specie you want to clone Has to correspond to one single species (no ‘all’/’all-<search_string>’)

  • new_name – new name of the cloned species

  • changes – a optional python dict specifying what you want to change.

create_tag(*args: Any, **kwargs: Any) None[source]

Appends a create_tag() to the list of tasks that will be done on the xmltree.

Parameters
  • tag – str of the tag to create

  • complex_xpath – an optional xpath to use instead of the simple xpath for the evaluation

  • create_parents – bool optional (default False), if True and the given xpath has no results the the parent tags are created recursively

  • occurrences – int or list of int. Which occurence of the parent nodes to create a tag. By default all nodes are used.

Kwargs:
param contains

str, this string has to be in the final path

param not_contains

str, this string has to NOT be in the final path

del_file(filename: str) None[source]

Appends a del_file() to the list of tasks that will be done on the FleurinpData instance.

Parameters

filename – name of the file to be removed from FleurinpData instance

delete_att(*args: Any, **kwargs: Any) None

Appends a delete_att() to the list of tasks that will be done on the xmltree.

This method deletes a attribute with a uniquely identified xpath.

Parameters
  • name – str of the attribute to delete

  • complex_xpath – an optional xpath to use instead of the simple xpath for the evaluation

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

  • occurrences – int or list of int. Which occurrence of the parent nodes to delete a attribute. By default all nodes are used.

Kwargs:
param tag_name

str, name of the tag where the attribute should be parsed

param contains

str, this string has to be in the final path

param not_contains

str, this string has to NOT be in the final path

param exclude

list of str, here specific types of attributes can be excluded valid values are: settable, settable_contains, other

delete_tag(*args: Any, **kwargs: Any) None

Appends a delete_tag() to the list of tasks that will be done on the xmltree.

This method deletes a tag with a uniquely identified xpath.

Parameters
  • tag – str of the tag to delete

  • complex_xpath – an optional xpath to use instead of the simple xpath for the evaluation

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

  • occurrences – int or list of int. Which occurrence of the parent nodes to delete a tag. By default all nodes are used.

Kwargs:
param contains

str, this string has to be in the final path

param not_contains

str, this string has to NOT be in the final path

freeze() aiida_fleur.data.fleurinp.FleurinpData[source]

This method applies all the modifications to the input and returns a new stored fleurinpData object.

Returns

stored FleurinpData with applied changes

classmethod fromList(task_list: list[tuple[str, dict[str, Any]]], *args: Any, **kwargs: Any) masci_tools.io.fleurxmlmodifier.FleurXMLModifier

Instantiate the FleurXMLModifier from a list of tasks to be added immediately

Parameters

task_list – list of tuples first index is the name of the method second is defining the arguments by keyword in a dict

Other arguments are passed on to the __init__ method

Returns

class with the task list instantiated

get_avail_actions() dict[str, Callable][source]

Returns the allowed functions from FleurinpModifier

replace_tag(*args: Any, **kwargs: Any) None[source]

Deprecation layer for replace_tag if there are slashes in the first positional argument or xpath is is in kwargs. We know that it is the old usage.

Appends a replace_tag() to the list of tasks that will be done on the xmltree.

Parameters
  • tag – str of the tag to replace

  • newelement – a new tag

  • complex_xpath – an optional xpath to use instead of the simple xpath for the evaluation

  • occurrences – int or list of int. Which occurence of the parent nodes to replace a tag. By default all nodes are used.

Kwargs:
param contains

str, this string has to be in the final path

param not_contains

str, this string has to NOT be in the final path

rotate_nmmpmat(*args: Any, **kwargs: Any) None

Appends a rotate_nmmpmat() to the list of tasks that will be done on the xmltree.

Rotate the density matrix with the given angles phi and theta

Parameters
  • species_name – string, name of the species you want to change

  • orbital – integer or string (‘all’), orbital quantum number of the LDA+U procedure to be modified

  • phi – float, angle (radian), by which to rotate the density matrix

  • theta – float, angle (radian), by which to rotate the density matrix

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

Raises
  • ValueError – If something in the input is wrong

  • KeyError – If no LDA+U procedure is found on a species

set_atomgroup(*args: Any, **kwargs: Any) None

Appends a set_atomgroup() to the list of tasks that will be done on the xmltree.

Method to set parameters of an atom group of the fleur inp.xml file.

Parameters
  • changes – a python dict specifying what you want to change.

  • position – position of an atom group to be changed. If equals to ‘all’, all species will be changed

  • species – atom groups, corresponding to the given species will be changed

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

changes is a python dictionary containing dictionaries that specify attributes to be set inside the certain specie. For example, if one wants to set a beta noco parameter it can be done via:

'changes': {'nocoParams': {'beta': val}}
set_atomgroup_label(*args: Any, **kwargs: Any) None

Appends a set_atomgroup_label() to the list of tasks that will be done on the xmltree.

This method calls set_atomgroup() method for a certain atom species that corresponds to an atom with a given label.

Parameters
  • atom_label – string, a label of the atom which specie will be changed. ‘all’ to change all the species

  • changes – a python dict specifying what you want to change.

changes is a python dictionary containing dictionaries that specify attributes to be set inside the certain specie. For example, if one wants to set a beta noco parameter it can be done via:

'changes': {'nocoParams': {'beta': val}}
set_attrib_value(*args: Any, **kwargs: Any) None

Appends a set_attrib_value() to the list of tasks that will be done on the xmltree.

Sets an attribute in a xmltree to a given value, specified by its name and further specifications. If there are no nodes under the specified xpath a tag can be created with create=True. The attribute values are converted automatically according to the types of the attribute with convert_to_xml() if they are not str already.

Parameters
  • name – the attribute name to set

  • value – value or list of values to set

  • complex_xpath – an optional xpath to use instead of the simple xpath for the evaluation

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

  • occurrences – int or list of int. Which occurrence of the node to set. By default all are set.

  • create – bool optional (default False), if True the tag is created if is missing

Kwargs:
param tag_name

str, name of the tag where the attribute should be parsed

param contains

str, this string has to be in the final path

param not_contains

str, this string has to NOT be in the final path

param exclude

list of str, here specific types of attributes can be excluded valid values are: settable, settable_contains, other

set_complex_tag(*args: Any, **kwargs: Any) None

Appends a set_complex_tag() to the list of tasks that will be done on the xmltree.

Function to correctly set tags/attributes for a given tag. Goes through the attributedict and decides based on the schema_dict, how the corresponding key has to be handled. The tag is specified via its name and evtl. further specification

Supports:

  • attributes

  • tags with text only

  • simple tags, i.e. only attributes (can be optional single/multiple)

  • complex tags, will recursively create/modify them

Parameters
  • tag_name – name of the tag to set

  • changes – Keys in the dictionary correspond to names of tags and the values are the modifications to do on this tag (attributename, subdict with changes to the subtag, …)

  • complex_xpath – an optional xpath to use instead of the simple xpath for the evaluation

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

  • create – bool optional (default False), if True and the path, where the complex tag is set does not exist it is created

Kwargs:
param contains

str, this string has to be in the final path

param not_contains

str, this string has to NOT be in the final path

set_file(filename: str, dst_filename: Optional[str] = None, node: Optional[Union[int, str, aiida.orm.nodes.data.data.Data]] = None) None[source]

Appends a set_file() to the list of tasks that will be done on the FleurinpData instance.

Parameters
  • filename – absolute path to the file or a filename of node is specified

  • dst_filename – str of the filename, which should be used instead of the real filename to store it

  • node – a FolderData node containing the file

set_first_attrib_value(*args: Any, **kwargs: Any) None

Appends a set_first_attrib_value() to the list of tasks that will be done on the xmltree.

Sets the first occurrence of an attribute in a xmltree to a given value, specified by its name and further specifications. If there are no nodes under the specified xpath a tag can be created with create=True. The attribute values are converted automatically according to the types of the attribute with convert_to_xml() if they are not str already.

Parameters
  • name – the attribute name to set

  • value – value or list of values to set

  • complex_xpath – an optional xpath to use instead of the simple xpath for the evaluation

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

  • create – bool optional (default False), if True the tag is created if is missing

Kwargs:
param tag_name

str, name of the tag where the attribute should be parsed

param contains

str, this string has to be in the final path

param not_contains

str, this string has to NOT be in the final path

param exclude

list of str, here specific types of attributes can be excluded valid values are: settable, settable_contains, other

set_first_text(*args: Any, **kwargs: Any) None

Appends a set_first_text() to the list of tasks that will be done on the xmltree.

Sets the text the first occurrence of a tag in a xmltree to a given value, specified by the name of the tag and further specifications. By default the text will be set on all nodes returned for the specified xpath. If there are no nodes under the specified xpath a tag can be created with create=True. The text values are converted automatically according to the types with convert_to_xml() if they are not str already.

Parameters
  • tag_name – str name of the tag, where the text should be set

  • text – value or list of values to set

  • complex_xpath – an optional xpath to use instead of the simple xpath for the evaluation

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

  • create – bool optional (default False), if True the tag is created if is missing

Kwargs:
param contains

str, this string has to be in the final path

param not_contains

str, this string has to NOT be in the final path

set_inpchanges(*args: Any, **kwargs: Any) None

Appends a set_inpchanges() to the list of tasks that will be done on the xmltree.

This method sets all the attribute and texts provided in the change_dict.

The first occurrence of the attribute/tag is set

Parameters
  • changes – dictionary {attrib_name : value} with all the wanted changes.

  • path_spec – dict, with ggf. necessary further specifications for the path of the attribute

An example of changes:

changes = {
    'itmax' : 1,
    'l_noco': True,
    'ctail': False,
    'l_ss': True
}
set_kpath(*args: Any, **kwargs: Any) None

Appends a set_kpath() to the list of tasks that will be done on the xmltree.

Sets a k-path directly into inp.xml as a alternative kpoint set with purpose ‘bands’

Warning

This method is only supported for input versions before the Max5 release

Parameters
  • kpath – a dictionary with kpoint name as key and k point coordinate as value

  • count – number of k-points

  • gamma – bool that controls if the gamma-point should be included in the k-point mesh

set_kpointlist(*args: Any, **kwargs: Any) None

Appends a set_kpointlist() to the list of tasks that will be done on the xmltree.

Explicitly create a kPointList from the given kpoints and weights. This routine will add the specified kPointList with the given name.

Warning

For input versions Max4 and older all keyword arguments are not valid (name, kpoint_type, special_labels, switch and overwrite)

Parameters
  • kpoints – list or array containing the relative coordinates of the kpoints

  • weights – list or array containing the weights of the kpoints

  • name – str for the name of the list, if not given a default name is generated

  • kpoint_type – str specifying the type of the kPointList (‘path’, ‘mesh’, ‘spex’, ‘tria’, …)

  • special_labels – dict mapping indices to labels. The labels will be inserted for the kpoints corresponding to the given index

  • switch – bool, if True the kPointlist will be used by Fleur when starting the next calculation

  • overwrite – bool, if True and a kPointlist with the given name already exists it will be overwritten

set_kpointmesh(*args: Any, **kwargs: Any) None

Appends a set_kpointmesh() to the list of tasks that will be done on the xmltree.

Create a kpoint mesh using spglib

for details see get_stabilized_reciprocal_mesh()

Parameters
  • mesh – list-like woth three elements, giving the size of the kpoint set in each direction

  • use_symmetry – bool if True the available symmetry operations in the inp.xml will be used to reduce the kpoint set otherwise only the identity matrix is used

  • name – Name of the created kpoint list. If not given a name is generated

  • switch – bool if True the kpoint list is direclty set as the used set

  • overwrite – if True and a kpoint list of the given name already exists it will be overwritten

  • shift – shift the center of the kpint set

  • time_reversal – bool if True time reversal symmetry will be used to reduce the kpoint set

  • map_to_first_bz – bool if True the kpoints are mapped into the [0,1] interval

set_kpointpath(*args: Any, **kwargs: Any) None

Appends a set_kpointpath() to the list of tasks that will be done on the xmltree.

Create a kpoint list for a bandstructure calculation (using ASE kpath generation)

The path can be defined explictly (see bandpath()) or derived from the unit cell

Parameters
  • path – str, list of str or None defines the path to interpolate (for syntax bandpath())

  • nkpts – int number of kpoints in the path

  • density – float number of kpoints per Angstroem

  • name – Name of the created kpoint list. If not given a name is generated

  • switch – bool if True the kpoint list is direclty set as the used set

  • overwrite – if True and a kpoint list of the given name already exists it will be overwritten

  • special_points – dict mapping names to coordinates for special points to use

set_kpointsdata(kpointsdata_uuid: int | str | aiida.orm.nodes.data.array.kpoints.KpointsData, name: Optional[str] = None, switch: bool = False, kpoint_type: str = 'path') None[source]

Appends a set_kpointsdata_f() to the list of tasks that will be done on the FleurinpData.

Parameters
  • kpointsdata_uuid – node identifier or KpointsData node to be written into inp.xml

  • name – str name to give the newly entered kpoint list (only MaX5 or later)

  • switch – bool if True the entered kpoint list will be used directly (only Max5 or later)

  • kpoint_type – str of the type of kpoint list given (mesh, path, etc.) only Max5 or later

set_nkpts(*args: Any, **kwargs: Any) None

Appends a set_nkpts() to the list of tasks that will be done on the xmltree.

Sets a k-point mesh directly into inp.xml

Warning

This method is only supported for input versions before the Max5 release

Parameters
  • count – number of k-points

  • gamma – bool that controls if the gamma-point should be included in the k-point mesh

set_nmmpmat(*args: Any, **kwargs: Any) None

Appends a set_nmmpmat() to the list of tasks that will be done on the xmltree.

Routine sets the block in the n_mmp_mat file specified by species_name, orbital and spin to the desired density matrix

Parameters
  • species_name – string, name of the species you want to change

  • orbital – integer, orbital quantum number of the LDA+U procedure to be modified

  • spin – integer, specifies which spin block should be modified

  • state_occupations – list, sets the diagonal elements of the density matrix and everything else to zero

  • denmat – matrix, specify the density matrix explicitly

  • phi – float, optional angle (radian), by which to rotate the density matrix before writing it

  • theta – float, optional angle (radian), by which to rotate the density matrix before writing it

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

Raises
  • ValueError – If something in the input is wrong

  • KeyError – If no LDA+U procedure is found on a species

set_simple_tag(*args: Any, **kwargs: Any) None

Appends a set_simple_tag() to the list of tasks that will be done on the xmltree.

Sets one or multiple simple tag(s) in an xmltree. A simple tag can only hold attributes and has no subtags. The tag is specified by its name and further specification If the tag can occur multiple times all existing tags are DELETED and new ones are written. If the tag only occurs once it will automatically be created if its missing.

Parameters
  • tag_name – str name of the tag to modify/set

  • changes – list of dicts or dict with the changes. Elements in list describe multiple tags. Keys in the dictionary correspond to {‘attributename’: attributevalue}

  • complex_xpath – an optional xpath to use instead of the simple xpath for the evaluation

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

  • create_parents – bool optional (default False), if True and the path, where the simple tags are set does not exist it is created

Kwargs:
param contains

str, this string has to be in the final path

param not_contains

str, this string has to NOT be in the final path

set_species(*args: Any, **kwargs: Any) None

Appends a set_species() to the list of tasks that will be done on the xmltree.

Method to set parameters of a species tag of the fleur inp.xml file.

Parameters
  • species_name – string, name of the specie you want to change Can be name of the species, ‘all’ or ‘all-<string>’ (sets species with the string in the species name)

  • changes – a python dict specifying what you want to change.

  • create – bool, if species does not exist create it and all subtags?

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

Raises

ValueError – if species name is non existent in inp.xml and should not be created. also if other given tags are garbage. (errors from eval_xpath() methods)

Return xmltree

xml etree of the new inp.xml

changes is a python dictionary containing dictionaries that specify attributes to be set inside the certain specie. For example, if one wants to set a MT radius it can be done via:

changes = {'mtSphere' : {'radius' : 2.2}}

Another example:

'changes': {'special': {'socscale': 0.0}}

that switches SOC terms on a sertain specie. mtSphere, atomicCutoffs, energyParameters, lo, electronConfig, nocoParams, ldaU and special keys are supported. To find possible keys of the inner dictionary please refer to the FLEUR documentation flapw.de

set_species_label(*args: Any, **kwargs: Any) None

Appends a set_species_label() to the list of tasks that will be done on the xmltree.

This method calls set_species() method for a certain atom species that corresponds to an atom with a given label

Parameters
  • atom_label – string, a label of the atom which specie will be changed. ‘all’ to change all the species

  • changes – a python dict specifying what you want to change.

  • create – bool, if species does not exist create it and all subtags?

set_text(*args: Any, **kwargs: Any) None

Appends a set_text() to the list of tasks that will be done on the xmltree.

Sets the text on tags in a xmltree to a given value, specified by the name of the tag and further specifications. By default the text will be set on all nodes returned for the specified xpath. If there are no nodes under the specified xpath a tag can be created with create=True. The text values are converted automatically according to the types with convert_to_xml() if they are not str already.

Parameters
  • tag_name – str name of the tag, where the text should be set

  • text – value or list of values to set

  • complex_xpath – an optional xpath to use instead of the simple xpath for the evaluation

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

  • occurrences – int or list of int. Which occurrence of the node to set. By default all are set.

  • create – bool optional (default False), if True the tag is created if is missing

Kwargs:
param contains

str, this string has to be in the final path

param not_contains

str, this string has to NOT be in the final path

set_xcfunctional(*args: Any, **kwargs: Any) None

Appends a set_xcfunctional() to the list of tasks that will be done on the xmltree.

Set the Exchange Correlation potential tag

Setting a inbuilt XC functional .. code-block:: python

set_xcfunctional(xmltree, schema_dict, ‘vwn’)

Setting a LibXC XC functional .. code-block:: python

set_xcfunctional(xmltree, schema_dict, {‘exchange’: ‘lda_x’, ‘correlation’:”lda_c_xalpha”}, libxc=True)

Parameters
  • xc_functional – str or dict. If str it is the name of a inbuilt XC functional. If it is a dict it specifies either the name or id for LibXC functionals for the keys ‘exchange’, ‘correlation’, ‘etot_exchange’ and ‘etot_correlation’

  • xc_functional_options – dict with further general changes to the xcFunctional tag

  • libxc – bool if True the functional is a LibXC functional

shift_value(*args: Any, **kwargs: Any) None

Appends a shift_value() to the list of tasks that will be done on the xmltree.

Shifts numerical values of attributes directly in the inp.xml file.

The first occurrence of the attribute is shifted

Parameters
  • changes – a python dictionary with the keys to shift and the shift values.

  • mode – str (either rel/relative or abs/absolute). rel/relative multiplies the old value with the given value abs/absolute adds the old value and the given value

  • path_spec – dict, with ggf. necessary further specifications for the path of the attribute

An example of changes:

changes = {'itmax' : 1, 'dVac': -0.123}
shift_value_species_label(*args: Any, **kwargs: Any) None

Appends a shift_value_species_label() to the list of tasks that will be done on the xmltree.

Shifts the value of an attribute on a species by label if atom_label contains ‘all’ then applies to all species

Parameters
  • atom_label – string, a label of the atom which specie will be changed. ‘all’ if set up all species

  • attribute_name – name of the attribute to change

  • number_to_add – value to add or to multiply by

  • mode – str (either rel/relative or abs/absolute). rel/relative multiplies the old value with number_to_add abs/absolute adds the old value and number_to_add

Kwargs if the attribute_name does not correspond to a unique path:
param contains

str, this string has to be in the final path

param not_contains

str, this string has to NOT be in the final path

show(display: bool = True, validate: bool = False) lxml.etree._ElementTree[source]

Applies the modifications and displays/prints the resulting inp.xml file. Does not generate a new FleurinpData object.

Parameters
  • display – a boolean that is True if resulting inp.xml has to be printed out

  • validate – a boolean that is True if changes have to be validated

Returns

a lxml tree representing inp.xml with applied changes

switch_kpointset(*args: Any, **kwargs: Any) None

Appends a switch_kpointset() to the list of tasks that will be done on the xmltree.

Switch the used k-point set

Warning

This method is only supported for input versions after the Max5 release

Parameters

list_name – name of the kPoint set to use

switch_species(*args: Any, **kwargs: Any) None

Appends a switch_species() to the list of tasks that will be done on the xmltree.

Method to switch the species of an atom group of the fleur inp.xml file.

Parameters
  • new_species_name – name of the species to switch to

  • position – position of an atom group to be changed. If equals to ‘all’, all species will be changed

  • species – atom groups, corresponding to the given species will be changed

  • clone – if True and the new species name does not exist and it corresponds to changing from one species the species will be cloned with clone_species()

  • changes – changes to do if the species is cloned

  • filters – Dict specifying constraints to apply on the xpath. See XPathBuilder for details

switch_species_label(*args: Any, **kwargs: Any) None

Appends a switch_species_label() to the list of tasks that will be done on the xmltree.

Method to switch the species of an atom group of the fleur inp.xml file based on a label of a contained atom

Parameters
  • atom_label – string, a label of the atom which group will be changed. ‘all’ to change all the groups

  • new_species_name – name of the species to switch to

  • clone – if True and the new species name does not exist and it corresponds to changing from one species the species will be cloned with clone_species()

  • changes – changes to do if the species is cloned

property task_list: list[tuple[str, dict[str, Any]]]

Return the current changes in a format accepted by add_task_list() and fromList()

undo(revert_all: bool = False) list[masci_tools.io.fleurxmlmodifier.ModifierTask]

Cancels the last change or all of them

Parameters

revert_all – set True if need to cancel all the changes, False if the last one.

validate() lxml.etree._ElementTree[source]

Extracts the schema-file. Makes a test if all the changes lead to an inp.xml file that is validated against the schema.

Returns

a lxml tree representing inp.xml with applied changes

xml_create_tag(*args: Any, **kwargs: Any) None[source]

Appends a xml_create_tag() to the list of tasks that will be done on the xmltree.

Parameters
  • xpath – a path where to place a new tag

  • element – a tag name or etree Element to be created

  • place_index – defines the place where to put a created tag

  • tag_order – defines a tag order

  • occurrences – int or list of int. Which occurence of the parent nodes to create a tag. By default all nodes are used.

xml_delete_att(*args: Any, **kwargs: Any) None

Appends a xml_delete_att() to the list of tasks that will be done on the xmltree.

Deletes an attribute in the XML tree

Parameters
  • xpath – a path to the attribute to be deleted

  • name – the name of an attribute to delete

  • occurrences – int or list of int. Which occurrence of the parent nodes to create a tag. By default all nodes are used.

xml_delete_tag(*args: Any, **kwargs: Any) None

Appends a xml_delete_tag() to the list of tasks that will be done on the xmltree.

Deletes a tag in the XML tree.

Parameters
  • xpath – a path to the tag to be deleted

  • occurrences – int or list of int. Which occurrence of the parent nodes to create a tag. By default all nodes are used.

xml_replace_tag(*args: Any, **kwargs: Any) None[source]

Appends a xml_replace_tag() to the list of tasks that will be done on the xmltree.

Parameters
  • xpath – a path to the tag to be replaced

  • element – a new tag

  • occurrences – int or list of int. Which occurence of the parent nodes to create a tag. By default all nodes are used.

xml_set_attrib_value_no_create(*args: Any, **kwargs: Any) None

Appends a xml_set_attrib_value_no_create() to the list of tasks that will be done on the xmltree.

Sets an attribute in a xmltree to a given value. By default the attribute will be set on all nodes returned for the specified xpath.

Parameters
  • xpath – a path where to set the attributes

  • name – the attribute name to set

  • value – value or list of values to set (if not str they will be converted with str(value))

  • occurrences – int or list of int. Which occurrence of the node to set. By default all are set.

Raises

ValueError – If the lengths of attribv or occurrences do not match number of nodes

xml_set_text_no_create(*args: Any, **kwargs: Any) None

Appends a xml_set_text_no_create() to the list of tasks that will be done on the xmltree.

Sets the text of a tag in a xmltree to a given value. By default the text will be set on all nodes returned for the specified xpath.

Parameters
  • xpath – a path where to set the text

  • text – value or list of values to set (if not str they will be converted with str(value))

  • occurrences – int or list of int. Which occurrence of the node to set. By default all are set.

Raises

ValueError – If the lengths of text or occurrences do not match number of nodes

aiida_fleur.data.fleurinpmodifier.inpxml_changes(wf_parameters: dict | aiida.orm.nodes.data.dict.Dict | aiida.engine.processes.builder.ProcessBuilderNamespace, append: bool = True, builder_entry: str = 'wf_parameters', builder_replace_stored: bool = True) Generator[aiida_fleur.data.fleurinpmodifier.FleurinpModifier, None, None][source]

Contextmanager to construct an inpxml_changes entry in the given dictionary

Usage:

with inpxml_changes(parameters) as fm: #parameters is a dict, which can also already contain an inpxml_changes entry
    fm.set_inpchanges({'l_noco': True, 'ctail': False})
    fm.set_species('all-Nd', {'electronConfig': {'flipspins': True}})

print(parameters) #The parameters now also contains the tasks defined in the with block

Example for usage with a Builder:

from aiida import plugins

FleurBandDOS = plugins.WorkflowFactory('fleur.banddos')
inputs = FleurBandDOS.get_builder()

with inpxml_changes(inputs) as fm:
    fm.set_inpchanges({'l_noco': True, 'ctail': False})
    fm.set_species('all-Nd', {'electronConfig': {'flipspins': True}})

#The wf_parameters in the root level namespace are now set
print(inputs.wf_parameters['inpxml_changes'])

with inpxml_changes(inputs.scf) as fm:
    fm.switch_kpointset('my-awesome-kpoints')

#The wf_parameters in the scf namespace are now set
print(inputs.scf.wf_parameters['inpxml_changes'])
Parameters
  • wf_parameters – dict or aiida Dict (no stored) into which to enter the changes

  • append – bool if True the tasks are appended behind any evtl. already defined. For False the tasks are added in front

  • builder_entry – name of the entry for the inp.xml changes inside the parameters dictionary

  • builder_replace_stored – if True and a ProcessBuilder is given and the wf_parameters input is given and already stored the produced changes will replace the node

aiida_fleur.data.fleurinpmodifier.modify_fleurinpdata(original: aiida_fleur.data.fleurinp.FleurinpData, modifications: aiida.orm.nodes.data.dict.Dict, **kwargs: aiida.orm.nodes.node.Node) aiida_fleur.data.fleurinp.FleurinpData[source]

A CalcFunction that performs the modification of the given FleurinpData and stores the result in a database.

Parameters
  • original – a FleurinpData to be modified

  • modifications – a python dictionary of modifications in the form of {‘task’: …}

  • kwargs – dict of other aiida nodes to be linked to the modifications

Returns new_fleurinp

a modified FleurinpData that is stored in a database

Workflows/Workchains

Base: Fleur-Base WorkChain

This module contains the FleurBaseWorkChain. FleurBaseWorkChain is a workchain that wraps the submission of the FLEUR calculation. Inheritance from the BaseRestartWorkChain allows to add scenarios to restart a calculation in an automatic way if an expected failure occurred.

class aiida_fleur.workflows.base_fleur.FleurBaseWorkChain(*args: Any, **kwargs: Any)[source]

Workchain to run a FLEUR calculation with automated error handling and restarts

check_kpts()[source]

This routine checks if the total number of requested cpus is a factor of kpts and makes an optimisation.

If suggested number of num_mpiprocs_per_machine is 60% smaller than requested, it throws an exit code and calculation stop withour submission.

classmethod define(spec)[source]

Define the process specification.

validate_inputs()[source]

Validate inputs that might depend on each other and cannot be validated by the spec. Also define dictionary inputs in the context, that will contain the inputs for the calculation that will be launched in the run_calculation step.

SCF: Fleur-Scf WorkChain

In this module you find the workchain ‘FleurScfWorkChain’ for the self-consistency cycle management of a FLEUR calculation with AiiDA.

class aiida_fleur.workflows.scf.FleurScfWorkChain(*args: Any, **kwargs: Any)[source]

Workchain for converging a FLEUR calculation (SCF).

It converges the charge density, total energy or the largest force. Two paths are possible:

  1. Start from a structure and run the inpgen first optional with calc_parameters

  2. Start from a Fleur calculation, with optional remoteData

Parameters
  • wf_parameters – (Dict), Workchain Specifications

  • structure – (StructureData), Crystal structure

  • calc_parameters – (Dict), Inpgen Parameters

  • fleurinp – (FleurinpData), to start with a Fleur calculation

  • remote_data – (RemoteData), from a Fleur calculation

  • inpgen – (Code)

  • fleur – (Code)

Returns

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

change_fleurinp()[source]

This routine sets somethings in the fleurinp file before running a fleur calculation.

condition()[source]

check convergence condition

control_end_wc(errormsg)[source]

Controlled way to shutdown the workchain. will initialize the output nodes The shutdown of the workchain will has to be done afterwards

classmethod define(spec)[source]

Define the specification of the process, including its inputs, outputs and known exit codes.

A metadata input namespace is defined, with optional ports that are not stored in the database.

fleurinpgen_needed()[source]

Returns True if inpgen calculation has to be submitted before fleur calculations

get_res()[source]

Check how the last Fleur calculation went Parse some results.

inspect_fleur()[source]

Analyse the results of the previous Calculation (Fleur or inpgen), checking whether it finished successfully or if not, troubleshoot the cause and adapt the input parameters accordingly before restarting, or abort if unrecoverable error was found

reset_straight_mixing()[source]

Turn off the straight mixing features again

return_results()[source]

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

run_fleur()[source]

run a FLEUR calculation

run_fleurinpgen()[source]

run the inpgen

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 inpgen if false run fleur directly

aiida_fleur.workflows.scf.create_scf_result_node(**kwargs)[source]

This is a pseudo wf, to create the right graph structure of AiiDA. This wokfunction 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.

BandDos: Bandstructure WorkChain

This is the worklfow ‘band’ for the Fleur code, which calculates a electron bandstructure.

class aiida_fleur.workflows.banddos.FleurBandDosWorkChain(*args: Any, **kwargs: Any)[source]

This workflow calculated a bandstructure from a Fleur calculation

Params

a Fleurcalculation node

Returns

Success, last result node, list with convergence behavior

banddos_after_scf()[source]

This method submits the BandDOS calculation after the initial SCF calculation

banddos_wo_scf()[source]

This method submits the BandDOS calculation without a previous SCF calculation

change_fleurinp()[source]

create a new fleurinp from the old with certain parameters

control_end_wc(errormsg)[source]

Controlled way to shutdown the workchain. will initialize the output nodes The shutdown of the workchain will has to be done afterwards

converge_scf()[source]

Converge charge density.

classmethod define(spec)[source]

Define the specification of the process, including its inputs, outputs and known exit codes.

A metadata input namespace is defined, with optional ports that are not stored in the database.

get_inputs_scf()[source]

Initialize inputs for scf workflow: wf_param, options, calculation parameters, codes, structure

return_results()[source]

return the results of the calculations

scf_needed()[source]

Returns True if SCF WC is needed.

start()[source]

check parameters, what condictions? complete? check input nodes

aiida_fleur.workflows.banddos.create_aiida_bands_data(fleurinp, retrieved)[source]

Creates aiida.orm.BandsData object containing the kpoints and eigenvalues from the banddos.hdf file of the calculation

Parameters
Returns

aiida.orm.BandsData for the bandstructure calculation

Raises

ExitCode 300, banddos.hdf file is missing

Raises

ExitCode 310, banddos.hdf reading failed

Raises

ExitCode 320, reading kpointsdata from Fleurinp failed

aiida_fleur.workflows.banddos.create_aiida_dos_data(retrieved)[source]

Creates aiida.orm.XyData object containing the standard DOS components from the banddos.hdf file of the calculation

Parameters

retrievedaiida.orm.FolderData for the DOS calculation

Returns

aiida.orm.XyData containing all standard DOS components

Raises

ExitCode 300, banddos.hdf file is missing

Raises

ExitCode 310, banddos.hdf reading failed

aiida_fleur.workflows.banddos.create_band_result_node(**kwargs)[source]

This is a pseudo wf, to create the right graph structure of AiiDA. This wokfunction 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.

DOS: Density of states WorkChain

This is the worklfow ‘dos’ for the Fleur code, which calculates a density of states (DOS).

class aiida_fleur.workflows.dos.fleur_dos_wc(*args: Any, **kwargs: Any)[source]

DEPRECATED: Use FleurBandDosWorkChain instead (entrypoint fleur.banddos) This workflow calculated a DOS from a Fleur calculation

Params

a Fleurcalculation node

Returns

Success, last result node, list with convergence behavior

wf_parameters: { ‘tria’, ‘nkpts’, ‘sigma’, ‘emin’, ‘emax’} defaults : tria = True, nkpts = 800, sigma=0.005, emin= -0.3, emax = 0.8

create_new_fleurinp()[source]

create a new fleurinp from the old with certain parameters

classmethod define(spec)[source]

Define the specification of the process, including its inputs, outputs and known exit codes.

A metadata input namespace is defined, with optional ports that are not stored in the database.

return_results()[source]

return the results of the calculations

run_fleur()[source]

run a FLEUR calculation

start()[source]

check parameters, what condictions? complete? check input nodes

EOS: Calculate a lattice constant

In this module you find the workflow ‘FleurEosWorkChain’ for the calculation of of an equation of state

class aiida_fleur.workflows.eos.FleurEosWorkChain(*args: Any, **kwargs: Any)[source]

This workflow calculates the equation of states of a structure. Calculates several unit cells with different volumes. A Birch_Murnaghan equation of states fit determines the Bulk modulus and the groundstate volume of the cell.

Params wf_parameters

Dict node, optional ‘wf_parameters’, protocol specifying parameter dict

Params structure

StructureData node, ‘structure’ crystal structure

Params calc_parameters

Dict node, optional ‘calc_parameters’ parameters for inpgen

Params inpgen

Code node,

Params fleur

Code node,

Return output_eos_wc_para

Dict node, contains relevant output information. about general succeed, fit results and so on.

control_end_wc(errormsg)[source]

Controlled way to shutdown the workchain. It will initialize the output nodes The shutdown of the workchain will has to be done afterwards

converge_scf()[source]

Launch fleur_scfs from the generated structures

classmethod define(spec)[source]

Define the specification of the process, including its inputs, outputs and known exit codes.

A metadata input namespace is defined, with optional ports that are not stored in the database.

get_inputs_scf()[source]

get and ‘produce’ the inputs for a scf-cycle

get_inputs_scf_first()[source]

get and ‘produce’ the inputs for a scf-cycle

inspect_first()[source]

Check if the first calculation failed and

return_results()[source]

return the results of the calculations (scf workchains) and do a Birch-Murnaghan fit for the equation of states

run_first()[source]

Launch the first fleur SCF workchain

start()[source]

check parameters, what condictions? complete? check input nodes

structures()[source]

Creates structure data nodes with different Volume (lattice constants)

aiida_fleur.workflows.eos.birch_murnaghan(volumes, volume0, bulk_modulus0, bulk_deriv0)[source]

This evaluates the Birch Murnaghan equation of states

aiida_fleur.workflows.eos.birch_murnaghan_fit(energies, volumes)[source]

least squares fit of a Birch-Murnaghan equation of state curve. From delta project containing in its columns the volumes in A^3/atom and energies in eV/atom # The following code is based on the source code of eos.py from the Atomic # Simulation Environment (ASE) <https://wiki.fysik.dtu.dk/ase/>. :params energies: list (numpy arrays!) of total energies eV/atom :params volumes: list (numpy arrays!) of volumes in A^3/atom

#volume, bulk_modulus, bulk_deriv, residuals = Birch_Murnaghan_fit(data)

aiida_fleur.workflows.eos.create_eos_result_node(**kwargs)[source]

This is a pseudo cf, to create the right graph structure of AiiDA. This calcfunction will create the output nodes in the database. It also connects the output_nodes to all nodes the information comes from. This includes the output_parameter node for the eos, connections to run scfs, and returning of the gs_structure (best scale) So far it is just parsed in as kwargs argument, because we are to lazy to put most of the code overworked from return_results in here.

aiida_fleur.workflows.eos.eos_structures(inp_structure, scalelist)[source]

Calcfunction, which creates many rescaled StructureData nodes out of a given crystal structure. Keeps the provenance in the database

:param StructureData, a StructureData node :param scalelist, AiiDA List, list of floats, scaling factors for the cell

Returns

dict of New StructureData nodes with rescalled structure, which are linked to input Structure

aiida_fleur.workflows.eos.eos_structures_nocf(inp_structure, scalelist)[source]

Creates many rescalled StructureData nodes out of a crystal structure. Does NOT keep the provenance in the database.

:param StructureData, a StructureData node (pk, sor uuid) :param scalelist, list of floats, scaling factors for the cell

Returns

dict of New StructureData nodes with rescalled structure, key=scale

Relax: Relaxation of a Cystalstructure WorkChain

In this module you find the workflow ‘FleurRelaxWorkChain’ for geometry optimization.

class aiida_fleur.workflows.relax.FleurRelaxWorkChain(*args: Any, **kwargs: Any)[source]

This workflow performs structure optimization.

static analyse_relax(relax_dict)[source]

This function generates a new fleurinp analysing parsed relax.xml from the previous calculation.

NOT IMPLEMENTED YET

Parameters

relax_dict – parsed relax.xml from the previous calculation

Return new_fleurinp

new FleurinpData object that will be used for next relax iteration

check_failure()[source]

Throws an exit code if scf failed

condition()[source]

Checks if relaxation criteria is achieved.

Returns

True if structure is optimized and False otherwise

control_end_wc(errormsg)[source]

Controlled way to shutdown the workchain. It will initialize the output nodes The shutdown of the workchain will has to be done afterwards.

converge_scf()[source]

Submits aiida_fleur.workflows.scf.FleurScfWorkChain.

classmethod define(spec)[source]

Define the specification of the process, including its inputs, outputs and known exit codes.

A metadata input namespace is defined, with optional ports that are not stored in the database.

generate_new_fleurinp()[source]

This function fetches relax.xml from the previous iteration and calls analyse_relax(). New FleurinpData is stored in the context.

get_inputs_final_scf()[source]

Initializes inputs for final scf on relaxed structure.

get_inputs_first_scf()[source]

Initialize inputs for the first iteration.

get_inputs_scf()[source]

Initializes inputs for further iterations.

get_results_final_scf()[source]

Parser some results of final scf

get_results_relax()[source]

Generates results of the workchain. Creates a new structure data node which is an optimized structure.

return_results()[source]

This function stores results of the workchain into the output nodes.

run_final_scf()[source]

Run a final scf for charge convergence on the optimized structure

should_relax()[source]

Should we run a relaxation or only a final scf This allows to call the workchain to run an scf only and makes logic of other higher workflows a lot easier

should_run_final_scf()[source]

Check if a final scf should be run on the optimized structure

start()[source]

Retrieve and initialize paramters of the WorkChain, validate inputs

aiida_fleur.workflows.relax.create_relax_result_node(**kwargs)[source]

This calcfunction assures the right provenance (additional links) for ALL result nodes it takes any nodes as input and return a special set of nodes. All other inputs will be connected in the DB to these ourput nodes

initial_cls: Caluclation of inital corelevel shifts

This is the worklfow FleurInitialCLSWorkChain ‘initial_cls’ using the Fleur code calculating corelevel shifts with different methods.

class aiida_fleur.workflows.initial_cls.FleurInitialCLSWorkChain(*args: Any, **kwargs: Any)[source]

Turn key solution for the calculation of core level shift

check_input()[source]

Init same context and check what input is given if it makes sence

collect_results()[source]

Collect results from certain calculation, check if everything is fine, calculate the wanted quantities. currently all energies are in hartree (as provided by Fleur)

control_end_wc(errormsg)[source]

Controled way to shutdown the workchain. will initalize the output nodes The shutdown of the workchain will has to be done afterwards

classmethod define(spec)[source]

Define the specification of the process, including its inputs, outputs and known exit codes.

A metadata input namespace is defined, with optional ports that are not stored in the database.

find_parameters()[source]

If the same parameters shall be used in the calculations you have to find some that match. For low error on CLS. therefore use the ones enforced or extract from the previous Fleur calculation.

get_references()[source]

To calculate a CLS in initial state approx, we need reference calculations to the Elemental crystals. First it is checked if the user has provided them Second the database is checked, if there are structures with certain extras. Third the COD database is searched for the elemental Cystal structures. If some referneces are not found stop here. Are there already calculation of these ‘references’, ggf use them. We do not put these calculation in the calculation queue yet because we need specific parameters for them

handle_scf_failure()[source]

In here we handle all failures from the scf workchain

relax()[source]

Do structural relaxation for certain structures.

relaxation_needed()[source]

If the structures should be relaxed, check if their Forces are below a certain threshold, otherwise throw them in the relaxation wf.

return_results()[source]

return the results of the calculations

run_fleur_scfs()[source]

Run SCF-cycles for all structures, calculations given in certain workflow arrays.

run_scfs_ref()[source]

Run SCF-cycles for ref structures, calculations given in certain workflow arrays. parameter nodes should be given

aiida_fleur.workflows.initial_cls.clshifts_to_be(coreleveldict, reference_dict)[source]

This methods converts corelevel shifts to binding energies, if a reference is given. These can than be used for plotting.

Example:

reference = {'W' : {'4f7/2' : [124],
                   '4f5/2' : [102]},
             'Be' : {'1s': [117]}}
corelevels = {'W' : {'4f7/2' : [0.4, 0.3, 0.4 ,0.1],
                     '4f5/2' : [0, 0.3, 0.4, 0.1]},
              'Be' : {'1s': [0, 0.2, 0.4, 0.1, 0.3]}}
aiida_fleur.workflows.initial_cls.create_initcls_result_node(**kwargs)[source]

This is a pseudo wf, to create the rigth graph structure of AiiDA. This wokfunction 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.

aiida_fleur.workflows.initial_cls.extract_results(calcs)[source]

Collect results from certain calculation, check if everything is fine, calculate the wanted quantities.

params: calcs : list of scf workchains nodes

aiida_fleur.workflows.initial_cls.fleur_calc_get_structure(calc_node)[source]

Get the AiiDA data structure from a fleur calculations

aiida_fleur.workflows.initial_cls.get_para_from_group(element, group)[source]

get structure node for a given element from a given group of structures (quit creedy, done straighforward)

aiida_fleur.workflows.initial_cls.get_ref_from_group(element, group)[source]

Return a structure data node from a given group for a given element. (quit creedy, done straighforward)

params: group: group name or pk params: element: string with the element i.e ‘Si’

returns: AiiDA StructureData node

aiida_fleur.workflows.initial_cls.querry_for_ref_structure(element_string)[source]

This methods finds StructureData nodes with the following extras: extra.type = ‘bulk’, # Should be done by looking at pbc, but I could not get querry to work. extra.specific = ‘reference’, ‘extra.elemental’ = True, extra.structure = element_string

param: element_string: string of an element return: the latest StructureData node that was found

corehole: Performance of coreholes calculations

This is the workflow ‘corehole’ using the Fleur code, which calculates binding energies and corelevel shifts with different methods. ‘divide and conquer’

class aiida_fleur.workflows.corehole.FleurCoreholeWorkChain(*args: Any, **kwargs: Any)[source]

Turn key solution for a corehole calculation with the FLEUR code. Has different protocols for different core-hole types (valence, charge).

Calculates supercells. Extracts binding energies for certain corelevels from the total energy differences a the calculation with corehole and without.

Documentation: See help for details.

Two paths are possible:

  1. Start from a structure -> workchains run inpgen first (recommended)

  2. Start from a Fleurinp data object

Also it is recommended to provide a calc parameter node for the structure

Parameters
  • wf_parameters – Dict node, specify, resources and what should be calculated

  • structure – structureData node, crystal structure

  • calc_parameters – Dict node, inpgen parameters for the crystal structure

  • fleurinp – fleurinpData node,

  • inpgen – Code node,

  • fleur – Code node,

Returns

output_corehole_wc_para Dict node, successful=True if no error

Uses workchains

fleur_scf_wc, fleur_relax_wc

Uses calcfunctions

supercell, create_corehole_result_node, prepare_struc_corehole_wf

check_input()[source]

init all context parameters, variables. Do some input checks. Further input checks are done in further workflow steps

check_scf()[source]

Check if ref scf was successful, or something needs to be dealt with. If unsuccesful abort, because makes no sense to continue.

collect_results()[source]

Collect results from certain calculation, check if everything is fine, calculate the wanted quantities. currently all energies are in hartree (as provided by Fleur)

control_end_wc(errormsg)[source]

Controled way to shutdown the workchain. report errors and always initalize/produce output nodes. But log successful=False

create_coreholes()[source]

Check the input for the corelevel specification, create structure and parameter nodes with all the need coreholes. create the wf_parameter nodes for the scfs. Add all calculations to scfs_to_run.

Layout: # Check what coreholes should be created. # said in the input, look in the original cell # These positions are the same for the supercell. # break the symmetry for the supercells. (make the corehole atoms its own atom type) # create a new species and a corehole for this atom group. # move all the atoms in the cell that impurity is in the origin (0.0, 0.0, 0.0) # use the fleurinp_change feature of scf to create the corehole after inpgen gen in the scf # start the scf with the last charge density of the ref calc? so far no, might not make sense

# TODO if this becomes to long split

create_supercell()[source]

create the needed supercell

classmethod define(spec)[source]

Define the specification of the process, including its inputs, outputs and known exit codes.

A metadata input namespace is defined, with optional ports that are not stored in the database.

relax()[source]

Do structural relaxation for certain structures.

relaxation_needed()[source]

If the structures should be relaxed, check if their Forces are below a certain threshold, otherwise throw them in the relaxation wf.

return_results()[source]

return the results of the calculations

run_ref_scf()[source]

Run a scf for the reference super cell

run_scfs()[source]

Run a scf for the all corehole calculations in parallel super cell

supercell_needed()[source]

check if a supercell is needed and what size it should be

aiida_fleur.workflows.corehole.create_corehole_result_node(**kwargs)[source]

This is a pseudo wf, to create the rigth graph structure of AiiDA. This wokfunction 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.

aiida_fleur.workflows.corehole.extract_results_corehole(calcs)[source]

Collect results from certain calculation, check if everything is fine, calculate the wanted quantities.

params: calcs : list of scf workchains nodes

aiida_fleur.workflows.corehole.prepare_struc_corehole_wf(base_supercell, wf_para, para=None)[source]

calcfunction which does all/some the structure+calcparameter manipulations together (therefore less nodes are produced and proverance is kept) wf_para: Dict node dict: {‘site’ : sites[8], ‘kindname’ : ‘W1’, ‘econfig’: “[Kr] 5s2 4d10 4f13 | 5p6 5d5 6s2”, ‘fleurinp_change’ : []}

MAE: Force-theorem calculation of magnetic anisotropy energies

In this module you find the workflow ‘FleurMaeWorkChain’ for the calculation of Magnetic Anisotropy Energy via the force theorem.

class aiida_fleur.workflows.mae.FleurMaeWorkChain(*args: Any, **kwargs: Any)[source]

This workflow calculates the Magnetic Anisotropy Energy of a structure.

change_fleurinp()[source]

This routine sets somethings in the fleurinp file before running a fleur calculation.

control_end_wc(errormsg)[source]

Controlled way to shutdown the workchain. will initialize the output nodes The shutdown of the workchain will has to be done afterwards

converge_scf()[source]

Converge charge density with or without SOC. Submit a single Fleur calculation to obtain a reference for further force theorem calculations.

classmethod define(spec)[source]

Define the specification of the process, including its inputs, outputs and known exit codes.

A metadata input namespace is defined, with optional ports that are not stored in the database.

force_after_scf()[source]

Calculate energy of a system for given SQAs using the force theorem. Converged reference is stored in self.ctx[‘xyz’].

force_wo_scf()[source]

Submit FLEUR force theorem calculation using input remote

get_inputs_scf()[source]

Initialize inputs for scf workflow: wf_param, options, calculation parameters, codes, structure

get_results()[source]

Generates results of the workchain.

return_results()[source]

This function outputs results of the wc

scf_needed()[source]

Returns True if SCF WC is needed.

start()[source]

Retrieve and initialize paramters of the WorkChain

aiida_fleur.workflows.mae.save_mae_output_node(**kwargs)[source]

This is a pseudo cf, to create the right graph structure of AiiDA. This calcfunction will create the output node in the database. It also connects the output_node to all nodes the information comes 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.

MAE Conv: Self-consistent calculation of magnetic anisotropy energies

In this module you find the workflow ‘FleurMAEWorkChain’ for the calculation of Magnetic Anisotropy Energy converging all the directions.

class aiida_fleur.workflows.mae_conv.FleurMaeConvWorkChain(*args: Any, **kwargs: Any)[source]

This workflow calculates the Magnetic Anisotropy Energy of a structure.

control_end_wc(errormsg)[source]

Controlled way to shutdown the workchain. will initialize the output nodes The shutdown of the workchain will has to be done afterwards

converge_scf()[source]

Converge charge density with or without SOC. Depending on a branch of MAE calculation, submit a single Fleur calculation to obtain a reference for further force theorem calculations or submit a set of Fleur calculations to converge charge density for all given SQAs.

classmethod define(spec)[source]

Define the specification of the process, including its inputs, outputs and known exit codes.

A metadata input namespace is defined, with optional ports that are not stored in the database.

get_inputs_scf(sqa)[source]

Initialize inputs for scf workflow

get_results()[source]

Retrieve results of converge calculations

return_results()[source]

Retrieve results of converge calculations

start()[source]

Retrieve and initialize paramters of the WorkChain

aiida_fleur.workflows.mae_conv.save_output_node(out)[source]

This calcfunction saves the out dict in the db

SSDisp: Force-theorem calculation of spin spiral dispersion

In this module you find the workflow ‘FleurSSDispWorkChain’ for the calculation of spin spiral dispersion using scalar-relatevistic Hamiltonian.

class aiida_fleur.workflows.ssdisp.FleurSSDispWorkChain(*args: Any, **kwargs: Any)[source]

This workflow calculates spin spiral dispersion of a structure.

change_fleurinp()[source]

This routine sets somethings in the fleurinp file before running a fleur calculation.

control_end_wc(errormsg)[source]

Controlled way to shutdown the workchain. It will initialize the output nodes The shutdown of the workchain will has to be done afterwards

converge_scf()[source]

Converge charge density for collinear case which is a reference for futher spin spiral calculations.

classmethod define(spec)[source]

Define the specification of the process, including its inputs, outputs and known exit codes.

A metadata input namespace is defined, with optional ports that are not stored in the database.

force_after_scf()[source]

This routine uses the force theorem to calculate energies dispersion of spin spirals. The force theorem calculations implemented into the FLEUR code. Hence a single iteration FLEUR input file having <forceTheorem> tag has to be created and submitted.

force_wo_scf()[source]

Submit FLEUR force theorem calculation using input remote

get_inputs_scf()[source]

Initialize inputs for the scf cycle

get_results()[source]

Generates results of the workchain.

return_results()[source]

This function outputs results of the wc

scf_needed()[source]

Returns True if SCF WC is needed.

start()[source]

Retrieve and initialize paramters of the WorkChain

aiida_fleur.workflows.ssdisp.save_output_node(out)[source]

This calcfunction saves the out dict in the db

SSDisp Conv: Self-consistent calculation of spin spiral dispersion

In this module you find the workflow ‘FleurSSDispConvWorkChain’ for the calculation of Spin Spiral energy Dispersion converging all the directions.

class aiida_fleur.workflows.ssdisp_conv.FleurSSDispConvWorkChain(*args: Any, **kwargs: Any)[source]

This workflow calculates the Spin Spiral Dispersion of a structure.

control_end_wc(errormsg)[source]

Controlled way to shutdown the workchain. will initialize the output nodes The shutdown of the workchain will has to be done afterwards

converge_scf()[source]

Converge charge density with or without SOC. Depending on a branch of Spiral calculation, submit a single Fleur calculation to obtain a reference for further force theorem calculations or submit a set of Fleur calculations to converge charge density for all given SQAs.

classmethod define(spec)[source]

Define the specification of the process, including its inputs, outputs and known exit codes.

A metadata input namespace is defined, with optional ports that are not stored in the database.

get_inputs_scf(qss)[source]

Initialize inputs for scf workflow: wf_param, options, calculation parameters, codes, structure

get_results()[source]

Retrieve results of converge calculations

return_results()[source]

Retrieve results of converge calculations

start()[source]

Retrieve and initialize paramters of the WorkChain

aiida_fleur.workflows.ssdisp_conv.save_output_node(out)[source]

This calcfunction saves the out dict in the db

DMI: Force-theorem calculation of Dzjaloshinskii-Moriya interaction energy dispersion

In this module you find the workflow ‘FleurDMIWorkChain’ for the calculation of DMI energy dispersion.

class aiida_fleur.workflows.dmi.FleurDMIWorkChain(*args: Any, **kwargs: Any)[source]

This workflow calculates DMI energy dispersion of a structure.

change_fleurinp()[source]

This routine sets somethings in the fleurinp file before running a fleur calculation.

control_end_wc(errormsg)[source]

Controlled way to shutdown the workchain. will initialize the output nodes The shutdown of the workchain will has to be done afterwards

converge_scf()[source]

Converge charge density for collinear case which is a reference for futher spin spiral calculations.

classmethod define(spec)[source]

Define the specification of the process, including its inputs, outputs and known exit codes.

A metadata input namespace is defined, with optional ports that are not stored in the database.

force_after_scf()[source]

This routine uses the force theorem to calculate energies dispersion of spin spirals. The force theorem calculations implemented into the FLEUR code. Hence a single iteration FLEUR input file having <forceTheorem> tag has to be created and submitted.

force_wo_scf()[source]

Submit FLEUR force theorem calculation using input remote

get_inputs_scf()[source]

Initialize inputs for the scf cycle

get_results()[source]

Generates results of the workchain.

return_results()[source]

This function outputs results of the wc

scf_needed()[source]

Returns True if SCF WC is needed.

start()[source]

Retrieve and initialize paramters of the WorkChain

aiida_fleur.workflows.dmi.save_output_node(out)[source]

This calcfunction saves the out dict in the db

OrbControl: Self-consistent calculation of groundstate density matrix with LDA+U

In this module you find the workflow ‘FleurOrbControlWorkChain’ for finding the groundstate in a DFT+U calculation.

class aiida_fleur.workflows.orbcontrol.FleurOrbControlWorkChain(*args: Any, **kwargs: Any)[source]

Workchain for determining the groundstate density matrix in an DFT+U calculation. This is done in 2 or 3 steps:

  1. Converge the system without DFT+U (a converged calculation can be provided to skip this step)

  2. A fixed number of iterations is run with fixed density matrices either generated as all distinct permutations for the given occupations or the explicitly given configurations

  3. The system and density matrix is relaxed

Parameters
  • wf_parameters – (Dict), Workchain Specifications

  • scf_no_ldau – (Dict), Inputs to a FleurScfWorkChain providing the initial system either converged or staring from a structure

  • scf_with_ldau – (Dict), Inputs to a FleurScfWorkChain. Only the wf_parameters are valid

  • fleurinp – (FleurinpData) FleurinpData to start from if no SCF should be done

  • remote – (RemoteData) RemoteData to start from if no SCF should be done

  • structure – (StructureData) Structure to start from if no SCF should be done

  • calc_parameters – (Dict), Inpgen Parameters

  • settings – (Dict), additional settings for e.g retrieving files

  • options – (Dict), Options for the submission of the jobs

  • inpgen – (Code)

  • fleur – (Code)

control_end_wc(errormsg)[source]

Controlled way to shutdown the workchain. It will initialize the output nodes The shutdown of the workchain will has to be done afterwards

converge_scf()[source]

Launch fleur.scf after the fixed density matrix calculations to relax the density matrix

converge_scf_no_ldau()[source]

Launch fleur.scf for the system without LDA+U

create_configurations()[source]

Creates the configurations for the initial density matrices

If fixed_occupations was provided the density matrices are constructed as having the given occupations and constructing all distinct permutations

If fixed_configurations was provided only the given configurations are taken

classmethod define(spec)[source]

Define the specification of the process, including its inputs, outputs and known exit codes.

A metadata input namespace is defined, with optional ports that are not stored in the database.

classmethod get_builder_continue_fixed(node)[source]

Get a Builder prepared with inputs to continue from the charge densities of a already finished MagRotateWorkChain

Parameters

node – Instance, from which the calculation should be continued

classmethod get_builder_continue_relaxed(node, allow_nonconverged=True)[source]

Get a Builder prepared with inputs to continue from the charge densities of a already finished MagRotateWorkChain

Parameters

node – Instance, from which the calculation should be continued

get_inputs_fixed_configurations(index, config)[source]

Sets up the input for the fixed density matrix calculation.

get_inputs_scf()[source]

Get the input for the scf workchain after the fixed density matrix calculations to relax the density matrix

get_inputs_scf_no_ldau()[source]

Get the inputs for the scf workchain without LDA+U

inpgen_needed()[source]

Returns whether the inpgen should be run directly by this workchain

return_results()[source]

return the results of the relaxed DFT+U calculations (scf workchains)

run_fixed_calculations()[source]

Returns whether to run frozen density matrix calculations

run_fleur_fixed()[source]

Launches fleur.base with l_linMix=T and mixParam=0.0, i.e. with a fixed density matrix for all configurations.

run_inpgen()[source]

Run the input generator

scf_no_ldau_needed()[source]

Returns whether to run an additional scf workchain before adding LDA+U

start()[source]

init context and some parameters

validate_input()[source]

validate input

aiida_fleur.workflows.orbcontrol.create_orbcontrol_result_node(**kwargs)[source]

This is a pseudo cf, to create the right graph structure of AiiDA. This calcfunction will create the output nodes in the database. It also connects the output_nodes to all nodes the information comes from. This includes the output_parameter node for the orbcontrol, connections to run scfs, and returning of the gs_calculation (best initial density matrix) So far it is just parsed in as kwargs argument, because we are to lazy to put most of the code overworked from return_results in here.

aiida_fleur.workflows.orbcontrol.extract_nmmp_file(folder)[source]

Extract the density matrix file from the given folder data

Raises

ExitCode 300, No density matrix file found

aiida_fleur.workflows.orbcontrol.generate_density_matrix_configurations(occupations=None, configurations=None)[source]

Generate all the necessary density matrix configurations from either the occupations or the explicitly given configurations for each species/orbital

Both arguments are expected as dictionaries in the form d[species][orbital], with the orbital key holding the specification for the current LDA+U procedure

Parameters
  • occupations – specifying the occupations for each procedure

  • configurations – specifying a explicit list of configurations that should be calculated

Returns

list of dictionaries with all the possible starting configurations for the whole system

CFCoeff: Calculation of 4f crystal field coefficients

In this module you find the workflow ‘FleurCFCoeffWorkChain’ for calculating the 4f crystal field coefficients

class aiida_fleur.workflows.cfcoeff.FleurCFCoeffWorkChain(*args: Any, **kwargs: Any)[source]

Workflow for calculating rare-earth crystal field coefficients

check_cf_calculation(calc_name)[source]

Check that the CFCalculation finished successfully

control_end_wc(errormsg)[source]

Controlled way to shutdown the workchain. It will initialize the output nodes The shutdown of the workchain will has to be done afterwards

classmethod define(spec)[source]

Define the specification of the process, including its inputs, outputs and known exit codes.

A metadata input namespace is defined, with optional ports that are not stored in the database.

return_results()[source]

Return results fo cf calculation

start()[source]

init context and some parameters

validate_input()[source]

validate input

aiida_fleur.workflows.cfcoeff.calculate_cf_coefficients(cf_cdn_folder: aiida.orm.nodes.data.folder.FolderData, cf_pot_folder: aiida.orm.nodes.data.folder.FolderData, convert: aiida.orm.nodes.data.bool.Bool = None, atomTypes: aiida.orm.nodes.data.list.List = None) aiida.orm.nodes.data.dict.Dict[source]

Calculate the crystal filed coefficients using the tool from the masci-tools package

Parameters
  • cf_cdn_folder – FolderData for the retrieved files for the charge density data

  • cf_pot_folder – FolderData for the retrieved files for the potential data

Raises

ExitCode 300, CFData.hdf file is missing

Raises

ExitCode 310, CFdata.hdf reading failed

Raises

ExitCode 320, Crystal field calculation failed

aiida_fleur.workflows.cfcoeff.create_cfcoeff_results_node(**kwargs)[source]

This is a pseudo cf, to create the right graph structure of AiiDA. This calcfunction will create the output nodes in the database. It also connects the output_nodes to all nodes the information comes from. This includes the output_parameter node for the orbcontrol, connections to run scfs, and returning of the gs_calculation (best initial density matrix) So far it is just parsed in as kwargs argument, because we are to lazy to put most of the code overworked from return_results in here.

aiida_fleur.workflows.cfcoeff.reconstruct_cfcalculation(charge_densities, potentials, atomtype, **kwargs)[source]

Reconstruct the CFCalculation instance from the outputs of the FleurCFCoeffWorkChain

aiida_fleur.workflows.cfcoeff.reconstruct_cfcoeffcients(output_dict, atomtype=None)[source]

Reconstruct the CFCoefficient list from the output dictionary of the FleurCFCoeffWorkChain

Parameters
  • output_dict – output dictionary node or the corresponding dictionary

  • atomtype – int of the atomtype to reconstruct the coefficients for

Commandline interface (CLI)

aiida-fleur

CLI for the aiida-fleur plugin.

aiida-fleur [OPTIONS] COMMAND [ARGS]...

Options

-p, --profile <profile>

Execute the command for this profile instead of the default profile.

-v, --version

Show the version and exit.

data

Commands to create and inspect data nodes.

aiida-fleur data [OPTIONS] COMMAND [ARGS]...

fleurinp

Commands to handle FleurinpData nodes.

aiida-fleur data fleurinp [OPTIONS] COMMAND [ARGS]...
cat

Dumb the content of a file contained in given fleurinpdata, per default dump inp.xml

aiida-fleur data fleurinp cat [OPTIONS] NODE

Options

-f, --filename <filename>

Disply the file content of the given filename.

Default

inp.xml

Arguments

NODE

Required argument

extract-inpgen

Write out a inpgen input file, that most closely reproduces the input file in the node when run through the inpgen

aiida-fleur data fleurinp extract-inpgen [OPTIONS] NODE

Options

-o, --output-filename <output_filename>

Name of the file to write out.

Default

--para, --no-para

Add additional LAPW parameters to output file

Default

True

Arguments

NODE

Required argument

list

List stored FleurinpData in the database with additional information

aiida-fleur data fleurinp list [OPTIONS] [--]

Options

-G, --groups <groups>

One or multiple groups identified by their ID, UUID or label.

-p, --past-days <PAST_DAYS>

Only include entries created in the last PAST_DAYS number of days.

-A, --all-users

Include all entries regardless of the owner.

-r, --raw

Display only raw query results, without any headers or footers.

--uuid, --no-uuid

Display uuid of nodes.

Default

False

--ctime, --no-ctime

Display ctime of nodes.

Default

False

--extras, --no-extras

Display extras of nodes.

Default

True

--strucinfo, --no-strucinfo

Perpare additional information on the crystal structure to show. This slows down the query.

Default

False

open

opens the inp.xml in some editor, readonly. inp.xml this way looking at xml might be more convenient.

aiida-fleur data fleurinp open [OPTIONS] NODE

Options

-f, --filename <filename>

Open the file of the given filename.

Default

inp.xml

-s, --save

Write out the changed content

-o, --output-filename <output_filename>

Filename of the outpu.t

Default

Arguments

NODE

Required argument

options

Commands to create and inspect Dict nodes containing options.

aiida-fleur data options [OPTIONS] COMMAND [ARGS]...
create

Command to create options dict nodes

aiida-fleur data options create [OPTIONS]

Options

-N, --max-num-machines <max_num_machines>

The maximum number of machines (nodes) to use for the calculations.

Default

1

-M, --num-mpiprocs-per-machine <num_mpiprocs_per_machine>

Run the simulation with so many num-mpi-procs-per-machine.

Default

2

-W, --max-wallclock-seconds <max_wallclock_seconds>

The maximum wallclock time in seconds to set for the calculations.

Default

1800

-q, --queue <queue>

The queue name to submit to.

Default

-n, --dry-run

Perform a dry run.

--show, --no-show

Print the contents from the options dict.

Default

True

parameter

Commands to create and inspect Dict nodes containing FLAPW parameters (‘calc_parameters’).

aiida-fleur data parameter [OPTIONS] COMMAND [ARGS]...
import

Extract FLAPW parameters from a Fleur input file and store as Dict in the db.

FILENAME is the name/path of the inp.xml file to use.

aiida-fleur data parameter import [OPTIONS] FILENAME

Options

--fleurinp, --no-fleurinp

Store also the fleurinp and the extractor calcfunction in the db.

Default

False

--show, --no-show

Print the contents from the extracted dict.

Default

True

-n, --dry-run

Perform a dry run.

Arguments

FILENAME

Required argument

structure

Commands to create and inspect StructureData nodes.

aiida-fleur data structure [OPTIONS] COMMAND [ARGS]...
import

Import a StructureData from a Fleur input file.

FILENAME is the name/path of the inp.xml file to use.

If you want to import a structure from any file type you can use ‘verdi data structure import -ase <filename>’ instead.

aiida-fleur data structure import [OPTIONS] FILENAME

Options

--fleurinp, --no-fleurinp

Store also the fleurinp and the extractor calcfunction in the db.

Default

False

-n, --dry-run

Perform a dry run.

Arguments

FILENAME

Required argument

launch

Commands to launch workflows and calcjobs of aiida-fleur.

aiida-fleur launch [OPTIONS] COMMAND [ARGS]...

banddos

Launch a banddos workchain

aiida-fleur launch banddos [OPTIONS]

Options

-inp, --fleurinp <fleurinp>

FleurinpData node for the fleur calculation.

-f, --fleur <fleur>

A code node or label for a fleur executable.

Default

<function get_fleur at 0x7f1b6e166c20>

-wf, --wf-parameters <wf_parameters>

Dict containing parameters given to the workchain.

-P, --parent-folder <parent_folder>

The PK of a parent remote folder (for restarts).

-d, --daemon

Submit the process to the daemon instead of running it locally.

Default

False

-set, --settings <settings>

Settings node for the calcjob.

-opt, --option-node <option_node>

Dict, an option node for the workchain.

corehole

Launch a corehole workchain

aiida-fleur launch corehole [OPTIONS]

Options

-s, --structure <structure>

StructureData node, given by pk or uuid or file in any for mat which will be converted.

Default

<function get_si_bulk_structure at 0x7f1b6e166a70>

-i, --inpgen <inpgen>

A code node or label for an inpgen executable.

Default

<function get_inpgen at 0x7f1b6e166b90>

-calc_p, --calc-parameters <calc_parameters>

Dict with calculation (FLAPW) parameters to build, which will be given to inpgen.

-inp, --fleurinp <fleurinp>

FleurinpData node for the fleur calculation.

-f, --fleur <fleur>

A code node or label for a fleur executable.

Default

<function get_fleur at 0x7f1b6e166c20>

-wf, --wf-parameters <wf_parameters>

Dict containing parameters given to the workchain.

-d, --daemon

Submit the process to the daemon instead of running it locally.

Default

False

-set, --settings <settings>

Settings node for the calcjob.

-opt, --option-node <option_node>

Dict, an option node for the workchain.

create_magnetic

Launch a create_magnetic workchain

aiida-fleur launch create_magnetic [OPTIONS]

Options

-i, --inpgen <inpgen>

A code node or label for an inpgen executable.

Default

<function get_inpgen at 0x7f1b6e166b90>

-calc_p, --calc-parameters <calc_parameters>

Dict with calculation (FLAPW) parameters to build, which will be given to inpgen.

-f, --fleur <fleur>

A code node or label for a fleur executable.

Default

<function get_fleur at 0x7f1b6e166c20>

-wf, --wf-parameters <wf_parameters>

Required Dict containing parameters given to the workchain.

-eos, --eos-parameters <eos_parameters>

Dict containing wf parameters given to the sub EOS workchains.

-scf, --scf-parameters <scf_parameters>

Dict containing parameters given to the sub SCF workchains.

-relax, --relax-parameters <relax_parameters>

Dict containing wf parameters given to the sub relax workchains.

-d, --daemon

Submit the process to the daemon instead of running it locally.

Default

False

-opt, --option-node <option_node>

Dict, an option node for the workchain.

dmi

Launch a dmi workchain

aiida-fleur launch dmi [OPTIONS]

Options

-s, --structure <structure>

StructureData node, given by pk or uuid or file in any for mat which will be converted.

Default

<function get_fept_film_structure at 0x7f1b6e166b00>

-i, --inpgen <inpgen>

A code node or label for an inpgen executable.

Default

<function get_inpgen at 0x7f1b6e166b90>

-calc_p, --calc-parameters <calc_parameters>

Dict with calculation (FLAPW) parameters to build, which will be given to inpgen.

-f, --fleur <fleur>

A code node or label for a fleur executable.

Default

<function get_fleur at 0x7f1b6e166c20>

-wf, --wf-parameters <wf_parameters>

Required Dict containing parameters given to the workchain.

-scf, --scf-parameters <scf_parameters>

Dict containing parameters given to the sub SCF workchains.

-d, --daemon

Submit the process to the daemon instead of running it locally.

Default

False

-opt, --option-node <option_node>

Dict, an option node for the workchain.

eos

Launch a eos workchain

aiida-fleur launch eos [OPTIONS]

Options

-s, --structure <structure>

StructureData node, given by pk or uuid or file in any for mat which will be converted.

Default

<function get_si_bulk_structure at 0x7f1b6e166a70>

-i, --inpgen <inpgen>

A code node or label for an inpgen executable.

Default

<function get_inpgen at 0x7f1b6e166b90>

-calc_p, --calc-parameters <calc_parameters>

Dict with calculation (FLAPW) parameters to build, which will be given to inpgen.

-f, --fleur <fleur>

A code node or label for a fleur executable.

Default

<function get_fleur at 0x7f1b6e166c20>

-wf, --wf-parameters <wf_parameters>

Dict containing parameters given to the workchain.

-scf, --scf-parameters <scf_parameters>

Dict containing parameters given to the sub SCF workchains.

-d, --daemon

Submit the process to the daemon instead of running it locally.

Default

False

-set, --settings <settings>

Settings node for the calcjob.

-opt, --option-node <option_node>

Dict, an option node for the workchain.

fleur

Launch a base_fleur workchain. If launch_base is False launch a single fleur calcjob instead.

aiida-fleur launch fleur [OPTIONS]

Options

-inp, --fleurinp <fleurinp>

FleurinpData node for the fleur calculation.

-f, --fleur <fleur>

A code node or label for a fleur executable.

Default

<function get_fleur at 0x7f1b6e166c20>

-P, --parent-folder <parent_folder>

The PK of a parent remote folder (for restarts).

-set, --settings <settings>

Settings node for the calcjob.

-d, --daemon

Submit the process to the daemon instead of running it locally.

Default

False

-N, --max-num-machines <max_num_machines>

The maximum number of machines (nodes) to use for the calculations.

Default

1

-W, --max-wallclock-seconds <max_wallclock_seconds>

The maximum wallclock time in seconds to set for the calculations.

Default

1800

-M, --num-mpiprocs-per-machine <num_mpiprocs_per_machine>

Run the simulation with so many num-mpi-procs-per-machine.

Default

2

-opt, --option-node <option_node>

Dict, an option node for the workchain.

-I, --with-mpi

Run the calculations with MPI enabled.

Default

False

-q, --queue <queue>

The queue name to submit to.

Default

--launch_base, --no-launch_base

Run the base_fleur workchain, which also handles errors instead of a single fleur calcjob.

Default

True

init_cls

Launch an init_cls workchain

aiida-fleur launch init_cls [OPTIONS]

Options

-s, --structure <structure>

StructureData node, given by pk or uuid or file in any for mat which will be converted.

Default

<function get_si_bulk_structure at 0x7f1b6e166a70>

-i, --inpgen <inpgen>

A code node or label for an inpgen executable.

Default

<function get_inpgen at 0x7f1b6e166b90>

-calc_p, --calc-parameters <calc_parameters>

Dict with calculation (FLAPW) parameters to build, which will be given to inpgen.

-inp, --fleurinp <fleurinp>

FleurinpData node for the fleur calculation.

-f, --fleur <fleur>

A code node or label for a fleur executable.

Default

<function get_fleur at 0x7f1b6e166c20>

-wf, --wf-parameters <wf_parameters>

Dict containing parameters given to the workchain.

-d, --daemon

Submit the process to the daemon instead of running it locally.

Default

False

-set, --settings <settings>

Settings node for the calcjob.

-opt, --option-node <option_node>

Dict, an option node for the workchain.

inpgen

Launch an inpgen calcjob on given input

If no code is given it queries the DB for inpgen codes and uses the one with the newest creation time.

Either structure or anysource_structure can be specified. Default structure is Si bulk.

aiida-fleur launch inpgen [OPTIONS]

Options

-s, --structure <structure>

StructureData node, given by pk or uuid or file in any for mat which will be converted.

Default

<function get_si_bulk_structure at 0x7f1b6e166a70>

-i, --inpgen <inpgen>

A code node or label for an inpgen executable.

Default

<function get_inpgen at 0x7f1b6e166b90>

-calc_p, --calc-parameters <calc_parameters>

Dict with calculation (FLAPW) parameters to build, which will be given to inpgen.

-set, --settings <settings>

Settings node for the calcjob.

-d, --daemon

Submit the process to the daemon instead of running it locally.

Default

False

-opt, --option-node <option_node>

Dict, an option node for the workchain.

-q, --queue <queue>

The queue name to submit to.

Default

mae

Launch a mae workchain

aiida-fleur launch mae [OPTIONS]

Options

-s, --structure <structure>

StructureData node, given by pk or uuid or file in any for mat which will be converted.

Default

<function get_fept_film_structure at 0x7f1b6e166b00>

-i, --inpgen <inpgen>

A code node or label for an inpgen executable.

Default

<function get_inpgen at 0x7f1b6e166b90>

-calc_p, --calc-parameters <calc_parameters>

Dict with calculation (FLAPW) parameters to build, which will be given to inpgen.

-inp, --fleurinp <fleurinp>

FleurinpData node for the fleur calculation.

-f, --fleur <fleur>

A code node or label for a fleur executable.

Default

<function get_fleur at 0x7f1b6e166c20>

-wf, --wf-parameters <wf_parameters>

Dict containing parameters given to the workchain.

-scf, --scf-parameters <scf_parameters>

Dict containing parameters given to the sub SCF workchains.

-P, --parent-folder <parent_folder>

The PK of a parent remote folder (for restarts).

-d, --daemon

Submit the process to the daemon instead of running it locally.

Default

False

-set, --settings <settings>

Settings node for the calcjob.

-opt, --option-node <option_node>

Dict, an option node for the workchain.

relax

Launch a base relax workchain

# TODO final scf input

aiida-fleur launch relax [OPTIONS]

Options

-s, --structure <structure>

StructureData node, given by pk or uuid or file in any for mat which will be converted.

Default

<function get_si_bulk_structure at 0x7f1b6e166a70>

-i, --inpgen <inpgen>

A code node or label for an inpgen executable.

Default

<function get_inpgen at 0x7f1b6e166b90>

-calc_p, --calc-parameters <calc_parameters>

Dict with calculation (FLAPW) parameters to build, which will be given to inpgen.

-f, --fleur <fleur>

A code node or label for a fleur executable.

Default

<function get_fleur at 0x7f1b6e166c20>

-wf, --wf-parameters <wf_parameters>

Dict containing parameters given to the workchain.

-scf, --scf-parameters <scf_parameters>

Dict containing parameters given to the sub SCF workchains.

-d, --daemon

Submit the process to the daemon instead of running it locally.

Default

False

-set, --settings <settings>

Settings node for the calcjob.

-opt, --option-node <option_node>

Dict, an option node for the workchain.

scf

Launch a scf workchain

aiida-fleur launch scf [OPTIONS]

Options

-s, --structure <structure>

StructureData node, given by pk or uuid or file in any for mat which will be converted.

Default

<function get_si_bulk_structure at 0x7f1b6e166a70>

-i, --inpgen <inpgen>

A code node or label for an inpgen executable.

Default

<function get_inpgen at 0x7f1b6e166b90>

-calc_p, --calc-parameters <calc_parameters>

Dict with calculation (FLAPW) parameters to build, which will be given to inpgen.

-set, --settings <settings>

Settings node for the calcjob.

-inp, --fleurinp <fleurinp>

FleurinpData node for the fleur calculation.

-f, --fleur <fleur>

A code node or label for a fleur executable.

Default

<function get_fleur at 0x7f1b6e166c20>

-wf, --wf-parameters <wf_parameters>

Dict containing parameters given to the workchain.

-P, --parent-folder <parent_folder>

The PK of a parent remote folder (for restarts).

-d, --daemon

Submit the process to the daemon instead of running it locally.

Default

False

-set, --settings <settings>

Settings node for the calcjob.

-opt, --option-node <option_node>

Dict, an option node for the workchain.

ssdisp

Launch a ssdisp workchain

aiida-fleur launch ssdisp [OPTIONS]

Options

-s, --structure <structure>

StructureData node, given by pk or uuid or file in any for mat which will be converted.

Default

<function get_fept_film_structure at 0x7f1b6e166b00>

-i, --inpgen <inpgen>

A code node or label for an inpgen executable.

Default

<function get_inpgen at 0x7f1b6e166b90>

-calc_p, --calc-parameters <calc_parameters>

Dict with calculation (FLAPW) parameters to build, which will be given to inpgen.

-f, --fleur <fleur>

A code node or label for a fleur executable.

Default

<function get_fleur at 0x7f1b6e166c20>

-wf, --wf-parameters <wf_parameters>

Required Dict containing parameters given to the workchain.

-scf, --scf-parameters <scf_parameters>

Dict containing parameters given to the sub SCF workchains.

-d, --daemon

Submit the process to the daemon instead of running it locally.

Default

False

-opt, --option-node <option_node>

Dict, an option node for the workchain.

plot

Invoke the plot_fleur command on given nodes

aiida-fleur plot [OPTIONS] [NODES]...

Options

-f <filename>
--save <save>

Should the result of plot_fleur be saved to a files.

Default

False

--show, --no-show

Show the output of plot_fleur.

Default

True

--show_dict, --no-show_dict

Show the output of plot_fleur.

Default

False

--bokeh
--matplotlib

Arguments

NODES

Optional argument(s)

workflow

Commands to inspect aiida-fleur workchains.

aiida-fleur workflow [OPTIONS] COMMAND [ARGS]...

inputdict

Print data from Dict nodes input into any fleur process.

aiida-fleur workflow inputdict [OPTIONS] [--] PROCESS

Options

--info, --no-info

Print an info header above each node.

-l, --label <label>

Print only output dicts with a certain link_label.

--show, --no-show

Show the main output of the command.

Default

True

-k, --keys <keys>

Filter the output by one or more keys.

-f, --format <fmt>

The format of the output data.

Options

json+date | yaml | yaml_expanded

Arguments

PROCESS

Required argument

res

Print data from Dict nodes returned or created by any fleur process.

aiida-fleur workflow res [OPTIONS] [--] PROCESS

Options

--info, --no-info

Print an info header above each node.

-l, --label <label>

Print only output dicts with a certain link_label.

--show, --no-show

Show the main output of the command.

Default

True

-k, --keys <keys>

Filter the output by one or more keys.

-f, --format <fmt>

The format of the output data.

Options

json+date | yaml | yaml_expanded

Arguments

PROCESS

Required argument