| 39 |
|
} |
| 40 |
|
} |
| 41 |
|
|
| 42 |
+ |
|
| 43 |
+ |
if( theInfo->useInitXSstate ){ |
| 44 |
|
// retrieve eta array from simInfo if it exists |
| 45 |
|
data = info->getProperty(ETAVALUE_ID); |
| 46 |
|
if(data){ |
| 47 |
|
etaValue = dynamic_cast<DoubleArrayData*>(data); |
| 48 |
< |
|
| 48 |
> |
|
| 49 |
|
if(etaValue){ |
| 50 |
< |
etaArray = etaValue->getData(); |
| 51 |
< |
|
| 52 |
< |
for(i = 0; i < 3; i++){ |
| 53 |
< |
for (j = 0; j < 3; j++){ |
| 54 |
< |
eta[i][j] = etaArray[3*i+j]; |
| 55 |
< |
oldEta[i][j] = eta[i][j]; |
| 56 |
< |
} |
| 57 |
< |
} |
| 56 |
< |
|
| 50 |
> |
etaArray = etaValue->getData(); |
| 51 |
> |
|
| 52 |
> |
for(i = 0; i < 3; i++){ |
| 53 |
> |
for (j = 0; j < 3; j++){ |
| 54 |
> |
eta[i][j] = etaArray[3*i+j]; |
| 55 |
> |
oldEta[i][j] = eta[i][j]; |
| 56 |
> |
} |
| 57 |
> |
} |
| 58 |
|
} |
| 59 |
|
} |
| 60 |
+ |
} |
| 61 |
|
|
| 62 |
|
} |
| 63 |
|
|
| 210 |
|
if (scaleMat[i][i] < smallScale) smallScale = scaleMat[i][i]; |
| 211 |
|
} |
| 212 |
|
|
| 213 |
< |
if ((bigScale > 1.1) || (smallScale < 0.9)) { |
| 213 |
> |
if ((bigScale > 1.01) || (smallScale < 0.99)) { |
| 214 |
|
sprintf( painCave.errMsg, |
| 215 |
< |
"NPTf error: Attempting a Box scaling of more than 10 percent.\n" |
| 215 |
> |
"NPTf error: Attempting a Box scaling of more than 1 percent.\n" |
| 216 |
|
" Check your tauBarostat, as it is probably too small!\n\n" |
| 217 |
|
" scaleMat = [%lf\t%lf\t%lf]\n" |
| 218 |
|
" [%lf\t%lf\t%lf]\n" |
| 222 |
|
scaleMat[2][0],scaleMat[2][1],scaleMat[2][2]); |
| 223 |
|
painCave.isFatal = 1; |
| 224 |
|
simError(); |
| 225 |
< |
} else if (offDiagMax > 0.1) { |
| 225 |
> |
} else if (offDiagMax > 0.01) { |
| 226 |
|
sprintf( painCave.errMsg, |
| 227 |
< |
"NPTf error: Attempting an off-diagonal Box scaling of more than 10 percent.\n" |
| 227 |
> |
"NPTf error: Attempting an off-diagonal Box scaling of more than 1 percent.\n" |
| 228 |
|
" Check your tauBarostat, as it is probably too small!\n\n" |
| 229 |
|
" scaleMat = [%lf\t%lf\t%lf]\n" |
| 230 |
|
" [%lf\t%lf\t%lf]\n" |
| 285 |
|
conservedQuantity = totalEnergy + thermostat_kinetic + thermostat_potential + |
| 286 |
|
barostat_kinetic + barostat_potential; |
| 287 |
|
|
| 286 |
– |
// cout.width(8); |
| 287 |
– |
// cout.precision(8); |
| 288 |
– |
|
| 289 |
– |
// cerr << info->getTime() << "\t" << Energy << "\t" << thermostat_kinetic << |
| 290 |
– |
// "\t" << thermostat_potential << "\t" << barostat_kinetic << |
| 291 |
– |
// "\t" << barostat_potential << "\t" << conservedQuantity << endl; |
| 292 |
– |
|
| 288 |
|
return conservedQuantity; |
| 289 |
|
|
| 290 |
|
} |
| 294 |
|
const int BUFFERSIZE = 2000; // size of the read buffer |
| 295 |
|
char buffer[BUFFERSIZE]; |
| 296 |
|
|
| 297 |
< |
sprintf(buffer,"\t%lf\t%lf;", chi, integralOfChidt); |
| 297 |
> |
sprintf(buffer,"\t%G\t%G;", chi, integralOfChidt); |
| 298 |
|
parameters += buffer; |
| 299 |
|
|
| 300 |
|
for(int i = 0; i < 3; i++){ |
| 301 |
< |
sprintf(buffer,"\t%lf\t%lf\t%lf;", eta[3*i], eta[3*i+1], eta[3*i+2]); |
| 301 |
> |
sprintf(buffer,"\t%G\t%G\t%G;", eta[i][0], eta[i][1], eta[i][2]); |
| 302 |
|
parameters += buffer; |
| 303 |
|
} |
| 304 |
|
|