# Class SymmetryOperation

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

public class SymmetryOperation extends M4

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`MODE_ABC`
`static final String`
`MODE_MXYZ`
`static final String`
`MODE_UVW`
`static final String`
`MODE_XYZ`
`boolean`
`opIsLong`
`int`
`spinIndex`
`String`
`subsystemCode`
`String`
`suvw`
`String`
`suvwId`
CIF space_group_symop_spin_operation_uvw_id was an idea Bob had to separate out the uvw part from the xyz part into separate CIF blocks.
`String`
`xyz`

### Fields inherited from class M4

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

### Fields inherited from class M34

`m00, m01, m02, m10, m11, m12, m20, m21, m22`

## Method Summary

Modifier and Type
Method
Description
`static String`
`fcoord(T3 p, String sep)`
Get string version of fraction
`static SymmetryOperation[]`
`getAdditionalOperations(SymmetryOperation[] ops, int per_dim)`
`String`
`getCode()`
`static char`
`getGlideFromTrans(T3 ftrans, T3 ax1)`
note = this method will return 'n' for SG 161 do an operator's odd 1/2 -1/2 1/2 glide (but only for additional operations, not the basic set but ITA says "tetragonal and cubic only" in Table ITA1969 4.1.6
`Map<String,Object>`
`getInfo()`
`static Lst<P3>`
`getLatticeCentering(SymmetryOperation[] ops)`
`static Lst<String>`
`getLatticeCenteringStrings(SymmetryOperation[] ops)`
`static M4`
`getMatrixFromXYZ(String xyz, float[] v, boolean halfOrLess)`
`static M4`
`getMatrixFromXYZScaled(String xyz, float[] v, boolean halfOrLess)`
`V3`
`getOpAxis()`
`String`
`getOpDesc()`
`Boolean`
`getOpIsCCW()`
`int`
`getOpOrder()`
`P3`
`getOpPoint()`
`P3`
`getOpPoint2()`
`V3`
`getOpTrans()`
`int`
`getOpType()`
`static String`
`getRotTransArrayAndXYZ(SymmetryOperation op, String xyz, float[] linearRotTrans, boolean allowScaling, boolean halfOrLess, boolean retString, String labels)`
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 String`
`getSpinString(M34 m, boolean isUVW, boolean withParens)`
allows for 3x3 rotation-only matrix;
`String`
`getSUVW()`
`static String`
`getTransformABC(M4 transform, boolean normalize)`
This method properly transposes the matrix for ABC format, converting columns to rows before passing the information to getXYZFromMatrixFrac(...,"ABC").
`static String`
`getTransformABCd(M4 transform, boolean normalize, boolean fractionAsDecimal)`
`static String`
`getTransformUVW(M4 spin)`
`static String`
`getTransformXYZ(M4 op)`
`String`
`getXyz(boolean normalized)`
`static final String`
`getXYZFromMatrix(M4 mat, boolean is12ths, boolean allPositive, boolean halfOrLess)`
`static String`
`getXYZFromRsVs(Matrix rs, Matrix vs, boolean is12ths)`
`String`
`getxyzTrans(T3 t)`
`static boolean`
`isTranslation(M4 op)`
`static String`
`matrixToRationalString(M34 matrix)`
rxyz option creates tab-separated string representation of a 3x4 (r,t) or 3x3 matrix with rational fractions adds "|" prior to translation; does NOT add last row of 0 0 0 1 `( 1 -1 0 | 1/2 0 0 1 | -1/2 0 1 0 | 0 )`
`static void`
`normalize12ths(V3 vtrans)`
`static void`
`normalizeOperationToCentroid(int dim, M4 m, P3[] fracPts, int i0, int n)`
Adjust the translation for this operator so that it moves the center of mass of the full set of atoms into the cell.
`V3[]`
`rotateAxes(V3[] vectors, UnitCell unitcell, P3 ptTemp, M3 mTemp)`
`void`
`rotateSpin(T3 vib)`
`void`
`setSigma(String subsystemCode, Matrix sigma)`
Sets sigma and the subsystem code for modulated CIF
`void`
`setSpin(String s)`
`static Object`
`staticConvertOperation(String xyz, M34 matrix34, String labels)`
`String`
`toString()`
Returns a string that contains the values of this Matrix4f.

### Methods inherited from class 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 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 Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### xyz

public String xyz

### suvw

public String suvw

### suvwId

public String suvwId
CIF space_group_symop_spin_operation_uvw_id was an idea Bob had to separate out the uvw part from the xyz part into separate CIF blocks. The idea was not ultimately part of the SpinCIF dictionary.

### spinIndex

public int spinIndex

### subsystemCode

public String subsystemCode

### opIsLong

public boolean opIsLong

### MODE_ABC

public static final String MODE_ABC

See Also:
  - Constant Field Values

### MODE_XYZ

public static final String MODE_XYZ

See Also:
  - Constant Field Values

### MODE_UVW

public static final String MODE_UVW

See Also:
  - Constant Field Values

### MODE_MXYZ

public static final String MODE_MXYZ

See Also:
  - Constant Field Values

## Method Details

### getOpDesc

public String getOpDesc()

### setSigma

public void setSigma(String subsystemCode, Matrix sigma)
Sets sigma and the subsystem code for modulated CIF

Parameters:
  `subsystemCode` -
  `sigma` -

### getXyz

public String getXyz(boolean normalized)

### getxyzTrans

public String getxyzTrans(T3 t)

### setSpin

public void setSpin(String s)

### getMatrixFromXYZ

public static M4 getMatrixFromXYZ(String xyz, float[] v, boolean halfOrLess)

### getMatrixFromXYZScaled

public static M4 getMatrixFromXYZScaled(String xyz, float[] v, boolean halfOrLess)

### getRotTransArrayAndXYZ

public static String getRotTransArrayAndXYZ(SymmetryOperation op, String xyz, float[] linearRotTrans, boolean allowScaling, boolean halfOrLess, boolean retString, String labels)
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` -
  `halfOrLess` -
  `retString` -
  `labels` -
