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

FragmentDistanceCollector Class Reference
[Geometric property processors.]

Collects all MolecularFragments that are close enough to another molecular fragment. More...

#include <geometricProperties.h>

Inheritance diagram for FragmentDistanceCollector:

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

Public Member Functions

Constructors and Destructors
 FragmentDistanceCollector () throw ()
 Default constructor.
 FragmentDistanceCollector (const Composite &composite) throw ()
 Constructor.
 FragmentDistanceCollector (const Composite &composite, float distance) throw ()
 Constructor.
Processor related methods
virtual bool start () throw ()
 start method
virtual bool finish () throw ()
 finish method
virtual Processor::Result operator() (Composite &composite) throw ()
 operator ()
Accessors
Size getNumberOfFragments () throw ()
 Returns the number of molecular fragments found.
void setComposite (const Composite &composite) throw ()
 Sets the reference composite.
const CompositegetComposite () const throw ()
 Gets the reference composite.
float getDistance () const throw ()
 Gets the maximum distance.
void setDistance (float distance) throw ()
 Sets the maximum distance.

Public Attributes

std::vector< Fragment * > fragments
 The array containing all molecular fragments collected.

Protected Attributes

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

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.

The reference fragment itself is also contained in this array, if it is part of the molecular object the collector is applied to.
The array only contains pointers to the fragments, the fragments are neither changed, nor removed from the molecular object.
The reference fragment may either be given by a specialized constructor (also together with the distance) or using setFragment .
The fragment array is emptied prior to each collection run.


Constructor & Destructor Documentation

FragmentDistanceCollector::FragmentDistanceCollector const Composite composite  )  throw ()
 

Constructor.

Creates a new collector and sets the reference composite

Parameters:
composite the reference composite

FragmentDistanceCollector::FragmentDistanceCollector const Composite composite,
float  distance
throw ()
 

Constructor.

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

Parameters:
composite the reference composite
distance the maximum distance between any two atoms


Member Function Documentation

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

Gets the reference composite.

Returns:
a const pointer to the reference composite

float FragmentDistanceCollector::getDistance  )  const throw ()
 

Gets the maximum distance.

Returns:
the maximum distance

Size FragmentDistanceCollector::getNumberOfFragments  )  throw ()
 

Returns the number of molecular fragments found.

Returns:
the number of fragments in the array

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

Sets the reference composite.

Parameters:
composite the new reference composite

void FragmentDistanceCollector::setDistance float  distance  )  throw ()
 

Sets the maximum distance.

Parameters:
distance the new maximum distance