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

#import <AdunMoleculeCavity.h>

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

List of all members.

Public Member Functions

(id) - init
(id) - initWithVdwType:
(id) - initWithVdwType:factor:
(id) - initWithSystem:factor:
(id) - initWithConfiguration:vdwParameters:vdwType:factor:
(AdDataMatrix *) - vdwParameters
(void) - setVdwParameters:
(NSString *) - vdwType
(void) - setVdwType:
(AdDataMatrix *) - configuration
(void) - setConfiguration:
(double) - factor
(void) - setFactor:
(NSArray *) - centre
- Public Member Functions inherited from
(double) - cavityVolume
(BOOL) - isPointInCavity:
(Vector3D *) - cavityCentre
(NSArray *) - cavityExtremes

Detailed Description

AdGridDelegate that defines a cavity determined by the vdw surface of a molecule. The surface is calculated from the lennard jones parameters of the atoms. However since there are two forms for the lennard jones interaction that are used in the AdunKernel library, two sets of parameters are possible. The first form is

\[ U(r_{ij}) = \frac{A_{i}A{j}}{r_{ij}^{12}} - \frac{B_{i}B{j}}{r_{ij}^{6}} \]

Here the parameters are called "VDW A" and "VDW B". The second form is

\[ U(r_{ij}) = \sqrt{\epsilon_{i}\epsilon_{j}} \left \{ \left( \frac{0.5(r_{i}^{*} + r_{j}^{*})}{r_{ij}} \right)^{12} - 2* \left( \frac{0.5(r_{i}^{*} + r_{j}^{*})}{r_{ij}} \right)^{6} \right \} \]

In this formula $ \epsilon $ is called "Well Depth" and $r^{*} $ the "Equilibrium Separation". However Charmm supplies $ 0.5*(r_{i}^{*} $. This is equal to half the equilibrium separation for the atoms interaction with an atom of the same type.

The VDW radii of each atom, called $ \sigma $, is determined from these parameters as follows. In the first case from $ A_{i} $ and $ B_{i} $

\[ \sigma_{i} = 0.5 * \left ( \frac{A_{i}}{B_{i}} \right )^{\frac{1}{3}} \]

in the second case given the equilibrium separation $ r_{i}^{*} $ for atom i the relationship is,

\[ \sigma_{i} = \frac {r_{i}^{*}}{2^{\frac{1}{6}}} \]

Todo:
Documentation Update - Check LJ formula name and parameters names are consistent across the framework.

Member Function Documentation

- (NSArray *) centre

Returns the cavity centre as an NSArray

- (AdDataMatrix *) configuration

Returns the configuration matrix. This will be a copy of the original matrix passed to the object.

- (double) factor

Returns the cavity factor.

- (id) init

As initWithVdwType: with type set to "A".

- (id) initWithConfiguration: (AdDataMatrix*)  matrix
vdwParameters: (AdDataMatrix*)  table
vdwType: (NSString*)  string
factor: (double)  factorValue 

Returns a cavity defined by the vdw surface of a molecule. The surface is determined from the atoms lennard jones parameters. There are two forms of the lennard jones interaction, called here A and B, (see class description) which use different parameters. For type "A" the parameters are "VDW A" and "VDW B". For type "B" the parameters are "Well Depth" and "Equilibrium Separation". You must indicate the type of the parameters when intialising the object.

matrix and table must both have the same number or rows. If not an NSInvalidArgumentException is raised. If either matrix or table are nil the cavity centre is set to 0,0,0 and the cavity extremes to 1,1,1 until both are set. isPointInCavity: (AdGridDelegate-p) will return NO until both are set.

Parameters:
matrixA data matrix containing the molecules configuration. The returned object uses a copy of this matrix so if it is mutable any changes will not be reflected by the cavity. You must use setConfiguration: passing the new configuration to change the cavity.
tableData matrix containing the lennard jones parameters for each atom in matrix. The headers of the table columns must indicate their contents.
stringString describing the lennard jones formula to use ("A" or "B"). The parameters in table (or more specifically the column headers) must be compatible with the formula chosen.
factorValueExtends the cavity boundaries by factor times
- (id) initWithSystem: (id)  system
factor: (double)  factorValue 

As initWithConfiguration:vdwParameters:vdwType:factor extracting the configuration, vdw parameters and vdw type from aSystem.

- (id) initWithVdwType: (NSString*)  type

As initWithVdwType:factor: with an factory of 1.0

- (id) initWithVdwType: (NSString*)  string
factor: (double)  factorValue 

As initWithConfiguration:vdwParameters:vdwType:factor passing nil for the configuration and parameters.

- (void) setConfiguration: (AdDataMatrix*)  aMatrix

Sets the molecule configuration. If the vdw parameters have been set matrix must have the same number of rows. If not an NSInvalidArgumentException is raised. Calling this method recalculates the cavity centre and extremes

- (void) setFactor: (double)  value

Sets the cavity factor to value. Calling this method recalculates the cavity centre and extremes.

- (void) setVdwParameters: (AdDataMatrix*)  table

Sets the vdw parameters to be used. If the molecule configuration has been set table must have the same number of rows. If not an NSInvalidArgumentException is raised. Calling this method recalculate the cavity centre and extremes

- (void) setVdwType: (NSString*)  type

Sets the vdw type to be used. Calling this method recalculates the cavity centre and extremes.

- (AdDataMatrix*) vdwParameters

Returns the parameters matrix. This will be a copy of the original matrix passed to the object.

- (NSString*) vdwType

Returns the vdw type.