# Class ModelSet

java.lang.Object
org.jmol.modelset.AtomCollection
org.jmol.modelset.BondCollection
org.jmol.modelset.ModelSet

public class ModelSet extends BondCollection

## Nested Class Summary

### Nested classes/interfaces inherited from class AtomCollection

`AtomCollection.AtomSorter`

## Field Summary

Fields
Modifier and Type
Field
Description
`Model[]`
`am`
`BS`
`bboxModels`
`protected BS`
`bsAll`
`protected BS`
`bsSymmetry`
`protected final Atom[]`
`closest`
`protected BS[]`
`elementsPresent`
`String[]`
`frameTitles`
`boolean`
`haveBioModels`
`boolean`
`haveJmolDataFrames`
`boolean`
`haveUnitCells`
`Hashtable<String,BS>`
`htPeaks`
`protected boolean`
`isXYZ`
`int`
`mc`
model count
`int[]`
`modelFileNumbers`
`String[]`
`modelNames`
`protected int[]`
`modelNumbers`
`String[]`
`modelNumbersForAtomLabel`
`String`
`modelSetName`
`Properties`
`modelSetProperties`
`protected String`
`modelSetTypeName`
`Map<String,Object>`
`msInfo`
`boolean`
`proteinStructureTainted`
`ShapeManager`
`sm`
`protected boolean`
`someModelsHaveAromaticBonds`
`protected boolean`
`someModelsHaveFractionalCoordinates`
`protected boolean`
`someModelsHaveSymmetry`
`Lst<StateScript>`
`stateScripts`
`P3[]`
`translations`
`SymmetryInterface[]`
`unitCells`
`protected Lst<V3[]>`
`vibrationSteps`

### Fields inherited from class BondCollection

`bo, BOND_GROWTH_INCREMENT, bondCount, bsAromatic, defaultCovalentMad, freeBonds, haveAtropicBonds, haveHiddenBonds, MAX_BONDS_LENGTH_TO_CACHE, MAX_NUM_TO_CACHE, moleculeCount, molecules, numCached, v1, v2`

### Fields inherited from class AtomCollection

`ac, at, atomTensorList, atomTensors, bioModelset, bsClickable, bsModulated, bsPartialCharges, bspf, bsVisible, CALC_H_ALLOW_H, CALC_H_DOALL, CALC_H_HAVEH, CALC_H_IGNORE_H, CALC_H_JUSTC, CALC_H_QUICK, canSkipLoad, g3d, haveChirality, haveStraightness, maxBondingRadius, occupancies, pointGroup, preserveState, surfaceDistance100s, TAINT_ATOMNAME, TAINT_ATOMNO, TAINT_ATOMTYPE, TAINT_BONDINGRADIUS, TAINT_CHAIN, TAINT_COORD, TAINT_ELEMENT, TAINT_FORMALCHARGE, TAINT_HYDROPHOBICITY, TAINT_MAX, TAINT_OCCUPANCY, TAINT_PARTIALCHARGE, TAINT_RESNO, TAINT_SEQID, TAINT_SITE, TAINT_TEMPERATURE, TAINT_VALENCE, TAINT_VANDERWAALS, TAINT_VIBRATION, tainted, trajectory, userSettableValues, vib, vibrations, vwr`

## Constructor Summary

Constructors
Constructor
Description
`ModelSet(Viewer vwr, String name)`

## Method Summary

