Inputs, Parameters and Outputs¶
This page is the reference for the cif2j.wannier_tb2j calculation
(WannierTB2JCalculation). It wraps the wann2J.py script
from TB2J, which computes magnetic exchange parameters from a
Wannier90 tight-binding Hamiltonian. It describes every input port, the valid keys accepted by the
parameters dictionary input, the outputs produced, and the exit codes that may be returned. For complete
runnable scripts see Example Calculations, and for the higher level WorkChain that drives Wannier90 and TB2J
together see Workflows.
Spinor vs. collinear inputs¶
wann2J.py can be run in two mutually exclusive modes, selected by which Wannier90 output folder(s) are
given:
Non-collinear / spin-orbit — provide a single
wannier_folder, theretrievedoutput of a non-collinear or spin-orbitWannier90Calculation.Collinear, spin-polarised — provide both
wannier_folder_upandwannier_folder_down, theretrievedoutputs of the spin-up and spin-downWannier90Calculationruns respectively.
Exactly one of these two forms must be supplied; mixing them, or supplying only one of
wannier_folder_up/wannier_folder_down, is rejected at submission time.
Each Wannier90 folder must contain either the aiida_tb.dat tight-binding file (write_tb=True in the
Wannier90 parameters), or both aiida_hr.dat and aiida_centres.xyz (write_hr=True and
write_xyz=True).
Supplying atomic positions¶
wann2J.py needs an atomic-structure/position source. There are three ways to give it one via
structure/use_wannier_structure:
Default — give
structureas aStructureData. It is converted and written out as aPOSCARfile, and also used to auto-derivekmeshfrom the unit cell dimensions whenkmeshis not given explicitly inparameters.Direct posfile — give
structureas aSinglefileDatacontaining any ASE-readable structure file. It is staged under its own filename and passed through towann2J.pyalmost verbatim as the posfile. Since the cell is not parsed out of the file,kmeshmust be given explicitly inparametersin this case.Wannier90 ``.win`` fallback — set
use_wannier_structure=True. No posfile is written at all; instead the Wannier90.winfile is copied out of the givenwannier_folder/wannier_folder_up, andwann2J.pyfalls back to reading atomic positions from it directly (an officially supported TB2J behaviour since v0.6.2, triggered whenever no readable file exists at the posfile path). This requires the upstreamWannier90Calculation’s retrieve settings to include the.wininput file, e.g.settings["additional_retrieve_list"] = ["*.win"]. AStructureDatamay still be given alongsideuse_wannier_structure=Truepurely to auto-derivekmesh; aSinglefileDatastructuremay not be combined withuse_wannier_structure=True, andkmeshmust be given explicitly wheneverstructureis absent or is not aStructureData.
Input ports¶
Port |
Type |
Required |
Description |
|---|---|---|---|
|
|
no |
Either a |
|
|
no (default |
If |
|
|
yes |
List of magnetic elements (chemical symbols) to consider. |
|
|
no |
|
|
|
no |
|
|
|
no |
|
|
|
no |
Optional parameters for the TB2J calculation, passed through as |
Metadata / resources¶
The number of MPI processes is derived from metadata.options.resources, which defaults to:
builder.metadata.options.resources = {
"num_machines": 1,
"num_mpiprocs_per_machine": 1,
}
parameters¶
Optional keys that are translated into wann2J.py command line flags. efermi is required – the
Fermi energy must always be supplied, either directly or (when using
WannierTB2JWorkChain) auto-filled from the preceding SCF calculation.
Key |
Type |
Description |
|---|---|---|
|
|
Required. The Fermi energy. |
|
|
The k-point mesh used for the Green’s function integration. If omitted, it is derived from
|
|
|
Target real-space supercell size (in Angstrom) used to derive |
|
|
Real-space cutoff radius for the exchange calculation. |
|
|
Lower energy bound for the contour integration. |
|
|
Upper energy bound for the contour integration. |
|
|
Cutoff used when truncating small exchange values. |
|
|
Number of energy points along the contour. |
|
|
Number of points for the complex energy contour. |
|
|
Batch size for energy-point processing. |
|
|
Cache intermediate Green’s function results to disk. |
|
|
Decompose the exchange parameters by orbital. |
|
|
Group orbitals by their \(\zeta\) quantum number. |
|
|
Write the density matrix. |
|
|
Use Lowdin-orthogonalised orbitals. |
|
|
Restrict the k-mesh to the irreducible Brillouin zone. |
|
|
Enable GPU acceleration, if supported by the |
|
|
Vectorise the energy-point loop. |
|
|
Smearing scheme used for the contour integration. |
|
|
Free-text description stored alongside the TB2J results. |
|
|
How exchange parameters are grouped; one of |
|
|
Orbital indices to exclude from the calculation. |
|
|
Atom indices to treat as magnetic, overriding automatic detection from |
|
|
Angles used for a magnetic anisotropy energy (MAE) scan. |
Any key not listed above is rejected as an unrecognised option.
Outputs¶
Output |
Type |
Description |
|---|---|---|
|
|
The |
Exit codes¶
Code |
Label |
Meaning |
|---|---|---|
|
|
The retrieved folder does not contain the |