org.jmol.modelset
Class Atom
java.lang.Object
javax.vecmath.Tuple3f
javax.vecmath.Point3f
org.jmol.util.Point3fi
org.jmol.modelset.Atom
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, JmolNode
public final class Atom
- extends Point3fi
- implements JmolNode
- See Also:
- Serialized Form
Fields inherited from class javax.vecmath.Tuple3f |
x, y, z |
Constructor Summary |
Atom(int modelIndex,
int atomIndex,
float x,
float y,
float z,
float radius,
java.util.BitSet atomSymmetry,
int atomSite,
short atomicAndIsotopeNumber,
int formalCharge,
boolean isHetero,
char alternateLocationID)
|
Method Summary |
void |
addDisplayedBackbone(int backboneVisibilityFlag,
boolean isVisible)
|
(package private) void |
addDisplayedBond(int stickVisibilityFlag,
boolean isVisible)
|
static float |
atomPropertyFloat(Viewer viewer,
Atom atom,
int tokWhat)
called by isosurface and int comparator via atomProperty()
and also by getBitsetProperty() |
static int |
atomPropertyInt(Atom atom,
int tokWhat)
called by isosurface and int comparator via atomProperty()
and also by getBitsetProperty() |
static java.lang.String |
atomPropertyString(Atom atom,
int tokWhat)
|
static javax.vecmath.Tuple3f |
atomPropertyTuple(Atom atom,
int tok)
|
short |
calculateMad(Viewer viewer,
RadiusData rd)
|
(package private) void |
clearBonds()
|
void |
delete(java.util.BitSet bsBonds)
|
(package private) void |
deleteBond(Bond bond)
|
private void |
deleteBond(int i)
|
boolean |
equals(java.lang.Object obj)
|
Atom |
findAromaticNeighbor(int notAtomIndex)
|
float |
getADPMinMax(boolean isMax)
|
char |
getAlternateLocationID()
|
short |
getAtomicAndIsotopeNumber()
|
byte |
getAtomID()
|
java.lang.String |
getAtomName()
|
int |
getAtomNumber()
|
int |
getAtomSite()
|
java.util.BitSet |
getAtomSymmetry()
|
java.lang.String |
getAtomType()
|
int |
getBfactor100()
|
Bond |
getBond(Atom atomOther)
|
int |
getBondedAtomIndex(int bondIndex)
|
float |
getBondingRadiusFloat()
|
Bond[] |
getBonds()
|
int |
getCellTranslation(int cellNNN,
int[] cellRange,
int nOps)
Looks for a match in the cellRange list for this atom within the specified translation set
select symop=0NNN for this |
(package private) Chain |
getChain()
|
char |
getChainID()
|
int |
getClickabilityFlags()
|
short |
getColix()
|
int |
getCovalentBondCount()
|
int |
getCovalentHydrogenCount()
|
float |
getCovalentRadiusFloat()
|
boolean |
getCrossLinkLeadAtomIndexes(java.util.List vReturn)
|
(package private) int |
getCurrentBondCount()
|
float |
getDimensionValue(int dimension)
|
JmolEdge[] |
getEdges()
|
short |
getElementNumber()
|
java.lang.String |
getElementSymbol()
|
java.lang.String |
getElementSymbol(boolean withIsotope)
|
java.lang.Object[] |
getEllipsoid()
|
int |
getFormalCharge()
|
private javax.vecmath.Point3f |
getFractionalCoord(boolean asAbsolute)
|
private float |
getFractionalCoord(char ch,
boolean asAbsolute)
|
javax.vecmath.Point3f |
getFractionalUnitCoord(boolean asCartesian)
|
private float |
getFractionalUnitCoord(char ch)
|
float |
getFractionalUnitDistance(javax.vecmath.Point3f pt,
javax.vecmath.Point3f ptTemp1,
javax.vecmath.Point3f ptTemp2)
|
Group |
getGroup()
|
java.lang.String |
getGroup1(char c0)
|
java.lang.String |
getGroup3(boolean allowNull)
|
short |
getGroupID()
|
int |
getGroupIndex()
|
float |
getGroupParameter(int tok)
|
java.lang.String |
getGroupType()
|
(package private) java.lang.String |
getIdentity(boolean allInfo)
|
(package private) java.lang.String |
getIdentityXYZ(boolean allInfo)
|
int |
getImplicitHydrogenCount()
|
int |
getIndex()
|
java.lang.String |
getInfo()
|
(package private) java.lang.String |
getInfoXYZ(boolean useChimeFormat)
|
char |
getInsertionCode()
|
short |
getIsotopeNumber()
|
int |
getModelFileIndex()
|
int |
getModelFileNumber()
|
int |
getModelIndex()
|
int |
getModelNumber()
|
(package private) java.lang.String |
getModelNumberForLabel()
|
int |
getMoleculeNumber()
|
int |
getMonomerIndex()
|
int |
getNBackbonesDisplayed()
|
int |
getOccupancy100()
|
int |
getOffsetResidueAtom(java.lang.String name,
int offset)
|
byte |
getPaletteID()
|
float |
getPartialCharge()
|
int |
getPolymerIndexInModel()
|
int |
getPolymerLength()
|
byte |
getProteinStructureSubType()
|
java.lang.String |
getProteinStructureTag()
|
byte |
getProteinStructureType()
|
float |
getRadius()
|
int |
getRasMolRadius()
|
int |
getResno()
|
int |
getSelectedGroupCountWithinChain()
|
int |
getSelectedGroupIndexWithinChain()
|
int |
getSelectedMonomerCountWithinPolymer()
|
int |
getSelectedMonomerIndexWithinPolymer()
|
(package private) int |
getSeqcode()
|
(package private) java.lang.String |
getSeqcodeString()
|
(package private) int |
getSeqNumber()
|
int |
getShapeVisibilityFlags()
|
int |
getStrucNo()
|
java.lang.String |
getStructureId()
|
int |
getSurfaceDistance100()
|
(package private) java.lang.String |
getSymmetryOperatorList()
|
int |
getSymmetryTranslation(int symop,
int[] cellRange,
int nOps)
Given a symmetry operation number, the set of cells in the model, and the
number of operations, this method returns either 0 or the cell number (555, 666)
of the translated symmetry operation corresponding to this atom. |
(package private) int |
getTargetValence()
|
int |
getValence()
|
float |
getVanderwaalsRadiusFloat(Viewer viewer,
int iType)
|
private int |
getVdwType(int iType)
|
float |
getVibrationCoord(char ch)
|
javax.vecmath.Vector3f |
getVibrationVector()
|
(package private) float |
getVolume(Viewer viewer,
int iType)
|
int |
hashCode()
|
boolean |
hasVibration()
|
(package private) boolean |
isAlternateLocationMatch(java.lang.String strPattern)
|
boolean |
isBonded(Atom atomOther)
|
boolean |
isCarbohydrate()
|
boolean |
isClickable()
|
boolean |
isCrossLinked(JmolNode node)
|
(package private) boolean |
isCursorOnTopOf(int xCursor,
int yCursor,
int minRadius,
Atom competitor)
|
boolean |
isDeleted()
|
boolean |
isDna()
|
(package private) boolean |
isGroup3(java.lang.String group3)
|
boolean |
isHetero()
|
boolean |
isInFrame()
|
boolean |
isLeadAtom()
|
boolean |
isNucleic()
|
boolean |
isProtein()
|
boolean |
isPurine()
|
boolean |
isPyrimidine()
|
boolean |
isRna()
|
boolean |
isShapeVisible(int shapeVisibilityFlag)
|
boolean |
isTranslucent()
|
boolean |
isVisible(int flags)
determine if an atom or its PDB group is visible |
(package private) boolean |
isWithinStructure(byte type)
|
void |
setAtomicAndIsotopeNumber(int n)
|
void |
setBonds(Bond[] bonds)
|
void |
setClickable(int flag)
|
void |
setColixAtom(short colixAtom)
|
(package private) void |
setFormalCharge(int charge)
|
(package private) void |
setFractionalCoord(int tok,
float fValue,
boolean asAbsolute)
|
(package private) void |
setFractionalCoord(javax.vecmath.Point3f ptNew,
boolean asAbsolute)
|
(package private) void |
setFractionalCoord(javax.vecmath.Point3f pt,
javax.vecmath.Point3f ptNew,
boolean asAbsolute)
|
(package private) void |
setGroup(Group group)
|
void |
setGroupBits(java.util.BitSet bs)
|
void |
setMadAtom(Viewer viewer,
RadiusData rd)
|
void |
setPaletteID(byte paletteID)
|
boolean |
setRadius(float radius)
|
void |
setShapeVisibility(int shapeVisibilityFlag,
boolean isVisible)
|
void |
setShapeVisibilityFlags(int flag)
|
void |
setTranslucent(boolean isTranslucent,
float translucentLevel)
|
void |
setValence(int nBonds)
|
(package private) void |
setVibrationVector()
|
java.lang.String |
toString()
|
Methods inherited from class javax.vecmath.Point3f |
distance, distanceL1, distanceLinf, distanceSquared, project |
Methods inherited from class javax.vecmath.Tuple3f |
absolute, absolute, add, add, clamp, clamp, clampMax, clampMax, clampMin, clampMin, clone, epsilonEquals, equals, get, get, getX, getY, getZ, interpolate, interpolate, negate, negate, scale, scale, scaleAdd, scaleAdd, set, set, set, set, setX, setY, setZ, sub, sub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jmol.api.JmolNode |
set |
VIBRATION_VECTOR_FLAG
private static final byte VIBRATION_VECTOR_FLAG
- See Also:
- Constant Field Values
IS_HETERO_FLAG
private static final byte IS_HETERO_FLAG
- See Also:
- Constant Field Values
FLAG_MASK
private static final byte FLAG_MASK
- See Also:
- Constant Field Values
RADIUS_MAX
public static final int RADIUS_MAX
- See Also:
- Constant Field Values
group
Group group
atomSymmetry
private java.util.BitSet atomSymmetry
atomSite
int atomSite
userDefinedVanDerWaalRadius
private float userDefinedVanDerWaalRadius
atomicAndIsotopeNumber
private short atomicAndIsotopeNumber
formalChargeAndFlags
private byte formalChargeAndFlags
valence
private byte valence
alternateLocationID
char alternateLocationID
atomID
public byte atomID
madAtom
public short madAtom
colixAtom
short colixAtom
paletteID
byte paletteID
bonds
Bond[] bonds
nBondsDisplayed
int nBondsDisplayed
nBackbonesDisplayed
int nBackbonesDisplayed
clickabilityFlags
int clickabilityFlags
shapeVisibilityFlags
int shapeVisibilityFlags
Atom
public Atom(int modelIndex,
int atomIndex,
float x,
float y,
float z,
float radius,
java.util.BitSet atomSymmetry,
int atomSite,
short atomicAndIsotopeNumber,
int formalCharge,
boolean isHetero,
char alternateLocationID)
getAtomID
public byte getAtomID()
getBonds
public Bond[] getBonds()
setBonds
public void setBonds(Bond[] bonds)
getNBackbonesDisplayed
public int getNBackbonesDisplayed()
setShapeVisibilityFlags
public final void setShapeVisibilityFlags(int flag)
setShapeVisibility
public final void setShapeVisibility(int shapeVisibilityFlag,
boolean isVisible)
isBonded
public boolean isBonded(Atom atomOther)
getBond
public Bond getBond(Atom atomOther)
addDisplayedBond
void addDisplayedBond(int stickVisibilityFlag,
boolean isVisible)
addDisplayedBackbone
public void addDisplayedBackbone(int backboneVisibilityFlag,
boolean isVisible)
deleteBond
void deleteBond(Bond bond)
deleteBond
private void deleteBond(int i)
clearBonds
void clearBonds()
getBondedAtomIndex
public int getBondedAtomIndex(int bondIndex)
- Specified by:
getBondedAtomIndex
in interface JmolNode
setMadAtom
public void setMadAtom(Viewer viewer,
RadiusData rd)
calculateMad
public short calculateMad(Viewer viewer,
RadiusData rd)
getADPMinMax
public float getADPMinMax(boolean isMax)
getRasMolRadius
public int getRasMolRadius()
getCovalentBondCount
public int getCovalentBondCount()
- Specified by:
getCovalentBondCount
in interface JmolNode
getCovalentHydrogenCount
public int getCovalentHydrogenCount()
- Specified by:
getCovalentHydrogenCount
in interface JmolNode
getEdges
public JmolEdge[] getEdges()
- Specified by:
getEdges
in interface JmolNode
setColixAtom
public void setColixAtom(short colixAtom)
setPaletteID
public void setPaletteID(byte paletteID)
setTranslucent
public void setTranslucent(boolean isTranslucent,
float translucentLevel)
isTranslucent
public boolean isTranslucent()
getElementNumber
public short getElementNumber()
- Specified by:
getElementNumber
in interface JmolNode
getIsotopeNumber
public short getIsotopeNumber()
- Specified by:
getIsotopeNumber
in interface JmolNode
getAtomicAndIsotopeNumber
public short getAtomicAndIsotopeNumber()
- Specified by:
getAtomicAndIsotopeNumber
in interface JmolNode
setAtomicAndIsotopeNumber
public void setAtomicAndIsotopeNumber(int n)
getElementSymbol
public java.lang.String getElementSymbol(boolean withIsotope)
getElementSymbol
public java.lang.String getElementSymbol()
getAlternateLocationID
public char getAlternateLocationID()
isAlternateLocationMatch
boolean isAlternateLocationMatch(java.lang.String strPattern)
isHetero
public boolean isHetero()
hasVibration
public boolean hasVibration()
setFormalCharge
void setFormalCharge(int charge)
setVibrationVector
void setVibrationVector()
getFormalCharge
public int getFormalCharge()
- Specified by:
getFormalCharge
in interface JmolNode
getOccupancy100
public int getOccupancy100()
getBfactor100
public int getBfactor100()
setRadius
public boolean setRadius(float radius)
delete
public void delete(java.util.BitSet bsBonds)
isDeleted
public boolean isDeleted()
- Specified by:
isDeleted
in interface JmolNode
setValence
public void setValence(int nBonds)
getValence
public int getValence()
- Specified by:
getValence
in interface JmolNode
getImplicitHydrogenCount
public int getImplicitHydrogenCount()
- Specified by:
getImplicitHydrogenCount
in interface JmolNode
getTargetValence
int getTargetValence()
getDimensionValue
public float getDimensionValue(int dimension)
getVanderwaalsRadiusFloat
public float getVanderwaalsRadiusFloat(Viewer viewer,
int iType)
getVdwType
private int getVdwType(int iType)
- Parameters:
iType
-
- Returns:
- if VDW_AUTO, will return VDW_AUTO_JMOL, VDW_AUTO_RASMOL, or VDW_AUTO_BABEL
based on the model type
getCovalentRadiusFloat
public float getCovalentRadiusFloat()
getBondingRadiusFloat
public float getBondingRadiusFloat()
getVolume
float getVolume(Viewer viewer,
int iType)
getCurrentBondCount
int getCurrentBondCount()
getColix
public short getColix()
getPaletteID
public byte getPaletteID()
getRadius
public float getRadius()
getIndex
public int getIndex()
- Specified by:
getIndex
in interface JmolNode
getAtomSite
public int getAtomSite()
- Specified by:
getAtomSite
in interface JmolNode
getAtomSymmetry
public java.util.BitSet getAtomSymmetry()
setGroup
void setGroup(Group group)
getGroup
public Group getGroup()
setGroupBits
public void setGroupBits(java.util.BitSet bs)
- Specified by:
setGroupBits
in interface JmolNode
getAtomName
public java.lang.String getAtomName()
- Specified by:
getAtomName
in interface JmolNode
getAtomType
public java.lang.String getAtomType()
getAtomNumber
public int getAtomNumber()
isInFrame
public boolean isInFrame()
getShapeVisibilityFlags
public int getShapeVisibilityFlags()
isShapeVisible
public boolean isShapeVisible(int shapeVisibilityFlag)
getPartialCharge
public float getPartialCharge()
getEllipsoid
public java.lang.Object[] getEllipsoid()
getSymmetryTranslation
public int getSymmetryTranslation(int symop,
int[] cellRange,
int nOps)
- Given a symmetry operation number, the set of cells in the model, and the
number of operations, this method returns either 0 or the cell number (555, 666)
of the translated symmetry operation corresponding to this atom.
atomSymmetry is a bitset that is created in adapter.smarter.AtomSetCollection
It is arranged as follows:
|--overall--|---cell1---|---cell2---|---cell3---|...
|012..nOps-1|012..nOps-1|012..nOp-1s|012..nOps-1|...
If a bit is set, it means that the atom was created using that operator
operating on the base file set and translated for that cell.
If any bit is set in any of the cell blocks, then the same
bit will also be set in the overall block. This allows for
rapid determination of special positions and also of
atom membership in any operation set.
Note that it is not necessarily true that an atom is IN the designated
cell, because one can load {nnn mmm 0}, and then, for example, the {-x,-y,-z}
operator sends atoms from 555 to 444. Still, those atoms would be marked as
cell 555 here, because no translation was carried out.
That is, the numbers 444 in symop=3444 do not refer to a cell, per se.
What they refer to is the file-designated operator plus a translation of
{-1 -1 -1/1}.
- Parameters:
symop
- = 0, 1, 2, 3, ....cellRange
- = {444, 445, 446, 454, 455, 456, .... }nOps
- = 2 for x,y,z;-x,-y,-z, for example
- Returns:
- cell number such as 565
getCellTranslation
public int getCellTranslation(int cellNNN,
int[] cellRange,
int nOps)
- Looks for a match in the cellRange list for this atom within the specified translation set
select symop=0NNN for this
- Parameters:
cellNNN
- cellRange
- nOps
-
- Returns:
- matching cell number, if applicable
getSymmetryOperatorList
java.lang.String getSymmetryOperatorList()
getModelIndex
public int getModelIndex()
- Specified by:
getModelIndex
in interface JmolNode
getMoleculeNumber
public int getMoleculeNumber()
getFractionalCoord
private float getFractionalCoord(char ch,
boolean asAbsolute)
getFractionalUnitCoord
private float getFractionalUnitCoord(char ch)
getFractionalCoord
private javax.vecmath.Point3f getFractionalCoord(boolean asAbsolute)
getFractionalUnitCoord
public javax.vecmath.Point3f getFractionalUnitCoord(boolean asCartesian)
getFractionalUnitDistance
public float getFractionalUnitDistance(javax.vecmath.Point3f pt,
javax.vecmath.Point3f ptTemp1,
javax.vecmath.Point3f ptTemp2)
setFractionalCoord
void setFractionalCoord(int tok,
float fValue,
boolean asAbsolute)
setFractionalCoord
void setFractionalCoord(javax.vecmath.Point3f ptNew,
boolean asAbsolute)
setFractionalCoord
void setFractionalCoord(javax.vecmath.Point3f pt,
javax.vecmath.Point3f ptNew,
boolean asAbsolute)
isCursorOnTopOf
boolean isCursorOnTopOf(int xCursor,
int yCursor,
int minRadius,
Atom competitor)
getInfo
public java.lang.String getInfo()
getInfoXYZ
java.lang.String getInfoXYZ(boolean useChimeFormat)
getIdentityXYZ
java.lang.String getIdentityXYZ(boolean allInfo)
getIdentity
java.lang.String getIdentity(boolean allInfo)
getGroupIndex
public int getGroupIndex()
getGroup3
public java.lang.String getGroup3(boolean allowNull)
- Specified by:
getGroup3
in interface JmolNode
getGroup1
public java.lang.String getGroup1(char c0)
- Specified by:
getGroup1
in interface JmolNode
isGroup3
boolean isGroup3(java.lang.String group3)
isProtein
public boolean isProtein()
- Specified by:
isProtein
in interface JmolNode
isCarbohydrate
public boolean isCarbohydrate()
isNucleic
public boolean isNucleic()
- Specified by:
isNucleic
in interface JmolNode
isDna
public boolean isDna()
- Specified by:
isDna
in interface JmolNode
isRna
public boolean isRna()
- Specified by:
isRna
in interface JmolNode
isPurine
public boolean isPurine()
- Specified by:
isPurine
in interface JmolNode
isPyrimidine
public boolean isPyrimidine()
- Specified by:
isPyrimidine
in interface JmolNode
getSeqcode
int getSeqcode()
getResno
public int getResno()
- Specified by:
getResno
in interface JmolNode
isClickable
public boolean isClickable()
getClickabilityFlags
public int getClickabilityFlags()
setClickable
public void setClickable(int flag)
isVisible
public boolean isVisible(int flags)
- determine if an atom or its PDB group is visible
- Parameters:
flags
- TODO
- Returns:
- true if the atom is in the "select visible" set
isLeadAtom
public boolean isLeadAtom()
- Specified by:
isLeadAtom
in interface JmolNode
getGroupParameter
public float getGroupParameter(int tok)
getChainID
public char getChainID()
- Specified by:
getChainID
in interface JmolNode
getSurfaceDistance100
public int getSurfaceDistance100()
getVibrationVector
public javax.vecmath.Vector3f getVibrationVector()
getVibrationCoord
public float getVibrationCoord(char ch)
getPolymerLength
public int getPolymerLength()
getPolymerIndexInModel
public int getPolymerIndexInModel()
getMonomerIndex
public int getMonomerIndex()
getSelectedGroupCountWithinChain
public int getSelectedGroupCountWithinChain()
getSelectedGroupIndexWithinChain
public int getSelectedGroupIndexWithinChain()
getSelectedMonomerCountWithinPolymer
public int getSelectedMonomerCountWithinPolymer()
getSelectedMonomerIndexWithinPolymer
public int getSelectedMonomerIndexWithinPolymer()
getChain
Chain getChain()
getModelNumberForLabel
java.lang.String getModelNumberForLabel()
getModelNumber
public int getModelNumber()
getModelFileIndex
public int getModelFileIndex()
getModelFileNumber
public int getModelFileNumber()
getGroupType
public java.lang.String getGroupType()
- Specified by:
getGroupType
in interface JmolNode
getProteinStructureType
public byte getProteinStructureType()
getProteinStructureSubType
public byte getProteinStructureSubType()
getStrucNo
public int getStrucNo()
getStructureId
public java.lang.String getStructureId()
getProteinStructureTag
public java.lang.String getProteinStructureTag()
getGroupID
public short getGroupID()
getSeqcodeString
java.lang.String getSeqcodeString()
getSeqNumber
int getSeqNumber()
getInsertionCode
public char getInsertionCode()
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class javax.vecmath.Tuple3f
hashCode
public int hashCode()
- Overrides:
hashCode
in class javax.vecmath.Tuple3f
findAromaticNeighbor
public Atom findAromaticNeighbor(int notAtomIndex)
atomPropertyInt
public static int atomPropertyInt(Atom atom,
int tokWhat)
- called by isosurface and int comparator via atomProperty()
and also by getBitsetProperty()
- Parameters:
atom
- tokWhat
-
- Returns:
- int value or Integer.MIN_VALUE
atomPropertyFloat
public static float atomPropertyFloat(Viewer viewer,
Atom atom,
int tokWhat)
- called by isosurface and int comparator via atomProperty()
and also by getBitsetProperty()
- Parameters:
viewer
- atom
- tokWhat
-
- Returns:
- float value or value*100 (asInt=true) or throw an error if not found
atomPropertyString
public static java.lang.String atomPropertyString(Atom atom,
int tokWhat)
atomPropertyTuple
public static javax.vecmath.Tuple3f atomPropertyTuple(Atom atom,
int tok)
isWithinStructure
boolean isWithinStructure(byte type)
getOffsetResidueAtom
public int getOffsetResidueAtom(java.lang.String name,
int offset)
- Specified by:
getOffsetResidueAtom
in interface JmolNode
isCrossLinked
public boolean isCrossLinked(JmolNode node)
- Specified by:
isCrossLinked
in interface JmolNode
getCrossLinkLeadAtomIndexes
public boolean getCrossLinkLeadAtomIndexes(java.util.List vReturn)
- Specified by:
getCrossLinkLeadAtomIndexes
in interface JmolNode
toString
public java.lang.String toString()
- Overrides:
toString
in class javax.vecmath.Tuple3f