# Class Symmetry

java.lang.Object
org.jmol.symmetry.Symmetry

All Implemented Interfaces:
  `SymmetryInterface`

Direct Known Subclasses:
  `XtalSymmetry.FileSymmetry`

public class Symmetry extends Object implements SymmetryInterface

## Field Summary

Fields
Modifier and Type
Field
Description
`String`
`id`
`boolean`
`isBio`
`SpaceGroup`
`spaceGroup`
`protected M3`
`spinFrameToCartXYZ`
`UnitCell`
`unitCell`

## Constructor Summary

Constructors
Constructor
Description
`Symmetry()`

## Method Summary

Modifier and Type
Method
Description
`int`
`addBioMoleculeOperation(M4 mat, boolean isReverse)`
`int`
`addSpaceGroupOperation(String xyz, int opId)`
`void`
`adjustRangeMinMax(T3[] oabc, float packingRange, P3i minXYZ, P3i maxXYZ, P3 rmin, P3 rmax, P3i newMin, P3i newMax)`
`void`
`calculateCIPChiralityForAtoms(Viewer vwr, BS bsAtoms)`
`String[]`
`calculateCIPChiralityForSmiles(String smiles)`
`boolean`
`checkPeriodic(P3 pt, float packing, float packing2)`
`Object`
`convertTransform(String transform, M4 trm)`
A general method to handle converstions between string-based and matrix-based representations of transformations.
`Object`
`findSpaceGroup(BS atoms, String xyzList, float[] unitCellParams, T3 origin, T3[] oabc, int flags)`
`boolean`
`fixUnitCell(float[] params)`
`String`
`geCIFWriterValue(String type)`
`Lst<P3>`
`generateCrystalClass(P3 pt00)`
`M4[]`
`getAdditionalOperations()`
`int`
`getAdditionalOperationsCount()`
`P3[]`
`getCanonicalCopy(float scale, boolean withOffset)`
`P3`
`getCartesianOffset()`
`int[]`
`getCellRange()`
`float`
`getCellWeight(P3 pt)`
`Atom`
`getConstrainableEquivAtom(Atom a)`
This atom is usually the atom being moved, but in some cases we need to switch to a different atom in order to avoid the special case where a screw axis (SG 224 Wyckoff i) or glide (plane group 12 Wyckoff c) creates a stationary point.
`boolean`
`getCoordinatesAreFractional()`
`int`
`getDimensionality()`
plane 2 freize 2 layer 3 rod 3
`void`
`getEquivPointList(int nInitial, String flags, M4[] opsCtr, float packing, Lst<Point3fi> pts, SymmetryInterface uc)`
Load a list of initial current points, and one or more starting points with equivalent points.
`Lst<Point3fi>`
`getEquivPoints(Point3fi pt, String flags, float packing)`
`int`
`getFinalOperationCount()`
`P3`
`getFractionalOffset(boolean onlyIfFractional)`
determine if an offset cell is a unit translation, so that the space group can be continued
`P3`
`getFractionalOrigin()`
`int`
`getGroupType()`
`String`
`getIntTableIndex()`
`String`
`getIntTableNumber()`
`String`
`getIntTableTransform()`
`int[]`
`getInvariantSymops(P3 pt, int[] v0)`
`AtomIndexIterator`
`getIterator(Viewer vwr, Atom atom, BS bsAtoms, float radius)`
`Lst<P3>`
`getLatticeCentering()`
`Object`
`getLatticeDesignation()`
`int`
`getLatticeOp()`
`char`
`getLatticeType()`
`Lst<String>`
`getMoreInfo()`
`Matrix`
`getOperationRsVs(int iop)`
`int`
`getPeriodicity()`
0x1 a only frieze, rod-a 0x2 b only rod-b 0x4 c only rod-c 0x3 ab only plane, layer 0x5 ac only n/a 0x6 bc only n/a 0x7 abc all space
`Object`
`getPointGroupInfo(int modelIndex, String drawID, boolean asInfo, String type, int index, float scale)`
`String`
`getPointGroupName()`
`float`
`getPrecision()`
`Quat`
`getQuaternionRotation(String abc)`
`int`
`getSiteMultiplicity(P3 pt)`
`Object`
`getSpaceGroup()`
`String`
`getSpaceGroupClegId()`
`Map<String,Object>`
`getSpaceGroupInfo(ModelSet modelSet, String sgName, int modelIndex, boolean isFull, float[] cellParams)`
`Object`
`getSpaceGroupInfoObj(String name, Object params, boolean isFull, boolean addNonstandard)`
`String`
`getSpaceGroupJmolId()`
`Object`
`getSpaceGroupJSON(String name, String data, int index)`
`String`
`getSpaceGroupName()`
`M4`
`getSpaceGroupOperation(int i)`
`int`
`getSpaceGroupOperationCount()`
`String`
`getSpaceGroupXyzOriginal(int i, boolean doNormalize)`
`int`
`getSpinIndex(int op)`
`int`
`getSpinOp(int op)`
`SymmetryInterface`
`getSpinSym()`
`boolean`
`getState(ModelSet ms, int modelIndex, SB commands)`
`Object`
`getSubgroupJSON(String nameFrom, String nameTo, int i1, int i2, int flags, Map<String,Object> retMap, Lst<Object> retLst)`
Retrieve subgroup information for a space group.
`Object`
`getSymmetryInfoAtom(ModelSet modelSet, int iatom, String xyz, int op, P3 translation, P3 pt, P3 pt2, String id, int type, float scaleFactor, int nth, int options, int[] opList)`
`String`
`getSymmetryInfoStr()`
When information is desired about the space group, we use SymmetryInfo.
`SymmetryOperation[]`
`getSymmetryOperations()`
`String[]`
`getSymopList(boolean doNormalize)`
`M4`
`getTransform(P3 fracA, P3 fracB, boolean best)`
`SymmetryInterface`
`getUnitCell(T3[] oabc, boolean setRelative, String name)`
`float[]`
`getUnitCellAsArray(boolean vectorsOnly)`
`P3`
`getUnitCellCenter()`
`String`
`getUnitCellDisplayName()`
`String`
`getUnitCellInfo(boolean scaled)`
`Map<String,Object>`
`getUnitCellInfoMap()`
`float`
`getUnitCellInfoStr(String type)`
`float`
`getUnitCellInfoType(int infoType)`
`SymmetryInterface`
`getUnitCellMultiplied()`
Note, this has no origin shift.
`T3`
`getUnitCellMultiplier()`
`float[]`
`getUnitCellParams()`
`String`
`getUnitCellState()`
`P3[]`
`getUnitCellVectors()`
`P3[]`
`getUnitCellVerticesNoOffset()`
`T3[]`
`getV0abc(Object def, M4 retMatrix)`
`Object`
`getWyckoffPosition(P3 p, String letter)`
`boolean`
`haveUnitCell()`
`void`
`initializeOrientation(M3 mat)`
`boolean`
`isBio()`
`boolean`
`isPolymer()`
`boolean`
`isSimple()`
`boolean`
`isSlab()`
`boolean`
`isSupercell()`
`boolean`
`isSymmetryCell(SymmetryInterface sym)`
`boolean`
`isWithinUnitCell(P3 pt, float x, float y, float z, float packing)`
`void`
`newSpaceGroupPoint(P3 pt, int i, M4 o, int transX, int transY, int transZ, P3 retPoint)`
`BS`
`notInCentroid(ModelSet modelSet, BS bsAtoms, int[] minmax)`
`BS`
`removeDuplicates(ModelSet ms, BS bs, boolean highPrec)`
`M4`
`saveOrRetrieveTransformMatrix(M4 trm)`
Saved by CLEG.assignSpaceGroup; retrieved by SpaceGroupFinder.
`void`
`setFinalOperations(int dim, String name, P3[] atoms, int iAtomFirst, int noSymmetryCount, boolean doNormalize, String filterSymop)`
`void`
`setLattice(int latt)`
set symmetry lattice type using Hall rotations
`void`
`setOffset(int nnn)`
`void`
`setOffsetPt(T3 pt)`
`SymmetryInterface`
`setPointGroup(Viewer vwr, SymmetryInterface siLast, T3 center, T3[] atomset, BS bsAtoms, boolean haveVibration, float distanceTolerance, float linearTolerance, int maxAtoms, boolean localEnvOnly)`
`void`
`setSpaceGroup(boolean doNormalize)`
`void`
`setSpaceGroupName(String name)`
`void`
`setSpaceGroupTo(Object sg)`
`void`
`setSpinAxisAngle(A4 aa)`
`void`
`setSymmetryInfoFromFile(ModelSet ms, int modelIndex, float[] unitCellParams)`
Set space group and unit cell from the auxiliary info generated by XtalSymmetry specific to a given model.
`void`
`setUnitCell(SymmetryInterface uc)`
`SymmetryInterface`
`setUnitCellFromParams(float[] unitCellParams, boolean setRelative, float slop)`
`Symmetry`
`setViewer(Viewer vwr, String id)`
for Viewer.getSymStatic only
`String`
`staticCleanTransform(String tr)`
Normalize the transform, changing for instance a+1/2,b,c to "a,b,c;1/2,0,0" From SpaceGroupFinder only.
`Object`
`staticConvertOperation(String xyz, M34 matrix, String labels)`
`M4`
`staticGetMatrixTransform(String cleg, Object retLstOrMap)`
`String`
`staticGetTransformABC(M4 transform, boolean normalize)`
`String`
`staticToRationalXYZ(P3 fPt, String sep)`
`String`
`staticTransformSpaceGroup(BS bs, String cleg, Object paramsOrUC, SB sb)`
`void`
`toCartesian(T3 pt, boolean ignoreOffset)`
`void`
`toCartesianSpin(T3 v)`
`void`
`toFractional(T3 pt, boolean ignoreOffset)`
`void`
`toFractionalSpin(T3 v)`
`boolean`
`toFromPrimitive(boolean toPrimitive, char type, T3[] oabc, M3 primitiveToCrystal)`
`P3`
`toSupercell(P3 fpt)`
`void`
`toUnitCell(T3 pt, T3 offset)`
`void`
`transformUnitCell(M4 trm)`
Transform the unit cell based on the calculated transformation matrix.
`boolean`
`unitCellEquals(SymmetryInterface uc2)`
`void`
`unitize(T3 ptFrac)`
`String`
`updatePointGroup()`

### Methods inherited from class Object

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

## Field Details

### spaceGroup

public SpaceGroup spaceGroup

### unitCell

public UnitCell unitCell

### isBio

public boolean isBio

### id

public String id

### spinFrameToCartXYZ

protected M3 spinFrameToCartXYZ

## Constructor Details

### Symmetry

public Symmetry()

## Method Details

### getSymopList

public String[] getSymopList(boolean doNormalize)

Specified by:
  `getSymopList` in interface `SymmetryInterface`

### isBio

public boolean isBio()

Specified by:
  `isBio` in interface `SymmetryInterface`

### setPointGroup

public SymmetryInterface setPointGroup(Viewer vwr, SymmetryInterface siLast, T3 center, T3[] atomset, BS bsAtoms, boolean haveVibration, float distanceTolerance, float linearTolerance, int maxAtoms, boolean localEnvOnly)

Specified by:
  `setPointGroup` in interface `SymmetryInterface`

### getPointGroupName

public String getPointGroupName()

Specified by:
  `getPointGroupName` in interface `SymmetryInterface`

### getPointGroupInfo

public Object getPointGroupInfo(int modelIndex, String drawID, boolean asInfo, String type, int index, float scale)

Specified by:
  `getPointGroupInfo` in interface `SymmetryInterface`

