Main Page | Class List | File List | Class Members | File Members

fparam.h File Reference

Force field parameters container class. More...

#include <float.h>
#include "mdapi/mdtypes.h"

Go to the source code of this file.

Classes

struct  ForceParam_t
 Used to configure Force_t class. More...

Defines

#define FORCE_DEFAULT_SHELL_WIDTH   3
#define FORCE_DEFAULT_CUTOFF_RATIO   (1./FORCE_DEFAULT_SHELL_WIDTH)
#define FORCE_DEFAULT_CELL_MARGIN   FLT_EPSILON
#define FORCE_DEFAULT_PAIRLIST_DELTA_DIS   0.75
#define FORCE_DEFAULT_GRIDCELL_DELTA_DIS   0.0

Typedefs

typedef ForceParam_t ForceParam
 Used to configure Force_t class.

Enumerations

enum  ForceTypes_t {
  FORCE_NONE = 0x0000, FORCE_BOND = 0x0001, FORCE_ANGLE = 0x0002, FORCE_DIHED = 0x0004,
  FORCE_IMPR = 0x0008, FORCE_ELEC = 0x0010, FORCE_VDW = 0x0020, FORCE_BRES = 0x0040,
  FORCE_BONDED = FORCE_BOND | FORCE_ANGLE | FORCE_DIHED | FORCE_IMPR, FORCE_PAIRWISE = FORCE_ELEC | FORCE_VDW, FORCE_NONBONDED = FORCE_PAIRWISE | FORCE_BRES, FORCE_ALL = FORCE_BONDED | FORCE_NONBONDED
}
 Types used for setting ForceParam_t::forcetype. The individual values are to be bitwise ORed together to select the types of forces to be computed. More...
enum  ForceExcl_t {
  FORCE_EXCL_NONE = 0x001, FORCE_EXCL_12, FORCE_EXCL_13, FORCE_EXCL_14,
  FORCE_EXCL_SCAL14, FORCE_MARKER_EXCL
}
enum  ForceElec_t {
  FORCE_ELEC_DIRECT = 0x001, FORCE_ELEC_GRIDCELLS = 0x002, FORCE_ELEC_PAIRLISTS = 0x004, FORCE_ELEC_STNDEXCL = 0x008,
  FORCE_ELEC_STANDARD = 0x010, FORCE_ELEC_SHIFTED = 0x020, FORCE_ELEC_EWALD = 0x040, FORCE_ELEC_GLASS = 0x080,
  FORCE_MASK_ELEC_METHOD = 0x00f, FORCE_MASK_ELEC_POTENTIAL = 0x0f0, FORCE_ELECOPTS_DIRECT = FORCE_ELEC_DIRECT | FORCE_ELEC_STANDARD, FORCE_ELECOPTS_CUTOFF = FORCE_ELEC_GRIDCELLS | FORCE_ELEC_SHIFTED,
  FORCE_ELECOPTS_LONGRNG = FORCE_ELEC_STNDEXCL
}
enum  ForceVdw_t {
  FORCE_VDW_DIRECT = 0x0001, FORCE_VDW_GRIDCELLS = 0x0002, FORCE_VDW_PAIRLISTS = 0x004, FORCE_VDW_STNDEXCL = 0x0008,
  FORCE_VDW_STANDARD = 0x0010, FORCE_VDW_SWITCHED = 0x0020, FORCE_VDW_BUCK = 0x0040, FORCE_VDW_SWITCHBUCK = 0x0080,
  FORCE_VDW_BUCKND = 0x0100, FORCE_VDW_SWITCHBUCKND = 0x0200, FORCE_VDW_BUCKSAFE = 0x0400, FORCE_VDW_SWITCHBUCKSAFE = 0x0800,
  FORCE_VDW_GLASS = 0x1000, FORCE_VDW_BUCKPRM_BKS = 0x10000, FORCE_VDW_BUCKPRM_TTAM = 0x20000, FORCE_VDW_BUCKPRM_FB = 0x40000,
  FORCE_VDW_GLASSPRM = 0x80000, FORCE_MASK_VDW_METHOD = 0x000f, FORCE_MASK_VDW_POTENTIAL = 0x1ff0, FORCE_MASK_VDW_BUCK = 0x1fc0,
  FORCE_MASK_VDW_BUCKPRM = 0xf0000, FORCE_VDWOPTS_DIRECT = FORCE_VDW_DIRECT | FORCE_VDW_STANDARD, FORCE_VDWOPTS_CUTOFF = FORCE_VDW_GRIDCELLS | FORCE_VDW_SWITCHED, FORCE_VDWOPTS_LONGRNG = FORCE_VDW_STNDEXCL
}
enum  ForceBrestype_t {
  FORCE_BRES_SPHERE = 0x001, FORCE_BRES_X_CYLINDER, FORCE_BRES_Y_CYLINDER, FORCE_BRES_Z_CYLINDER,
  FORCE_MARKER_BRES
}

