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

OBTorsion Class Reference

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

#include <openbabel/generic.h>

List of all members.

Public Member Functions

 OBTorsion (const OBTorsion &)
 ~OBTorsion ()
OBTorsionoperator= (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 (  ) [inline, protected]
OBTorsion ( OBAtom a,
OBAtom b,
OBAtom c,
OBAtom d 
) [protected]

OBTorsion constructor.

OBTorsion ( const OBTorsion src )

OBTorsion copy constructor.

~OBTorsion (  ) [inline]

Member Function Documentation

vector< quad< OBAtom *, OBAtom *, OBAtom *, OBAtom * > > GetTorsions (  ) [protected]

Returns all the 4 atom sets in OBTorsion.

OBTorsion & operator= ( const OBTorsion src )

OBTorsion assignment operator.

void Clear ( void   )

Returns the OBTorsion to its original state.

Referenced by OBMol::FindTorsions().

bool Empty (  ) [inline]

Referenced by OBTorsion::AddTorsion().

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

adds a new torsion to the OBTorsion object

Referenced by OBMol::FindTorsions().

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

adds a new torsion to the OBTorsion object

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

Sets the angle of a torsion in OBTorsion.

Parameters:
radiansthe value to assign to the torsion
indexthe index into the torsion of the OBTorsion
Returns:
boolean success
bool SetData ( OBBond  ) [inline]
bool GetAngle ( double &  radians,
unsigned int  index = 0 
)

Obtains the angle of a torsion in OBTorsion.

Parameters:
radiansthe value of the angle is set here
indexthe index into the torsion of the OBTorsion
Returns:
boolean success
unsigned int GetBondIdx (  )

Gets the bond index of the central bond

Returns:
int bond index
size_t GetSize (  ) const [inline]

Referenced by OBMol::FindTorsions().

std::pair<OBAtom*,OBAtom*> GetBC (  ) [inline]

Gets the two central atoms of ABCD torsion

Returns:
pair<OBAtom*,OBAtom*>
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
bool IsProtonRotor (  )

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

Returns:
boolean

Friends And Related Function Documentation

friend class OBMol [friend]
friend class OBTorsionData [friend]

Member Data Documentation

std::pair<OBAtom*,OBAtom*> _bc [protected]
std::vector<triple<OBAtom*,OBAtom*,double> > _ads [protected]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines