|(AdMatrix *)||- forces|
|(AdMatrix *)||- accelerations|
AdForceField is an abstract class that defines the interface for objects that calculate the energy and forces associated with the elements of an AdSystem or AdInteractionSystem object. AdForceField classes essentially represent complex potential energy functions.
Note: Many of the methods necessary for a working AdForceField subclass are defined in separate protocols. See
The function an AdForceField object represents can be extended by adding objects that conform to the AdForceFieldTerm protocol. Note that this requires that the AdForceField subclass implements the AdForceFieldExtension protocol.
AdForceField differentiates between objects that perform potential energy calculations ('Terms') and the potential energy values they calculate ('Components'). For example AdNonbondedTerm objects calculate two potentials, Electrostatic and VanDerWaals, and hence have two components. Most terms have only one component e.g. in AdCharmmForceField the HarmonicBond term calculates the HarmonicBond potential. Although internally you may not use different objects to calculate different terms you must define this mapping. This is because it is required in order to enable force-field extension.
All AdForceField subclasses should observe AdSystemContentsDidChangeNotification from their systems.
Extra Documentation - Not all force fields will calculate forces and vice versa.
Affected by Task - Units.
Possible Extra Functionality - Ability to use external force matrices.
|- (AdMatrix *) accelerations|
Returns an AdMatrix containing the accelerations associated with the last calculated force matrix. The rows of the returned matrix have a one-to-one correspondence with the rows of the matrix returned by the systems coordinates method. The matrix is owned by the receiver and will be deallocated when its released.
|- (id) availableTerms|
Returns the names of all the terms the object can calculate.
|- (void) clearForces|
Sets all entries in the force matrix to 0
|- (void) evaluateEnergies|
Calculates the energy associated with each force field term for the current system.
|- (void) evaluateEnergiesUsingInteractionsInvolvingElements:||(NSIndexSet*)||elementIndexes|
|- (void) evaluateForces|
Calculates the forces acting on the elements of the current system
|- (void) evaluateForcesDueToElements:||(NSIndexSet*)||elementIndexes|
Calculates the forces using only interactions involving the elements in elementIndexes.
|- (AdMatrix *) forces|
Returns an AdMatrix containing the forces last calculated by calculateForces(). The matrix is owned by the receiver and will be deallocated when its released.
|- (id) initWithSystem:||(id)||system|
|- (void) setAccelerations:||(AdMatrix *)||matrix|
Copies the values in matrix into the forcefield acceleration matrix.
|- (void) setForces:||(AdMatrix *)||matrix|
Copies the values in matrix into the forcefield forces matrix.
|- (void) setSystem:||(id)||system|
Sets the force fields system to system.
Implemented in AdMolecularMechanicsForceField.
|- (id) system|
Returns the system associated with the force field object.
|- (double) totalEnergy|
Returns the total energy as calculated by the last call to calculateEnergies()