org.jmol.modelset
Class AtomCollection

java.lang.Object
  extended by org.jmol.modelset.AtomCollection
Direct Known Subclasses:
BondCollection

public abstract class AtomCollection
extends java.lang.Object


Field Summary
(package private)  int atomCount
           
(package private)  java.lang.String[] atomNames
           
 Atom[] atoms
           
(package private)  int[] atomSerials
           
private  int bfactor100Hi
           
private  int bfactor100Lo
           
(package private)  short[] bfactor100s
           
(package private)  java.util.BitSet bsEmpty
           
(package private)  java.util.BitSet bsFoundRectangle
           
private  java.util.BitSet bsHidden
           
protected  Bspf bspf
           
private  java.util.BitSet bsSurface
           
(package private)  java.lang.Object[] clientAtomReferences
           
(package private)  java.lang.Object[][] ellipsoids
           
(package private)  Graphics3D g3d
           
private  boolean hasBfactorRange
           
protected  float maxBondingRadius
           
private  float maxVanderwaalsRadius
           
private static int minimumPixelSelectionRadius
           
private  int nSurfaceAtoms
           
(package private)  byte[] occupancies
           
(package private)  float[] partialCharges
           
protected static boolean showRebondTimes
           
(package private)  byte[] specialAtomIDs
           
protected  int[] surfaceDistance100s
           
private  int surfaceDistanceMax
           
static byte TAINT_COORD
           
private static byte TAINT_FORMALCHARGE
           
static byte TAINT_MAX
           
private static byte TAINT_OCCUPANCY
           
private static byte TAINT_PARTIALCHARGE
           
private static byte TAINT_TEMPERATURE
           
private static byte TAINT_VALENCE
           
private static byte TAINT_VANDERWAALS
           
private static byte TAINT_VIBRATION
           
protected  java.util.BitSet[] tainted
           
private static java.lang.String[] userSettableValues
           
(package private)  javax.vecmath.Vector3f[] vibrationVectors
           
 Viewer viewer
           
 
Constructor Summary
AtomCollection()
           
 
Method Summary
private  void calcBfactorRange(java.util.BitSet bs)
           
private  void calcSurfaceDistances()
           
 javax.vecmath.Point3f[] calculateSurface(java.util.BitSet bsSelected, float envelopeRadius)
           
 void clearBfactorRange()
           
 void deleteAtoms(int firstAtomIndex, int nAtoms, java.util.BitSet bs)
           
protected  void fillAtomData(AtomData atomData, int mode)
           
 java.util.BitSet findAtomsInRectangle(java.awt.Rectangle rect, java.util.BitSet bsModels)
           
protected  void findMaxRadii()
           
protected  void findNearestAtomIndex(int x, int y, Atom[] closest)
           
protected  javax.vecmath.Point3f[][] getAdditionalHydrogens(java.util.BitSet atomSet, int[] nTotal)
           
 Atom getAtomAt(int atomIndex)
           
protected  java.util.BitSet getAtomBits(int tokType, java.lang.Object specInfo)
          general unqualified lookup of atom set type
 java.lang.String getAtomChain(int i)
           
 short getAtomColix(int i)
           
 int getAtomCount()
           
protected  int getAtomCountInModel(int modelIndex)
           
 java.lang.String getAtomicPropertyState(int taintWhat, java.util.BitSet bsSelected)
           
