OBAtom Class Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
OBAtom Class Reference

`#include <openbabel/atom.h>`

Inheritance diagram for OBAtom:
[legend]

List of all members.

## Public Types
enum | StereoFlag
## Public Member Functions
| OBAtom ()
virtual | ~OBAtom ()
OBAtom & | operator= (OBAtom &)
bool | operator== (const OBAtom *other) const
void | Duplicate (OBAtom *)
bool | Clear ()
double | GetDistance (int index)
double | GetDistance (OBAtom *)
double | GetAngle (int b, int c)
double | GetAngle (OBAtom *b, OBAtom *c)
virtual OBBase * | DoTransformations (const std::map< std::string, std::string > *, OBConversion *)
template<class T >
T * | CastAndClear (bool clear=true)
virtual const char * | GetTitle (bool replaceNewlines=true) const
virtual void | SetTitle (const char *)
Methods to set atomic information
void | SetIdx (int idx)
void | SetId (unsigned long id)
void | SetHyb (int hyb)
void | SetAtomicNum (int atomicnum)
void | SetIsotope (unsigned int iso)
void | SetImplicitValence (int val)
void | IncrementImplicitValence ()
void | DecrementImplicitValence ()
void | SetFormalCharge (int fcharge)
void | SetSpinMultiplicity (short spin)
void | SetType (const char *type)
void | SetType (const std::string &type)
void | SetPartialCharge (double pcharge)
void | SetVector (const vector3 &v)
void | SetVector (const double x, const double y, const double z)
void | SetCoordPtr (double **c)
void | SetVector ()
void | SetResidue (OBResidue *res)
void | SetParent (OBMol *ptr)
void | SetAromatic ()
void | UnsetAromatic ()
void | SetClockwiseStereo ()
void | SetAntiClockwiseStereo ()
void | SetPositiveStereo ()
void | SetNegativeStereo ()
void | UnsetStereo ()
void | SetInRing ()
void | SetChiral ()
void | ClearCoordPtr ()
Methods to retrieve atomic information
int | GetFormalCharge () const
unsigned int | GetAtomicNum () const
unsigned short int | GetIsotope () const
int | GetSpinMultiplicity () const
double | GetAtomicMass () const
double | GetExactMass () const
unsigned int | GetIdx () const
unsigned int | GetIndex () const
unsigned long | GetId () const
unsigned int | GetCoordinateIdx () const
unsigned int | GetCIdx () const
unsigned int | GetValence () const
unsigned int | GetHyb () const
unsigned int | GetImplicitValence () const
unsigned int | GetHvyValence () const
unsigned int | GetHeteroValence () const
char * | GetType ()
double | GetX () const
double | GetY () const
double | GetZ () const
double | x () const
double | y () const
double | z () const
double * | GetCoordinate ()
vector3 & | GetVector ()
const vector3 & | GetVector () const
double | GetPartialCharge ()
OBResidue * | GetResidue ()
OBResidue * | GetResidue (bool perception)
OBMol * | GetParent ()
bool | GetNewBondVector (vector3 &v, double length)
OBBond * | GetBond (OBAtom *)
OBAtom * | GetNextAtom ()
Iterator methods
OBBondIterator | BeginBonds ()
OBBondIterator | EndBonds ()
OBBond * | BeginBond (OBBondIterator &i)
OBBond * | NextBond (OBBondIterator &i)
OBAtom * | BeginNbrAtom (OBBondIterator &i)
OBAtom * | NextNbrAtom (OBBondIterator &i)
Addition of residue/bond info. for an atom
void | NewResidue ()
void | AddResidue (OBResidue *res)
void | DeleteResidue ()
void | AddBond (OBBond *bond)
void | InsertBond (OBBondIterator &i, OBBond *bond)
bool | DeleteBond (OBBond *bond)
void | ClearBond ()
Builder utilities
bool | HtoMethyl ()
bool | SetHybAndGeom (int)
void | ForceNoH ()
bool | HasNoHForced ()
void | ForceImplH ()
bool | HasImplHForced ()
Property information
unsigned int | CountFreeOxygens () const
unsigned int | ImplicitHydrogenCount () const
unsigned int | ExplicitHydrogenCount (bool ExcludeIsotopes=false) const
unsigned int | MemberOfRingCount () const
unsigned int | MemberOfRingSize () const
unsigned int | CountRingBonds () const
double | SmallestBondAngle ()
double | AverageBondAngle ()
unsigned int | BOSum () const
unsigned int | KBOSum () const
bool | HasResidue ()
bool | IsHydrogen ()
bool | IsHydrogen () const
bool | IsCarbon ()
bool | IsNitrogen ()
bool | IsOxygen ()
bool | IsSulfur ()
bool | IsPhosphorus ()
bool | IsAromatic () const
bool | IsInRing () const
bool | IsInRingSize (int) const
bool | IsHeteroatom ()
bool | IsNotCorH ()
bool | IsConnected (OBAtom *)
bool | IsOneThree (OBAtom *)
bool | IsOneFour (OBAtom *)
bool | IsCarboxylOxygen ()
bool | IsPhosphateOxygen ()
bool | IsSulfateOxygen ()
bool | IsNitroOxygen ()
bool | IsAmideNitrogen ()
bool | IsPolarHydrogen ()
bool | IsNonPolarHydrogen ()
bool | IsAromaticNOxide ()
bool | IsChiral ()
bool | IsAxial ()
bool | IsClockwise ()
bool | IsAntiClockwise ()
bool | IsPositiveStereo ()
bool | IsNegativeStereo ()
bool | HasChiralitySpecified ()
bool | HasChiralVolume ()
bool | IsHbondAcceptor ()
bool | IsHbondDonor ()
bool | IsHbondDonorH ()
bool | HasAlphaBetaUnsat (bool includePandS=true)
bool | HasBondOfOrder (unsigned int bo)
int | CountBondsOfOrder (unsigned int bo)
bool | HasNonSingleBond ()
bool | HasSingleBond ()
bool | HasDoubleBond ()
bool | HasAromaticBond ()
bool | MatchesSMARTS (const char *)
Generic data handling methods (via OBGenericData)
bool | HasData (const std::string &)
bool | HasData (const char *)
bool | HasData (const unsigned int type)
void | DeleteData (unsigned int type)
void | DeleteData (OBGenericData *)
void | DeleteData (std::vector< OBGenericData * > &)
bool | DeleteData (const std::string &s)
void | SetData (OBGenericData *d)
void | CloneData (OBGenericData *d)
size_t | DataSize () const
OBGenericData * | GetData (const unsigned int type)
OBGenericData * | GetData (const std::string &)
OBGenericData * | GetData (const char *)
std::vector< OBGenericData * > & | GetData ()
std::vector< OBGenericData * > | GetData (DataOrigin source)
std::vector< OBGenericData * > | GetAllData (const unsigned int type)
OBDataIterator | BeginData ()
OBDataIterator | EndData ()
## Static Public Member Functions
static const char * | ClassDescription ()
## Public Attributes
bool | Visit
## Protected Member Functions
int | GetFlag () const
void | SetFlag (int flag)
bool | HasFlag (int flag)
## Protected Attributes
unsigned char | _ele
char | _impval
char | _type [6]
short | _fcharge
unsigned short | _isotope
short | _spinmultiplicity
unsigned int | _idx
OBMol * | _parent
std::vector< OBBond * > | _vbond
unsigned int | _cidx
unsigned short | _hyb
unsigned short | _flags
double | _pcharge
double ** | _c
vector3 | _v
OBResidue * | _residue
unsigned long | _id
std::vector< OBGenericData * > | _vdata

