156 |
|
for (j = 0; j < 3; j++) |
157 |
|
myVel[j] = oldVel[3*index + j]; |
158 |
|
|
159 |
– |
// std::cerr << "velScaleB = \n" |
160 |
– |
// << "[ " << vScale[0][0] << " , " << vScale[0][1] << " , " << vScale[0][2] << "]\n" |
161 |
– |
// << "[ " << vScale[1][0] << " , " << vScale[1][1] << " , " << vScale[1][2] << "]\n" |
162 |
– |
// << "[ " << vScale[2][0] << " , " << vScale[2][1] << " , " << vScale[2][2] << "]\n\n"; |
163 |
– |
|
164 |
– |
|
165 |
– |
// std::cerr << "myVel " << index << " in => " |
166 |
– |
// << myVel[0] << ", " << myVel[1] << ", " << myVel[2] << "\n"; |
167 |
– |
|
159 |
|
info->matVecMul3( vScale, myVel, sc ); |
169 |
– |
|
170 |
– |
// std::cerr << "sc " << index << " out => " |
171 |
– |
// << sc[0] << ", " << sc[1] << ", " << sc[2] << "\n"; |
160 |
|
} |
161 |
|
|
162 |
|
void NPTf::getPosScale(double pos[3], double COM[3], |
163 |
< |
int index, double sc[3]){ |
163 |
> |
int index, double sc[3]){ |
164 |
|
int j; |
165 |
|
double rj[3]; |
166 |
|
|
215 |
|
if (scaleMat[i][i] < smallScale) smallScale = scaleMat[i][i]; |
216 |
|
} |
217 |
|
|
218 |
< |
if ((bigScale > 1.1) || (smallScale < 0.9)) { |
218 |
> |
if ((bigScale > 1.01) || (smallScale < 0.99)) { |
219 |
|
sprintf( painCave.errMsg, |
220 |
< |
"NPTf error: Attempting a Box scaling of more than 10 percent.\n" |
220 |
> |
"NPTf error: Attempting a Box scaling of more than 1 percent.\n" |
221 |
|
" Check your tauBarostat, as it is probably too small!\n\n" |
222 |
|
" scaleMat = [%lf\t%lf\t%lf]\n" |
223 |
|
" [%lf\t%lf\t%lf]\n" |
227 |
|
scaleMat[2][0],scaleMat[2][1],scaleMat[2][2]); |
228 |
|
painCave.isFatal = 1; |
229 |
|
simError(); |
230 |
< |
} else if (offDiagMax > 0.1) { |
230 |
> |
} else if (offDiagMax > 0.01) { |
231 |
|
sprintf( painCave.errMsg, |
232 |
< |
"NPTf error: Attempting an off-diagonal Box scaling of more than 10 percent.\n" |
232 |
> |
"NPTf error: Attempting an off-diagonal Box scaling of more than 1 percent.\n" |
233 |
|
" Check your tauBarostat, as it is probably too small!\n\n" |
234 |
|
" scaleMat = [%lf\t%lf\t%lf]\n" |
235 |
|
" [%lf\t%lf\t%lf]\n" |
290 |
|
conservedQuantity = totalEnergy + thermostat_kinetic + thermostat_potential + |
291 |
|
barostat_kinetic + barostat_potential; |
292 |
|
|
305 |
– |
// cout.width(8); |
306 |
– |
// cout.precision(8); |
307 |
– |
|
308 |
– |
// cerr << info->getTime() << "\t" << Energy << "\t" << thermostat_kinetic << |
309 |
– |
// "\t" << thermostat_potential << "\t" << barostat_kinetic << |
310 |
– |
// "\t" << barostat_potential << "\t" << conservedQuantity << endl; |
311 |
– |
|
293 |
|
return conservedQuantity; |
294 |
|
|
295 |
|
} |