Periodic Info

Class holding periodic cell information.

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

Bases: object

Periodic cell information for periodic systems.

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.

__init__(vector_1, vector_2, vector_3)[source]

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

References

1

https://pymatgen.org/_modules/pymatgen/core/lattice.html

clone()[source]

Return a clone.

Return type

PeriodicInfo

Returns

The clone.

get_a()[source]

Get a length.

Return type

float

Returns

Length of cell along a direction in Angstrom.

get_alpha()[source]

Get alpha angle.

Return type

float

Returns

Alpha angle of cell in degrees.

get_b()[source]

Get b length.

Return type

float

Returns

Length of cell along b direction in Angstrom.

get_beta()[source]

Get beta angle.

Return type

float

Returns

Beta angle of cell in degrees.

get_c()[source]

Get c length.

Return type

float

Returns

Length of cell along c direction in Angstrom.

get_cell_matrix()[source]

Get cell matrix.

Return type

tuple[ndarray, ndarray, ndarray]

Returns

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

get_gamma()[source]

Get gamma angle.

Return type

float

Returns

Gamma angle of cell in degrees.

get_vector_1()[source]

Get x vector.

Return type

ndarray

Returns

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

get_vector_2()[source]

Get y vector.

Return type

ndarray

Returns

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

get_vector_3()[source]

Get z vector.

Return type

ndarray

Returns

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