### setSpaceGroup

public void setSpaceGroup(boolean doNormalize)

Specified by:
  `setSpaceGroup` in interface `SymmetryInterface`

### addSpaceGroupOperation

public int addSpaceGroupOperation(String xyz, int opId)

Specified by:
  `addSpaceGroupOperation` in interface `SymmetryInterface`

### addBioMoleculeOperation

public int addBioMoleculeOperation(M4 mat, boolean isReverse)

Specified by:
  `addBioMoleculeOperation` in interface `SymmetryInterface`

### setLattice

public void setLattice(int latt)
Description copied from interface: `SymmetryInterface`
set symmetry lattice type using Hall rotations

Specified by:
  `setLattice` in interface `SymmetryInterface`
Parameters:
  `latt` - SHELX index or character lattice character P I R F A B C S T or \0

### getSpaceGroup

public Object getSpaceGroup()

Specified by:
  `getSpaceGroup` in interface `SymmetryInterface`

### getSpaceGroupInfoObj

public Object getSpaceGroupInfoObj(String name, Object params, boolean isFull, boolean addNonstandard)

Specified by:
  `getSpaceGroupInfoObj` in interface `SymmetryInterface`

### getLatticeDesignation

public Object getLatticeDesignation()

Specified by:
  `getLatticeDesignation` in interface `SymmetryInterface`

### setFinalOperations

public void setFinalOperations(int dim, String name, P3[] atoms, int iAtomFirst, int noSymmetryCount, boolean doNormalize, String filterSymop)

Specified by:
  `setFinalOperations` in interface `SymmetryInterface`

### getSpaceGroupOperation

public M4 getSpaceGroupOperation(int i)

Specified by:
  `getSpaceGroupOperation` in interface `SymmetryInterface`

### getSpaceGroupXyzOriginal

public String getSpaceGroupXyzOriginal(int i, boolean doNormalize)

Specified by:
  `getSpaceGroupXyzOriginal` in interface `SymmetryInterface`

### newSpaceGroupPoint

