STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::structure::RestraintApparatus Class Reference

A collection of all restraints pertaining to a specific topology for the purposes of one simulation, energy minimization, or even a single molecular mechanics calculation. More...

#include <restraint_apparatus.h>

Public Member Functions

 RestraintApparatus (const RestraintApparatus &original)
 The copy constructor works like any other object containing POINTER-kind Hybrids.
 
 RestraintApparatus (RestraintApparatus &&original)
 The move constructor also works like other objects containing POINTER-kind Hybrids.
 
RestraintApparatusoperator= (const RestraintApparatus &other)
 Copy assignment operator.
 
RestraintApparatusoperator= (RestraintApparatus &&other)
 Move assignment operator.
 
int getTotalRestraintCount () const
 Get the total number of restraints in this apparatus.
 
int getPositionalRestraintCount () const
 Get the number of positional restraints.
 
int getDistanceRestraintCount () const
 Get the number of distance restraints.
 
int getAngleRestraintCount () const
 Get the number of angle restraints.
 
int getDihedralRestraintCount () const
 Get the number of dihedral restraints.
 
bool getTimeDependence () const
 Get an indication of whether this apparatus uses time-dependent restraints.
 
const AtomGraphgetTopologyPointer () const
 Get a pointer to the topology that this restraint collection supplements.
 
RestraintKit< double, double2, double4dpData (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get a double-precision abstract of this apparatus.
 
RestraintKit< float, float2, float4spData (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get a single-precision abstract of this apparatus.
 
const int * getApplicationStepPointer (int order, RestraintStage stage, HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get an integer pointer into one of the restraint initial or final application step parameter arrays, specified by the order of the restraint.
 
const double2getHarmonicStiffnessPointer (int order, RestraintStage stage, HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get a double-precision pointer into one of the restraint k(2,3) parameter arrays, specified by the order of the restraint and the initial or final condition.
 
const double4getDisplacementPointer (int order, RestraintStage stage, HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get a double-precision pointer into one of the displacement r(1,2,3,4) parameter arrays, specified by the order of the restraint and the initial or final condition.
 
std::vector< BoundedRestraint > getRestraintList () const
 Produce a vector of all the restraints in this apparatus, essentially the inverse of the constructor.
 
const RestraintApparatusgetSelfPointer () const
 Get a const pointer to the object itself, in case the object has been passed by const reference.
 
 RestraintApparatus (const AtomGraph *ag_in=nullptr)
 The constructor takes a vector of individual restraints.
 
 RestraintApparatus (const std::vector< BoundedRestraint > &rbasis, const AtomGraph *ag_in=nullptr)
 
void addRestraints (const std::vector< BoundedRestraint > &new_rest)
 Add restraints to the apparatus.
 
void addRestraint (const BoundedRestraint &new_rest)
 

Detailed Description

A collection of all restraints pertaining to a specific topology for the purposes of one simulation, energy minimization, or even a single molecular mechanics calculation.

Constructor & Destructor Documentation

◆ RestraintApparatus() [1/3]

stormm::restraints::RestraintApparatus::RestraintApparatus ( const AtomGraph * ag_in = nullptr)

The constructor takes a vector of individual restraints.

Overloaded:

  • Take a pointer to a topology only (this will create a permanently empty object if the pointer is nullptr)
  • Take an array of restraints and a pointer to a topology
Parameters
rbasisA list of restraint objects with which to build the apparatus
ag_inPointer to the topology for which this apparatus is built (if rbasis is of nonzero length, the topology pointer from the first restraint will be preferred, otherwise this must be supplied in order to initialize the const member variable ag_pointer)

◆ RestraintApparatus() [2/3]

stormm::restraints::RestraintApparatus::RestraintApparatus ( const RestraintApparatus & original)

The copy constructor works like any other object containing POINTER-kind Hybrids.

Parameters
originalThe object to copy

◆ RestraintApparatus() [3/3]

stormm::restraints::RestraintApparatus::RestraintApparatus ( RestraintApparatus && original)

The move constructor also works like other objects containing POINTER-kind Hybrids.

Parameters
originalThe object to move

Member Function Documentation

◆ addRestraints()

void stormm::restraints::RestraintApparatus::addRestraints ( const std::vector< BoundedRestraint > & new_rest)

Add restraints to the apparatus.

Overloaded:

  • Add a vector of new restraints
  • Add a solitary new restraint
Parameters
new_restOne or more new restraints

◆ dpData()

RestraintKit< double, double2, double4 > stormm::restraints::RestraintApparatus::dpData ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get a double-precision abstract of this apparatus.

Parameters
tierThe level at which to obtain pointers

◆ operator=() [1/2]

RestraintApparatus & stormm::restraints::RestraintApparatus::operator= ( const RestraintApparatus & other)

Copy assignment operator.

Parameters
otherThe object to move

◆ operator=() [2/2]

RestraintApparatus & stormm::restraints::RestraintApparatus::operator= ( RestraintApparatus && other)

Move assignment operator.

Parameters
otherThe object to move

◆ spData()

RestraintKit< float, float2, float4 > stormm::restraints::RestraintApparatus::spData ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get a single-precision abstract of this apparatus.

Parameters
tierThe level at which to obtain pointers

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