• Current version: 0.4.0

Fleur initial core-level shifts workflow

Class name, import from:
from aiida_fleur.workflows.initial_cls import FleurInitialCLSWorkChain
#or
WorkflowFactory('fleur.init_cls')

Description/Purpose

The initial-state workflow fleur_initial_cls_wc calculates core-level shifts of a system with respect to the elemental references via normal SCF calculations. If required, the SCF calculations of the corresponding elemental references are also managed by the workflow. Furthermore, the workflow extracts the enthalpy of formation for the investigated compound from these SCF runs. The workflow calculates core-level shifts (CLS) as the difference of Kohn-Sham core-level energies with respect to the respected Fermi level.

This workflow manages none to one inpgen calculation and one to several Fleur calculations. It is one of the most core workflows and often deployed as sub-workflow.

Note

To minimize uncertainties on CLS it is important that the compound as well as the reference systems are calculated with the same atomic parameters (muffin-tin radius, radial grid points and spacing, radial basis cutoff). The workflow tests for this equality and tries to assure it, though it does not know what is a good parameter set nor if the present set works well for both systems. It is currently best practice to enforce the FLAPW parameters used within the workflow, i.e., provide them as input for the system as for the references. For low high-throughput failure rates and smallest data footprint we advice to calculate the references first alone and parse a converged calculation as a reference, that way references are not rerun and produce less overhead. Otherwise one can also turn on caching in AiiDA which will save the recalculation of the references, but won’t decrease their data footprint.

Layout

../../_images/Workchain_charts_initial_state.png

Input nodes

name

type

description

required

inpgen

Code

Inpgen code

yes

fleur

Code

Fleur code

yes

wf_parameters

Dict

Settings of the workchain

no

fleurinp

FleurinpData

FLEUR input

no

structure

StructureData

Crystal structure

no

calc_parameters

Dict

FLAPW parameters for given structure

no

options

Dict

AiiDA options (computational resources)

no

More details:
  • fleur (aiida.orm.Code): Fleur code using the fleur.fleur plugin

  • inpgen (aiida.orm.Code): Inpgen code using the fleur.inpgen plugin

  • wf_parameters (Dict, optional): Some settings of the workflow behavior

  • structure (StructureData, path 1): Crystal structure data node.

  • calc_parameters (Dict, optional): Longer description of the workflow

  • fleurinp (FleurinpData, path 2): Label of the workflow

Workchain parameters and its defaults

wf_parameters

wf_parameters: Dict - Settings of the workflow behavior. All possible keys and their defaults are listed below:

# -*- coding: utf-8 -*-
'relax': True,               # Not implemented, relax the structure
'relax_mode': 'Fleur',       # Not implemented, how to relax the structure
'relax_para': 'default',     # Not implemented, parameter for the relaxation
'scf_para': 'default',       # Use these parameters for the SCFs
'same_para': True,           # enforce the same parameters
'references': {}             # Dict to provide the elemental references
                             # i.e { 'W': calc, outputnode of SCF workflow or fleurinp,
                             # or structure data or (structure data + Parameter),
                             # 'Be' : ...}

options

options: Dict - AiiDA options (computational resources). Example:

'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 1},
'max_wallclock_seconds': 6*60*60,
'queue_name': '',
'custom_scheduler_commands': '',
'import_sys_environment': False,
'environment_variables': {}

Returns nodes

The table below shows all the possible output nodes of the fleur_initial_cls_wc workchain.

name

type

comment

output_initial_cls_wc_para

Dict

Link to last FleurCalculation output dict

