radtools.dipole_dipole_interaction#
- radtools.dipole_dipole_interaction(magnetic_centres1, magnetic_centres2, progress_bar=True, normalize=True)[source]#
Computes magnetic dipole-dipole interaction.
This function computes dipole-dipole interaction between two sets of magnetic centres (\(mc_1\) and \(mc_2\)):
\[E = -\frac{\mu_0}{4\pi}\sum_{i \in mc_1, j \in mc_2}\frac{1}{\vert r_{ij}\vert^3}\left(3(\vec{m_i} \cdot \vec{r_{ij}})(\vec{m_j} \cdot \vec{r_{ij}}) - (\vec{m_i}\cdot\vec{m_j})\right)\]- Parameters:
- magnetic_centres1: (N, 2, 3) |array_like|_
List of N magnetic centres of the first set. First element along second axis is magnetic moment (in Bohr magnetons). Second element along second axis if position (in Angstrom).
- magnetic_centres2: (M, 2, 3) |array_like|_
List of M magnetic centres of the second set. First element along second axis is magnetic moment (in Bohr magnetons). Second element along second axis if position (in Angstrom). Python cycle is running along this set.
- progress_barbool, default True
Whether to show progressbar.
- normalizebool, default True
Whether to normalize energy to the number of magnetic centres.
- Returns:
- energyfloat
Magnetic dipole-dipole interaction between
magnetic_centres1andmagnetic_centres2. Normalized to \(N\cdot M\).
See also
dipole_dipole_energywithin one set of magnetic centres.