static void getAtomicPropertyState(java.lang.StringBuffer commands, Atom[] atoms, int atomCount, byte type, java.util.BitSet bs, java.lang.String label, float[] fData)
           
 int getAtomIndexFromAtomNumber(int atomNumber)
           
 int[] getAtomIndices(java.util.BitSet bs)
           
 java.lang.String getAtomInfo(int i, java.lang.String format)
           
 java.lang.String getAtomInfoXYZ(int i, boolean useChimeFormat)
           
 int getAtomModelIndex(int i)
           
 java.lang.String getAtomName(int i)
           
 java.lang.String[] getAtomNames()
           
 int getAtomNumber(int i)
           
 javax.vecmath.Point3f getAtomPoint3f(int i)
           
 float getAtomRadius(int i)
           
 Atom[] getAtoms()
           
 java.lang.String getAtomSequenceCode(int i)
           
 java.util.BitSet getAtomsWithin(float distance, javax.vecmath.Point4f plane)
           
 float getAtomVdwRadius(int i)
           
 float getAtomX(int i)
           
 float getAtomY(int i)
           
 float getAtomZ(int i)
           
 int getBfactor100Hi()
           
 int getBfactor100Lo()
           
 short[] getBFactors()
           
protected  java.util.BitSet getChainBits(char chain)
           
protected  java.lang.String getChimeInfo(int tok, java.util.BitSet bs)
           
 java.util.BitSet getClickableSet()
           
(package private)  java.lang.String getElementName(int i)
           
 int getElementNumber(int i)
           
 java.lang.String getElementSymbol(int i)
           
 java.lang.Object[] getEllipsoid(int i)
           
 java.lang.String getHybridizationAndAxes(int atomIndex, javax.vecmath.Vector3f z, javax.vecmath.Vector3f x, java.lang.String lcaoTypeRaw, boolean hybridizationCompatible)
           
private  java.util.BitSet getIdentifierOrNull(java.lang.String identifier)
          overhauled by RMH Nov 1, 2006.
 float getMaxVanderwaalsRadius()
           
 java.util.BitSet getModelBitSet(java.util.BitSet atomList)
           
 float[] getPartialCharges()
           
 Quaternion getQuaternion(int i, char qtype)
           
protected  float getRadiusVdwJmol(Atom atom)
           
protected  java.util.BitSet getSeqcodeBits(int seqcode, boolean returnEmpty)
           
private  java.util.BitSet getSpecName(java.lang.String name)
           
private  java.util.BitSet getSpecNameOrNull(java.lang.String name, boolean checkStar)
           
(package private)  int getSurfaceDistance100(int atomIndex)
           
 int getSurfaceDistanceMax()
           
 java.util.BitSet getTaintedAtoms(byte type)
           
static int getUserSettableType(java.lang.String dataType)
           
 float getVibrationCoord(int atomIndex, char c)
           
 javax.vecmath.Vector3f getVibrationVector(int atomIndex)
           
 java.util.BitSet getVisibleSet()
           
 boolean isAtomHidden(int iAtom)
           
(package private)  boolean isAtomNameMatch(Atom atom, java.lang.String strPattern, boolean checkStar)
           
(package private)  boolean isCursorOnTopOf(Atom contender, int x, int y, int radius, Atom champion)
          used by Frame and AminoMonomer and NucleicMonomer -- does NOT check for clickability
protected  boolean isInLatticeCell(int i, javax.vecmath.Point3f cell)
           
private  void loadCoordinates(java.lang.String data, boolean isVibrationVectors)
           
 void loadData(int type, java.lang.String name, java.lang.String dataString)
           
protected  void merge(AtomCollection mergeModelSet)
           
 boolean modelSetHasVibrationVectors()
           
protected  void releaseModelSet()
           
 void setAtomCoord(java.util.BitSet bs, int tokType, java.lang.Object xyzValues)
           
 void setAtomCoord(int atomIndex, float x, float y, float z)
           
protected  void setAtomCoordRelative(java.util.BitSet atomSet, float x, float y, float z)
           
 void setAtomCoordRelative(int atomIndex, float x, float y, float z)
           
 void setAtomProperty(java.util.BitSet bs, int tok, int iValue, float fValue, float[] values)
           
private  void setAtomVibrationVector(int atomIndex, float x, float y, float z)
           
protected  void setBFactor(int atomIndex, float bfactor)
           
 void setBsHidden(java.util.BitSet bs)
           
protected  void setEllipsoid(int atomIndex, java.lang.Object[] ellipsoid)
           
 void setFormalCharges(java.util.BitSet bs, int formalCharge)
           
