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

AssignChargeProcessor Class Reference
[Miscellaneous]

Assigns a charge to each atom. More...

#include <defaultProcessors.h>

Inheritance diagram for AssignChargeProcessor:

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

Public Member Functions

 AssignChargeProcessor ()
 Default constructor.
 AssignChargeProcessor (const String &filename) throw (Exception::FileNotFound)
 Detailled constructor.
virtual bool start ()
 Start Method.
virtual Processor::Result operator() (Atom &atom)
 Applicator method.
float getTotalCharge ()
 Returns the net assigned charge for all atoms.

Protected Attributes

float total_charge_

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.


Constructor & Destructor Documentation

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 AssignChargeProcessor::getTotalCharge  ) 
 

Returns the net assigned charge for all atoms.

virtual Processor::Result AssignChargeProcessor::operator() Atom atom  )  [virtual]
 

Applicator method.

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

See also:
AssignRadiusProcessor::operator()

Reimplemented from AssignRadiusProcessor.

virtual bool 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 AssignRadiusProcessor.