Fleur Magnetic Anisotropy Energy Converge workchain
Current version: 0.2.0
Class:
FleurMaeConvWorkChain
String to pass to the
WorkflowFactory()
:fleur.mae_conv
Workflow type: Scientific workchain, self-consistent subgroup
Contents
Import Example:
from aiida_fleur.workflows.mae_conv import FleurMaeConvWorkChain
#or
WorkflowFactory('fleur.mae_conv')
Description/Purpose
This workchain calculates Magnetic Anisotropy Energy over a given set of spin-quantization axes. The force-theorem is employed which means the workchain converges a reference charge density first then it submits a single FleurCalculation with a <forceTheorem> tag.
The task of the workchain us to calculate the energy difference between two or several structures having a different magnetisation profile:

To do this, the workchain employs the force theorem approach:

Input nodes
The FleurSSDispWorkChain employs
exposed feature of the AiiDA, thus inputs for the nested
SCF workchain should be passed in the namespace
scf
.
name |
type |
description |
required |
---|---|---|---|
scf |
namespace |
inputs for nested SCF WorkChain |
yes |
wf_parameters |
Settings of the workchain |
no |
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 -*-
'sqas': {'label': [0.0, 0.0]}, # sets theta, phi pairs to calculate
'soc_off': [] # a list of atom labels to switch off SOC term
soc_off is a python list containing atoms labels. SOC is switched off for species, corresponding to the atom with a given label.
Note
It can be that the specie correspond to several atoms and soc_off switches off SOC for atoms that was not intended to change. You must be careful and make sure that several atoms do not correspond to a given specie.
An example of soc_off work:
'soc_off': ['458']
changes
<species name="Ir-2" element="Ir" atomicNumber="77" coreStates="17" magMom=".00000000" flipSpin="T">
<mtSphere radius="2.52000000" gridPoints="747" logIncrement=".01800000"/>
<atomicCutoffs lmax="8" lnonsphr="6"/>
<energyParameters s="6" p="6" d="5" f="5"/>
<prodBasis lcutm="4" lcutwf="8" select="4 0 4 2"/>
<lo type="SCLO" l="1" n="5" eDeriv="0"/>
</species>
-----
<atomGroup species="Ir-2">
<filmPos label=" 458">1.000/4.000 1.000/2.000 11.4074000502</filmPos>
<force calculate="T" relaxXYZ="TTT"/>
<nocoParams l_relax="F" alpha=".00000000" beta=".00000000" b_cons_x=".00000000" b_cons_y=".00000000"/>
</atomGroup>
to:
<species name="Ir-2" element="Ir" atomicNumber="77" coreStates="17" magMom=".00000000" flipSpin="T">
<mtSphere radius="2.52000000" gridPoints="747" logIncrement=".01800000"/>
<atomicCutoffs lmax="8" lnonsphr="6"/>
<energyParameters s="6" p="6" d="5" f="5"/>
<prodBasis lcutm="4" lcutwf="8" select="4 0 4 2"/>
<special socscale="0.0"/>
<lo type="SCLO" l="1" n="5" eDeriv="0"/>
</species>
As you can see, I was careful about “Ir-2” specie and it contained a single atom with a label 458. Please also refer to Setting up atom labels section to learn how to set labels up.
sqas is a python dictionary (key: value
pairs). The key
can be any string which
sets a label of the SQA. value
must be a list of 2 values: [theta, phi]
.
Output nodes
out
:Dict
- Information of workflow results like success, last result node, list with convergence behavior{ "errors": [], "failed_labels": [], "info": [], "mae": { "label": 0.001442720531486, "label2": 0.0 }, "mae_units": "eV", "sqa": { "label": [ 0.0, 0.0 ], "label2": [ 1.57079, 1.57079 ] }, "warnings": [], "workflow_name": "FleurMaeConvWorkChain", "workflow_version": "0.1.0" }Resulting MAE energies are listed according to given labels.
Layout
MAE converge always starts with a structure and a list of q-vectors to calculate. There is no way to continue from pre-converged charge density.
Error handling
A list of implemented exit codes:
Code |
Meaning |
---|---|
230 |
Invalid workchain parameters |
342 |
Convergence MAE calculation failed for all SQAs |
343 |
Convergence MAE calculation failed for all SQAs |
Example usage
# -*- coding: utf-8 -*- from aiida.orm import load_node, Dict from aiida.engine import submit from aiida_fleur.workflows.mae_conv import FleurMaeConvWorkChain fleur_code = load_node(FLEUR_PK) inpgen_code = load_node(INPGEN_PK) structure = load_node(STRUCTURE_PK) wf_para = Dict(dict={'sqas': {'label': [0.0, 0.0]}, 'soc_off': []}) options = Dict(dict={'resources': {'num_machines': 1, 'num_mpiprocs_per_machine': 24}, 'queue_name': 'devel', 'custom_scheduler_commands': '', 'max_wallclock_seconds': 60*60}) parameters = Dict(dict={'atom': {'element': 'Pt', 'lmax': 8 }, 'atom2': {'element': 'Fe', 'lmax': 8, }, 'comp': {'kmax': 3.8, }, 'kpt': {'div1': 20, 'div2': 24, 'div3': 1 }}) wf_para_scf = {'fleur_runmax': 2, 'itmax_per_run': 120, 'density_converged': 0.2, 'mode': 'density' } wf_para_scf = Dict(dict=wf_para_scf) options_scf = Dict(dict={'resources': {'num_machines': 2, 'num_mpiprocs_per_machine': 24}, 'queue_name': 'devel', 'custom_scheduler_commands': '', 'max_wallclock_seconds': 60*60}) inputs = {'scf': {'wf_parameters': wf_para_scf, 'structure': structure, 'calc_parameters': parameters, 'options': options_scf, 'inpgen': inpgen_code, 'fleur': fleur_code }, 'wf_parameters': wf_para, } res = submit(FleurMaeConvWorkChain, **inputs)