Class ModelSet

    • Field Detail

      • haveBioModels

        public boolean haveBioModels
      • bsSymmetry

        protected javajs.util.BS bsSymmetry
      • modelSetName

        public java.lang.String modelSetName
      • mc

        public int mc
        model count
      • haveUnitCells

        public boolean haveUnitCells
      • closest

        protected final Atom[] closest
      • modelNumbers

        protected int[] modelNumbers
      • modelFileNumbers

        public int[] modelFileNumbers
      • modelNumbersForAtomLabel

        public java.lang.String[] modelNumbersForAtomLabel
      • modelNames

        public java.lang.String[] modelNames
      • frameTitles

        public java.lang.String[] frameTitles
      • elementsPresent

        protected javajs.util.BS[] elementsPresent
      • isXYZ

        protected boolean isXYZ
      • modelSetProperties

        public java.util.Properties modelSetProperties
      • msInfo

        public java.util.Map<java.lang.String,​java.lang.Object> msInfo
      • someModelsHaveSymmetry

        protected boolean someModelsHaveSymmetry
      • someModelsHaveAromaticBonds

        protected boolean someModelsHaveAromaticBonds
      • someModelsHaveFractionalCoordinates

        protected boolean someModelsHaveFractionalCoordinates
      • isBbcageDefault

        private boolean isBbcageDefault
      • bboxModels

        public javajs.util.BS bboxModels
      • bboxAtoms

        private javajs.util.BS bboxAtoms
      • boxInfo

        private final BoxInfo boxInfo
      • stateScripts

        public javajs.util.Lst<StateScript> stateScripts
      • thisStateModel

        private int thisStateModel
      • vibrationSteps

        protected javajs.util.Lst<javajs.util.V3[]> vibrationSteps
      • selectedMolecules

        private javajs.util.BS selectedMolecules
      • showRebondTimes

        boolean showRebondTimes
      • bsAll

        protected javajs.util.BS bsAll
      • hbondMinRasmol

        private static float hbondMinRasmol
      • proteinStructureTainted

        public boolean proteinStructureTainted
      • htPeaks

        public java.util.Hashtable<java.lang.String,​javajs.util.BS> htPeaks
      • vOrientations

        private javajs.util.Quat[] vOrientations
      • ptTemp

        private final javajs.util.P3 ptTemp
      • ptTemp1

        private final javajs.util.P3 ptTemp1
      • ptTemp2

        private final javajs.util.P3 ptTemp2
      • matTemp

        private final javajs.util.M3 matTemp
      • matInv

        private final javajs.util.M3 matInv
      • mat4

        private final javajs.util.M4 mat4
      • mat4t

        private final javajs.util.M4 mat4t
      • vTemp

        private final javajs.util.V3 vTemp
      • echoShapeActive

        private boolean echoShapeActive
      • modelSetTypeName

        protected java.lang.String modelSetTypeName
      • translations

        public javajs.util.P3[] translations
      • defaultBBox

        private BoxInfo defaultBBox
      • maxBondWarned

        private boolean maxBondWarned
    • Constructor Detail

      • ModelSet

        public ModelSet​(Viewer vwr,
                        java.lang.String name)
        Parameters:
        vwr -
        name -
    • Method Detail

      • getBoxInfo

        public BoxInfo getBoxInfo()
      • releaseModelSet

        protected void releaseModelSet()
      • getEchoStateActive

        public boolean getEchoStateActive()
      • setEchoStateActive

        public void setEchoStateActive​(boolean TF)
      • getModelSetTypeName

        public java.lang.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 java.lang.String getModelDataBaseName​(javajs.util.BS bsAtoms)
      • setTrajectory

        public void setTrajectory​(int modelIndex)
      • getBitSetTrajectories

        public javajs.util.BS getBitSetTrajectories()
      • setTrajectoryBs

        public void setTrajectoryBs​(javajs.util.BS bsModels)
      • morphTrajectories

        public void morphTrajectories​(int m1,
                                      int m2,
                                      float f)
      • getTranslation

        public javajs.util.P3 getTranslation​(int iModel)
      • translateModel

        public void translateModel​(int iModel,
                                   javajs.util.T3 pt)
        move atoms by vector pt; used for co-centering with FRAME ALIGN {atoms} TRUE
        Parameters:
        iModel -
        pt -
      • getFrameOffsets

        public javajs.util.P3[] getFrameOffsets​(javajs.util.BS bsAtoms,
                                                boolean isFull)
      • getAtoms

        public javajs.util.BS getAtoms​(int tokType,
                                       java.lang.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,
                                        javajs.util.BS bsNot,
                                        int min)
      • calculatePointGroup

        public java.lang.String calculatePointGroup​(javajs.util.BS bsAtoms)
      • getPointGroupInfo

        public java.util.Map<java.lang.String,​java.lang.Object> getPointGroupInfo​(javajs.util.BS bsAtoms)
      • getPointGroupAsString

        public java.lang.String getPointGroupAsString​(javajs.util.BS bsAtoms,
                                                      java.lang.String type,
                                                      int index,
                                                      float scale,
                                                      javajs.util.P3[] pts,
                                                      javajs.util.P3 center,
                                                      java.lang.String id)
      • calculatePointGroupForFirstModel

        private java.lang.Object calculatePointGroupForFirstModel​(javajs.util.BS bsAtoms,
                                                                  boolean doAll,
                                                                  boolean asInfo,
                                                                  java.lang.String type,
                                                                  int index,
                                                                  float scale,
                                                                  javajs.util.T3[] pts,
                                                                  javajs.util.P3 center,
                                                                  java.lang.String id)
      • getDefaultStructure

        public java.lang.String getDefaultStructure​(javajs.util.BS bsAtoms,
                                                    javajs.util.BS bsModified)
      • deleteModelBonds

        public void deleteModelBonds​(int modelIndex)
      • makeConnections

        public int[] makeConnections​(float minDistance,
                                     float maxDistance,
                                     int order,
                                     int connectOperation,
                                     javajs.util.BS bsA,
                                     javajs.util.BS bsB,
                                     javajs.util.BS bsBonds,
                                     boolean isBonds,
                                     boolean addGroup,
                                     float energy)
      • setPdbConectBonding

        public void setPdbConectBonding​(int baseAtomIndex,
                                        int baseModelIndex,
                                        javajs.util.BS bsExclude)
      • deleteAllBonds

        public void deleteAllBonds()
      • includeAllRelatedFrames

        private void includeAllRelatedFrames​(javajs.util.BS bsModels)
      • deleteModels

        public javajs.util.BS deleteModels​(javajs.util.BS bsModels)
      • resetMolecules

        public void resetMolecules()
      • resetChirality

        private void resetChirality()
      • deleteModel

        private void deleteModel​(int modelIndex,
                                 javajs.util.BS bsModelAtoms,
                                 javajs.util.BS bsBonds)
      • setAtomProperty

        public void setAtomProperty​(javajs.util.BS bs,
                                    int tok,
                                    int iValue,
                                    float fValue,
                                    java.lang.String sValue,
                                    float[] values,
                                    java.lang.String[] list)
      • getFileData

        public java.lang.Object getFileData​(int modelIndex)
      • addHydrogens

        public javajs.util.BS addHydrogens​(javajs.util.Lst<Atom> vConnections,
                                           javajs.util.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 -
      • setModelCage

        public void setModelCage​(int modelIndex,
                                 SymmetryInterface simpleCage)
      • getModelName

        public java.lang.String getModelName​(int modelIndex)
      • getModelTitle

        public java.lang.String getModelTitle​(int modelIndex)
      • getModelFileName

        public java.lang.String getModelFileName​(int modelIndex)
      • getModelFileType

        public java.lang.String getModelFileType​(int modelIndex)
      • setFrameTitle

        public void setFrameTitle​(javajs.util.BS bsFrames,
                                  java.lang.Object title)
      • getFrameTitle

        public java.lang.String getFrameTitle​(int modelIndex)
      • getModelNumberForAtomLabel

        public java.lang.String getModelNumberForAtomLabel​(int modelIndex)
      • getGroups

        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
      • getUnitCellParams

        public float[] getUnitCellParams()
        deprecated due to multimodel issues, but required by an interface -- do NOT remove.
        Returns:
        just the first unit cell
      • setCrystallographicDefaults

        public boolean setCrystallographicDefaults()
      • getBoundBoxCenter

        public javajs.util.P3 getBoundBoxCenter​(int modelIndex)
      • getBoundBoxCornerVector

        public javajs.util.V3 getBoundBoxCornerVector()
      • getBBoxVertices

        public Point3fi[] getBBoxVertices()
      • setBoundBox

        public void setBoundBox​(javajs.util.T3 pt1,
                                javajs.util.T3 pt2,
                                boolean byCorner,
                                float scale)
      • getBoundBoxCommand

        public java.lang.String getBoundBoxCommand​(boolean withOptions)
      • findAtomsInRectangle

        public javajs.util.BS findAtomsInRectangle​(Rectangle rect)
      • getDefaultVdwType

        public VDW getDefaultVdwType​(int modelIndex)
      • setRotationRadius

        public boolean setRotationRadius​(int modelIndex,
                                         float angstroms)
      • calcRotationRadius

        public float calcRotationRadius​(int modelIndex,
                                        javajs.util.P3 center,
                                        boolean useBoundBox)
      • calcBoundBoxDimensions

        public void calcBoundBoxDimensions​(javajs.util.BS bs,
                                           float scale)
      • getDefaultBoundBox

        private BoxInfo getDefaultBoundBox()
        The default bounding box is created when the LOAD .... FILL BOUNDBOX or FILL UNITCELL is use.
        Returns:
        default bounding box, possibly null
      • getBoxInfo

        public BoxInfo getBoxInfo​(javajs.util.BS bs,
                                  float scale)
      • calcAtomsMinMax

        public int calcAtomsMinMax​(javajs.util.BS bs,
                                   BoxInfo boxInfo)
      • calcUnitCellMinMax

        private void calcUnitCellMinMax()
      • calcRotationRadiusBs

        public float calcRotationRadiusBs​(javajs.util.BS bs)
      • getCenterAndPoints

        public javajs.util.P3[][] getCenterAndPoints​(javajs.util.Lst<java.lang.Object[]> vAtomSets,
                                                     boolean addCenters)
        Parameters:
        vAtomSets -
        addCenters -
        Returns:
        array of two lists of points, centers first if desired
      • getAtomSetCenter

        public javajs.util.P3 getAtomSetCenter​(javajs.util.BS bs)
      • getAverageAtomPoint

        public javajs.util.P3 getAverageAtomPoint()
      • setAPm

        protected void setAPm​(javajs.util.BS bs,
                              int tok,
                              int iValue,
                              float fValue,
                              java.lang.String sValue,
                              float[] values,
                              java.lang.String[] list)
      • addStateScript

        public StateScript addStateScript​(java.lang.String script1,
                                          javajs.util.BS bsBonds,
                                          javajs.util.BS bsAtoms1,
                                          javajs.util.BS bsAtoms2,
                                          java.lang.String script2,
                                          boolean addFrameNumber,
                                          boolean postDefinitions)
      • freezeModels

        void freezeModels()
      • getStructureList

        public java.util.Map<STR,​float[]> getStructureList()
      • getInfoM

        public java.lang.Object getInfoM​(java.lang.String keyName)
      • getMSInfoB

        public boolean getMSInfoB​(java.lang.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 javajs.util.BS getModelBS​(javajs.util.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:
      • getIterativeModels

        public javajs.util.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 java.lang.String getModelNumberDotted​(int modelIndex)
      • getModelNumber

        public int getModelNumber​(int modelIndex)
      • getModelProperty

        public java.lang.String getModelProperty​(int modelIndex,
                                                 java.lang.String property)
      • getModelAuxiliaryInfo

        public java.util.Map<java.lang.String,​java.lang.Object> getModelAuxiliaryInfo​(int modelIndex)
      • setInfo

        public void setInfo​(int modelIndex,
                            java.lang.Object key,
                            java.lang.Object value)
      • getInfo

        public java.lang.Object getInfo​(int modelIndex,
                                        java.lang.String key)
      • getInfoB

        protected boolean getInfoB​(int modelIndex,
                                   java.lang.String keyName)
      • getInfoI

        protected int getInfoI​(int modelIndex,
                               java.lang.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()
      • isJmolDataFrameForModel

        public boolean isJmolDataFrameForModel​(int modelIndex)
      • isJmolDataFrameForAtom

        private boolean isJmolDataFrameForAtom​(Atom atom)
      • setJmolDataFrame

        public void setJmolDataFrame​(java.lang.String type,
                                     int modelIndex,
                                     int modelDataIndex)
      • getJmolDataFrameIndex

        public int getJmolDataFrameIndex​(int modelIndex,
                                         java.lang.String type)
      • clearDataFrameReference

        protected void clearDataFrameReference​(int modelIndex)
      • getJmolFrameType

        public java.lang.String getJmolFrameType​(int modelIndex)
      • getJmolDataSourceFrame

        public int getJmolDataSourceFrame​(int modelIndex)
      • saveModelOrientation

        public void saveModelOrientation​(int modelIndex,
                                         Orientation orientation)
      • getModelOrientation

        public Orientation getModelOrientation​(int modelIndex)
      • getPDBHeader

        public java.lang.String getPDBHeader​(int modelIndex)
      • getFileHeader

        public java.lang.String getFileHeader​(int modelIndex)
      • getAltLocCountInModel

        public int getAltLocCountInModel​(int modelIndex)
      • getAltLocIndexInModel

        public int getAltLocIndexInModel​(int modelIndex,
                                         char alternateLocationID)
      • getInsertionCodeIndexInModel

        public int getInsertionCodeIndexInModel​(int modelIndex,
                                                char insertionCode)
      • getAltLocListInModel

        public java.lang.String getAltLocListInModel​(int modelIndex)
      • getInsertionListInModel

        private java.lang.String getInsertionListInModel​(int modelIndex)
      • getModelSymmetryCount

        public int getModelSymmetryCount​(int modelIndex)
      • getModelCellRange

        public int[] getModelCellRange​(int modelIndex)
      • getLastVibrationVector

        public int getLastVibrationVector​(int modelIndex,
                                          int tok)
      • getModulationList

        public javajs.util.Lst<java.lang.Object> getModulationList​(javajs.util.BS bs,
                                                                   char type,
                                                                   javajs.util.P3 t456)
      • getElementsPresentBitSet

        public javajs.util.BS getElementsPresentBitSet​(int modelIndex)
      • getMoleculeIndex

        public int getMoleculeIndex​(int atomIndex,
                                    boolean inModel)
      • getMoleculeBitSet

        public javajs.util.BS getMoleculeBitSet​(javajs.util.BS bs)
        return cumulative sum of all atoms in molecules containing these atoms
        Parameters:
        bs -
        Returns:
        bitset of atoms
      • getMoleculeBitSetForAtom

        public javajs.util.BS getMoleculeBitSetForAtom​(int atomIndex)
      • getModelDipole

        public javajs.util.V3 getModelDipole​(int modelIndex)
      • getMoleculeCountInModel

        public int getMoleculeCountInModel​(int modelIndex)
      • calcSelectedMoleculesCount

        public void calcSelectedMoleculesCount()
      • setCentroid

        public void setCentroid​(javajs.util.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
        Parameters:
        bs -
        minmax - fractional [xmin, ymin, zmin, xmax, ymax, zmax, 1=packed]
      • getNotInCentroid

        private javajs.util.BS getNotInCentroid​(javajs.util.BS bs,
                                                int[] minmax)
      • initializeBspf

        protected void initializeBspf()
      • initializeBspt

        protected void initializeBspt​(int modelIndex)
      • setIteratorForPoint

        public void setIteratorForPoint​(AtomIndexIterator iterator,
                                        int modelIndex,
                                        javajs.util.T3 pt,
                                        float distance)
      • setIteratorForAtom

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

        public AtomIndexIterator getSelectedAtomIterator​(javajs.util.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)
        Description copied from class: BondCollection
        for general use
        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 javajs.util.BS getModelAtomBitSetIncludingDeletedBs​(javajs.util.BS bsModels)
        note -- this method returns ALL atoms, including deleted.
        Parameters:
        bsModels -
        Returns:
        bitset of atoms
      • getModelAtomBitSetIncludingDeleted

        public javajs.util.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 javajs.util.BS getAtomBitsMaybeDeleted​(int tokType,
                                                         java.lang.Object specInfo)
      • getSelectCodeRange

        private javajs.util.BS getSelectCodeRange​(int[] info)
      • selectSeqcodeRange

        private static int selectSeqcodeRange​(Group[] groups,
                                              int n,
                                              int index,
                                              int seqcodeA,
                                              int seqcodeB,
                                              javajs.util.BS bs)
      • isInLatticeCell

        private boolean isInLatticeCell​(int i,
                                        javajs.util.P3 cell,
                                        javajs.util.P3 ptTemp,
                                        boolean isAbsolute)
      • getAtomsWithinRadius

        public javajs.util.BS getAtomsWithinRadius​(float distance,
                                                   javajs.util.BS bs,
                                                   boolean withinAllModels,
                                                   RadiusData rd)
        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 -
        Returns:
        the set of atoms
      • getAtomsWithin

        public javajs.util.BS getAtomsWithin​(float distance,
                                             javajs.util.T3 coord,
                                             javajs.util.BS bsResult,
                                             int modelIndex)
      • deleteBonds

        public void deleteBonds​(javajs.util.BS bsBonds,
                                boolean isFullModel)
      • makeConnections2

        public int[] makeConnections2​(float minD,
                                      float maxD,
                                      int order,
                                      int connectOperation,
                                      javajs.util.BS bsA,
                                      javajs.util.BS bsB,
                                      javajs.util.BS bsBonds,
                                      boolean isBonds,
                                      boolean addGroup,
                                      float energy)
      • autoBondBs4

        public int autoBondBs4​(javajs.util.BS bsA,
                               javajs.util.BS bsB,
                               javajs.util.BS bsExclude,
                               javajs.util.BS bsBonds,
                               short mad,
                               boolean preJmol11_9_24)
      • isBondable

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

        private boolean autoBondCheck​(Atom atomA,
                                      Atom atomB,
                                      int order,
                                      short mad,
                                      javajs.util.BS bsBonds)
      • autoBond_Pre_11_9_24

        private int autoBond_Pre_11_9_24​(javajs.util.BS bsA,
                                         javajs.util.BS bsB,
                                         javajs.util.BS bsExclude,
                                         javajs.util.BS bsBonds,
                                         short mad)
      • autoHbond

        public int autoHbond​(javajs.util.BS bsA,
                             javajs.util.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
      • checkMinAttachedAngle

        private static javajs.util.P3 checkMinAttachedAngle​(Atom atom1,
                                                            float minAngle,
                                                            javajs.util.V3 v1,
                                                            javajs.util.V3 v2,
                                                            boolean haveHAtoms)
      • setStructureIndexes

        public void setStructureIndexes()
      • getModelInfoAsString

        public java.lang.String getModelInfoAsString()
      • getSymmetryInfoAsString

        public java.lang.String getSymmetryInfoAsString()
      • createModels

        public void createModels​(int n)
      • deleteAtoms

        public void deleteAtoms​(javajs.util.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,
                            java.lang.String atomName,
                            java.lang.String atomType,
                            int atomSerial,
                            int atomSeqID,
                            int atomSite,
                            javajs.util.P3 xyz,
                            float radius,
                            javajs.util.V3 vib,
                            int formalCharge,
                            float partialCharge,
                            float occupancy,
                            float bfactor,
                            javajs.util.Lst<java.lang.Object> tensors,
                            boolean isHetero,
                            byte specialAtomID,
                            javajs.util.BS atomSymmetry,
                            float bondRadius)
      • getInlineData

        public java.lang.String getInlineData​(int modelIndex)
      • isAtomPDB

        public boolean isAtomPDB​(int i)
      • isAtomInLastModel

        public boolean isAtomInLastModel​(int i)
        Ensure the atom index is >= 0 and that the atom's model is the last model.
        Parameters:
        i -
        Returns:
        true if that is the case
      • haveModelKit

        public boolean haveModelKit()
      • getModelKitStateBitset

        public javajs.util.BS getModelKitStateBitset​(javajs.util.BS bs,
                                                     javajs.util.BS bsDeleted)
      • setAtomNamesAndNumbers

        public void setAtomNamesAndNumbers​(int iFirst,
                                           int baseAtomIndex,
                                           AtomCollection mergeSet)
        Parameters:
        iFirst - 0 from ModelLoader.freeze; -1 from Viewer.assignAtom
        baseAtomIndex -
        mergeSet -
      • setUnitCellOffset

        public void setUnitCellOffset​(SymmetryInterface unitCell,
                                      javajs.util.T3 pt,
                                      int ijk)
      • connect

        public void connect​(float[][] connections)
      • setFrameDelayMs

        public void setFrameDelayMs​(long millis,
                                    javajs.util.BS bsModels)
      • getFrameDelayMs

        public long getFrameDelayMs​(int i)
      • getModelIndexFromId

        public int getModelIndexFromId​(java.lang.String id)
      • getAuxiliaryInfo

        public java.util.Map<java.lang.String,​java.lang.Object> getAuxiliaryInfo​(javajs.util.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​(javajs.util.BS bs,
                                  boolean isOn,
                                  javajs.util.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 java.lang.Object getBoundBoxOrientation​(int type,
                                                       javajs.util.BS bsAtoms)
        Parameters:
        type - volume, best, x, y, z, unitcell
        bsAtoms -
        Returns:
        quaternion for best rotation or, for volume, string with volume \t{dx dy dz}
      • clearCache

        public void clearCache()
      • getSymMatrices

        public javajs.util.M4[] getSymMatrices​(int modelIndex)
      • getBsBranches

        public javajs.util.BS[] getBsBranches​(float[] dihedralList)
      • recalculatePositionDependentQuantities

        public void recalculatePositionDependentQuantities​(javajs.util.BS bs,
                                                           javajs.util.M4 mat)
      • moveAtoms

        public void moveAtoms​(javajs.util.M4 m4,
                              javajs.util.M3 mNew,
                              javajs.util.M3 rotation,
                              javajs.util.V3 translation,
                              javajs.util.BS bs,
                              javajs.util.P3 center,
                              boolean isInternal,
                              boolean translationOnly)
      • setDihedrals

        public void setDihedrals​(float[] dihedralList,
                                 javajs.util.BS[] bsBranches,
                                 float f)
      • setAtomCoordsRelative

        public void setAtomCoordsRelative​(javajs.util.T3 offset,
                                          javajs.util.BS bs)
      • setAtomCoords

        public void setAtomCoords​(javajs.util.BS bs,
                                  int tokType,
                                  java.lang.Object xyzValues)
      • invertSelected

        public void invertSelected​(javajs.util.P3 pt,
                                   javajs.util.P4 plane,
                                   int iAtom,
                                   javajs.util.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​(javajs.util.BS bsAtoms)
      • getAtomGroupQuaternions

        public javajs.util.Quat[] getAtomGroupQuaternions​(javajs.util.BS bsAtoms,
                                                          int nMax,
                                                          char qtype)
      • getConformation

        public javajs.util.BS getConformation​(int modelIndex,
                                              int conformationIndex,
                                              boolean doSet,
                                              javajs.util.BS bsSelected)
      • getSequenceBits

        public javajs.util.BS getSequenceBits​(java.lang.String specInfo,
                                              javajs.util.BS bsAtoms,
                                              javajs.util.BS bsResult)
      • getBioPolymerCountInModel

        public int getBioPolymerCountInModel​(int modelIndex)
      • getPolymerPointsAndVectors

        public void getPolymerPointsAndVectors​(javajs.util.BS bs,
                                               javajs.util.Lst<javajs.util.P3[]> vList,
                                               boolean isTraceAlpha,
                                               float sheetSmoothing)
      • recalculateLeadMidpointsAndWingVectors

        public void recalculateLeadMidpointsAndWingVectors​(int modelIndex)
      • calcRasmolHydrogenBonds

        public void calcRasmolHydrogenBonds​(javajs.util.BS bsA,
                                            javajs.util.BS bsB,
                                            javajs.util.Lst<Bond> vHBonds,
                                            boolean nucleicOnly,
                                            int nMax,
                                            boolean dsspIgnoreHydrogens,
                                            javajs.util.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​(javajs.util.BS bs1,
                                   javajs.util.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 javajs.util.BS getGroupsWithin​(int nResidues,
                                              javajs.util.BS bs)
      • getProteinStructureState

        public java.lang.String getProteinStructureState​(javajs.util.BS bsAtoms,
                                                         int mode)
      • calculateStructures

        public java.lang.String calculateStructures​(javajs.util.BS bsAtoms,
                                                    boolean asDSSP,
                                                    boolean doReport,
                                                    boolean dsspIgnoreHydrogen,
                                                    boolean setStructure,
                                                    int version)
      • calculateStructuresAllExcept

        public java.lang.String calculateStructuresAllExcept​(javajs.util.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​(javajs.util.BS bsModelsExcluded)
      • calculatePolymers

        protected void calculatePolymers​(Group[] groups,
                                         int groupCount,
                                         int baseGroupIndex,
                                         javajs.util.BS modelsExcluded)
      • calcSelectedMonomersCount

        public void calcSelectedMonomersCount()
      • setProteinType

        public void setProteinType​(javajs.util.BS bs,
                                   STR type)
      • setStructureList

        public void setStructureList​(java.util.Map<STR,​float[]> structureList)
      • setConformation

        public javajs.util.BS setConformation​(javajs.util.BS bsAtoms)
      • getHeteroList

        public java.util.Map<java.lang.String,​java.lang.String> getHeteroList​(int modelIndex)
      • getUnitCellPointsWithin

        public java.lang.Object getUnitCellPointsWithin​(float distance,
                                                        javajs.util.BS bs,
                                                        javajs.util.P3 pt,
                                                        boolean asMap)
      • calculateDssrProperty

        public void calculateDssrProperty​(java.lang.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 java.lang.String calculateChiralityForAtoms​(javajs.util.BS bsAtoms,
                                                           boolean withReturn)