public void newSpaceGroupPoint(P3 pt, int i, M4 o, int transX, int transY, int transZ, P3 retPoint)

Specified by:
  `newSpaceGroupPoint` in interface `SymmetryInterface`

### getSpinOp

public int getSpinOp(int op)

Specified by:
  `getSpinOp` in interface `SymmetryInterface`

### getLatticeOp

public int getLatticeOp()

Specified by:
  `getLatticeOp` in interface `SymmetryInterface`

### getLatticeCentering

public Lst<P3> getLatticeCentering()

Specified by:
  `getLatticeCentering` in interface `SymmetryInterface`

### getOperationRsVs

public Matrix getOperationRsVs(int iop)

Specified by:
  `getOperationRsVs` in interface `SymmetryInterface`

### getSiteMultiplicity

public int getSiteMultiplicity(P3 pt)

Specified by:
  `getSiteMultiplicity` in interface `SymmetryInterface`

### getSpaceGroupName

public String getSpaceGroupName()

Specified by:
  `getSpaceGroupName` in interface `SymmetryInterface`

### geCIFWriterValue

public String geCIFWriterValue(String type)

Specified by:
  `geCIFWriterValue` in interface `SymmetryInterface`

### getLatticeType

public char getLatticeType()

Specified by:
  `getLatticeType` in interface `SymmetryInterface`

### getIntTableNumber

public String getIntTableNumber()

Specified by:
  `getIntTableNumber` in interface `SymmetryInterface`

### getIntTableIndex

public String getIntTableIndex()

Specified by:
  `getIntTableIndex` in interface `SymmetryInterface`

### getIntTableTransform

public String getIntTableTransform()

Specified by:
  `getIntTableTransform` in interface `SymmetryInterface`

### getSpaceGroupClegId

public String getSpaceGroupClegId()

Specified by:
  `getSpaceGroupClegId` in interface `SymmetryInterface`

### getSpaceGroupJmolId

public String getSpaceGroupJmolId()

Specified by:
  `getSpaceGroupJmolId` in interface `SymmetryInterface`

### getCoordinatesAreFractional

public boolean getCoordinatesAreFractional()

Specified by:
  `getCoordinatesAreFractional` in interface `SymmetryInterface`

### getCellRange

public int[] getCellRange()

Specified by:
  `getCellRange` in interface `SymmetryInterface`

### getSymmetryInfoStr

public String getSymmetryInfoStr()
When information is desired about the space group, we use SymmetryInfo.

Specified by:
  `getSymmetryInfoStr` in interface `SymmetryInterface`

### getSpaceGroupOperationCount

public int getSpaceGroupOperationCount()

Specified by:
  `getSpaceGroupOperationCount` in interface `SymmetryInterface`

### getSymmetryOperations

public SymmetryOperation[] getSymmetryOperations()

Specified by:
  `getSymmetryOperations` in interface `SymmetryInterface`

### getAdditionalOperationsCount

public int getAdditionalOperationsCount()

Specified by:
  `getAdditionalOperationsCount` in interface `SymmetryInterface`

### getAdditionalOperations

public M4[] getAdditionalOperations()

Specified by:
  `getAdditionalOperations` in interface `SymmetryInterface`

### isSimple

public boolean isSimple()

Specified by:
  `isSimple` in interface `SymmetryInterface`

### haveUnitCell

public boolean haveUnitCell()

Specified by:
  `haveUnitCell` in interface `SymmetryInterface`

### setUnitCellFromParams

public SymmetryInterface setUnitCellFromParams(float[] unitCellParams, boolean setRelative, float slop)

Specified by:
  `setUnitCellFromParams` in interface `SymmetryInterface`

### unitCellEquals

public boolean unitCellEquals(SymmetryInterface uc2)

Specified by:
  `unitCellEquals` in interface `SymmetryInterface`

### isSymmetryCell

public boolean isSymmetryCell(SymmetryInterface sym)

Specified by:
  `isSymmetryCell` in interface `SymmetryInterface`

### getUnitCellState

public String getUnitCellState()

Specified by:
  `getUnitCellState` in interface `SymmetryInterface`

### getMoreInfo

public Lst<String> getMoreInfo()

Specified by:
  `getMoreInfo` in interface `SymmetryInterface`

### initializeOrientation

public void initializeOrientation(M3 mat)

Specified by:
  `initializeOrientation` in interface `SymmetryInterface`

### unitize

public void unitize(T3 ptFrac)

Specified by:
  `unitize` in interface `SymmetryInterface`

### toUnitCell

public void toUnitCell(T3 pt, T3 offset)

