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
public final class Atom
- extends Point3fi
- See Also:
- Serialized Form
Fields inherited from class javax.vecmath.Tuple3f |
x, y, z |
Constructor Summary |
Atom(javax.vecmath.Point3f pt)
|
Atom(Viewer viewer,
int modelIndex,
int atomIndex,
java.util.BitSet atomSymmetry,
int atomSite,
short atomicAndIsotopeNumber,
int size,
int formalCharge,
float x,
float y,
float z,
boolean isHetero,
char chainID,
char alternateLocationID,
float radius)
|
Method Summary |
void |
addDisplayedBackbone(int backboneVisibilityFlag,
boolean isVisible)
|
(package private) void |
addDisplayedBond(int stickVisibilityFlag,
boolean isVisible)
|
static float |
atomPropertyFloat(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)
|
(package private) void |
clearBonds()
|
short |
convertEncodedMad(Viewer viewer,
int size,
float fsize)
|
(package private) void |
deleteBond(Bond bond)
|
private void |
deleteBond(int i)
|
boolean |
equals(java.lang.Object obj)
|
Atom |
findAromaticNeighbor(java.util.BitSet notAtoms)
|
Atom |
findAromaticNeighbor(int notAtomIndex)
|
float |
getADPMinMax(boolean isMax)
|
char |
getAlternateLocationID()
|
short |
getAtomicAndIsotopeNumber()
|
int |
getAtomIndex()
|
java.lang.String |
getAtomName()
|
int |
getAtomNumber()
|
int |
getAtomSite()
|
java.util.BitSet |
getAtomSymmetry()
|
java.lang.String |
getAtomType()
|
int |
getBfactor100()
|
Bond |
getBond(Atom atomOther)
|
(package private) int |
getBondedAtomIndex(int bondIndex)
|
(package private) short |
getBondingMar()
|
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()
|
(package private) java.lang.String |
getClientAtomStringProperty(java.lang.String propertyName)
|
short |
getColix()
|
int |
getCovalentBondCount()
|
(package private) int |
getCovalentHydrogenCount()
|
float |
getCovalentRadiusFloat()
|
(package private) int |
getCurrentBondCount()
|
float |
getDimensionValue(int dimension)
|
short |
getElementNumber()
|
java.lang.String |
getElementSymbol()
|
java.lang.String |
getElementSymbol(boolean withIsotope)
|
java.lang.Object[] |
getEllipsoid()
|
int |
getFormalCharge()
|
javax.vecmath.Point3f |
getFractionalCoord()
|
float |
getFractionalCoord(char ch)
|
javax.vecmath.Point3f |
getFractionalUnitCoord(boolean asCartesian)
|
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 |
getGroupPhi()
|
float |
getGroupPsi()
|
(package private) java.lang.String |
getIdentity(boolean allInfo)
|
(package private) java.lang.String |
getIdentityXYZ()
|
java.lang.String |
getInfo()
|
(package private) java.lang.String |
getInfoXYZ(boolean useChimeFormat)
|
char |
getInsertionCode()
|
short |
getIsotopeNumber()
|
short |
getMadAtom()
|
int |
getModelFileIndex()
|
int |
getModelFileNumber()
|
int |
getModelIndex()
|
int |
getModelNumber()
|
(package private) java.lang.String |
getModelNumberForLabel()
|
int |
getMoleculeNumber()
|
int |
getNBackbonesDisplayed()
|
int |
getOccupancy100()
|
byte |
getPaletteID()
|
float |
getPartialCharge()
|
(package private) int |
getPolymerIndex()
|
int |
getPolymerLength()
|
java.lang.String |
getProteinStructureTag()
|
byte |
getProteinStructureType()
|
Quaternion |
getQuaternion(char qtype)
|
float |
getRadius()
|
int |
getRasMolRadius()
|
int |
getResno()
|
int |
getScreenRadius()
|
int |
getSelectedGroupCountWithinChain()
|
int |
getSelectedGroupIndexWithinChain()
|
int |
getSelectedMonomerCountWithinPolymer()
|
int |
getSelectedMonomerIndexWithinPolymer()
|
(package private) int |
getSeqcode()
|
(package private) java.lang.String |
getSeqcodeString()
|
(package private) int |
getSeqNumber()
|
int |
getShapeVisibilityFlags()
|
byte |
getSpecialAtomID()
|
float |
getStraightness()
|
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. |
int |
getValence()
|
private int |
getVanderwaalsMad(Viewer viewer)
|
float |
getVanderwaalsRadiusFloat()
|
float |
getVibrationCoord(char ch)
|
javax.vecmath.Vector3f |
getVibrationVector()
|
int |
hashCode()
|
(package private) boolean |
isAlternateLocationMatch(java.lang.String strPattern)
|
boolean |
isBonded(Atom atomOther)
|
(package private) boolean |
isCarbohydrate()
|
boolean |
isClickable()
|
(package private) boolean |
isCursorOnTopOf(int xCursor,
int yCursor,
int minRadius,
Atom competitor)
|
(package private) boolean |
isDna()
|
(package private) boolean |
isGroup3(java.lang.String group3)
|
boolean |
isHetero()
|
boolean |
isInFrame()
|
(package private) boolean |
isNucleic()
|
(package private) boolean |
isProtein()
|
(package private) boolean |
isPurine()
|
(package private) boolean |
isPyrimidine()
|
(package private) boolean |
isRna()
|
boolean |
isShapeVisible(int shapeVisibilityFlag)
|
boolean |
isSimple()
|
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 |
setClickable(int flag)
|
void |
setColixAtom(short colixAtom)
|
(package private) void |
setFormalCharge(int charge)
|
(package private) void |
setFractionalCoord(int tok,
float fValue)
|
(package private) void |
setFractionalCoord(javax.vecmath.Point3f ptNew)
|
(package private) void |
setGroup(Group group)
|
void |
setMadAtom(Viewer viewer,
int size,
float fsize)
|
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()
|
void |
transform(Viewer viewer)
|
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, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
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
MAD_MAX
private static final int MAD_MAX
- See Also:
- Constant Field Values
group
Group group
atomIndex
int atomIndex
atomSymmetry
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
madAtom
short madAtom
colixAtom
short colixAtom
paletteID
byte paletteID
bonds
Bond[] bonds
nBondsDisplayed
int nBondsDisplayed
nBackbonesDisplayed
int nBackbonesDisplayed
clickabilityFlags
int clickabilityFlags
shapeVisibilityFlags
int shapeVisibilityFlags
isSimple
boolean isSimple
Atom
public Atom(javax.vecmath.Point3f pt)
Atom
Atom(Viewer viewer,
int modelIndex,
int atomIndex,
java.util.BitSet atomSymmetry,
int atomSite,
short atomicAndIsotopeNumber,
int size,
int formalCharge,
float x,
float y,
float z,
boolean isHetero,
char chainID,
char alternateLocationID,
float radius)
getScreenRadius
public int getScreenRadius()
getMadAtom
public short getMadAtom()
getNBackbonesDisplayed
public int getNBackbonesDisplayed()
isSimple
public boolean isSimple()
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
int getBondedAtomIndex(int bondIndex)
setMadAtom
public void setMadAtom(Viewer viewer,
int size,
float fsize)
convertEncodedMad
public short convertEncodedMad(Viewer viewer,
int size,
float fsize)
getADPMinMax
public float getADPMinMax(boolean isMax)
getRasMolRadius
public int getRasMolRadius()
getCovalentBondCount
public int getCovalentBondCount()
getCovalentHydrogenCount
int getCovalentHydrogenCount()
getBonds
public Bond[] getBonds()
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()
getIsotopeNumber
public short getIsotopeNumber()
getAtomicAndIsotopeNumber
public short getAtomicAndIsotopeNumber()
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()
setFormalCharge
void setFormalCharge(int charge)
setVibrationVector
void setVibrationVector()
getFormalCharge
public int getFormalCharge()
getOccupancy100
public int getOccupancy100()
getBfactor100
public int getBfactor100()
setRadius
public boolean setRadius(float radius)
setValence
public void setValence(int nBonds)
getValence
public int getValence()
getDimensionValue
public float getDimensionValue(int dimension)
getVanderwaalsMad
private int getVanderwaalsMad(Viewer viewer)
getBondingMar
short getBondingMar()
getVanderwaalsRadiusFloat
public float getVanderwaalsRadiusFloat()
getCovalentRadiusFloat
public float getCovalentRadiusFloat()
getBondingRadiusFloat
public float getBondingRadiusFloat()
getCurrentBondCount
int getCurrentBondCount()
getColix
public short getColix()
getPaletteID
public byte getPaletteID()
getRadius
public float getRadius()
getAtomIndex
public int getAtomIndex()
getAtomSite
public int getAtomSite()
getAtomSymmetry
public java.util.BitSet getAtomSymmetry()
setGroup
void setGroup(Group group)
getGroup
public Group getGroup()
transform
public void transform(Viewer viewer)
getAtomName
public java.lang.String getAtomName()
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()
getStraightness
public float getStraightness()
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()
getMoleculeNumber
public int getMoleculeNumber()
getClientAtomStringProperty
java.lang.String getClientAtomStringProperty(java.lang.String propertyName)
getSpecialAtomID
public byte getSpecialAtomID()
getFractionalCoord
public float getFractionalCoord(char ch)
getFractionalUnitCoord
public float getFractionalUnitCoord(char ch)
getFractionalCoord
public javax.vecmath.Point3f getFractionalCoord()
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)
setFractionalCoord
void setFractionalCoord(javax.vecmath.Point3f ptNew)
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()
getIdentity
java.lang.String getIdentity(boolean allInfo)
getGroupIndex
public int getGroupIndex()
getGroup3
public java.lang.String getGroup3(boolean allowNull)
getGroup1
public java.lang.String getGroup1(char c0)
isGroup3
boolean isGroup3(java.lang.String group3)
isProtein
boolean isProtein()
isCarbohydrate
boolean isCarbohydrate()
isNucleic
boolean isNucleic()
isDna
boolean isDna()
isRna
boolean isRna()
isPurine
boolean isPurine()
isPyrimidine
boolean isPyrimidine()
getSeqcode
int getSeqcode()
getResno
public int getResno()
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
getGroupPhi
public float getGroupPhi()
getGroupPsi
public float getGroupPsi()
getChainID
public char getChainID()
getSurfaceDistance100
public int getSurfaceDistance100()
getVibrationVector
public javax.vecmath.Vector3f getVibrationVector()
getVibrationCoord
public float getVibrationCoord(char ch)
getPolymerLength
public int getPolymerLength()
getQuaternion
public Quaternion getQuaternion(char qtype)
getPolymerIndex
int getPolymerIndex()
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()
getProteinStructureType
public byte getProteinStructureType()
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 Point3fi
hashCode
public int hashCode()
- Overrides:
hashCode
in class Point3fi
findAromaticNeighbor
public Atom findAromaticNeighbor(java.util.BitSet notAtoms)
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(Atom atom,
int tokWhat)
- called by isosurface and int comparator via atomProperty()
and also by getBitsetProperty()
- Parameters:
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)