wulfric.Cell.from_params#

wulfric.Cell.from_params(a=1.0, b=1.0, c=1.0, alpha=90.0, beta=90.0, gamma=90.0)#

Construct cell from lattice parameters.

  • Lattice vector \(\boldsymbol{a_1}\) has the length a and oriented along \({\cal x}\) axis.

  • Lattice vector \(\boldsymbol{a_2}\) has the length b and is placed in \({\cal xy}\) plane and form an angle gamma with vector \(\boldsymbol{a_1}\), positive in a mathematical sense.

  • Lattice vector \(\boldsymbol{a_3}\) has the length c and form an angle alpha with the vector \(\boldsymbol{a_2}\) and an angle beta with the vector \(\boldsymbol{a_1}\).

Parameters:
afloat, default 1

Length of the \(\boldsymbol{a_1}\) vector.

bfloat, default 1

Length of the \(\boldsymbol{a_2}\) vector.

cfloat, default 1

Length of the \(\boldsymbol{a_3}\) vector.

alphafloat, default 90

Angle between vectors \(\boldsymbol{a_2}\) and \(\boldsymbol{a_3}\). In degrees.

betafloat, default 90

Angle between vectors \(\boldsymbol{a_1}\) and \(\boldsymbol{a_3}\). In degrees.

gammafloat, default 90

Angle between vectors \(\boldsymbol{a_1}\) and \(\boldsymbol{a_2}\). In degrees.

Returns:
cell(3, 3) numpy.ndarray

Cell matrix.

cell = [[a1_x, a1_y, a1_z],
        [a2_x, a2_y, a2_z],
        [a3_x, a3_y, a3_z]]
Raises:
ValueError

If parameters could not form a parallelepiped.

See also

parallelepiped_check

Check if parameters could form a parallelepiped.