Package org.jmol.modelset
Class Atom
- java.lang.Object
-
- javajs.util.T3
-
- javajs.util.P3
-
- org.jmol.util.Point3fi
-
- org.jmol.modelset.Atom
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,javajs.api.JSONEncodable,Node
public class Atom extends Point3fi implements Node
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description charaltlocstatic intATOM_INFRAMEstatic intATOM_INFRAME_NOTHIDDENstatic intATOM_NOFLAGSstatic intATOM_NOTHIDDENstatic intATOM_SHAPE_VIS_MASKstatic intATOM_VISIBLEstatic intATOM_VISSETprivate shortatomicAndIsotopeNumberbyteatomIDintatomSiteBSatomSymmetryBond[]bondsMAY BE NULLintclickabilityFlagsshortcolixAtomprivate static byteFLAG_MASKprivate byteformalChargeAndFlagsGroupgroupprivate static byteIS_HETERO_FLAGstatic shortMAD_GLOBALshortmadAtomintnBackbonesDisplayedprivate intnBondsDisplayedbytepaletteIDstatic floatRADIUS_GLOBALstatic intRADIUS_MAXintshapeVisibilityFlagsprivate floatuserDefinedVanDerWaalRadius(package private) bytevalenceprivate static byteVIBRATION_VECTOR_FLAG
-
Constructor Summary
Constructors Constructor Description Atom()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidaddDisplayedBond(int stickVisibilityFlag, boolean isVisible)floatatomPropertyFloat(Viewer vwr, int tokWhat, javajs.util.P3 ptTemp)called by isosurface and int comparator via atomProperty() and also by getBitsetProperty()intatomPropertyInt(int tokWhat)called by isosurface and int comparator via atomProperty() and also by getBitsetProperty()java.lang.StringatomPropertyString(Viewer vwr, int tokWhat)javajs.util.T3atomPropertyTuple(Viewer vwr, int tok, javajs.util.P3 ptTemp)shortcalculateMad(Viewer vwr, RadiusData rd)booleancheckVisible()voiddelete(BS bsBonds)(package private) voiddeleteBond(Bond bond)private voiddeleteBondAt(int i)booleanequals(java.lang.Object obj)Returns true if all of the data members of Tuple3f t1 are equal to the corresponding data members in thisAtomfindAromaticNeighbor(int notAtomIndex)BSfindAtomsLike(java.lang.String atomExpression)floatgetADPMinMax(boolean isMax)intgetAtomicAndIsotopeNumber()java.lang.StringgetAtomName()intgetAtomNumber()intgetAtomSite()java.lang.StringgetAtomType()intgetBfactor100()chargetBioSmilesType()java.lang.StringgetBioStructureTypeName()BondgetBond(Atom atomOther)intgetBondCount()intgetBondedAtomIndex(int bondIndex)floatgetBondingRadius()intgetCellTranslation(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 thisintgetChainID()java.lang.StringgetChainIDStr()intgetCovalentBondCount()intgetCovalentBondCountPlusMissingH()includes actual + missingintgetCovalentHydrogenCount()booleangetCrossLinkVector(javajs.util.Lst<java.lang.Integer> vReturn, boolean crosslinkCovalent, boolean crosslinkHBond)Used by SMILES to get vector of cross-links(package private) intgetCurrentBondCount()floatgetDimensionValue(int dimension)Edge[]getEdges()intgetElementNumber()java.lang.StringgetElementSymbol()java.lang.StringgetElementSymbolIso(boolean withIsotope)floatgetFloatProperty(java.lang.String property)intgetFormalCharge()private floatgetFractionalCoord(boolean fixJavaFloat, char ch, boolean asAbsolute, javajs.util.P3 pt)javajs.util.P3getFractionalCoordPt(boolean fixJavaFloat, boolean asAbsolute, javajs.util.P3 pt)private floatgetFractionalUnitCoord(boolean fixJavaFloat, char ch, javajs.util.P3 pt)(package private) javajs.util.P3getFractionalUnitCoordPt(boolean fixJavaFloat, boolean asCartesian, javajs.util.P3 pt)(package private) floatgetFractionalUnitDistance(javajs.util.T3 pt, javajs.util.T3 ptTemp1, javajs.util.T3 ptTemp2)java.lang.StringgetGroup1(char c0)java.lang.StringgetGroup3(boolean allowNull)voidgetGroupBits(BS bs)floatgetHydrophobicity()(package private) java.lang.StringgetIdentity(boolean allInfo)java.lang.StringgetIdentityXYZ(boolean allInfo, javajs.util.P3 pt)intgetImplicitHydrogenCount()can be > 0 for PDB model with no H atoms or for SMILES string CCCintgetIndex()java.lang.StringgetInfo()chargetInsertionCode()intgetIsotopeNumber()private floatgetMass()intgetModelIndex()SMILES onlyintgetModelNumber()java.lang.StringgetModelNumberForLabel()JmolModulationSetgetModulation()intgetMoleculeNumber(boolean inModel)intgetOccupancy100()intgetOffsetResidueAtom(java.lang.String name, int offset)floatgetPartialCharge()floatgetRadius()intgetRasMolRadius()intgetResno()intgetSeqID()intgetSurfaceDistance100()(package private) java.lang.StringgetSymmetryOperatorList(boolean isAll)intgetSymmetryTranslation(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) intgetSymOp()(package private) intgetTargetValence()java.lang.Object[]getTensors()intgetTotalHydrogenCount()intgetTotalValence()(package private) SymmetryInterfacegetUnitCell()java.lang.StringgetUnitID(int flags)intgetValence()return the total bond order for this atomfloatgetVanderwaalsRadiusFloat(Viewer vwr, VDW type)private VDWgetVdwType(VDW type)floatgetVib(char ch)VibrationgetVibrationVector()(package private) floatgetVolume(Viewer vwr, VDW vType)inthashCode()Returns a hash number based on the data values in this object.booleanhasVibration()booleanisBonded(Atom atomOther)booleanisClickable()booleanisCovalentlyBonded(Atom atomOther)booleanisCrossLinked(Node node)(package private) booleanisCursorOnTopOf(int xCursor, int yCursor, int minRadius, Atom competitor)booleanisDeleted()booleanisHetero()booleanisLeadAtom()booleanisOccupied()booleanisPurine()booleanisPyrimidine()booleanisVisible(int flags)AtomsetAtom(int modelIndex, int atomIndex, javajs.util.P3 xyz, float radius, BS atomSymmetry, int atomSite, short atomicAndIsotopeNumber, int formalCharge, boolean isHetero)voidsetAtomicAndIsotopeNumber(int n)voidsetClickable(int flag)voidsetFormalCharge(int charge)(package private) voidsetFractionalCoord(int tok, float fValue, boolean asAbsolute)voidsetFractionalCoordPt(javajs.util.P3 pt, javajs.util.P3 ptNew, boolean asAbsolute)(package private) voidsetFractionalCoordTo(javajs.util.P3 ptNew, boolean asAbsolute)voidsetMadAtom(Viewer vwr, RadiusData rd)booleansetRadius(float radius)voidsetShapeVisibility(int flag, boolean isVisible)voidsetTranslucent(boolean isTranslucent, float translucentLevel)voidsetValence(int nBonds)(package private) voidsetVibrationVector()java.lang.StringtoString()Returns a string that contains the values of this Tuple3f.-
Methods inherited from class javajs.util.T3
add, add2, add3, ave, cross, distance, distanceSquared, dot, length, lengthSquared, normalize, scale, scaleAdd2, scaleT, set, setA, setT, sub, sub2, toJSON
-
-
-
-
Field Detail
-
ATOM_INFRAME
public static final int ATOM_INFRAME
- See Also:
- Constant Field Values
-
ATOM_VISSET
public static final int ATOM_VISSET
- See Also:
- Constant Field Values
-
ATOM_VISIBLE
public static final int ATOM_VISIBLE
- See Also:
- Constant Field Values
-
ATOM_NOTHIDDEN
public static final int ATOM_NOTHIDDEN
- See Also:
- Constant Field Values
-
ATOM_NOFLAGS
public static final int ATOM_NOFLAGS
- See Also:
- Constant Field Values
-
ATOM_INFRAME_NOTHIDDEN
public static final int ATOM_INFRAME_NOTHIDDEN
- See Also:
- Constant Field Values
-
ATOM_SHAPE_VIS_MASK
public static final int ATOM_SHAPE_VIS_MASK
- See Also:
- Constant Field Values
-
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
-
RADIUS_GLOBAL
public static final float RADIUS_GLOBAL
- See Also:
- Constant Field Values
-
MAD_GLOBAL
public static short MAD_GLOBAL
-
altloc
public char altloc
-
atomID
public byte atomID
-
atomSite
public int atomSite
-
group
public Group group
-
userDefinedVanDerWaalRadius
private float userDefinedVanDerWaalRadius
-
valence
byte valence
-
atomicAndIsotopeNumber
private short atomicAndIsotopeNumber
-
atomSymmetry
public BS atomSymmetry
-
formalChargeAndFlags
private byte formalChargeAndFlags
-
madAtom
public short madAtom
-
colixAtom
public short colixAtom
-
paletteID
public byte paletteID
-
bonds
public Bond[] bonds
MAY BE NULL
-
nBondsDisplayed
private int nBondsDisplayed
-
nBackbonesDisplayed
public int nBackbonesDisplayed
-
clickabilityFlags
public int clickabilityFlags
-
shapeVisibilityFlags
public int shapeVisibilityFlags
-
-
Method Detail
-
setAtom
public Atom setAtom(int modelIndex, int atomIndex, javajs.util.P3 xyz, float radius, BS atomSymmetry, int atomSite, short atomicAndIsotopeNumber, int formalCharge, boolean isHetero)
- Parameters:
modelIndex-atomIndex-xyz-radius-atomSymmetry-atomSite-atomicAndIsotopeNumber-formalCharge-isHetero-- Returns:
- this
-
setShapeVisibility
public final void setShapeVisibility(int flag, boolean isVisible)
-
isCovalentlyBonded
public boolean isCovalentlyBonded(Atom atomOther)
-
isBonded
public boolean isBonded(Atom atomOther)
-
addDisplayedBond
void addDisplayedBond(int stickVisibilityFlag, boolean isVisible)
-
deleteBond
void deleteBond(Bond bond)
-
deleteBondAt
private void deleteBondAt(int i)
-
getBondedAtomIndex
public int getBondedAtomIndex(int bondIndex)
- Specified by:
getBondedAtomIndexin interfaceNode
-
setMadAtom
public void setMadAtom(Viewer vwr, RadiusData rd)
-
calculateMad
public short calculateMad(Viewer vwr, RadiusData rd)
-
getADPMinMax
public float getADPMinMax(boolean isMax)
-
getTensors
public java.lang.Object[] getTensors()
-
getRasMolRadius
public int getRasMolRadius()
-
getBondCount
public int getBondCount()
- Specified by:
getBondCountin interfaceNode
-
setTranslucent
public void setTranslucent(boolean isTranslucent, float translucentLevel)
-
getElementNumber
public int getElementNumber()
- Specified by:
getElementNumberin interfaceNode
-
getIsotopeNumber
public int getIsotopeNumber()
- Specified by:
getIsotopeNumberin interfaceNode
-
getAtomicAndIsotopeNumber
public int getAtomicAndIsotopeNumber()
- Specified by:
getAtomicAndIsotopeNumberin interfaceNode
-
setAtomicAndIsotopeNumber
public void setAtomicAndIsotopeNumber(int n)
-
getElementSymbolIso
public java.lang.String getElementSymbolIso(boolean withIsotope)
-
getElementSymbol
public java.lang.String getElementSymbol()
-
isHetero
public boolean isHetero()
-
hasVibration
public boolean hasVibration()
-
setFormalCharge
public void setFormalCharge(int charge)
-
setVibrationVector
void setVibrationVector()
-
getFormalCharge
public int getFormalCharge()
- Specified by:
getFormalChargein interfaceNode
-
getOccupancy100
public int getOccupancy100()
-
isOccupied
public boolean isOccupied()
-
getBfactor100
public int getBfactor100()
-
getHydrophobicity
public float getHydrophobicity()
-
setRadius
public boolean setRadius(float radius)
-
delete
public void delete(BS bsBonds)
-
setValence
public void setValence(int nBonds)
-
getValence
public int getValence()
return the total bond order for this atom- Specified by:
getValencein interfaceNode
-
getCovalentBondCount
public int getCovalentBondCount()
- Specified by:
getCovalentBondCountin interfaceNode
-
getCovalentHydrogenCount
public int getCovalentHydrogenCount()
- Specified by:
getCovalentHydrogenCountin interfaceNode
-
getImplicitHydrogenCount
public int getImplicitHydrogenCount()
Description copied from interface:Nodecan be > 0 for PDB model with no H atoms or for SMILES string CCC- Specified by:
getImplicitHydrogenCountin interfaceNode- Returns:
- number of missing H atoms
-
getTotalHydrogenCount
public int getTotalHydrogenCount()
- Specified by:
getTotalHydrogenCountin interfaceNode
-
getTotalValence
public int getTotalValence()
- Specified by:
getTotalValencein interfaceNode
-
getCovalentBondCountPlusMissingH
public int getCovalentBondCountPlusMissingH()
Description copied from interface:Nodeincludes actual + missing- Specified by:
getCovalentBondCountPlusMissingHin interfaceNode- Returns:
- actual + missing
-
getTargetValence
int getTargetValence()
-
getDimensionValue
public float getDimensionValue(int dimension)
-
getVdwType
private VDW getVdwType(VDW type)
- Parameters:
type-- Returns:
- if VDW_AUTO, will return VDW_AUTO_JMOL, VDW_AUTO_RASMOL, or VDW_AUTO_BABEL based on the model type
-
getBondingRadius
public float getBondingRadius()
-
getCurrentBondCount
int getCurrentBondCount()
-
getRadius
public float getRadius()
-
getAtomSite
public int getAtomSite()
- Specified by:
getAtomSitein interfaceNode
-
getGroupBits
public void getGroupBits(BS bs)
- Specified by:
getGroupBitsin interfaceNode
-
getAtomName
public java.lang.String getAtomName()
- Specified by:
getAtomNamein interfaceNode
-
getAtomType
public java.lang.String getAtomType()
- Specified by:
getAtomTypein interfaceNode
-
getAtomNumber
public int getAtomNumber()
- Specified by:
getAtomNumberin interfaceNode
-
getSeqID
public int getSeqID()
-
isVisible
public boolean isVisible(int flags)
-
getPartialCharge
public float getPartialCharge()
-
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(boolean isAll)
-
getModelIndex
public int getModelIndex()
SMILES only- Specified by:
getModelIndexin interfaceNode
-
getMoleculeNumber
public int getMoleculeNumber(boolean inModel)
- Specified by:
getMoleculeNumberin interfaceNode
-
getFractionalCoord
private float getFractionalCoord(boolean fixJavaFloat, char ch, boolean asAbsolute, javajs.util.P3 pt)
-
getFractionalCoordPt
public javajs.util.P3 getFractionalCoordPt(boolean fixJavaFloat, boolean asAbsolute, javajs.util.P3 pt)
-
getUnitCell
SymmetryInterface getUnitCell()
-
getFractionalUnitCoord
private float getFractionalUnitCoord(boolean fixJavaFloat, char ch, javajs.util.P3 pt)
-
getFractionalUnitCoordPt
javajs.util.P3 getFractionalUnitCoordPt(boolean fixJavaFloat, boolean asCartesian, javajs.util.P3 pt)- Parameters:
fixJavaFloat- ALWAYS set true for any new references to this method. False is for legacy onlyasCartesian-pt-- Returns:
- unit cell coord
-
getFractionalUnitDistance
float getFractionalUnitDistance(javajs.util.T3 pt, javajs.util.T3 ptTemp1, javajs.util.T3 ptTemp2)
-
setFractionalCoord
void setFractionalCoord(int tok, float fValue, boolean asAbsolute)
-
setFractionalCoordTo
void setFractionalCoordTo(javajs.util.P3 ptNew, boolean asAbsolute)
-
setFractionalCoordPt
public void setFractionalCoordPt(javajs.util.P3 pt, javajs.util.P3 ptNew, boolean asAbsolute)
-
isCursorOnTopOf
boolean isCursorOnTopOf(int xCursor, int yCursor, int minRadius, Atom competitor)
-
getInfo
public java.lang.String getInfo()
-
getIdentityXYZ
public java.lang.String getIdentityXYZ(boolean allInfo, javajs.util.P3 pt)
-
getIdentity
java.lang.String getIdentity(boolean allInfo)
-
getGroup3
public java.lang.String getGroup3(boolean allowNull)
-
getBioSmilesType
public char getBioSmilesType()
- Specified by:
getBioSmilesTypein interfaceNode
-
isPyrimidine
public boolean isPyrimidine()
- Specified by:
isPyrimidinein interfaceNode
-
isClickable
public boolean isClickable()
-
setClickable
public void setClickable(int flag)
-
checkVisible
public boolean checkVisible()
-
isLeadAtom
public boolean isLeadAtom()
- Specified by:
isLeadAtomin interfaceNode
-
getChainID
public int getChainID()
- Specified by:
getChainIDin interfaceNode
-
getChainIDStr
public java.lang.String getChainIDStr()
- Specified by:
getChainIDStrin interfaceNode
-
getSurfaceDistance100
public int getSurfaceDistance100()
-
getVibrationVector
public Vibration getVibrationVector()
-
getModulation
public JmolModulationSet getModulation()
-
getModelNumberForLabel
public java.lang.String getModelNumberForLabel()
-
getModelNumber
public int getModelNumber()
-
getBioStructureTypeName
public java.lang.String getBioStructureTypeName()
- Specified by:
getBioStructureTypeNamein interfaceNode
-
equals
public boolean equals(java.lang.Object obj)
Description copied from class:javajs.util.T3Returns true if all of the data members of Tuple3f t1 are equal to the corresponding data members in this- Overrides:
equalsin classjavajs.util.T3- Parameters:
obj- the vector with which the comparison is made.
-
hashCode
public int hashCode()
Description copied from class:javajs.util.T3Returns a hash number based on the data values in this object. Two different Tuple3f objects with identical data values (ie, returns true for equals(Tuple3f) ) will return the same hash number. Two vectors with different data members may return the same hash value, although this is not likely.- Overrides:
hashCodein classjavajs.util.T3
-
findAromaticNeighbor
public Atom findAromaticNeighbor(int notAtomIndex)
-
atomPropertyInt
public int atomPropertyInt(int tokWhat)
called by isosurface and int comparator via atomProperty() and also by getBitsetProperty()- Parameters:
tokWhat-- Returns:
- int value or Integer.MIN_VALUE
-
getSymOp
int getSymOp()
-
atomPropertyFloat
public float atomPropertyFloat(Viewer vwr, int tokWhat, javajs.util.P3 ptTemp)
called by isosurface and int comparator via atomProperty() and also by getBitsetProperty()- Parameters:
vwr-tokWhat-ptTemp-- Returns:
- float value or value*100 (asInt=true) or throw an error if not found
-
getVib
public float getVib(char ch)
-
getMass
private float getMass()
-
atomPropertyString
public java.lang.String atomPropertyString(Viewer vwr, int tokWhat)
-
getInsertionCode
public char getInsertionCode()
- Specified by:
getInsertionCodein interfaceNode
-
atomPropertyTuple
public javajs.util.T3 atomPropertyTuple(Viewer vwr, int tok, javajs.util.P3 ptTemp)
-
getOffsetResidueAtom
public int getOffsetResidueAtom(java.lang.String name, int offset)- Specified by:
getOffsetResidueAtomin interfaceNode
-
isCrossLinked
public boolean isCrossLinked(Node node)
- Specified by:
isCrossLinkedin interfaceNode
-
getCrossLinkVector
public boolean getCrossLinkVector(javajs.util.Lst<java.lang.Integer> vReturn, boolean crosslinkCovalent, boolean crosslinkHBond)Used by SMILES to get vector of cross-links- Specified by:
getCrossLinkVectorin interfaceNode
-
toString
public java.lang.String toString()
Description copied from class:javajs.util.T3Returns a string that contains the values of this Tuple3f. The form is (x,y,z).- Overrides:
toStringin classjavajs.util.T3- Returns:
- the String representation
-
findAtomsLike
public BS findAtomsLike(java.lang.String atomExpression)
- Specified by:
findAtomsLikein interfaceNode
-
getUnitID
public java.lang.String getUnitID(int flags)
-
getFloatProperty
public float getFloatProperty(java.lang.String property)
- Specified by:
getFloatPropertyin interfaceNode- Parameters:
property- "property_xxxx"- Returns:
- value or Float.NaN
-
-