STORMM Source Documentation
Loading...
Searching...
No Matches
restraint_builder.h
1// -*-c++-*-
2#ifndef STORMM_RESTRAINT_BUILDER_H
3#define STORMM_RESTRAINT_BUILDER_H
4
5#include <vector>
6#include "copyright.h"
7#include "Chemistry/atommask.h"
8#include "bounded_restraint.h"
9
10namespace stormm {
11namespace restraints {
12
13using chemistry::AtomMask;
14using topology::AtomGraph;
15using trajectory::CoordinateFrameReader;
16
19constexpr double default_hb_prevention_limit = 3.1;
20
25
29 FlatBottomPlan(double k_in, double r_in);
30 FlatBottomPlan(double k_in, double r2_in, double r3_in);
31 FlatBottomPlan(double k2_in, double k3_in, double r2_in, double r3_in);
32 FlatBottomPlan(double k2_in, double k3_in, double r1_in, double r2_in, double r3_in,
33 double r4_in, int step_in);
34
35 int activation_step; // Step number at which this state of the restraint will take (full) effect
36 double k2; // Left-hand harmonic stiffness
37 double k3; // Right-hand harmonic stiffness
38 double r1; // Leftmost boundary between linear and harmonic behavior
39 double r2; // Leftmost boundary of the flat-bottom potential
40 double r3; // Rightmost boundary of the flat-bottom potential
41 double r4; // Rightmost boundard between harmonic and linear behavior
42};
43
57BoundedRestraint applyDistanceRestraint(const AtomGraph *ag, int atom_i, int atom_j,
58 const FlatBottomPlan fb_init);
59BoundedRestraint applyDistanceRestraint(const AtomGraph *ag, int atom_i, int atom_j,
60 const FlatBottomPlan fb_init,
61 const FlatBottomPlan fb_final);
63
78BoundedRestraint applyAngleRestraint(const AtomGraph *ag, int atom_i, int atom_j, int atom_k,
79 const FlatBottomPlan fb_init);
80BoundedRestraint applyAngleRestraint(const AtomGraph *ag, int atom_i, int atom_j, int atom_k,
81 const FlatBottomPlan fb_init, const FlatBottomPlan fb_final);
83
101BoundedRestraint applyDihedralRestraint(const AtomGraph *ag, int atom_i, int atom_j, int atom_k,
102 int atom_l, const FlatBottomPlan fb_init);
103BoundedRestraint applyDihedralRestraint(const AtomGraph *ag, int atom_i, int atom_j, int atom_k,
104 int atom_l, const FlatBottomPlan fb_init,
105 const FlatBottomPlan fb_final);
107
114void restraintTopologyChecks(const AtomGraph *ag, const CoordinateFrameReader &cframe,
115 const AtomMask &mask);
116
150std::vector<BoundedRestraint>
151applyPositionalRestraints(const AtomGraph *ag, const CoordinateFrameReader &ref_cfr,
152 const AtomMask &mask, double displacement_penalty,
153 double displacement_onset = 0.0, double displacement_plateau = 16.0,
154 double proximity_penalty = 0.0, double proximity_onset = 0.0,
155 double proximity_plateau = 0.0);
156
157std::vector<BoundedRestraint>
158applyPositionalRestraints(const AtomGraph *ag, const CoordinateFrameReader &ref_cfr,
159 const std::string &mask, double displacement_penalty,
160 double displacement_onset = 0.0, double displacement_plateau = 16.0,
161 double proximity_penalty = 0.0, double proximity_onset = 0.0,
162 double proximity_plateau = 0.0);
163
164std::vector<BoundedRestraint>
165applyPositionalRestraints(const AtomGraph *ag, const CoordinateFrameReader &ref_cfr,
166 const std::vector<int> &masked_atoms, double displacement_penalty,
167 double displacement_onset = 0.0, double displacement_plateau = 16.0,
168 double proximity_penalty = 0.0, double proximity_onset = 0.0,
169 double proximity_plateau = 0.0);
170
172
197std::vector<BoundedRestraint>
198applyDistanceRestraints(const AtomGraph *ag, const CoordinateFrameReader &ref_cfr,
199 const AtomMask &mask, double penalty, double flat_bottom_half_width,
200 double cutoff);
201
202std::vector<BoundedRestraint>
203applyDistanceRestraints(const AtomGraph *ag, const CoordinateFrameReader &ref_cfr,
204 const std::string &mask, double penalty, double flat_bottom_half_width,
205 double cutoff);
206
207std::vector<BoundedRestraint>
208applyDistanceRestraints(const AtomGraph *ag, const CoordinateFrameReader &ref_cfr,
209 const std::vector<int> &masked_atoms, double penalty,
210 double flat_bottom_half_width, double cutoff);
212
235std::vector<BoundedRestraint>
236applyHoldingRestraints(const AtomGraph *ag, const CoordinateFrameReader &cfr,
237 const AtomMask &mask, double penalty, double flat_bottom_half_width = 0.0,
238 double harmonic_maximum = 16.0);
239
240std::vector<BoundedRestraint>
241applyHoldingRestraints(const AtomGraph *ag, const CoordinateFrameReader &cfr,
242 const std::string &mask, double penalty,
243 double flat_bottom_half_width = 0.0, double harmonic_maximum = 16.0);
245
265std::vector<BoundedRestraint>
266applyHydrogenBondPreventors(const AtomGraph *ag, const ChemicalFeatures &chemfe,
267 const double penalty,
268 const double approach_point = default_hb_prevention_limit);
269
270std::vector<BoundedRestraint>
271applyHydrogenBondPreventors(const AtomGraph *ag, const CoordinateFrameReader &cfr,
272 const double penalty,
273 const double approach_point = default_hb_prevention_limit);
275
276} // namespace restraints
277} // namespace stormm
278
279#endif
An atom selection within a system. Internally, this stores a bitmask, one bit for every particle,...
Definition atommask.h:199
An object to store information about chemical motifs: participation in rings, planarity,...
Definition chemical_features.h:400
Definition bounded_restraint.h:19
A struct to hold information relating to an Amber topology. This struct's member functions are limite...
Definition atomgraph.h:50
Unguarded struct to hold elemens of a flat bottom restraint. Two such objects can hold the initial an...
Definition restraint_builder.h:24
FlatBottomPlan()
The default constructor sets stiffnesses to zero and the activation step to zero. Additional construc...
Definition restraint_builder.cpp:29
Collect C-style pointers for the elements of a read-only CoordinateFrame object.
Definition coordinateframe.h:65