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

spirit.geometry.BRAVAIS_LATTICE_BCC = 7

Body centered cubic

spirit.geometry.BRAVAIS_LATTICE_FCC = 8

Face centered cubic

spirit.geometry.BRAVAIS_LATTICE_HCP = 6

Hexagonal close packed

spirit.geometry.BRAVAIS_LATTICE_HEX2D = 3

Hexagonal (60deg)

spirit.geometry.BRAVAIS_LATTICE_HEX2D_120 = 5

Hexagonal (120deg)

spirit.geometry.BRAVAIS_LATTICE_HEX2D_60 = 4

Hexagonal (60deg)





spirit.geometry.BRAVAIS_LATTICE_SC = 2

Simple cubic

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 one of the pre-defined lattice types.

Note: Irregular, Rectilinear and HCP cannot be used.

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.