Class SymmetryOperation

java.lang.Object
javajs.util.M34
javajs.util.M4
org.jmol.symmetry.SymmetryOperation

public class SymmetryOperation extends javajs.util.M4
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static javajs.util.P3
     
    private javajs.util.V3
     
    (package private) int
     
    private static final int
     
    private static final int
     
    private boolean
    "normalization" is the process of adjusting symmetry operator definitions such that the center of geometry of a molecule is within the 555 unit cell for each operation.
     
    (package private) boolean
     
    (package private) boolean
     
    (package private) boolean
     
    (package private) static final String[]
     
    (package private) static final String[]
     
    (package private) static final String[]
     
    (package private) float[]
    A linear array for the matrix.
    private float
     
    (package private) int
     
    private String[]
     
    (package private) int
     
    private int
     
    (package private) javajs.util.Matrix
    rsvs is the superspace group rotation-translation matrix.
    (package private) javajs.util.Matrix
     
    (package private) String
     
    (package private) int
     
    private static final String[]
     
    private boolean
     
    (package private) String
     
    (package private) String
     
    (package private) String
     

    Fields inherited from class javajs.util.M4

    m03, m13, m23, m30, m31, m32, m33

    Fields inherited from class javajs.util.M34

    m00, m01, m02, m10, m11, m12, m20, m21, m22
  • Constructor Summary

    Constructors
    Constructor
    Description
    SymmetryOperation(SymmetryOperation op, int id, boolean doNormalize)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static float
    approxF(float f)
     
    private static javajs.util.M4
    div12(javajs.util.M4 op, int divisor)
     
    (package private) void
     
    (package private) String
     
    (package private) static final String
    dumpSeitz(javajs.util.M4 s, boolean isCanonical)
     
    private static String
    fc(float x)
     
    private String
    fc2(float f)
    Get string version of fraction when divisor == 0
    (package private) static String
    fcoord(javajs.util.T3 p)
    Get string version of fraction
    fcoord2(javajs.util.T3 p)
     
    private static double
    finalizeD(double m, int divisor)
     
    private static float
    finalizeF(float m, int divisor)
     
    (package private) String
    fixMagneticXYZ(javajs.util.M4 m, String xyz, boolean addMag)
     
    (package private) javajs.util.V3
    assumption here is that these are in order of sets, as in ITA
     
    (package private) static String
     
    static javajs.util.Lst<javajs.util.P3>
     
    (package private) float
    Magnetic spin is a pseudo (or "axial") vector.
    (package private) static String
    getMatrixFromString(SymmetryOperation op, String xyz, float[] linearRotTrans, boolean allowScaling)
    Convert the Jones-Faithful notation "x, -z+1/2, y" or "x1, x3-1/2, x2, x5+1/2, -x6+1/2, x7..." to a linear array Also allows a-b,-5a-5b,-c;0,0,0 format
    static javajs.util.M4
     
    (package private) String
    getXyz(boolean normalized)
     
    static final String
    getXYZFromMatrix(javajs.util.M4 mat, boolean is12ths, boolean allPositive, boolean halfOrLess)
     
    (package private) static String
    getXYZFromRsVs(javajs.util.Matrix rs, javajs.util.Matrix vs, boolean is12ths)
     
    getxyzTrans(javajs.util.P3 t)
     
    static void
    normalizeOperationToCentroid(int dim, javajs.util.M4 m, javajs.util.P3[] atoms, int atomIndex, int count)
    Adjust the translation for this operator so that it moves the center of mass of the full set of atoms into the cell.
    private static float
    normalizeTwelfths(float iValue, int divisor, boolean doNormalize)
     
    private static String
    plusMinus(String strT, float x, String sx)
     
    (package private) static String
    replaceXn(String xyz, int n)
     
    (package private) javajs.util.V3[]
    rotateAxes(javajs.util.V3[] vectors, UnitCell unitcell, javajs.util.P3 ptTemp, javajs.util.M3 mTemp)
     
    private static int
    Sets the divisor to 0 for n/9 or n/mm
    (package private) boolean
    setFromMatrix(float[] offset, boolean isReverse)
     
    private void
    setGamma(boolean isReverse)
     
    private void
    setMatrix(boolean isReverse)
     
    (package private) boolean
    setMatrixFromXYZ(String xyz, int modDim, boolean allowScaling)
     
    private void
    setModDim(int dim)
     
    (package private) void
    setSigma(String subsystemCode, javajs.util.Matrix sigma)
     
    (package private) void
    setTimeReversal(int magRev)
    set the time reversal, and indicate internally in xyz as appended ",m" or ",-m"
    private static final int
    toDivisor(float numer, int denom)
     
    Returns a string that contains the values of this Matrix4f.
    (package private) static final String
    twelfthsOf(float n12ths)
     
    private static final String
    xyzFraction12(float n12ths, int denom, boolean allPositive, boolean halfOrLess)
     

    Methods inherited from class javajs.util.M4

    add, determinant4, equals, getColumn, getElement, getRotationScale, getRow, getTranslation, hashCode, invert, mul, mul2, newA16, newM4, newMV, rotTrans, rotTrans2, round, scale, setA, setAsXYRotation, setAsXZRotation, setAsYZRotation, setColumn4, setColumnA, setElement, setIdentity, setM4, setMV, setRotationScale, setRowA, setToAA, setToM3, setTranslation, setZero, sub, transform, transform2, transpose

    Methods inherited from class javajs.util.M34

    add33, clear33, determinant3, err, get33, getColumn33, getRow33, mul33, rotate, rotate2, set33, setAA33, setColumn33, setM33, setRow33, setXRot, setYRot, setZRot, sub33, transpose33

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • xyzOriginal

      String xyzOriginal
    • xyzCanonical

      String xyzCanonical
    • xyz

      String xyz
    • doNormalize

      private boolean doNormalize
      "normalization" is the process of adjusting symmetry operator definitions such that the center of geometry of a molecule is within the 555 unit cell for each operation. It is carried out when "packed" is NOT issued and the lattice is given as {i j k} or when the lattice is given as {nnn mmm 1}
    • isFinalized

      boolean isFinalized
    • opId

      private int opId
    • centering

      private javajs.util.V3 centering
    • myLabels

      private String[] myLabels
    • modDim

      int modDim
    • linearRotTrans

      float[] linearRotTrans
      A linear array for the matrix. Note that the last value in this array may indicate 120 to indicate that the integer divisor should be 120, not 12.
    • rsvs

      javajs.util.Matrix rsvs
      rsvs is the superspace group rotation-translation matrix. It is a (3 + modDim + 1) x (3 + modDim + 1) matrix from which we can extract all necessary parts; so 4x4 = 16, 5x5 = 25, 6x6 = 36, 7x7 = 49 [ [(3+modDim)*x + 1] [(3+modDim)*x + 1] [ Gamma_R [0x0] | Gamma_S [(3+modDim)*x + 1] == [0x0] Gamma_e | Gamma_d ... [0] [0] | 1 ] [0 0 0 0 0... 1] ]
    • isBio

      boolean isBio
    • sigma

      javajs.util.Matrix sigma
    • number

      int number
    • subsystemCode

      String subsystemCode
    • timeReversal

      int timeReversal
    • unCentered

      private boolean unCentered
    • isCenteringOp

      boolean isCenteringOp
    • magOp

      private float magOp
    • divisor

      int divisor
    • DIVISOR_MASK

      private static final int DIVISOR_MASK
      See Also:
    • DIVISOR_OFFSET

      private static final int DIVISOR_OFFSET
      See Also:
    • twelfths

      private static final String[] twelfths
    • labelsXYZ

      static final String[] labelsXYZ
    • labelsXn

      static final String[] labelsXn
    • labelsXnSub

      static final String[] labelsXnSub
    • info

      private Hashtable<String,Object> info
    • atomTest

      static javajs.util.P3 atomTest
  • Constructor Details

    • SymmetryOperation

      SymmetryOperation(SymmetryOperation op, int id, boolean doNormalize)
      Parameters:
      op - operation to clone or null
      id - opId for this operation; ignored if cloning
      doNormalize -
  • Method Details

    • setSigma

      void setSigma(String subsystemCode, javajs.util.Matrix sigma)
    • setGamma

      private void setGamma(boolean isReverse)
    • doFinalize

      void doFinalize()
    • div12

      private static javajs.util.M4 div12(javajs.util.M4 op, int divisor)
    • finalizeF

      private static float finalizeF(float m, int divisor)
    • finalizeD

      private static double finalizeD(double m, int divisor)
    • getXyz

      String getXyz(boolean normalized)
    • getxyzTrans

      public String getxyzTrans(javajs.util.P3 t)
    • dumpInfo

      String dumpInfo()
    • dumpSeitz

      static final String dumpSeitz(javajs.util.M4 s, boolean isCanonical)
    • setMatrixFromXYZ

      boolean setMatrixFromXYZ(String xyz, int modDim, boolean allowScaling)
    • setDivisor

      private static int setDivisor(String xyz)
      Sets the divisor to 0 for n/9 or n/mm
      Parameters:
      xyz -
      Returns:
      0 or 12
    • setModDim

      private void setModDim(int dim)
    • setMatrix

      private void setMatrix(boolean isReverse)
    • setFromMatrix

      boolean setFromMatrix(float[] offset, boolean isReverse)
    • getMatrixFromXYZ

      public static javajs.util.M4 getMatrixFromXYZ(String xyz)
    • getJmolCanonicalXYZ

      static String getJmolCanonicalXYZ(String xyz)
    • getMatrixFromString

      static String getMatrixFromString(SymmetryOperation op, String xyz, float[] linearRotTrans, boolean allowScaling)
      Convert the Jones-Faithful notation "x, -z+1/2, y" or "x1, x3-1/2, x2, x5+1/2, -x6+1/2, x7..." to a linear array Also allows a-b,-5a-5b,-c;0,0,0 format
      Parameters:
      op -
      xyz -
      linearRotTrans -
      allowScaling -
      Returns:
      canonized Jones-Faithful string
    • replaceXn

      static String replaceXn(String xyz, int n)
    • toDivisor

      private static final int toDivisor(float numer, int denom)
    • xyzFraction12

      private static final String xyzFraction12(float n12ths, int denom, boolean allPositive, boolean halfOrLess)
    • twelfthsOf

      static final String twelfthsOf(float n12ths)
    • plusMinus

      private static String plusMinus(String strT, float x, String sx)
    • normalizeTwelfths

      private static float normalizeTwelfths(float iValue, int divisor, boolean doNormalize)
    • getXYZFromMatrix

      public static final String getXYZFromMatrix(javajs.util.M4 mat, boolean is12ths, boolean allPositive, boolean halfOrLess)
    • rotateAxes

      javajs.util.V3[] rotateAxes(javajs.util.V3[] vectors, UnitCell unitcell, javajs.util.P3 ptTemp, javajs.util.M3 mTemp)
    • fcoord2

      public String fcoord2(javajs.util.T3 p)
    • fc2

      private String fc2(float f)
      Get string version of fraction when divisor == 0
      Parameters:
      f -
      Returns:
      "1/2" for example
    • fcoord

      static String fcoord(javajs.util.T3 p)
      Get string version of fraction
      Parameters:
      p -
      Returns:
      "1/2" for example
    • fc

      private static String fc(float x)
    • approxF

      static float approxF(float f)
    • getXYZFromRsVs

      static String getXYZFromRsVs(javajs.util.Matrix rs, javajs.util.Matrix vs, boolean is12ths)
    • toString

      public String toString()
      Description copied from class: javajs.util.M4
      Returns a string that contains the values of this Matrix4f.
      Overrides:
      toString in class javajs.util.M4
      Returns:
      the String representation
    • getMagneticOp

      float getMagneticOp()
      Magnetic spin is a pseudo (or "axial") vector. This means that it acts as a rotation, not a vector. When a rotation about x is passed through the mirror plane xz, it is reversed; when it is passed through the mirror plane yz, it is not reversed -- exactly opposite what you would imagine from a standard "polar" vector. For example, a vector perpendicular to a plane of symmetry (det=-1) will be flipped (m=1), while a vector parallel to that plane will not be flipped (m=-1) In addition, magnetic spin operations have a flag m=1 or m=-1 (m or -m) that indicates how the vector quantity changes with symmetry. This is called "time reversal" and stored here as timeReversal. To apply, timeReversal must be multiplied by the 3x3 determinant, which is always 1 (standard rotation) or -1 (rotation-inversion). This we store as magOp. See https://en.wikipedia.org/wiki/Pseudovector
      Returns:
      +1, -1, or 0
    • setTimeReversal

      void setTimeReversal(int magRev)
      set the time reversal, and indicate internally in xyz as appended ",m" or ",-m"
      Parameters:
      magRev -
    • getCentering

      javajs.util.V3 getCentering()
      assumption here is that these are in order of sets, as in ITA
      Returns:
      centering
    • fixMagneticXYZ

      String fixMagneticXYZ(javajs.util.M4 m, String xyz, boolean addMag)
    • getInfo

      public Map<String,Object> getInfo()
    • normalizeOperationToCentroid

      public static void normalizeOperationToCentroid(int dim, javajs.util.M4 m, javajs.util.P3[] atoms, int atomIndex, int count)
      Adjust the translation for this operator so that it moves the center of mass of the full set of atoms into the cell.
      Parameters:
      dim -
      m -
      atoms -
      atomIndex - first index
      count - number of atoms
    • getLatticeCentering

      public static javajs.util.Lst<javajs.util.P3> getLatticeCentering(SymmetryOperation[] ops)