Modifier and Type
Method
Description
`Atom`
`addAtom(int modelIndex, Group group, int atomicAndIsotopeNumber, String atomName, String atomType, int atomSerial, int atomSeqID, int atomSite, P3 xyz, float radius, V3 vib, int formalCharge, float partialCharge, float occupancy, float bfactor, Lst<Object> tensors, boolean isHetero, boolean isNegDisorder, byte specialAtomID, BS atomSymmetry, float bondRadius)`
`BS`
`addHydrogens(Lst<Atom> vConnections, P3[] pts)`
these are hydrogens that are being added due to a load 2D command and are therefore not to be flagged as NEW
`StateScript`
`addStateScript(String script1, BS bsBonds, BS bsAtoms1, BS bsAtoms2, String script2, boolean addFrameNumber, boolean postDefinitions)`
`void`
`adjustAtomArrays(int[] map, int i0, int ac)`
`int`
`autoBondBs4(BS bsA, BS bsB, BS bsExclude, BS bsBonds, short mad, boolean preJmol11_9_24, SB state)`
`int`
`autoHbond(BS bsA, BS bsB, boolean onlyIfHaveCalculated)`
a generalized formation of HBONDS, carried out in relation to calculate HBONDS {atomsFrom} {atomsTo}.
`int`
`calcAtomsMinMax(BS bs, BoxInfo boxInfo)`
`void`
`calcBoundBoxDimensions(BS bs, float scale)`
`void`
`calcRasmolHydrogenBonds(BS bsA, BS bsB, Lst<Bond> vHBonds, boolean nucleicOnly, int nMax, boolean dsspIgnoreHydrogens, BS bsHBonds)`
These are not actual hydrogen bonds.
`float`
`calcRotationRadius(int modelIndex, P3 center, boolean useBoundBox)`
`float`
`calcRotationRadiusBs(BS bs)`
`void`
`calcSelectedGroupsCount()`
`void`
`calcSelectedMoleculesCount()`
`void`
`calcSelectedMonomersCount()`
`String`
`calculateChiralityForAtoms(BS bsAtoms, boolean withReturn)`
`void`
`calculateDssrProperty(String dataType)`
`V3`
`calculateMolecularDipole(int modelIndex, BS bsAtoms)`
`String`
`calculatePointGroup(BS bsAtoms, P3 center)`
////// atom and shape selecting /////////
`protected void`
`calculatePolymers(Group[] groups, int groupCount, int baseGroupIndex, BS modelsExcluded)`
`void`
`calculateStraightnessAll()`
`String`
`calculateStructures(BS bsAtoms, boolean asDSSP, boolean doReport, boolean dsspIgnoreHydrogen, boolean setStructure, int version)`
`String`
`calculateStructuresAllExcept(BS alreadyDefined, boolean asDSSP, boolean doReport, boolean dsspIgnoreHydrogen, boolean setStructure, boolean includeAlpha, int version)`
allows rebuilding of PDB structures; also accessed by ModelManager from Eval
`int`
`calculateStruts(BS bs1, BS bs2)`
see comments in org.jmol.modelsetbio.AlphaPolymer.java Struts are calculated for atoms in bs1 connecting to atoms in bs2.
`void`
`clearCache()`
`protected void`
`clearDataFrameReference(int modelIndex)`
`void`
`clearDB(int atomIndex)`
`void`
`clearUnitCell(int modelIndex)`
`void`
`connect(float[][] connections)`
`void`
`createModels(int n)`
`void`
`deleteAllBonds()`
`void`
`deleteAtoms(BS bs)`
`void`
`deleteBonds(BS bsBonds, boolean isFullModel)`
`void`
`deleteModelBonds(int modelIndex)`
`BS`
`deleteModels(BS bsModels)`
`void`
`fillAtomData(AtomData atomData, int mode)`
`BS`
`findAtomsInRectangle(Rectangle rect)`
`int`
`findNearestAtomIndex(int x, int y, BS bsNot, int min)`
`BS`
`fixDeletedBonds(BS bs)`
`int`
`getAltLocCountInModel(int modelIndex)`
/////////// individual models ////////////////
`int`
`getAltLocIndexInModel(int modelIndex, char alternateLocationID)`
`String`
`getAltLocListInModel(int modelIndex)`
`protected BS`
`getAtomBitsMaybeDeleted(int tokType, Object specInfo)`
`int`
`getAtomCIPChiralityCode(Atom atom)`
Determine the Cahn-Ingold-Prelog R/S chirality of an atom
`int`
`getAtomCountInModel(int modelIndex)`
`Quat[]`
`getAtomGroupQuaternions(BS bsAtoms, int nMax, char qtype)`
`float`
`getAtomicDSSRData(int i)`
`BS`
`getAtoms(int tokType, Object specInfo)`
general lookup for integer type -- from Eval
`P3`
`getAtomSetCenter(BS bs)`
`BS`
`getAtomsWithin(float distance, T3 coord, BS bsResult, int modelIndex)`
`BS`
`getAtomsWithinRadius(float distance, BS bs, boolean withinAllModels, RadiusData rd, BS bsSubset)`
Get atoms within a specific distance of any atom in a specific set of atoms either within all models or within just the model(s) of those atoms
`P3`
`getAverageAtomPoint()`
`Atom`
`getBasisAtom(int iatom, boolean doCheck)`
`Point3fi[]`
`getBBoxVertices()`
`int`
`getBioPolymerCountInModel(int modelIndex)`
`BS`
`getBitSetTrajectories()`
`int`
`getBondCountInModel(int modelIndex)`
/////// bonds /////////
`P3`
`getBoundBoxCenter(int modelIndex)`
`String`
`getBoundBoxCommand(boolean withOptions)`
`V3`
`getBoundBoxCornerVector()`
`Object`
`getBoundBoxOrientation(int type, BS bsAtoms, P3[] points)`
`BoxInfo`
`getBoxInfo()`
`BoxInfo`
`getBoxInfo(BS bs, float scale)`
`BS[]`
`getBsBranches(float[] dihedralList)`
`float[]`
`getCellWeights(BS bsAtoms)`
`P3[][]`
`getCenterAndPoints(Lst<Object[]> vAtomSets, boolean addCenters)`
`int`
`getChainCountInModelWater(int modelIndex, boolean countWater)`
`BS`
`getConformation(int modelIndex, int conformationIndex, boolean doSet, BS bsSelected)`
`BS`
`getConnectingAtoms(BS bsAtoms, BS bsFixed)`
`BS`
`getCurrentSpinAtoms()`
include this frame and all related frames
`String`
`getDefaultStructure(BS bsAtoms, BS bsModified)`
`VDW`
`getDefaultVdwType(int modelIndex)`
`int[][]`
`getDihedralMap(int[] alist)`
`boolean`
`getEchoStateActive()`
`BS`
`getElementsPresentBitSet(int modelIndex)`
`BS`
`getEquivalentAtoms(int iatom)`
`Object`
`getFileData(int modelIndex)`
`String`
`getFileHeader(int modelIndex)`
`long`
`getFrameDelayMs(int i)`
`P3[]`
`getFrameOffsets(BS bsAtoms, boolean isFull)`
`String`
`getFrameTitle(int modelIndex)`
`int`
`getGroupCountInModel(int modelIndex)`
`Group[]`
`getGroups()`
In versions earlier than 12.1.51, groups[] was a field of ModelCollection.
`BS`
`getGroupsWithin(int nResidues, BS bs)`
`Map<String,String>`
`getHeteroList(int modelIndex)`
`Object`
`getInfo(int modelIndex, String key)`
`protected boolean`
`getInfoB(int modelIndex, String keyName)`
`protected int`
`getInfoI(int modelIndex, String keyName)`
`Object`
`getInfoM(String keyName)`
`String`
`getInlineData(int modelIndex)`
`int`
`getInsertionCodeIndexInModel(int modelIndex, char insertionCode)`
`int`
`getInsertionCountInModel(int modelIndex)`
`BS`
`getIterativeModels(boolean allowJmolData)`
only some models can be iterated through.
`int`
`getJmolDataFrameIndex(int modelIndex, String type)`
`int`
`getJmolDataFrameInt(int modelIndex, int type)`
`int`
`getJmolDataSourceFrame(int modelIndex)`
`String`
`getJmolFrameType(int modelIndex)`
`int`
`getJmolFrameTypeInt(int modelIndex)`
`int`
`getLastVibrationVector(int modelIndex, int tok)`
`BS`
`getModelAtomBitSetIncludingDeleted(int modelIndex, boolean asCopy)`
Note that this method returns all atoms, included deleted ones.
`BS`
`getModelAtomBitSetIncludingDeletedBs(BS bsModels)`
note -- this method returns ALL atoms, including deleted.
`Map<String,Object>`
`getModelAuxiliaryInfo(int modelIndex)`
`BS`
`getModelBS(BS atomList, boolean allTrajectories)`
Get the set of models associated with a set of atoms.
`int[]`
`getModelCellRange(int modelIndex)`
`String`
`getModelDataBaseName(BS bsAtoms)`
`V3`
`getModelDipole(int modelIndex)`
`String`
`getModelFileName(int modelIndex)`
`String`
`getModelFileType(int modelIndex)`
`int`
`getModelIndexFromId(String id)`
`String`
`getModelInfoAsString()`
`String`
`getModelName(int modelIndex)`
`int`
`getModelNumber(int modelIndex)`
`String`
`getModelNumberDotted(int modelIndex)`
`String`
`getModelNumberForAtomLabel(int modelIndex)`
`int`
`getModelNumberIndex(int modelNumber, boolean useModelNumber, boolean doSetTrajectory)`
`Orientation`
`getModelOrientation(int modelIndex)`
`String`
`getModelProperty(int modelIndex, String property)`
`Map<String,Object>`
`getModelSetAuxiliaryInfo(BS bsModels)`
Retrieve the main modelset info Hashtable (or a new non-null Hashtable) with an up-to-date "models" key.
`String`
`getModelSetTypeName()`
`int`
`getModelSymmetryCount(int modelIndex)`
`String`
`getModelTitle(int modelIndex)`
`Lst<Object>`
`getModulationList(BS bs, char type, P3 t456)`
`BS`
`getMoleculeBitSet(BS bs)`
return cumulative sum of all atoms in molecules containing these atoms
`BS`
`getMoleculeBitSetForAtom(int atomIndex)`
`int`
`getMoleculeCountInModel(int modelIndex)`
`int`
`getMoleculeIndex(int atomIndex, boolean inModel)`
////// molecules /////////
`JmolMolecule[]`
`getMolecules()`
`boolean`
`getMSInfoB(String keyName)`
`String`
`getPDBHeader(int modelIndex)`
`String`
`getPointGroupAsString(BS bsAtoms, String type, int index, float scale, P3[] pts, P3 center, String id)`
`Map<String,Object>`
`getPointGroupInfo(BS bsAtoms, String type)`
`void`
`getPointTransf(int i, Atom a, Quat q, P3 pTemp)`
pick up the appropriate value for this atom
`void`
`getPolymerPointsAndVectors(BS bs, Lst<P3[]> vList, boolean isTraceAlpha, float sheetSmoothing)`
`String`
`getProteinStructureState(BS bsAtoms, int mode)`
`AtomIndexIterator`
`getSelectedAtomIterator(BS bsSelected, boolean isGreaterOnly, boolean modelZeroBased, boolean hemisphereOnly, boolean isMultiModel)`
`BS`
`getSequenceBits(String specInfo, BS bsAtoms, BS bsResult)`
// bio-only methods /////
`int`
`getSpin(int atomIndex)`
`Map<STR,float[]>`
`getStructureList()`
`M4[]`
`getSymMatrices(int modelIndex)`
`BS`
`getSymmetryEquivAtoms(BS bsAtoms, SymmetryInterface sym, BS bsModelAtoms)`
Return a bitset of equivalent atoms
`void`
`getSymmetryEquivAtomsForAtom(int i, BS bsAtoms, BS bsCheck, BS bsEquiv)`
Set a bitset of the equivalent atoms of an atom.
`String`
`getSymmetryInfoAsString()`
`int[]`
`getSymmetryInvariant(int iatom)`
`P3`
`getTranslation(int iModel)`
`SymmetryInterface`
`getUnitCell(int modelIndex)`
`SymmetryInterface`
`getUnitCellForAtom(int index)`
`Object`
`getUnitCellPointsWithin(float distance, BS bs, P3 pt, boolean asMap)`
`protected void`
`growAtomArrays(int newLength)`
`void`
`includeAllRelatedFrames(BS bsModels, boolean includeOriginatingModels)`
`protected void`
`initializeBspf()`
///////// iterators //////////
`protected void`
`initializeBspt(int modelIndex)`
`void`
`invertSelected(P3 pt, P4 plane, int iAtom, BS bsAtoms)`
Carries out a stereochemical inversion through a point, across a plane, or at a chirality center.
`boolean`
`isAtomPDB(int i)`
`boolean`
`isBondable(float bondingRadiusA, float bondingRadiusB, float distance2, float minBondDistance2, float bondTolerance)`
`boolean`
`isJmolDataFrame(int modelIndex)`
`boolean`
`isTrajectory(int modelIndex)`
could be the base model or one of the subframes
`boolean`
`isTrajectoryMeasurement(int[] countPlusIndices)`
`boolean`
`isTrajectorySubFrame(int i)`
`int[]`
`makeConnections(float minDistance, float maxDistance, int order, int connectOperation, BS bsA, BS bsB, BS bsBonds, boolean isBonds, boolean addGroup, float energy)`
// super-overloaded methods ///////
`int[]`
`makeConnections2(float minD, float maxD, int order, int connectOperation, BS bsA, BS bsB, BS bsBonds, boolean isBonds, boolean addGroup, float energy, SB state)`
`protected void`
`mergeModelArrays(ModelSet mergeModelSet)`
initial transfer of model data from old to new model set.
`static int`
`modelFileNumberFromFloat(float fDotM)`
`void`
`morphAtoms(BS bsAtoms, P3[][] points, int ipt, float f, P3 ptemp)`
`void`
`morphTrajectories(int m1, int m2, float f)`
`void`
`moveAtoms(M4 m4, M3 mNew, M3 rotation, V3 translation, BS bs, P3 center, boolean isInternal, boolean translationOnly)`
`void`
`recalculateLeadMidpointsAndWingVectors(int modelIndex)`
`void`
`recalculatePolymers(BS bsModelsExcluded)`
`void`
`recalculatePositionDependentQuantities(BS bsAtoms, M4 mat)`
`void`
`refreshDataFramePointGroup(int dataFrameIndex)`
`protected void`
`releaseModelSet()`
`void`
`resetMolecules()`
`void`
`restoreAtomPositions(P3[] apos0)`
`P3[]`
`saveAtomPositions()`
`void`
`saveModelOrientation(int modelIndex, Orientation orientation)`
`protected void`
`setAPm(BS bs, int tok, int iValue, float fValue, String sValue, float[] values, String[] list)`
`void`
`setAtomCoords(BS bs, int tokType, Object xyzValues)`
`void`
`setAtomCoordsRelative(T3 offset, BS bs)`
`void`
`setAtomNamesAndNumbers(int iFirst, int baseAtomIndex, AtomCollection mergeSet, boolean isModelKit)`
`void`
`setAtomProperty(BS bs, int tok, int iValue, float fValue, String sValue, float[] values, String[] list)`
`void`
`setBoundBox(T3 pt1, T3 pt2, boolean byCorner, float scale)`
`void`
`setCentroid(BS bs, int[] minmax)`
deletes molecules based on: CENTROID -- molecular centroid is not in unit cell CENTROID PACKED -- all molecule atoms are not in unit cell called from ScriptEval.finalizeLoad()
`BS`
`setConformation(BS bsAtoms)`
`boolean`
`setCrystallographicDefaults()`
`void`
`setDihedrals(float[] dihedralList, BS[] bsBranches, float f)`
`void`
`setEchoStateActive(boolean TF)`
`void`
`setFrameDelayMs(long millis, BS bsModels)`
`void`
`setFrameTitle(BS bsFrames, Object title)`
`void`
`setInfo(int modelIndex, Object key, Object value)`
`void`
`setIteratorForAtom(AtomIndexIterator iterator, int modelIndex, int atomIndex, float distance, RadiusData rd)`
`void`
`setIteratorForPoint(AtomIndexIterator iterator, int modelIndex, T3 pt, float distance)`
`SymmetryInterface`
`setModelCage(int modelIndex, SymmetryInterface simpleCage)`
This is the model-specific cage created by a UNITCELL or MODELKIT UNITCELL command.
`SymmetryInterface`
`setModelCagePts(int iModel, T3[] originABC, String name)`
`void`
`setModulation(BS bs, boolean isOn, P3 qtOffset, boolean isQ)`
Sets the modulation for all atoms in bs.
`void`
`setPdbConectBonding(int baseAtomIndex, int baseModelIndex, BS bsExclude)`
`void`
`setProteinType(BS bs, STR type)`
`boolean`
`setRotationRadius(int modelIndex, float angstroms)`
`void`
`setSpaceGroup(int mi, SymmetryInterface sg, BS basis)`
Set up all the model-related fields in association with a new space group.
`void`
`setStructureIndexes()`
///////// state definition ///////////
`void`
`setStructureList(Map<STR,float[]> structureList)`
`void`
`setTrajectory(int modelIndex)`
`void`
`setTrajectoryBs(BS bsModels)`
`void`
`translateModel(int iModel, T3 pt)`
move atoms by vector pt; used for co-centering with FRAME ALIGN {atoms} TRUE
`void`
`updateBasisFromSite(int imodel)`

