Full docs for Geometry
Types
SpinModels.Chain
— TypeChain(L; spacing=1)
Represents a 1D chain of L
spins with regular spacing
. Spins are at $x_i = spacing*i$
SpinModels.Box
— TypeBox(N, dims)
Represents a box with side-lengths given by dims
. N
spins are randomly positioned within that box.
SpinModels.NoisyChain
— TypeNoisyChain(L, σ; spacing=1)
Represents a 1D chain of L
spins with random noise on top of regular spaced positions. Spins are at $x_i = spacing*i + \delta$ where $\delta \sim \mathcal{U}([-\frac{\sigma}{2},\frac{\sigma}{2}])$
SpinModels.PartiallyFilledChain
— TypePartiallyFilledChain(numspins, numsites; spacing=1)
Represents a 1D chain of L
sites where N
spins are placed randomly. Sites are spacing
units apart.
SpinModels.Blockaded
— TypeBlockaded(geometry; retries=1000, blockade=1.0)
Modifies the underlying geometry
to respect the blockade condition namely all spins need to be at least blockade
units apart. Positions are resampled at most retries
times.
If you set retries=0
, resampling will not stop until a valid configuration is found.
SpinModels.PBC
— TypePBC(geometry)
Modify the underlying geometry
to respect periodic boundary conditions.
SpinModels.NN
— MethodNN(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.
Functions
SpinModels.nspins
— Functionnspins(term)
nspins(sum_of_terms)
Return the number of spins in the underlying geometry if that information was already provided.
nspins(geometry)
Return number of spins the geometry
.
SpinModels.positions
— Functionpositions(geometry)
positions(geometry; rng)
Generate the positions of the spin in the geometry
. Disordered geometries allow for setting an RNG
.
SpinModels.distance_matrix
— Functiondistance_matrix(geometry[, positions]; rng)
Compute the spin-spin distances. Positions are generated by the geometry
via positions
or provided directly. Disordered geometries allow for setting an RNG
.
SpinModels.nearest_neighbor_from_distances
— Functionnearest_neighbor_from_distances(distance_matrix, k=1)
Non-destructive form of nearest_neighbor_from_distances!
. See also: nearest_neighbor_from_interactions!
SpinModels.nearest_neighbor_from_distances!
— Functionnearest_neighbor_from_distances!(distance_matrix, k=1)
Set all but the k
smallest distances from each column to Inf
. k
only counts different values! Thus k=1
keeps only the closest distance per spin but allows to have the same distance multiple times.
The distance to itself is always ignored.
The resulting matrix won't necessarily be symmetric if nearest neighbors are ill-defined. See also: nearest_neighbor_from_interactions!