MELDOpenMMPlugin
RdcForce Class Reference

This is the RDC Force. More...

#include <RdcForce.h>

+ Inheritance diagram for RdcForce:

Public Member Functions

 RdcForce ()
 Default constructor. More...
 
void updateParametersInContext (OpenMM::Context &context)
 Update the per-restraint parameters in a Context to match those stored in this Force object. More...
 
int getNumExperiments () const
 
int getNumRestraints (int experiment) const
 
int getNumTotalRestraints () const
 
int addExperiment (std::vector< int > rdcIndices)
 Create a new experiment. More...
 
int addRdcRestraint (int particle1, int particle2, float kappa, float dObs, float tolerance, float force_const, float weight)
 Create new RDC restraint. More...
 
void updateRdcRestraint (int index, int particle1, int particle2, float kappa, float dObs, float tolerance, float force_const, float weight)
 Modify an existing RDC restraint. More...
 
void getExperimentInfo (int index, std::vector< int > &restraints) const
 Get the parameters of an experiment. More...
 
void getRdcRestraintInfo (int index, int &particle1, int &partcile2, float &kappa, float &dObs, float &tolerance, float &force_const, float &weight, int &globalIndex) const
 Get the parameters of an RDC restraint. More...
 

Protected Member Functions

OpenMM::ForceImpl * createImpl () const
 

Detailed Description

This is the RDC Force.

Constructor & Destructor Documentation

RdcForce ( )

Default constructor.

Member Function Documentation

int addExperiment ( std::vector< int >  rdcIndices)

Create a new experiment.

Parameters
rdcIndicesThe indices of the Rdc restraints in this experiment.
Returns
The index of the new experiment.
int addRdcRestraint ( int  particle1,
int  particle2,
float  kappa,
float  dObs,
float  tolerance,
float  force_const,
float  weight 
)

Create new RDC restraint.

Parameters
particle1The index of atom 1
particle2The index of atom 2
kappaThe kappa parameter
dObsThe dObs parameter
toleranceThe tolerance parameter
force_constThe force constant of the restraint
weightThe weight parameter
Returns
index The index of the new restraint
OpenMM::ForceImpl* createImpl ( ) const
protected
void getExperimentInfo ( int  index,
std::vector< int > &  restraints 
) const

Get the parameters of an experiment.

Parameters
indexThe index of the experiment
restraintsThe indices of the restraints in the experiment.
int getNumExperiments ( ) const
Returns
The number of experiments.
int getNumRestraints ( int  experiment) const
Parameters
experimentThe index of the experiment.
Returns
The number of RDC restraints.
int getNumTotalRestraints ( ) const
Returns
The number of RDC restraints.
void getRdcRestraintInfo ( int  index,
int &  particle1,
int &  partcile2,
float &  kappa,
float &  dObs,
float &  tolerance,
float &  force_const,
float &  weight,
int &  globalIndex 
) const

Get the parameters of an RDC restraint.

Parameters
indexThe index of the restraint
particle1The index of atom 1
particle2The index of atom 2
kappaThe kappa parameter
dObsThe dObs parameter
toleranceThe tolerance parameter
force_constThe force constant of the restraint
weightThe weight parameter
globalIndexThe global index of the restraint
void updateParametersInContext ( OpenMM::Context &  context)

Update the per-restraint parameters in a Context to match those stored in this Force object.

This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call updateRdcRestaint() to modify the parameters of a restraint, then call updateParametersInContext() to copy them over to the Context.

This method has several limitations. The only information it updates is the values of per-restraint parameters. All other aspects of the Force (such as the energy function) are unaffected and can only be changed by reinitializing the Context. The set of particles involved in a restraint cannot be changed, nor can new restraints be added.

void updateRdcRestraint ( int  index,
int  particle1,
int  particle2,
float  kappa,
float  dObs,
float  tolerance,
float  force_const,
float  weight 
)

Modify an existing RDC restraint.

Parameters
indexThe index of the restraint
particle1The index of atom 1
particle2The index of atom 2
kappaThe kappa parameter
dObsThe dObs parameter
toleranceThe tolerance parameter
force_constThe force constant of the restraint
weightThe weight parameter

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