wulfric.cell.is_reasonable#
- wulfric.cell.is_reasonable(cell, eps_lengths=1e-10, eps_volume=1e-05)[source]#
Check if the cell is reasonable (not degenerate) as defined in [1].
The sell is degenerate if
The minimum of the cell lengths divided by the maximum of the cell lengths is smaller than a certain factor \(\varepsilon_{lengths}\).
The unit-cell volume divided by the minimum of the cell lengths is smaller than a certain factor \(\varepsilon_{volume}\).
The cell is reasonable if it is not degenerate.
- Parameters:
- cell(3, 3) array-like
Matrix of a cell, rows are interpreted as vectors.
- eps_lengthsfloat, default 1e-10
Default value of \(\varepsilon_{lengths}\).
- eps_volumefloat, default 1e-5
Default value of \(\varepsilon_{volume}\).
- Returns:
- reasonablebool
Trueif the cell is reasonable,Falseif cell is degenerate.
References
[1]Grosse-Kunstleve, R.W., Sauter, N.K. and Adams, P.D., 2004. Numerically stable algorithms for the computation of reduced unit cells. Acta Crystallographica Section A: Foundations of Crystallography, 60(1), pp.1-6.