stk.PeriodicInfo

class stk.PeriodicInfo(vector_1, vector_2, vector_3)[source]

Bases: object

Periodic cell information for periodic systems.

Initialize a PeriodicInfo instance.

Converts cell matrix to lengths and angles, where lengths are in Angstrom and angles are in degrees. This code is modified from the pymatgen source code [1].

Parameters:
  • vector_1 (np.ndarray) – First cell lattice vector of shape (3, ) in Angstrom.

  • vector_2 (np.ndarray) – Second cell lattice vector of shape (3, ) in Angstrom.

  • vector_3 (np.ndarray) – Third cell lattice vector of shape (3, ) in Angstrom.

References

Methods

clone

Return a clone.

get_a

Get a length.

get_alpha

Get alpha angle.

get_b

Get b length.

get_beta

Get beta angle.

get_c

Get c length.

get_cell_matrix

Get cell matrix.

get_gamma

Get gamma angle.

get_vector_1

Get x vector.

get_vector_2

Get y vector.

get_vector_3

Get z vector.

clone()[source]

Return a clone.

Returns:

The clone.

Return type:

PeriodicInfo

get_a()[source]

Get a length.

Returns:

Length of cell along a direction in Angstrom.

Return type:

float

get_alpha()[source]

Get alpha angle.

Returns:

Alpha angle of cell in degrees.

Return type:

float

get_b()[source]

Get b length.

Returns:

Length of cell along b direction in Angstrom.

Return type:

float

get_beta()[source]

Get beta angle.

Returns:

Beta angle of cell in degrees.

Return type:

float

get_c()[source]

Get c length.

Returns:

Length of cell along c direction in Angstrom.

Return type:

float

get_cell_matrix()[source]

Get cell matrix.

Returns:

Tuple of length three containing x, y and z direction lattice vector of shape (3, ) in Angstrom.

Return type:

tuple[ndarray, ndarray, ndarray]

get_gamma()[source]

Get gamma angle.

Returns:

Gamma angle of cell in degrees.

Return type:

float

get_vector_1()[source]

Get x vector.

Returns:

Cell lattice vector of shape (3, ) in x direction in Angstrom.

Return type:

ndarray

get_vector_2()[source]

Get y vector.

Returns:

Cell lattice vector of shape (3, ) in y direction in Angstrom.

Return type:

ndarray

get_vector_3()[source]

Get z vector.

Returns:

Cell lattice vector of shape (3, ) in z direction in Angstrom.

Return type:

ndarray