Adun  0.83
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions
AdHbondedTerm Class Reference

#import <AdunHbondedTerm.h>

Inheritance diagram for AdHbondedTerm:
Inheritance graph
[legend]
Collaboration diagram for AdHbondedTerm:
Collaboration graph
[legend]

List of all members.

Public Member Functions

(id) - init
(id) - initWithDictionary:
(id) - initWithSystem:
(id) - initWithSystem:cutoff:hbondstr:updateInterval:hbondedPairs:
(id) - initWithSystem:cutoff:hbondstr:updateInterval:hbondedPairs:listHandlerClass:
(void) - updateList:
(void) - setAutoUpdateList:
(ListElement *) - interactionList
(void) - clearForces
(void) - setHbondedPairs:
- Public Member Functions inherited from
(void) - evaluateForces
(void) - evaluateEnergy
(double) - energy
(AdMatrix *) - forces
(void) - setExternalForceMatrix:
(BOOL) - usesExternalForceMatrix
(void) - setSystem:
(id) - system
(BOOL) - canEvaluateEnergy
(BOOL) - canEvaluateForces
(NSArray *) - potentials
(double) - valueForPotential:
(NSArray *) - arrayOfValuesForPotentials:notFoundMarker:
(NSDictionary *) - dictionaryOfValuesForPotentials:
- Public Member Functions inherited from
(void) - handlerDidUpdateList:
(void) - handlerDidInvalidateList:
(void) - handlerDidHandleContentChange:

Detailed Description

Calculates the potential and the forces acting on a system due to hydrogen bonding interactions with no modifications. The functional form is given by

\[U_{hb}=\begin{cases} -\text{hbondstr} & \text{ if } r \leq 2.0 \\ -\text{hbondstr} *\exp(-15(r-2.0)^2) & \text{ if } r > 2.0 \end{cases} \]

AdHbondedTerm objects use an AdListHandler subclass instance to create and manage the list of interacting pairs. The exact subclass used can be specified on initialisation.

If the list provided by the AdListHandler instance is invalidated due to an AdSystemContentsDidChangeNotification (see AdListHandler documentation) the AdHbondedTerm object will recreate the list. In this event the array of hbonded pairs will be acquired from the system and used to rebuild the list i.e. overriding a hbonded pair array specified previously.

Todo:

Extra Documentation - Add mathematical definition of term.

Extra Methods - Full init chain.

Refactor - Change permittivity to relative permittivity to help clarity.


Member Function Documentation

- (void) clearForces

Clears the force matrix used by the receiver. Take care when usingExternalForceMatrix is YES.

- (id) init

As initWithSystem: passing nil for system.

- (id) initWithDictionary: (NSDictionary*)  dict

Method used when created via template manager

- (id) initWithSystem: (id)  system

As initWithSystem:cutoff:updateInterval:hbondedPairs: with the following values -

  • cutoff 6.0
  • hbondstr -9.0
  • updateInterval 20
  • hbondedPairs nil

Reimplemented from <AdForceFieldTerm>.

- (id) initWithSystem: (id)  aSystem
cutoff: (double)  aDouble
hbondstr: (double)  hbondStr
updateInterval: (unsigned int)  anInt
hbondedPairs: (NSArray*)  hbondedPairs 

As the designated initialiser passing AdCellListHandler for the list handler class.

- (id) initWithSystem: (id)  system
cutoff: (double)  aDouble
hbondstr: (double)  hbondStr
updateInterval: (unsigned int)  anInt
hbondedPairs: (NSArray*)  hbondedPairs
listHandlerClass: (Class)  aClass 

Designated initialiser.

Parameters:
systemThe system on which the calculation is to be performed.
aDoubleThe cutoff to be used.
hbondStrThe strength of the hydrogen bond in kcal/mol.
anIntThe period at which the list should be updated.
hbondedPairsThe hbonded pairs the calculation is to be performed on. If this is nil the object will use elementPairsNotInInteractionsOfCategory: (AdDataSource) passing "Bonded" as the category to obtain the set.
aClassThe AdListHandler subclass to be used for handling the nonbonded list. If aClass is not an AdListHandler subclass an NSInvalidArgumentException is raised. If aClass is nil it defaults to AdCellListHandler.
- (ListElement*) interactionList

Returns a pointer to the beginning of the list of hbonded interaction pairs the receiver uses. Under no circumstances should elements be added or removed to this list. It primarily provides a convienient way to avoid having to create multiple h-bonded lists. i.e. if another object needs to iterate over the list of hbonded pairs it can do so via this method.

- (void) setAutoUpdateList: (BOOL)  value

Sets whether the receiver will automatically update its hbonded list every updateInterval() steps. By default this is yes for every AdHbondedTerm object instance on its creation

- (void) setHbondedPairs: (NSArray*)  hbondedPairs

Sets the pairs of h-bonded atoms

- (void) updateList: (BOOL)  reset

Forces an update of the AdListHandler object the receiver uses. If reset is YES the receiver resets the counter managed by the applications AdMainLoopTimer instance which determines the period between automatic list updates.