OpenMD 3.0
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
OpenMD::MolecularRestraint Class Reference

MolecularRestraint is the restraint (both positional and orientational) for the configuration of a flexible Molecule relative to some reference structure for the same Molecule. More...

#include <MolecularRestraint.hpp>

+ Inheritance diagram for OpenMD::MolecularRestraint:

Public Member Functions

void setReferenceStructure (std::vector< Vector3d > ref, Vector3d refCom)
 
void calcForce (std::vector< Vector3d > struc, Vector3d molCom)
 
std::vector< Vector3dgetRestraintForces ()
 
- 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

MolecularRestraint is the restraint (both positional and orientational) for the configuration of a flexible Molecule relative to some reference structure for the same Molecule.

The angles that define the deflection away from the reference structure are the Euler angles taken from the rotation matrix that gives the lowest root mean square deviation (RMSD), while the displacement of the molecule is simply the displacement of the center of mass relative to the reference structure.

Definition at line 66 of file MolecularRestraint.hpp.

Constructor & Destructor Documentation

◆ MolecularRestraint()

OpenMD::MolecularRestraint::MolecularRestraint ( )
inline

Definition at line 68 of file MolecularRestraint.hpp.

Member Function Documentation

◆ calcForce()

void OpenMD::MolecularRestraint::calcForce ( std::vector< Vector3d > struc,
Vector3d molCom )

dVdtwist = kTwist_ * sin(dTwist) ; p = kTwist_ * (1.0 - cos(dTwist) ) ;

dVdswingX = kSwingX_ * 2.0 * sin(2.0 * dSwingX); p = kSwingX_ * (1.0 - cos(2.0 * dSwingX));

dVdswingY = kSwingY_ * 2.0 * sin(2.0 * dSwingY); p = kSwingY_ * (1.0 - cos(2.0 * dSwingY));

Definition at line 56 of file MolecularRestraint.cpp.

References OpenMD::cross(), OpenMD::dot(), OpenMD::Vector< Real, Dim >::length(), and OpenMD::SquareMatrix3< Real >::toQuaternion().

◆ getRestraintForces()

std::vector< Vector3d > OpenMD::MolecularRestraint::getRestraintForces ( )
inline

Definition at line 86 of file MolecularRestraint.hpp.

◆ setReferenceStructure()

void OpenMD::MolecularRestraint::setReferenceStructure ( std::vector< Vector3d > ref,
Vector3d refCom )
inline

Definition at line 70 of file MolecularRestraint.hpp.


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