# Class XtalSymmetry.FileSymmetry

java.lang.Object
org.jmol.symmetry.Symmetry
org.jmol.adapter.smarter.XtalSymmetry.FileSymmetry

All Implemented Interfaces:
  `SymmetryInterface`

Enclosing class:
  `XtalSymmetry`

public static class XtalSymmetry.FileSymmetry extends Symmetry
A class only used by adapter.smarter.XtalSymmetry while building the file-based model.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected int`
`nSpins`
`protected String`
`spinFrameStr`
/////////////////// Magnetic and Spin Space Groups ///////////////

### Fields inherited from class Symmetry

`id, isBio, spaceGroup, spinFrameToCartXYZ, unitCell`

## Constructor Summary

Constructors
Constructor
Description
`FileSymmetry()`

## Method Summary

Modifier and Type
Method
Description
`void`
`addInversion()`
`boolean`
`addMagLatticeVectors(Lst<float[]> lattvecs)`
`void`
`addSpinLattice(Lst<String> lstSpinFrames, Map<String,String> mapSpinIdToUVW)`
`boolean`
`createSpaceGroup(int desiredSpaceGroupIndex, String name, Object data, int modDim)`
`String`
`fcoord(T3 p)`
`void`
`getRotTransArrayAndXYZ(String xyz, float[] rotTransMatrix)`
MMCifReader only
`String`
`getSpaceGroupOperationCode(int iOp)`
`String`
`getSpaceGroupTitle()`
`Tensor`
`getTensor(Viewer vwr, float[] parBorU)`
`void`
`mapSpins(Map<String,String> map)`
`protected int`
`postSymmetrySetMagneticMoments(AtomSetCollection asc, boolean isCartesian)`
At the end, we need to rescale the vectors using SpinFramePp.
`protected void`
`preSymmetryFinalizeMoments(AtomSetCollectionReader acr, AtomSetCollection asc, String spinFrameStr, String spinFrameExt)`
Scale the magnetic moments of magCIF and spinCIF files.
`V3[]`
`rotateAxes(int iop, V3[] axes, P3 ptTemp, M3 mTemp)`
`void`
`setPrecision(float prec)`
`Lst<String>`
`setSpinList(String configuration)`
`void`
`toFractionalM(M4 m)`
`void`
`toUnitCellRnd(T3 pt, T3 offset)`
`void`
`twelfthify(P3 pt)`

### Methods inherited from class Symmetry

`addBioMoleculeOperation, addSpaceGroupOperation, adjustRangeMinMax, calculateCIPChiralityForAtoms, calculateCIPChiralityForSmiles, checkPeriodic, convertTransform, findSpaceGroup, fixUnitCell, geCIFWriterValue, generateCrystalClass, getAdditionalOperations, getAdditionalOperationsCount, getCanonicalCopy, getCartesianOffset, getCellRange, getCellWeight, getConstrainableEquivAtom, getCoordinatesAreFractional, getDimensionality, getEquivPointList, getEquivPoints, getFinalOperationCount, getFractionalOffset, getFractionalOrigin, getGroupType, getIntTableIndex, getIntTableNumber, getIntTableTransform, getInvariantSymops, getIterator, getLatticeCentering, getLatticeDesignation, getLatticeOp, getLatticeType, getMoreInfo, getOperationRsVs, getPeriodicity, getPointGroupInfo, getPointGroupName, getPrecision, getQuaternionRotation, getSiteMultiplicity, getSpaceGroup, getSpaceGroupClegId, getSpaceGroupInfo, getSpaceGroupInfoObj, getSpaceGroupJmolId, getSpaceGroupJSON, getSpaceGroupName, getSpaceGroupOperation, getSpaceGroupOperationCount, getSpaceGroupXyzOriginal, getSpinIndex, getSpinOp, getSpinSym, getState, getSubgroupJSON, getSymmetryInfoAtom, getSymmetryInfoStr, getSymmetryOperations, getSymopList, getTransform, getUnitCell, getUnitCellAsArray, getUnitCellCenter, getUnitCellDisplayName, getUnitCellInfo, getUnitCellInfoMap, getUnitCellInfoStr, getUnitCellInfoType, getUnitCellMultiplied, getUnitCellMultiplier, getUnitCellParams, getUnitCellState, getUnitCellVectors, getUnitCellVerticesNoOffset, getV0abc, getWyckoffPosition, haveUnitCell, initializeOrientation, isBio, isPolymer, isSimple, isSlab, isSupercell, isSymmetryCell, isWithinUnitCell, newSpaceGroupPoint, notInCentroid, removeDuplicates, saveOrRetrieveTransformMatrix, setFinalOperations, setLattice, setOffset, setOffsetPt, setPointGroup, setSpaceGroup, setSpaceGroupName, setSpaceGroupTo, setSpinAxisAngle, setSymmetryInfoFromFile, setUnitCell, setUnitCellFromParams, setViewer, staticCleanTransform, staticConvertOperation, staticGetMatrixTransform, staticGetTransformABC, staticToRationalXYZ, staticTransformSpaceGroup, toCartesian, toCartesianSpin, toFractional, toFractionalSpin, toFromPrimitive, toSupercell, toUnitCell, transformUnitCell, unitCellEquals, unitize, updatePointGroup`

### Methods inherited from class Object

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

## Field Details

### spinFrameStr

protected String spinFrameStr
/////////////////// Magnetic and Spin Space Groups ///////////////

### nSpins

protected int nSpins

## Constructor Details

### FileSymmetry

public FileSymmetry()

## Method Details

### mapSpins

public void mapSpins(Map<String,String> map)

### addMagLatticeVectors

public boolean addMagLatticeVectors(Lst<float[]> lattvecs)

### addSpinLattice

public void addSpinLattice(Lst<String> lstSpinFrames, Map<String,String> mapSpinIdToUVW)

### setSpinList

public Lst<String> setSpinList(String configuration)

### createSpaceGroup

public boolean createSpaceGroup(int desiredSpaceGroupIndex, String name, Object data, int modDim)

Parameters:
  `desiredSpaceGroupIndex` -
  `name` -
  `data` - a Lst<SymmetryOperation> or Lst<M4>
  `modDim` - in [3+d] modulation dimension
Returns:
  true if a known space group

### fcoord

public String fcoord(T3 p)

### getRotTransArrayAndXYZ

public void getRotTransArrayAndXYZ(String xyz, float[] rotTransMatrix)
MMCifReader only

Parameters:
  `xyz` -
  `rotTransMatrix` -

### getSpaceGroupOperationCode

public String getSpaceGroupOperationCode(int iOp)

### getTensor

public Tensor getTensor(Viewer vwr, float[] parBorU)

### getSpaceGroupTitle

public String getSpaceGroupTitle()

### setPrecision

public void setPrecision(float prec)

### toFractionalM

public void toFractionalM(M4 m)

### toUnitCellRnd

public void toUnitCellRnd(T3 pt, T3 offset)

### twelfthify

public void twelfthify(P3 pt)

### addInversion

public void addInversion()

### rotateAxes

public V3[] rotateAxes(int iop, V3[] axes, P3 ptTemp, M3 mTemp)

### preSymmetryFinalizeMoments

protected void preSymmetryFinalizeMoments(AtomSetCollectionReader acr, AtomSetCollection asc, String spinFrameStr, String spinFrameExt)
Scale the magnetic moments of magCIF and spinCIF files. magCIF files have moments expressed as Bohr magnetons along the crystallographic axes. These have to be "fractionalized" in order to be properly handled by symmetry operations, then, in the end, turned into Cartesians (in setSpinVectors) It is not clear to me at all how this would be handled if there are subsystems. This method must be run PRIOR to applying symmetry and thus prior to creation of modulation sets.

Parameters:
  `acr` -
  `asc` -
  `spinFrameStr` -
  `spinFrameExt` -

### postSymmetrySetMagneticMoments

protected int postSymmetrySetMagneticMoments(AtomSetCollection asc, boolean isCartesian)
At the end, we need to rescale the vectors using SpinFramePp.

Parameters:
  `asc` -
  `isCartesian` - true only for FindSpinGroup JSON (FSGOutputReader)
Returns:
  number of nonzero or incommensurate spins