OBAtom Class Reference

Atom class. More...

#include <mol.h>

Inheritance diagram for OBAtom:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 OBAtom ()
 Constructor.
virtual ~OBAtom ()
 Destructor.
OBAtomoperator= (OBAtom &)
 Assignment.
void Clear ()
 Clear all data.
double GetDistance (int index)
 
Returns:
the distance to the atom defined by OBMol::GetAtom()

double GetDistance (OBAtom *)
 
Returns:
the distance to the supplied OBAtom

double GetAngle (int b, int c)
 
Returns:
the angle defined by this atom -> b (vertex) -> c

double GetAngle (OBAtom *b, OBAtom *c)
 
Returns:
the angle defined by this atom -> b (vertex) -> c

virtual OBGraphBaseGetParent ()
void SetParent (OBGraphBase *)
 Set my parent graph.
void AddEdge (OBEdgeBase *b)
 Add an edge. Assumes this node is an endpoint of b.
OBNodeBaseBeginNbr (std::vector< OBEdgeBase * >::iterator &)
 Iterate over my edges, returning my connected nodes.
OBNodeBaseNextNbr (std::vector< OBEdgeBase * >::iterator &)
OBEdgeBaseBegin (std::vector< OBEdgeBase * >::iterator &)
 Iterate over my edges, returning the edges.
OBEdgeBaseNext (std::vector< OBEdgeBase * >::iterator &)
virtual bool IsConnected (OBNodeBase *)
 Is OBNodeBase* a beginning or end of some edge of mine?
void Error (int f)
 Used to signal erroneously calling some of the nonfunctional members.
virtual OBBaseDoTransformations (const std::map< std::string, std::string > *pOptions)
Methods to set atomic information
void SetIdx (int idx)
 Set atom index (i.e., in an OBMol).
void SetHyb (int hyb)
 Set atom hybridization (i.e., 1 = sp, 2 = sp2, 3 = sp3 ...).
void SetAtomicNum (int atomicnum)
 Set atomic number.
void SetIsotope (unsigned int iso)
 Set isotope number (actual atomic weight is tabulated automatically, 0 = most abundant).
void SetImplicitValence (int val)
void IncrementImplicitValence ()
void DecrementImplicitValence ()
void SetFormalCharge (int fcharge)
void SetSpinMultiplicity (short spin)
void SetType (char *type)
void SetType (std::string &type)
void SetPartialCharge (double pcharge)
void SetVector (vector3 &v)
void SetVector (const double x, const double y, const double z)
void SetCoordPtr (double **c)
 Set the position of this atom from a pointer-driven array of coordinates.
void SetVector ()
 Set the position of this atom based on the internal pointer array (i.e. from SetCoordPtr() ).
void SetResidue (OBResidue *res)
void SetAromatic ()
void UnsetAromatic ()
void SetClockwiseStereo ()
 Mark atom as having SMILES clockwise stereochemistry (i.e., "@@").
void SetAntiClockwiseStereo ()
 Mark atom as having SMILES anticlockwise stereochemistry (i.e., "@").
void SetPositiveStereo ()
 Mark an atom as having + chiral volume.
void SetNegativeStereo ()
 Mark an atom as having - chiral volume.
void UnsetStereo ()
 Clear all stereochemistry information.
void SetInRing ()
 Mark an atom as belonging to at least one ring.
void SetChiral ()
 Mark an atom as being chiral with unknown stereochemistry.
void ClearCoordPtr ()
 Clear the internal coordinate pointer.
Methods to retrieve atomic information
int GetFormalCharge () const
unsigned int GetAtomicNum () const
unsigned short int GetIsotope () const
int GetSpinMultiplicity () const
double GetAtomicMass () const
 The atomic mass of this atom given by standard IUPAC average molar mass.
double GetExactMass () const
 The atomic mass of given by the isotope (default of 0 s most abundant isotope).
unsigned int GetIdx () const
unsigned int GetCoordinateIdx () const
unsigned int GetCIdx () const
unsigned int GetValence () const
 The current number of explicit connections.
unsigned int GetHyb () const
 The hybridization of this atom (i.e. 1 for sp, 2 for sp2, 3 for sp3).
unsigned int GetImplicitValence () const
 The implicit valence of this atom type (i.e. maximum number of connections expected).
