OpenMD  2.5
Molecular Dynamics in the Open
OpenMD::CosineBendType Class Reference

#include <CosineBendType.hpp>

Inheritance diagram for OpenMD::CosineBendType:
OpenMD::BendType

Public Member Functions

 CosineBendType (RealType theta, RealType k)
 
void setForceConstant (RealType k)
 
RealType getForceConstant ()
 
void calcForce (RealType theta, RealType &V, RealType &dVdtheta)
 
- Public Member Functions inherited from OpenMD::BendType
 BendType (RealType theta)
 
virtual ~BendType ()
 
RealType getTheta ()
 
void setTheta (RealType theta)
 

Private Attributes

RealType k_
 
RealType c0_
 

Additional Inherited Members

- Protected Attributes inherited from OpenMD::BendType
RealType theta0_
 

Detailed Description

A simple harmonic bend using the cosine of the angle instead of the angle itself:

\[ Vbend = (\cos(\theta) - \cos(\theta_0))^2 \]

Definition at line 63 of file CosineBendType.hpp.

Constructor & Destructor Documentation

◆ CosineBendType()

OpenMD::CosineBendType::CosineBendType ( RealType  theta,
RealType  k 
)
inline

Definition at line 67 of file CosineBendType.hpp.

References c0_.

Member Function Documentation

◆ calcForce()

void OpenMD::CosineBendType::calcForce ( RealType  theta,
RealType &  V,
RealType &  dVdtheta 
)
inlinevirtual

Implements OpenMD::BendType.

Definition at line 75 of file CosineBendType.hpp.

References c0_, and k_.

◆ getForceConstant()

RealType OpenMD::CosineBendType::getForceConstant ( )
inline

Definition at line 73 of file CosineBendType.hpp.

References k_.

◆ setForceConstant()

void OpenMD::CosineBendType::setForceConstant ( RealType  k)
inline

Definition at line 71 of file CosineBendType.hpp.

References k_.

Member Data Documentation

◆ c0_

RealType OpenMD::CosineBendType::c0_
private

Definition at line 88 of file CosineBendType.hpp.

Referenced by calcForce(), and CosineBendType().

◆ k_

RealType OpenMD::CosineBendType::k_
private

Definition at line 87 of file CosineBendType.hpp.

Referenced by calcForce(), getForceConstant(), and setForceConstant().


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