Workflows¶
In addition to the low-level cif2j.wannier_tb2j calculation described in Inputs, Parameters and Outputs, the plugin
provides a WorkChain that orchestrates a full Wannier90 + TB2J run starting from a structure. Registered
WorkChains can be loaded through the AiiDA WorkflowFactory() using their entry
point name:
Entry point |
WorkChain |
Purpose |
|---|---|---|
|
Runs a |
Wannier90 -> TB2J WorkChain¶
cif2j.wannier_tb2j (WannierTB2JWorkChain) chains together the
aiida-wannier90-workflows
Wannier90BandsWorkChain with the cif2j.wannier_tb2j calculation. It accepts a structure directly as
a CIF/MCIF file, auto-detects magnetic elements and the Fermi energy where possible, and exposes the full
input namespaces of both of its constituent processes.
Inputs¶
Input |
Type |
Description |
|---|---|---|
|
|
Required. Either an MCIF/CIF file or an existing |
|
|
Elements for which the exchange interaction is considered. If omitted, auto-detected from the
per-kind magnetic moments of a resolved |
(exposed) |
namespace |
All inputs of |
|
namespace |
|
Outputs¶
Output |
Type |
Description |
|---|---|---|
|
|
The retrieved folder from the TB2J calculation, containing |
Exit codes¶
Code |
Label |
Meaning |
|---|---|---|
|
|
The |
|
|
The TB2J calculation step failed. |
|
|
The |
|
|
|
|
|
|
Important
AiiDA’s transport layer cannot copy files directly between two different remote machines. The
wannier90.x step reads the pw2wannier90.x outputs via a remote-folder copy rather than
re-uploading them, so the pw2wannier90 and wannier90 codes must be configured on the same
AiiDA computer, or the Wannier90Calculation step will hang and eventually fail.
get_builder_from_protocol() logs a warning if
it detects this misconfiguration.
Building inputs with get_builder_from_protocol¶
Rather than populating every exposed namespace by hand, use
get_builder_from_protocol() to build a pre-populated
ProcessBuilder from a small set of high level options, forwarding most of its arguments on to
Wannier90BandsWorkChain.get_builder_from_protocol.
from aiida.orm import load_code, SinglefileData
from aiida.plugins import WorkflowFactory
from aiida_quantumespresso.common.types import ElectronicType, SpinType
from aiida import load_profile
load_profile("user_profile")
WannierTB2J = WorkflowFactory("cif2j.wannier_tb2j")
builder = WannierTB2J.get_builder_from_protocol(
codes={
"pw": "qe-pw@localhost",
"pw2wannier90": "qe-pw2wannier90@localhost",
"wannier90": "wannier90@localhost",
"tb2j": "tb2j@localhost",
},
structure=SinglefileData(file="/absolute/path/to/structure.mcif"),
pseudo_family="SSSP/1.3/PBE/efficiency",
spin_type=SpinType.COLLINEAR,
electronic_type=ElectronicType.METAL,
)
See the API reference for the complete list of
accepted arguments, including magnetic_elements, tb2j_parameters and tb2j_options. For the full
submission script see Example Calculations.