1 #ifndef MCMD_CFB_REBRIDGE_BASE_H 2 #define MCMD_CFB_REBRIDGE_BASE_H 11 #include "CfbEndBase.h" 12 #include <util/space/Vector.h> 50 virtual void readParameters(std::istream& in);
87 void deleteMiddleAtom(
Atom* partPtr,
Atom* prevPtr,
Atom* nextPtr,
88 int prevBType,
int nextBType,
double &rosenbluth,
double &energy);
94 void addMiddleAtom(
Atom* partPtr,
Atom* prevPtr,
Atom* nextPtr,
95 int prevBType,
int nextBType,
double &rosenbluth,
double &energy);
100 void deleteSequence(
int nActive,
int sign,
Atom* endPtr,
int *bonds,
101 double &rosenbluth,
double &energy);
106 void addSequence(
int nActive,
int sign,
Atom* beginPtr,
int *bonds,
107 double &rosenbluth,
double &energy);
117 static const int MaxBin_ = 102;
121 double l20Table[MaxBin_];
124 double angTable[MaxBin_];
127 double kappaTable[MaxBin_];
130 double normalTable[MaxBin_];
136 inline void getAngKappaNorm(
double l_20,
double &preAng,
137 double &kappa,
double &normConst);
144 double prefAng,
double kappaAng,
double &bias);
151 void orientationBiasTable
152 (
double l_20,
double &prefAng,
double &kappaAng,
double &normConst);
158 void computeNormalization
159 (
double prefAng,
double kappaAng,
double &normConst);
167 void CfbRebridgeBase::getAngKappaNorm(
double l_20,
double &prefAng,
168 double &kappa,
double &normConst)
170 if (l_20 <= l20Table[0]) {
171 prefAng = angTable[0];
172 kappa = kappaTable[0];
173 normConst = normalTable[0];
174 }
else if (l_20 >= l20Table[MaxBin_-1]) {
175 prefAng = angTable[MaxBin_-1];
176 kappa = kappaTable[MaxBin_-1];
177 normConst = normalTable[MaxBin_-1];
180 i = int ( (l_20 - l20Table[0]) / (l20Table[2] - l20Table[1]) );
181 prefAng = angTable[i+1];
182 kappa = kappaTable[i+1];
183 normConst = normalTable[i+1];
190 void CfbRebridgeBase::orientationBias(
191 Vector u_21,
Vector u_20,
double prefAng,
double kappaAng,
double &bias)
195 actualAng = acos(u_21.
dot(u_20));
196 bias = boltzmann(0.5*kappaAng*(actualAng - prefAng)*(actualAng - prefAng));
A System for use in a Markov chain Monte Carlo simulation.
A Vector is a Cartesian vector.
double dot(const Vector &v) const
Return dot product of this vector and vector v.
Base class configuration bias moves internal segment regrowth moves.
double kappa10_
Spring constant (1-0 bond).
Saving / output archive for binary ostream.
A point particle within a Molecule.
Utility classes for scientific computation.
Saving archive for binary istream.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
double length10_
Equilibrium bond lengths (1-0 bonds).
Base class for configuration bias (CFB) end regrowth moves.
double length21_
Equilibrium bond lengths (2-1 bond).