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

#include <BALL/STRUCTURE/defaultProcessors.h>

Inheritance diagram for BALL::AssignChargeProcessor:
BALL::AssignRadiusProcessor BALL::UnaryProcessor< Atom > BALL::UnaryFunctor< Atom, Processor::Result >

Public Member Functions

 AssignChargeProcessor ()
 Default constructor. More...
 
 AssignChargeProcessor (const String &filename) throw (Exception::FileNotFound)
 
virtual bool start ()
 
virtual Processor::Result operator() (Atom &atom)
 
float getTotalCharge ()
 
- Public Member Functions inherited from BALL::AssignRadiusProcessor
 AssignRadiusProcessor ()
 Default constructor. More...
 
 AssignRadiusProcessor (const String &filename) throw (Exception::FileNotFound)
 
virtual bool finish ()
 
void setFilename (const String &filename) throw (Exception::FileNotFound)
 
StringgetFilename ()
 
Size getNumberOfAssignments ()
 
Size getNumberOfErrors ()
 
- Public Member Functions inherited from BALL::UnaryProcessor< Atom >
 UnaryProcessor ()
 
 UnaryProcessor (const UnaryProcessor &)
 
virtual ~UnaryProcessor ()
 

Protected Attributes

float total_charge_
 
- Protected Attributes inherited from BALL::AssignRadiusProcessor
String filename_
 
StringHashMap< floattable_
 
Size number_of_errors_
 
Size number_of_assignments_
 

Additional Inherited Members

- Public Types inherited from BALL::UnaryFunctor< Atom, Processor::Result >
typedef Processor::Result result_type
 
typedef Atom argument_type
 
typedef Atomargument_reference
 
typedef const Atomconst_argument_reference
 
typedef Atomargument_pointer
 
typedef const Atomconst_argument_pointer
 
- Protected Member Functions inherited from BALL::AssignRadiusProcessor
bool buildTable_ () throw (Exception::FileNotFound)
 

Detailed Description

Assigns a charge to each atom. This processor reads a charge table from a file and assigns each atom a charge according to its name and the name of the fragment the atom is contained in.

Definition at line 145 of file defaultProcessors.h.

Constructor & Destructor Documentation

BALL::AssignChargeProcessor::AssignChargeProcessor ( )

Default constructor.

BALL::AssignChargeProcessor::AssignChargeProcessor ( const String filename)
throw (Exception::FileNotFound
)

Detailled constructor. If the file can not be found in the actual path, FileNotFound is thrown.

Member Function Documentation

float BALL::AssignChargeProcessor::getTotalCharge ( )

Returns the net assigned charge for all atoms.

virtual Processor::Result BALL::AssignChargeProcessor::operator() ( Atom atom)
virtual

Applicator method. This method works like its counterpart in AssignRadiusProcessor, but for charges.

See also
AssignRadiusProcessor::operator()

Reimplemented from BALL::AssignRadiusProcessor.

virtual bool BALL::AssignChargeProcessor::start ( )
virtual

Start Method. The number of errors and the numbers of assignments are reset to 0. The charge data from the file is extracted.

Returns
bool, always true

Reimplemented from BALL::AssignRadiusProcessor.

Member Data Documentation

float BALL::AssignChargeProcessor::total_charge_
protected

Definition at line 179 of file defaultProcessors.h.