Open Babel  3.0
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
OBTorsion Class Reference

#include <openbabel/generic.h>

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() [1/3]

OBTorsion ( )
inlineprotected

◆ 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 ( void  )

Returns the OBTorsion to its original state.

Referenced by OBMol::FindTorsions().

◆ Empty()

bool Empty ( )
inline

Referenced by OBTorsion::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
radiansthe value to assign to the torsion
indexthe 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
radiansthe value of the angle is set here
indexthe 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 Function Documentation

◆ OBMol

friend class OBMol
friend

◆ OBTorsionData

friend class OBTorsionData
friend

Member Data Documentation

◆ _bc

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

◆ _ads

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

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