### Methods inherited from class BondCollection

`addConnectedHAtoms, addHBond, allowAromaticBond, assignAromaticBondsBs, bondAtoms, bondMutually, dBb, deleteAllBonds2, deleteConnections, displayBonds, fixD, getAtomBitsMDb, getAtomsConnected, getBondColix1, getBondColix2, getBondIterator, getBondIteratorForType, getBondsForSelectedAtoms, getDefaultMadFromOrder, getOrAddBond, isInRange, releaseModelSetBC, removeUnnecessaryBonds, resetAromatic, setBond, setupBC`

### Methods inherited from class AtomCollection

`addTensor, calculateHydrogens, calculateSurface, calculateVolume, chainToUpper, clearBfactorRange, clearVisibleSets, deleteModelAtoms, fillADa, findMaxRadii, findNearest2, fixFormalCharges, generateCrystalClass, getAllAtomTensors, getAtom, getAtomBitsMDa, getAtomicCharges, getAtomIdentityInfo, getAtomIndices, getAtomInfo, getAtomPointVector, getAtomsFromAtomNumberInFrame, getAtomsInFrame, getAtomsNearPlane, getAtomTensor, getAtomTensorList, getAtomTypes, getBfactor100Hi, getBfactor100Lo, getBFactors, getBondingRadii, getChainBits, getClickableSet, getElementName, getFirstAtomIndexFromAtomNumber, getHybridizationAndAxes, getHydrophobicity, getLabeler, getMaxVanderwaalsRadius, getMissingHydrogenCount, getModulation, getOccupancyFloat, getPartialCharges, getQuaternion, getRadiusVdwJmol, getSeqcodeBits, getSpecNameOrNull, getSurfaceDistanceMax, getTaintedAtoms, getUserSettableType, getVibCoord, getVibration, getVisibleSet, isAtomHidden, isDeleted, isModulated, mergeAtomArrays, modelSetHasVibrationVectors, releaseModelSetAC, scaleVectorsToMax, setAPa, setAtomCoord, setAtomCoord2, setAtomCoordRelative, setAtomData, setAtomName, setAtomNumber, setAtomsCoordRelative, setAtomTensors, setAtomVibrationVector, setBFactor, setBondingRadius, setBsHidden, setElement, setFormalCharges, setOccupancy, setPartialCharge, setPreserveState, setSite, setTaintedAtoms, setupAC, taintAtom, taintAtoms, unTaintAtoms, validateBspf`

### Methods inherited from class Object

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

## Field Details

### haveBioModels

public boolean haveBioModels

### bsSymmetry

protected BS bsSymmetry

### modelSetName

public String modelSetName

### am

public Model[] am

### mc

public int mc
model count

### unitCells

public SymmetryInterface[] unitCells

### haveUnitCells

public boolean haveUnitCells

### closest

protected final Atom[] closest

### modelNumbers

protected int[] modelNumbers

### modelFileNumbers

public int[] modelFileNumbers

### modelNumbersForAtomLabel

public String[] modelNumbersForAtomLabel

### modelNames

public String[] modelNames

### frameTitles

public String[] frameTitles

### elementsPresent

protected BS[] elementsPresent

### isXYZ

protected boolean isXYZ

### modelSetProperties

public Properties modelSetProperties

### msInfo

public Map<String,Object> msInfo

### someModelsHaveSymmetry

protected boolean someModelsHaveSymmetry

### someModelsHaveAromaticBonds

protected boolean someModelsHaveAromaticBonds

### someModelsHaveFractionalCoordinates

protected boolean someModelsHaveFractionalCoordinates

### bboxModels

public BS bboxModels

### stateScripts

public Lst<StateScript> stateScripts

### vibrationSteps

protected Lst<V3[]> vibrationSteps

### bsAll

protected BS bsAll

### sm

public ShapeManager sm

### proteinStructureTainted

public boolean proteinStructureTainted

### htPeaks

public Hashtable<String,BS> htPeaks

### haveJmolDataFrames

public boolean haveJmolDataFrames

### modelSetTypeName

protected String modelSetTypeName

### translations

public P3[] translations

## Constructor Details

### ModelSet

public ModelSet(Viewer vwr, String name)

Parameters:
  `vwr` -
  `name` -

## Method Details

### getBoxInfo

public BoxInfo getBoxInfo()

### releaseModelSet

protected void releaseModelSet()

### getEchoStateActive

public boolean getEchoStateActive()

### setEchoStateActive

public void setEchoStateActive(boolean TF)

### getModelSetTypeName

public String getModelSetTypeName()

### getModelNumberIndex

public int getModelNumberIndex(int modelNumber, boolean useModelNumber, boolean doSetTrajectory)

Parameters:
  `modelNumber` - can be a PDB MODEL number or a simple index number, or a fffnnnnnn f.n number
  `useModelNumber` -
  `doSetTrajectory` -
Returns:
  index

### getModelDataBaseName

public String getModelDataBaseName(BS bsAtoms)

### setTrajectory

public void setTrajectory(int modelIndex)

### getBitSetTrajectories

