Loading...
Searching...
No Matches
OBAtom Class Reference

`#include <openbabel/atom.h>`

Inheritance diagram for OBAtom:
[legend]

## Public Types

enum | StereoFlag

## Public Member Functions

| OBAtom ()
virtual | ~OBAtom ()
OBAtom & | operator= (OBAtom &)
bool | operator== (const OBAtom *other) const
void | Duplicate (OBAtom *)
bool | Clear ()
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 | SetImplicitHCount (unsigned int val)
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 (bool value=true)
void | SetInRing (bool value=true)
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 | GetExplicitDegree () const
unsigned int | GetTotalDegree () const
unsigned int | GetExplicitValence () const
unsigned int | GetTotalValence () const
unsigned int | GetHyb () const
unsigned char | GetImplicitHCount () const
unsigned int | GetHvyDegree () const
unsigned int | GetHeteroDegree () 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 ()
OBMol * | GetParent ()
bool | GetNewBondVector (vector3 &v, double length)
OBBond * | GetBond (OBAtom *)
Iterator methods
OBBondIterator | BeginBonds ()
OBBondIterator | EndBonds ()
OBBond * | BeginBond (OBBondIterator &i)
OBBond * | NextBond (OBBondIterator &i)
OBAtom * | BeginNbrAtom (OBBondIterator &i)
OBAtom * | NextNbrAtom (OBBondIterator &i)
double | GetDistance (int index)
double | GetDistance (OBAtom *)
double | GetDistance (vector3 *v)
double | GetAngle (int b, int c)
double | GetAngle (OBAtom *b, OBAtom *c)
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)
Property information
unsigned int | CountFreeOxygens () const
unsigned int | CountFreeSulfurs () const
unsigned int | ExplicitHydrogenCount (bool ExcludeIsotopes=false) const
unsigned int | MemberOfRingCount () const
unsigned int | MemberOfRingSize () const
unsigned int | CountRingBonds () const
double | SmallestBondAngle ()
double | AverageBondAngle ()
std::pair< int, int > | LewisAcidBaseCounts () const
bool | HasResidue ()
bool | IsHetAtom ()
bool | IsElement (const unsigned int e) const
bool | IsAromatic () const
bool | IsInRing () const
bool | IsInRingSize (int) const
bool | IsHeteroatom ()
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 | IsPeriodic () const
bool | IsAxial ()
bool | IsHbondAcceptor ()
bool | IsHbondAcceptorSimple ()
bool | IsHbondDonor ()
bool | IsHbondDonorH ()
bool | IsMetal ()
bool | HasAlphaBetaUnsat (bool includePandS=true)
bool | HasBondOfOrder (unsigned int bo)
int | CountBondsOfOrder (unsigned int bo)
int | HighestBondOrder ()
bool | HasNonSingleBond ()
bool | HasSingleBond ()
bool | HasDoubleBond ()
bool | HasAromaticBond ()
bool | MatchesSMARTS (const char *)

## Static Public Member Functions

static const char * | ClassDescription ()

## Public Attributes

bool | Visit

## Protected Member Functions

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

## Protected Attributes

unsigned char | _ele
unsigned char | _imph
char | _type [OBATOM_TYPE_LEN]
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

## Generic data handling methods (via OBGenericData)

std::vector< OBGenericData * > | _vdata
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 ()

## 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;
}
OpenBabel::OBMol
Molecule Class.
Definition mol.h:121
FOR_ATOMS_OF_MOL
#define FOR_ATOMS_OF_MOL(a, m)
Definition obiter.h:398

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;
}
OpenBabel::OBAtom::GetIdx
unsigned int GetIdx() const
Definition atom.h:189
OpenBabel::OBAtom::OBAtom
OBAtom()
Constructor.
OpenBabel::OBMol::GetAtom
OBAtom * GetAtom(int idx) const
Definition mol.cpp:830
FOR_NBORS_OF_ATOM
#define FOR_NBORS_OF_ATOM(a, p)
Definition obiter.h:400

should produce an output like

atom #1 is attached to atom #2

*/

extern THREAD_LOCAL OBAromaticTyper aromtyper; extern THREAD_LOCAL OBAtomTyper atomtyper; extern THREAD_LOCAL OBPhModel phmodel; OB_EXTERN OBTypeTable ttab;

OBAtom member functions

OBAtom::OBAtom() { _parent = nullptr; Clear(); }