## Detailed Description

Atom class.

To understand the OBAtom class it is important to state a key decision on which the design was based. The OBAtom class not only holds data, but facilitates extraction of data perceived from both the atom and the molecule. This prevents the OBMol class from becoming overly large and complicated.

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_OF_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 knowledge 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

## Member Enumeration Documentation

enum StereoFlag

## Constructor & Destructor Documentation

OBAtom | ( |  | ) |

Constructor.

~OBAtom | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

int GetFlag | ( |  | ) | const`[inline, protected]`

Returns:
  All flags

Referenced by OBAtom::Duplicate().

void SetFlag | ( | int | flag | ) | `[inline, protected]`

Sets the bitwise `flag`.

bool HasFlag | ( | int | flag | ) | `[inline, protected]`

Returns:
  True of the atom has the `flag`

OBAtom & operator= | ( | OBAtom & | src | ) |

Assignment.

bool operator== | ( | const OBAtom * | other | ) | const`[inline]`

Equivalence.

void Duplicate | ( | OBAtom * | src | ) |

Duplicate another atom. Copies all information with the exception of index

Since:
  version 2.2

Referenced by OBUnitCell::FillUnitCell().

bool Clear | ( | void |  | ) | `[virtual]`

Clear all data. Calls OBBase::Clear() to handle any generic data.

Returns:
  True if successful.

Reimplemented from OBBase.

Referenced by OpenBabel::addFragment().

void SetIdx | ( | int | idx | ) | `[inline]`

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

Referenced by OBMol::AddAtom(), OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), OBMol::EndModify(), and OBMol::NewAtom().

void SetId | ( | unsigned long | id | ) | `[inline]`

Referenced by OBMol::AddAtom(), OBMol::NewAtom(), and OBMol::operator+=().

void SetHyb | ( | int | hyb | ) | `[inline]`

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

Referenced by OBResidueData::AssignBonds(), OBAtomTyper::AssignHyb(), OBBuilder::GetNewBondVector(), and OBMol::PerceiveBondOrders().

void SetAtomicNum | ( | int | atomicnum | ) | `[inline]`

Set atomic number.

Referenced by OpenBabel::addFragment(), OBMol::AddHydrogens(), OBChemTsfm::Apply(), AliasData::Expand(), OBAtom::HtoMethyl(), and OBAtom::SetHybAndGeom().

void SetIsotope | ( | unsigned int | iso | ) |

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

Referenced by AliasData::Expand().

void SetImplicitValence | ( | int | val | ) | `[inline]`

Set the implicit valence to `val`.

Referenced by OBAtomTyper::AssignImplicitValence().

void IncrementImplicitValence | ( |  | ) | `[inline]`

Increase the implicit valence by one.

Referenced by OpenBabel::ExpandKekule().

void DecrementImplicitValence | ( |  | ) | `[inline]`

Decrease the implicit valence by one.

Referenced by OpenBabel::ExpandKekule().

void SetFormalCharge | ( | int | fcharge | ) | `[inline]`

Set the formal charge of the atom to `fcharge`.

Referenced by OpenBabel::addFragment(), OBChemTsfm::Apply(), OBMol::ConvertDativeBonds(), OpenBabel::ExpandKekule(), and OBMol::NewPerceiveKekuleBonds().

void SetSpinMultiplicity | ( | short | spin | ) | `[inline]`

Set the atomic spin to `spin`. See _spinmultiplicity.

Referenced by OpenBabel::addFragment(), and OBMol::AssignSpinMultiplicity().

void SetType | ( | const char * | type | ) |

Set the atomic type symbol (see OBTypeTable and OBAtomTyper for more)

Referenced by OBMol::AddHydrogens(), OBResidueData::AssignBonds(), OBAtomTyper::AssignTypes(), OBForceField::GetGrid(), OBAtom::HtoMethyl(), and OBAtom::SetHybAndGeom().

void SetType | ( | const std::string & | type | ) |

Set the atomic type symbol (see OBTypeTable and OBAtomTyper for more)

void SetPartialCharge | ( | double | pcharge | ) | `[inline]`

Set the partial charge to `pcharge`.

Referenced by OBGastChrg::AssignPartialCharges(), OBPhModel::AssignSeedPartialCharge(), OBForceField::GetGrid(), and OBAtom::GetPartialCharge().

void SetVector | ( | const vector3 & | v | ) |

Set the coordinate vector for this atom to `v` as a vector3.

Referenced by OpenBabel::addFragment(), OBMol::Align(), OpenBabel::ApplyRotMatToBond(), OBMol::BeginModify(), OBBuilder::Build(), OpenBabel::CalcSignedVolume(), OBMol::Center(), OBBuilder::Connect(), OBDepict::DrawMolecule(), OBUnitCell::FillUnitCell(), OpenBabel::generateDiagram(), OBForceField::GetCoordinates(), OpenBabel::groupRedraw(), OBAtom::HtoMethyl(), OpenBabel::InternalToCartesian(), OBForceField::LineSearch(), OBForceField::NumericalDerivative(), OBForceField::NumericalSecondDerivative(), OBForceField::SetConformers(), OBForceField::SetCoordinates(), OBAtom::SetHybAndGeom(), OBBond::SetLength(), OBForceField::ValidateConjugateGradients(), OBForceField::ValidateLineSearch(), and OBForceField::ValidateSteepestDescent().

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

Set the coordinate vector for this atom based on `x` `y` & `z`.

void SetCoordPtr | ( | double ** | c | ) | `[inline]`

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

Referenced by OBMol::AddHydrogens(), OBMol::ConnectTheDots(), OBMol::EndModify(), and OBMol::SetCoordinates().

void SetVector | ( |  | ) |

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

void SetResidue | ( | OBResidue * | res | ) | `[inline]`

Attach an OBResidue `res` as containing this atom.

Referenced by OBResidue::AddAtom(), OBMol::AddHydrogens(), and OBResidue::RemoveAtom().

void SetParent | ( | OBMol * | ptr | ) | `[inline]`

Attach an OBMol `ptr` as the parent container for this atom.

Referenced by OBMol::AddAtom(), and OBMol::NewAtom().

void SetAromatic | ( |  | ) | `[inline]`

Mark atom as being aromatic.

Referenced by OBMol::AddBond(), OBAromaticTyper::CheckAromaticity(), and OBAromaticTyper::TraverseCycle().

void UnsetAromatic | ( |  | ) | `[inline]`

Clear aromatic information from the atom.

Referenced by OBAromaticTyper::AssignAromaticFlags().

void SetClockwiseStereo | ( |  | ) | `[inline]`

Deprecated:

Referenced by OpenBabel::CorrectChirality().

void SetAntiClockwiseStereo | ( |  | ) | `[inline]`

Deprecated:

Referenced by OpenBabel::CorrectChirality().

void SetPositiveStereo | ( |  | ) | `[inline]`

Deprecated:

void SetNegativeStereo | ( |  | ) | `[inline]`

Deprecated:

void UnsetStereo | ( |  | ) | `[inline]`

Deprecated:

Referenced by OpenBabel::CorrectChirality().

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.

Referenced by OBMol::BeginModify(), and OBMol::ConnectTheDots().

int GetFormalCharge | ( |  | ) | const`[inline]`

Returns:
  the formal charge for this atom

Referenced by OpenBabel::alternate(), OBMol::ConvertDativeBonds(), OBDepict::DrawMolecule(), OBAtom::Duplicate(), OBSmartsMatcher::EvalAtomExpr(), OpenBabel::ExpandKekule(), OBChargeModel::FillChargeVectors(), OBMol::getorden(), OBMol::GetTotalCharge(), OBMol::NewPerceiveKekuleBonds(), OBMol::PerceiveKekuleBonds(), and OBMol::start_kekulize().

unsigned int GetAtomicNum | ( |  | ) | const`[inline]`

Returns:
  the atomic number for this atom

Referenced by OBMol::AddHydrogens(), OpenBabel::alternate(), OBAromaticTyper::AssignAromaticFlags(), OBBuilder::Connect(), OBMol::ConnectTheDots(), OpenBabel::construct_g_matrix(), OBDepict::DrawMolecule(), OBAtom::Duplicate(), OBSmartsMatcher::EvalAtomExpr(), OpenBabel::GetCorrectedBondVector(), OBBond::GetEquibLength(), OBMol::GetGIVector(), OBMol::getorden(), OBAtom::HtoMethyl(), OpenBabel::isFerroceneBond(), OBAtom::IsNonPolarHydrogen(), OBAtom::IsPolarHydrogen(), OpenBabel::isPotentialAromaticAtom(), OBQueryAtom::Matches(), OBMol::PerceiveBondOrders(), OBMol::PerceiveKekuleBonds(), and OBAtom::SetHybAndGeom().

unsigned short int GetIsotope | ( |  | ) | const`[inline]`

Returns:
  the isotope for this atom, if specified, or 0 for unspecified

Referenced by OBDepict::DrawMolecule(), OBAtom::Duplicate(), OBSmartsMatcher::EvalAtomExpr(), and OBAtom::ExplicitHydrogenCount().

int GetSpinMultiplicity | ( |  | ) | const`[inline]`

Returns:
  the atomic spin, e.g., 0 (default) for normal atoms - note that this value is a convention, 2 for radical 1 or 3 for carbene

Referenced by OBMol::AddHydrogens(), OpenBabel::alternate(), OBDepict::DrawMolecule(), OBAtom::Duplicate(), and OBMol::GetTotalSpinMultiplicity().

double GetAtomicMass | ( |  | ) | const

Returns:
  the atomic mass of this atom given by standard IUPAC average molar mass

Referenced by OBMol::GetMolWt(), and OBMol::ToInertialFrame().

double GetExactMass | ( |  | ) | const

Returns:
  the atomic mass of given by the isotope (default of 0 gives the most abundant isotope)

Referenced by OBMol::GetExactMass().

unsigned int GetIdx | ( |  | ) | const`[inline]`

Returns:
  the internal atom index (e.g., inside an OBMol)

Referenced by OBMol::AddAtom(), OBMol::AddHydrogens(), OBMol::Align(), OpenBabel::ApplyRotMatToBond(), OBAromaticTyper::AssignAromaticFlags(), OBResidueData::AssignBonds(), OBGastChrg::AssignPartialCharges(), OBBuilder::Build(), OpenBabel::BuildOBRTreeVector(), OpenBabel::CalcSignedVolume(), OpenBabel::CartesianToInternal(), OBAromaticTyper::CheckAromaticity(), OBBuilder::Connect(), OBMol::ConnectTheDots(), OBMol::ContigFragList(), OBBuilder::CorrectStereoAtoms(), OpenBabel::CreateNewClassVector(), OBMolAtomBFSIter::CurrentDepth(), OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), OBDepict::DrawMolecule(), OBSmartsMatcher::EvalAtomExpr(), OBAromaticTyper::ExcludeSmallRing(), OpenBabel::expand_cycle(), OpenBabel::expand_kekulize_lssr(), OBMol::expandcycle(), OpenBabel::ExpandKekule(), OpenBabel::expandKekulize(), OBSmartsMatcher::FastSingleMatch(), OBMol::FindChildren(), OBMol::FindLargestFragment(), OBRTree::GetAtomIdx(), OpenBabel::GetDFFVector(), OpenBabel::getFragment(), OBBuilder::GetFragment(), OBForceField::GetGradient(), OBForceField::GetGrid(), OBMol::GetGTDVector(), OBRotorRules::GetRotorIncrements(), OpenBabel::has_leftover_electrons(), OBGrid::Init(), OpenBabel::InternalToCartesian(), OBBond::IsClosure(), OBRotorList::IsFixedBond(), OBForceField::IsInSameRing(), OBRing::IsMember(), OBBuilder::IsSpiroAtom(), OpenBabel::KekulePropagate(), OBSSMatch::Match(), OBAtom::MatchesSMARTS(), OBMol::NewAtom(), OBMol::NewPerceiveKekuleBonds(), OBMolAtomBFSIter::OBMolAtomBFSIter(), OBMolAtomDFSIter::OBMolAtomDFSIter(), OBMolPairIter::OBMolPairIter(), OBMolAtomDFSIter::operator++(), OBMolAtomBFSIter::operator++(), OBMolPairIter::operator++(), OBAtom::operator=(), OBMol::operator=(), OBAtom::operator==(), OBMol::PerceiveKekuleBonds(), OBAromaticTyper::PropagatePotentialAromatic(), OBMol::RenumberAtoms(), OBAromaticTyper::SelectRootAtoms(), OBRotorList::SetEvalAtoms(), OBAtom::SetHybAndGeom(), OBBond::SetLength(), OBMol::SetTorsion(), OBProxGrid::Setup(), OBSmartsMatcher::SetupAtomMatchTable(), OBMol::start_kekulize(), and OBAromaticTyper::TraverseCycle().