public BS getBitSetTrajectories()

### setTrajectoryBs

public void setTrajectoryBs(BS bsModels)

### morphTrajectories

public void morphTrajectories(int m1, int m2, float f)

### getTranslation

public P3 getTranslation(int iModel)

### translateModel

public void translateModel(int iModel, T3 pt)
move atoms by vector pt; used for co-centering with FRAME ALIGN {atoms} TRUE

Parameters:
  `iModel` -
  `pt` -

### getFrameOffsets

public P3[] getFrameOffsets(BS bsAtoms, boolean isFull)

### getAtoms

public BS getAtoms(int tokType, Object specInfo)
general lookup for integer type -- from Eval

Parameters:
  `tokType` -
  `specInfo` -
Returns:
  bitset; null only if we mess up with name

### findNearestAtomIndex

public int findNearestAtomIndex(int x, int y, BS bsNot, int min)

### calculatePointGroup

public String calculatePointGroup(BS bsAtoms, P3 center)
////// atom and shape selecting /////////

### getPointGroupInfo

public Map<String,Object> getPointGroupInfo(BS bsAtoms, String type)

### getPointGroupAsString

public String getPointGroupAsString(BS bsAtoms, String type, int index, float scale, P3[] pts, P3 center, String id)

### getDefaultStructure

public String getDefaultStructure(BS bsAtoms, BS bsModified)

### deleteModelBonds

public void deleteModelBonds(int modelIndex)

### makeConnections

public int[] makeConnections(float minDistance, float maxDistance, int order, int connectOperation, BS bsA, BS bsB, BS bsBonds, boolean isBonds, boolean addGroup, float energy)
// super-overloaded methods ///////

### setPdbConectBonding

public void setPdbConectBonding(int baseAtomIndex, int baseModelIndex, BS bsExclude)

### deleteAllBonds

public void deleteAllBonds()

### includeAllRelatedFrames

public void includeAllRelatedFrames(BS bsModels, boolean includeOriginatingModels)

### deleteModels

public BS deleteModels(BS bsModels)

### resetMolecules

public void resetMolecules()

### setAtomProperty

public void setAtomProperty(BS bs, int tok, int iValue, float fValue, String sValue, float[] values, String[] list)

### getFileData

public Object getFileData(int modelIndex)

### addHydrogens

public BS addHydrogens(Lst<Atom> vConnections, P3[] pts)
these are hydrogens that are being added due to a load 2D command and are therefore not to be flagged as NEW

Parameters:
  `vConnections` -
  `pts` -
Returns:
  BitSet of new atoms

### mergeModelArrays

protected void mergeModelArrays(ModelSet mergeModelSet)
initial transfer of model data from old to new model set. Note that all new models are added later, AFTER thfe old ones. This is very important, because all of the old atom numbers must map onto the same numbers in the new model set, or the state script will not run properly, among other problems.

Parameters:
  `mergeModelSet` -

### getUnitCell

public SymmetryInterface getUnitCell(int modelIndex)

Parameters:
  `modelIndex` - Integer.MIN_VALUE requests a return of the cage, without symmetry
Returns:
  Symmetry

### setModelCagePts

public SymmetryInterface setModelCagePts(int iModel, T3[] originABC, String name)

### getModelName

public String getModelName(int modelIndex)

### getModelTitle

public String getModelTitle(int modelIndex)

### getModelFileName

public String getModelFileName(int modelIndex)

### getModelFileType

public String getModelFileType(int modelIndex)

### setFrameTitle

public void setFrameTitle(BS bsFrames, Object title)

### getFrameTitle

public String getFrameTitle(int modelIndex)

### getModelNumberForAtomLabel

public String getModelNumberForAtomLabel(int modelIndex)

### getGroups

public Group[] getGroups()
In versions earlier than 12.1.51, groups[] was a field of ModelCollection. But this is not necessary, and it was wasting space. This method is only called when polymers are recreated.

Returns:
  full array of groups in modelSet

### setCrystallographicDefaults

public boolean setCrystallographicDefaults()

### getBoundBoxCenter

public P3 getBoundBoxCenter(int modelIndex)

### getBoundBoxCornerVector

public V3 getBoundBoxCornerVector()

### getBBoxVertices

public Point3fi[] getBBoxVertices()

### setBoundBox

public void setBoundBox(T3 pt1, T3 pt2, boolean byCorner, float scale)

### getBoundBoxCommand

public String getBoundBoxCommand(boolean withOptions)

### findAtomsInRectangle

public BS findAtomsInRectangle(Rectangle rect)

### getDefaultVdwType

public VDW getDefaultVdwType(int modelIndex)

### setRotationRadius

public boolean setRotationRadius(int modelIndex, float angstroms)

### calcRotationRadius

public float calcRotationRadius(int modelIndex, P3 center, boolean useBoundBox)

### calcBoundBoxDimensions

public void calcBoundBoxDimensions(BS bs, float scale)

### getBoxInfo

public BoxInfo getBoxInfo(BS bs, float scale)

### calcAtomsMinMax

public int calcAtomsMinMax(BS bs, BoxInfo boxInfo)

### calcRotationRadiusBs

public float calcRotationRadiusBs(BS bs)

### getCenterAndPoints

public P3[][] getCenterAndPoints(Lst<Object[]> vAtomSets, boolean addCenters)

Parameters:
  `vAtomSets` -
  `addCenters` -
Returns:
  array of two lists of points, centers first if desired

### getAtomSetCenter

public P3 getAtomSetCenter(BS bs)

### getAverageAtomPoint

public P3 getAverageAtomPoint()

### setAPm

protected void setAPm(BS bs, int tok, int iValue, float fValue, String sValue, float[] values, String[] list)

### addStateScript

public StateScript addStateScript(String script1, BS bsBonds, BS bsAtoms1, BS bsAtoms2, String script2, boolean addFrameNumber, boolean postDefinitions)

### getStructureList

public Map<STR,float[]> getStructureList()

### getInfoM

public Object getInfoM(String keyName)

### getMSInfoB

public boolean getMSInfoB(String keyName)

### isTrajectory

public boolean isTrajectory(int modelIndex)
could be the base model or one of the subframes

Parameters:
  `modelIndex` -
Returns:
  is any part of a trajectory

### isTrajectorySubFrame

public boolean isTrajectorySubFrame(int i)

### isTrajectoryMeasurement

public boolean isTrajectoryMeasurement(int[] countPlusIndices)

### getModelBS

public BS getModelBS(BS atomList, boolean allTrajectories)
Get the set of models associated with a set of atoms. This must allow for appended models.