Specified by:
  `toUnitCell` in interface `SymmetryInterface`

### toSupercell

public P3 toSupercell(P3 fpt)

Specified by:
  `toSupercell` in interface `SymmetryInterface`

### toFractional

public void toFractional(T3 pt, boolean ignoreOffset)

Specified by:
  `toFractional` in interface `SymmetryInterface`

### toCartesian

public void toCartesian(T3 pt, boolean ignoreOffset)

Specified by:
  `toCartesian` in interface `SymmetryInterface`

### getUnitCellParams

public float[] getUnitCellParams()

Specified by:
  `getUnitCellParams` in interface `SymmetryInterface`

### getUnitCellAsArray

public float[] getUnitCellAsArray(boolean vectorsOnly)

Specified by:
  `getUnitCellAsArray` in interface `SymmetryInterface`

### getUnitCellVerticesNoOffset

public P3[] getUnitCellVerticesNoOffset()

Specified by:
  `getUnitCellVerticesNoOffset` in interface `SymmetryInterface`

### getCartesianOffset

public P3 getCartesianOffset()

Specified by:
  `getCartesianOffset` in interface `SymmetryInterface`

### getFractionalOffset

public P3 getFractionalOffset(boolean onlyIfFractional)
determine if an offset cell is a unit translation, so that the space group can be continued

Specified by:
  `getFractionalOffset` in interface `SymmetryInterface`

### setOffsetPt

public void setOffsetPt(T3 pt)

Specified by:
  `setOffsetPt` in interface `SymmetryInterface`

### setOffset

public void setOffset(int nnn)

Specified by:
  `setOffset` in interface `SymmetryInterface`

### getUnitCellMultiplier

public T3 getUnitCellMultiplier()

Specified by:
  `getUnitCellMultiplier` in interface `SymmetryInterface`

### getUnitCellMultiplied

public SymmetryInterface getUnitCellMultiplied()
Note, this has no origin shift.

Specified by:
  `getUnitCellMultiplied` in interface `SymmetryInterface`

### getCanonicalCopy

public P3[] getCanonicalCopy(float scale, boolean withOffset)

Specified by:
  `getCanonicalCopy` in interface `SymmetryInterface`

### getUnitCellInfoType

public float getUnitCellInfoType(int infoType)

Specified by:
  `getUnitCellInfoType` in interface `SymmetryInterface`

### getUnitCellInfoStr

public float getUnitCellInfoStr(String type)

Specified by:
  `getUnitCellInfoStr` in interface `SymmetryInterface`

### getUnitCellInfo

public String getUnitCellInfo(boolean scaled)

Specified by:
  `getUnitCellInfo` in interface `SymmetryInterface`

### isSlab

public boolean isSlab()

Specified by:
  `isSlab` in interface `SymmetryInterface`

### isPolymer

public boolean isPolymer()

Specified by:
  `isPolymer` in interface `SymmetryInterface`

### getUnitCellVectors

public P3[] getUnitCellVectors()

Specified by:
  `getUnitCellVectors` in interface `SymmetryInterface`

### getUnitCell

public SymmetryInterface getUnitCell(T3[] oabc, boolean setRelative, String name)

Specified by:
  `getUnitCell` in interface `SymmetryInterface`
Parameters:
  `oabc` - [ptorigin, va, vb, vc]
  `setRelative` - a flag only set true for IsosurfaceMesh
  `name` -
Returns:
  this SymmetryInterface

### isSupercell

public boolean isSupercell()

Specified by:
  `isSupercell` in interface `SymmetryInterface`

### notInCentroid

public BS notInCentroid(ModelSet modelSet, BS bsAtoms, int[] minmax)

Specified by:
  `notInCentroid` in interface `SymmetryInterface`

### getSymmetryInfoAtom

public Object getSymmetryInfoAtom(ModelSet modelSet, int iatom, String xyz, int op, P3 translation, P3 pt, P3 pt2, String id, int type, float scaleFactor, int nth, int options, int[] opList)

Specified by:
  `getSymmetryInfoAtom` in interface `SymmetryInterface`
Parameters:
  `modelSet` -
  `iatom` -
  `xyz` -
  `op` -
  `translation` - TODO
  `pt` -
  `pt2` - a second point or an offset
  `id` -
  `type` - T.point, T.lattice, or T.draw, T.matrix4f, T.label, T.list, T.info, T.translation, T.axis, T.plane, T.angle, T.center
  `scaleFactor` -
  `nth` - TODO
  `options` - could be T.offset
  `opList` -
Returns:
  a variety of object types

### getSpaceGroupInfo

