BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BALL::FlexibleMolecule Class Reference

#include <BALL/DOCKING/COMMON/flexibleMolecule.h>

Inheritance diagram for BALL::FlexibleMolecule:
BALL::Receptor

Public Member Functions

 FlexibleMolecule (Molecule *mol)
 
 FlexibleMolecule (const FlexibleMolecule &flexmol)
 
virtual ~FlexibleMolecule ()
 
virtual void addConformation (Conformation *conf)
 
void clearConformations ()
 
Size getNumberOfConformations ()
 
const vector< Conformation * > & getConformations () const
 
String getConformationId (Position i)
 
Conformation * getConformation (Position i)
 
Molecule * getConformer (Position i)
 
Molecule * getConformerById (String id)
 
Conformation * getConformationById (String id)
 
bool hasConformation (String id)
 
Molecule * getParent ()
 
String getId () const
 
void setId (String id)
 
void removeMoleculeOwnership ()
 

Static Public Member Functions

static void generateTopologyHash (const AtomContainer *mol, String &hash, bool ignore_hydrogen=false)
 

Protected Member Functions

bool checkCompatibility (Conformation *conf)
 

Protected Attributes

String id
 
Molecule * molecule
 
vector< Conformation * > conformations
 
HashMap< String, Conformation * > conf_ids_
 
bool molecule_ownership_
 

Detailed Description

FlexibleMolecule class. This class represents any molecule having multiple conformers.

Definition at line 22 of file flexibleMolecule.h.

Constructor & Destructor Documentation

BALL::FlexibleMolecule::FlexibleMolecule ( Molecule *  mol)
BALL::FlexibleMolecule::FlexibleMolecule ( const FlexibleMolecule &  flexmol)

Copy constructor.

virtual BALL::FlexibleMolecule::~FlexibleMolecule ( )
virtual

Destructor.

Member Function Documentation

virtual void BALL::FlexibleMolecule::addConformation ( Conformation *  conf)
virtual

Add a conformation

Parameters
conformationpointer

Reimplemented in BALL::Receptor.

bool BALL::FlexibleMolecule::checkCompatibility ( Conformation *  conf)
protected
void BALL::FlexibleMolecule::clearConformations ( )

Removes and destroyes all conformations of this FlexibleMolecule

static void BALL::FlexibleMolecule::generateTopologyHash ( const AtomContainer *  mol,
String &  hash,
bool  ignore_hydrogen = false 
)
static

Generate a hashkey for the topology of the given molecule.
This hashkey uses information about all atoms, bonds and bond-orders and generates a cryptographic hashkey from this data.
Note that the atom positions are not taken into account by this function; if you need a hashkey for a conformation, please you Conformation::generateHash() instead.

Parameters
ignore_hydrogenif set to true, hydrogen atom are ignore during creation of the hashkey. This is useful for searching molecules regardless of the exact protonation state.
Conformation* BALL::FlexibleMolecule::getConformation ( Position  i)

Get a pointer to the i-th conformation.

Returns
pointer to i-th conformation
Conformation* BALL::FlexibleMolecule::getConformationById ( String  id)

Get a pointer to a conformation by specifying its ID.

Returns
pointer to Conformation having the specified ID
String BALL::FlexibleMolecule::getConformationId ( Position  i)

Get the ID of the i-th conformation.

Returns
ID of i-th conformation
const vector< Conformation* >& BALL::FlexibleMolecule::getConformations ( ) const

Get a vector of all stored conformations.

Returns
vector of conformation pointers
Molecule* BALL::FlexibleMolecule::getConformer ( Position  i)

Get a pointer to the i-th conformer ( = conformation applied to parent molecule).

Returns
pointer to i-th conformer
Molecule* BALL::FlexibleMolecule::getConformerById ( String  id)

Get a pointer to the conformer by ID ( = conformation applied to parent molecule).

Returns
pointer to conformer having the specified ID
String BALL::FlexibleMolecule::getId ( ) const

Get the ID of the Flexible Molecule

Returns
ID of Flexible Molecule
Size BALL::FlexibleMolecule::getNumberOfConformations ( )

Get the number of stored conformations.

Returns
number of conformations
Molecule* BALL::FlexibleMolecule::getParent ( )

Get a pointer to the parent molecule supplied in the constructor

Returns
pointer to parent molecule
bool BALL::FlexibleMolecule::hasConformation ( String  id)

Has the Flexible Molecule an associated conformation with given ID.

Returns
bool
void BALL::FlexibleMolecule::removeMoleculeOwnership ( )
void BALL::FlexibleMolecule::setId ( String  id)

Set the ID of the Flexible Molecule

Parameters
idof Flexible Molecule

Member Data Documentation

HashMap< String, Conformation* > BALL::FlexibleMolecule::conf_ids_
protected

Definition at line 114 of file flexibleMolecule.h.

vector< Conformation* > BALL::FlexibleMolecule::conformations
protected

Definition at line 113 of file flexibleMolecule.h.

String BALL::FlexibleMolecule::id
protected

Definition at line 110 of file flexibleMolecule.h.

Molecule* BALL::FlexibleMolecule::molecule
protected

Definition at line 112 of file flexibleMolecule.h.

bool BALL::FlexibleMolecule::molecule_ownership_
protected

Definition at line 115 of file flexibleMolecule.h.