glotzmd::TwelveSixLjPotential Class Reference
[Molecular Dynamics]

implements the famous 12-6 Lennard-Jones (LJ) potential More...

#include <TwelveSixLjPotential.h>

Inheritance diagram for glotzmd::TwelveSixLjPotential:

glotzmd::Potential glotzmd::BaseObject glotzutil::Listable glotzutil::Serializable glotzmd::WcaPotential

List of all members.

Public Member Functions

 TwelveSixLjPotential ()
 TwelveSixLjPotential (glotz_flt)
 TwelveSixLjPotential (const TwelveSixLjPotential &)
virtual
TwelveSixLjPotential
Clone ()
 Clone constructor.
virtual ~TwelveSixLjPotential ()
 _DeclareSerializable (TwelveSixLjPotential)
void Serialize (glotzutil::Archive &)
void Initialize ()
void ComputeForce (InteractingObject *const, InteractingObject *const, const glotz_vec &, const glotz_flt)
 Compute the force between two interacting objects.
void ComputeShiftedForce (InteractingObject *const, InteractingObject *const, const glotz_vec &, const glotz_flt, const glotz_flt)
 Compute the force between two interacting objects where the interaction is shifted from the object surface.
void SetEpsilon (const glotz_flt)
void SetSigma (const glotz_flt)
void SetCutoff (const glotz_flt)
glotz_flt GetEpsilon () const
glotz_flt GetSigma () const
glotz_flt GetCutoff () const
 Gets the interaction cutoff.
glotz_flt GetOverlapCutoff () const
 Gets the overlap cutoff.
glotz_flt GetForceShift () const
glotz_flt GetPotentialShift () const

Protected Attributes

glotz_flt mEpsilon
glotz_flt mSigma
glotz_flt mCutoff
glotz_flt mFshift
glotz_flt mPshift
glotz_flt mSigma6f
glotz_flt mSigma12f
glotz_flt mSigma6
glotz_flt mSigma12
glotz_flt mCutoffSq


Detailed Description

implements the famous 12-6 Lennard-Jones (LJ) potential

Author:
Aaron Keys

Tony Sheh

The Lennard-Jones potential (LJ) is used to model the excluded volume interactions and van der Waals interaction attraction of neutral atoms. For computational efficiency, the potential is truncated and shifted to zero using the following formula:

\[ U_{LJ}(r) = \begin{cases} 4\varepsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - \left(\frac{\sigma}{r}\right)^{6} \right] - 4\varepsilon \left[ \left(\frac{\sigma}{r_c}\right)^{12} - \left(\frac{\sigma}{r_c}\right)^{6} \right] &r<r_c \\ 0 & r \geq r_c \end{cases} \]

For more information, see http://matdl.org/matdlwiki/index.php/softmatter:Lennard-Jones_Potential


Constructor & Destructor Documentation

glotzmd::TwelveSixLjPotential::TwelveSixLjPotential (  ) 

glotzmd::TwelveSixLjPotential::TwelveSixLjPotential ( glotz_flt  epsilon  ) 

glotzmd::TwelveSixLjPotential::TwelveSixLjPotential ( const TwelveSixLjPotential rhs  ) 

virtual glotzmd::TwelveSixLjPotential::~TwelveSixLjPotential (  )  [inline, virtual]


Member Function Documentation

TwelveSixLjPotential * glotzmd::TwelveSixLjPotential::Clone (  )  [virtual]

Clone constructor.

Reimplemented from glotzmd::Potential.

Reimplemented in glotzmd::WcaPotential.

glotzmd::TwelveSixLjPotential::_DeclareSerializable ( TwelveSixLjPotential   ) 

void glotzmd::TwelveSixLjPotential::Serialize ( glotzutil::Archive ar  )  [virtual]

Reimplemented from glotzmd::Potential.

void glotzmd::TwelveSixLjPotential::Initialize (  ) 

void glotzmd::TwelveSixLjPotential::ComputeForce ( InteractingObject * const  obj1,
InteractingObject * const  obj2,
const glotz_vec rij,
const   glotz_flt 
) [inline, virtual]

Compute the force between two interacting objects.

Parameters:
obj1 is a pointer to one object
obj2 is a pointer to another object
rij is the vector connecting the two objects
r2 is the squared distance between the two objects

Implements glotzmd::Potential.

void glotzmd::TwelveSixLjPotential::ComputeShiftedForce ( InteractingObject * const  obj1,
InteractingObject * const  obj2,
const glotz_vec rij,
const   glotz_flt,
const   glotz_flt 
) [inline, virtual]

Compute the force between two interacting objects where the interaction is shifted from the object surface.

Parameters:
obj1 is a pointer to one object
obj2 is a pointer to another object
rij is the vector connecting the two objects
r2 is the squared distance between the two objects
shift is the contribution of the shift to the distance between objects

Implements glotzmd::Potential.

void glotzmd::TwelveSixLjPotential::SetEpsilon ( const   glotz_flt  ) 

void glotzmd::TwelveSixLjPotential::SetSigma ( const   glotz_flt  ) 

Reimplemented in glotzmd::WcaPotential.

void glotzmd::TwelveSixLjPotential::SetCutoff ( const   glotz_flt  ) 

Reimplemented in glotzmd::WcaPotential.

glotz_flt glotzmd::TwelveSixLjPotential::GetEpsilon (  )  const

glotz_flt glotzmd::TwelveSixLjPotential::GetSigma (  )  const

glotz_flt glotzmd::TwelveSixLjPotential::GetCutoff (  )  const [virtual]

Gets the interaction cutoff.

Returns:
the potential cutoff
Note:
if no cutoff is defined by the inherited potential default the cutoff is 1e6

Reimplemented from glotzmd::Potential.

glotz_flt glotzmd::TwelveSixLjPotential::GetOverlapCutoff (  )  const [virtual]

Gets the overlap cutoff.

This function is used in interpolation

Returns:
the overlap cutoff
Note:
if no overlap cutoff is defined, will return 0.0.

Reimplemented from glotzmd::Potential.

glotz_flt glotzmd::TwelveSixLjPotential::GetForceShift (  )  const

glotz_flt glotzmd::TwelveSixLjPotential::GetPotentialShift (  )  const


Member Data Documentation

glotz_flt glotzmd::TwelveSixLjPotential::mEpsilon [protected]

glotz_flt glotzmd::TwelveSixLjPotential::mSigma [protected]

glotz_flt glotzmd::TwelveSixLjPotential::mCutoff [protected]

glotz_flt glotzmd::TwelveSixLjPotential::mFshift [protected]

glotz_flt glotzmd::TwelveSixLjPotential::mPshift [protected]

glotz_flt glotzmd::TwelveSixLjPotential::mSigma6f [protected]

glotz_flt glotzmd::TwelveSixLjPotential::mSigma12f [protected]

glotz_flt glotzmd::TwelveSixLjPotential::mSigma6 [protected]

glotz_flt glotzmd::TwelveSixLjPotential::mSigma12 [protected]

glotz_flt glotzmd::TwelveSixLjPotential::mCutoffSq [protected]


The documentation for this class was generated from the following files:
Generated on Tue Feb 24 20:54:33 2009 by  doxygen 1.5.3