unsigned int GetHvyValence () const
 The number of non-hydrogens connected to this atom.
unsigned int GetHeteroValence () const
 The number of heteroatoms connected to an atom.
char * GetType ()
double GetX ()
 The x coordinate.
double GetY ()
 The y coordinate.
double GetZ ()
 The z coordinate.
double x ()
double y ()
double z ()
double * GetCoordinate ()
 
Returns:
the coordinates as a double*

vector3GetVector ()
 
Returns:
the coordinates as a vector3 object

double GetPartialCharge ()
 
Returns:
the partial charge of this atom, calculating a Gasteiger charge if needed

OBResidueGetResidue ()
bool GetNewBondVector (vector3 &v, double length)
 Create a vector for a new bond from this atom, with length given by the supplied parameter.
OBBondGetBond (OBAtom *)
OBAtomGetNextAtom ()
Iterator methods
std::vector< OBEdgeBase
* >::iterator 
BeginBonds ()
std::vector< OBEdgeBase
* >::iterator 
EndBonds ()
OBBondBeginBond (std::vector< OBEdgeBase * >::iterator &i)
OBBondNextBond (std::vector< OBEdgeBase * >::iterator &i)
OBAtomBeginNbrAtom (std::vector< OBEdgeBase * >::iterator &)
OBAtomNextNbrAtom (std::vector< OBEdgeBase * >::iterator &)
Addition of residue/bond info. for an atom
void NewResidue ()
void DeleteResidue ()
void AddBond (OBBond *bond)
void InsertBond (std::vector< OBEdgeBase * >::iterator &i, OBBond *bond)
bool DeleteBond (OBBond *)
void ClearBond ()
Requests for atomic property information
unsigned int CountFreeOxygens () const
 The number of oxygen atoms connected that only have one heavy valence.
unsigned int ImplicitHydrogenCount () const
 The number of hydrogens needed to fill the implicit valence of this atom.
unsigned int ExplicitHydrogenCount () const
 The number of hydrogens explicitly bound to this atom currently.
unsigned int MemberOfRingCount () const
 The number of rings that contain this atom.
unsigned int MemberOfRingSize () const
 The size of the smallest ring that contains this atom (0 if not in a ring).
double SmallestBondAngle ()
 The smallest angle of bonds to this atom.
double AverageBondAngle ()
 The average angle of bonds to this atom.
unsigned int BOSum () const
 The sum of the bond orders of the bonds to the atom (i.e. double bond = 2...).
unsigned int KBOSum () const
 The sum of the bond orders of bonds to the atom, considering only KDouble, KTriple bonds.
Builder utilities
bool HtoMethyl ()
 If this is a hydrogen atom, transform into a methyl group.
bool SetHybAndGeom (int)
 Change the hybridization of this atom and modify the geometry accordingly.
Property information
bool HasResidue ()
 Is there any residue information?
bool IsHydrogen ()
bool IsCarbon ()
bool IsNitrogen ()
bool IsOxygen ()
bool IsSulfur ()
bool IsPhosphorus ()
bool IsAromatic () const
bool IsInRing () const
bool IsInRingSize (int) const
bool IsHeteroatom ()
 Is this atom an element in the 15th or 16th main groups (i.e., N, O, P, S ...) ?
bool IsNotCorH ()
 Is this atom any element except carbon or hydrogen?
bool IsConnected (OBAtom *)
 Is this atom connected to the supplied OBAtom?
bool IsOneThree (OBAtom *)
 Is this atom related to the supplied OBAtom in a 1,3 bonding pattern?
bool IsOneFour (OBAtom *)
 Is this atom related to the supplied OBAtom in a 1,4 bonding pattern?
bool IsCarboxylOxygen ()
 Is this atom an oxygen in a carboxyl (-CO2 or CO2H) group?
bool IsPhosphateOxygen ()
 Is this atom an oxygen in a phosphate (R-PO3) group?
bool IsSulfateOxygen ()
 Is this atom an oxygen in a sulfate (-SO3) group?
bool IsNitroOxygen ()
 Is this atom an oxygen in a nitro (-NO2) group?
bool IsAmideNitrogen ()
 Returns true if nitrogen is part of an amide.