OBAtom::~OBAtom() { if (_residue != nullptr) { _residue->RemoveAtom(this); } /* if (!_vdata.empty()) { vector<OBGenericData*>::iterator m; for (m = _vdata.begin();m != _vdata.end();++m) delete *m; _vdata.clear(); }

## Member Enumeration Documentation

## StereoFlag

enum StereoFlag

## Constructor & Destructor Documentation

## OBAtom()

OBAtom | ( |  | ) |

Constructor.

Referenced by AverageBondAngle(), BeginNbrAtom(), CountFreeOxygens(), CountFreeSulfurs(), CountRingBonds(), Duplicate(), ExplicitHydrogenCount(), GetAngle(), GetBond(), GetDistance(), GetExplicitValence(), GetHeteroDegree(), GetHvyDegree(), GetHyb(), GetPartialCharge(), HasAlphaBetaUnsat(), HtoMethyl(), IsAmideNitrogen(), IsAromatic(), IsAromaticNOxide(), IsAxial(), IsCarboxylOxygen(), IsConnected(), IsHbondAcceptor(), IsHbondDonor(), IsHbondDonorH(), IsInRing(), IsInRingSize(), IsNitroOxygen(), IsNonPolarHydrogen(), IsOneFour(), IsOneThree(), IsPeriodic(), IsPhosphateOxygen(), IsPolarHydrogen(), IsSulfateOxygen(), MatchesSMARTS(), MemberOfRingCount(), MemberOfRingSize(), NextNbrAtom(), operator=(), operator==(), SetHybAndGeom(), SmallestBondAngle(), and ~OBAtom().

## ~OBAtom()

virtual ~OBAtom | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## GetFlag()

int GetFlag | ( |  | ) | const

inline protected

Returns
  All flags

## SetFlag()

void SetFlag | ( | int | flag | ) |

inline protected

Sets the bitwise `flag`.

## UnsetFlag()

void UnsetFlag | ( | int | flag | ) |

inline protected

Unsets the bitwise `flag`.

## HasFlag()

bool HasFlag | ( | int | flag | ) |

inline protected

Returns
  True of the atom has the `flag`

Referenced by IsAromatic(), IsInRing(), and IsInRingSize().

## operator=()

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

Assignment.

## operator==()

bool operator== | ( | const OBAtom * | other | ) | const

inline

Equivalence.

## Duplicate()

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

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

Since
  version 2.2

Referenced by OBUnitCell::FillUnitCell(), and operator=().

## Clear()

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().

## SetIdx()

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().

## SetId()

void SetId | ( | unsigned long | id | ) |

inline

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

## SetHyb()

void SetHyb | ( | int | hyb | ) |

inline

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

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

## SetAtomicNum()

void SetAtomicNum | ( | int | atomicnum | ) |

inline

Set atomic number.

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

## SetIsotope()

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

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

Referenced by AliasData::Expand().

## SetImplicitHCount()

void SetImplicitHCount | ( | unsigned int | val | ) |

inline

Set the implicit hydrogen count to `val`.

Referenced by OBMol::AddHydrogens(), OBMol::AddNewHydrogens(), OBChemTsfm::Apply(), OBMol::DeleteHydrogens(), and OpenBabel::OBAtomAssignTypicalImplicitHydrogens().

## SetFormalCharge()

void SetFormalCharge | ( | int | fcharge | ) |

inline

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

Referenced by OpenBabel::addFragment(), OBChemTsfm::Apply(), OBBondTyper::AssignFunctionalGroupBonds(), OBMol::ConvertDativeBonds(), OBMol::ConvertZeroBonds(), OBMol::MakeDativeBonds(), and OBMol::PerceiveBondOrders().

## SetSpinMultiplicity()

void SetSpinMultiplicity | ( | short | spin | ) |

inline

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

Referenced by OpenBabel::addFragment().

## SetType() [1/2]

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

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

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

## SetType() [2/2]

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

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

## SetPartialCharge()

void SetPartialCharge | ( | double | pcharge | ) |

inline

Set the partial charge to `pcharge`.

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

## SetVector() [1/3]

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

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

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

## SetVector() [2/3]

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

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

## SetCoordPtr()

void SetCoordPtr | ( | double ** | c | ) |

inline

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

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

## SetVector() [3/3]

void SetVector | ( |  | ) |

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

## SetResidue()

void SetResidue | ( | OBResidue * | res | ) |

inline

Attach an OBResidue `res` as containing this atom.

Referenced by OBResidue::AddAtom(), AddResidue(), and OBResidue::RemoveAtom().

## SetParent()

void SetParent | ( | OBMol * | ptr | ) |

inline

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

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

## SetAromatic()

void SetAromatic | ( | bool | value = true | ) |

inline

Mark atom as being aromatic.

## SetInRing()

void SetInRing | ( | bool | value = true | ) |

inline

Mark an atom as belonging to at least one ring.

Referenced by OpenBabel::FindRings().

## ClearCoordPtr()

void ClearCoordPtr | ( |  | ) |

inline

Clear the internal coordinate pointer.

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

## GetFormalCharge()

int GetFormalCharge | ( |  | ) | const

inline

Returns
  the formal charge for this atom

Referenced by OpenBabel::alternate(), OBChemTsfm::Apply(), OpenBabel::AssignOBAromaticityModel(), OpenBabel::AssignRadicalDots(), OBMol::ConnectTheDots(), OBMol::ConvertDativeBonds(), OBMol::ConvertZeroBonds(), OBDepict::DrawMolecule(), OBSmartsMatcher::EvalAtomExpr(), OBChargeModel::FillChargeVectors(), OBMol::GetTotalCharge(), OpenBabel::HasExocyclicBondToOxygenMinus(), IsHbondAcceptor(), IsHbondAcceptorSimple(), OpenBabel::IsSpecialCase(), OpenBabel::IsSuppressibleHydrogen(), LewisAcidBaseCounts(), OBMol::MakeDativeBonds(), OpenBabel::NeedsDoubleBond(), OpenBabel::OBAtomAssignTypicalImplicitHydrogens(), and OBMol::PerceiveBondOrders().

## GetAtomicNum()

unsigned int GetAtomicNum | ( |  | ) | const

inline

Returns
  the atomic number for this atom

Referenced by OBMol::AddHydrogens(), OBMol::AddNewHydrogens(), OpenBabel::alternate(), OBResidueData::AssignBonds(), OBBondTyper::AssignFunctionalGroupBonds(), OpenBabel::AssignOBAromaticityModel(), OBGastChrg::AssignPartialCharges(), OpenBabel::AssignRadicalDots(), OpenBabel::AtomIsNSOP(), OBBuilder::Connect(), OBMol::ConnectTheDots(), OBMol::ConvertZeroBonds(), CountFreeOxygens(), CountFreeSulfurs(), OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), OBMol::DeleteHydrogens(), OBMol::DeleteHydrogens(), OBDepict::DrawMolecule(), OBSmartsMatcher::EvalAtomExpr(), ExplicitHydrogenCount(), OBMol::FindTorsions(), OpenBabel::GetCorrectedBondVector(), OpenBabel::GetDFFVector(), OBBond::GetEquibLength(), OBMol::GetGIVector(), OBMol::GetGTDVector(), OpenBabel::GetHeavyAtomCoords(), GetHvyDegree(), OBRing::GetRootAtom(), OBRotorRules::GetRotorIncrements(), OBMol::GetTotalSpinMultiplicity(), GetType(), HasAlphaBetaUnsat(), OpenBabel::HasExocyclicBondToOxygenMinus(), HtoMethyl(), IsAmideNitrogen(), IsAromaticNOxide(), IsCarboxylOxygen(), OpenBabel::isFerroceneBond(), OBStericConformerFilter::IsGood(), IsHbondDonor(), IsHbondDonorH(), IsHeteroatom(), IsMetal(), IsNitroOxygen(), IsNonPolarHydrogen(), OpenBabel::IsNotCorH(), IsPhosphateOxygen(), IsPolarHydrogen(), OpenBabel::IsSpecialCase(), IsSulfateOxygen(), OpenBabel::IsSulfoneOxygen(), LewisAcidBaseCounts(), OBMol::MakeDativeBonds(), OBQueryAtom::Matches(), OpenBabel::NeedsDoubleBond(), OBMol::NumHvyAtoms(), OpenBabel::OBAtomAssignTypicalImplicitHydrogens(), OBMol::PerceiveBondOrders(), OBRotorList::RemoveSymVals(), SetHybAndGeom(), OBAlign::SetRefMol(), OBAlign::SetTargetMol(), and OpenBabel::validAdditionalBond().

## GetIsotope()

unsigned short int GetIsotope | ( |  | ) | const

inline

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

Referenced by OBDepict::DrawMolecule(), OBSmartsMatcher::EvalAtomExpr(), ExplicitHydrogenCount(), and OpenBabel::IsSuppressibleHydrogen().

## GetSpinMultiplicity()

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 OpenBabel::alternate(), OpenBabel::AssignRadicalDots(), and OBMol::GetTotalSpinMultiplicity().

## GetAtomicMass()

double GetAtomicMass | ( |  | ) | const

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

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

## GetExactMass()

double GetExactMass | ( |  | ) | const

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

Referenced by OBMol::GetExactMass().

## GetIdx()

unsigned int GetIdx | ( |  | ) | const

inline

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

Referenced by OBMol::AddAtom(), OBMol::AddHydrogens(), OBMol::AddNewHydrogens(), OBMol::Align(), OpenBabel::ApplyRotMatToBond(), OBMol::AreInSameRing(), OBResidueData::AssignBonds(), OBGastChrg::AssignPartialCharges(), OBBuilder::Build(), OpenBabel::BuildOBRTreeVector(), OpenBabel::CartesianToInternal(), OBBuilder::Connect(), OBMol::ConnectTheDots(), OBMol::ContigFragList(), OBMol::CopySubstructure(), OBBuilder::CorrectStereoAtoms(), OpenBabel::CreateNewClassVector(), OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), OBSmartsMatcher::EvalAtomExpr(), OBSmartsMatcher::FastSingleMatch(), OBMol::FindChildren(), OBMol::FindLargestFragment(), OpenBabel::FindRings(), OpenBabel::GetDFFVector(), OBBuilder::GetFragment(), OpenBabel::getFragment(), OpenBabel::getFragment(), OBForceField::GetGradient(), OBForceField::GetGrid(), OBMol::GetGTDVector(), OBMol::GetNextFragment(), OBRotorRules::GetRotorIncrements(), HtoMethyl(), OBGrid::Init(), OpenBabel::InternalToCartesian(), OBRotorList::IsFixedBond(), IsInRingSize(), OBForceField::IsInSameRing(), OBRing::IsMember(), OBBuilder::IsSpiroAtom(), OBSSMatch::Match(), MatchesSMARTS(), MemberOfRingCount(), MemberOfRingSize(), OBMol::NewAtom(), OpenBabel::OBBondGetSmallestRingSize(), OBMolPairIter::OBMolPairIter(), OBMolPairIter::OBMolPairIter(), OBMolAtomBFSIter::operator++(), OBMolAtomDFSIter::operator++(), OBMolPairIter::operator++(), operator=(), OBMol::operator=(), operator==(), OBRotorList::RemoveSymVals(), OBMol::RenumberAtoms(), SetCoordPtr(), OBRotorList::SetEvalAtoms(), SetHybAndGeom(), OBBond::SetLength(), OBMol::SetTorsion(), OBProxGrid::Setup(), OBProxGrid::Setup(), OBSmartsMatcher::SetupAtomMatchTable(), and OBForceField::UpdatePairsSimple().

## GetIndex()

unsigned int GetIndex | ( |  | ) | const

inline

Referenced by OpenBabel::GetAtomSymClass().

## GetId()

unsigned long GetId | ( |  | ) | const

inline

Referenced by OBMol::AddAtom(), OBMol::AddHydrogens(), OBMol::AddNewHydrogens(), OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), OBBuilder::GetNewBondVector(), OBSmartsMatcher::match(), and OBMol::operator+=().

## GetCoordinateIdx()

unsigned int GetCoordinateIdx | ( |  | ) | const

inline

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

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

## GetExplicitDegree()

unsigned int GetExplicitDegree | ( |  | ) | const

inline

Returns
  The number of explicit bonds to this atom

Referenced by OBMol::AddBond(), OBResidueData::AssignBonds(), OBAtomTyper::AssignHyb(), OpenBabel::AssignOBAromaticityModel(), OBMol::ConnectTheDots(), OBDepict::DrawMolecule(), OBSmartsMatcher::EvalAtomExpr(), OpenBabel::GetLabelAlignment(), OBBuilder::GetNewBondVector(), OBRing::GetRootAtom(), IsHbondAcceptor(), IsHbondAcceptorSimple(), OBMol::PerceiveBondOrders(), OBRotorList::RemoveSymVals(), and SetHybAndGeom().

## GetTotalDegree()

unsigned int GetTotalDegree | ( |  | ) | const

inline

Returns
  The total number of bonds to this atom including bonds to implicit hydrogens

Referenced by OBSmartsMatcher::EvalAtomExpr(), OBBond::IsAmide(), OBBond::IsPrimaryAmide(), OBBond::IsSecondaryAmide(), OpenBabel::IsSpecialCase(), OBBond::IsTertiaryAmide(), and OpenBabel::NeedsDoubleBond().

## GetExplicitValence()

unsigned int GetExplicitValence | ( |  | ) | const

Returns
  The sum of the bond orders of the explicit bonds to this atom

Referenced by OpenBabel::AssignOBAromaticityModel(), OBMol::ConnectTheDots(), OBRing::GetRootAtom(), GetTotalValence(), OBMol::MakeDativeBonds(), OpenBabel::OBAtomAssignTypicalImplicitHydrogens(), OBMol::PerceiveBondOrders(), and OpenBabel::validAdditionalBond().

## GetTotalValence()

unsigned int GetTotalValence | ( |  | ) | const

Returns
  The sum of the bond orders of all bonds to this atom including bonds to implicit hydrogens

Referenced by OpenBabel::AssignRadicalDots(), OBSmartsMatcher::EvalAtomExpr(), OpenBabel::IsSpecialCase(), and LewisAcidBaseCounts().

## GetHyb()

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(), OBMol::AddNewHydrogens(), OBAtomTyper::AssignHyb(), OBBuilder::Build(), OBBuilder::Connect(), OBSmartsMatcher::EvalAtomExpr(), OBBond::GetEquibLength(), OBBuilder::GetNewBondVector(), OBRotorRules::GetRotorIncrements(), HtoMethyl(), IsAxial(), IsHbondAcceptor(), IsHbondAcceptorSimple(), OBMol::PerceiveBondOrders(), OBRotorList::RemoveSymVals(), and SetHybAndGeom().

## GetImplicitHCount()

unsigned char GetImplicitHCount | ( |  | ) | const

inline

Returns
  The number of implicit hydrogens attached to this atom

Referenced by OBMol::AddHydrogens(), OBMol::AddNewHydrogens(), OBChemTsfm::Apply(), OpenBabel::AssignOBAromaticityModel(), OBMol::ConvertZeroBonds(), OBMol::DeleteHydrogens(), OBDepict::DrawMolecule(), OBSmartsMatcher::EvalAtomExpr(), OBMol::GetExactMass(), OBMol::GetGIVector(), OBMol::GetMolWt(), and OpenBabel::TotalHydrogenCount().

## GetHvyDegree()

unsigned int GetHvyDegree | ( |  | ) | const

Returns
  The number of non-hydrogens connected to this atom

Referenced by CountFreeOxygens(), CountFreeSulfurs(), OBMol::GetGIVector(), IsCarboxylOxygen(), IsNitroOxygen(), IsPhosphateOxygen(), OBBond::IsPrimaryAmide(), OBBond::IsSecondaryAmide(), OBBuilder::IsSpiroAtom(), IsSulfateOxygen(), OpenBabel::IsSulfoneOxygen(), OpenBabel::IsSuppressibleHydrogen(), OBBond::IsTertiaryAmide(), and SetHybAndGeom().

## GetHeteroDegree()

unsigned int GetHeteroDegree | ( |  | ) | const

Returns
  The number of heteroatoms connected to an atom

## GetType()

char * GetType | ( |  | ) |

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

Referenced by OBAtomTyper::AssignTypes().

## GetX()

double GetX | ( |  | ) | const

inline

Returns
  the x coordinate

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

## GetY()

double GetY | ( |  | ) | const

inline

Returns
  the y coordinate

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

## GetZ()

double GetZ | ( |  | ) | const

inline

Returns
  the z coordinate

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

## x()

double x | ( |  | ) | const

inline

Returns
  the x coordinate

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

## y()

double y | ( |  | ) | const

inline

Returns
  the y coordinate

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

## z()

double z | ( |  | ) | const

inline

Returns
  the z coordinate

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

## GetCoordinate()

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().

## GetVector() [1/2]

vector3 & GetVector | ( |  | ) |

Returns
  the coordinates as a vector3 object

Referenced by OBMol::Align(), OpenBabel::ApplyRotMatToBond(), OBBuilder::Build(), OpenBabel::CartesianToInternal(), OBMol::Center(), OBBuilder::Connect(), OBMol::ConnectTheDots(), OBDepict::DrawMolecule(), Duplicate(), OBMol::EndModify(), GetAngle(), GetDistance(), GetDistance(), OpenBabel::GetLabelAlignment(), OBBond::GetLength(), OBBuilder::GetNewBondVector(), OBMol::GetTorsion(), OBMol::HasNonZeroCoords(), OBForceField::LineSearch(), OBForceField::NumericalDerivative(), OBForceField::NumericalSecondDerivative(), SetHybAndGeom(), OBBond::SetLength(), OBAlign::SetRefMol(), OBAlign::SetTargetMol(), OBMol::SetTorsion(), OBBuilder::Swap(), and OBForceField::ValidateLineSearch().

## GetVector() [2/2]

const vector3 & GetVector | ( |  | ) | const

Returns
  the coordinates as a vector3 object

## GetPartialCharge()

double GetPartialCharge | ( |  | ) |

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

Referenced by OBGastChrg::AssignPartialCharges(), and OBChargeModel::FillChargeVectors().

## GetResidue()

OBResidue * GetResidue | ( |  | ) |

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

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

## GetParent()

OBMol * GetParent | ( |  | ) |

inline

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

Referenced by OpenBabel::addNbrs(), OpenBabel::BuildOBRTreeVector(), OBSmartsMatcher::EvalAtomExpr(), GetAngle(), GetAngle(), OpenBabel::GetAtomSymClass(), GetDistance(), GetDistance(), OBBuilder::GetNewBondVector(), GetPartialCharge(), GetResidue(), GetType(), HtoMethyl(), IsAxial(), IsChiral(), SetHybAndGeom(), and OBBond::SetLength().

## GetNewBondVector()

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

Referenced by HtoMethyl(), and SetHybAndGeom().

## GetBond()

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(), OBBuilder::GetNewBondVector(), and OBMol::PerceiveBondOrders().

## BeginBonds()

OBBondIterator BeginBonds | ( |  | ) |

inline

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

Referenced by OBResidueData::AssignBonds().

## EndBonds()

OBBondIterator EndBonds | ( |  | ) |

inline

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

## BeginBond()

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::ConnectTheDots(), OBMol::ContigFragList(), OBMol::ConvertDativeBonds(), CountBondsOfOrder(), CountFreeOxygens(), CountFreeSulfurs(), CountRingBonds(), OBMol::FindLargestFragment(), OpenBabel::FindRings(), GetBond(), OBResidue::GetBonds(), OpenBabel::GetDFFVector(), GetExplicitValence(), OBMol::GetGTDVector(), GetHeteroDegree(), GetHvyDegree(), HasBondOfOrder(), HasNonSingleBond(), HighestBondOrder(), OBBond::IsAmide(), IsAmideNitrogen(), IsCarboxylOxygen(), IsConnected(), OBBond::IsEster(), IsHbondDonorH(), IsNitroOxygen(), IsNonPolarHydrogen(), IsOneFour(), IsOneThree(), IsPhosphateOxygen(), IsPolarHydrogen(), OBBond::IsPrimaryAmide(), OBBond::IsSecondaryAmide(), IsSulfateOxygen(), OpenBabel::IsSulfoneOxygen(), OBBond::IsTertiaryAmide(), OBMol::MakeDativeBonds(), OBAtomBondIter::OBAtomBondIter(), and OBAtomBondIter::OBAtomBondIter().

## NextBond()

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

Increment the iterator `i`

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

Referenced by OBMol::ConnectTheDots(), OBMol::ContigFragList(), OBMol::ConvertDativeBonds(), CountBondsOfOrder(), CountFreeOxygens(), CountFreeSulfurs(), CountRingBonds(), OBMol::FindLargestFragment(), OpenBabel::FindRings(), GetBond(), OBResidue::GetBonds(), OpenBabel::GetDFFVector(), GetExplicitValence(), OBMol::GetGTDVector(), GetHeteroDegree(), GetHvyDegree(), HasBondOfOrder(), HasNonSingleBond(), HighestBondOrder(), OBBond::IsAmide(), IsAmideNitrogen(), IsCarboxylOxygen(), IsConnected(), OBBond::IsEster(), IsHbondDonorH(), IsNitroOxygen(), IsNonPolarHydrogen(), IsOneFour(), IsOneThree(), IsPhosphateOxygen(), IsPolarHydrogen(), OBBond::IsPrimaryAmide(), OBBond::IsSecondaryAmide(), IsSulfateOxygen(), OpenBabel::IsSulfoneOxygen(), OBBond::IsTertiaryAmide(), and OBMol::MakeDativeBonds().

## BeginNbrAtom()

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(), AverageBondAngle(), OpenBabel::BuildOBRTreeVector(), OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), OBMol::DeleteHydrogens(), OBMol::DeleteHydrogens(), ExplicitHydrogenCount(), OBSmartsMatcher::FastSingleMatch(), OBMol::FindChildren(), OBMol::FindTorsions(), OBMol::GetBond(), OpenBabel::GetLabelAlignment(), OBBuilder::GetNewBondVector(), OBRotorRules::GetRotorIncrements(), HasAlphaBetaUnsat(), HtoMethyl(), IsAromaticNOxide(), IsAxial(), OBRotorList::IsFixedBond(), IsHbondAcceptor(), IsHbondDonor(), OBSSMatch::Match(), OBAtomAtomIter::OBAtomAtomIter(), OBAtomAtomIter::OBAtomAtomIter(), OBMolAtomBFSIter::operator++(), OBMolAtomDFSIter::operator++(), OBMol::PerceiveBondOrders(), OBRotorList::SetEvalAtoms(), SetHybAndGeom(), and SmallestBondAngle().

## NextNbrAtom()

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

Increment the iterator `i`

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

Referenced by OBAtomTyper::AssignTypes(), AverageBondAngle(), OpenBabel::BuildOBRTreeVector(), OBMol::DeleteAtom(), OBMol::DeleteHydrogen(), OBMol::DeleteHydrogens(), ExplicitHydrogenCount(), OBSmartsMatcher::FastSingleMatch(), OBMol::FindChildren(), OBMol::FindTorsions(), OBMol::GetBond(), OpenBabel::GetLabelAlignment(), OBBuilder::GetNewBondVector(), OBRotorRules::GetRotorIncrements(), HasAlphaBetaUnsat(), IsAromaticNOxide(), IsAxial(), OBBond::IsDoubleBondGeometry(), OBRotorList::IsFixedBond(), IsHbondAcceptor(), IsHbondDonor(), OBSSMatch::Match(), OBAtomAtomIter::operator++(), OBMolAtomBFSIter::operator++(), OBMolAtomDFSIter::operator++(), OBMol::PerceiveBondOrders(), OBRotorList::SetEvalAtoms(), SetHybAndGeom(), and SmallestBondAngle().

## GetDistance() [1/3]

double GetDistance | ( | int | index | ) |

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

Referenced by OBBondTyper::AssignFunctionalGroupBonds(), and GetDistance().

## GetDistance() [2/3]

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

Returns
  the distance to the supplied OBAtom

## GetDistance() [3/3]

double GetDistance | ( | vector3 * | v | ) |

Returns
  the distance to the coordinates of the supplied vector3

Since
  version 2.4

## GetAngle() [1/2]

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

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

Referenced by AverageBondAngle(), GetAngle(), OBMol::GetAngle(), and SmallestBondAngle().

## GetAngle() [2/2]

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

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

## NewResidue()

void NewResidue | ( |  | ) |

inline

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

## AddResidue()

void AddResidue | ( | OBResidue * | res | ) |

inline

Add (set) the residue for this atom.

## DeleteResidue()

void DeleteResidue | ( |  | ) |

inline

Delete any residue associated with this atom.

## AddBond()

void AddBond | ( | OBBond * | bond | ) |

inline

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

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

## InsertBond()

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().

## DeleteBond()

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

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

## ClearBond()

void ClearBond | ( |  | ) |

inline

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

## HtoMethyl()

bool HtoMethyl | ( |  | ) |

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

Returns
  success or failure

## SetHybAndGeom()

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

## CountFreeOxygens()

unsigned int CountFreeOxygens | ( |  | ) | const

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

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

## CountFreeSulfurs()

unsigned int CountFreeSulfurs | ( |  | ) | const

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

Since
  version 2.4

Referenced by IsCarboxylOxygen().

## ExplicitHydrogenCount()

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 OBSmartsMatcher::EvalAtomExpr(), OBMol::PerceiveBondOrders(), and OpenBabel::TotalHydrogenCount().

## MemberOfRingCount()

unsigned int MemberOfRingCount | ( |  | ) | const

Returns
  The number of rings that contain this atom

Referenced by OBSmartsMatcher::EvalAtomExpr().

## MemberOfRingSize()

unsigned int MemberOfRingSize | ( |  | ) | const

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

Referenced by SetHybAndGeom().

## CountRingBonds()

unsigned int CountRingBonds | ( |  | ) | const

Returns
  The number of explicit ring connections to this atom

Referenced by OBSmartsMatcher::EvalAtomExpr().

## SmallestBondAngle()

double SmallestBondAngle | ( |  | ) |

Returns
  The smallest angle of bonds to this atom

Referenced by OBMol::ConnectTheDots().

## AverageBondAngle()

double AverageBondAngle | ( |  | ) |

Returns
  The average angle of bonds to this atom

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

## LewisAcidBaseCounts()

pair< int, int > LewisAcidBaseCounts | ( |  | ) | const

Lewis acid/base vacancies for this atom

Returns
  A pair of integers, where first is acid count and second is base count

Since
  version 2.3

The returned values count whole lone pairs, so the acid count is the number of electron pairs desired and the base count is the number of electron pairs available.

    Algorithm from:
    Clark, A. M. Accurate Specification of Molecular Structures: The Case for
    Zero-Order Bonds and Explicit Hydrogen Counting. Journal of Chemical Information
    and Modeling, 51, 3149-3157 (2011). http://pubs.acs.org/doi/abs/10.1021/ci200488k

Referenced by OBMol::ConvertZeroBonds().

## HasResidue()

bool HasResidue | ( |  | ) |

inline

Returns
  Is there any residue information?

Referenced by OBMol::AddNewHydrogens().

## IsHetAtom()

bool IsHetAtom | ( |  | ) |

inline

Returns
  Is this a HETATM in a residue (returns false if not in a residue)

Since
  version 2.4

## IsElement()

bool IsElement | ( | const unsigned int | e | ) | const

inline

Returns
  Is the specified element, as specified by atom number (see OBElement namespace)?

## IsAromatic()

bool IsAromatic | ( |  | ) | const

Returns
  Is the atom aromatic?

Referenced by OBSmartsMatcher::EvalAtomExpr(), OBMol::GetGIVector(), IsAromaticNOxide(), IsHbondAcceptor(), OBQueryAtom::Matches(), and OpenBabel::NeedsDoubleBond().

## IsInRing()

bool IsInRing | ( |  | ) | const

Returns
  Is the atom in a ring?

Referenced by OpenBabel::AssignOBAromaticityModel(), OBBuilder::Build(), OBBuilder::Connect(), OBBuilder::CorrectStereoAtoms(), OBSmartsMatcher::EvalAtomExpr(), OBMol::GetGIVector(), IsAxial(), OBQueryAtom::Matches(), MemberOfRingCount(), MemberOfRingSize(), OBMol::PerceiveBondOrders(), and SetHybAndGeom().

## IsInRingSize()

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

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

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

## IsHeteroatom()

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 GetHeteroDegree().

## IsConnected()

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

Returns
  Is this atom directly connected to the supplied OBAtom?

Referenced by OBMol::ConnectTheDots(), OBStericConformerFilter::IsGood(), OBMolPairIter::OBMolPairIter(), OBMolPairIter::OBMolPairIter(), and OBMolPairIter::operator++().

## IsOneThree()

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

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

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

## IsOneFour()

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

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

## IsCarboxylOxygen()

bool IsCarboxylOxygen | ( |  | ) |

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

Referenced by OBBuilder::GetNewBondVector(), and IsHbondAcceptor().

## IsPhosphateOxygen()

bool IsPhosphateOxygen | ( |  | ) |

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

## IsSulfateOxygen()

bool IsSulfateOxygen | ( |  | ) |

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

## IsNitroOxygen()

bool IsNitroOxygen | ( |  | ) |

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

Referenced by IsHbondAcceptor().

## IsAmideNitrogen()

bool IsAmideNitrogen | ( |  | ) |

Returns true if nitrogen is part of an amide.

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

## IsPolarHydrogen()

bool IsPolarHydrogen | ( |  | ) |

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

Referenced by OBMol::DeletePolarHydrogens().

## IsNonPolarHydrogen()

bool IsNonPolarHydrogen | ( |  | ) |

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

Referenced by OBMol::DeleteNonPolarHydrogens().

## IsAromaticNOxide()

bool IsAromaticNOxide | ( |  | ) |

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

## IsChiral()

bool IsChiral | ( |  | ) |

Returns
  Is this atom chiral?

Todo

## IsPeriodic()

bool IsPeriodic | ( |  | ) | const

Returns
  Is the atom part of a periodic unit cell?

Referenced by GetAngle(), and GetDistance().

## IsAxial()

bool IsAxial | ( |  | ) |

Returns
  Is this atom an axial atom in a ring

## IsHbondAcceptor()

bool IsHbondAcceptor | ( |  | ) |

Returns
  Is this atom a hydrogen-bond acceptor (considering also atom surrounding)

## IsHbondAcceptorSimple()

bool IsHbondAcceptorSimple | ( |  | ) |

Returns
  Is this atom a hydrogen-bond acceptor (old function)?

## IsHbondDonor()

bool IsHbondDonor | ( |  | ) |

Returns
  Is this atom a hydrogen-bond donor?

Referenced by IsHbondDonorH().

## IsHbondDonorH()

bool IsHbondDonorH | ( |  | ) |

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

## IsMetal()

bool IsMetal | ( |  | ) |

Returns
  Is this atom a metal?

Since
  version 2.4

## HasAlphaBetaUnsat()

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.

## HasBondOfOrder()

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

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

Referenced by HasAromaticBond(), HasDoubleBond(), HasSingleBond(), and OBMol::PerceiveBondOrders().

## CountBondsOfOrder()

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

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

## HighestBondOrder()

int HighestBondOrder | ( |  | ) |

Returns
  The maximum bond order for this atom

## HasNonSingleBond()

bool HasNonSingleBond | ( |  | ) |

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

Referenced by OBMol::PerceiveBondOrders().

## HasSingleBond()

bool HasSingleBond | ( |  | ) |

inline

Returns
  Does this atom have a single bond

## HasDoubleBond()

bool HasDoubleBond | ( |  | ) |

inline

Returns
  Does this atom have a double bond

Referenced by OBBondTyper::AssignFunctionalGroupBonds().

## HasAromaticBond()

bool HasAromaticBond | ( |  | ) |

inline

Returns
  Does this atom have an aromatic bond

## MatchesSMARTS()

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

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

## DoTransformations()

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.

## ClassDescription()

const char * ClassDescription | ( |  | ) |

inline static inherited

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

## CastAndClear()

template<class T>

T * CastAndClear | ( | bool | clear = true | ) |

inline inherited

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

## GetTitle()

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().

## SetTitle()

virtual void SetTitle | ( | const char * |  | ) |

inline virtual inherited

Reimplemented in OBMol.

Referenced by OBMoleculeFormat::DoOutputOptions().

## HasData() [1/3]

bool HasData | ( | const std::string & | s | ) |

inherited

Returns
  whether the generic attribute/value pair exists

Referenced by OBMol::AddAtom(), OBDepict::DrawMolecule(), OBMol::FindAngles(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetLSSR(), OBForceField::GetPartialCharges(), OBMol::GetSSSR(), HasData(), OBDescriptor::MatchPairData(), OBMol::NewAtom(), OBMoleculeFormat::ReadChemObjectImpl(), and OBMol::SetEnergies().

## HasData() [2/3]

bool HasData | ( | const char * | s | ) |

inherited

Returns
  whether the generic attribute/value pair exists

## HasData() [3/3]

bool HasData | ( | const unsigned int | type | ) |

inherited

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

## DeleteData() [1/4]

void DeleteData | ( | unsigned int | type | ) |

inherited

Delete any data matching the given OBGenericDataType.

Referenced by OBMol::AddAtom(), OBMol::BeginModify(), OpenBabel::CanonicalLabels(), OBDescriptor::DeleteProperties(), OpenBabel::DeleteStereoOnAtom(), OBMol::EndModify(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBMol::NewAtom(), and OBMol::RenumberAtoms().

## DeleteData() [2/4]

void DeleteData | ( | OBGenericData * | gd | ) |

inherited

Delete the given generic data from this object.

## DeleteData() [3/4]

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

inherited

Delete all of the given generic data from this object.

## DeleteData() [4/4]

bool DeleteData | ( | const std::string & | s | ) |

inherited

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

## SetData()

void SetData | ( | OBGenericData * | d | ) |

inline inherited

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

Referenced by OBMol::AddBond(), OBGastChrg::AssignPartialCharges(), OBMol::CopySubstructure(), OBMol::DoTransformations(), OBAtom::Duplicate(), AliasData::Expand(), OBMol::FindAngles(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetFormula(), OBMol::GetLSSR(), OBForceField::GetPartialCharges(), OBMol::GetSSSR(), OBMoleculeFormat::MakeCombinedMolecule(), OBMol::operator+=(), OBMol::operator=(), OBDescriptor::PredictAndSave(), OBMol::SetEnergies(), and OBMol::SetFormula().

## CloneData()

void CloneData | ( | OBGenericData * | d | ) |

inherited

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

Since
  version 2.2

Referenced by OBMol::AddBond().

## DataSize()

size_t DataSize | ( |  | ) | const

inline inherited

Returns
  the number of OBGenericData items attached to this molecule.

## GetData() [1/5]

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 OBDepict::DrawMolecule(), OpenBabel::extract_thermochemistry(), OBDescriptor::FilterCompare(), OBAtom::GetAngle(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBAtom::GetDistance(), OBBond::GetLength(), OBForceField::GetPartialCharges(), OBDescriptor::GetValues(), OpenBabel::IsSuppressibleHydrogen(), OBMoleculeFormat::MakeCombinedMolecule(), OBMolAngleIter::OBMolAngleIter(), OBMolAngleIter::OBMolAngleIter(), OBMolTorsionIter::OBMolTorsionIter(), OBMolTorsionIter::OBMolTorsionIter(), and OBDescriptor::PredictAndSave().

## GetData() [2/5]

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

## GetData() [3/5]

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

## GetData() [4/5]

std::vector< OBGenericData * > & GetData | ( |  | ) |

inline inherited

Returns
  all data, suitable for iterating

Referenced by OBMol::BeginModify(), OBMol::ConnectTheDots(), OBMol::CopySubstructure(), OBMol::DoTransformations(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetFormula(), OBMol::GetLSSR(), OBMol::GetSSSR(), OBMol::GetTorsion(), OBMol::SetEnergies(), and OBMol::SetFormula().

## GetData() [5/5]

std::vector< OBGenericData * > GetData | ( | DataOrigin | source | ) |

inherited

Returns
  all data with a specific origin, suitable for iterating

## GetAllData()

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(), OBMol::CopySubstructure(), OBBuilder::CorrectStereoAtoms(), OBBuilder::CorrectStereoBonds(), OpenBabel::DeleteStereoOnAtom(), and OBMol::operator+=().

## BeginData()

OBDataIterator BeginData | ( |  | ) |

inline inherited

Returns
  An iterator pointing to the beginning of the data

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

## EndData()

OBDataIterator EndData | ( |  | ) |

inline inherited

Returns
  An iterator pointing to the end of the data

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

## Member Data Documentation

## _ele

unsigned char _ele

protected

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

Referenced by Clear(), Duplicate(), GetAtomicMass(), GetAtomicNum(), GetExactMass(), GetType(), IsElement(), IsHbondAcceptor(), IsHbondAcceptorSimple(), IsHbondDonor(), SetAtomicNum(), SetType(), and SetType().

## _imph

unsigned char _imph

protected

number of implicit hydrogens

Referenced by Clear(), Duplicate(), GetImplicitHCount(), GetTotalDegree(), GetTotalValence(), and SetImplicitHCount().

## _type

char _type[OBATOM_TYPE_LEN]

protected

atomic type

Referenced by Clear(), Duplicate(), GetType(), SetType(), and SetType().

## _fcharge

short _fcharge

protected

formal charge

Referenced by Clear(), Duplicate(), GetFormalCharge(), and SetFormalCharge().

## _isotope

unsigned short _isotope

protected

isotope (0 = most abundant)

Referenced by Clear(), Duplicate(), GetAtomicMass(), GetExactMass(), GetIsotope(), GetType(), SetIsotope(), SetType(), and SetType().

## _spinmultiplicity

short _spinmultiplicity

protected

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

Referenced by Clear(), Duplicate(), GetSpinMultiplicity(), and SetSpinMultiplicity().

## _idx

unsigned int _idx

protected

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

Referenced by Clear(), GetIdx(), GetIndex(), operator=(), and SetIdx().

## _parent

OBMol* _parent

protected

parent molecule (if any)

Referenced by GetParent(), and SetParent().

## _vbond

std::vector<OBBond*> _vbond

protected

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

Referenced by AddBond(), BeginBond(), BeginBonds(), BeginNbrAtom(), Clear(), ClearBond(), DeleteBond(), EndBonds(), GetExplicitDegree(), GetTotalDegree(), InsertBond(), NextBond(), and NextNbrAtom().

## _cidx

unsigned int _cidx

protected

index into coordinate array

Referenced by Clear(), ClearCoordPtr(), GetCoordinate(), GetCoordinateIdx(), GetVector(), GetVector(), SetCoordPtr(), SetIdx(), SetVector(), SetVector(), SetVector(), x(), y(), and z().

## _hyb

unsigned short _hyb

protected

hybridization

Referenced by Clear(), Duplicate(), GetHyb(), and SetHyb().

## _flags

unsigned short _flags

protected

bitwise flags (e.g. aromaticity)

Referenced by Clear(), Duplicate(), GetFlag(), HasFlag(), SetFlag(), and UnsetFlag().

## _pcharge

double _pcharge

protected

partial charge

Referenced by Clear(), Duplicate(), GetPartialCharge(), and SetPartialCharge().

## _c

double** _c

protected

coordinate array in double*

Referenced by Clear(), ClearCoordPtr(), GetCoordinate(), GetVector(), GetVector(), SetCoordPtr(), SetVector(), SetVector(), SetVector(), x(), y(), and z().

## _v

vector3 _v

mutable protected

coordinate vector

Referenced by Duplicate(), GetVector(), GetVector(), SetVector(), SetVector(), SetVector(), x(), y(), and z().

## _residue

OBResidue* _residue

protected

parent residue (if applicable)

Referenced by Clear(), DeleteResidue(), Duplicate(), GetResidue(), HasResidue(), IsHetAtom(), NewResidue(), and SetResidue().

## _id

unsigned long _id

protected

unique id

Referenced by Clear(), Duplicate(), GetId(), IsChiral(), and SetId().

## Visit

bool Visit

Used internally by graph traversal algorithms.

## _vdata

std::vector<OBGenericData*> _vdata

protected inherited

Custom data.

Referenced by BeginData(), Clear(), CloneData(), DataSize(), DeleteData(), DeleteData(), DeleteData(), DeleteData(), OBAtom::Duplicate(), EndData(), GetAllData(), GetData(), GetData(), GetData(), GetData(), GetData(), HasData(), HasData(), OBBond::OBBond(), OBMol::OBMol(), OBMol::OBMol(), OBResidue::OBResidue(), SetData(), and ~OBBase().

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

- atom.h
- atom.cpp