This is the internal implementation of NonbondedForce. More...
#include <NonbondedForceImpl.h>
Public Member Functions | |
NonbondedForceImpl (NonbondedForce &owner) | |
~NonbondedForceImpl () | |
void | initialize (ContextImpl &context) |
This is called after the ForceImpl is created and before updateContextState(), calcForces(), or calcEnergy() is called on it. | |
NonbondedForce & | getOwner () |
Get the Force object from which this ForceImpl was created. | |
void | updateContextState (ContextImpl &context) |
This method is called at the beginning of each time step. | |
void | calcForces (ContextImpl &context) |
Calculate the force on each particle generated by this ForceImpl. | |
double | calcEnergy (ContextImpl &context) |
Calculate this ForceImpl's contribution to the potential energy of the system. | |
std::map< std::string, double > | getDefaultParameters () |
Get a map containing the default values for all adjustable parameters defined by this ForceImpl. | |
std::vector< std::string > | getKernelNames () |
Get the names of all Kernels used by this Force. | |
Static Public Member Functions | |
static void | calcEwaldParameters (const System &system, const NonbondedForce &force, double &alpha, int &kmaxx, int &kmaxy, int &kmaxz) |
This is a utility routine that calculates the values to use for alpha and kmax when using Ewald summation. | |
static void | calcPMEParameters (const System &system, const NonbondedForce &force, double &alpha, int &xsize, int &ysize, int &zsize) |
This is a utility routine that calculates the values to use for alpha and grid size when using Particle Mesh Ewald. |
This is the internal implementation of NonbondedForce.
NonbondedForceImpl | ( | NonbondedForce & | owner | ) |
~NonbondedForceImpl | ( | ) |
double calcEnergy | ( | ContextImpl & | context | ) | [virtual] |
Calculate this ForceImpl's contribution to the potential energy of the system.
context | the context in which the system is being simulated |
Implements ForceImpl.
static void calcEwaldParameters | ( | const System & | system, | |
const NonbondedForce & | force, | |||
double & | alpha, | |||
int & | kmaxx, | |||
int & | kmaxy, | |||
int & | kmaxz | |||
) | [static] |
This is a utility routine that calculates the values to use for alpha and kmax when using Ewald summation.
void calcForces | ( | ContextImpl & | context | ) | [virtual] |
Calculate the force on each particle generated by this ForceImpl.
The forces should be added to the values already present in the array that is passed in. If this ForceImpl does not generate any new forces, it should simply return without modifying the array.
context | the context in which the system is being simulated | |
forces | new forces should be added to the value already stored in this |
Implements ForceImpl.
static void calcPMEParameters | ( | const System & | system, | |
const NonbondedForce & | force, | |||
double & | alpha, | |||
int & | xsize, | |||
int & | ysize, | |||
int & | zsize | |||
) | [static] |
This is a utility routine that calculates the values to use for alpha and grid size when using Particle Mesh Ewald.
std::map<std::string, double> getDefaultParameters | ( | ) | [inline, virtual] |
std::vector<std::string> getKernelNames | ( | ) | [virtual] |
NonbondedForce& getOwner | ( | ) | [inline, virtual] |
void initialize | ( | ContextImpl & | context | ) | [virtual] |
This is called after the ForceImpl is created and before updateContextState(), calcForces(), or calcEnergy() is called on it.
This allows it to do any necessary initialization.
Implements ForceImpl.
void updateContextState | ( | ContextImpl & | context | ) | [inline, virtual] |
This method is called at the beginning of each time step.
It give the ForceImpl a chance to modify the state variables (positions, velocities, and parameters) stored in the Context in arbitrary ways before integration is performed.
context | the context in which the system is being simulated |
Implements ForceImpl.