Open Babel: OBAngle Class Reference

Public Member Functions | Protected Member Functions | Protected Attributes | Friends

# OBAngle Class Reference

Used to hold the 3 atoms in an angle and the angle itself. More...

`#include <openbabel/generic.h>`

List of all members.

## Public Member Functions
| OBAngle (const OBAngle &)
| ~OBAngle ()
OBAngle & | operator= (const OBAngle &)
bool | operator== (const OBAngle &)
void | Clear ()
double | GetAngle () const
void | SetAngle (double angle)
void | SetAtoms (OBAtom *vertex, OBAtom *a, OBAtom *b)
void | SetAtoms (triple< OBAtom *, OBAtom *, OBAtom * > &atoms)
## Protected Member Functions
| OBAngle ()
| OBAngle (OBAtom *vertex, OBAtom *a, OBAtom *b)
triple< OBAtom *, OBAtom *, OBAtom * > | GetAtoms ()
void | SortByIndex ()
## Protected Attributes
OBAtom * | _vertex
std::pair< OBAtom *, OBAtom * > | _termini
double | _radians
## Friends
class | OBMol
class | OBAngleData

## Detailed Description

Used to hold the 3 atoms in an angle and the angle itself.

## Constructor & Destructor Documentation

OBAngle | ( | ) | `[protected]`

Angle default constructor.

OBAngle | ( | OBAtom * | vertex,
|  | OBAtom * | a,
|  | OBAtom * | b
| ) |  | `[protected]`

Angle constructor.

OBAngle | ( | const OBAngle & | src ) |

OBAngle copy constructor.

~OBAngle | ( | ) | `[inline]`

## Member Function Documentation

triple< OBAtom *, OBAtom *, OBAtom * > GetAtoms | ( | ) | `[protected]`

Retrieves the 3 atom pointer for the angle (vertex first)

Returns:
  triple of OBAtom pointers

void SortByIndex | ( | ) | `[protected]`

sorts atoms in angle by order of indices

Referenced by OBAngle::OBAngle(), and OBAngle::SetAtoms().

OBAngle & operator= | ( | const OBAngle & | src ) |

OBAngle assignment operator.

bool operator== | ( | const OBAngle & | other ) |

OBAngle equality operator, is same angle, NOT same value.

Returns:
  boolean equality

void Clear | ( | void | ) |

Return OBAngle to its original state.

Referenced by OBMol::FindAngles().

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

Gets the OBAngle angle value

Returns:
  angle in radians

void SetAngle | ( | double | angle ) | `[inline]`

Sets the OBAngle to `radians`

Parameters:

  angle | in radians

void SetAtoms | ( | OBAtom * | vertex,
|  | OBAtom * | a,
|  | OBAtom * | b
| ) |  |

Sets the 3 atoms in the angle Parameters are pointers to each OBAtom.

Referenced by OBMol::FindAngles().

void SetAtoms | ( | triple< OBAtom *, OBAtom *, OBAtom * > & | atoms ) |

Sets the 3 atoms in the angle.

Parameters:

  atoms | a triple of OBAtom pointers, the first must be the vertex

## Friends And Related Function Documentation

friend class OBMol`[friend]`

friend class OBAngleData`[friend]`

## Member Data Documentation

OBAtom* _vertex`[protected]`

Referenced by OBAngle::Clear(), OBAngle::GetAtoms(), OBAngle::operator=(), OBAngle::operator==(), and OBAngle::SetAtoms().

std::pair<OBAtom*,OBAtom*> _termini`[protected]`

Referenced by OBAngle::Clear(), OBAngle::GetAtoms(), OBAngle::operator=(), OBAngle::operator==(), OBAngle::SetAtoms(), and OBAngle::SortByIndex().

double _radians`[protected]`

Referenced by OBAngle::Clear(), and OBAngle::operator=().

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

- generic.h
- generic.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines