VanDerWaalsForce Class Reference

#include <VanDerWaalsForce.h>

Inheritance diagram for VanDerWaalsForce:
Implementation

List of all members.

Classes

struct  ForceAndEnergy
class  VdwAtom
struct  WallSphere

Public Types

typedef AtomSubsystem::AtomIndex AtomIndex
typedef Real length_t
typedef Real area_t
typedef Real energy_t
typedef Real inverse_area_t
typedef Vec3 location_t
typedef Vec3 force_t

Public Member Functions

 VanDerWaalsForce (const AtomSubsystem &atomSubsystem, length_t cutoff=0.0 *nanometers)
bool dependsOnlyOnPositions () const
 Get whether this force depends only on the position variables (q), not on the velocies (u) or auxiliary variables (z).
void addAtom (AtomSubsystem::AtomIndex atomIndex, length_t rMin, energy_t wellDepth)
void addBoundarySphere (const location_t &center, length_t radius, length_t vdwRadius, energy_t wellDepth)
void decorateAtoms (DecorationSubsystem &decorations, Real scale=1.0) const
void decorateBoundingSpheres (DecorationSubsystem &decorations) const
void calcForce (const State &state, Vector_< SpatialVec > &bodyForces, Vector_< Vec3 > &particleForces, Vector &mobilityForces) const
 Calculate the force for a given state.
Real calcPotentialEnergy (const State &state) const
 Calculate this force's contribution to the potential energy of the System.

Protected Member Functions

ForceAndEnergy calcForceAndEnergy (const location_t &r, Real dij, Real eij) const
void calcForce (const VdwAtom &vdwAtom1, const VdwAtom &vdwAtom2, const State &state, Vector_< SpatialVec > &bodyForces) const
energy_t calcPotentialEnergy (const VdwAtom &vdwAtom1, const VdwAtom &vdwAtom2, const State &state) const
void calcForce (const WallSphere &sphere, const VdwAtom &vdwAtom2, const State &state, Vector_< SpatialVec > &bodyForces) const
energy_t calcPotentialEnergy (const WallSphere &sphere, const VdwAtom &vdwAtom2, const State &state) const

Protected Attributes

const AtomSubsystematomSubsystem
std::vector< VdwAtomvdwAtoms
length_t cutoff
area_t cutoffSquared
std::vector< WallSpherewallSpheres

Member Typedef Documentation

typedef Real area_t
typedef AtomSubsystem::AtomIndex AtomIndex
typedef Real energy_t
typedef Vec3 force_t
typedef Real inverse_area_t
typedef Real length_t
typedef Vec3 location_t

Constructor & Destructor Documentation

VanDerWaalsForce ( const AtomSubsystem atomSubsystem,
length_t  cutoff = 0.0 * nanometers 
) [inline]

Member Function Documentation

void addAtom ( AtomSubsystem::AtomIndex  atomIndex,
length_t  rMin,
energy_t  wellDepth 
) [inline]
void addBoundarySphere ( const location_t center,
length_t  radius,
length_t  vdwRadius,
energy_t  wellDepth 
) [inline]
void calcForce ( const WallSphere sphere,
const VdwAtom vdwAtom2,
const State state,
Vector_< SpatialVec > &  bodyForces 
) const [inline, protected]
void calcForce ( const VdwAtom vdwAtom1,
const VdwAtom vdwAtom2,
const State state,
Vector_< SpatialVec > &  bodyForces 
) const [inline, protected]
void calcForce ( const State state,
Vector_< SpatialVec > &  bodyForces,
Vector_< Vec3 > &  particleForces,
Vector mobilityForces 
) const [inline, virtual]

Calculate the force for a given state.

Parameters:
state the State for which to calculate the force
bodyForces spatial forces on MobilizedBodies are accumulated in this. To apply a force to a body, add it to the appropriate element of this vector.
particleForces forces on particles are accumulated in this. Since particles are not yet implemented, this is ignored.
mobilityForces forces on individual mobilities (elements of the state's u vector) are accumulated in this. To apply a force to a mobility, add it to the appropriate element of this vector.

Implements Implementation.

References VdwAtom::atomIndex, VanDerWaalsForce::atomSubsystem, VanDerWaalsForce::cutoff, AtomSubsystem::pairBegin(), AtomSubsystem::pairEnd(), VanDerWaalsForce::vdwAtoms, and VanDerWaalsForce::wallSpheres.

ForceAndEnergy calcForceAndEnergy ( const location_t r,
Real  dij,
Real  eij 
) const [inline, protected]
energy_t calcPotentialEnergy ( const WallSphere sphere,
const VdwAtom vdwAtom2,
const State state 
) const [inline, protected]
energy_t calcPotentialEnergy ( const VdwAtom vdwAtom1,
const VdwAtom vdwAtom2,
const State state 
) const [inline, protected]
Real calcPotentialEnergy ( const State state  )  const [inline, virtual]

Calculate this force's contribution to the potential energy of the System.

Parameters:
state the State for which to calculate the potential energy

Implements Implementation.

References VdwAtom::atomIndex, VanDerWaalsForce::atomSubsystem, VanDerWaalsForce::cutoff, SimTK::md::kilojoules_per_mole, AtomSubsystem::pairBegin(), AtomSubsystem::pairEnd(), VanDerWaalsForce::vdwAtoms, and VanDerWaalsForce::wallSpheres.

void decorateAtoms ( DecorationSubsystem decorations,
Real  scale = 1.0 
) const [inline]
void decorateBoundingSpheres ( DecorationSubsystem decorations  )  const [inline]
bool dependsOnlyOnPositions (  )  const [inline, virtual]

Get whether this force depends only on the position variables (q), not on the velocies (u) or auxiliary variables (z).

The default implementation returns false. If the force depends only on positions, you should override this to return true. This allows force calculations to be optimized in some cases.

Reimplemented from Implementation.


Member Data Documentation

const AtomSubsystem& atomSubsystem [protected]
length_t cutoff [protected]
area_t cutoffSquared [protected]
std::vector<VdwAtom> vdwAtoms [protected]
std::vector<WallSphere> wallSpheres [protected]

The documentation for this class was generated from the following file:

Generated on Thu Aug 12 16:37:57 2010 for SimTKcore by  doxygen 1.6.1