Open Babel  3.0
Public Member Functions | List of all members
OBRotorList Class Reference

#include <openbabel/rotor.h>

Public Member Functions

 OBRotorList ()
 
 ~OBRotorList ()
 
void Clear ()
 
size_t Size ()
 
bool IsFixedBond (OBBond *)
 
bool HasFixedBonds ()
 
void RemoveSymVals (OBMol &)
 
bool HasRingRotors ()
 
Setup
bool Setup (OBMol &mol, bool sampleRings=false)
 
void SetFixedBonds (OBBitVec &fix)
 
void Init (std::string &fname)
 
void SetQuiet ()
 
bool SetRotAtoms (OBMol &)
 
bool FindRotors (OBMol &mol, bool sampleRingBonds=false)
 
bool SetEvalAtoms (OBMol &)
 
bool AssignTorVals (OBMol &)
 
Iterator methods
OBRotorBeginRotor (OBRotorIterator &i)
 
OBRotorNextRotor (OBRotorIterator &i)
 
OBRotorIterator BeginRotors ()
 
OBRotorIterator EndRotors ()
 
Deprecated
bool IdentifyEvalAtoms (OBMol &mol)
 
void SetFixAtoms (OBBitVec &fix)
 
bool HasFixedAtoms ()
 
void IgnoreSymmetryRemoval ()
 
void SetRotAtomsByFix (OBMol &)
 

Detailed Description

Given an OBMol, set up a list of possibly rotatable torsions,.

Constructor & Destructor Documentation

◆ OBRotorList()

Constructor.

◆ ~OBRotorList()

Destructor.

Member Function Documentation

◆ Clear()

void Clear ( void  )

Clear the internal list of rotors and reset.

◆ Size()

size_t Size ( )
inline

◆ IsFixedBond()

bool IsFixedBond ( OBBond bond)

When no atoms/bonds are fixed or when bonds are fixed, this function will return true if the bond is fixed. When using the deprecated fixed atoms, this function will return true if the bond and at least one neighboring bond has fixed atoms.

◆ HasFixedBonds()

bool HasFixedBonds ( )
inline
Returns
True if this rotor list has any fixed bonds.

◆ RemoveSymVals()

void RemoveSymVals ( OBMol mol)

Rotates each bond to zero and 180 degrees and tests if the 2 conformers are duplicates. if so - the symmetric torsion values are removed from consideration during a search

◆ HasRingRotors()

bool HasRingRotors ( )
inline
Returns
True if this rotor list has any ring bonds.
Since
version 2.4

Referenced by OBRotamerList::Setup().

◆ Setup()

bool Setup ( OBMol mol,
bool  sampleRings = false 
)

Setup this rotor list for the supplied molecule. This method calls FindRotors(), SetEvalAtoms(), and AssignTorVals().

Parameters
molThe molecule.
sampleRingsWhether to sample ring conformers - default = false
Returns
True if rotatable bonds were found.

Referenced by OBForceField::FastRotorSearch(), OBForceField::RandomRotorSearchInitialize(), OBForceField::SystematicRotorSearchInitialize(), OpenBabel::UpdateConformersFromTree(), and OBForceField::WeightedRotorSearch().

◆ SetFixedBonds()

void SetFixedBonds ( OBBitVec fix)
inline

Set the bonds that will be fixed.

◆ Init()

void Init ( std::string &  fname)
inline

Intialize the private OBRotorRules database from a specific file.

◆ SetQuiet()

void SetQuiet ( )
inline

Turn off debugging output.

Referenced by OBForceField::FastRotorSearch(), and OpenBabel::UpdateConformersFromTree().

◆ SetRotAtoms()

bool SetRotAtoms ( OBMol mol)

Set the atoms to rotate from the dihedral atoms for each rotor Uses OBRotor->GetDihedralAtoms() to call OBRotor->SetRotAtoms() and standarizes the dihedral angles via OBRotor->SetDihedralAtoms()

Returns
True

◆ FindRotors()

bool FindRotors ( OBMol mol,
bool  sampleRingBonds = false 
)

Find all potentially rotatable bonds in the molecule. This method uses OBBond::IsRotor() for initial evaluation which depends on ring perception (i.e. ring bonds are considered rotatable). Fixed bonds, specified using the deprecated fixed atoms or the new fixed bonds methods are not added to the list. All rotatable bonds will be sorted by their graph theoretical distance (GTD) score (see OBMol::GetGTDVector()). This results in the the rotors going from the inside to the outside of the mol.

Parameters
molThe molecule.
sampleRingBondswhether to sample ring bonds from analysis (default = false)
Returns
True.

Referenced by OBMol::NumRotors().

◆ SetEvalAtoms()

bool SetEvalAtoms ( OBMol mol)

Determines which atoms should be used to calculate the internal energy if the dihedral angle of the rotor is modified

Returns
True

◆ AssignTorVals()

bool AssignTorVals ( OBMol mol)

Using the OBRotorRules database, set the torsion values (and delta) to be evaluated and tested. This method also sets the rotatable atoms for the rotors to the smallest possible set. For each bond there are two candidate sets, one on either side. The smallest of these is used and the torsion indexes for the rotor are inverted if needed (i.e. a-b-c-d -> d-c-b-a).

◆ BeginRotor()

OBRotor* BeginRotor ( OBRotorIterator i)
inline

◆ NextRotor()

OBRotor* NextRotor ( OBRotorIterator i)
inline

◆ BeginRotors()

OBRotorIterator BeginRotors ( )
inline

Get the rotor list begin iterator.

◆ EndRotors()

OBRotorIterator EndRotors ( )
inline

Get the rotor list end iterator.

◆ IdentifyEvalAtoms()

bool IdentifyEvalAtoms ( OBMol mol)
inline
Deprecated:
Not declared. Use Setup() for top-level functionality

◆ SetFixAtoms()

void SetFixAtoms ( OBBitVec fix)
inline

◆ HasFixedAtoms()

bool HasFixedAtoms ( )
inline
Returns
whether this rotor list has any fixed (invariant) atoms
Deprecated:
See HasFixedBonds()

◆ IgnoreSymmetryRemoval()

void IgnoreSymmetryRemoval ( )
inline

Has no effect

Deprecated:
Currently has no effect

◆ SetRotAtomsByFix()

void SetRotAtomsByFix ( OBMol mol)

Set the atoms to rotate from the dihedral atoms for each rotor Insures the fixed atoms are respected, but otherwise functions like SetRotAtoms()


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