unsigned int GetIndex | ( |  | ) | const`[inline]`

Referenced by OpenBabel::GetAtomSymClass().

unsigned long GetId | ( |  | ) | const`[inline]`

Referenced by OBMol::AddAtom(), OBMol::AddHydrogens(), OBBuilder::Build(), OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), OBBuilder::GetNewBondVector(), and OBSmartsMatcher::match().

unsigned int GetCoordinateIdx | ( |  | ) | const`[inline]`

Returns:
  the index into a pointer-driven array as used by GetCoordPtr() or SetCoordPtr()

unsigned int GetCIdx | ( |  | ) | const`[inline]`

Deprecated:
  Use GetCoordinateIdx() instead

Referenced by OBMol::DeleteHydrogen(), OpenBabel::SetRotorToAngle(), and OBMol::SetTorsion().

unsigned int GetValence | ( |  | ) | const`[inline]`

Returns:
  The current number of explicit connections

Referenced by OBMol::AddBond(), OBMol::AddHydrogens(), OBResidueData::AssignBonds(), OBAtomTyper::AssignImplicitValence(), OBMol::ConnectTheDots(), OpenBabel::construct_c_matrix(), OpenBabel::construct_g_matrix(), OBDepict::DrawMolecule(), OBSmartsMatcher::EvalAtomExpr(), OpenBabel::GetLabelAlignment(), OBBuilder::GetNewBondVector(), OBMol::getorden(), OBRing::GetRootAtom(), OpenBabel::isFerroceneBond(), OBMol::NewPerceiveKekuleBonds(), OBMol::PerceiveBondOrders(), and OBMol::start_kekulize().

unsigned int GetHyb | ( |  | ) | const

Returns:
  The hybridization of this atom: 1 for sp, 2 for sp2, 3 for sp3, 4 for sq. planar, 5 for trig. bipy, 6 for octahedral

Referenced by OBMol::AddHydrogens(), OBAromaticTyper::AssignAromaticFlags(), OBBuilder::Connect(), OpenBabel::construct_g_matrix(), OBAtom::Duplicate(), OBSmartsMatcher::EvalAtomExpr(), OpenBabel::GetCorrectedBondVector(), OBBond::GetEquibLength(), OBBuilder::GetNewBondVector(), OBRotorRules::GetRotorIncrements(), OBAtom::HtoMethyl(), OBAtom::IsAxial(), OBMol::PerceiveBondOrders(), and OBAtom::SetHybAndGeom().

unsigned int GetImplicitValence | ( |  | ) | const

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

Referenced by OBMol::AddHydrogens(), OBAromaticTyper::AssignAromaticFlags(), OBAtomTyper::AssignImplicitValence(), OBMol::AssignSpinMultiplicity(), OBSmartsMatcher::EvalAtomExpr(), OpenBabel::ExpandKekule(), OpenBabel::GetCurrentValence(), OBMol::GetGIVector(), OBBond::IsAmide(), OBBond::IsPrimaryAmide(), OBBond::IsSecondaryAmide(), OBBond::IsTertiaryAmide(), and OpenBabel::ValenceSum().

unsigned int GetHvyValence | ( |  | ) | const

Returns:
  The number of non-hydrogens connected to this atom

Referenced by OBMol::AssignSpinMultiplicity(), OpenBabel::CalcSignedVolume(), OBAtom::CountFreeOxygens(), OpenBabel::ExpandKekule(), OBMol::GetGIVector(), OBMol::IsChiral(), OpenBabel::isPotentialAromaticAtom(), OBBond::IsPrimaryAmide(), OBBond::IsSecondaryAmide(), OBBuilder::IsSpiroAtom(), and OBBond::IsTertiaryAmide().

unsigned int GetHeteroValence | ( |  | ) | const

Returns:
  The number of heteroatoms connected to an atom

char * GetType | ( |  | ) |

Returns:
  the atomic type (e.g., for molecular mechanics)

Referenced by OBAtomTyper::AssignTypes(), and OBAtom::Duplicate().

double GetX | ( |  | ) | const`[inline]`

Returns:
  the x coordinate

Referenced by OBDepict::DrawMolecule(), OBBond::GetLength(), and OBGrid::Init().

double GetY | ( |  | ) | const`[inline]`

Returns:
  the y coordinate

Referenced by OBDepict::DrawMolecule(), OBBond::GetLength(), and OBGrid::Init().

double GetZ | ( |  | ) | const`[inline]`

Returns:
  the z coordinate

Referenced by OBBond::GetLength(), and OBGrid::Init().

double x | ( |  | ) | const`[inline]`

Returns:
  the x coordinate

Referenced by OBMol::Center(), OBMol::Has2D(), OBMol::Has3D(), OBMol::ToInertialFrame(), OBForceField::ValidateConjugateGradients(), OBForceField::ValidateLineSearch(), and OBForceField::ValidateSteepestDescent().

double y | ( |  | ) | const`[inline]`

Returns:
  the y coordinate

Referenced by OBMol::Center(), OBMol::Has2D(), OBMol::Has3D(), OBMol::ToInertialFrame(), OBForceField::ValidateConjugateGradients(), OBForceField::ValidateLineSearch(), and OBForceField::ValidateSteepestDescent().

double z | ( |  | ) | const`[inline]`

Returns:
  the z coordinate

Referenced by OBMol::Center(), OBMol::Has2D(), OBMol::Has3D(), OBMol::ToInertialFrame(), and OBForceField::ValidateConjugateGradients().

double* GetCoordinate | ( |  | ) | `[inline]`

Returns:
  the coordinates as a double* or NULL if none.

See SetCoordPtr() for more. If no coordinate pointer is used (e.g., only vector3), NULL will be returned.

Referenced by OBForceField::GetGrid(), and OBForceField::UpdatePairsSimple().

vector3 & GetVector | ( |  | ) |

Returns:
  the coordinates as a vector3 object

Referenced by OBMol::Align(), OpenBabel::ApplyRotMatToBond(), OBAtom::AverageBondAngle(), OpenBabel::CalcSignedVolume(), OpenBabel::CartesianToInternal(), OBMol::Center(), OBBuilder::Connect(), OBMol::ConnectTheDots(), OBAtom::Duplicate(), OBMol::EndModify(), OBAtom::GetAngle(), OBAtom::GetDistance(), OpenBabel::GetLabelAlignment(), OBBuilder::GetNewBondVector(), OBMol::GetTorsion(), OBMol::HasNonZeroCoords(), OBBond::IsDoubleBondGeometry(), OBForceField::LineSearch(), OBForceField::NumericalDerivative(), OBForceField::NumericalSecondDerivative(), OBAtom::SetHybAndGeom(), OBBond::SetLength(), OBAlign::SetRefMol(), OBAlign::SetTargetMol(), OBAtom::SmallestBondAngle(), OBBuilder::Swap(), and OBForceField::ValidateLineSearch().