Parameters:
  `atomList` -
  `allTrajectories` -
Returns:
  bit set of models

### getIterativeModels

public BS getIterativeModels(boolean allowJmolData)
only some models can be iterated through. models for which trajectoryBaseIndexes[i] != i are trajectories only

Parameters:
  `allowJmolData` -
Returns:
  bitset of models

### fillAtomData

public void fillAtomData(AtomData atomData, int mode)

### getModelNumberDotted

public String getModelNumberDotted(int modelIndex)

### getModelNumber

public int getModelNumber(int modelIndex)

### getModelProperty

public String getModelProperty(int modelIndex, String property)

### getModelAuxiliaryInfo

public Map<String,Object> getModelAuxiliaryInfo(int modelIndex)

### setInfo

public void setInfo(int modelIndex, Object key, Object value)

### getInfo

public Object getInfo(int modelIndex, String key)

### getInfoB

protected boolean getInfoB(int modelIndex, String keyName)

### getInfoI

protected int getInfoI(int modelIndex, String keyName)

### getInsertionCountInModel

public int getInsertionCountInModel(int modelIndex)

### modelFileNumberFromFloat

public static int modelFileNumberFromFloat(float fDotM)

### getChainCountInModelWater

public int getChainCountInModelWater(int modelIndex, boolean countWater)

### getGroupCountInModel

public int getGroupCountInModel(int modelIndex)

### calcSelectedGroupsCount

public void calcSelectedGroupsCount()

### isJmolDataFrame

public boolean isJmolDataFrame(int modelIndex)

### getJmolDataFrameIndex

public int getJmolDataFrameIndex(int modelIndex, String type)

### getJmolDataFrameInt

public int getJmolDataFrameInt(int modelIndex, int type)

Parameters:
  `modelIndex` -
  `type` - T.spin, T.ramachandran, T.data, what else?
Returns:
  modelIndex for the frame or -1

### clearDataFrameReference

protected void clearDataFrameReference(int modelIndex)

### getJmolFrameType

public String getJmolFrameType(int modelIndex)

### getJmolFrameTypeInt

public int getJmolFrameTypeInt(int modelIndex)

### getJmolDataSourceFrame

public int getJmolDataSourceFrame(int modelIndex)

### saveModelOrientation

public void saveModelOrientation(int modelIndex, Orientation orientation)

### getModelOrientation

public Orientation getModelOrientation(int modelIndex)

### getPDBHeader

public String getPDBHeader(int modelIndex)

### getFileHeader

public String getFileHeader(int modelIndex)

### getAltLocCountInModel

public int getAltLocCountInModel(int modelIndex)
/////////// individual models ////////////////

### getAltLocIndexInModel

public int getAltLocIndexInModel(int modelIndex, char alternateLocationID)

### getInsertionCodeIndexInModel

public int getInsertionCodeIndexInModel(int modelIndex, char insertionCode)

### getAltLocListInModel

public String getAltLocListInModel(int modelIndex)

### getModelSymmetryCount

public int getModelSymmetryCount(int modelIndex)

### getModelCellRange

public int[] getModelCellRange(int modelIndex)

### getLastVibrationVector

public int getLastVibrationVector(int modelIndex, int tok)

### getModulationList

public Lst<Object> getModulationList(BS bs, char type, P3 t456)

### getElementsPresentBitSet

public BS getElementsPresentBitSet(int modelIndex)

### getMoleculeIndex

public int getMoleculeIndex(int atomIndex, boolean inModel)
////// molecules /////////

### getMoleculeBitSet

public BS getMoleculeBitSet(BS bs)
return cumulative sum of all atoms in molecules containing these atoms

Parameters:
  `bs` -
Returns:
  bitset of atoms

### getMoleculeBitSetForAtom

public BS getMoleculeBitSetForAtom(int atomIndex)

### getModelDipole

public V3 getModelDipole(int modelIndex)

### calculateMolecularDipole

public V3 calculateMolecularDipole(int modelIndex, BS bsAtoms) throws JmolAsyncException, RuntimeException

Throws:
  `JmolAsyncException`
  `RuntimeException`

### getMoleculeCountInModel

public int getMoleculeCountInModel(int modelIndex)

### calcSelectedMoleculesCount

public void calcSelectedMoleculesCount()

### setCentroid

public void setCentroid(BS bs, int[] minmax)
deletes molecules based on: CENTROID -- molecular centroid is not in unit cell CENTROID PACKED -- all molecule atoms are not in unit cell called from ScriptEval.finalizeLoad()

Parameters:
  `bs` -
  `minmax` - fractional [xmin, ymin, zmin, xmax, ymax, zmax, 1=packed]

### getMolecules

public JmolMolecule[] getMolecules()

### initializeBspf

protected void initializeBspf()
///////// iterators //////////

### initializeBspt

protected void initializeBspt(int modelIndex)

### setIteratorForPoint

public void setIteratorForPoint(AtomIndexIterator iterator, int modelIndex, T3 pt, float distance)

### setIteratorForAtom

public void setIteratorForAtom(AtomIndexIterator iterator, int modelIndex, int atomIndex, float distance, RadiusData rd)

Parameters:
  `iterator` -
  `modelIndex` -
  `atomIndex` -
  `distance` - if -1, then this will be set later, and here we are just running a CubeIterator, no atom-atom distances, no atom sets, no "hemisphere".
  `rd` -

### getSelectedAtomIterator

public AtomIndexIterator getSelectedAtomIterator(BS bsSelected, boolean isGreaterOnly, boolean modelZeroBased, boolean hemisphereOnly, boolean isMultiModel)

Parameters:
  `bsSelected` -
  `isGreaterOnly` -
  `modelZeroBased` -
  `hemisphereOnly` -
  `isMultiModel` -
Returns:
  an iterator

### getBondCountInModel

public int getBondCountInModel(int modelIndex)
/////// bonds /////////

Overrides:
  `getBondCountInModel` in class `BondCollection`
Parameters:
  `modelIndex` - the model of interest or -1 for all
Returns:
  the actual number of connections

### getAtomCountInModel

public int getAtomCountInModel(int modelIndex)

### getModelAtomBitSetIncludingDeletedBs

public BS getModelAtomBitSetIncludingDeletedBs(BS bsModels)
note -- this method returns ALL atoms, including deleted.

Parameters:
  `bsModels` -
Returns:
  bitset of atoms

### getModelAtomBitSetIncludingDeleted

public BS getModelAtomBitSetIncludingDeleted(int modelIndex, boolean asCopy)
Note that this method returns all atoms, included deleted ones. If you don't want deleted atoms, then use vwr.getModelAtomBitSetUndeleted(modelIndex, TRUE)

