Class SmilesAtom
java.lang.Object
javajs.util.T3
javajs.util.P3
org.jmol.smiles.SmilesAtom
- All Implemented Interfaces:
Serializable, JSONEncodable, Node, SimpleNode
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfor InChI or any other system that self-defines stereochemistry.findAtomsLike(String substring) intintReturns the atomic mass of the atom.intReturns the Jmol atom numberintchargetBond(int number) Returns the bond at indexnumber.intGet the total number of bonds, including hydrogen bonds.intgetBondedAtomIndex(int j) intintReturns the charge of the atom.intgetCIPChirality(boolean doCalculate) intintReturns the number of bonds of this atom.intincludes actual + missingintbooleangetCrossLinkVector(Lst<Integer> vLinks, boolean crosslinkCovalent, boolean crosslinkHBond) Edge[]getEdges()Get the bond array, including hydrogen bonds.intReturns the atomic number of the element or 0int[CH2] for examplefloatgetFloatProperty(String property) intgetGroup1(char c0) getGroup3(boolean allowNull) voidgetGroupBits(BS bs) intcan be > 0 for PDB model with no H atoms or for SMILES string CCCintgetIndex()Returns the atom index of the atom.charintfloatgetMass()Returns the matching atom or null.intReturns the number of a matching atom in a molecule.intgetMatchingBondedAtom(int i) intintgetMoleculeNumber(boolean inModel) intgetOffsetResidueAtom(String name, int offset) intintgetResno()getStereoAtAt(SimpleNode[] nodes) intintintgetXYZ()booleanisCrossLinked(Node node) booleanbooleanbooleanbooleanbooleanisPurine()booleanisStereoOpposite(int i2, int iA, int iB) booleanvoidsetAtomicMass(int mass) Sets the atomic mass of the atom.voidvoidsetBonds(SmilesBond[] bonds) voidsetCharge(int charge) Sets the charge of the atom.voidsetCIPChirality(int c) voidsetConnectivity(int connectivity) voidsetDegree(int degree) voidsetExplicitHydrogenCount(int count) Sets the number of explicit hydrogen atoms bonded with this atom.booleanFinalizes the hydrogen count hydrogens in aSmilesMolecule.voidsetImplicitHydrogenCount(int count) Sets the number of implicit hydrogen atoms bonded with this atom.setIndex(int index) Constructs aSmilesAtom.voidsetMatchingAtom(Node jmolAtom, int index) Sets the number of a matching atom in a molecule.voidsetNonhydrogenDegree(int degree) voidsetRingConnectivity(int rc) voidsetRingMembership(int rm) voidsetRingSize(int rs) booleanSets the symbol of the atm.setTopoAtom(int iComponent, int ptAtom, String symbol, int charge, int patternIndex) voidsetValence(int valence) toString()Returns a string that contains the values of this Tuple3f.Methods inherited from class P3
getUnlikely, new3, newA, newP
-
Field Details
-
stereo
-
-
Constructor Details
-
SmilesAtom
public SmilesAtom()
-
-
Method Details
-
getAtomType
- Specified by:
getAtomTypein interfaceNode
-
getChiralClass
public int getChiralClass() -
isDefined
public boolean isDefined() -
setBonds
-
setIndex
Constructs aSmilesAtom.- Parameters:
index- Atom number in the molecule.- Returns:
- this
-
setTopoAtom
public SmilesAtom setTopoAtom(int iComponent, int ptAtom, String symbol, int charge, int patternIndex) -
setHydrogenCount
public boolean setHydrogenCount()Finalizes the hydrogen count hydrogens in aSmilesMolecule. "missing" here means the number of atoms not present in the SMILES string for unbracketed atoms or the number of hydrogen atoms "CC" being really CH3CH3 or explicitly mentioned in the bracketed atom, "[CH2]". These hydrogen atoms are not part of the topological model constructed and need to be accounted for.- Returns:
- false if inappropriate
-
getIndex
public int getIndex()Returns the atom index of the atom.- Specified by:
getIndexin interfaceNode- Specified by:
getIndexin interfaceSimpleNode- Returns:
- Atom index.
-
setSymbol
Sets the symbol of the atm.- Parameters:
symbol- Atom symbol.- Returns:
- false if invalid symbol
-
getElementNumber
public int getElementNumber()Returns the atomic number of the element or 0- Specified by:
getElementNumberin interfaceNode- Specified by:
getElementNumberin interfaceSimpleNode- Returns:
- atomicNumber
-
getAtomicMass
public int getAtomicMass()Returns the atomic mass of the atom.- Returns:
- Atomic mass.
-
getAtomNumber
public int getAtomNumber()Returns the Jmol atom number- Specified by:
getAtomNumberin interfaceNode
-
setAtomicMass
public void setAtomicMass(int mass) Sets the atomic mass of the atom.- Parameters:
mass- Atomic mass.
-
getCharge
public int getCharge()Returns the charge of the atom.- Returns:
- Charge.
-
setCharge
public void setCharge(int charge) Sets the charge of the atom.- Parameters:
charge- Charge.
-
getMatchingAtomIndex
public int getMatchingAtomIndex()Returns the number of a matching atom in a molecule. This value is temporary, it is used during the pattern matching algorithm.- Returns:
- matching atom index
-
getMatchingAtom
-
setMatchingAtom
Sets the number of a matching atom in a molecule. This value is temporary, it is used during the pattern matching algorithm.- Parameters:
jmolAtom-index- Temporary: number of a matching atom in a molecule.
-
setExplicitHydrogenCount
public void setExplicitHydrogenCount(int count) Sets the number of explicit hydrogen atoms bonded with this atom.- Parameters:
count- Number of hydrogen atoms.
-
setImplicitHydrogenCount
public void setImplicitHydrogenCount(int count) Sets the number of implicit hydrogen atoms bonded with this atom.- Parameters:
count- Number of hydrogen atoms.
-
setDegree
public void setDegree(int degree) -
setNonhydrogenDegree
public void setNonhydrogenDegree(int degree) -
setValence
public void setValence(int valence) -
setConnectivity
public void setConnectivity(int connectivity) -
setRingMembership
public void setRingMembership(int rm) -
setRingSize
public void setRingSize(int rs) -
setRingConnectivity
public void setRingConnectivity(int rc) -
getModelIndex
public int getModelIndex()- Specified by:
getModelIndexin interfaceNode
-
getMoleculeNumber
public int getMoleculeNumber(boolean inModel) - Specified by:
getMoleculeNumberin interfaceNode
-
getAtomSite
public int getAtomSite()- Specified by:
getAtomSitein interfaceNode
-
getFormalCharge
public int getFormalCharge()- Specified by:
getFormalChargein interfaceNode- Specified by:
getFormalChargein interfaceSimpleNode- Returns:
- the formal charge for this atom
-
getIsotopeNumber
public int getIsotopeNumber()- Specified by:
getIsotopeNumberin interfaceNode- Specified by:
getIsotopeNumberin interfaceSimpleNode
-
getAtomicAndIsotopeNumber
public int getAtomicAndIsotopeNumber()- Specified by:
getAtomicAndIsotopeNumberin interfaceNode
-
getAtomName
- Specified by:
getAtomNamein interfaceNode- Specified by:
getAtomNamein interfaceSimpleNode
-
getGroup3
-
getGroup1
-
setBondArray
public void setBondArray() -
getEdges
Description copied from interface:SimpleNodeGet the bond array, including hydrogen bonds.- Specified by:
getEdgesin interfaceNode- Specified by:
getEdgesin interfaceSimpleNode- Returns:
- number of bonds
-
getBond
Returns the bond at indexnumber.- Parameters:
number- Bond number.- Returns:
- Bond.
-
getCovalentBondCount
public int getCovalentBondCount()Returns the number of bonds of this atom.- Specified by:
getCovalentBondCountin interfaceNode- Specified by:
getCovalentBondCountin interfaceSimpleNode- Returns:
- Number of bonds.
-
getBondCount
public int getBondCount()Description copied from interface:SimpleNodeGet the total number of bonds, including hydrogen bonds.- Specified by:
getBondCountin interfaceSimpleNode- Returns:
- number of bonds
-
getCovalentBondCountPlusMissingH
public int getCovalentBondCountPlusMissingH()Description copied from interface:Nodeincludes actual + missing- Specified by:
getCovalentBondCountPlusMissingHin interfaceNode- Returns:
- actual + missing
-
getTotalHydrogenCount
public int getTotalHydrogenCount()- Specified by:
getTotalHydrogenCountin 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
-
getExplicitHydrogenCount
public int getExplicitHydrogenCount()Description copied from interface:Node[CH2] for example- Specified by:
getExplicitHydrogenCountin interfaceNode- Returns:
- number of H atoms in brackets
-
getMatchingBondedAtom
public int getMatchingBondedAtom(int i) -
getBondedAtomIndex
public int getBondedAtomIndex(int j) - Specified by:
getBondedAtomIndexin interfaceNode
-
getCovalentHydrogenCount
public int getCovalentHydrogenCount()- Specified by:
getCovalentHydrogenCountin interfaceNode
-
getValence
public int getValence()- Specified by:
getValencein interfaceNode- Specified by:
getValencein interfaceSimpleNode- Returns:
- the sum of the bond orders for this atom
-
getTotalValence
public int getTotalValence()- Specified by:
getTotalValencein interfaceNode
-
isLeadAtom
public boolean isLeadAtom()- Specified by:
isLeadAtomin interfaceNode
-
getOffsetResidueAtom
- Specified by:
getOffsetResidueAtomin interfaceNode
-
getGroupBits
- Specified by:
getGroupBitsin interfaceNode
-
isCrossLinked
- Specified by:
isCrossLinkedin interfaceNode
-
getCrossLinkVector
public boolean getCrossLinkVector(Lst<Integer> vLinks, boolean crosslinkCovalent, boolean crosslinkHBond) - Specified by:
getCrossLinkVectorin interfaceNode
-
getBioStructureTypeName
- Specified by:
getBioStructureTypeNamein interfaceNode
-
getInsertionCode
public char getInsertionCode()- Specified by:
getInsertionCodein interfaceNode
-
getResno
-
getChainID
public int getChainID()- Specified by:
getChainIDin interfaceNode
-
getChainIDStr
- Specified by:
getChainIDStrin interfaceNode
-
getBioSmilesType
public char getBioSmilesType()- Specified by:
getBioSmilesTypein interfaceNode
-
isNucleic
public boolean isNucleic() -
isPurine
-
isPyrimidine
public boolean isPyrimidine()- Specified by:
isPyrimidinein interfaceNode
-
isDeleted
-
findAtomsLike
- Specified by:
findAtomsLikein interfaceNode
-
getFloatProperty
- Specified by:
getFloatPropertyin interfaceNode- Parameters:
property- "property_xxxx"- Returns:
- value or Float.NaN
-
getMass
public float getMass()- Specified by:
getMassin interfaceNode- Specified by:
getMassin interfaceSimpleNode- Returns:
- the mass or, if specified, the mass number
-
getCIPChirality
- Specified by:
getCIPChiralityin interfaceNode
-
setCIPChirality
public void setCIPChirality(int c) - Specified by:
setCIPChiralityin interfaceNode- Specified by:
setCIPChiralityin interfaceSimpleNode
-
getCIPChiralityCode
public int getCIPChiralityCode()- Specified by:
getCIPChiralityCodein interfaceNode
-
getXYZ
- Specified by:
getXYZin interfaceNode- Specified by:
getXYZin interfaceSimpleNode- Returns:
- the position of this atom
-
getStereo
-
getPatternIndex
public int getPatternIndex() -
modelIsRawPDB
public boolean modelIsRawPDB()- Specified by:
modelIsRawPDBin interfaceNode
-
definesStereo
public boolean definesStereo()for InChI or any other system that self-defines stereochemistry.- Returns:
- false
-
getStereoAtAt
-
isStereoOpposite
- Parameters:
i2-iA-iB-- Returns:
- TRUE if opposite
-
toString
-