# Class Model

java.lang.Object
org.jmol.modelset.Model

Direct Known Subclasses:
  `BioModel`

public class Model extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`int`
`act`
atom count; includes deleted atoms only if not being nulled (Jmol 14.31 or below)
`int`
`altLocCount`
`Map<String,Object>`
`auxiliaryInfo`
`SymmetryInterface`
`biosymmetry`
`BS`
`bsAsymmetricUnit`
tracks all presymmetry asymmetric unit atoms; atoms added using the ModelKit will add to this.
`BS`
`bsAtoms`
Note that this bitset may or may not include bsAtomsDeleted
`BS`
`bsAtomsDeleted`
`protected int`
`chainCount`
`Chain[]`
`chains`
`Map<String,Integer>`
`dataFrames`
`int`
`dataSourceFrame`
`Map<String,Object>`
`dssrCache`
`int`
`firstAtomIndex`
`long`
`frameDelay`
`int`
`groupCount`
`boolean`
`hasRasmolHBonds`
`int`
`hydrogenCount`
`boolean`
`isBioModel`
`boolean`
`isJmolDataFrame`
`boolean`
`isModelKit`
`boolean`
`isOrderly`
a flag that, when false, indicates that the model has atoms in different regions of the Atom[] array
`boolean`
`isPdbWithMultipleBonds`
`String`
`jmolFrameType`
`int`
`jmolFrameTypeInt`
`SB`
`loadScript`
`String`
`loadState`
`M4`
`mat4`
mat4 tracks the rotation/translation of the full model using rotateSelected or translateSelected
`int`
`modelIndex`
`int`
`moleculeCount`
`ModelSet`
`ms`
BE CAREFUL: FAILURE TO NULL REFERENCES TO modelSet WILL PREVENT FINALIZATION AND CREATE A MEMORY LEAK.
`Orientation`
`orientation`
`String`
`pdbID`
`Properties`
`properties`
`int`
`selectedTrajectory`
`SymmetryInterface`
`simpleCage`
`boolean`
`structureTainted`
`int`
`trajectoryBaseIndex`
`P3[]`
`uvw`
`P3[]`
`uvw0`

## Constructor Summary

Constructors
Constructor
Description
`Model()`

## Method Summary

Modifier and Type
Method
Description
`void`
`fixIndices(int modelIndex, int nAtomsDeleted, BS bsDeleted)`
`protected void`
`fixIndicesM(int modelIndex, int nAtomsDeleted, BS bsDeleted)`
`boolean`
`freeze()`
`protected void`
`freezeM()`
`int`
`getBondCount()`
`Chain`
`getChainAt(int i)`
`int`
`getChainCount(boolean countWater)`
`int`
`getGroupCount()`
`int`
`getTrueAtomCount()`
not actually accessed -- just pointing out what it is
`M3`
`getUVWMatrix(boolean isUVW0)`
`boolean`
`isContainedIn(BS bs)`
`void`
`resetBoundCount()`
`void`
`resetDSSR(boolean totally)`
Something has changed; clear the DSSR cache and possibly remove DSSR entirely.
`Model`
`set(ModelSet modelSet, int modelIndex, int trajectoryBaseIndex, Map<String,Object> jmolData, Properties properties, Map<String,Object> auxiliaryInfo)`
`void`
`setSimpleCage(SymmetryInterface ucell)`
`protected void`
`setupArrays()`

### Methods inherited from class Object

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

## Field Details

### ms

public ModelSet ms
BE CAREFUL: FAILURE TO NULL REFERENCES TO modelSet WILL PREVENT FINALIZATION AND CREATE A MEMORY LEAK.

### mat4

public M4 mat4
mat4 tracks the rotation/translation of the full model using rotateSelected or translateSelected

### modelIndex

public int modelIndex

### isBioModel

public boolean isBioModel

### isPdbWithMultipleBonds

public boolean isPdbWithMultipleBonds

### isModelKit

public boolean isModelKit

### chains

public Chain[] chains

### simpleCage

public SymmetryInterface simpleCage

### dssrCache

public Map<String,Object> dssrCache

### orientation

public Orientation orientation

### auxiliaryInfo

public Map<String,Object> auxiliaryInfo

### properties

public Properties properties

### biosymmetry

public SymmetryInterface biosymmetry

### loadState

public String loadState

### loadScript

public SB loadScript

### hasRasmolHBonds

public boolean hasRasmolHBonds

### structureTainted

public boolean structureTainted

### isJmolDataFrame

public boolean isJmolDataFrame

### trajectoryBaseIndex

public int trajectoryBaseIndex

### altLocCount

public int altLocCount

### act

public int act
atom count; includes deleted atoms only if not being nulled (Jmol 14.31 or below)

### chainCount

protected int chainCount

### groupCount

public int groupCount

### hydrogenCount

public int hydrogenCount

### moleculeCount

public int moleculeCount

### firstAtomIndex

public int firstAtomIndex

### bsAtoms

public BS bsAtoms
Note that this bitset may or may not include bsAtomsDeleted

### bsAtomsDeleted

public BS bsAtomsDeleted

### frameDelay

public long frameDelay

### selectedTrajectory

public int selectedTrajectory

### jmolFrameType

public String jmolFrameType

### jmolFrameTypeInt

public int jmolFrameTypeInt

### dataFrames

public Map<String,Integer> dataFrames

### dataSourceFrame

public int dataSourceFrame

### uvw

public P3[] uvw

### uvw0

public P3[] uvw0

### pdbID

public String pdbID

### isOrderly

public boolean isOrderly
a flag that, when false, indicates that the model has atoms in different regions of the Atom[] array

### bsAsymmetricUnit

public BS bsAsymmetricUnit
tracks all presymmetry asymmetric unit atoms; atoms added using the ModelKit will add to this.

## Constructor Details

### Model

public Model()

## Method Details

### setupArrays

protected void setupArrays()

### set

public Model set(ModelSet modelSet, int modelIndex, int trajectoryBaseIndex, Map<String,Object> jmolData, Properties properties, Map<String,Object> auxiliaryInfo)

### getTrueAtomCount

public int getTrueAtomCount()
not actually accessed -- just pointing out what it is

Returns:
  true atom count

### isContainedIn

public boolean isContainedIn(BS bs)

Parameters:
  `bs` -
Returns:
  true if all undeleted atom bits in this model are in bs

### resetBoundCount

public void resetBoundCount()

### getBondCount

public int getBondCount()

### getChainCount

public int getChainCount(boolean countWater)

### getGroupCount

public int getGroupCount()

### getChainAt

public Chain getChainAt(int i)

### resetDSSR

public void resetDSSR(boolean totally)
Something has changed; clear the DSSR cache and possibly remove DSSR entirely.

Parameters:
  `totally` - set TRUE if atoms have moved so we force a new DSSR calculation.

### fixIndices

public void fixIndices(int modelIndex, int nAtomsDeleted, BS bsDeleted)

### fixIndicesM

protected void fixIndicesM(int modelIndex, int nAtomsDeleted, BS bsDeleted)

### freeze

public boolean freeze()

### freezeM

protected void freezeM()

### setSimpleCage

public void setSimpleCage(SymmetryInterface ucell)

### getUVWMatrix

public M3 getUVWMatrix(boolean isUVW0)