#include <BALL/STRUCTURE/defaultProcessors.h>
Public Member Functions | |
AssignRadiusProcessor () | |
Default constructor. | |
AssignRadiusProcessor (const String &filename) throw (Exception::FileNotFound) | |
virtual bool | start () |
virtual bool | finish () |
virtual Processor::Result | operator() (Atom &atom) |
void | setFilename (const String &filename) throw (Exception::FileNotFound) |
String & | getFilename () |
Size | getNumberOfAssignments () |
Size | getNumberOfErrors () |
Protected Member Functions | |
bool | buildTable_ () throw (Exception::FileNotFound) |
Protected Attributes | |
String | filename_ |
StringHashMap< float > | table_ |
Size | number_of_errors_ |
Size | number_of_assignments_ |
Assigns the radius to each atom. This processor reads a radius table from a file and assigns each atom a radius according to its name and the name of the fragment the atom is contained in.
Definition at line 62 of file defaultProcessors.h.
BALL::AssignRadiusProcessor::AssignRadiusProcessor | ( | ) |
Default constructor.
BALL::AssignRadiusProcessor::AssignRadiusProcessor | ( | const String & | filename | ) | throw (Exception::FileNotFound) |
Detailled constructor. If the file can not be found in the actual path, FileNotFound is thrown.
bool BALL::AssignRadiusProcessor::buildTable_ | ( | ) | throw (Exception::FileNotFound) [protected] |
virtual bool BALL::AssignRadiusProcessor::finish | ( | ) | [virtual] |
Finish method. Allways returns true and does nothing.
Reimplemented from BALL::UnaryProcessor< Atom >.
String& BALL::AssignRadiusProcessor::getFilename | ( | ) |
Return the current filename
Size BALL::AssignRadiusProcessor::getNumberOfAssignments | ( | ) |
Return the number of assigned atoms.
Size BALL::AssignRadiusProcessor::getNumberOfErrors | ( | ) |
Return the number of unassignable atoms. Only the atoms from the container, which cannot be matched, count as errors. The unmatched atoms from the file dont care.
virtual Processor::Result BALL::AssignRadiusProcessor::operator() | ( | Atom & | atom | ) | [virtual] |
Applicator method The full names of all atoms in the container are compared to the atomnames from the file. For all matching atoms, the radii from the file are set. If for an atom from the container no matching atom from the file can be found, a warning is displayed and the number of errors increases. If in the file, the is a nonmatching atom, nothing happens.
"*:" + atom_name
Reimplemented from BALL::UnaryProcessor< Atom >.
Reimplemented in BALL::AssignChargeProcessor.
void BALL::AssignRadiusProcessor::setFilename | ( | const String & | filename | ) | throw (Exception::FileNotFound) |
Set the filename to read the radii from. If the file can not be found in the actual path, FileNotFound is thrown.
virtual bool BALL::AssignRadiusProcessor::start | ( | ) | [virtual] |
Start Method. The number of errors and the numbers of assignments are reset to 0. The radius data from the file is extracted.
Reimplemented from BALL::UnaryProcessor< Atom >.
Reimplemented in BALL::AssignChargeProcessor.
String BALL::AssignRadiusProcessor::filename_ [protected] |
Definition at line 132 of file defaultProcessors.h.
Definition at line 135 of file defaultProcessors.h.
Size BALL::AssignRadiusProcessor::number_of_errors_ [protected] |
Definition at line 134 of file defaultProcessors.h.
StringHashMap<float> BALL::AssignRadiusProcessor::table_ [protected] |
Definition at line 133 of file defaultProcessors.h.