const vector3 & GetVector | ( |  | ) | const

Returns:
  the coordinates as a vector3 object

double GetPartialCharge | ( |  | ) |

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

Referenced by OBGastChrg::AssignPartialCharges(), OBAtom::Duplicate(), OBChargeModel::FillChargeVectors(), and OBForceField::GetPartialCharges().

OBResidue * GetResidue | ( |  | ) |

Returns:
  the residue which contains this atom, or NULL if none exists

Referenced by OBMol::AddHydrogens(), OBResidueData::AssignBonds(), and OBResidue::GetBonds().

OBResidue * GetResidue | ( | bool | perception | ) |

Parameters:

  perception | implies whether chain perception should occur

Returns:
  the residue which contains this atom, or NULL if none exists

OBMol* GetParent | ( |  | ) | `[inline]`

Returns:
  the molecule which contains this atom, or NULL if none exists

Referenced by OpenBabel::addNbrs(), OpenBabel::BuildOBRTreeVector(), OBSmartsMatcher::EvalAtomExpr(), OpenBabel::GetAtomSymClass(), OBBuilder::GetNewBondVector(), and OBBond::SetLength().

bool GetNewBondVector | ( | vector3 & | v,
|  | double | length
| ) |  |

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

Returns:
  success or failure

OBBond * GetBond | ( | OBAtom * | nbr | ) |

Returns:
  the OBBond object between this atom and that supplied, or NULL if the two atoms are not bonded

Referenced by OBBondTyper::AssignFunctionalGroupBonds(), OBBuilder::Build(), OpenBabel::CorrectBadResonanceForm(), OBBuilder::GetNewBondVector(), and OBMol::PerceiveBondOrders().

OBAtom * GetNextAtom | ( |  | ) |

Returns:
  a pointer to the "next" atom (by atom index) in the parent OBMol, or NULL if no such atom exists.

Deprecated:
  Use any of the other iterator methods. This method will be removed in the future.

OBBondIterator BeginBonds | ( |  | ) | `[inline]`

Returns:
  An iterator to the beginning of the bonds to this atom

Referenced by OBResidueData::AssignBonds().

OBBondIterator EndBonds | ( |  | ) | `[inline]`

Returns:
  An iterator to the end of the bonds to this atom

OBBond * BeginBond | ( | OBBondIterator & | i | ) |

Set the iterator `i` to the beginning of the bonds

Returns:
  The first bond to this atom (or NULL if none exist)

Referenced by OBMol::AddHydrogens(), OpenBabel::CalcSignedVolume(), OBMol::ConnectTheDots(), OBMol::ContigFragList(), OBMol::ConvertDativeBonds(), OpenBabel::ExpandKekule(), OBMol::FindLargestFragment(), OpenBabel::FindRings(), OBResidue::GetBonds(), OpenBabel::GetCurrentValence(), OpenBabel::GetDFFVector(), OBMol::GetGTDVector(), OBBond::IsAmide(), OBAtom::IsAmideNitrogen(), OBBond::IsEster(), OBAtom::IsOneFour(), OBAtom::IsOneThree(), OBBond::IsPrimaryAmide(), OBBond::IsSecondaryAmide(), OBBond::IsTertiaryAmide(), OpenBabel::KekulePropagate(), OBMol::NewPerceiveKekuleBonds(), OBAtomBondIter::OBAtomBondIter(), and OpenBabel::ValenceSum().

OBBond * NextBond | ( | OBBondIterator & | i | ) |

Increment the iterator `i`

Returns:
  The next bond to this atom (or NULL if none exist)

Referenced by OBMol::AddHydrogens(), OpenBabel::CalcSignedVolume(), OBMol::ConnectTheDots(), OBMol::ContigFragList(), OBMol::ConvertDativeBonds(), OpenBabel::ExpandKekule(), OBMol::FindLargestFragment(), OpenBabel::FindRings(), OBResidue::GetBonds(), OpenBabel::GetCurrentValence(), OpenBabel::GetDFFVector(), OBMol::GetGTDVector(), OBBond::IsAmide(), OBAtom::IsAmideNitrogen(), OBBond::IsEster(), OBAtom::IsOneFour(), OBAtom::IsOneThree(), OBBond::IsPrimaryAmide(), OBBond::IsSecondaryAmide(), OBBond::IsTertiaryAmide(), OpenBabel::KekulePropagate(), OBMol::NewPerceiveKekuleBonds(), OBAtomBondIter::operator++(), and OpenBabel::ValenceSum().

OBAtom * BeginNbrAtom | ( | OBBondIterator & | i | ) |

Set the iterator `i` to the beginning of the bonds

Returns:
  The first neighboring atom (or NULL if none exist)

Referenced by OBMol::AddBond(), OBAtomTyper::AssignTypes(), OpenBabel::BuildOBRTreeVector(), OpenBabel::CalcSignedVolume(), OBAromaticTyper::CheckAromaticity(), OpenBabel::CreateNewClassVector(), OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), OBMol::DeleteHydrogens(), OBAromaticTyper::ExcludeSmallRing(), OpenBabel::expand_cycle(), OBMol::expandcycle(), OpenBabel::ExpandKekule(), OBSmartsMatcher::FastSingleMatch(), OBMol::FindChildren(), OBMol::FindTorsions(), OBMol::GetBond(), OpenBabel::GetLabelAlignment(), OBBuilder::GetNewBondVector(), OBRotorRules::GetRotorIncrements(), OBAtom::HasAlphaBetaUnsat(), OBAtom::IsAxial(), OBBond::IsClosure(), OBBond::IsDoubleBondGeometry(), OBRotorList::IsFixedBond(), OpenBabel::KekulePropagate(), OBSSMatch::Match(), OBMol::NewPerceiveKekuleBonds(), OBAtomAtomIter::OBAtomAtomIter(), OBMolAtomBFSIter::OBMolAtomBFSIter(), OBMolAtomDFSIter::OBMolAtomDFSIter(), OBMolAtomDFSIter::operator++(), OBMolAtomBFSIter::operator++(), OBMol::PerceiveBondOrders(), OBMol::PerceiveKekuleBonds(), OBAromaticTyper::PropagatePotentialAromatic(), OBAromaticTyper::SelectRootAtoms(), OBRotorList::SetEvalAtoms(), and OBAromaticTyper::TraverseCycle().

OBAtom * NextNbrAtom | ( | OBBondIterator & | i | ) |

Increment the iterator `i`

Returns:
  The next neighboring atom (or NULL if none exist)

