Full docs for Interaction
Types
SpinModels.ConstantInteraction
— TypeConstantInteraction(value)
Represents a simple constant valued interaction.
There are quality of life overloads, that removes the need to use ConstantInteraction(1)(geometry)
such that you can simply use the geometry like an interaction matrix in most scenarios. Please complain if this produces unintuitive behavior.
SpinModels.PowerLaw
— TypePowerLaw(α)
Represents couplings decaying as $|x_i-x_j|^{-\alpha}$
SpinModels.NN
— MethodNN(interaction, k=1)
Modify the interaction to only keep the k
strongest couplings from each spin. Please see nearest_neighbor_from_interactions!
for further information.
This is not identical to NN(::SpinModels.Geometry)
if the interaction is anisotropic.
SpinModels.NN
— FunctionNN(geometry, k=1)
Modify the geometry to only keep the k
closest connections from each spin. Please see nearest_neighbor_from_distances!
for further information.
This is not identical to NN(::SpinModels.Interaction)
if the interaction is anisotropic.
NN(interaction, k=1)
Modify the interaction to only keep the k
strongest couplings from each spin. Please see nearest_neighbor_from_interactions!
for further information.
This is not identical to NN(::SpinModels.Geometry)
if the interaction is anisotropic.
Functions
SpinModels.interaction_matrix
— Functioninteraction_matrix(interaction, geometry[, positions]; rng)
(::Interaction)(geometry[, positions]; rng)
Compute the corresponding interaction matrix from interaction
and geometry
. Positions are generated by the geometry
via positions
or provided directly. Disordered geometries allow for setting an RNG
.
SpinModels.nearest_neighbor_from_interactions
— Functionnearest_neighbor_from_interactions(interaction_matrix, k=1)
Non-destructive form of nearest_neighbor_from_interactions!
. See also: nearest_neighbor_from_distances!
SpinModels.nearest_neighbor_from_interactions!
— Functionnearest_neighbor_from_interactions!(interaction_matrix, k=1)
Set all but the k
strongest couplings from each column to 0
. k
only counts different values! Thus k=1
keeps only the strongest couplings per spin but allows to have the same value multiple times.
The resulting matrix won't necessarily be symmetric if nearest neighbors are ill-defined. See also: nearest_neighbor_from_distances!