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
aand oriented along \({\cal x}\) axis.Lattice vector \(\boldsymbol{a_2}\) has the length
band is placed in \({\cal xy}\) plane and form an anglegammawith vector \(\boldsymbol{a_1}\), positive in a mathematical sense.Lattice vector \(\boldsymbol{a_3}\) has the length
cand form an anglealphawith the vector \(\boldsymbol{a_2}\) and an anglebetawith 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_checkCheck if parameters could form a parallelepiped.