wulfric.cell.get_reciprocal#
- wulfric.cell.get_reciprocal(cell)[source]#
Computes reciprocal cell.
- Parameters:
- cell(3, 3) array-like
Matrix of a direct cell, rows are interpreted as vectors.
- Returns:
- reciprocal_cell(3, 3) numpy.ndarray
Matrix of a reciprocal cell.
cell = [ [b1_x, b1_y, b1_z], [b2_x, b2_y, b2_z], [b3_x, b3_y, b3_z], ]
Examples
>>> import wulfric >>> cell = [[1, 1, 0], [0, 1, 0], [0, 0, 1]] >>> wulfric.cell.get_reciprocal(cell) array([[ 6.28318531, 0. , 0. ], [-6.28318531, 6.28318531, 0. ], [ 0. , 0. , 6.28318531]])