public Map<String,Object> getSpaceGroupInfo(ModelSet modelSet, String sgName, int modelIndex, boolean isFull, float[] cellParams)

Specified by:
  `getSpaceGroupInfo` in interface `SymmetryInterface`

### getV0abc

public T3[] getV0abc(Object def, M4 retMatrix)

Specified by:
  `getV0abc` in interface `SymmetryInterface`

### getQuaternionRotation

public Quat getQuaternionRotation(String abc)

Specified by:
  `getQuaternionRotation` in interface `SymmetryInterface`

### getFractionalOrigin

public P3 getFractionalOrigin()

Specified by:
  `getFractionalOrigin` in interface `SymmetryInterface`

### getState

public boolean getState(ModelSet ms, int modelIndex, SB commands)

Specified by:
  `getState` in interface `SymmetryInterface`

### getIterator

public AtomIndexIterator getIterator(Viewer vwr, Atom atom, BS bsAtoms, float radius)

Specified by:
  `getIterator` in interface `SymmetryInterface`

### toFromPrimitive

public boolean toFromPrimitive(boolean toPrimitive, char type, T3[] oabc, M3 primitiveToCrystal)

Specified by:
  `toFromPrimitive` in interface `SymmetryInterface`

### generateCrystalClass

public Lst<P3> generateCrystalClass(P3 pt00)

Specified by:
  `generateCrystalClass` in interface `SymmetryInterface`

### calculateCIPChiralityForAtoms

public void calculateCIPChiralityForAtoms(Viewer vwr, BS bsAtoms)

Specified by:
  `calculateCIPChiralityForAtoms` in interface `SymmetryInterface`

### calculateCIPChiralityForSmiles

public String[] calculateCIPChiralityForSmiles(String smiles) throws Exception

Specified by:
  `calculateCIPChiralityForSmiles` in interface `SymmetryInterface`
Throws:
  `Exception`

### getUnitCellInfoMap

public Map<String,Object> getUnitCellInfoMap()

Specified by:
  `getUnitCellInfoMap` in interface `SymmetryInterface`

### setUnitCell

public void setUnitCell(SymmetryInterface uc)

Specified by:
  `setUnitCell` in interface `SymmetryInterface`

### findSpaceGroup

public Object findSpaceGroup(BS atoms, String xyzList, float[] unitCellParams, T3 origin, T3[] oabc, int flags)

Specified by:
  `findSpaceGroup` in interface `SymmetryInterface`

### setSpaceGroupName

public void setSpaceGroupName(String name)

Specified by:
  `setSpaceGroupName` in interface `SymmetryInterface`

### setSpaceGroupTo

public void setSpaceGroupTo(Object sg)

Specified by:
  `setSpaceGroupTo` in interface `SymmetryInterface`
Parameters:
  `sg` - ITA number, ITA full name ("48:1")

### removeDuplicates

public BS removeDuplicates(ModelSet ms, BS bs, boolean highPrec)

Specified by:
  `removeDuplicates` in interface `SymmetryInterface`

### getPeriodicity

public int getPeriodicity()
0x1 a only frieze, rod-a 0x2 b only rod-b 0x4 c only rod-c 0x3 ab only plane, layer 0x5 ac only n/a 0x6 bc only n/a 0x7 abc all space

Specified by:
  `getPeriodicity` in interface `SymmetryInterface`

### getDimensionality

public int getDimensionality()
plane 2 freize 2 layer 3 rod 3

Specified by:
  `getDimensionality` in interface `SymmetryInterface`

### getGroupType

public int getGroupType()

Specified by:
  `getGroupType` in interface `SymmetryInterface`

### getEquivPoints

public Lst<Point3fi> getEquivPoints(Point3fi pt, String flags, float packing)

Specified by:
  `getEquivPoints` in interface `SymmetryInterface`
Parameters:
  `pt` -
  `flags` -
  `packing` -
Returns:
  A list of equivalent points

### getEquivPointList

public void getEquivPointList(int nInitial, String flags, M4[] opsCtr, float packing, Lst<Point3fi> pts, SymmetryInterface uc)
Load a list of initial current points, and one or more starting points with equivalent points.

Specified by:
  `getEquivPointList` in interface `SymmetryInterface`
Parameters:
  `nInitial` - number of initial points
  `flags` - indicating input/output Cartesian or fractional options
  `opsCtr` - centering operations for subgroup filling that are to be used rather than space group operations
  `packing` - if .gte. 0, the fractional packing distance around the unit cell to include
  `pts` - total list of initial (current) points, needed for duplication check; additional points are those to be operated on, including the identity operation

### adjustRangeMinMax