Referenced by OBAtomTyper::AssignTypes(), OpenBabel::BuildOBRTreeVector(), OpenBabel::CalcSignedVolume(), OBAromaticTyper::CheckAromaticity(), OpenBabel::CreateNewClassVector(), OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), OBMol::DeleteHydrogens(), OBAromaticTyper::ExcludeSmallRing(), OpenBabel::expand_cycle(), OBMol::expandcycle(), OpenBabel::ExpandKekule(), OBAtom::ExplicitHydrogenCount(), OBSmartsMatcher::FastSingleMatch(), OBMol::FindChildren(), OBMol::FindTorsions(), OBMol::GetBond(), OpenBabel::GetLabelAlignment(), OBBuilder::GetNewBondVector(), OBRotorRules::GetRotorIncrements(), OBAtom::HasAlphaBetaUnsat(), OBAtom::IsAxial(), OBBond::IsClosure(), OBRotorList::IsFixedBond(), OpenBabel::KekulePropagate(), OBSSMatch::Match(), OBMol::NewPerceiveKekuleBonds(), OBMolAtomBFSIter::OBMolAtomBFSIter(), OBMolAtomDFSIter::OBMolAtomDFSIter(), OBMolAtomDFSIter::operator++(), OBMolAtomBFSIter::operator++(), OBAtomAtomIter::operator++(), OBMol::PerceiveBondOrders(), OBMol::PerceiveKekuleBonds(), OBAromaticTyper::PropagatePotentialAromatic(), OBAromaticTyper::SelectRootAtoms(), OBRotorList::SetEvalAtoms(), and OBAromaticTyper::TraverseCycle().

double GetDistance | ( | int | index | ) |

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

Referenced by OBBondTyper::AssignFunctionalGroupBonds().

double GetDistance | ( | OBAtom * | b | ) |

Returns:
  the distance to the supplied OBAtom

double GetAngle | ( | int | b,
|  | int | c
| ) |  |

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

Referenced by OBMol::GetAngle().

double GetAngle | ( | OBAtom * | b,
|  | OBAtom * | c
| ) |  |

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

void NewResidue | ( |  | ) | `[inline]`

If no residue has been set for this atom, create a new one.

void AddResidue | ( | OBResidue * | res | ) | `[inline]`

Add (set) the residue for this atom.

void DeleteResidue | ( |  | ) | `[inline]`

Delete any residue associated with this atom.

void AddBond | ( | OBBond * | bond | ) | `[inline]`

Add a bond to the internal list. Does not update the bond.

Referenced by OBMol::AddBond(), and OBBuilder::Connect().

void InsertBond | ( | OBBondIterator & | i,
|  | OBBond * | bond
| ) |  | `[inline]`

Insert `bond` into the internal list at the position from `i` Does not modify the bond.

Referenced by OBMol::AddBond().

bool DeleteBond | ( | OBBond * | bond | ) |

Find `bond` and remove it from the internal list. Does not update the bond.

void ClearBond | ( |  | ) | `[inline]`

Clear all bonding information in this atom (does not delete them)

bool HtoMethyl | ( |  | ) |

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

Returns:
  success or failure

bool SetHybAndGeom | ( | int | hyb | ) |

Change the hybridization of this atom and modify the geometry accordingly

Returns:
  success or failure

Deprecated:
  This will be removed in future versions of Open Babel

void ForceNoH | ( |  | ) | `[inline]`

Mark that atom has no hydrogens attached.

bool HasNoHForced | ( |  | ) | `[inline]`

Returns:
  if atom has been marked as having no hydrogens attached

Referenced by OBMol::AssignSpinMultiplicity().

void ForceImplH | ( |  | ) | `[inline]`

Mark that atom is not hydrogen deficient (For SMILES input)

Since:
  version 2.2

bool HasImplHForced | ( |  | ) | `[inline]`

Returns:
  if atom has been marked as having no hydrogens attached

Since:
  version 2.2

Referenced by OBMol::AssignSpinMultiplicity().

unsigned int CountFreeOxygens | ( |  | ) | const

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

Referenced by OBAtom::IsCarboxylOxygen(), OBAtom::IsNitroOxygen(), OBAtom::IsPhosphateOxygen(), and OBAtom::IsSulfateOxygen().

unsigned int ImplicitHydrogenCount | ( |  | ) | const

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

Referenced by OBDepict::DrawMolecule(), OBSmartsMatcher::EvalAtomExpr(), OBMol::GetExactMass(), and OBMol::GetMolWt().

unsigned int ExplicitHydrogenCount | ( | bool | ExcludeIsotopes = `false` | ) | const

Returns:
  The number of hydrogens explicitly bound to this atom, optionally excluding D,T and isotope explicitly set to 1

Referenced by OBMol::AssignSpinMultiplicity(), and OBSmartsMatcher::EvalAtomExpr().

unsigned int MemberOfRingCount | ( |  | ) | const

Returns:
  The number of rings that contain this atom

Referenced by OBSmartsMatcher::EvalAtomExpr().

unsigned int MemberOfRingSize | ( |  | ) | const

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

unsigned int CountRingBonds | ( |  | ) | const

Returns:
  The number of explicit ring connections to this atom

Referenced by OBSmartsMatcher::EvalAtomExpr().

double SmallestBondAngle | ( |  | ) |

Returns:
  The smallest angle of bonds to this atom

Referenced by OBMol::ConnectTheDots().

double AverageBondAngle | ( |  | ) |

Returns:
  The average angle of bonds to this atom

Referenced by OBBondTyper::AssignFunctionalGroupBonds(), and OBMol::PerceiveBondOrders().

unsigned int BOSum | ( |  | ) | const

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

Referenced by OBMol::ConnectTheDots(), OBRing::GetRootAtom(), and OBMol::PerceiveBondOrders().

unsigned int KBOSum | ( |  | ) | const

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

Deprecated:
  Use BOSum() instead

Referenced by OBSmartsMatcher::EvalAtomExpr().

bool HasResidue | ( |  | ) | `[inline]`

Returns:
  Is there any residue information?

Referenced by OBMol::AddHydrogens().

bool IsHydrogen | ( |  | ) | `[inline]`

Returns:
  Is the atom hydrogen?

Referenced by OBMol::AddHydrogens(), OBResidueData::AssignBonds(), OBGastChrg::AssignPartialCharges(), OBMol::AssignSpinMultiplicity(), OBMol::ConnectTheDots(), OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), OBMol::DeleteHydrogens(), OBDepict::DrawMolecule(), OBAtom::ExplicitHydrogenCount(), OBMol::FindTorsions(), OBMol::GetExactMass(), OBAtom::GetHvyValence(), OBMol::GetMolWt(), OBRotorRules::GetRotorIncrements(), OBStericConformerFilter::IsGood(), OBAtom::IsHbondDonor(), OBMol::NumHvyAtoms(), OBAromaticTyper::SelectRootAtoms(), OBAtom::SetHybAndGeom(), OBAlign::SetRefMol(), and OBAlign::SetTargetMol().

bool IsHydrogen | ( |  | ) | const`[inline]`