protected  void setOccupancy(int atomIndex, int occupancy)
           
protected  void setPartialCharge(int atomIndex, float partialCharge)
           
 void setTaintedAtoms(java.util.BitSet bs, byte type)
           
protected  void setVibrationVector(int atomIndex, float x, float y, float z)
           
private  void setVibrationVector(int atomIndex, int tok, float fValue)
           
protected  void taint(int atomIndex, byte type)
           
private  void untaint(int i, byte type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewer

public Viewer viewer

g3d

Graphics3D g3d

showRebondTimes

protected static final boolean showRebondTimes
See Also:
Constant Field Values

atoms

public Atom[] atoms

atomCount

int atomCount

atomNames

java.lang.String[] atomNames

atomSerials

int[] atomSerials

specialAtomIDs

byte[] specialAtomIDs

clientAtomReferences

java.lang.Object[] clientAtomReferences

vibrationVectors

javax.vecmath.Vector3f[] vibrationVectors

occupancies

byte[] occupancies

bfactor100s

short[] bfactor100s

partialCharges

float[] partialCharges

ellipsoids

java.lang.Object[][] ellipsoids

surfaceDistance100s

protected int[] surfaceDistance100s

bsHidden

private java.util.BitSet bsHidden

maxBondingRadius

protected float maxBondingRadius

maxVanderwaalsRadius

private float maxVanderwaalsRadius

hasBfactorRange

private boolean hasBfactorRange

bfactor100Lo

private int bfactor100Lo

bfactor100Hi

private int bfactor100Hi

surfaceDistanceMax

private int surfaceDistanceMax

bsSurface

private java.util.BitSet bsSurface

nSurfaceAtoms

private int nSurfaceAtoms

bspf

protected Bspf bspf

TAINT_COORD

public static final byte TAINT_COORD
See Also:
Constant Field Values

TAINT_FORMALCHARGE

private static final byte TAINT_FORMALCHARGE
See Also:
Constant Field Values

TAINT_OCCUPANCY

private static final byte TAINT_OCCUPANCY
See Also:
Constant Field Values

TAINT_PARTIALCHARGE

private static final byte TAINT_PARTIALCHARGE
See Also:
Constant Field Values

TAINT_TEMPERATURE

private static final byte TAINT_TEMPERATURE
See Also:
Constant Field Values

TAINT_VALENCE

private static final byte TAINT_VALENCE
See Also:
Constant Field Values

TAINT_VANDERWAALS

private static final byte TAINT_VANDERWAALS
See Also:
Constant Field Values

TAINT_VIBRATION

private static final byte TAINT_VIBRATION
See Also:
Constant Field Values

TAINT_MAX

public static final byte TAINT_MAX
See Also:
Constant Field Values

userSettableValues

private static final java.lang.String[] userSettableValues

tainted

protected java.util.BitSet[] tainted

minimumPixelSelectionRadius

private static final int minimumPixelSelectionRadius
See Also:
Constant Field Values

bsEmpty

final java.util.BitSet bsEmpty

bsFoundRectangle

final java.util.BitSet bsFoundRectangle
Constructor Detail

AtomCollection

public AtomCollection()
Method Detail

releaseModelSet

protected void releaseModelSet()

merge

protected void merge(AtomCollection mergeModelSet)

getAtoms

public Atom[] getAtoms()

getAtomAt

public Atom getAtomAt(int atomIndex)

getAtomCount

public int getAtomCount()

getAtomNames

public java.lang.String[] getAtomNames()

modelSetHasVibrationVectors

public boolean modelSetHasVibrationVectors()

getPartialCharges

public float[] getPartialCharges()

getBFactors

public short[] getBFactors()

setBsHidden

public void setBsHidden(java.util.BitSet bs)

isAtomHidden

public boolean isAtomHidden(int iAtom)

getAtomInfo

public java.lang.String getAtomInfo(int i,
                                    java.lang.String format)

getAtomInfoXYZ

public java.lang.String getAtomInfoXYZ(int i,
                                       boolean useChimeFormat)

getElementSymbol

public java.lang.String getElementSymbol(int i)

getElementNumber

public int getElementNumber(int i)

getElementName

java.lang.String getElementName(int i)

getAtomName

public java.lang.String getAtomName(int i)

getAtomNumber

public int getAtomNumber(int i)

getAtomX

public float getAtomX(int i)

getAtomY

public float getAtomY(int i)

getAtomZ

public float getAtomZ(int i)

getAtomPoint3f

public javax.vecmath.Point3f getAtomPoint3f(int i)

getAtomRadius

public float getAtomRadius(int i)

getAtomVdwRadius

public float getAtomVdwRadius(int i)

getAtomColix

public short getAtomColix(int i)

getAtomChain

public java.lang.String getAtomChain(int i)

getAtomSequenceCode

public java.lang.String getAtomSequenceCode(int i)

getAtomModelIndex

public int getAtomModelIndex(int i)

getEllipsoid

public java.lang.Object[] getEllipsoid(int i)

getQuaternion

public Quaternion getQuaternion(int i,
                                char qtype)

getAtomCountInModel

protected int getAtomCountInModel(int modelIndex)

getAtomIndexFromAtomNumber

public int getAtomIndexFromAtomNumber(int atomNumber)

setFormalCharges

public void setFormalCharges(java.util.BitSet bs,
                             int formalCharge)

getRadiusVdwJmol

protected float getRadiusVdwJmol(Atom atom)

getMaxVanderwaalsRadius

public float getMaxVanderwaalsRadius()

findMaxRadii

protected void findMaxRadii()

clearBfactorRange

public void clearBfactorRange()

calcBfactorRange

private void calcBfactorRange(java.util.BitSet bs)

getBfactor100Lo

public int getBfactor100Lo()

getBfactor100Hi

public int getBfactor100Hi()

getSurfaceDistanceMax

public int getSurfaceDistanceMax()

getSurfaceDistance100

int getSurfaceDistance100(int atomIndex)

calcSurfaceDistances

private void calcSurfaceDistances()

calculateSurface

public javax.vecmath.Point3f[] calculateSurface(java.util.BitSet bsSelected,
                                                float envelopeRadius)

setAtomCoord

public void setAtomCoord(java.util.BitSet bs,
                         int tokType,
                         java.lang.Object xyzValues)

setAtomVibrationVector

private void setAtomVibrationVector(int atomIndex,
                                    float x,
                                    float y,
                                    float z)

setAtomCoord

public void setAtomCoord(int atomIndex,
                         float x,
                         float y,
                         float z)

setAtomCoordRelative

public void setAtomCoordRelative(int atomIndex,
                                 float x,
                                 float y,
                                 float z)

setAtomCoordRelative

protected void setAtomCoordRelative(java.util.BitSet atomSet,
                                    float x,
                                    float y,
                                    float z)

setAtomProperty

public void setAtomProperty(java.util.BitSet bs,
                            int tok,
                            int iValue,
                            float fValue,
                            float[] values)

getVibrationCoord

public float getVibrationCoord(int atomIndex,
                               char c)

getVibrationVector

public javax.vecmath.Vector3f getVibrationVector(int atomIndex)

setVibrationVector

protected void setVibrationVector(int atomIndex,
                                  float x,
                                  float y,
                                  float z)

setVibrationVector

private void setVibrationVector(int atomIndex,
                                int tok,
                                float fValue)

setOccupancy

protected void setOccupancy(int atomIndex,
                            int occupancy)

setPartialCharge

protected void setPartialCharge(int atomIndex,
                                float partialCharge)

setEllipsoid

protected void setEllipsoid(int atomIndex,
                            java.lang.Object[] ellipsoid)

setBFactor

protected void setBFactor(int atomIndex,
                          float bfactor)

loadData

public void loadData(int type,
                     java.lang.String name,
                     java.lang.String dataString)

loadCoordinates

private void loadCoordinates(java.lang.String data,
                             boolean isVibrationVectors)

getUserSettableType

public static int getUserSettableType(java.lang.String dataType)

getTaintedAtoms

public java.util.BitSet getTaintedAtoms(byte type)

taint

protected void taint(int atomIndex,
                     byte type)

untaint

private void untaint(int i,
                     byte type)

setTaintedAtoms

public void setTaintedAtoms(java.util.BitSet bs,
                            byte type)

getAtomicPropertyState

public java.lang.String getAtomicPropertyState(int taintWhat,
                                               java.util.BitSet bsSelected)

getAtomicPropertyState

public static void getAtomicPropertyState(java.lang.StringBuffer commands,
                                          Atom[] atoms,
                                          int atomCount,
                                          byte type,
                                          java.util.BitSet bs,
                                          java.lang.String label,
                                          float[] fData)

findNearestAtomIndex

protected void findNearestAtomIndex(int x,
                                    int y,
                                    Atom[] closest)

isCursorOnTopOf

boolean isCursorOnTopOf(Atom contender,
                        int x,
                        int y,
                        int radius,
                        Atom champion)
used by Frame and AminoMonomer and NucleicMonomer -- does NOT check for clickability

Parameters:
contender -
x -
y -
radius -
champion -
Returns:
true if user is pointing to this atom

findAtomsInRectangle

public java.util.BitSet findAtomsInRectangle(java.awt.Rectangle rect,
                                             java.util.BitSet bsModels)

fillAtomData

protected void fillAtomData(AtomData atomData,
                            int mode)

getAdditionalHydrogens

protected javax.vecmath.Point3f[][] getAdditionalHydrogens(java.util.BitSet atomSet,
                                                           int[] nTotal)

getHybridizationAndAxes

public java.lang.String getHybridizationAndAxes(int atomIndex,
                                                javax.vecmath.Vector3f z,
                                                javax.vecmath.Vector3f x,
                                                java.lang.String lcaoTypeRaw,
                                                boolean hybridizationCompatible)

getChimeInfo

protected java.lang.String getChimeInfo(int tok,
                                        java.util.BitSet bs)

getAtomBits

protected java.util.BitSet getAtomBits(int tokType,
                                       java.lang.Object specInfo)
general unqualified lookup of atom set type

Parameters:
tokType -
specInfo -
Returns:
BitSet; or null if we mess up the type

isInLatticeCell

protected boolean isInLatticeCell(int i,
                                  javax.vecmath.Point3f cell)

getModelBitSet

public java.util.BitSet getModelBitSet(java.util.BitSet atomList)

getIdentifierOrNull

private java.util.BitSet getIdentifierOrNull(java.lang.String identifier)
overhauled by RMH Nov 1, 2006.

Parameters:
identifier -
Returns:
null or bs

getSpecName

private java.util.BitSet getSpecName(java.lang.String name)

getSpecNameOrNull

private java.util.BitSet getSpecNameOrNull(java.lang.String name,
                                           boolean checkStar)

isAtomNameMatch

boolean isAtomNameMatch(Atom atom,
                        java.lang.String strPattern,
                        boolean checkStar)

getSeqcodeBits

protected java.util.BitSet getSeqcodeBits(int seqcode,
                                          boolean returnEmpty)

getChainBits

protected java.util.BitSet getChainBits(char chain)

getAtomIndices

public int[] getAtomIndices(java.util.BitSet bs)

getAtomsWithin

public java.util.BitSet getAtomsWithin(float distance,
                                       javax.vecmath.Point4f plane)

getVisibleSet

public java.util.BitSet getVisibleSet()

getClickableSet

public java.util.BitSet getClickableSet()

deleteAtoms

public void deleteAtoms(int firstAtomIndex,
                        int nAtoms,
                        java.util.BitSet bs)