bool IsPolarHydrogen ()
bool IsNonPolarHydrogen ()
bool IsAromaticNOxide ()
bool IsChiral ()
 Is this atom chiral?
bool IsAxial ()
bool IsClockwise ()
 Does this atom have SMILES-specified clockwise "@@" stereochemistry?
bool IsAntiClockwise ()
 Does this atom have SMILES-specified anticlockwise "@" stereochemistry?
bool IsPositiveStereo ()
 Does this atom have a positive chiral volume?
bool IsNegativeStereo ()
 Does this atom have a negative chiral volume?
bool HasChiralitySpecified ()
 Does this atom have SMILES-specified stereochemistry?
bool HasChiralVolume ()
 Does this atom have a specified chiral volume?
bool IsHbondAcceptor ()
 Is this atom a hydrogen-bond acceptor (receptor)?
bool IsHbondDonor ()
 Is this atom a hydrogen-bond donor?
bool IsHbondDonorH ()
 Is this a hydrogen atom attached to a hydrogen-bond donor?
bool HasAlphaBetaUnsat (bool includePandS=true)
bool HasBondOfOrder (unsigned int)
int CountBondsOfOrder (unsigned int)
bool HasNonSingleBond ()
bool HasSingleBond ()
bool HasDoubleBond ()
bool HasAromaticBond ()
bool MatchesSMARTS (const char *)
 Determines if this atom matches the first atom in a given SMARTS pattern.
Methods for handling generic data
bool HasData (std::string &)
bool HasData (const char *)
bool HasData (unsigned int type)
void DeleteData (unsigned int type)
void DeleteData (OBGenericData *)
void DeleteData (std::vector< OBGenericData * > &)
void SetData (OBGenericData *d)
unsigned int DataSize ()
 
Returns:
the number of OBGenericData items attached to this atom

OBGenericDataGetData (unsigned int type)
OBGenericDataGetData (std::string &)
OBGenericDataGetData (const char *)
std::vector< OBGenericData * > & GetData ()
std::vector< OBGenericData
* >::iterator 
BeginData ()
std::vector< OBGenericData
* >::iterator 
EndData ()
Nonfunctional members
Nonfunctional or unused members of OpenBabel::OBNodeBase are to be added by a derived class (e.g., OpenBabel::OBAtom)

virtual void SetMatch (OBNodeBase *)
virtual bool Eval (OBNodeBase *) const
virtual OBNodeBaseGetMatch ()

Static Public Member Functions

static const char * ClassDescription ()

Public Attributes

bool Visit
 Used internally by graph traversal algorithms.

Protected Member Functions

int GetFlag () const
void SetFlag (int flag)
bool HasFlag (int flag)

Protected Attributes

char _ele
 atomic number (type char to minimize space -- allows for 0..255 elements)
char _impval
 implicit valence
char _type [6]
 atomic type
short _fcharge
 formal charge
unsigned short _isotope
 isotope (0 = most abundant)
short _spinmultiplicity
 atomic spin, e.g., 2 for radical 1 or 3 for carbene
unsigned short _cidx
 index into coordinate array
unsigned short _hyb
 hybridization
unsigned short _flags
 bitwise flags (e.g. aromaticity)
double _pcharge
 partial charge
double ** _c
 coordinate array in double*
vector3 _v
 coordinate vector
OBResidue_residue
 parent residue (if applicable)
std::vector< OBGenericData * > _vdata
 custom data
unsigned short int _idx
 What is my unique node index? GetIdx(), SetIdx(int idx).
OBGraphBase_parent
 To which graph do I belong? GetParent(), SetParent(OBGraphBase*).
std::vector< OBEdgeBase * > _vbond
 What edges or bonds do I have?

Detailed Description

Atom class.

To understand the OBAtom class it is important to state a key decision on which the design was based. In OBabel the atom class existed, but it was only a data container. All data access and modification of atoms was done through the molecule. The result was a molecule class that was very large an unwieldy. So the OBAtom class was made smarter, and many of the atom-specific routines were separated into the OBAtom thereby decentralizing and shrinking the OBMol class. As a result the OBAtom class not only holds data, but facilitates extraction of data perceived from both the atom and the molecule.

