Loading...
Searching...
No Matches
geometricProperties.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_STRUCTURE_GEOMETRICPROPERTIES_H
#define BALL_STRUCTURE_GEOMETRICPROPERTIES_H
#ifndef BALL_COMMON_H
# include <BALL/common.h>
#endif
#ifndef BALL_MATHS_VECTOR3_H
# include <BALL/MATHS/vector3.h>
#endif
#ifndef BALL_MATHS_SIMPLEBOX3_H
# include <BALL/MATHS/simpleBox3.h>
#endif
#ifndef BALL_KERNEL_ATOM_H
# include <BALL/KERNEL/atom.h>
#endif
#ifndef BALL_KERNEL_FRAGMENT_H
# include <BALL/KERNEL/fragment.h>
#endif
#ifndef BALL_CONCEPT_PROCESSOR_H
# include <BALL/CONCEPT/processor.h>
#endif
#ifndef BALL_DATATYPE_STRING_H
# include <BALL/DATATYPE/string.h>
#endif
#include <vector>
namespace BALL
{
class BALL_EXPORT BoundingBoxProcessor
: public ConstUnaryProcessor<Atom>
{
public:
virtual bool start();
virtual bool finish();
virtual Processor::Result operator () (const Atom& atom)
{ return operator() (atom.getPosition());}
virtual Processor::Result operator () (const Vector3& v);
SimpleBox3 getBox() const;
const Vector3& getLower() const;
const Vector3& getUpper() const;
private:
Vector3 lower_;
Vector3 upper_;
};
class BALL_EXPORT GeometricCenterProcessor
: public ConstUnaryProcessor<Atom>
{
public:
virtual bool start()
;
virtual bool finish()
;
virtual Processor::Result operator()(const Atom& atom)
{ return operator()(atom.getPosition());}
virtual Processor::Result operator()(const Vector3& v)
;
Vector3& getCenter()
;
private:
Vector3 center_;
Size n_;
};
class BALL_EXPORT FragmentDistanceCollector
: public ConstUnaryProcessor<Composite>
{
public:
FragmentDistanceCollector()
;
FragmentDistanceCollector(const Composite& composite)
;
FragmentDistanceCollector(const Composite& composite, float distance)
;
virtual ~FragmentDistanceCollector()
{}
virtual bool start()
;
virtual bool finish()
;
virtual Processor::Result operator()(const Composite& composite);
Size getNumberOfFragments()
;
void setComposite(const Composite& composite)
;
const Composite* getComposite() const
;
float getDistance() const
;
void setDistance(float distance)
;
std::vector<const Fragment*> fragments;
protected:
std::vector<const Fragment*> all_fragments_;
const Composite* reference_composite_;
float squared_distance_;
};
BALL_EXPORT Angle calculateTorsionAngle(const Atom& a1, const Atom& a2, const Atom& a3, const Atom& a4);
BALL_EXPORT bool setTorsionAngle(const Atom& a1, const Atom& a2, Atom& a3, const Atom& a4, Angle angle);
BALL_EXPORT Angle calculateBondAngle(const Atom& a1, const Atom& a2, const Atom& a3);
} // namespace BALL
#endif // BALL_STRUCTURE_GEOMETRICPROPERTIES_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
atom.h
BALL::Atom
Definition atom.h:90
BALL::Atom::getPosition
Vector3 & getPosition()
Return the atom coordinates (mutable).
BALL::BoundingBoxProcessor
Definition geometricProperties.h:58
BALL::BoundingBoxProcessor::getBox
SimpleBox3 getBox() const
BALL::BoundingBoxProcessor::getLower
const Vector3 & getLower() const
BALL::BoundingBoxProcessor::finish
virtual bool finish()
BALL::BoundingBoxProcessor::start
virtual bool start()
BALL::BoundingBoxProcessor::getUpper
const Vector3 & getUpper() const
BALL::Composite
Definition composite.h:74
BALL::ConstUnaryProcessor
Definition processor.h:120
BALL::FragmentDistanceCollector::start
virtual bool start()
BALL::FragmentDistanceCollector::operator()
virtual Processor::Result operator()(const Composite &composite)
BALL::FragmentDistanceCollector::~FragmentDistanceCollector
virtual ~FragmentDistanceCollector()
Definition geometricProperties.h:227
BALL::FragmentDistanceCollector::getNumberOfFragments
Size getNumberOfFragments()
BALL::FragmentDistanceCollector::getDistance
float getDistance() const
BALL::FragmentDistanceCollector::squared_distance_
float squared_distance_
Definition geometricProperties.h:296
BALL::FragmentDistanceCollector::FragmentDistanceCollector
FragmentDistanceCollector(const Composite &composite, float distance)
BALL::FragmentDistanceCollector::finish
virtual bool finish()
BALL::FragmentDistanceCollector::setDistance
void setDistance(float distance)
BALL::FragmentDistanceCollector::reference_composite_
const Composite * reference_composite_
Definition geometricProperties.h:295
BALL::FragmentDistanceCollector::fragments
std::vector< const Fragment * > fragments
Definition geometricProperties.h:289
BALL::FragmentDistanceCollector::FragmentDistanceCollector
FragmentDistanceCollector()
BALL::FragmentDistanceCollector::getComposite
const Composite * getComposite() const
BALL::FragmentDistanceCollector::setComposite
void setComposite(const Composite &composite)
BALL::FragmentDistanceCollector::all_fragments_
std::vector< const Fragment * > all_fragments_
Definition geometricProperties.h:294
BALL::FragmentDistanceCollector::FragmentDistanceCollector
FragmentDistanceCollector(const Composite &composite)
BALL::GeometricCenterProcessor
Definition geometricProperties.h:135
BALL::GeometricCenterProcessor::start
virtual bool start()
BALL::GeometricCenterProcessor::finish
virtual bool finish()
BALL::GeometricCenterProcessor::getCenter
Vector3 & getCenter()
BALL::GeometricCenterProcessor::operator()
virtual Processor::Result operator()(const Vector3 &v)
BALL::GeometricCenterProcessor::operator()
virtual Processor::Result operator()(const Atom &atom)
Definition geometricProperties.h:154
BALL::Processor::Result
int Result
Definition processor.h:36
common.h
fragment.h
BALL::SimpleBox3
TSimpleBox3< float > SimpleBox3
Definition simpleBox3.h:615
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::setTorsionAngle
BALL_EXPORT bool setTorsionAngle(const Atom &a1, const Atom &a2, Atom &a3, const Atom &a4, Angle angle)
BALL::calculateTorsionAngle
BALL_EXPORT Angle calculateTorsionAngle(const Atom &a1, const Atom &a2, const Atom &a3, const Atom &a4)
BALL::calculateBondAngle
BALL_EXPORT Angle calculateBondAngle(const Atom &a1, const Atom &a2, const Atom &a3)
BALL::Vector3
TVector3< float > Vector3
Definition vector3.h:1084
BALL::Angle
TAngle< float > Angle
Definition angle.h:697
processor.h
simpleBox3.h
string.h
vector3.h