Configurations

#include "Spirit/Configurations.h"

Setting spin configurations for individual spin systems.

The position of the relative center and a set of conditions can be defined.

Clipboard

void Configuration_To_Clipboard(State *state, int idx_image = -1, int idx_chain = -1)

Copies the current spin configuration to the clipboard.

void Configuration_From_Clipboard(State *state, const scalar position[3] = defaultPos, const scalar r_cut_rectangular[3] = defaultRect, scalar r_cut_cylindrical = -1, scalar r_cut_spherical = -1, bool inverted = false, int idx_image = -1, int idx_chain = -1)

Pastes the clipboard spin configuration.

bool Configuration_From_Clipboard_Shift(State *state, const scalar shift[3], const scalar position[3] = defaultPos, const scalar r_cut_rectangular[3] = defaultRect, scalar r_cut_cylindrical = -1, scalar r_cut_spherical = -1, bool inverted = false, int idx_image = -1, int idx_chain = -1)

Pastes the clipboard spin configuration.

Nonlocalised

void Configuration_Domain(State *state, const scalar direction[3], const scalar position[3] = defaultPos, const scalar r_cut_rectangular[3] = defaultRect, scalar r_cut_cylindrical = -1, scalar r_cut_spherical = -1, bool inverted = false, int idx_image = -1, int idx_chain = -1)

Creates a homogeneous domain.

void Configuration_PlusZ(State *state, const scalar position[3] = defaultPos, const scalar r_cut_rectangular[3] = defaultRect, scalar r_cut_cylindrical = -1, scalar r_cut_spherical = -1, bool inverted = false, int idx_image = -1, int idx_chain = -1)

Points all spins in +z direction.

void Configuration_MinusZ(State *state, const scalar position[3] = defaultPos, const scalar r_cut_rectangular[3] = defaultRect, scalar r_cut_cylindrical = -1, scalar r_cut_spherical = -1, bool inverted = false, int idx_image = -1, int idx_chain = -1)

Points all spins in -z direction.

void Configuration_Random(State *state, const scalar position[3] = defaultPos, const scalar r_cut_rectangular[3] = defaultRect, scalar r_cut_cylindrical = -1, scalar r_cut_spherical = -1, bool inverted = false, bool external = false, int idx_image = -1, int idx_chain = -1)

Points all spins in random directions.

void Configuration_SpinSpiral(State *state, const char *direction_type, scalar q[3], scalar axis[3], scalar theta, const scalar position[3] = defaultPos, const scalar r_cut_rectangular[3] = defaultRect, scalar r_cut_cylindrical = -1, scalar r_cut_spherical = -1, bool inverted = false, int idx_image = -1, int idx_chain = -1)

Spin spiral.

void Configuration_SpinSpiral_2q(State *state, const char *direction_type, scalar q1[3], scalar q2[3], scalar axis[3], scalar theta, const scalar position[3] = defaultPos, const scalar r_cut_rectangular[3] = defaultRect, scalar r_cut_cylindrical = -1, scalar r_cut_spherical = -1, bool inverted = false, int idx_image = -1, int idx_chain = -1)

2q spin spiral

Perturbations

void Configuration_Add_Noise_Temperature(State *state, scalar temperature, const scalar position[3] = defaultPos, const scalar r_cut_rectangular[3] = defaultRect, scalar r_cut_cylindrical = -1, scalar r_cut_spherical = -1, bool inverted = false, int idx_image = -1, int idx_chain = -1)

Adds some random noise scaled by temperature.

void Configuration_Displace_Eigenmode(State *state, int idx_mode, int idx_image = -1, int idx_chain = -1)

Calculate the eigenmodes of the system (Image)

Localised

void Configuration_Skyrmion(State *state, scalar r, scalar order, scalar phase, bool upDown, bool achiral, bool rl, const scalar position[3] = defaultPos, const scalar r_cut_rectangular[3] = defaultRect, scalar r_cut_cylindrical = -1, scalar r_cut_spherical = -1, bool inverted = false, int idx_image = -1, int idx_chain = -1)

Create a skyrmion configuration.

void Configuration_DW_Skyrmion(State *state, scalar dw_radius, scalar dw_width, scalar order, scalar phase, bool upDown, bool achiral, bool rl, const scalar position[3] = defaultPos, const scalar r_cut_rectangular[3] = defaultRect, scalar r_cut_cylindrical = -1, scalar r_cut_spherical = -1, bool inverted = false, int idx_image = -1, int idx_chain = -1)

Create a skyrmion configuration with the circular domain wall (“swiss knife”) profile.

void Configuration_Hopfion(State *state, scalar r, int order = 1, const scalar position[3] = defaultPos, const scalar r_cut_rectangular[3] = defaultRect, scalar r_cut_cylindrical = -1, scalar r_cut_spherical = -1, bool inverted = false, const scalar normal[3] = defaultNormal, int idx_image = -1, int idx_chain = -1)

Create a toroidal Hopfion.

Pinning and atom types

This API can also be used to change the pinned state and the atom type of atoms in a spacial region, instead of using translation indices.

void Configuration_Set_Pinned(State *state, bool pinned, const scalar position[3] = defaultPos, const scalar r_cut_rectangular[3] = defaultRect, scalar r_cut_cylindrical = -1, scalar r_cut_spherical = -1, bool inverted = false, int idx_image = -1, int idx_chain = -1)

Pinning.

void Configuration_Set_Atom_Type(State *state, int type, const scalar position[3] = defaultPos, const scalar r_cut_rectangular[3] = defaultRect, scalar r_cut_cylindrical = -1, scalar r_cut_spherical = -1, bool inverted = false, int idx_image = -1, int idx_chain = -1)

Atom types.

Default Values

scalar const defaultPos[3] = {0, 0, 0}

The default center position: the center of the system.

scalar const defaultRect[3] = {-1, -1, -1}

The default rectangular condition: none

-1 means that no condition is applied

scalar const defaultNormal[3] = {0, 0, 1}

The default normal for planar configurations. For now only used in the toroidal Hopfion.