smithery.ai

tb2j

Guide for using TB2J command-line tools to calculate magnetic interaction parameters (J, DMI, etc.) from DFT outputs (Wannier90, Siesta, Abacus). Use this skill when the user asks about running TB2J commands, their parameters, inputs, or outputs.

First seen Mar 25, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,597 B
  • docs SUMMARY.md 258 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

TB2J Skill

This skill provides expert guidance on using the TB2J package to calculate magnetic interaction parameters (Heisenberg exchange $J$, DMI $D$, Anisotropy $J_{ani}$) from DFT inputs.

References

  • [Command Reference](references/commands.md): Detailed flags and arguments for all scripts (wann2J.py, siesta2J.py, etc.).
  • [Workflows & DFT Prep](references/workflows.md): Step-by-step guides for preparing VASP/Wannier90/Siesta inputs.
  • [Conventions](references/conventions.md): Vital information on Hamiltonian signs, units, and spin normalization.
  • [Outputs](references/outputs.md): Explanations of exchange.out, exchange.xml, and interfaces to Vampire/Multibinit.

Common Workflows

1. Wannier90 (VASP, QE, Abinit)

  • Command: wann2J.py
  • Key Step: Ensure projections in .win file cover magnetic orbitals.
  • See: [Workflows > Wannier90](references/workflows.md#1-wannier90-workflow-general)

2. Siesta

  • Command: siesta2J.py
  • Key Step: Set SaveHS True in .fdf.
  • See: [Workflows > Siesta](references/workflows.md#2-siesta-workflow)

3. Abacus

  • Command: abacus2J.py
  • Key Step: Set outmaths2 1 in INPUT.
  • See: [Workflows > Abacus](references/workflows.md#3-abacus-workflow)

4. Non-Collinear / Anisotropy

  • Option A: Full non-collinear DFT + wann2J.py --spinor.
  • Option B: "Rotate and Merge" using TB2Jrotate.py (generate structures) -> DFT -> TB2Jmerge.py (combine results).
  • See: [Workflows > Non-Collinear](references/workflows.md#4-non-collinear--spin-orbit-coupling-soc)

Troubleshooting / FAQ

  • Results contradict experiment?

Check [Conventions](references/conventions.md). Are you comparing $J$ vs $2J$? Verify the Fermi Energy (--efermi) matches the DFT calculation exactly. * Is the system metallic? Try increasing K-mesh or adjusting --nz.

  • Wannier functions not localized?

Check wannier90.wout for spreads. Adjust dis_win (outer window) to include all relevant bands. * Check projections.

  • "Orbitals not found" error?

Ensure --elements matches the atoms in the structure file. Check if exclude_orbs is needed for semi-core states.