Functions

ForceParamforce_param_create (void)
 Constructor.
void force_param_destroy (ForceParam *)
 Destructor.
int force_param_initialize (ForceParam *)
 Alternative constructor.
void force_param_cleanup (ForceParam *)
 Alternative destructor.


Detailed Description

Force field parameters container class.

Author:
David J. Hardy
Date:
2004-2006
The ForceParam_t container class specifies the force field parameters that define how the force will be computed. It is used to construct the Force_t object.

Typedef Documentation

typedef struct ForceParam_t ForceParam
 

Used to configure Force_t class.

User sets the internal fields of this class in order to configure the evaluation performed by the Force_t class. The contents of the ForceParam_t container are intended to be setup once before constructing the Force_t object, then treated as read-only data.

The user provides and retains ownership of memory buffer space for all arrays. The force field parameter and topology arrays all follow the MDAPI guidelines as defined by mdtypes.h file. In particular, it is expected that the proper cross-indexing between topology and force field parameter arrays have been established. The best way to do this is to use the MDIO library for reading the relevant force field parameter and topology files.

The parameter ForceParam_t::atom_len indicates the number of atoms in the system, providing the expected array length of the ForceResult_t force arrays and the pos array passed to force_create() and force_compute().

The boundary restraint and nonbonded parameters follow the NAMD conventions, as described in its documentation.

The field ForceParam_t::forcetype specifies what parts of the force field are to be evaluated. It is assigned a bitwise ORed collection of ForceType_t constants.

The remaining fields ForceParam_t::excltype, ForceParam_t::electype, ForceParam_t::vdwtype, and ForceParam_t::brestype are each assigned a single value from respective enumerated types ForceExcltype_t, ForceElectype_t, ForceVdwtype_t, and ForceBrestype_t. These, respectively, indicate which type of interactions are to be excluded, the type and smoothing of electrostatic interactions, the type and switching of van der Waals interactions, and the type of boundary restraints.


Enumeration Type Documentation

enum ForceBrestype_t
 

Enumeration values:
FORCE_BRES_SPHERE  Use spherical boundary restraints.
FORCE_BRES_X_CYLINDER  Use cylindrical boundary restraints with axis aligned in x-direction.
FORCE_BRES_Y_CYLINDER  Use cylindrical boundary restraints with axis aligned in y-direction.
FORCE_BRES_Z_CYLINDER  Use cylindrical boundary restraints with axis aligned in z-direction.
FORCE_MARKER_BRES  (internal use) Marks end of boundary restraint options.

enum ForceElec_t
 

Enumeration values:
FORCE_ELEC_DIRECT  Perform direct evaluation of electrostatic interactions.
(Should be used only on small systems or for testing.)
FORCE_ELEC_GRIDCELLS  Pairs interact only within cutoff distance.
FORCE_ELEC_PAIRLISTS  Use pairlists to evaluate cutoff pairwise potentials.
FORCE_ELEC_STNDEXCL  Evaluate exclusions using standard potential, even if this differs from the chosen potential. (This is needed for use with long-range electrostatic solvers, where the short-range part uses a special pair potential, but it is still necessary to subtract exact exclusions.) Note that this can be chosen with another method.
FORCE_ELEC_STANDARD  The standard 1/r electrostatic potential.
FORCE_ELEC_SHIFTED  Multiply 1/r potential by shifting function for smooth cutoff.
(This is commonly used for cutoff simulations.)
FORCE_ELEC_EWALD  Compute Ewald real space potential.
(Use this for Ewald or PME simulations.)
FORCE_MASK_ELEC_METHOD  (internal use) Mask for electrostatic method.
FORCE_MASK_ELEC_POTENTIAL  (internal use) Mask for electrostatic potential.
FORCE_ELECOPTS_DIRECT  Typical settings for direct evaluation of electrostatics.
FORCE_ELECOPTS_CUTOFF  Typical settings for cutoff evaluation of electrostatics.
FORCE_ELECOPTS_LONGRNG  Typical settings for subtracting electrostatic exclusions only and evaluating full electrostatics using an external solver.

enum ForceExcl_t
 

Enumeration values:
FORCE_EXCL_NONE  (The following options for ForceParam_t::excltype are mutually exclusive.)
Do not exclude any nonbonded pairs except for those indicated explicitly within the ForceParam_t::excl array.
FORCE_EXCL_12  Exclude 1-2 interactions (atoms joined by spring bond).
FORCE_EXCL_13  Exclude 1-3 interactions (atoms joined by pair of spring bonds), which includes all angles.
FORCE_EXCL_14  Exclude 1-4 interactions (atoms joined by trio of spring bonds), which includes all dihedrals and impropers.
FORCE_EXCL_SCAL14  Exclude 1-3 interactions but redefine 1-4 interactions using alternate van der Waals parameters and electrostatic 1-4 scaling constant.
(This is the commonly used standard for modern systems.)
FORCE_MARKER_EXCL  (internal use) Marks end of exclusion policy options.

enum ForceTypes_t
 

Types used for setting ForceParam_t::forcetype. The individual values are to be bitwise ORed together to select the types of forces to be computed.

Enumeration values:
FORCE_NONE  (The following flags for ForceParam_t::forcetypes should be bitwise ORed together.)
(no forces)
FORCE_BOND  Indicates evaluation of spring bond interactions.
FORCE_ANGLE  Indicates evaluation of angle interactions.
FORCE_DIHED  Indicates evaluation of dihedral interactions.
FORCE_IMPR  Indicates evaluation of improper interactions.
FORCE_ELEC  Indicates evaluation of electrostatic interactions.
FORCE_VDW  Indicates evaluation of van der Waals interactions.
FORCE_BRES  Indicates evaluation of boundary restraint forces.
FORCE_BONDED  Collection of flags: evaluate all types of bonded interactions.
FORCE_PAIRWISE  Collection of flags: evaluate all types of pairwise interactions.
FORCE_NONBONDED  Collection of flags: evaluate all types of nonbonded interactions.
FORCE_ALL  Collection of flags: evaluate all types of bonded and nonbonded interactions.

enum ForceVdw_t
 

Enumeration values:
FORCE_VDW_DIRECT  Perform direct evaluation of van der Waals interactions.
(Should be used only on small systems or for testing.)
FORCE_VDW_GRIDCELLS  Pairs interact only within cutoff distance.
FORCE_VDW_PAIRLISTS  Use pairlists to evaluate cutoff pairwise potentials.
FORCE_VDW_STNDEXCL  Evaluate exclusions using standard potential, even if this differs from the chosen potential. (This is needed for use with long-range van der Waals solvers, where the short-range part uses a special pair potential, but it is still necessary to subtract exact exclusions.) Note that this can be chosen with another method.
FORCE_VDW_STANDARD  The standard van der Waals potential.
FORCE_VDW_SWITCHED  Apply switching function for continuous force.
(This is commonly used for cutoff simulations.)
FORCE_VDW_BUCK  Use Buckingham potential for silica (instead of van der Waals).
FORCE_VDW_SWITCHBUCK  Use Buckingham potential for silica along with switching function for continuous force (instead of van der Waals).
FORCE_VDW_BUCKND  Use Buckingham without dispersion term potential for silica (instead of van der Waals).
FORCE_VDW_SWITCHBUCKND  Use Buckingham without dispersion term potential for silica along with switching function for continuous force (instead of van der Waals).
FORCE_VDW_BUCKSAFE  Use this instead of FORCE_VDW_BUCK for energy minimization, as it gets rid of the attractive well.
FORCE_VDW_SWITCHBUCKSAFE  Use this instead of FORCE_VDW_SWITCHBUCK for energy minimization, as it gets rid of the attractive well.
FORCE_VDW_BUCKPRM_BKS  Select BKS parameterization for silica.
FORCE_VDW_BUCKPRM_TTAM  Select TTAM parameterization for silica.
FORCE_VDW_BUCKPRM_FB  Select FB parameterization for silica.
FORCE_MASK_VDW_METHOD  (internal use) Mask for van der Waals method.
FORCE_MASK_VDW_POTENTIAL  (internal use) Mask for van der Waals potential.
FORCE_MASK_VDW_BUCK  (internal use) Mask to check for Buckingham potential.
FORCE_MASK_VDW_BUCKPRM  (internal use) Mask to check for Buckingham potential parameterization.
FORCE_VDWOPTS_DIRECT  Typical settings for direct evaluation of van der Waals.
FORCE_VDWOPTS_CUTOFF  Typical settings for cutoff evaluation of van der Waals.
FORCE_VDWOPTS_LONGRNG  Typical settings for subtracting van der Waals exclusions only and evaluating full van der Waals using an external solver.


Function Documentation

void force_param_cleanup ForceParam  ) 
 

Alternative destructor.

Use this to destroy a preallocated ForceParam_t object. Resets the memory of the object.

ForceParam* force_param_create void   ) 
 

Constructor.

Creates dynamically allocated ForceParam_t force field parameter container object used to configure the Force_t class. The force field parameters memory is cleared.

Returns:
Pointer to ForceParam_t object or NULL if memory allocation fails.

void force_param_destroy ForceParam  ) 
 

Destructor.

Clears memory and destroys the dynamically allocated ForceParam_t object. Call when finished using ForceParam_t object.

int force_param_initialize ForceParam  ) 
 

Alternative constructor.

Use this to construct a preallocated ForceParam_t object. Clears the force field parameter memory.

Returns:
0 for success (does not fail)


Generated on Thu Feb 7 18:11:41 2008 for MDX by  doxygen 1.3.9.1