Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

FragmentDB::BuildBondsProcessor Class Reference

Bond creation processor. More...

#include <fragmentDB.h>

Inheritance diagram for FragmentDB::BuildBondsProcessor:

UnaryProcessor< Fragment > UnaryFunctor< Fragment, Processor::Result > List of all members.

Public Types

Type definitions
typedef std::list< Connection > ConnectionList

Public Member Functions

Constructors and Destructors
 BuildBondsProcessor (const FragmentDB &db)
Processor-related methods
virtual bool finish ()
 finish method
virtual bool start ()
 start method
virtual Processor::Result operator() (Fragment &fragment)
 operator ()
Accessors
Size getNumberOfBondsBuilt ()
 Return the number of bonds built during the last application.
void setFragmentDB (const FragmentDB &fragment_db)
 Set the fragment database.
Bond building methods
Size buildFragmentBonds (Fragment &fragment) const
 Build all bonds in a fragment.
Size buildFragmentBonds (Fragment &fragment, const Fragment &tplate) const throw (Exception::TooManyBonds)
 Build all bonds in a fragment according to a manually supplied template.
Size buildInterFragmentBonds (Fragment &first, Fragment &second) const throw (Exception::TooManyBonds)
 Build all possible bonds between two fragments.

Protected Member Functions

void storeConnections_ (Fragment &fragment)
 Store connections for a fragment.
bool buildConnection_ (Connection &con1, Connection &con2) throw (Exception::TooManyBonds)
 Build a connection between two atoms, if possible.

Protected Attributes

FragmentDBfragment_db_
 A pointer to the fragment database.
std::list< Fragment * > fragment_list_
 A list of all fragments.
Size bonds_built_
ConnectionList connections_

Detailed Description

Bond creation processor.


Member Function Documentation

Size FragmentDB::BuildBondsProcessor::buildFragmentBonds Fragment fragment,
const Fragment tplate
const throw (Exception::TooManyBonds)
 

Build all bonds in a fragment according to a manually supplied template.

This method builds all bonds that are contained in manually provided template.

Returns:
the number of bonds built

Size FragmentDB::BuildBondsProcessor::buildFragmentBonds Fragment fragment  )  const
 

Build all bonds in a fragment.

This method builds all bonds that are contained in the template.

Returns:
the number of bonds built

Size FragmentDB::BuildBondsProcessor::buildInterFragmentBonds Fragment first,
Fragment second
const throw (Exception::TooManyBonds)
 

Build all possible bonds between two fragments.

This method builds all bonds that are allowed by the Connections entries in a resource database.

Returns:
the number of bonds built

void FragmentDB::BuildBondsProcessor::storeConnections_ Fragment fragment  )  [protected]
 

Store connections for a fragment.

This method extracts all possible connections for a given fragment and stores them in a list of possible connections. finish will then check that list for possible inter-residue bonds.


Member Data Documentation

std::list<Fragment*> FragmentDB::BuildBondsProcessor::fragment_list_ [protected]
 

A list of all fragments.

This list is constructed incrementally by the operator () and is used by finish() to create the inter-fragment bonds