|
Adun
0.83
|
#import <AdunPureNonbondedTerm.h>


Calculates the potential and the forces acting on a system due to coulomb electrostatic and lennard jones interactions with no modifications.
AdPureNonbondedTerm 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 AdPureNonbondedTerm object will recreate the list. In this event the array of nonbonded pairs will be acquired from the system and used to rebuild the list i.e. overriding a nonbonded pair array specified previously.
Extra Documentation - Add mathematical definition of term.
Extra Methods - Full init chain.
Refactor - Change permittivity to relative permittivity to help clarity.
| - (void) evaluateElectrostaticForces |
Implements AdNonbondedTerm.
| - (void) evaluateLennardJonesForces |
Implements AdNonbondedTerm.
| - (id) init |
As initWithSystem: passing nil for system.
| - (id) initWithSystem: | (id) | system |
As initWithSystem:cutoff:updateInterval:permittivity:nonbondedPairs:externalForceMatrix: with the following values -
Reimplemented from <AdForceFieldTerm>.
| - (id) initWithSystem: | (id) | aSystem | |
| cutoff: | (double) | aDouble | |
| updateInterval: | (unsigned int) | anInt | |
| permittivity: | (double) | permittivityValue | |
| nonbondedPairs: | (NSArray*) | nonbondedPairs | |
| externalForceMatrix: | (AdMatrix*) | matrix | |
As the designated initialiser passing AdCellListHandler for the list handler class.
| - (id) initWithSystem: | (id) | system | |
| cutoff: | (double) | aDouble | |
| updateInterval: | (unsigned int) | anInt | |
| permittivity: | (double) | permittivityValue | |
| nonbondedPairs: | (NSArray*) | nonbondedPairs | |
| externalForceMatrix: | (AdMatrix*) | matrix | |
| listHandlerClass: | (Class) | aClass | |
Designated initialiser.
| system | The system on which the calculation is to be performed. |
| permittivity | The permittivity to be used in the electrostatic calculations. |
| aDouble | The cutoff to be used. |
| anInt | The period at which the list should be updated. |
| nonbondedPairs | The nonbonded 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. |
| matrix | An allocated AdMatrix instance where the calculated forces will be written. It must contain one row for each element in the system. If the dimensions of the matrix are incorrect an NSInvalidArgumentException is raised. If matrix is NULL the object will create and use its own force matrix. |
| aClass | The 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. |
If we are going to thread we don't initialise the original term with the passed cutoff This is because setting up the threading requires
This means
numberProcs*(list creation; cutoff, all pairs) + numberProcess*(list creation; cutoff, pair/procs)
operations are required - which takes a lot of time if the cutoff is large.
To get around this we set the cutoff to be small initially, e.g. 4.0, so the setup is very quick. Then once the setup is finished we set the cutoff to its correct value. However this will be done in parallel and hence is equivalent to a single update at the full cutoff
| - (ListElement*) interactionList |
Returns a pointer to the beginning of the list of nonbonded 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 non-bonded lists. i.e. if another object needs to iterate over the list of nonbonded pairs it can do so via this method.
| - (AdDataMatrix *) interactionsOfPotential: | (NSString*) | name | |
| exceedingThreshold: | (double) | threshold | |
Testing
| - (double) permittivity |
Returns the permittivity used.
| - (void) setAutoUpdateList: | (BOOL) | value |
Sets whether the receiver will automatically update its nonbonded list every updateInterval (AdNonbondedTerm) steps. By default this is yes for every AdNonbondedTerm object instance on its creation
| - (void) setPermittivity: | (double) | aDouble |
Sets the permittivity to aDouble.
| - (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.
1.8.1