public void adjustRangeMinMax(T3[] oabc, float packingRange, P3i minXYZ, P3i maxXYZ, P3 rmin, P3 rmax, P3i newMin, P3i newMax)

Specified by:
  `adjustRangeMinMax` in interface `SymmetryInterface`

### getInvariantSymops

public int[] getInvariantSymops(P3 pt, int[] v0)

Specified by:
  `getInvariantSymops` in interface `SymmetryInterface`
Returns:
  array of 1-based symmetry operation numbers for which the pt is invariant.

### getWyckoffPosition

public Object getWyckoffPosition(P3 p, String letter)

Specified by:
  `getWyckoffPosition` in interface `SymmetryInterface`

### getTransform

public M4 getTransform(P3 fracA, P3 fracB, boolean best)

Specified by:
  `getTransform` in interface `SymmetryInterface`
Parameters:
  `fracA` -
  `fracB` -
Returns:
  matrix

### isWithinUnitCell

public boolean isWithinUnitCell(P3 pt, float x, float y, float z, float packing)

Specified by:
  `isWithinUnitCell` in interface `SymmetryInterface`

### checkPeriodic

public boolean checkPeriodic(P3 pt, float packing, float packing2)

Specified by:
  `checkPeriodic` in interface `SymmetryInterface`

### staticConvertOperation

public Object staticConvertOperation(String xyz, M34 matrix, String labels)

Specified by:
  `staticConvertOperation` in interface `SymmetryInterface`

### getSubgroupJSON

public Object getSubgroupJSON(String nameFrom, String nameTo, int i1, int i2, int flags, Map<String,Object> retMap, Lst<Object> retLst)
Retrieve subgroup information for a space group. This method allows for recursive searching of the ITA maximal subgroup tree to find a path to a target subgroup. Returns: values are 1-based so that "0" has special meaning, "-" means ignored; "MnV" is Integer.MIN_VALUE Critical information array is: [ isub, ntrm, subIndex, idet, trType ] isub: subgroupNumber ntrm: transformation count subIndex: index of this group-subgroup relationship idet: determinant if determinant >= 1; -1/determinant if determinant invalid input: '<' 1 trType: 1 translationengeliechen, 3 klassengleichen "ct" loss of centering translation, 4 klassengleichen "eu" enlarged unit cell

Specified by:
  `getSubgroupJSON` in interface `SymmetryInterface`
Parameters:
  `nameFrom` -
  `nameTo` -
  `i1` - for a specific index or Integer.MIN_VALUE for all itaFrom; itaTo ignored
  `i2` - Integer.MIN_VALUE for all, or an index for a specific transform
  `flags` - what to do if we don't find a maximal subgroup; if non-zero, we will search the maximal subgroup tree for a path flags = (indexMax invalid input: '<'invalid input: '<' 24) | indexMin invalid input: '<'invalid input: '<' 16 | depthMax invalid input: '<'invalid input: '<' 8 | depthMin
Returns:
  Map, Lst, or String with conjugation class removed (first two characters "a:......")

### getSpaceGroupJSON

public Object getSpaceGroupJSON(String name, String data, int index)

Specified by:
  `getSpaceGroupJSON` in interface `SymmetryInterface`

### getCellWeight

public float getCellWeight(P3 pt)

Specified by:
  `getCellWeight` in interface `SymmetryInterface`

### getPrecision

public float getPrecision()

Specified by:
  `getPrecision` in interface `SymmetryInterface`

### fixUnitCell

public boolean fixUnitCell(float[] params)

Specified by:
  `fixUnitCell` in interface `SymmetryInterface`

### staticGetTransformABC

public String staticGetTransformABC(M4 transform, boolean normalize)

Specified by:
  `staticGetTransformABC` in interface `SymmetryInterface`

### setSymmetryInfoFromFile

public void setSymmetryInfoFromFile(ModelSet ms, int modelIndex, float[] unitCellParams)
Set space group and unit cell from the auxiliary info generated by XtalSymmetry specific to a given model. Only called by ModelLoader.

Parameters:
  `ms` -
  `modelIndex` -
  `unitCellParams` -

### transformUnitCell

public void transformUnitCell(M4 trm)
Transform the unit cell based on the calculated transformation matrix. From SpaceGroupFinder only.

Parameters:
  `trm` -

### staticCleanTransform

public String staticCleanTransform(String tr)
Normalize the transform, changing for instance a+1/2,b,c to "a,b,c;1/2,0,0" From SpaceGroupFinder only.

Specified by:
  `staticCleanTransform` in interface `SymmetryInterface`

### saveOrRetrieveTransformMatrix

