BALL  1.5.0
Classes | Protected Member Functions | Protected Attributes | List of all members
BALL::BuildBondsProcessor Class Reference

#include <BALL/STRUCTURE/buildBondsProcessor.h>

Inheritance diagram for BALL::BuildBondsProcessor:
BALL::UnaryProcessor< AtomContainer > BALL::UnaryFunctor< AtomContainer, Processor::Result >

Classes

struct  Default
 Default values for options. More...
 
struct  Option
 Option names. More...
 

Public Member Functions

Constructors and Destructors
 BALL_CREATE (BuildBondsProcessor)
 
 BuildBondsProcessor ()
 default constructor More...
 
 BuildBondsProcessor (const BuildBondsProcessor &bbp)
 copy construcor More...
 
 BuildBondsProcessor (const String &file_name)
 
virtual ~BuildBondsProcessor ()
 destructor More...
 
Processor-related methods
virtual bool start ()
 processor method which is called before the operator () call More...
 
virtual Processor::Result operator() (AtomContainer &ac)
 operator () for the processor More...
 
Accessors
Size getNumberOfBondsBuilt ()
 Return the number of bonds built during the last application. More...
 
void setBondLengths (const String &file_name)
 
HashMap< Size, HashMap< Size, HashMap< int, float > > > getBondMap ()
 Return the bond length Hashmap. More...
 
Assignment
BuildBondsProcessoroperator= (const BuildBondsProcessor &bbp)
 assignment operator More...
 
- Public Member Functions inherited from BALL::UnaryProcessor< AtomContainer >
 UnaryProcessor ()
 
 UnaryProcessor (const UnaryProcessor &)
 
virtual ~UnaryProcessor ()
 
virtual bool finish ()
 

Protected Member Functions

Size buildBondsHashGrid3_ (AtomContainer &ac)
 builds bonds, based on atom distances read from parameter file using a 3D hash grid More...
 
void estimateBondOrders_ (AtomContainer &ac)
 after the bonds are built, the orders are estimated More...
 
void reestimateBondOrdersRings_ (AtomContainer &ac)
 reestimate the bond orders of rings, as aromatic rings are often detected wrong More...
 
void deleteOverestimatedBonds_ (AtomContainer &ac)
 deletes bonds, like from multiple bonded hydrogens or halogens More...
 
void readBondLengthsFromFile_ (const String &file_name="")
 
Bond::BondOrder getNearestBondOrder_ (float length, Size e1, Size e2)
 
bool getMaxBondLength_ (float &length, Size an1, Size an2)
 
bool getMinBondLength_ (float &length, Size an1, Size an2)
 

Protected Attributes

Size num_bonds_
 number of bonds, which are created during the processor call More...
 
HashMap< Size, HashMap< Size, HashMap< int, float > > > bond_lengths_
 structure where bond order distances are stored in More...
 
HashMap< Size, HashMap< Size, float > > max_bond_lengths_
 structure were the bond maxima stored in (used in buildBonds_) More...
 
HashMap< Size, HashMap< Size, float > > min_bond_lengths_
 structure were the bond minima stored in (used in buildBonds_) More...
 
float max_length_
 parameter which holds the longest possible bond More...
 

Public Attributes

Options options
 options More...
 
void setDefaultOptions ()
 

Additional Inherited Members

- Public Types inherited from BALL::UnaryFunctor< AtomContainer, Processor::Result >
typedef Processor::Result result_type
 
typedef AtomContainer argument_type
 
typedef AtomContainerargument_reference
 
typedef const AtomContainerconst_argument_reference
 
typedef AtomContainerargument_pointer
 
typedef const AtomContainerconst_argument_pointer
 

Detailed Description

Bond creation processor

Definition at line 34 of file buildBondsProcessor.h.

Constructor & Destructor Documentation

◆ BuildBondsProcessor() [1/3]

BALL::BuildBondsProcessor::BuildBondsProcessor ( )

default constructor

◆ BuildBondsProcessor() [2/3]

BALL::BuildBondsProcessor::BuildBondsProcessor ( const BuildBondsProcessor bbp)

copy construcor

◆ BuildBondsProcessor() [3/3]

BALL::BuildBondsProcessor::BuildBondsProcessor ( const String file_name)

constructor with parameter filename

Exceptions
BALL::Exception::FileNotFound

◆ ~BuildBondsProcessor()

virtual BALL::BuildBondsProcessor::~BuildBondsProcessor ( )
virtual

destructor

Member Function Documentation

◆ BALL_CREATE()

BALL::BuildBondsProcessor::BALL_CREATE ( BuildBondsProcessor  )

◆ buildBondsHashGrid3_()

Size BALL::BuildBondsProcessor::buildBondsHashGrid3_ ( AtomContainer ac)
protected

builds bonds, based on atom distances read from parameter file using a 3D hash grid

◆ deleteOverestimatedBonds_()

void BALL::BuildBondsProcessor::deleteOverestimatedBonds_ ( AtomContainer ac)
protected

deletes bonds, like from multiple bonded hydrogens or halogens

◆ estimateBondOrders_()

void BALL::BuildBondsProcessor::estimateBondOrders_ ( AtomContainer ac)
protected

after the bonds are built, the orders are estimated

◆ getBondMap()

HashMap<Size, HashMap<Size, HashMap<int, float> > > BALL::BuildBondsProcessor::getBondMap ( )
inline

Return the bond length Hashmap.

Definition at line 136 of file buildBondsProcessor.h.

◆ getMaxBondLength_()

bool BALL::BuildBondsProcessor::getMaxBondLength_ ( float length,
Size  an1,
Size  an2 
)
protected

◆ getMinBondLength_()

bool BALL::BuildBondsProcessor::getMinBondLength_ ( float length,
Size  an1,
Size  an2 
)
protected

◆ getNearestBondOrder_()

Bond::BondOrder BALL::BuildBondsProcessor::getNearestBondOrder_ ( float  length,
Size  e1,
Size  e2 
)
protected

◆ getNumberOfBondsBuilt()

Size BALL::BuildBondsProcessor::getNumberOfBondsBuilt ( )

Return the number of bonds built during the last application.

◆ operator()()

virtual Processor::Result BALL::BuildBondsProcessor::operator() ( AtomContainer ac)
virtual

operator () for the processor

Reimplemented from BALL::UnaryProcessor< AtomContainer >.

◆ operator=()

BuildBondsProcessor& BALL::BuildBondsProcessor::operator= ( const BuildBondsProcessor bbp)

assignment operator

◆ readBondLengthsFromFile_()

void BALL::BuildBondsProcessor::readBondLengthsFromFile_ ( const String file_name = "")
protected

method to read the paramter file

Exceptions
BALL::Exception::FileNotFound

◆ reestimateBondOrdersRings_()

void BALL::BuildBondsProcessor::reestimateBondOrdersRings_ ( AtomContainer ac)
protected

reestimate the bond orders of rings, as aromatic rings are often detected wrong

◆ setBondLengths()

void BALL::BuildBondsProcessor::setBondLengths ( const String file_name)

sets the parameters file

Exceptions
BALL::Exception::FileNotFound

◆ setDefaultOptions()

void BALL::BuildBondsProcessor::setDefaultOptions ( )

reset the options to default values

◆ start()

virtual bool BALL::BuildBondsProcessor::start ( )
virtual

processor method which is called before the operator () call

Reimplemented from BALL::UnaryProcessor< AtomContainer >.

Member Data Documentation

◆ bond_lengths_

HashMap<Size, HashMap<Size, HashMap<int, float> > > BALL::BuildBondsProcessor::bond_lengths_
protected

structure where bond order distances are stored in

Definition at line 181 of file buildBondsProcessor.h.

◆ max_bond_lengths_

HashMap<Size, HashMap<Size, float> > BALL::BuildBondsProcessor::max_bond_lengths_
protected

structure were the bond maxima stored in (used in buildBonds_)

Definition at line 184 of file buildBondsProcessor.h.

◆ max_length_

float BALL::BuildBondsProcessor::max_length_
protected

parameter which holds the longest possible bond

Definition at line 207 of file buildBondsProcessor.h.

◆ min_bond_lengths_

HashMap<Size, HashMap<Size, float> > BALL::BuildBondsProcessor::min_bond_lengths_
protected

structure were the bond minima stored in (used in buildBonds_)

Definition at line 187 of file buildBondsProcessor.h.

◆ num_bonds_

Size BALL::BuildBondsProcessor::num_bonds_
protected

number of bonds, which are created during the processor call

Definition at line 178 of file buildBondsProcessor.h.

◆ options

Options BALL::BuildBondsProcessor::options

options

Definition at line 151 of file buildBondsProcessor.h.