magnon.lattice

Functions

cartesian_k_from_scaled(k_scaled, ...)

Convert scaled k-vector(s) to Cartesian k-vector(s) using reciprocal lattice vectors.

scaled_k_from_cartesian(k_cartesian, recip_lattice_vectors)

Given one or more Cartesian k vector(s), return the scaled k vector(s)

reciprocal_lattice(lattice)

Compute reciprocal lattice basis vectors from lattice vectors

unit_spin_model_factors(spin_quantum_numbers, ...)

Compute the Hamiltonian conversion factors for couplings from the unit spin model, or return 1s if model not in use

Module Contents

magnon.lattice.cartesian_k_from_scaled(k_scaled, reciprocal_lattice_vectors)

Convert scaled k-vector(s) to Cartesian k-vector(s) using reciprocal lattice vectors.

Parameters:
  • k_scaled (ndarray) – Array of one or more k-vectors in scaled coordinates

  • reciprocal_lattice_vectors (ndarray) – Reciprocal lattice vectors, as rows

Return type:

Array of k-vectors in Cartesian coordinates

magnon.lattice.scaled_k_from_cartesian(k_cartesian, recip_lattice_vectors)

Given one or more Cartesian k vector(s), return the scaled k vector(s)

Parameters:
  • k_cartesian (ndarray) – Array of one or more k-vectors in Cartesian coordinates

  • recip_lattice_vectors (ndarray) – Reciprocal lattice vectors, as rows

Return type:

Array of k-vectors in scaled coordinates

magnon.lattice.reciprocal_lattice(lattice)

Compute reciprocal lattice basis vectors from lattice vectors

Parameters:

lattice (ndarray) – Array of lattice basis vectors, where each row is a basis vector

Returns:

recip_lattice – Reciprocal lattice basis vectors, where each row is a basis vector

Return type:

ndarray

magnon.lattice.unit_spin_model_factors(spin_quantum_numbers, spins_are_unit)

Compute the Hamiltonian conversion factors for couplings from the unit spin model, or return 1s if model not in use

Parameters:
  • spin_quantum_numbers (ndarray) – 1D array of spin quantum numbers

  • spins_are_unit (bool) – Whether the unit spin model is being used

Returns:

  • spin_quantum_numbers (ndarray) – 1D array of the spin quantum numbers to use under the chosen model

  • factors (ndarray) – 1D array of factors to apply to each element of the Hamiltonian for compatibility with the chosen model

Notes

Some codes use unit spins rather than dimensionful spins whose magnitude is determined by the magnetic moment. The choice of model changes the definition of the exchange coupling constants. To enable compatibility with exchange coupling values from dimensionless spin models, this function may be used to apply an elementwise conversion along both axes of a linear spin wave Hamiltonian. The spin quantum numbers are set to 1, and the conversion along the atom index axis is returned.