OpenMD 3.1
Molecular Dynamics in the Open
|
ObjectRestraint is the basic harmonic restraint for the degrees of freedom of a StuntDouble. More...
#include <ObjectRestraint.hpp>
Additional Inherited Members | |
Public Types inherited from OpenMD::Restraint | |
enum | { rtDisplacement = 1 , rtAbsoluteZ = 2 , rtTwist = 4 , rtSwingX = 8 , rtSwingY = 16 } |
using | RealPair = std::pair<RealType, RealType> |
Protected Attributes inherited from OpenMD::Restraint | |
RealType | scaleFactor_ |
RealType | kDisp_ |
RealType | kAbs_ |
RealType | kTwist_ |
RealType | kSwingX_ |
RealType | kSwingY_ |
RealType | pot_ |
RealType | twist0_ |
RealType | swingX0_ |
RealType | swingY0_ |
RealType | posZ0_ |
bool | printRest_ |
int | restType_ |
std::string | restName_ |
std::map< int, RealPair > | restInfo_ |
ObjectRestraint is the basic harmonic restraint for the degrees of freedom of a StuntDouble.
In the ideal structure:
k_[twist,swing] are the two spring constants of the restraining potential
Definition at line 64 of file ObjectRestraint.hpp.
|
inline |
Definition at line 66 of file ObjectRestraint.hpp.
void OpenMD::ObjectRestraint::calcForce | ( | Vector3d | struc | ) |
Definition at line 49 of file ObjectRestraint.cpp.
void OpenMD::ObjectRestraint::calcForce | ( | Vector3d | struc, |
RotMat3x3d | A ) |
RealType dVdtwist = kTwist_ * sin(dTwist); p = kTwist_ * (1.0 - cos(dTwist) );
RealType dVdswingX = kSwingX_ * 0.5 * sin(2.0 * dSwingX); p = 0.25 * kSwingX_ * (1.0 - cos(2.0 * dSwingX));
RealType dVdswingY = kSwingY_ * 0.5 * sin(2.0 * dSwingY); p = 0.25 * kSwingY_ * (1.0 - cos(2.0 * dSwingY));
Definition at line 75 of file ObjectRestraint.cpp.
References OpenMD::SquareMatrix3< Real >::toQuaternion().
|
inline |
Definition at line 75 of file ObjectRestraint.hpp.
|
inline |
Definition at line 80 of file ObjectRestraint.hpp.
|
inline |
Definition at line 81 of file ObjectRestraint.hpp.
|
inline |
Definition at line 68 of file ObjectRestraint.hpp.
|
inline |
Definition at line 70 of file ObjectRestraint.hpp.