xzli.jecp.unitcell
Class NiggliMatrix

java.lang.Object
  |
  +--xzli.jecp.unitcell.NiggliMatrix

public class NiggliMatrix
extends java.lang.Object

Implemention of Niggli reduction and lattice symmetry search alogrithms. This is the core of JECP/UNITCELL.

See Also:
ReducedCellGUI.java, LatticeSymmetryGUI.java

Field Summary
 double a
          The lattice parameter of a primitive cell
 double A
          The component of Niggli matrix
 double alpha
          The lattice parameter of a primitive cell
 double b
          The lattice parameter of a primitive cell
 double B
          The component of Niggli matrix
 double beta
          The lattice parameter of a primitive cell
 double c
          The lattice parameter of a primitive cell
 double C
          The component of Niggli matrix
 double D
          The component of Niggli matrix
 double E
          The component of Niggli matrix
 double F
          The component of Niggli matrix
 double gamma
          The lattice parameter of a primitive cell
 
Constructor Summary
NiggliMatrix()
           
 
Method Summary
static void main(java.lang.String[] args)
          Main function for testing
 void NiggliMatrix()
          Constructor: It should be used together with setNiggliMatrix method
 void NiggliMatrix(double s11, double s22, double s33, double s12, double s23, double s31)
          Constructor: To create an instrance with the components of a Niggli matrix
 boolean reduce()
          Niggli cell reduction algorithm: A Unified Algorithm for Determining the Reduced (Niggli) Cell.
 java.util.ArrayList searchLatticeSymmetry()
          Procedure for identification of lattice symmetry: Cell Reduction and Lattice Symmetry Determination.
 java.util.ArrayList searchLatticeSymmetry(java.io.PrintWriter pw)
          Procedure for identification of lattice symmetry: Cell Reduction and Lattice Symmetry Determination.
 void setCellParameters()
          Get cell paramters from Niggli Matrix
 void setNiggliMatrix(double a, double b, double c, double aphla, double beta, double gamma)
          To set up a NiggliMatrix instance with lattice parameters.
 void setTolerance(double t)
          A tolerance parameter t means if|A-B|
 void showConventionalCell(java.util.ArrayList list, int v1, int v2, int v3)
          To transform conventional cell of Bravais lattice and print the conventional cell on monitor.
 void showConventionalCell(java.io.PrintWriter pw, java.util.ArrayList list, int v1, int v2, int v3)
          To transform conventional cell of Bravais lattice and write to a given output stream.
 void showNiggliMatrix()
          To print Niggli matrix on monitor.
 void showPrimitiveCell()
          To print lattice parameters on monitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

A

public double A
The component of Niggli matrix


B

public double B
The component of Niggli matrix


C

public double C
The component of Niggli matrix


D

public double D
The component of Niggli matrix


E

public double E
The component of Niggli matrix


F

public double F
The component of Niggli matrix


a

public double a
The lattice parameter of a primitive cell


b

public double b
The lattice parameter of a primitive cell


c

public double c
The lattice parameter of a primitive cell


alpha

public double alpha
The lattice parameter of a primitive cell


beta

public double beta
The lattice parameter of a primitive cell


gamma

public double gamma
The lattice parameter of a primitive cell

Constructor Detail

NiggliMatrix

public NiggliMatrix()
Method Detail

NiggliMatrix

public void NiggliMatrix()
Constructor: It should be used together with setNiggliMatrix method


NiggliMatrix

public void NiggliMatrix(double s11,
                         double s22,
                         double s33,
                         double s12,
                         double s23,
                         double s31)
Constructor: To create an instrance with the components of a Niggli matrix


setNiggliMatrix

public void setNiggliMatrix(double a,
                            double b,
                            double c,
                            double aphla,
                            double beta,
                            double gamma)
To set up a NiggliMatrix instance with lattice parameters.

Parameters:
a - in Angstrom or 1/Angstrom
b - in Angstrom or 1/Angstrom
c - in Angstrom or 1/Angstrom
beta - in Degree
gamma - in Degree

setTolerance

public void setTolerance(double t)
A tolerance parameter t means if|A-B|

setCellParameters

public void setCellParameters()
Get cell paramters from Niggli Matrix


reduce

public boolean reduce()
Niggli cell reduction algorithm: A Unified Algorithm for Determining the Reduced (Niggli) Cell. I. Krivy and B. Gruber. Acta Cryst. (1976) A32, 297-298. An appropriate tolerance value is needed (default 0.01)


showNiggliMatrix

public void showNiggliMatrix()
To print Niggli matrix on monitor.


showPrimitiveCell

public void showPrimitiveCell()
To print lattice parameters on monitor.


searchLatticeSymmetry

public java.util.ArrayList searchLatticeSymmetry()
Procedure for identification of lattice symmetry: Cell Reduction and Lattice Symmetry Determination. William Clegg. Acta Cryst. (1981) A37, 913-915. output on monitor.

Returns:
a list of vectors with lengths and angles.

searchLatticeSymmetry

public java.util.ArrayList searchLatticeSymmetry(java.io.PrintWriter pw)
Procedure for identification of lattice symmetry: Cell Reduction and Lattice Symmetry Determination. William Clegg. Acta Cryst. (1981) A37, 913-915. output into a given ouput stream.

Parameters:
pw - a output stream
Returns:
a list of vectors with lengths and angles

showConventionalCell

public void showConventionalCell(java.util.ArrayList list,
                                 int v1,
                                 int v2,
                                 int v3)
To transform conventional cell of Bravais lattice and print the conventional cell on monitor.

Parameters:
list - a list of vectors generated using the Clegg's algorithm
v1 - the number of the 1st selected vector
v2 - the number of the 2nd selected vector
v3 - the number of the 3rd selected vector

showConventionalCell

public void showConventionalCell(java.io.PrintWriter pw,
                                 java.util.ArrayList list,
                                 int v1,
                                 int v2,
                                 int v3)
To transform conventional cell of Bravais lattice and write to a given output stream.

Parameters:
list - a list of vectors generated using the Clegg's algorithm
v1 - the number of the 1st selected vector
v2 - the number of the 2nd selected vector
v3 - the number of the 3rd selected vector

main

public static void main(java.lang.String[] args)
Main function for testing