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

#include <BALL/STRUCTURE/geometricProperties.h>

Inheritance diagram for BALL::FragmentDistanceCollector:
BALL::UnaryProcessor< Composite > BALL::UnaryFunctor< Composite, Processor::Result >

Public Member Functions

Constructors and Destructors
 FragmentDistanceCollector ()
 
 FragmentDistanceCollector (const Composite &composite)
 
 FragmentDistanceCollector (const Composite &composite, float distance)
 
virtual ~FragmentDistanceCollector ()
 
Processor related methods
virtual bool start ()
 
virtual bool finish ()
 
virtual Processor::Result operator() (Composite &composite)
 
Accessors
Size getNumberOfFragments ()
 
void setComposite (const Composite &composite)
 
const CompositegetComposite () const
 
float getDistance () const
 
void setDistance (float distance)
 
- Public Member Functions inherited from BALL::UnaryProcessor< Composite >
 UnaryProcessor ()
 
 UnaryProcessor (const UnaryProcessor &)
 
virtual ~UnaryProcessor ()
 

Public Attributes

std::vector< Fragment * > fragments
 

Protected Attributes

std::vector< Fragment * > all_fragments_
 
const Compositereference_composite_
 
float squared_distance_
 

Additional Inherited Members

- Public Types inherited from BALL::UnaryFunctor< Composite, Processor::Result >
typedef Processor::Result result_type
 
typedef Composite argument_type
 
typedef Compositeargument_reference
 
typedef const Compositeconst_argument_reference
 
typedef Compositeargument_pointer
 
typedef const Compositeconst_argument_pointer
 

Detailed Description

Collects all MolecularFragments that are close enough to another 
molecular fragment.
This processor examines the distances between every atom of a given fragment
(further referred to as the reference fragment) and all other atoms in a molecular 
object he is applied to. If any atom of a fragment is closer to any atom of the
reference fragment, the whole fragment is collected in an array.\par
The reference fragment itself is also contained in this array, if it is part
of the molecular object the collector is applied to.\par
The array only contains pointers to the fragments, the fragments are neither 
changed, nor removed from the molecular object.\par
The reference fragment may either be given by a specialized constructor (also
together with the distance) or using  \link setFragment setFragment \endlink .\par
The fragment array is emptied prior to each collection run.\par

Definition at line 189 of file geometricProperties.h.

Constructor & Destructor Documentation

BALL::FragmentDistanceCollector::FragmentDistanceCollector ( )

Default constructor

BALL::FragmentDistanceCollector::FragmentDistanceCollector ( const Composite composite)

Constructor. Creates a new collector and sets the reference composite

Parameters
compositethe reference composite
BALL::FragmentDistanceCollector::FragmentDistanceCollector ( const Composite composite,
float  distance 
)

Constructor. Creates a new collector and sets the reference composite and the distance.

Parameters
compositethe reference composite
distancethe maximum distance between any two atoms
virtual BALL::FragmentDistanceCollector::~FragmentDistanceCollector ( )
inlinevirtual

Definition at line 218 of file geometricProperties.h.

Member Function Documentation

virtual bool BALL::FragmentDistanceCollector::finish ( )
virtual

finish method

Reimplemented from BALL::UnaryProcessor< Composite >.

const Composite* BALL::FragmentDistanceCollector::getComposite ( ) const

Gets the reference composite

Returns
a const pointer to the reference composite
float BALL::FragmentDistanceCollector::getDistance ( ) const

Gets the maximum distance

Returns
the maximum distance
Size BALL::FragmentDistanceCollector::getNumberOfFragments ( )

Returns the number of molecular fragments found

Returns
the number of fragments in the array
virtual Processor::Result BALL::FragmentDistanceCollector::operator() ( Composite )
virtual

operator ()

Reimplemented from BALL::UnaryProcessor< Composite >.

void BALL::FragmentDistanceCollector::setComposite ( const Composite composite)

Sets the reference composite

Parameters
compositethe new reference composite
void BALL::FragmentDistanceCollector::setDistance ( float  distance)

Sets the maximum distance

Parameters
distancethe new maximum distance
virtual bool BALL::FragmentDistanceCollector::start ( )
virtual

start method

Reimplemented from BALL::UnaryProcessor< Composite >.

Member Data Documentation

std::vector<Fragment*> BALL::FragmentDistanceCollector::all_fragments_
protected

Definition at line 286 of file geometricProperties.h.

std::vector<Fragment*> BALL::FragmentDistanceCollector::fragments

The array containing all molecular fragments collected

Definition at line 281 of file geometricProperties.h.

const Composite* BALL::FragmentDistanceCollector::reference_composite_
protected

Definition at line 287 of file geometricProperties.h.

float BALL::FragmentDistanceCollector::squared_distance_
protected

Definition at line 288 of file geometricProperties.h.