OpenMD 3.2
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< Vector3d > getRestraintForces ()
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_

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 69 of file MolecularRestraint.hpp.

Constructor & Destructor Documentation

◆ MolecularRestraint()

OpenMD::MolecularRestraint::MolecularRestraint ( )
inline

Definition at line 71 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 59 of file MolecularRestraint.cpp.

References OpenMD::cross(), OpenMD::SquareMatrix3< Real >::determinant(), OpenMD::dot(), JAMA::SVD< Real >::getSingularValues(), OpenMD::Vector< Real, Dim >::length(), OpenMD::SquareMatrix3< Real >::toQuaternion(), OpenMD::Vector3< Real >::x(), OpenMD::Vector3< Real >::y(), and OpenMD::Vector3< Real >::z().

◆ getRestraintForces()

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

Definition at line 89 of file MolecularRestraint.hpp.

◆ setReferenceStructure()

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

Definition at line 73 of file MolecularRestraint.hpp.


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