#include <BALL/STRUCTURE/connectedComponentsProcessor.h>
Public Types | |
Type definitions | |
typedef std::vector< Atom * > | Component |
typedef std::vector< Component > | ComponentVector |
Public Member Functions | |
BALL_CREATE (ConnectedComponentsProcessor) | |
Constructors and Destructors | |
ConnectedComponentsProcessor () | |
Default Constructor. | |
virtual | ~ConnectedComponentsProcessor () |
Destructor. | |
Processor-related methods | |
virtual bool | start () |
Processor method which is called before the operator()-call. | |
void | clear () |
virtual Processor::Result | operator() (AtomContainer &ac) |
virtual bool | finish () |
Processor method which is called after the operator()-call. | |
Accessors. | |
Size | getNumberOfConnectedComponents () |
Return the number of connected components found. | |
ComponentVector & | getComponents () |
Return the vector of connected components. | |
const ComponentVector & | getComponents () const |
Return the vector of connected components, const variant. | |
Size | splitIntoMolecules (System &to_split) |
Protected Attributes | |
ComponentVector | components_ |
Connected Component Processor Computation of the connected components of the molecular graph.
Definition at line 20 of file connectedComponentsProcessor.h.
typedef std::vector<Atom*> BALL::ConnectedComponentsProcessor::Component |
Definition at line 27 of file connectedComponentsProcessor.h.
typedef std::vector<Component> BALL::ConnectedComponentsProcessor::ComponentVector |
Definition at line 28 of file connectedComponentsProcessor.h.
BALL::ConnectedComponentsProcessor::ConnectedComponentsProcessor | ( | ) |
Default Constructor.
virtual BALL::ConnectedComponentsProcessor::~ConnectedComponentsProcessor | ( | ) | [virtual] |
Destructor.
BALL::ConnectedComponentsProcessor::BALL_CREATE | ( | ConnectedComponentsProcessor | ) |
void BALL::ConnectedComponentsProcessor::clear | ( | ) |
Clears the data structures.
virtual bool BALL::ConnectedComponentsProcessor::finish | ( | ) | [virtual] |
Processor method which is called after the operator()-call.
Reimplemented from BALL::UnaryProcessor< AtomContainer >.
const ComponentVector& BALL::ConnectedComponentsProcessor::getComponents | ( | ) | const |
Return the vector of connected components, const variant.
ComponentVector& BALL::ConnectedComponentsProcessor::getComponents | ( | ) |
Return the vector of connected components.
Size BALL::ConnectedComponentsProcessor::getNumberOfConnectedComponents | ( | ) |
Return the number of connected components found.
virtual Processor::Result BALL::ConnectedComponentsProcessor::operator() | ( | AtomContainer & | ac | ) | [virtual] |
Operator () for the processor
Reimplemented from BALL::UnaryProcessor< AtomContainer >.
Split a System into its connected components.
This function inserts one Molecule per connected component into to_split. The Atoms will be re-parented and ripped out of their previous parents. Note that this destroys any further hierarchical organization (e.g. Chains, Fragments, ...) that was previously present.
This function will apply the connected component computation itself, so it is not necessary to call apply() previously.
to_split | the System to split |
virtual bool BALL::ConnectedComponentsProcessor::start | ( | ) | [virtual] |
Processor method which is called before the operator()-call.
Reimplemented from BALL::UnaryProcessor< AtomContainer >.
Definition at line 96 of file connectedComponentsProcessor.h.