Loading...
Searching...
No Matches
OBTorsion Class Reference

`#include <openbabel/generic.h>`

## Public Member Functions

| OBTorsion (const OBTorsion &)
| ~OBTorsion ()
OBTorsion & | operator= (const OBTorsion &)
void | Clear ()
bool | Empty ()
bool | AddTorsion (OBAtom *a, OBAtom *b, OBAtom *c, OBAtom *d)
bool | AddTorsion (quad< OBAtom *, OBAtom *, OBAtom *, OBAtom * > &atoms)
bool | SetAngle (double radians, unsigned int index=0)
bool | SetData (OBBond *)
bool | GetAngle (double &radians, unsigned int index=0)
unsigned int | GetBondIdx ()
size_t | GetSize () const
std::pair< OBAtom *, OBAtom * > | GetBC ()
std::vector< triple< OBAtom *, OBAtom *, double > > | GetADs ()
bool | IsProtonRotor ()

## Protected Member Functions

| OBTorsion ()
| OBTorsion (OBAtom *, OBAtom *, OBAtom *, OBAtom *)
std::vector< quad< OBAtom *, OBAtom *, OBAtom *, OBAtom * > > | GetTorsions ()

## Protected Attributes

std::pair< OBAtom *, OBAtom * > | _bc
std::vector< triple< OBAtom *, OBAtom *, double > > | _ads

## Friends

class | OBMol
class | OBTorsionData

## Detailed Description

Used to hold the torsion data for a single rotatable bond and all four atoms around it.

## Constructor & Destructor Documentation

## OBTorsion() [1/3]

OBTorsion | ( |  | ) |

inline protected

Referenced by OBTorsion(), and operator=().

## OBTorsion() [2/3]

OBTorsion | ( | OBAtom * | a,
|  | OBAtom * | b,
|  | OBAtom * | c,
|  | OBAtom * | d )

protected

OBTorsion constructor.

## OBTorsion() [3/3]

OBTorsion | ( | const OBTorsion & | src | ) |

OBTorsion copy constructor.

## ~OBTorsion()

~OBTorsion | ( |  | ) |

inline

## Member Function Documentation

## GetTorsions()

vector< quad< OBAtom *, OBAtom *, OBAtom *, OBAtom * > > GetTorsions | ( |  | ) |

protected

Returns all the 4 atom sets in OBTorsion.

## operator=()

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

OBTorsion assignment operator.

## Clear()

void Clear | ( |  | ) |

Returns the OBTorsion to its original state.

Referenced by OBMol::FindTorsions().

## Empty()

bool Empty | ( |  | ) |

inline

Referenced by AddTorsion(), and AddTorsion().

## AddTorsion() [1/2]

bool AddTorsion | ( | OBAtom * | a,
|  | OBAtom * | b,
|  | OBAtom * | c,
|  | OBAtom * | d )

adds a new torsion to the OBTorsion object

Referenced by OBMol::FindTorsions().

## AddTorsion() [2/2]

bool AddTorsion | ( | quad< OBAtom *, OBAtom *, OBAtom *, OBAtom * > & | atoms | ) |

adds a new torsion to the OBTorsion object

## SetAngle()

bool SetAngle | ( | double | radians,
|  | unsigned int | index = 0 )

Sets the angle of a torsion in OBTorsion.

Parameters

  radians | the value to assign to the torsion
  index | the index into the torsion of the OBTorsion

Returns
  boolean success

## SetData()

bool SetData | ( | OBBond * |  | ) |

inline

## GetAngle()

bool GetAngle | ( | double & | radians,
|  | unsigned int | index = 0 )

Obtains the angle of a torsion in OBTorsion.

Parameters

  radians | the value of the angle is set here
  index | the index into the torsion of the OBTorsion

Returns
  boolean success

## GetBondIdx()

unsigned int GetBondIdx | ( |  | ) |

Gets the bond index of the central bond

Returns
  int bond index

## GetSize()

size_t GetSize | ( |  | ) | const

inline

Referenced by OBMol::FindTorsions().

## GetBC()

std::pair< OBAtom *, OBAtom * > GetBC | ( |  | ) |

inline

Gets the two central atoms of ABCD torsion

Returns
  pair<OBAtom*,OBAtom*>

## GetADs()

std::vector< triple< OBAtom *, OBAtom *, double > > GetADs | ( |  | ) |

inline

Gets the vector of distal atoms of ABCD torsion

Returns
  vector of A,D atom pointers and a double

## IsProtonRotor()

bool IsProtonRotor | ( |  | ) |

determines if torsion has only protons on either the a or d end

Returns
  boolean

## Friends And Related Symbol Documentation

## OBMol

friend class OBMol

friend

Referenced by OBMol.

## OBTorsionData

friend class OBTorsionData

friend

Referenced by OBTorsionData.

## Member Data Documentation

## _bc

std::pair<OBAtom*,OBAtom*> _bc

protected

Referenced by AddTorsion(), AddTorsion(), Clear(), Empty(), GetBC(), GetBondIdx(), GetTorsions(), OBTorsion(), OBTorsion(), OBTorsion(), and operator=().

## _ads

std::vector<triple<OBAtom*,OBAtom*,double> > _ads

protected

double is angle in radians

Referenced by AddTorsion(), AddTorsion(), Clear(), GetADs(), GetAngle(), GetSize(), GetTorsions(), IsProtonRotor(), OBTorsion(), OBTorsion(), operator=(), and SetAngle().

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

- generic.h
- generic.cpp