Change or get info on the current geometrical configuration, e.g. number of cells in the three crystal translation directions.

spirit.geometry.get_atom_types(p_state, idx_image=-1, idx_chain=-1)

Get the types of all atoms as a numpy.array_view of shape (NOS).

If e.g. disorder is activated, this allows to view and manipulate the types of individual atoms.

spirit.geometry.get_bounds(p_state, idx_image=-1, idx_chain=-1)

Get the bounds of the system in global coordinates.

Returns two arrays of shape (3) containing minimum and maximum bounds respectively.

spirit.geometry.get_bravais_lattice_type(p_state, idx_image=-1, idx_chain=-1)

Get the bravais lattice type corresponding to one of the integers defined above.

spirit.geometry.get_bravais_vectors(p_state, idx_image=-1, idx_chain=-1)

Get the Bravais vectors.

Returns three arrays of shape (3).

spirit.geometry.get_center(p_state, idx_image=-1, idx_chain=-1)

Get the center of the system in global coordinates.

Returns an array of shape (3).

spirit.geometry.get_dimensionality(p_state, idx_image=-1, idx_chain=-1)

Get the dimensionality of the geometry.

spirit.geometry.get_n_cell_atoms(p_state, idx_image=-1, idx_chain=-1)

Get the number of atoms in the basis cell.

spirit.geometry.get_n_cells(p_state, idx_image=-1, idx_chain=-1)

Get the number of basis cells along the three bravais vectors.

Returns an array of shape (3).

spirit.geometry.get_positions(p_state, idx_image=-1, idx_chain=-1)

Returns a numpy.array_view of shape (NOS, 3) with the components of each spins position.

Changing the contents of this array_view will have direct effect on the state and should not be done.

spirit.geometry.set_bravais_lattice_type(p_state, lattice_type, idx_image=-1, idx_chain=-1)

Set the bravais vectors to a pre-defined lattice type:

  • sc: simple cubic
  • bcc: body centered cubic
  • fcc: face centered cubic
  • hex2d: hexagonal (120deg)
  • hed2d120: hexagonal (120deg)
  • hex2d60: hexagonal (60deg)
spirit.geometry.set_bravais_vectors(p_state, ta=[1.0, 0.0, 0.0], tb=[0.0, 1.0, 0.0], tc=[0.0, 0.0, 1.0], idx_image=-1, idx_chain=-1)

Manually specify the bravais vectors.

spirit.geometry.set_cell_atom_types(p_state, atom_types, idx_image=-1, idx_chain=-1)

Set the atom types of the atoms in the basis cell.

spirit.geometry.set_lattice_constant(p_state, lattice_constant, idx_image=-1, idx_chain=-1)

Set the global lattice scaling constant.

spirit.geometry.set_mu_s(p_state, mu_s, idx_image=-1, idx_chain=-1)

Set the magnetic moment of all atoms.

spirit.geometry.set_n_cells(p_state, n_cells=[1, 1, 1], idx_image=-1, idx_chain=-1)

Set the number of basis cells along the three bravais vectors.