Returns:
  canonized Jones-Faithful string

### getXYZFromMatrix

public static final String getXYZFromMatrix(M4 mat, boolean is12ths, boolean allPositive, boolean halfOrLess)

### rotateAxes

public V3[] rotateAxes(V3[] vectors, UnitCell unitcell, P3 ptTemp, M3 mTemp)

### fcoord

public static String fcoord(T3 p, String sep)
Get string version of fraction

Parameters:
  `p` -
  `sep` - space or comma
Returns:
  "1/2" for example

### getXYZFromRsVs

public static String getXYZFromRsVs(Matrix rs, Matrix vs, boolean is12ths)

### isTranslation

public static boolean isTranslation(M4 op)

### getSpinString

public static String getSpinString(M34 m, boolean isUVW, boolean withParens)
allows for 3x3 rotation-only matrix;

Parameters:
  `m` -
  `isUVW` - will allow 0.577.... not changing that to a fraction
  `withParens` -
Returns:
  full x,y,...(u,v,....) or just u,v,w

### getInfo

public Map<String,Object> getInfo()

### normalizeOperationToCentroid

public static void normalizeOperationToCentroid(int dim, M4 m, P3[] fracPts, int i0, int n)
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` -
  `fracPts` -
  `i0` - first index
  `n` - number of atoms

### getLatticeCentering

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

### getLatticeCenteringStrings

public static Lst<String> getLatticeCenteringStrings(SymmetryOperation[] ops)

### getOpIsCCW

public Boolean getOpIsCCW()

### getOpType

public int getOpType()

### getOpOrder

public int getOpOrder()

### getOpPoint

public P3 getOpPoint()

### getOpAxis

public V3 getOpAxis()

### getOpPoint2

public P3 getOpPoint2()

### getOpTrans

public V3 getOpTrans()

### getAdditionalOperations

public static SymmetryOperation[] getAdditionalOperations(SymmetryOperation[] ops, int per_dim)

### normalize12ths

public static void normalize12ths(V3 vtrans)

### getCode

public String getCode()

### getGlideFromTrans

public static char getGlideFromTrans(T3 ftrans, T3 ax1)
note = this method will return 'n' for SG 161 do an operator's odd 1/2 -1/2 1/2 glide (but only for additional operations, not the basic set but ITA says "tetragonal and cubic only" in Table ITA1969 4.1.6

Parameters:
  `ftrans` -
  `ax1` -
Returns:
  one of a b c d g n

### getTransformXYZ

public static String getTransformXYZ(M4 op)

### getTransformUVW

public static String getTransformUVW(M4 spin)

### getTransformABC

public static String getTransformABC(M4 transform, boolean normalize)
This method properly transposes the matrix for ABC format, converting columns to rows before passing the information to getXYZFromMatrixFrac(...,"ABC").

Parameters:
  `transform` -
  `normalize` - only set to true by (undocumented?) script unitcell(m4,true); normalize translation to interval (-1/2,1/2]
Returns:
  a,b,c format for the given matrix

### getTransformABCd

public static String getTransformABCd(M4 transform, boolean normalize, boolean fractionAsDecimal)

### matrixToRationalString

public static String matrixToRationalString(M34 matrix)
rxyz option creates tab-separated string representation of a 3x4 (r,t) or 3x3 matrix with rational fractions adds "|" prior to translation; does NOT add last row of 0 0 0 1 `( 1 -1 0 | 1/2 0 0 1 | -1/2 0 1 0 | 0 )`

Parameters:
  `matrix` -
Returns:
  string representation

### rotateSpin

public void rotateSpin(T3 vib)

### staticConvertOperation

public static Object staticConvertOperation(String xyz, M34 matrix34, String labels)

### toString

public String toString()
Description copied from class: `M4`
Returns a string that contains the values of this Matrix4f.

Overrides:
  `toString` in class `M4`
Returns:
  the String representation

### getSUVW

public String getSUVW()