More details:

  • output_initial_cls_wc_para: Dict - Main results of the workchain. Contains core-level shifts, band gaps, core-levels, atom-type information, errors, warnings, other information. An example:

    # -*- coding: utf-8 -*-
    {
        'atomtypes': {
            'W': [
                {
                    'atomic_number': 74,
                    'coreconfig': '[Kr] (5s1/2) (4d3/2) (4d5/2) (4f5/2) (4f7/2)',
                    'element': 'W',
                    'natoms': 1,
                    'species': 'W-1',
                    'stateOccupation': [
                        {
                            '(5d3/2)': [
                                '2.00000000',
                                '.00000000'
                            ]
                        },
                        {
                            '(5d5/2)': [
                                '2.00000000',
                                '.00000000'
                            ]
                        }
                    ],
                    'valenceconfig': '(5p1/2) (5p3/2) (6s1/2) (5d3/2) (5d5/2)'
                }
            ]
        },
        'bandgap': 0.0074571775,
        'bandgap_units': 'htr',
        'binding_energy_convention': 'negativ',
        'corelevel_energies': {
            'W': [
                [
                    -2550.2512204246,
                    -439.7260486989,
                    -420.4442892264,
                    -370.7259449483,
                    -101.1391871143,
                    -92.5627547497,
                    -81.8114542005,
                    -20.7351164096,
                    -67.3928879745,
                    -65.0551729884,
                    -17.1796863155,
                    -14.6884205438,
                    -2.7326665018,
                    -8.8548575156,
                    -8.3959093745,
                    -1.0995859461,
                    -1.0173114662
                ]
            ]
        },
        'corelevel_energies_units': 'htr',
        'corelevelshifts': {
            'W': [
                [
                    0.0,
                    0.0,
                    0.0,
                    ...
                ]
            ]
        },
        'corelevelshifts_units': 'htr',
        'fermi_energy': 0.6026436555,
        'fermi_energy_units': 'htr',
        'formation_energy': [
            0.0
        ],
        'formation_energy_units': 'eV/atom',
        'material': 'W',
        'reference_bandgaps': [
            0.0074571775
        ],
        'reference_bandgaps_des': [
            'W'
        ],
        'reference_corelevel_energies': {
            'W': [
                [
                    -2550.2512204246,
                    -439.7260486989,
                    -420.4442892264,
                    -370.7259449483,
                    -101.1391871143,
                    -92.5627547497,
                    -81.8114542005,
                    -20.7351164096,
                    -67.3928879745,
                    -65.0551729884,
                    -17.1796863155,
                    -14.6884205438,
                    -2.7326665018,
                    -8.8548575156,
                    -8.3959093745,
                    -1.0995859461,
                    -1.0173114662
                ]
            ]
        },
        'reference_corelevel_energies_units': 'htr',
        'reference_fermi_energy': [
            0.6026436555
        ],
        'reference_fermi_energy_des': [
            'W'
        ],
        'successful': true,
        'total_energy': -439902.56049548,
        'total_energy_ref': [
            -439902.56049548
        ],
        'total_energy_ref_des': [
            'W'
        ],
        'total_energy_units': 'eV',
        'warnings': [],
        'workflow_name': 'fleur_initial_cls_wc',
        'workflow_version': '0.4.0'
    }
    

Plot_fleur visualization

Single node

from aiida_fleur.tools.plot import plot_fleur

plot_fleur(50816)

Example usage

# -*- coding: utf-8 -*-
from aiida.orm import load_node, Dict
from aiida.engine import submit
from aiida.plugins import WorkflowFactory


fleur_init_cls_wc = WorkflowFactory('fleur.initial_cls')
struc = load_node(STRUCTURE_PK)
flapw_para = load_node(PARAMETERS_PK)
fleur_code = load_node(FLEUR_PK)
inpgen_code = load_node(INPGEN_PK)

options = Dict(dict={'resources': {'num_machines': 2, 'num_mpiprocs_per_machine': 24},
                         'queue_name': '',
                         'custom_scheduler_commands': '',
                         'max_wallclock_seconds':  60*60})

wf_para_initial = Dict(dict={
  'references': {'Be': '257d8ae8-32b3-4c95-8891-d5f527b80008',
                 'W': 'c12c999c-9a00-4866-b6ef-9bb5d28e7797'},
  'scf_para': {'density_criterion': 5e-06, 'fleur_runmax': 3, 'itmax_per_run': 80}})

# launch workflow
initial_res = submit(fleur_init_cls_wc, wf_parameters=wf_para_initial, structure=struc,
             calc_parameters=flapw_para, options=options, fleur=fleur, inpgen=inpgen,
             label='test initial cls', description='fleur_initial_cls test')

Error handling

Still has to be documented.

So far only the input is checked. All other errors are currently not handled. The SCF sub-workchain comes with its own error handling of course.