Parameters:
  `modelIndex` -
  `asCopy` - MUST BE TRUE IF THE BITSET IS GOING TO BE MODIFIED!
Returns:
  either the actual bitset or a copy

### getAtomBitsMaybeDeleted

protected BS getAtomBitsMaybeDeleted(int tokType, Object specInfo)

### getAtomsWithinRadius

public BS getAtomsWithinRadius(float distance, BS bs, boolean withinAllModels, RadiusData rd, BS bsSubset)
Get atoms within a specific distance of any atom in a specific set of atoms either within all models or within just the model(s) of those atoms

Parameters:
  `distance` -
  `bs` -
  `withinAllModels` -
  `rd` -
  `bsSubset` - limit selection to this subset of atoms
Returns:
  the set of atoms

### getAtomsWithin

public BS getAtomsWithin(float distance, T3 coord, BS bsResult, int modelIndex)

Parameters:
  `distance` - negative to check all unitCell distances
  `coord` -
  `bsResult` -
  `modelIndex` -
Returns:
  bitset

### deleteBonds

public void deleteBonds(BS bsBonds, boolean isFullModel)

### makeConnections2

public int[] makeConnections2(float minD, float maxD, int order, int connectOperation, BS bsA, BS bsB, BS bsBonds, boolean isBonds, boolean addGroup, float energy, SB state)

### autoBondBs4

public int autoBondBs4(BS bsA, BS bsB, BS bsExclude, BS bsBonds, short mad, boolean preJmol11_9_24, SB state)

### isBondable

public boolean isBondable(float bondingRadiusA, float bondingRadiusB, float distance2, float minBondDistance2, float bondTolerance)

### autoHbond

public int autoHbond(BS bsA, BS bsB, boolean onlyIfHaveCalculated)
a generalized formation of HBONDS, carried out in relation to calculate HBONDS {atomsFrom} {atomsTo}. The calculation can create pseudo-H bonds for files that do not contain H atoms.

Parameters:
  `bsA` - "from" set (must contain H if that is desired)
  `bsB` - "to" set
  `onlyIfHaveCalculated` -
Returns:
  negative number of pseudo-hbonds or number of actual hbonds formed

### setStructureIndexes

public void setStructureIndexes()
///////// state definition ///////////

### getModelInfoAsString

public String getModelInfoAsString()

### getSymmetryInfoAsString

public String getSymmetryInfoAsString()

### createModels

public void createModels(int n)

### deleteAtoms

public void deleteAtoms(BS bs)

### clearDB

public void clearDB(int atomIndex)

### adjustAtomArrays

public void adjustAtomArrays(int[] map, int i0, int ac)

### growAtomArrays

protected void growAtomArrays(int newLength)

### addAtom

public Atom addAtom(int modelIndex, Group group, int atomicAndIsotopeNumber, String atomName, String atomType, int atomSerial, int atomSeqID, int atomSite, P3 xyz, float radius, V3 vib, int formalCharge, float partialCharge, float occupancy, float bfactor, Lst<Object> tensors, boolean isHetero, boolean isNegDisorder, byte specialAtomID, BS atomSymmetry, float bondRadius)

### getInlineData

public String getInlineData(int modelIndex)

### isAtomPDB

public boolean isAtomPDB(int i)

### setAtomNamesAndNumbers

public void setAtomNamesAndNumbers(int iFirst, int baseAtomIndex, AtomCollection mergeSet, boolean isModelKit)

Parameters:
  `iFirst` - 0 from ModelLoader.freeze; -1 from Viewer.assignAtom
  `baseAtomIndex` -
  `mergeSet` -
  `isModelKit` -

### connect

public void connect(float[][] connections)

### setFrameDelayMs

public void setFrameDelayMs(long millis, BS bsModels)

### getFrameDelayMs

public long getFrameDelayMs(int i)

### getModelIndexFromId

public int getModelIndexFromId(String id)

### getModelSetAuxiliaryInfo

public Map<String,Object> getModelSetAuxiliaryInfo(BS bsModels)
Retrieve the main modelset info Hashtable (or a new non-null Hashtable) with an up-to-date "models" key.

Parameters:
  `bsModels` -
Returns:
  Map

### getDihedralMap

public int[][] getDihedralMap(int[] alist)

### setModulation

public void setModulation(BS bs, boolean isOn, P3 qtOffset, boolean isQ)
Sets the modulation for all atoms in bs.

Parameters:
  `bs` -
  `isOn` -
  `qtOffset` - multiples of q or just t.
  `isQ` - true if multiples of q.

### getBoundBoxOrientation

public Object getBoundBoxOrientation(int type, BS bsAtoms, P3[] points)

Parameters:
  `type` - volume, best, x, y, z, unitcell
  `bsAtoms` -
  `points` - optionally use points, as from $isosurface1, ignoring bsAtoms
Returns:
  quaternion for best rotation or, for volume, string with volume \t{dx dy dz}

### getUnitCellForAtom

public SymmetryInterface getUnitCellForAtom(int index)

### clearCache

public void clearCache()

### getSymMatrices

public M4[] getSymMatrices(int modelIndex)

### getSymmetryInvariant

public int[] getSymmetryInvariant(int iatom)

### getBsBranches

public BS[] getBsBranches(float[] dihedralList)

### recalculatePositionDependentQuantities

public void recalculatePositionDependentQuantities(BS bsAtoms, M4 mat)

### moveAtoms

public void moveAtoms(M4 m4, M3 mNew, M3 rotation, V3 translation, BS bs, P3 center, boolean isInternal, boolean translationOnly)

### setDihedrals

public void setDihedrals(float[] dihedralList, BS[] bsBranches, float f)

### setAtomCoordsRelative

public void setAtomCoordsRelative(T3 offset, BS bs)

### setAtomCoords

public void setAtomCoords(BS bs, int tokType, Object xyzValues)

### invertSelected

public void invertSelected(P3 pt, P4 plane, int iAtom, BS bsAtoms)
Carries out a stereochemical inversion through a point, across a plane, or at a chirality center.

Parameters:
  `pt` - point to invert around if not null
  `plane` - plane to invert across if not null
  `iAtom` - atom to switch two groups on if >= 0
  `bsAtoms` - atoms to switch for the atom option

### getCellWeights

public float[] getCellWeights(BS bsAtoms)

### getAtomGroupQuaternions

public Quat[] getAtomGroupQuaternions(BS bsAtoms, int nMax, char qtype)

### getConformation