bool IsCarbon | ( |  | ) | `[inline]`

Returns:
  Is the atom carbon?

Referenced by OBDepict::DrawMolecule(), OBMol::getorden(), OBMol::IsChiral(), OBMol::PerceiveKekuleBonds(), and OpenBabel::potentialAromaticBonds().

bool IsNitrogen | ( |  | ) | `[inline]`

Returns:
  Is the atom nitrogen?

Referenced by OBMol::AddHydrogens(), OpenBabel::ExpandKekule(), OBMol::getorden(), OBRing::GetRootAtom(), OBMol::IsChiral(), OBMol::NewPerceiveKekuleBonds(), OBMol::PerceiveKekuleBonds(), and OBMol::start_kekulize().

bool IsOxygen | ( |  | ) | `[inline]`

Returns:
  Is the atom oxygen?

Referenced by OBMol::AddHydrogens(), OBResidueData::AssignBonds(), OBBondTyper::AssignFunctionalGroupBonds(), OBAtom::CountFreeOxygens(), OpenBabel::ExpandKekule(), OBMol::getorden(), OBRing::GetRootAtom(), OBAtom::IsAromaticNOxide(), OBMol::NewPerceiveKekuleBonds(), and OBMol::PerceiveKekuleBonds().

bool IsSulfur | ( |  | ) | `[inline]`

Returns:
  Is the atom sulfur?

Referenced by OBMol::AddHydrogens(), OpenBabel::ExpandKekule(), OBMol::getorden(), OBRing::GetRootAtom(), OBAtom::HasAlphaBetaUnsat(), OBMol::PerceiveKekuleBonds(), and OBMol::start_kekulize().

bool IsPhosphorus | ( |  | ) | `[inline]`

Returns:
  Is the atom phosphorus?

Referenced by OBMol::AddHydrogens(), and OBAtom::HasAlphaBetaUnsat().

bool IsAromatic | ( |  | ) | const

Returns:
  Is the atom aromatic?

Referenced by OBSmartsMatcher::EvalAtomExpr(), OBMol::GetGIVector(), OpenBabel::KekulePropagate(), and OBQueryAtom::Matches().

bool IsInRing | ( |  | ) | const

Returns:
  Is the atom in a ring?

Referenced by OBBuilder::Build(), OBBuilder::CorrectStereoAtoms(), OBSmartsMatcher::EvalAtomExpr(), OBAromaticTyper::ExcludeSmallRing(), OBMol::GetGIVector(), OBAtom::IsAxial(), OBBuilder::IsSpiroAtom(), OBQueryAtom::Matches(), OBMol::PerceiveBondOrders(), and OBAromaticTyper::SelectRootAtoms().

bool IsInRingSize | ( | int | size | ) | const

Returns:
  Is the atom in a ring of a given size?

Referenced by OBSmartsMatcher::EvalAtomExpr(), OpenBabel::findMetalloceneBonds(), and OBMol::getorden().

bool IsHeteroatom | ( |  | ) |

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

Referenced by OpenBabel::alternate(), and OBAtom::GetHeteroValence().

bool IsNotCorH | ( |  | ) |

Returns:
  Is this atom any element except carbon or hydrogen?

bool IsConnected | ( | OBAtom * | a1 | ) |

Returns:
  Is this atom directly connected to the supplied OBAtom?

Referenced by OBMol::ConnectTheDots(), OpenBabel::construct_g_matrix(), OBAromaticTyper::ExcludeSmallRing(), OBStericConformerFilter::IsGood(), OBMolPairIter::OBMolPairIter(), and OBMolPairIter::operator++().

bool IsOneThree | ( | OBAtom * | a1 | ) |

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

Referenced by OBMolPairIter::OBMolPairIter(), and OBMolPairIter::operator++().

bool IsOneFour | ( | OBAtom * | a1 | ) |

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

bool IsCarboxylOxygen | ( |  | ) |

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

Referenced by OBBuilder::GetNewBondVector().

bool IsPhosphateOxygen | ( |  | ) |

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

bool IsSulfateOxygen | ( |  | ) |

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

bool IsNitroOxygen | ( |  | ) |

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

bool IsAmideNitrogen | ( |  | ) |

Returns true if nitrogen is part of an amide.

Returns:
  Is this atom a nitrogen in an amide (-C(=O)NR2) group?

Referenced by OBMol::getorden().

bool IsPolarHydrogen | ( |  | ) |

Returns:
  Is this atom a hydrogen connected to a polar atom (i.e., N, O, P, S)

bool IsNonPolarHydrogen | ( |  | ) |

Returns:
  Is this atom a hydrogen connected to a non-polar atom (i.e., C)

Referenced by OBMol::DeleteNonPolarHydrogens().

bool IsAromaticNOxide | ( |  | ) |

Returns:
  Is this atom an aromatic nitrogen with at least one double bond to an oxygen atom

bool IsChiral | ( |  | ) |

Returns:
  Is this atom chiral?

Todo:

Referenced by OBMol::IsChiral().

bool IsAxial | ( |  | ) |

Returns:
  Is this atom an axial atom in a ring

bool IsClockwise | ( |  | ) | `[inline]`

Deprecated:

Referenced by OpenBabel::CorrectChirality().

bool IsAntiClockwise | ( |  | ) | `[inline]`

Deprecated:

Referenced by OpenBabel::CorrectChirality().

bool IsPositiveStereo | ( |  | ) | `[inline]`

Deprecated:

bool IsNegativeStereo | ( |  | ) | `[inline]`

Deprecated:

bool HasChiralitySpecified | ( |  | ) | `[inline]`

Deprecated:

Referenced by OpenBabel::CorrectChirality().

bool HasChiralVolume | ( |  | ) | `[inline]`

Deprecated:

bool IsHbondAcceptor | ( |  | ) |

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

bool IsHbondDonor | ( |  | ) |

Returns:
  Is this atom a hydrogen-bond donor?

Referenced by OBAtom::IsHbondDonorH().

bool IsHbondDonorH | ( |  | ) |

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

bool HasAlphaBetaUnsat | ( | bool | includePandS = `true` | ) |

Returns:
  Whether a neighboring atom (alpha) has an unsaturated bond to a third atom (beta).

Parameters:

  includePandS | Whether to include phosphorus and sulfur neighbors in this determination (or to exclude them)

This can be sketched as follows

                  '*'
                     \
                      a=b

where a and b are the 'apha' and 'beta' atoms, respectively and '*' indicates the current atom.

bool HasBondOfOrder | ( | unsigned int | bo | ) |

Returns:
  Whether this atom is connected to any bond with order == `bo`

Referenced by OBMol::PerceiveBondOrders().

int CountBondsOfOrder | ( | unsigned int | bo | ) |

Returns:
  The count of bonds connected to this atom with order == `bo`

bool HasNonSingleBond | ( |  | ) |