A number of data extraction methods perform what is called `Lazy Evaluation,' which is essentially on-the-fly evaluation. For example, when an atom is queried as to whether it is cyclic or what it's hybridization state is the information is perceived automatically. The perception of a particular trait is actually performed on the entire molecule the first time it is requested of an atom or bond, and stored for subsequent requests for the same trait of additional atoms or bonds.The OBAtom class is similar to OBMol and the whole of Open Babel in that data access and modification is done through Get and Set methods.

The following code demonstrates how to print out the atom numbers, element numbers, and coordinates of a molecule:

      OBMol mol;

      FOR_ATOMS_IN_MOL(atom, mol)
      {
      cout << atom->GetIdx() << ` `;
      cout << atom->GetAtomicNum() << ` `;
      cout << atom->GetVector() << endl;
      }
A number of the property member functions indicate that atoms have some knowlege of their covalently attached neighbor atoms. Bonding information is partly redundant within a molecule in that an OBMol has a complete list of bonds in a molecule, and an OBAtom has a list bonds of which it is a member. The following code demonstrates how an OBAtom uses its bond information to loop over atoms attached to itself:
      OBMol mol;
      OBAtom *atom;

      atom = mol.GetAtom(1);
      FOR_NBORS_OF_ATOM(nbr, atom)
      {
      cout << "atom #" << atom->GetIdx() << " is attached to atom #" << nbr->GetIdx() << endl;
      }

should produce an output like

      atom #1 is attached to atom #2


Constructor & Destructor Documentation

OBAtom (  ) 

Constructor.

~OBAtom (  )  [virtual]

Destructor.


Member Function Documentation

int GetFlag (  )  const [inline, protected]

void SetFlag ( int  flag  )  [inline, protected]

bool HasFlag ( int  flag  )  [inline, protected]

OBAtom & operator= ( OBAtom  ) 

Assignment.

void Clear (  ) 

Clear all data.

void SetIdx ( int  idx  )  [inline]

Set atom index (i.e., in an OBMol).

Reimplemented from OBNodeBase.

void SetHyb ( int  hyb  )  [inline]

Set atom hybridization (i.e., 1 = sp, 2 = sp2, 3 = sp3 ...).

void SetAtomicNum ( int  atomicnum  )  [inline]

Set atomic number.

void SetIsotope ( unsigned int  iso  ) 

Set isotope number (actual atomic weight is tabulated automatically, 0 = most abundant).

void SetImplicitValence ( int  val  )  [inline]

void IncrementImplicitValence (  )  [inline]

void DecrementImplicitValence (  )  [inline]

void SetFormalCharge ( int  fcharge  )  [inline]

void SetSpinMultiplicity ( short  spin  )  [inline]

void SetType ( char *  type  ) 

void SetType ( std::string &  type  ) 

void SetPartialCharge ( double  pcharge  )  [inline]

void SetVector ( vector3 v  ) 

void SetVector ( const double  x,
const double  y,
const double  z 
)

void SetCoordPtr ( double **  c  )  [inline]

Set the position of this atom from a pointer-driven array of coordinates.

void SetVector (  ) 

Set the position of this atom based on the internal pointer array (i.e. from SetCoordPtr() ).

void SetResidue ( OBResidue res  )  [inline]

void SetAromatic (  )  [inline, virtual]

Reimplemented from OBNodeBase.

void UnsetAromatic (  )  [inline]

void SetClockwiseStereo (  )  [inline]

Mark atom as having SMILES clockwise stereochemistry (i.e., "@@").

void SetAntiClockwiseStereo (  )  [inline]

Mark atom as having SMILES anticlockwise stereochemistry (i.e., "@").

void SetPositiveStereo (  )  [inline]

Mark an atom as having + chiral volume.

void SetNegativeStereo (  )  [inline]

Mark an atom as having - chiral volume.

void UnsetStereo (  )  [inline]

Clear all stereochemistry information.

void SetInRing (  )  [inline]

Mark an atom as belonging to at least one ring.

void SetChiral (  )  [inline]

Mark an atom as being chiral with unknown stereochemistry.

void ClearCoordPtr (  )  [inline]

Clear the internal coordinate pointer.

int GetFormalCharge (  )  const [inline, virtual]

Reimplemented from OBNodeBase.

unsigned int GetAtomicNum (  )  const [inline, virtual]

Reimplemented from OBNodeBase.

unsigned short int GetIsotope (  )  const [inline]

int GetSpinMultiplicity (  )  const [inline]

double GetAtomicMass (  )  const

The atomic mass of this atom given by standard IUPAC average molar mass.

double GetExactMass (  )  const

The atomic mass of given by the isotope (default of 0 s most abundant isotope).

unsigned int GetIdx ( void   )  const [inline, virtual]

Reimplemented from OBNodeBase.

unsigned int GetCoordinateIdx (  )  const [inline]

unsigned int GetCIdx (  )  const [inline]

Deprecated:
Use GetCoordinateIdx() instead

unsigned int GetValence (  )  const [inline, virtual]

The current number of explicit connections.

Reimplemented from OBNodeBase.

unsigned int GetHyb (  )  const [virtual]

The hybridization of this atom (i.e. 1 for sp, 2 for sp2, 3 for sp3).

Reimplemented from OBNodeBase.

unsigned int GetImplicitValence (  )  const [virtual]

The implicit valence of this atom type (i.e. maximum number of connections expected).

Reimplemented from OBNodeBase.

unsigned int GetHvyValence (  )  const [virtual]

The number of non-hydrogens connected to this atom.

Reimplemented from OBNodeBase.

unsigned int GetHeteroValence (  )  const

The number of heteroatoms connected to an atom.

char * GetType (  ) 

double GetX (  )  [inline]

The x coordinate.

double GetY (  )  [inline]

The y coordinate.

double GetZ (  )  [inline]

The z coordinate.

double x (  )  [inline]

double y (  )  [inline]

double z (  )  [inline]

double* GetCoordinate (  )  [inline]

Returns:
the coordinates as a double*

vector3 & GetVector (  ) 

Returns:
the coordinates as a vector3 object

double GetPartialCharge (  ) 

Returns:
the partial charge of this atom, calculating a Gasteiger charge if needed

OBResidue * GetResidue (  ) 

bool GetNewBondVector ( vector3 v,
double  length 
)

Create a vector for a new bond from this atom, with length given by the supplied parameter.

OBBond * GetBond ( OBAtom  ) 

OBAtom * GetNextAtom (  ) 

std::vector<OBEdgeBase*>::iterator BeginBonds (  )  [inline]

Deprecated:
Use FOR_BONDS_OF_ATOM and OBAtomBondIter instead

std::vector<OBEdgeBase*>::iterator EndBonds (  )  [inline]

Deprecated:
Use FOR_BONDS_OF_ATOM and OBAtomBondIter instead

OBBond * BeginBond ( std::vector< OBEdgeBase * >::iterator &  i  ) 

Deprecated:
Use FOR_BONDS_OF_ATOM and OBAtomBondIter instead

OBBond * NextBond ( std::vector< OBEdgeBase * >::iterator &  i  ) 

Deprecated:
Use FOR_BONDS_OF_ATOM and OBAtomBondIter instead

OBAtom * BeginNbrAtom ( std::vector< OBEdgeBase * >::iterator &   ) 

Deprecated:
Use FOR_NBORS_OF_ATOM and OBAtomAtomIter instead

OBAtom * NextNbrAtom ( std::vector< OBEdgeBase * >::iterator &   ) 

Deprecated:
Use FOR_NBORS_OF_ATOM and OBAtomAtomIter instead

double GetDistance ( int  index  ) 

Returns:
the distance to the atom defined by OBMol::GetAtom()

double GetDistance ( OBAtom  ) 

Returns:
the distance to the supplied OBAtom

double GetAngle ( int  b,
int  c 
)

Returns:
the angle defined by this atom -> b (vertex) -> c

double GetAngle ( OBAtom b,
OBAtom c 
)

Returns:
the angle defined by this atom -> b (vertex) -> c

void NewResidue (  )  [inline]

void DeleteResidue (  )  [inline]

void AddBond ( OBBond bond  )  [inline]

void InsertBond ( std::vector< OBEdgeBase * >::iterator &  i,
OBBond bond 
) [inline]

bool DeleteBond ( OBBond  ) 

void ClearBond (  )  [inline]

unsigned int CountFreeOxygens (  )  const

The number of oxygen atoms connected that only have one heavy valence.

unsigned int ImplicitHydrogenCount (  )  const [virtual]

The number of hydrogens needed to fill the implicit valence of this atom.

Reimplemented from OBNodeBase.

unsigned int ExplicitHydrogenCount (  )  const [virtual]

The number of hydrogens explicitly bound to this atom currently.

Reimplemented from OBNodeBase.

unsigned int MemberOfRingCount (  )  const [virtual]

The number of rings that contain this atom.

Reimplemented from OBNodeBase.

unsigned int MemberOfRingSize (  )  const

The size of the smallest ring that contains this atom (0 if not in a ring).

double SmallestBondAngle (  ) 

The smallest angle of bonds to this atom.

double AverageBondAngle (  ) 

The average angle of bonds to this atom.

unsigned int BOSum (  )  const

The sum of the bond orders of the bonds to the atom (i.e. double bond = 2...).

unsigned int KBOSum (  )  const [virtual]

The sum of the bond orders of bonds to the atom, considering only KDouble, KTriple bonds.

Reimplemented from OBNodeBase.

bool HtoMethyl (  ) 

If this is a hydrogen atom, transform into a methyl group.

bool SetHybAndGeom ( int   ) 

Change the hybridization of this atom and modify the geometry accordingly.

bool HasResidue (  )  [inline]

Is there any residue information?

bool IsHydrogen (  )  [inline]

bool IsCarbon (  )  [inline]

bool IsNitrogen (  )  [inline]

bool IsOxygen (  )  [inline]

bool IsSulfur (  )  [inline]

bool IsPhosphorus (  )  [inline]

bool IsAromatic (  )  const [virtual]

Reimplemented from OBNodeBase.

bool IsInRing (  )  const [virtual]

Reimplemented from OBNodeBase.

bool IsInRingSize ( int   )  const [virtual]

Reimplemented from OBNodeBase.

bool IsHeteroatom (  ) 

Is this atom an element in the 15th or 16th main groups (i.e., N, O, P, S ...) ?

bool IsNotCorH (  ) 

Is this atom any element except carbon or hydrogen?

bool IsConnected ( OBAtom  ) 

Is this atom connected to the supplied OBAtom?

bool IsOneThree ( OBAtom  ) 

Is this atom related to the supplied OBAtom in a 1,3 bonding pattern?

bool IsOneFour ( OBAtom  ) 

Is this atom related to the supplied OBAtom in a 1,4 bonding pattern?

bool IsCarboxylOxygen (  ) 

Is this atom an oxygen in a carboxyl (-CO2 or CO2H) group?

bool IsPhosphateOxygen (  ) 

Is this atom an oxygen in a phosphate (R-PO3) group?

bool IsSulfateOxygen (  ) 

Is this atom an oxygen in a sulfate (-SO3) group?

bool IsNitroOxygen (  ) 

Is this atom an oxygen in a nitro (-NO2) group?

bool IsAmideNitrogen (  ) 

Returns true if nitrogen is part of an amide.

bool IsPolarHydrogen (  ) 

bool IsNonPolarHydrogen (  ) 

bool IsAromaticNOxide (  ) 

bool IsChiral (  ) 

Is this atom chiral?

bool IsAxial (  ) 

bool IsClockwise (  )  [inline]

Does this atom have SMILES-specified clockwise "@@" stereochemistry?

bool IsAntiClockwise (  )  [inline]

Does this atom have SMILES-specified anticlockwise "@" stereochemistry?

bool IsPositiveStereo (  )  [inline]

Does this atom have a positive chiral volume?

bool IsNegativeStereo (  )  [inline]

Does this atom have a negative chiral volume?

bool HasChiralitySpecified (  )  [inline]

Does this atom have SMILES-specified stereochemistry?

bool HasChiralVolume (  )  [inline]

Does this atom have a specified chiral volume?

bool IsHbondAcceptor (  ) 

Is this atom a hydrogen-bond acceptor (receptor)?

bool IsHbondDonor (  ) 

Is this atom a hydrogen-bond donor?

bool IsHbondDonorH (  ) 

Is this a hydrogen atom attached to a hydrogen-bond donor?

bool HasAlphaBetaUnsat ( bool  includePandS = true  ) 

bool HasBondOfOrder ( unsigned  int  ) 

int CountBondsOfOrder ( unsigned  int  ) 

bool HasNonSingleBond (  ) 

bool HasSingleBond (  )  [inline]

bool HasDoubleBond (  )  [inline]

bool HasAromaticBond (  )  [inline]

bool MatchesSMARTS ( const char *   ) 

Determines if this atom matches the first atom in a given SMARTS pattern.

bool HasData ( std::string &   ) 

bool HasData ( const char *   ) 

bool HasData ( unsigned int  type  ) 

void DeleteData ( unsigned int  type  ) 

void DeleteData ( OBGenericData  ) 

void DeleteData ( std::vector< OBGenericData * > &   ) 

void SetData ( OBGenericData d  )  [inline]

unsigned int DataSize (  )  [inline]

Returns:
the number of OBGenericData items attached to this atom

OBGenericData * GetData ( unsigned int  type  ) 

OBGenericData * GetData ( std::string &   ) 

OBGenericData * GetData ( const char *   ) 

std::vector<OBGenericData*>& GetData (  )  [inline]

std::vector<OBGenericData*>::iterator BeginData (  )  [inline]

std::vector<OBGenericData*>::iterator EndData (  )  [inline]

virtual OBGraphBase* GetParent (  )  [inline, virtual, inherited]

void SetParent ( OBGraphBase  )  [inherited]

Set my parent graph.

void AddEdge ( OBEdgeBase b  )  [inline, inherited]

Add an edge. Assumes this node is an endpoint of b.

OBNodeBase * BeginNbr ( std::vector< OBEdgeBase * >::iterator &   )  [inherited]

Iterate over my edges, returning my connected nodes.

OBNodeBase * NextNbr ( std::vector< OBEdgeBase * >::iterator &   )  [inherited]

OBEdgeBase* Begin ( std::vector< OBEdgeBase * >::iterator &   )  [inherited]

Iterate over my edges, returning the edges.

OBEdgeBase* Next ( std::vector< OBEdgeBase * >::iterator &   )  [inherited]

bool IsConnected ( OBNodeBase  )  [virtual, inherited]

Is OBNodeBase* a beginning or end of some edge of mine?

void Error ( int  f  )  [inline, inherited]

Used to signal erroneously calling some of the nonfunctional members.

virtual void SetMatch ( OBNodeBase  )  [inline, virtual, inherited]

virtual bool Eval ( OBNodeBase  )  const [inline, virtual, inherited]

virtual OBNodeBase* GetMatch (  )  [inline, virtual, inherited]

virtual OBBase* DoTransformations ( const std::map< std::string, std::string > *  pOptions  )  [inline, virtual, inherited]

Reimplemented in OBMol.

static const char* ClassDescription (  )  [inline, static, inherited]

Reimplemented in OBMol.


Member Data Documentation

char _ele [protected]

atomic number (type char to minimize space -- allows for 0..255 elements)

char _impval [protected]

implicit valence

char _type[6] [protected]

atomic type

short _fcharge [protected]

formal charge

unsigned short _isotope [protected]

isotope (0 = most abundant)

short _spinmultiplicity [protected]

atomic spin, e.g., 2 for radical 1 or 3 for carbene

unsigned short _cidx [protected]

index into coordinate array

unsigned short _hyb [protected]

hybridization

unsigned short _flags [protected]

bitwise flags (e.g. aromaticity)

double _pcharge [protected]

partial charge

double** _c [protected]

coordinate array in double*

vector3 _v [protected]

coordinate vector

OBResidue* _residue [protected]

parent residue (if applicable)

std::vector<OBGenericData*> _vdata [protected]

custom data

unsigned short int _idx [protected, inherited]

What is my unique node index? GetIdx(), SetIdx(int idx).

OBGraphBase* _parent [protected, inherited]

To which graph do I belong? GetParent(), SetParent(OBGraphBase*).

std::vector<OBEdgeBase*> _vbond [protected, inherited]

What edges or bonds do I have?

See also:
AddEdge(), GetValence(), This node is assumed to be one of the edge endpoints.

bool Visit [inherited]

Used internally by graph traversal algorithms.


The documentation for this class was generated from the following files: