Smithery Logo
MCPsSkillsDocsPricing
Login
Smithery Logo

Accelerating the Agent Economy

Resources

DocumentationPrivacy PolicySystem Status

Company

PricingAboutBlog

Connect

© 2026 Smithery. All rights reserved.

    mailhexu

    tb2j

    mailhexu/tb2j
    Data & Analytics
    91

    About

    SKILL.md

    Install

    Install via Skills CLI

    or add to your agent
    • Claude Code
      Claude Code
    • Codex
      Codex
    • OpenClaw
      OpenClaw
    • Cursor
      Cursor
    • Amp
      Amp
    • GitHub Copilot
      GitHub Copilot
    • Gemini CLI
      Gemini CLI
    • Kilo Code
      Kilo Code
    • Junie
      Junie
    • Replit
      Replit
    • Windsurf
      Windsurf
    • Cline
      Cline
    • Continue
      Continue
    • OpenCode
      OpenCode
    • OpenHands
      OpenHands
    • Roo Code
      Roo Code
    • Augment
      Augment
    • Goose
      Goose
    • Trae
      Trae
    • Zencoder
      Zencoder
    • Antigravity
      Antigravity
    ├─
    ├─
    └─

    About

    Guide for using TB2J command-line tools to calculate magnetic interaction parameters (J, DMI, etc.) from DFT outputs (Wannier90, Siesta, Abacus)...

    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: Detailed flags and arguments for all scripts (wann2J.py, siesta2J.py, etc.).
    • Workflows & DFT Prep: Step-by-step guides for preparing VASP/Wannier90/Siesta inputs.
    • Conventions: Vital information on Hamiltonian signs, units, and spin normalization.
    • Outputs: 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

    2. Siesta

    • Command: siesta2J.py
    • Key Step: Set SaveHS True in .fdf.
    • See: Workflows > Siesta

    3. Abacus

    • Command: abacus2J.py
    • Key Step: Set out_mat_hs2 1 in INPUT.
    • See: Workflows > Abacus

    4. Non-Collinear / Anisotropy

    • Option A: Full non-collinear DFT + wann2J.py --spinor.
    • Option B: "Rotate and Merge" using TB2J_rotate.py (generate structures) -> DFT -> TB2J_merge.py (combine results).
    • See: Workflows > Non-Collinear

    Troubleshooting / FAQ

    • Results contradict experiment?

      • Check Conventions. 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.
    Recommended Servers
    Browser tool
    Browser tool
    Draw.io
    Draw.io
    Svelte
    Svelte
    Repository
    mailhexu/tb2j
    Files