STORMM Source Documentation
Loading...
Searching...
No Matches
bounded_restraint.h
1// -*-c++-*-
2#ifndef STORMM_NMR_RESTRAINT_H
3#define STORMM_NMR_RESTRAINT_H
4
5#include <string>
6#include "copyright.h"
7#include "Chemistry/chemical_features.h"
8#include "DataTypes/stormm_vector_types.h"
9#include "Trajectory/coordinateframe.h"
10#include "Topology/atomgraph.h"
11
12namespace stormm {
13namespace restraints {
14
15using chemistry::ChemicalFeatures;
16using topology::AtomGraph;
17using trajectory::CoordinateFrameReader;
18
20public:
21
63 BoundedRestraint(const AtomGraph *ag_in);
64
65 BoundedRestraint(const std::string &mask_i_in, const std::string &mask_j_in,
66 const std::string &mask_k_in, const std::string &mask_l_in,
67 const AtomGraph *ag_in, const ChemicalFeatures &chemfe,
68 const CoordinateFrameReader &cfr, int init_step_in, int final_step_in,
69 double init_k2_in, double init_k3_in, double init_r1_in, double init_r2_in,
70 double init_r3_in, double init_r4_in, double final_k2_in,
71 double final_k3_in, double final_r1_in, double final_r2_in,
72 double final_r3_in, double final_r4_in,
73 const double3 init_ref_crd_in = { 0.0, 0.0, 0.0 },
74 const double3 final_ref_crd_in = { 0.0, 0.0, 0.0 });
75
76 BoundedRestraint(const std::string &mask_i_in, const std::string &mask_j_in,
77 const std::string &mask_k_in, const AtomGraph *ag_in,
78 const ChemicalFeatures &chemfe, const CoordinateFrameReader &cfr,
79 int init_step_in, int final_step_in, double init_k2_in, double init_k3_in,
80 double init_r1_in, double init_r2_in, double init_r3_in, double init_r4_in,
81 double final_k2_in, double final_k3_in, double final_r1_in,
82 double final_r2_in, double final_r3_in, double final_r4_in);
83
84 BoundedRestraint(const std::string &mask_i_in, const std::string &mask_j_in,
85 const AtomGraph *ag_in, const ChemicalFeatures &chemfe,
86 const CoordinateFrameReader &cfr, int init_step_in, int final_step_in,
87 double init_k2_in, double init_k3_in, double init_r1_in, double init_r2_in,
88 double init_r3_in, double init_r4_in, double final_k2_in,
89 double final_k3_in, double final_r1_in, double final_r2_in,
90 double final_r3_in, double final_r4_in);
91
92 BoundedRestraint(const std::string &mask_i_in, const AtomGraph *ag_in,
93 const ChemicalFeatures &chemfe, const CoordinateFrameReader &cfr,
94 int init_step_in, int final_step_in, double init_k2_in, double init_k3_in,
95 double init_r1_in, double init_r2_in, double init_r3_in, double init_r4_in,
96 double final_k2_in, double final_k3_in, double final_r1_in, double final_r2_in,
97 double final_r3_in, double final_r4_in, const double3 init_ref_crd_in,
98 const double3 final_ref_crd_in);
99
100 BoundedRestraint(const std::string &mask_i_in, const std::string &mask_j_in,
101 const std::string &mask_k_in, const std::string &mask_l_in,
102 const AtomGraph *ag_in, const ChemicalFeatures &chemfe,
103 const CoordinateFrameReader &cfr, double k2_in, double k3_in,
104 double r1_in, double r2_in, double r3_in, double r4_in);
105
106 BoundedRestraint(const std::string &mask_i_in, const std::string &mask_j_in,
107 const std::string &mask_k_in, const AtomGraph *ag_in,
108 const ChemicalFeatures &chemfe, const CoordinateFrameReader &cfr, double k2_in,
109 double k3_in, double r1_in, double r2_in, double r3_in, double r4_in);
110
111 BoundedRestraint(const std::string &mask_i_in, const std::string &mask_j_in,
112 const AtomGraph *ag_in, const ChemicalFeatures &chemfe,
113 const CoordinateFrameReader &cfr, double k2_in, double k3_in,
114 double r1_in, double r2_in, double r3_in, double r4_in);
115
116 BoundedRestraint(const std::string &mask_i_in, const AtomGraph *ag_in,
117 const ChemicalFeatures &chemfe, const CoordinateFrameReader &cfr, double k2_in,
118 double k3_in, double r1_in, double r2_in, double r3_in, double r4_in,
119 const double3 ref_crd_in);
120
121 BoundedRestraint(const std::string &mask_i_in, const AtomGraph *ag_in,
122 const ChemicalFeatures &chemfe, const CoordinateFrameReader &cfr, double k2_in,
123 double k3_in, double r1_in, double r2_in, double r3_in, double r4_in,
124 const std::string & mask_ref_in);
125
126 BoundedRestraint(int atom_i_in, int atom_j_in, int atom_k_in, int atom_l_in,
127 const AtomGraph *ag_in, int init_step_in, int final_step_in, double init_k2_in,
128 double init_k3_in, double init_r1_in, double init_r2_in, double init_r3_in,
129 double init_r4_in, double final_k2_in, double final_k3_in,
130 double final_r1_in, double final_r2_in, double final_r3_in,
131 double final_r4_in, const double3 init_ref_crd_in = { 0.0, 0.0, 0.0},
132 const double3 final_ref_crd_in = { 0.0, 0.0, 0.0 });
133
134 BoundedRestraint(int atom_i_in, int atom_j_in, int atom_k_in, const AtomGraph *ag_in,
135 int init_step_in, int final_step_in, double init_k2_in, double init_k3_in,
136 double init_r1_in, double init_r2_in, double init_r3_in, double init_r4_in,
137 double final_k2_in, double final_k3_in, double final_r1_in, double final_r2_in,
138 double final_r3_in, double final_r4_in);
139
140 BoundedRestraint(int atom_i_in, int atom_j_in, const AtomGraph *ag_in, int init_step_in,
141 int final_step_in, double init_k2_in, double init_k3_in, double init_r1_in,
142 double init_r2_in, double init_r3_in, double init_r4_in, double final_k2_in,
143 double final_k3_in, double final_r1_in, double final_r2_in, double final_r3_in,
144 double final_r4_in);
145
146 BoundedRestraint(int atom_i_in, const AtomGraph *ag_in, int init_step_in, int final_step_in,
147 double init_k2_in, double init_k3_in, double init_r1_in, double init_r2_in,
148 double init_r3_in, double init_r4_in, double final_k2_in, double final_k3_in,
149 double final_r1_in, double final_r2_in, double final_r3_in, double final_r4_in,
150 const double3 init_ref_crd_in, const double3 final_ref_crd_in);
151
152 BoundedRestraint(int atom_i_in, int atom_j_in, int atom_k_in, int atom_l_in,
153 const AtomGraph *ag_in, double k2_in, double k3_in, double r1_in,
154 double r2_in, double r3_in, double r4_in);
155
156 BoundedRestraint(int atom_i_in, int atom_j_in, int atom_k_in, const AtomGraph *ag_in,
157 double k2_in, double k3_in, double r1_in, double r2_in, double r3_in,
158 double r4_in);
159
160 BoundedRestraint(int atom_i_in, int atom_j_in, const AtomGraph *ag_in, double k2_in,
161 double k3_in, double r1_in, double r2_in, double r3_in, double r4_in);
162
163 BoundedRestraint(int atom_i_in, const AtomGraph *ag_in, double k2_in, double k3_in, double r1_in,
164 double r2_in, double r3_in, double r4_in, const double3 ref_crd_in);
165
166 BoundedRestraint(int atom_index, const AtomGraph *ag_in, const CoordinateFrameReader &cfr,
167 double k2_in, double k3_in, double r1_in, double r2_in, double r3_in,
168 double r4_in, int refr_index = -1);
170
173 BoundedRestraint(const BoundedRestraint &original) = default;
174 BoundedRestraint(BoundedRestraint &&original) = default;
175 BoundedRestraint& operator=(const BoundedRestraint &original) = default;
176 BoundedRestraint& operator=(BoundedRestraint &&original) = default;
178
182 int getAtomIndex(int restrained_atom_number) const;
183
185 int getOrder() const;
186
188 int getInitialStep() const;
189
191 int getFinalStep() const;
192
196 double2 getStiffness(int step_number = 0) const;
197
200
203
207 double4 getDisplacements(int step_number = 0) const;
208
211
214
218 double3 getTargetSite(int step_number = 0) const;
219
222
225
227 const AtomGraph* getTopologyPointer() const;
228
232 void setInitialStep(int new_init_step);
233
237 void setFinalStep(int new_final_step);
238
245 void setStiffness(double new_keq);
246
252 void setStiffnesses(double new_k2, double new_k3);
253
258 void setInitialStiffness(double new_init_keq);
259
265 void setInitialStiffnesses(double new_init_k2, double new_init_k3);
266
271 void setFinalStiffness(double new_init_keq);
272
278 void setFinalStiffnesses(double new_init_k2, double new_init_k3);
279
287 void setDisplacements(double new_r1, double new_r2, double new_r3, double new_r4);
288
296 void setInitialDisplacements(double new_r1, double new_r2, double new_r3, double new_r4);
297
305 void setFinalDisplacements(double new_r1, double new_r2, double new_r3, double new_r4);
306
319 void setTargetSite(double new_ref_x, double new_ref_y, double new_ref_z);
320 void setTargetSite(double3 new_ref_crd);
322
335 void setInitialTargetSite(double new_ref_x, double new_ref_y, double new_ref_z);
336 void setInitialTargetSite(double3 new_ref_crd);
338
351 void setFinalTargetSite(double new_ref_x, double new_ref_y, double new_ref_z);
352 void setFinalTargetSite(double3 new_ref_crd);
354
355private:
356 int atom_i;
357 int atom_j;
358 int atom_k;
359 int atom_l;
360 int order;
364 int initial_step;
366 int final_step;
368 double2 initial_keq;
371 double4 initial_r;
372 double2 final_keq;
373 double4 final_r;
374 double3 initial_center;
376 double3 final_center;
377
379 const AtomGraph *ag_pointer;
380
384 std::string reportAtomList();
385
389 void checkDisplacementLimits(double4 *rval);
390};
391
392} // namespace restraints
393} // namespace stormm
394
395#endif
An object to store information about chemical motifs: participation in rings, planarity,...
Definition chemical_features.h:400
BoundedRestraint(const AtomGraph *ag_in)
Definition bounded_restraint.cpp:24
void setFinalStiffness(double new_init_keq)
Modify the final stiffness parameters, setting both to a single value. This member function is only a...
Definition bounded_restraint.cpp:547
BoundedRestraint(const BoundedRestraint &original)=default
Take the default copy, copy assignment, move, and move assignment constructors.
void setFinalDisplacements(double new_r1, double new_r2, double new_r3, double new_r4)
Modify the final displacements over which each segment of the flat-bottom restraint applies....
Definition bounded_restraint.cpp:585
double4 getFinalDisplacements() const
Get the final displacement parameters of the restraint in its complete form.
Definition bounded_restraint.cpp:452
double2 getInitialStiffness() const
Get the initial stiffnesses to use when applying this restraint.
Definition bounded_restraint.cpp:425
double4 getInitialDisplacements() const
Get the initial displacement parameters to use in applying this restraint.
Definition bounded_restraint.cpp:447
double2 getFinalStiffness() const
Get the final stiffnesses of the restraint in its complete form.
Definition bounded_restraint.cpp:430
void setFinalStep(int new_final_step)
Modify the final step at which the restraint application reaches its final value.
Definition bounded_restraint.cpp:506
void setInitialStep(int new_init_step)
Modify the initial step at which the restraint is applied.
Definition bounded_restraint.cpp:501
void setInitialStiffnesses(double new_init_k2, double new_init_k3)
Modify the initial stiffness parameters. This member function is only applicable if there is time dep...
Definition bounded_restraint.cpp:538
int getOrder() const
Get the order of this restraint.
Definition bounded_restraint.cpp:400
void setTargetSite(double new_ref_x, double new_ref_y, double new_ref_z)
Set the target site. This function can only apply to a time-independent positional restraint with onl...
Definition bounded_restraint.cpp:595
int getFinalStep() const
Get the simulation step at which to finish applying this restraint.
Definition bounded_restraint.cpp:410
double3 getInitialTargetSite() const
Get the initial target of a positional restraint.
Definition bounded_restraint.cpp:474
void setFinalTargetSite(double new_ref_x, double new_ref_y, double new_ref_z)
Set the final target site. This function can only apply to a time-dependent positional restraint with...
Definition bounded_restraint.cpp:633
void setStiffnesses(double new_k2, double new_k3)
Modify the stiffness parameters. This member function is only applicable if there is no time dependen...
Definition bounded_restraint.cpp:520
double4 getDisplacements(int step_number=0) const
Get the displacement parameters of a restraint at a given step in the simulation.
Definition bounded_restraint.cpp:435
void setInitialStiffness(double new_init_keq)
Modify the initial stiffness parameters, setting both to a single value. This member function is only...
Definition bounded_restraint.cpp:529
void setInitialTargetSite(double new_ref_x, double new_ref_y, double new_ref_z)
Set the initial target site. This function can only apply to a time-dependent positional restraint wi...
Definition bounded_restraint.cpp:614
void setDisplacements(double new_r1, double new_r2, double new_r3, double new_r4)
Modify the displacements over which each segment of the flat-bottom restraint applies....
Definition bounded_restraint.cpp:565
void setStiffness(double new_keq)
Modify the stiffness parameters, set with a single value. This member function is only applicable if ...
Definition bounded_restraint.cpp:511
const AtomGraph * getTopologyPointer() const
Get the topology pointer.
Definition bounded_restraint.cpp:496
int getAtomIndex(int restrained_atom_number) const
Definition bounded_restraint.cpp:377
double3 getTargetSite(int step_number=0) const
Get the target site of a positional restraint at a given step in the simulation.
Definition bounded_restraint.cpp:457
BoundedRestraint(const AtomGraph *ag_in)
Definition bounded_restraint.cpp:24
void setInitialDisplacements(double new_r1, double new_r2, double new_r3, double new_r4)
Modify the initial displacements over which each segment of the flat-bottom restraint applies....
Definition bounded_restraint.cpp:575
double2 getStiffness(int step_number=0) const
Get the stiffnesses of a restraint at a given step in the simulation.
Definition bounded_restraint.cpp:415
double3 getFinalTargetSite() const
Get the final target of a positional restraint.
Definition bounded_restraint.cpp:485
void setFinalStiffnesses(double new_init_k2, double new_init_k3)
Modify the final stiffness parameters. This member function is only applicable if there is time depen...
Definition bounded_restraint.cpp:556
int getInitialStep() const
Get the initial step at which to begin applying this restraint.
Definition bounded_restraint.cpp:405
A struct to hold information relating to an Amber topology. This struct's member functions are limite...
Definition atomgraph.h:50
Definition stormm_vector_types.h:112
Definition stormm_vector_types.h:117
Definition stormm_vector_types.h:123
Collect C-style pointers for the elements of a read-only CoordinateFrame object.
Definition coordinateframe.h:65