convert_cell_representation

mdcraft.algorithm.topology.convert_cell_representation(*, parameters: ndarray[float] = None, vectors: ndarray[float] = None) ndarray[float][source]

Converts between crystallographic lattice parameters and triclinic box vectors.

Parameters:
parametersarray-like, optional

Lattice parameters \((a,\,b,\,c,\,\alpha,\,\beta,\,\gamma)\).

Shape: \((6,)\).

Reference unit: \(\mathrm{nm}\) (lengths) and \(^\circ\) (angles).

vectorsarray-like, optional

Box vectors \(\mathbf{a}\), \(\mathbf{b}\), and \(\mathbf{c}\), provided as rows in a matrix, in their reduced forms:

\[\begin{split}\begin{align*} \mathbf{a} &= (a_x,\,0,\,0) \\ \mathbf{b} &= (b_x,\,b_y,\,0) \\ \mathbf{c} &= (c_x,\,c_y,\,c_z) \end{align*} \quad\mathrm{where}\quad a_x>0,\,b_y>0,\,c_z>0,\, a_x\geq2|b_x|,\,a_x\geq2|c_x|,\,b_y\geq2|c_y|\end{split}\]

Shape: \((3,\,3)\).

Reference unit: \(\mathrm{nm}\).

Returns:
representationnumpy.ndarray

Lattice parameters or box vectors.