|
OpenMD 3.2
Molecular Dynamics in the Open
|
ObjectRestraint is the basic harmonic restraint for the degrees of freedom of a StuntDouble. More...
#include <ObjectRestraint.hpp>
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 | setDisplacementXForceConstant (RealType kDisp) |
| void | setDisplacementYForceConstant (RealType kDisp) |
| void | setDisplacementZForceConstant (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 | getDisplacementXForceConstant () |
| RealType | getDisplacementYForceConstant () |
| RealType | getDisplacementZForceConstant () |
| 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 , rtDisplacementX = 2 , rtDisplacementY = 4 , rtDisplacementZ = 8 , rtAbsoluteZ = 16 , rtTwist = 32 , rtSwingX = 64 , rtSwingY = 128 } |
| using | RealPair = std::pair<RealType, RealType> |
| Protected Attributes inherited from OpenMD::Restraint | |
| RealType | scaleFactor_ |
| RealType | kDisp_ |
| RealType | kDispX_ |
| RealType | kDispY_ |
| RealType | kDispZ_ |
| 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 67 of file ObjectRestraint.hpp.
|
inline |
Definition at line 69 of file ObjectRestraint.hpp.
| void OpenMD::ObjectRestraint::calcForce | ( | Vector3d | struc | ) |
Definition at line 52 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 111 of file ObjectRestraint.cpp.
References OpenMD::SquareMatrix3< Real >::toQuaternion().
|
inline |
Definition at line 78 of file ObjectRestraint.hpp.
|
inline |
Definition at line 83 of file ObjectRestraint.hpp.
|
inline |
Definition at line 84 of file ObjectRestraint.hpp.
|
inline |
Definition at line 71 of file ObjectRestraint.hpp.
|
inline |
Definition at line 73 of file ObjectRestraint.hpp.