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

ForceFieldComponent Class Reference
[General Force Field Classes.]

Generic force field component class. More...

#include <forceFieldComponent.h>

Inheritance diagram for ForceFieldComponent:

AmberBend AmberNonBonded AmberStretch AmberTorsion CharmmBend CharmmImproperTorsion CharmmNonBonded CharmmStretch CharmmTorsion ChemScoreMetal MMFF94NonBonded MMFF94OutOfPlaneBend MMFF94StretchBend MMFF94Torsion List of all members.

Public Member Functions

Constructors and Destructors
 ForceFieldComponent ()
 Default constructor.
 ForceFieldComponent (ForceField &force_field)
 Constructor.
 ForceFieldComponent (const ForceFieldComponent &force_field_component)
 Copy constructor.
virtual ~ForceFieldComponent ()
 Destructor.
Setup method
virtual bool setup () throw (Exception::TooManyErrors)
 Setup method.
Accessors
ForceFieldgetForceField () const
 Returns the parent force field.
void setForceField (ForceField &force_field)
 Sets the force field.
void setName (const String &name)
 Sets the component's name.
String getName () const
 Returns the component's name.
bool isEnabled () const
void setEnabled (bool state)
Force field calculations
virtual double getEnergy () const
 Returns the energy of the force field component.
virtual double updateEnergy ()
 Returns the energy of the force field component.
virtual void updateForces ()
 Updates the atomic forces in the force field.
virtual void update () throw (Exception::TooManyErrors)
 Regular update of the pair list and the like.

Protected Attributes

ForceFieldforce_field_
double energy_

Friends

class ForceField

Detailed Description

Generic force field component class.


Constructor & Destructor Documentation

ForceFieldComponent::ForceFieldComponent  ) 
 

Default constructor.

ForceFieldComponent::ForceFieldComponent ForceField force_field  ) 
 

Constructor.

ForceFieldComponent::ForceFieldComponent const ForceFieldComponent force_field_component  ) 
 

Copy constructor.

Creates a new instance of the given ForceFieldComponent. The created object will not be assigned to an existing force field.

virtual ForceFieldComponent::~ForceFieldComponent  )  [virtual]
 

Destructor.


Member Function Documentation

ForceField* ForceFieldComponent::getForceField  )  const
 

Returns the parent force field.

0 is returned, if no force field is assigned.

void ForceFieldComponent::setForceField ForceField force_field  ) 
 

Sets the force field.

void ForceFieldComponent::setName const String name  ) 
 

Sets the component's name.

virtual bool ForceFieldComponent::setup  )  throw (Exception::TooManyErrors) [virtual]
 

Setup method.

Reimplemented in AmberBend, AmberNonBonded, AmberStretch, AmberTorsion, CharmmBend, CharmmImproperTorsion, CharmmNonBonded, CharmmStretch, CharmmTorsion, MMFF94NonBonded, MMFF94OutOfPlaneBend, MMFF94StretchBend, MMFF94Torsion, and ChemScoreMetal.

virtual void ForceFieldComponent::update  )  throw (Exception::TooManyErrors) [virtual]
 

Regular update of the pair list and the like.

Each component that contains updatable data structures (like nonbonded pair lists) should implement this method. It is called for each component of a force field each time ForceField::update is called. The default implementation does exactly nothing.

Reimplemented in AmberNonBonded, AmberStretch, and MMFF94NonBonded.

virtual double ForceFieldComponent::updateEnergy  )  [virtual]
 

Returns the energy of the force field component.

The current energy for this force field component is being calculated and returned in units of kJ/mol.

If the component isn't assigned to a ForceField object, zero is returned.

Reimplemented in AmberBend, AmberNonBonded, AmberStretch, AmberTorsion, CharmmBend, CharmmImproperTorsion, CharmmNonBonded, CharmmStretch, CharmmTorsion, MMFF94NonBonded, MMFF94OutOfPlaneBend, MMFF94StretchBend, MMFF94Torsion, and ChemScoreMetal.

virtual void ForceFieldComponent::updateForces  )  [virtual]
 

Updates the atomic forces in the force field.

The forces created by this ForceFieldComponent are calculated for each atom and updated in the corresponding array (forces) of the ForceField instance this component is assigned to.

Reimplemented in AmberBend, AmberNonBonded, AmberStretch, AmberTorsion, CharmmBend, CharmmImproperTorsion, CharmmNonBonded, CharmmStretch, CharmmTorsion, MMFF94NonBonded, MMFF94OutOfPlaneBend, MMFF94StretchBend, MMFF94Torsion, and ChemScoreMetal.