public M4 saveOrRetrieveTransformMatrix(M4 trm)
Saved by CLEG.assignSpaceGroup; retrieved by SpaceGroupFinder. One-time save/retrieve a transformation matrix. Just a way for CLEG to pass a transform matrix off to SpaceGroupFinder.

Specified by:
  `saveOrRetrieveTransformMatrix` in interface `SymmetryInterface`

### getUnitCellDisplayName

public String getUnitCellDisplayName()

Specified by:
  `getUnitCellDisplayName` in interface `SymmetryInterface`

### staticToRationalXYZ

public String staticToRationalXYZ(P3 fPt, String sep)

Specified by:
  `staticToRationalXYZ` in interface `SymmetryInterface`

### getFinalOperationCount

public int getFinalOperationCount()

Specified by:
  `getFinalOperationCount` in interface `SymmetryInterface`

### convertTransform

public Object convertTransform(String transform, M4 trm)
A general method to handle converstions between string-based and matrix-based representations of transformations. When the transform is non-null and other than the string "xyz", the trm matrix is filled with the matrix representation corresponding to the given string, which is expected to be in the form specified for the Bilbao Crystallographic Server/International Table of Crystallography "Pp" format (if containing "a", "b", and "c") for basis transformtions. For example, "a+b,-a+b,c;0,0,1/2". The method includes support for expressions that contain reciprocal lattice descriptions "a*", "b*", and "c*", but only when this Symmetry object has a non-null unitCell field. When involving "x", "y", or "z", then the string is expected to have the form for space group operations, for example: "x+y,-x+y,z+1/2"

Specified by:
  `convertTransform` in interface `SymmetryInterface`
Parameters:
  `transform` - the string form to be converted to matrix format; if this string involves abc, a 4x4 column matrix is returned; if xyz, a 4x4 row matrix is returned. For example, "a+b,-a+b,c;0,0,1/2" will fill trm as

      [
      [1 -1 0 0  ]
      [1  1 0 0  ]
      [0  0 1 0.5]
      [0  0 0 1  ]
      ]

  while"x+y,-x+y,z+1/2" will fill trm as

      [
      [ 1 1 0 0  ]
      [-1 1 0 0  ]
      [ 0 0 1 0.5]
      [ 0 0 0 1  ]
      ]

  `trm` -
Returns:
  if transform is null, the abc-string equivalent to trm; if transform is "xyz", the xyz-string equivalent to the operation matrix trm; otherwise, the 4x4 matrix representing this transform or operation.

### staticGetMatrixTransform

public M4 staticGetMatrixTransform(String cleg, Object retLstOrMap)

Specified by:
  `staticGetMatrixTransform` in interface `SymmetryInterface`

### staticTransformSpaceGroup

public String staticTransformSpaceGroup(BS bs, String cleg, Object paramsOrUC, SB sb)

Specified by:
  `staticTransformSpaceGroup` in interface `SymmetryInterface`

### setViewer

public Symmetry setViewer(Viewer vwr, String id)
Description copied from interface: `SymmetryInterface`
for Viewer.getSymStatic only

Specified by:
  `setViewer` in interface `SymmetryInterface`
Parameters:
  `vwr` -
  `id` - TODO
Returns:
  this

### getUnitCellCenter

public P3 getUnitCellCenter()

Specified by:
  `getUnitCellCenter` in interface `SymmetryInterface`

### getConstrainableEquivAtom

public Atom getConstrainableEquivAtom(Atom a)
This atom is usually the atom being moved, but in some cases we need to switch to a different atom in order to avoid the special case where a screw axis (SG 224 Wyckoff i) or glide (plane group 12 Wyckoff c) creates a stationary point. In such a case, we can't do a projection the way we can with an axis or plane.

Specified by:
  `getConstrainableEquivAtom` in interface `SymmetryInterface`

### setSpinAxisAngle

public void setSpinAxisAngle(A4 aa)

Specified by:
  `setSpinAxisAngle` in interface `SymmetryInterface`

### getSpinIndex

public int getSpinIndex(int op)

Specified by:
  `getSpinIndex` in interface `SymmetryInterface`

### getSpinSym

public SymmetryInterface getSpinSym()

Specified by:
  `getSpinSym` in interface `SymmetryInterface`

### updatePointGroup

public String updatePointGroup()

Specified by:
  `updatePointGroup` in interface `SymmetryInterface`

### toFractionalSpin

public void toFractionalSpin(T3 v)

Specified by:
  `toFractionalSpin` in interface `SymmetryInterface`

### toCartesianSpin

public void toCartesianSpin(T3 v)

Specified by:
  `toCartesianSpin` in interface `SymmetryInterface`