The exchange_map moduleď
The `exchange_map` module provides the core functionality for mapping and calculating magnetic exchange interactions between atoms in a crystal structure.
Overview:
The exchange mapping process:
Reads the lattice structure from
lattice.nmlIdentifies all atomic neighbors within the specified cutoff distance
Calculates exchange interaction strengths (J_ij values)
Optionally selects exact periodic-symmetry representatives
Applies conservative axial-vector filtering when
--socis usedGenerates output files suitable for spin dynamics simulations
Key Parameters:
cutoff: Maximum distance (in lattice units) for considering exchange interactions
unique: If
True, identifies one representative per exact periodic pair orbitshell_width: Retained for compatibility; it does not define pair equivalence
soc: If
True, applies the documented legacy collinear +z magnetic-reference policy
Functions:
Example Usage:
from rsutil.exchange.exchange_map import exchange_map
# Standard calculation: all neighbors up to 2.5 lattice units
exchange_map(cutoff=2.5)
# Advanced: find exact periodic-symmetry representatives
exchange_map(
cutoff=3.0,
unique=True,
shell_width=0.1 # Accepted for legacy compatibility only
)
# With spin-orbit coupling considerations
exchange_map(
cutoff=2.5,
soc=True # Use the conservative legacy +z reference policy
)
Output:
The module generates exchange interaction files in formats compatible with:
RS-LMTO-ASA simulations
UppASD (Uppsala Atomistic Spin Dynamics)
Other spin dynamics packages