Attributes¶
Pyniggli is a very simple code. It doesn’t take very many arguments and uses only a handful of functions. For examples of how to use the code to reduce a cell see :doc: examples.
Contains the main class and functions for the niggli reduced cell. As described in the papers found at:
Author: Wiley S. Morgan 2017
-
class
pyniggli.niggli.reduced_cell(A, eps=None)[source]¶ This class contains the methods necessary to reduce a lattice to it’s niggli reduced cell.
-
original¶ numpy ndarray – The original cell vectors.
-
niggli¶ numpy ndarray – The niggli reduced cell vectors.
-
C¶ numpy ndarray – The transformation matrix to transform from the original to the niggli cell (O’ = O C).
-
volume¶ float – The volume of the cell.
Examples
The following examples show how to generate a niggli reduced cell.
>>> import numpy an np >>> from pyniggli.niggli import reduced_cell >>> A = np.transpase([[0.5,0,0.5],[0,3,0],[0.5,0,-0.5]]) >>> B = reduced_cell(A) >>> print(np.transpose(B.C)) array([[-0.5,0,-0.5],[-0.5,0,0.5],[0,-3,0]])
-