Class SymmetryDesc

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

public class SymmetryDesc extends Object
A class to handle requests for information about space groups and symmetry operations. Two entry points, both from Symmetry: getSymopInfo getSpaceGroupInfo
  • Field Details

  • Constructor Details

    • SymmetryDesc

      public SymmetryDesc()
  • Method Details

    • set

      public SymmetryDesc set(ModelSet modelSet)
    • getType

      private static int getType(String id)
      Determine the type of this request. Note that label and xyz will be returned as T.xyz and T.label
      Parameters:
      id -
      Returns:
      a code that identifies this request.
    • getKeyType

      private static int getKeyType(String id)
    • nullReturn

      private static Object nullReturn(int type)
    • getInfo

      private static Object getInfo(Object[] io, 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", etc. } where "all" is the info array itself,
      Parameters:
      io -
      type -
      Returns:
      object specified
    • getInfoBS

      private static javajs.util.BS getInfoBS(int type)
    • createInfoArray

      private Object[] createInfoArray(SymmetryOperation op, SymmetryInterface uc, javajs.util.P3 ptFrom, javajs.util.P3 ptTarget, String id, float scaleFactor, int options, boolean haveTranslation, javajs.util.BS bsInfo)
      Parameters:
      op -
      uc -
      ptFrom - optional initial atom point
      ptTarget - optional target atom point
      id -
      scaleFactor - scale for rotation vector only
      options - 0 or T.offset
      haveTranslation - TODO
      bsInfo -
      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] id [17] element [18] invariant
    • drawLine

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

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

      private static void drawVector(javajs.util.SB draw1, String drawid, String label, String type, String d, javajs.util.T3 pt1, javajs.util.T3 v, 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 String strCoord(SymmetryOperation op, javajs.util.T3 p, boolean isBio)
    • approx0

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

      private static float approx0f(float x)
    • approx

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

      private Object getSymmetryInfo(SymmetryInterface sym, int iModel, int iatom, SymmetryInterface uc, String xyz, int op, javajs.util.P3 translation, javajs.util.P3 pt, javajs.util.P3 pt2, 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 -
      translation - [i j k] to be added to operator
      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(SymmetryInterface uc, int iModel, int iAtom, javajs.util.T3 sympt)
    • getSymopInfoForPoints

      Object getSymopInfoForPoints(SymmetryInterface sym, int modelIndex, int symOp, javajs.util.P3 translation, javajs.util.P3 pt1, javajs.util.P3 pt2, String drawID, String stype, float scaleFactor, int nth, int options, javajs.util.BS bsInfo)
      get information about a symmetry operation relating two specific points or atoms
      Parameters:
      sym -
      modelIndex -
      symOp -
      translation - TODO
      pt1 -
      pt2 -
      drawID -
      stype -
      scaleFactor -
      nth -
      options - 0 or T.offset
      bsInfo -
      Returns:
      Object[] or String or Object[Object[]] (nth = 0, "array")
    • getSymopInfo

      Object getSymopInfo(int iAtom, String xyz, int op, javajs.util.P3 translation, javajs.util.P3 pt, javajs.util.P3 pt2, String id, int type, float scaleFactor, int nth, int options)
      Parameters:
      iAtom -
      xyz -
      op -
      translation - TODO
      pt -
      pt2 -
      id -
      type -
      scaleFactor -
      nth -
      options - 0 or T.offset
      Returns:
      "" or a bitset of matching atoms, or
    • getSpaceGroupInfo

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

      public javajs.util.M4 getTransform(UnitCell uc, SymmetryOperation[] ops, javajs.util.P3 fracA, javajs.util.P3 fracB, boolean best)