public BS getConformation(int modelIndex, int conformationIndex, boolean doSet, BS bsSelected)

### getSequenceBits

public BS getSequenceBits(String specInfo, BS bsAtoms, BS bsResult)
// bio-only methods /////

### getBioPolymerCountInModel

public int getBioPolymerCountInModel(int modelIndex)

### getPolymerPointsAndVectors

public void getPolymerPointsAndVectors(BS bs, Lst<P3[]> vList, boolean isTraceAlpha, float sheetSmoothing)

### recalculateLeadMidpointsAndWingVectors

public void recalculateLeadMidpointsAndWingVectors(int modelIndex)

### calcRasmolHydrogenBonds

public void calcRasmolHydrogenBonds(BS bsA, BS bsB, Lst<Bond> vHBonds, boolean nucleicOnly, int nMax, boolean dsspIgnoreHydrogens, BS bsHBonds)
These are not actual hydrogen bonds. They are N-O bonds in proteins and nucleic acids The method is called by AminoPolymer and NucleicPolymer methods, which are indirectly called by ModelCollection.autoHbond

Parameters:
  `bsA` -
  `bsB` -
  `vHBonds` - vector of bonds to fill; if null, creates the HBonds
  `nucleicOnly` -
  `nMax` -
  `dsspIgnoreHydrogens` -
  `bsHBonds` -

### calculateStraightnessAll

public void calculateStraightnessAll()

### calculateStruts

public int calculateStruts(BS bs1, BS bs2)
see comments in org.jmol.modelsetbio.AlphaPolymer.java Struts are calculated for atoms in bs1 connecting to atoms in bs2. The two bitsets may overlap.

Parameters:
  `bs1` -
  `bs2` -
Returns:
  number of struts found

### getGroupsWithin

public BS getGroupsWithin(int nResidues, BS bs)

### getProteinStructureState

public String getProteinStructureState(BS bsAtoms, int mode)

### calculateStructures

public String calculateStructures(BS bsAtoms, boolean asDSSP, boolean doReport, boolean dsspIgnoreHydrogen, boolean setStructure, int version)

### calculateStructuresAllExcept

public String calculateStructuresAllExcept(BS alreadyDefined, boolean asDSSP, boolean doReport, boolean dsspIgnoreHydrogen, boolean setStructure, boolean includeAlpha, int version)
allows rebuilding of PDB structures; also accessed by ModelManager from Eval

Parameters:
  `alreadyDefined` - set to skip calculation
  `asDSSP` -
  `doReport` -
  `dsspIgnoreHydrogen` -
  `setStructure` -
  `includeAlpha` -
  `version` - TODO
Returns:
  report

### recalculatePolymers

public void recalculatePolymers(BS bsModelsExcluded)

### calculatePolymers

protected void calculatePolymers(Group[] groups, int groupCount, int baseGroupIndex, BS modelsExcluded)

### calcSelectedMonomersCount

public void calcSelectedMonomersCount()

### setProteinType

public void setProteinType(BS bs, STR type)

### setStructureList

public void setStructureList(Map<STR,float[]> structureList)

### setConformation

public BS setConformation(BS bsAtoms)

### getHeteroList

public Map<String,String> getHeteroList(int modelIndex)

### getUnitCellPointsWithin

public Object getUnitCellPointsWithin(float distance, BS bs, P3 pt, boolean asMap)

### calculateDssrProperty

public void calculateDssrProperty(String dataType)

### getAtomicDSSRData

public float getAtomicDSSRData(int i)

### getAtomCIPChiralityCode

public int getAtomCIPChiralityCode(Atom atom)
Determine the Cahn-Ingold-Prelog R/S chirality of an atom

Parameters:
  `atom` -
Returns:
  [0:none, 1:R, 2:S]

### calculateChiralityForAtoms

public String calculateChiralityForAtoms(BS bsAtoms, boolean withReturn)

### getPointTransf

public void getPointTransf(int i, Atom a, Quat q, P3 pTemp)
pick up the appropriate value for this atom

Parameters:
  `i` -
  `a` -
  `q` -
  `pTemp` -

### getSymmetryEquivAtoms

public BS getSymmetryEquivAtoms(BS bsAtoms, SymmetryInterface sym, BS bsModelAtoms)
Return a bitset of equivalent atoms

Parameters:
  `bsAtoms` -
  `sym` -
  `bsModelAtoms` -
Returns:
  bitset of equivalent atoms

### getSymmetryEquivAtomsForAtom

public void getSymmetryEquivAtomsForAtom(int i, BS bsAtoms, BS bsCheck, BS bsEquiv)
Set a bitset of the equivalent atoms of an atom.

Parameters:
  `i` -
  `bsAtoms` - optional bitset of atoms remaining of original set of atoms
  `bsCheck` - bitset atoms to check; if bsAtoms is not null, also cleared of found atoms
  `bsEquiv` - bitset to return

### setSpaceGroup

public void setSpaceGroup(int mi, SymmetryInterface sg, BS basis)
Set up all the model-related fields in association with a new space group. The basis may or may not be known. Passing an empty bitset to ths method will fill it with the basis as determined by trying all the operators.

Parameters:
  `mi` -
  `sg` -
  `basis` -

### setModelCage

public SymmetryInterface setModelCage(int modelIndex, SymmetryInterface simpleCage)
This is the model-specific cage created by a UNITCELL or MODELKIT UNITCELL command. It will be used provided it is different from the symmetry unit cell associated with a particular space group setting, if it exists.

Parameters:
  `modelIndex` -
  `simpleCage` -
Returns:
  simpleCage

### getBasisAtom

public Atom getBasisAtom(int iatom, boolean doCheck)

### updateBasisFromSite

public void updateBasisFromSite(int imodel)

### getConnectingAtoms

public BS getConnectingAtoms(BS bsAtoms, BS bsFixed)

### saveAtomPositions

public P3[] saveAtomPositions()

### restoreAtomPositions

public void restoreAtomPositions(P3[] apos0)

### clearUnitCell

public void clearUnitCell(int modelIndex)

### fixDeletedBonds

public BS fixDeletedBonds(BS bs)

### getEquivalentAtoms

public BS getEquivalentAtoms(int iatom)

### morphAtoms

public void morphAtoms(BS bsAtoms, P3[][] points, int ipt, float f, P3 ptemp)

### getCurrentSpinAtoms

public BS getCurrentSpinAtoms()
include this frame and all related frames

Returns:
  atoms with spin, or at least vibrations

### getSpin

public int getSpin(int atomIndex)

### refreshDataFramePointGroup

public void refreshDataFramePointGroup(int dataFrameIndex)