OpenMPCD
|
A generalization of the Weeks-Chandler-Andersen (WCA) potential. More...
#include <WeeksChandlerAndersen_DistanceOffset.hpp>
Public Member Functions | |
OPENMPCD_CUDA_HOST_AND_DEVICE | WeeksChandlerAndersen_DistanceOffset (const T epsilon, const T sigma, const T d) |
The constructor. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE Vector3D< T > | force (const Vector3D< T > &R) const |
Returns the force vector of the interaction for a given position vector. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | potential (const Vector3D< T > &R) const |
Returns the potential of the interaction for a given position vector. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | getEpsilon () const |
Returns the \( \epsilon \) parameter. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | getSigma () const |
Returns the \( \sigma \) parameter. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | getD () const |
Returns the \( D \) parameter. More... | |
virtual OPENMPCD_CUDA_HOST_AND_DEVICE Vector3D< FP > | force (const Vector3D< FP > &Rvec) const=0 |
Returns the force vector of the interaction for a given position vector. More... | |
virtual OPENMPCD_CUDA_HOST_AND_DEVICE FP | potential (const Vector3D< FP > &Rvec) const=0 |
Returns the potential of the interaction for a given position vector. More... | |
const OPENMPCD_CUDA_HOST_AND_DEVICE Vector3D< FP > | forceOnR1DueToR2 (const Vector3D< FP > &r1, const Vector3D< FP > &r2) const |
Returns the force exerted on the particle at r1 due to the particle at r2 . More... | |
A generalization of the Weeks-Chandler-Andersen (WCA) potential.
The Weeks-Chandler-Andersen potential has been introduced by Weeks, Chandler, and Andersen, in J. Chem. Phys. 54, 5237 (1971). DOI: 10.1063/1.1674820
This generalization introduces an offset \( D \) of the particle distance \( r \). With \( \epsilon \) and \( sigma \) being parameters, the interaction potential is given by
\[ 4 * \epsilon * \left( \left( \frac{ \sigma }{ r - D } \right)^{12} - \left( \frac{ \sigma }{ r - D } \right)^{6} + \frac{ 1 }{ 4 } \right) * \theta \left( 2^{1/6} \sigma - r + D \right) \]
with \( \theta \left( x \right) \) being the Heaviside step function, which is \( 1 \) if \( x > 0 \), and \( 0 \) otherwise.
Definition at line 39 of file WeeksChandlerAndersen_DistanceOffset.hpp.
|
inline |
The constructor.
OpenMPCD::AssertionException | If OPENMPCD_DEBUG is defined, throws if either epsilon < 0 , sigma < 0 , or d < 0 . |
[in] | epsilon | The \( \epsilon \) parameter. |
[in] | sigma | The \( \sigma \) parameter. |
[in] | d | The \( D \) parameter. |
Definition at line 54 of file WeeksChandlerAndersen_DistanceOffset.hpp.
|
pure virtualinherited |
Returns the force vector of the interaction for a given position vector.
This function returns the directional derivative
\[ - \nabla_R V \left( \vec{R} \right) \]
where \( \vec{R} \) is the Rvec
parameter, \( V \) is the potential as given by the potential
function, and \( \nabla_R V \) is the gradient of \( V \) with respect to \( \vec{R} \).
[in] | Rvec | The relative position vector. |
|
inline |
Returns the force vector of the interaction for a given position vector.
This function returns the directional derivative
\[ - \nabla_R V \left( \vec{R} \right) \]
where \( \vec{R} \) is the R
parameter, \( V \) is the potential as given by the potential
function, and \( \nabla_R V \) is the gradient of \( V \) with respect to \( \vec{R} \).
OpenMPCD::AssertionException | If OPENMPCD_DEBUG is defined, throws if R.getMagnitudeSquared() - d * d <= 0 . |
[in] | R | The relative position vector. |
Definition at line 79 of file WeeksChandlerAndersen_DistanceOffset.hpp.
|
inlineinherited |
Returns the force exerted on the particle at r1
due to the particle at r2
.
[in] | r1 | The position of the first particle. |
[in] | r2 | The position of the second particle. |
Definition at line 65 of file PairPotentials/Base.hpp.
|
inline |
Returns the \( D \) parameter.
Definition at line 157 of file WeeksChandlerAndersen_DistanceOffset.hpp.
|
inline |
Returns the \( \epsilon \) parameter.
Definition at line 139 of file WeeksChandlerAndersen_DistanceOffset.hpp.
|
inline |
Returns the \( \sigma \) parameter.
Definition at line 148 of file WeeksChandlerAndersen_DistanceOffset.hpp.
|
pure virtualinherited |
Returns the potential of the interaction for a given position vector.
[in] | Rvec | The relative position vector. |
|
inline |
Returns the potential of the interaction for a given position vector.
OpenMPCD::AssertionException | If OPENMPCD_DEBUG is defined, throws if R.getMagnitudeSquared() - d * d <= 0 . |
[in] | R | The relative position vector. |
Definition at line 112 of file WeeksChandlerAndersen_DistanceOffset.hpp.