SymmetryDesc
Date: 2019-10-22

org.jmol.symmetry

## Class SymmetryDesc

- java.lang.Object
- - org.jmol.symmetry.SymmetryDesc

-     public class SymmetryDesc
      extends java.lang.Object

  A class to handle requests for information about space groups and symmetry operations. Two entry points, both from Symmetry: getSymopInfo getSpaceGroupInfo

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static int` | `KEY_DRAW`
    `private static int` | `KEY_POINT`
    `private static java.lang.String[]` | `keys`
    `private ModelSet` | `modelSet`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SymmetryDesc()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private static javajs.util.T3` | `approx(javajs.util.T3 pt)`
    `private static javajs.util.T3` | `approx0(javajs.util.T3 pt)`
    `private java.lang.Object[]` | `createInfoArray(SymmetryOperation op, SymmetryInterface uc, javajs.util.P3 pta00, javajs.util.P3 ptTarget, java.lang.String id, float scaleFactor, int options)`
    `private static void` | `drawFrameLine(java.lang.String xyz, javajs.util.P3 pt, javajs.util.V3 v, float width, javajs.util.P3 ptemp, javajs.util.SB draw1, java.lang.String key, java.lang.String color)`
    `private static void` | `drawLine(javajs.util.SB s, java.lang.String id, float diameter, javajs.util.P3 pt0, javajs.util.P3 pt1, java.lang.String color)`
    `private static void` | `drawVector(javajs.util.SB draw1, java.lang.String drawid, java.lang.String label, java.lang.String type, javajs.util.T3 pt1, javajs.util.T3 v, java.lang.String color)`
    `private javajs.util.BS` | `getAtom(Symmetry uc, int iModel, int iAtom, javajs.util.T3 sympt)`
    `private static java.lang.Object` | `getInfo(java.lang.Object[] info, int type)` Return information about a symmetry operator by type: array, angle, axis, center, draw, full, info, label, matrix4f, point, time, plane, translation, unitcell, xyz, all, or a negative number (-length, -1]: { "xyz", "xyzOriginal", "label", "draw", "fractionalTranslation", "cartesianTranslation", "inversionCenter", "axisPoint", "axisVector", "rotationAngle", "matrix", "unitTranslation", "centeringVector", "timeReversal", "plane", "_type", "id" } where "all" is the info array itself,
    `(package private) java.util.Map<java.lang.String,java.lang.Object>` | `getSpaceGroupInfo(Symmetry sym, int modelIndex, java.lang.String sgName, int symOp, javajs.util.P3 pt1, javajs.util.P3 pt2, java.lang.String drawID, float scaleFactor, int nth, boolean isFull, boolean isForModel, int options, SymmetryInterface cellInfo)`
    `private java.lang.Object` | `getSymmetryInfo(Symmetry sym, int iModel, int iatom, Symmetry uc, java.lang.String xyz, int op, javajs.util.P3 pt, javajs.util.P3 pt2, java.lang.String id, int type, float scaleFactor, int nth, int options)` multipurpose function handling a variety of tasks, including: processing of "lattice", "list", "atom", "point", and some "draw" output types finding the operator in the given space group creating a temporary space group for an xyz operator
    `(package private) java.lang.Object` | `getSymopInfo(int iAtom, java.lang.String xyz, int op, javajs.util.P3 pt, javajs.util.P3 pt2, java.lang.String id, int type, float scaleFactor, int nth, int options)`
    `private java.lang.Object` | `getSymopInfoForPoints(Symmetry sym, int modelIndex, int symOp, javajs.util.P3 pt1, javajs.util.P3 pt2, java.lang.String drawID, java.lang.String stype, float scaleFactor, int nth, boolean asString, int options)` get information about a symmetry operation relating two specific points or atoms
    `private static int` | `getType(java.lang.String id)`
    `private static java.lang.Object` | `nullReturn(int type)`
    `private static javajs.util.P3` | `rotTransCart(SymmetryOperation op, SymmetryInterface uc, javajs.util.P3 pt00, javajs.util.V3 vtrans)`
    `SymmetryDesc` | `set(ModelSet modelSet)`
    `private static void` | `setFractional(SymmetryInterface uc, javajs.util.T3 pt00, javajs.util.P3 pt01, javajs.util.P3 offset)` Set pt01 to pt00, possibly adding offset into unit cell
    `private static java.lang.String` | `strCoord(javajs.util.T3 p, boolean isBio)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### modelSet

          private ModelSet modelSet

    - #### keys

          private static final java.lang.String[] keys

    - #### KEY_DRAW

          private static final int KEY_DRAW

      See Also:
        Constant Field Values

    - #### KEY_POINT

          private static final int KEY_POINT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SymmetryDesc

          public SymmetryDesc()

  - ### Method Detail

    - #### set

          public SymmetryDesc set(ModelSet modelSet)

    - #### getSymopInfo

          java.lang.Object getSymopInfo(int iAtom,
                                        java.lang.String xyz,
                                        int op,
                                        javajs.util.P3 pt,
                                        javajs.util.P3 pt2,
                                        java.lang.String id,
                                        int type,
                                        float scaleFactor,
                                        int nth,
                                        int options)

      Parameters:
        `iAtom` -
        `xyz` -
        `op` -
        `pt` -
        `pt2` -
        `id` -
        `type` -
        `scaleFactor` -
        `nth` -
        `options` - 0 or T.offset
      Returns:
        "" or a bitset of matching atoms, or

    - #### getSpaceGroupInfo

          java.util.Map<java.lang.String,java.lang.Object> getSpaceGroupInfo(Symmetry sym,
                                                                             int modelIndex,
                                                                             java.lang.String sgName,
                                                                             int symOp,
                                                                             javajs.util.P3 pt1,
                                                                             javajs.util.P3 pt2,
                                                                             java.lang.String drawID,
                                                                             float scaleFactor,
                                                                             int nth,
                                                                             boolean isFull,
                                                                             boolean isForModel,
                                                                             int options,
                                                                             SymmetryInterface cellInfo)

    - #### getType

          private static int getType(java.lang.String id)

    - #### nullReturn

          private static java.lang.Object nullReturn(int type)

    - #### getInfo

          private static java.lang.Object getInfo(java.lang.Object[] info,
                                                  int type)

      Return information about a symmetry operator by type: array, angle, axis, center, draw, full, info, label, matrix4f, point, time, plane, translation, unitcell, xyz, all, or a negative number (-length, -1]: { "xyz", "xyzOriginal", "label", "draw", "fractionalTranslation", "cartesianTranslation", "inversionCenter", "axisPoint", "axisVector", "rotationAngle", "matrix", "unitTranslation", "centeringVector", "timeReversal", "plane", "_type", "id" } where "all" is the info array itself,
      Parameters:
        `info` -
        `type` -
      Returns:
        object specified

    - #### createInfoArray

          private java.lang.Object[] createInfoArray(SymmetryOperation op,
                                                     SymmetryInterface uc,
                                                     javajs.util.P3 pta00,
                                                     javajs.util.P3 ptTarget,
                                                     java.lang.String id,
                                                     float scaleFactor,
                                                     int options)

      Parameters:
        `op` -
        `uc` -
        `pta00` - optional initial atom point
        `ptTarget` - optional target atom point
        `id` -
        `scaleFactor` - scale for rotation vector only
        `options` - 0 or T.offset
      Returns:
        Object[] containing: [0] xyz (Jones-Faithful calculated from matrix) [1] xyzOriginal (Provided by calling method) [2] info ("C2 axis", for example) [3] draw commands [4] translation vector (fractional) [5] translation vector (Cartesian) [6] inversion point [7] axis point [8] axis vector (defines plane if angle = 0 [9] angle of rotation [10] matrix representation [11] lattice translation [12] centering [13] time reversal [14] plane [15] _type [16] index

    - #### drawLine

          private static void drawLine(javajs.util.SB s,
                                       java.lang.String id,
                                       float diameter,
                                       javajs.util.P3 pt0,
                                       javajs.util.P3 pt1,
                                       java.lang.String color)

    - #### drawFrameLine

          private static void drawFrameLine(java.lang.String xyz,
                                            javajs.util.P3 pt,
                                            javajs.util.V3 v,
                                            float width,
                                            javajs.util.P3 ptemp,
                                            javajs.util.SB draw1,
                                            java.lang.String key,
                                            java.lang.String color)

    - #### drawVector

          private static void drawVector(javajs.util.SB draw1,
                                         java.lang.String drawid,
                                         java.lang.String label,
                                         java.lang.String type,
                                         javajs.util.T3 pt1,
                                         javajs.util.T3 v,
                                         java.lang.String color)

    - #### setFractional

          private static void setFractional(SymmetryInterface uc,
                                            javajs.util.T3 pt00,
                                            javajs.util.P3 pt01,
                                            javajs.util.P3 offset)

      Set pt01 to pt00, possibly adding offset into unit cell
      Parameters:
        `uc` -
        `pt00` -
        `pt01` -
        `offset` -

    - #### rotTransCart

          private static javajs.util.P3 rotTransCart(SymmetryOperation op,
                                                     SymmetryInterface uc,
                                                     javajs.util.P3 pt00,
                                                     javajs.util.V3 vtrans)

    - #### strCoord

          private static java.lang.String strCoord(javajs.util.T3 p,
                                                   boolean isBio)

    - #### approx0

          private static javajs.util.T3 approx0(javajs.util.T3 pt)

    - #### approx

          private static javajs.util.T3 approx(javajs.util.T3 pt)

    - #### getSymmetryInfo

          private java.lang.Object getSymmetryInfo(Symmetry sym,
                                                   int iModel,
                                                   int iatom,
                                                   Symmetry uc,
                                                   java.lang.String xyz,
                                                   int op,
                                                   javajs.util.P3 pt,
                                                   javajs.util.P3 pt2,
                                                   java.lang.String id,
                                                   int type,
                                                   float scaleFactor,
                                                   int nth,
                                                   int options)

      multipurpose function handling a variety of tasks, including: processing of "lattice", "list", "atom", "point", and some "draw" output types finding the operator in the given space group creating a temporary space group for an xyz operator
      Parameters:
        `sym` -
        `iModel` -
        `iatom` -
        `uc` -
        `xyz` -
        `op` -
        `pt` -
        `pt2` - second point or offset
        `id` -
        `type` -
        `scaleFactor` -
        `nth` -
        `options` - 0 or T.offset
      Returns:
        a string or an Object[] containing information

    - #### getAtom

          private javajs.util.BS getAtom(Symmetry uc,
                                         int iModel,
                                         int iAtom,
                                         javajs.util.T3 sympt)

    - #### getSymopInfoForPoints

          private java.lang.Object getSymopInfoForPoints(Symmetry sym,
                                                         int modelIndex,
                                                         int symOp,
                                                         javajs.util.P3 pt1,
                                                         javajs.util.P3 pt2,
                                                         java.lang.String drawID,
                                                         java.lang.String stype,
                                                         float scaleFactor,
                                                         int nth,
                                                         boolean asString,
                                                         int options)

      get information about a symmetry operation relating two specific points or atoms
      Parameters:
        `sym` -
        `modelIndex` -
        `symOp` -
        `pt1` -
        `pt2` -
        `drawID` -
        `stype` -
        `scaleFactor` -
        `nth` -
        `asString` -
        `options` - 0 or T.offset
      Returns:
        Object[] or String or Object[Object[]] (nth = 0, "array")