74 using RealPair = std::pair<RealType, RealType>;
77 twist0_(0.0), swingX0_(0.0), swingY0_(0.0), posZ0_(0.0),
78 printRest_(
false), restType_(0) {}
85 void setReferenceStructure() {}
87 RealType getUnscaledPotential() {
return pot_; }
88 RealType getPotential() {
return scaleFactor_ * pot_; }
90 void setRestraintName(std::string name) { restName_ = name; }
91 std::string getRestraintName() {
return restName_; }
98 void setScaleFactor(RealType sf) { scaleFactor_ = sf; }
100 void setDisplacementForceConstant(RealType kDisp) {
102 restType_ |= rtDisplacement;
103 if (printRest_) restInfo_[rtDisplacement] = std::make_pair(0.0, 0.0);
106 void setAbsoluteForceConstant(RealType kAbs) {
108 restType_ |= rtAbsoluteZ;
109 if (printRest_) restInfo_[rtAbsoluteZ] = std::make_pair(0.0, 0.0);
112 void setTwistForceConstant(RealType kTwist) {
113 kTwist_ = kTwist / 4;
114 restType_ |= rtTwist;
115 if (printRest_) restInfo_[rtTwist] = std::make_pair(0.0, 0.0);
118 void setSwingXForceConstant(RealType kSwingX) {
120 restType_ |= rtSwingX;
121 if (printRest_) restInfo_[rtSwingX] = std::make_pair(0.0, 0.0);
124 void setSwingYForceConstant(RealType kSwingY) {
126 restType_ |= rtSwingY;
127 if (printRest_) restInfo_[rtSwingY] = std::make_pair(0.0, 0.0);
130 void setAbsolutePositionZ(RealType z0) {
132 restType_ |= rtAbsoluteZ;
133 if (printRest_) restInfo_[rtAbsoluteZ] = std::make_pair(0.0, 0.0);
140 void setRestrainedTwistAngle(RealType twist0) {
142 restType_ |= rtTwist;
143 if (printRest_) restInfo_[rtTwist] = std::make_pair(0.0, 0.0);
146 void setRestrainedSwingXAngle(RealType swingX0) {
148 restType_ |= rtSwingX;
149 if (printRest_) restInfo_[rtSwingX] = std::make_pair(0.0, 0.0);
152 void setRestrainedSwingYAngle(RealType swingY0) {
154 restType_ |= rtSwingY;
155 if (printRest_) restInfo_[rtSwingY] = std::make_pair(0.0, 0.0);
158 void setPrintRestraint(
bool printRest) { printRest_ = printRest; }
160 RealType getDisplacementForceConstant() {
return kDisp_; }
161 RealType getAbsoluteForceConstant() {
return kAbs_; }
162 RealType getAbsolutePositionZ() {
return posZ0_; }
163 RealType getTwistForceConstant() {
return kTwist_; }
164 RealType getSwingXForceConstant() {
return kSwingX_; }
165 RealType getSwingYForceConstant() {
return kSwingY_; }
166 RealType getRestrainedTwistAngle() {
return twist0_; }
167 RealType getRestrainedSwingXAngle() {
return swingX0_; }
168 RealType getRestrainedSwingYAngle() {
return swingY0_; }
169 std::map<int, RealPair> getRestraintInfo() {
return restInfo_; }
170 bool getPrintRestraint() {
return printRest_; }
173 RealType scaleFactor_;
187 std::string restName_;
188 std::map<int, RealPair> restInfo_;