OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
OpenMD::ObjectRestraint Class Reference

ObjectRestraint is the basic harmonic restraint for the degrees of freedom of a StuntDouble. More...

#include <ObjectRestraint.hpp>

+ Inheritance diagram for OpenMD::ObjectRestraint:

Public Member Functions

void setReferenceStructure (Vector3d refPos)
 
void setReferenceStructure (Vector3d refPos, RotMat3x3d refA)
 
Vector3d getReferenceStructure ()
 
void calcForce (Vector3d struc)
 
void calcForce (Vector3d struc, RotMat3x3d A)
 
Vector3d getRestraintForce ()
 
Vector3d getRestraintTorque ()
 
- Public Member Functions inherited from OpenMD::Restraint
void calcForce ()
 
void setReferenceStructure ()
 
RealType getUnscaledPotential ()
 
RealType getPotential ()
 
void setRestraintName (std::string name)
 
std::string getRestraintName ()
 
int getRestraintType ()
 Returns the restraint type

 
void setRestraintType (int restType)
 Sets the restraint type

 
void setScaleFactor (RealType sf)
 
void setDisplacementForceConstant (RealType kDisp)
 
void setAbsoluteForceConstant (RealType kAbs)
 
void setTwistForceConstant (RealType kTwist)
 
void setSwingXForceConstant (RealType kSwingX)
 
void setSwingYForceConstant (RealType kSwingY)
 
void setAbsolutePositionZ (RealType z0)
 
void setRestrainedTwistAngle (RealType twist0)
 
void setRestrainedSwingXAngle (RealType swingX0)
 
void setRestrainedSwingYAngle (RealType swingY0)
 
void setPrintRestraint (bool printRest)
 
RealType getDisplacementForceConstant ()
 
RealType getAbsoluteForceConstant ()
 
RealType getAbsolutePositionZ ()
 
RealType getTwistForceConstant ()
 
RealType getSwingXForceConstant ()
 
RealType getSwingYForceConstant ()
 
RealType getRestrainedTwistAngle ()
 
RealType getRestrainedSwingXAngle ()
 
RealType getRestrainedSwingYAngle ()
 
std::map< int, RealPair > getRestraintInfo ()
 
bool getPrintRestraint ()
 

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_
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ObjectRestraint()

OpenMD::ObjectRestraint::ObjectRestraint ( )
inline

Definition at line 66 of file ObjectRestraint.hpp.

Member Function Documentation

◆ calcForce() [1/2]

void OpenMD::ObjectRestraint::calcForce ( Vector3d struc)

Definition at line 49 of file ObjectRestraint.cpp.

◆ calcForce() [2/2]

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().

◆ getReferenceStructure()

Vector3d OpenMD::ObjectRestraint::getReferenceStructure ( )
inline

Definition at line 75 of file ObjectRestraint.hpp.

◆ getRestraintForce()

Vector3d OpenMD::ObjectRestraint::getRestraintForce ( )
inline

Definition at line 80 of file ObjectRestraint.hpp.

◆ getRestraintTorque()

Vector3d OpenMD::ObjectRestraint::getRestraintTorque ( )
inline

Definition at line 81 of file ObjectRestraint.hpp.

◆ setReferenceStructure() [1/2]

void OpenMD::ObjectRestraint::setReferenceStructure ( Vector3d refPos)
inline

Definition at line 68 of file ObjectRestraint.hpp.

◆ setReferenceStructure() [2/2]

void OpenMD::ObjectRestraint::setReferenceStructure ( Vector3d refPos,
RotMat3x3d refA )
inline

Definition at line 70 of file ObjectRestraint.hpp.


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