stko.UnitCell

class stko.UnitCell(vector_1, vector_2, vector_3)[source]

Bases: PeriodicInfo

Unit cell information for periodic systems.

We are aware that this naming choice may not be appropriate (because not all inputs will be unit cells, strictly). However, for backwards compatability, we have not changed this naming.

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.

with_cell_from_cif

Update cell from structure in CIF.

with_cell_from_turbomole

Update cell from structure in Turbomole coord file.

with_cell_from_vectors

Update cell.

Parameters:
  • vector_1 (np.ndarray)

  • vector_2 (np.ndarray)

  • vector_3 (np.ndarray)

clone()

Return a clone.

Returns:

The clone.

Return type:

PeriodicInfo

get_a()

Get a length.

Returns:

Length of cell along a direction in Angstrom.

Return type:

float

get_alpha()

Get alpha angle.

Returns:

Alpha angle of cell in degrees.

Return type:

float

get_b()

Get b length.

Returns:

Length of cell along b direction in Angstrom.

Return type:

float

get_beta()

Get beta angle.

Returns:

Beta angle of cell in degrees.

Return type:

float

get_c()

Get c length.

Returns:

Length of cell along c direction in Angstrom.

Return type:

float

get_cell_matrix()

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()

Get gamma angle.

Returns:

Gamma angle of cell in degrees.

Return type:

float

get_vector_1()

Get x vector.

Returns:

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

Return type:

ndarray

get_vector_2()

Get y vector.

Returns:

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

Return type:

ndarray

get_vector_3()

Get z vector.

Returns:

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

Return type:

ndarray

with_cell_from_cif(filename)[source]

Update cell from structure in CIF.

Returns:

Clone with updated cell parameters.

Parameters:

filename (Path | str)

Return type:

Self

with_cell_from_turbomole(filename)[source]

Update cell from structure in Turbomole coord file.

Returns:

Clone with updated cell parameters.

Parameters:

filename (Path | str)

Return type:

Self

with_cell_from_vectors(vector_1, vector_2, vector_3)[source]

Update cell.

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

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

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

Returns:

Clone with updated cell parameters.

Return type:

Self