Returns:
  Whether this atom is connected to any bond with order >1

Referenced by OBMol::PerceiveBondOrders().

bool HasSingleBond | ( |  | ) | `[inline]`

Returns:
  Does this atom have a single bond

bool HasDoubleBond | ( |  | ) | `[inline]`

Returns:
  Does this atom have a double bond

Referenced by OBBondTyper::AssignFunctionalGroupBonds().

bool HasAromaticBond | ( |  | ) | `[inline]`

Returns:
  Does this atom have an aromatic bond

Referenced by OBMol::NewPerceiveKekuleBonds().

bool MatchesSMARTS | ( | const char * | pattern | ) |

Returns:
  Whether this atom matches the first atom in a given SMARTS pattern

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

Perform a set of transformations specified by the user

Typically these are program options to filter or modify an object For example, see OBMol::DoTransformations() and OBMol::ClassDescription() Base type does nothing

Reimplemented in OBMol.

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

Returns:
  A list of descriptions of command-line options for DoTransformations()

Reimplemented in OBMol, and OBReaction.

T* CastAndClear | ( | bool | clear = `true` | ) | `[inline, inherited]`

By default clears the object. Called from ReadMolecule of most format classes.

virtual const char* GetTitle | ( | bool | replaceNewlines = `true` | ) | const`[inline, virtual, inherited]`

Base type does nothing Made virtual around r3535 to simplify code which passes around OBBase*.

Reimplemented in OBMol.

Referenced by OBMoleculeFormat::DoOutputOptions().

virtual void SetTitle | ( | const char * |  | ) | `[inline, virtual, inherited]`

Reimplemented in OBMol.

Referenced by OBMoleculeFormat::DoOutputOptions().

bool HasData | ( | const std::string & | s | ) | `[inherited]`

Returns:
  whether the generic attribute/value pair exists

Referenced by OBDepict::DrawMolecule(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBForceField::GetPartialCharges(), OBDescriptor::MatchPairData(), OBMol::operator=(), OBMoleculeFormat::ReadChemObjectImpl(), and OBMol::SetEnergies().

bool HasData | ( | const char * | s | ) | `[inherited]`

Returns:
  whether the generic attribute/value pair exists

bool HasData | ( | const unsigned int | type | ) | `[inherited]`

Returns:
  whether the generic attribute/value pair exists, for a given OBGenericDataType

void DeleteData | ( | unsigned int | type | ) | `[inherited]`

Delete any data matching the given OBGenericDataType.

Referenced by OpenBabel::CanonicalLabels(), OBDescriptor::DeleteProperties(), and OBMol::RenumberAtoms().

void DeleteData | ( | OBGenericData * | gd | ) | `[inherited]`

Delete the given generic data from this object.

void DeleteData | ( | std::vector< OBGenericData * > & | vg | ) | `[inherited]`

Delete all of the given generic data from this object.

bool DeleteData | ( | const std::string & | s | ) | `[inherited]`

Deletes the generic data with the specified attribute, returning false if not found.

void SetData | ( | OBGenericData * | d | ) | `[inline, inherited]`

Adds a data object; does nothing if d==NULL.

Referenced by OBGastChrg::AssignPartialCharges(), OpenBabel::CalcSignedVolume(), AliasData::Expand(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetNextFragment(), OBForceField::GetPartialCharges(), OBMoleculeFormat::MakeCombinedMolecule(), OBDescriptor::PredictAndSave(), and OBMol::SetEnergies().

void CloneData | ( | OBGenericData * | d | ) | `[inherited]`

Adds a copy of a data object; does nothing if d == NULL

Since:
  version 2.2

size_t DataSize | ( |  | ) | const`[inline, inherited]`

Returns:
  the number of OBGenericData items attached to this molecule.

OBGenericData * GetData | ( | const unsigned int | type | ) | `[inherited]`

Returns:
  the first matching data for a given type from OBGenericDataType or NULL if nothing matches

Referenced by OpenBabel::CalcSignedVolume(), OpenBabel::CorrectChirality(), OBDepict::DrawMolecule(), AliasData::Expand(), OBDescriptor::FilterCompare(), OpenBabel::GetAtomSymClass(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetNextFragment(), OBForceField::GetPartialCharges(), OBDescriptor::GetValues(), OBMoleculeFormat::MakeCombinedMolecule(), OBMolAngleIter::OBMolAngleIter(), OBMolRingIter::OBMolRingIter(), OBMolTorsionIter::OBMolTorsionIter(), OBMol::operator=(), and OBDescriptor::PredictAndSave().

OBGenericData * GetData | ( | const std::string & | s | ) | `[inherited]`

Returns:
  any data matching the given attribute name or NULL if nothing matches
  the value given an attribute name

OBGenericData * GetData | ( | const char * | s | ) | `[inherited]`

Returns:
  any data matching the given attribute name or NULL if nothing matches
  the value given an attribute name

std::vector<OBGenericData*>& GetData | ( |  | ) | `[inline, inherited]`

Returns:
  all data, suitable for iterating

Referenced by OBMol::GetEnergies(), OBMol::GetEnergy(), and OBMol::SetEnergies().

std::vector< OBGenericData * > GetData | ( | DataOrigin | source | ) | `[inherited]`

Returns:
  all data with a specific origin, suitable for iterating

std::vector< OBGenericData * > GetAllData | ( | const unsigned int | type | ) | `[inherited]`

Returns:
  the all matching data for a given type from OBGenericDataType or an empty vector if nothing matches

Since:
  version 2.2

Referenced by OpenBabel::CanonicalLabels(), OBBuilder::CorrectStereoAtoms(), and OBBuilder::CorrectStereoBonds().

OBDataIterator BeginData | ( |  | ) | `[inline, inherited]`

Returns:
  An iterator pointing to the beginning of the data

Referenced by OBMol::AddBond(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(), and OBMol::operator=().

OBDataIterator EndData | ( |  | ) | `[inline, inherited]`

Returns:
  An iterator pointing to the end of the data

Referenced by OBMol::AddBond(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(), and OBMol::operator=().

## Member Data Documentation

unsigned char _ele`[protected]`

atomic number (type unsigned 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 int _idx`[protected]`

unique node index (GetIdx(), SetIdx())

OBMol* _parent`[protected]`

parent molecule (if any)

std::vector<OBBond*> _vbond`[protected]`

bonds to this atom -- assumed to be one of the endpoints

unsigned int _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*

Referenced by OpenBabel::CartesianToInternal().

vector3 _v`[mutable, protected]`

coordinate vector

OBResidue* _residue`[protected]`

parent residue (if applicable)

unsigned long _id`[protected]`

unique id

bool Visit

Used internally by graph traversal algorithms.

std::vector<OBGenericData*> _vdata`[protected, inherited]`

Custom data.

Referenced by OBMol::OBMol().

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

- atom.h
- atom.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines