1 #ifndef OPENMPCD_PAIRPOTENTIALS_MORSE_HPP
2 #define OPENMPCD_PAIRPOTENTIALS_MORSE_HPP
4 #include <OpenMPCD/PairPotentials/Base.hpp>
8 namespace PairPotentials
17 template<
typename T = FP>
29 Morse(
const T eps,
const T alpha,
const T sigma,
const T shift)
30 : epsilon(eps), alpha(alpha), sigma(sigma), shift(shift)
49 return (-1)*epsilon * ((-2)*alpha*exp( -2*alpha*(r - sigma) ) + 2*alpha*exp( (-1)*alpha*(r-sigma) ))*R.
getNormalized();
61 (exp( -2*alpha*(r - sigma) )
62 - 2 * exp( (-1)*alpha*(r-sigma)))
75 #endif //OPENMPCD_PAIRPOTENTIALS_MORSE_HPP
#define OPENMPCD_CUDA_HOST_AND_DEVICE
Denotes a function to be callable both from the Host and from a CUDA Device.
OPENMPCD_CUDA_HOST_AND_DEVICE Morse(const T eps, const T alpha, const T sigma, const T shift)
The constructor.
const OPENMPCD_CUDA_HOST_AND_DEVICE Vector3D getNormalized() const
Returns this vector, but normalized.
Abstract base class for pair potentials.
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.
OPENMPCD_CUDA_HOST_AND_DEVICE RealType getMagnitude() const
Returns the magnitude of this vector.
OPENMPCD_CUDA_HOST_AND_DEVICE T potential(const Vector3D< T > &R) const
Returns the potential of the interaction for a given position vector.