Loading...
Searching...
No Matches
defaultProcessors.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_STRUCTURE_DEFAULTPROCESSORS_H
#define BALL_STRUCTURE_DEFAULTPROCESSORS_H
#ifndef BALL_COMMON_H
# include <BALL/common.h>
#endif
#ifndef BALL_KERNEL_atom_H
# include <BALL/KERNEL/atom.h>
#endif
#ifndef BALL_MATHS_VECTOR3_H
# include <BALL/MATHS/vector3.h>
#endif
#ifndef BALL_CONCEPT_PROCESSOR_H
# include <BALL/CONCEPT/processor.h>
#endif
#ifndef BALL_DATATYPE_STRINGHASHMAP_H
# include <BALL/DATATYPE/stringHashMap.h>
#endif
namespace BALL
{
class BALL_EXPORT ClearChargeProcessor
: public UnaryProcessor<Atom>
{
public:
virtual Processor::Result operator()(Atom& atom);
};
class BALL_EXPORT ClearRadiusProcessor
: public UnaryProcessor<Atom>
{
public:
virtual Processor::Result operator()(Atom& atom);
};
class BALL_EXPORT AssignRadiusProcessor
: public UnaryProcessor<Atom>
{
public:
AssignRadiusProcessor();
AssignRadiusProcessor(const String& filename);
virtual bool start();
virtual bool finish();
virtual Processor::Result operator()(Atom& atom);
void setFilename(const String& filename);
String& getFilename();
Size getNumberOfAssignments();
Size getNumberOfErrors();
protected:
bool buildTable_();
String filename_;
StringHashMap<float> table_;
Size number_of_errors_;
Size number_of_assignments_;
};
class BALL_EXPORT AssignChargeProcessor
: public AssignRadiusProcessor
{
public:
AssignChargeProcessor();
AssignChargeProcessor(const String& filename);
virtual bool start();
virtual Processor::Result operator () (Atom& atom);
float getTotalCharge();
protected:
float total_charge_;
};
} // namespace BALL
#endif // BALL_STRUCTURE_DEFAULTPROCESSORS_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
atom.h
BALL::AssignChargeProcessor::AssignChargeProcessor
AssignChargeProcessor()
Default constructor.
BALL::AssignChargeProcessor::total_charge_
float total_charge_
Definition defaultProcessors.h:177
BALL::AssignChargeProcessor::AssignChargeProcessor
AssignChargeProcessor(const String &filename)
BALL::AssignChargeProcessor::getTotalCharge
float getTotalCharge()
BALL::AssignChargeProcessor::start
virtual bool start()
BALL::AssignRadiusProcessor::setFilename
void setFilename(const String &filename)
BALL::AssignRadiusProcessor::filename_
String filename_
Definition defaultProcessors.h:131
BALL::AssignRadiusProcessor::AssignRadiusProcessor
AssignRadiusProcessor()
Default constructor.
BALL::AssignRadiusProcessor::finish
virtual bool finish()
BALL::AssignRadiusProcessor::getNumberOfErrors
Size getNumberOfErrors()
BALL::AssignRadiusProcessor::table_
StringHashMap< float > table_
Definition defaultProcessors.h:132
BALL::AssignRadiusProcessor::number_of_errors_
Size number_of_errors_
Definition defaultProcessors.h:133
BALL::AssignRadiusProcessor::start
virtual bool start()
BALL::AssignRadiusProcessor::getNumberOfAssignments
Size getNumberOfAssignments()
BALL::AssignRadiusProcessor::number_of_assignments_
Size number_of_assignments_
Definition defaultProcessors.h:134
BALL::AssignRadiusProcessor::operator()
virtual Processor::Result operator()(Atom &atom)
BALL::AssignRadiusProcessor::AssignRadiusProcessor
AssignRadiusProcessor(const String &filename)
BALL::AssignRadiusProcessor::buildTable_
bool buildTable_()
BALL::AssignRadiusProcessor::getFilename
String & getFilename()
BALL::Atom
Definition atom.h:90
BALL::ClearChargeProcessor
Definition defaultProcessors.h:35
BALL::ClearChargeProcessor::operator()
virtual Processor::Result operator()(Atom &atom)
Sets the charge to zero.
BALL::ClearRadiusProcessor
Definition defaultProcessors.h:48
BALL::ClearRadiusProcessor::operator()
virtual Processor::Result operator()(Atom &atom)
Sets the radius to zero..
BALL::Processor::Result
int Result
Definition processor.h:36
BALL::StringHashMap
Definition stringHashMap.h:42
BALL::String
Definition string.h:57
BALL::UnaryProcessor< Atom >::UnaryProcessor
UnaryProcessor()
Definition processor.h:69
common.h
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
processor.h
stringHashMap.h
vector3.h