Full docs for Interaction

Types

SpinModels.ConstantInteractionType
ConstantInteraction(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.

source
SpinModels.NNFunction
NN(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.

Note

This is not identical to NN(::SpinModels.Interaction) if the interaction is anisotropic.

source
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.

Note

This is not identical to NN(::SpinModels.Geometry) if the interaction is anisotropic.

source

Functions

SpinModels.interaction_matrixFunction
interaction_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.

source
SpinModels.nearest_neighbor_from_interactions!Function
nearest_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.

Note

The resulting matrix won't necessarily be symmetric if nearest neighbors are ill-defined. See also: nearest_neighbor_from_distances!

source