Quantities

spirit.quantities.get_magnetization(p_state, idx_image=-1, idx_chain=-1)

Calculates and returns the average magnetization of the system as an array of shape(3).

spirit.quantities.get_mmf_info(p_state, idx_image=-1, idx_chain=-1)

Returns a set of MMF information, meant mostly for testing or debugging.

  • numpy.array_view of shape(NOS, 3) of the energy gradient
  • the lowest eigenvalue
  • numpy.array_view of shape(NOS, 3) of the eigenmode
  • numpy.array_view of shape(NOS, 3) of the force
spirit.quantities.get_topological_charge(p_state, idx_image=-1, idx_chain=-1)

Calculates and returns the total topological charge of 2D systems.

Note that the charge can take unphysical non-integer values for open boundaries, because it is not well-defined in this case.

Returns 0 for systems of other dimensionality.

spirit.quantities.get_topological_charge_density(p_state, idx_image=-1, idx_chain=-1)

Calculates the topological charge density of a 2D system and returns it as an array, together with an array of three indices that define the triangle for which the respective charge density was calculated.

Note that the charge can take unphysical non-integer values for open boundaries, because it is not well-defined in this case.

Returns [], [] for systems of other dimensionality.