| 28 |
|
|
| 29 |
|
void calcRMSDpair( int bin, int i, int j, enum atomNames rType ); |
| 30 |
|
|
| 31 |
< |
void rmsd( enum atomNames rType, double startTime, char* outPrefix ){ |
| 31 |
> |
void rmsd( enum atomNames rType, double startTime, char* outPrefix, |
| 32 |
> |
char* theName){ |
| 33 |
|
|
| 34 |
|
// list of 'a priori' constants |
| 35 |
|
|
| 172 |
|
} |
| 173 |
|
myFrames[index].time = frameTimes[i]; |
| 174 |
|
readFrame(i, atoms, myFrames[index].Hmat ); |
| 175 |
+ |
|
| 176 |
+ |
index++; |
| 177 |
|
} |
| 178 |
|
|
| 179 |
|
// initialize the counts and the correlation |
| 197 |
|
for(j=i+1;j<corrFrames;j++){ |
| 198 |
|
|
| 199 |
|
diffTime = myFrames[j].time - myFrames[i].time; |
| 200 |
< |
if( diffTime > 0.0 ){ |
| 200 |
> |
|
| 201 |
> |
if( diffTime > 0.0 ){ |
| 202 |
|
|
| 203 |
|
percentComplete = |
| 204 |
|
(int)( 100.0 * (double)index / (double) nCounts ); |
| 205 |
|
|
| 206 |
|
fprintf( stdout, |
| 207 |
< |
"\rRMSD corr %3d%% complete.", |
| 207 |
> |
"\rMSD corr %3d%% complete.", |
| 208 |
|
percentComplete ); |
| 209 |
|
fflush( stdout ); |
| 210 |
|
|
| 219 |
|
|
| 220 |
|
// print out the correlation |
| 221 |
|
|
| 222 |
< |
sprintf( outName, "%s.rmsd", outPrefix ); |
| 222 |
> |
sprintf( outName, "%s-%s.msd", outPrefix, theName ); |
| 223 |
|
outFile = fopen( outName, "w" ); |
| 224 |
|
|
| 225 |
|
fprintf( outFile, |
| 226 |
< |
"#time\trmsd\n"); |
| 226 |
> |
"#time\tmsd\n"); |
| 227 |
|
|
| 228 |
|
for(i=0;i<RMSDBINS;i++){ |
| 229 |
|
|
| 245 |
|
(int)( 100.0 * (double)index / (double) nCounts ); |
| 246 |
|
|
| 247 |
|
fprintf( stdout, |
| 248 |
< |
"\rRMSD corr %3d%% complete.", |
| 248 |
> |
"\rMSD corr %3d%% complete.\n", |
| 249 |
|
percentComplete ); |
| 250 |
|
fflush( stdout ); |
| 251 |
|
|
| 283 |
|
atomsI = myFrames[frameI].atoms; |
| 284 |
|
atomsJ = myFrames[frameJ].atoms; |
| 285 |
|
|
| 286 |
+ |
accum = 0.0; |
| 287 |
+ |
|
| 288 |
|
if( rType != COM ){ |
| 289 |
|
|
| 290 |
|
nAccums = 0; |
| 299 |
|
for(j=0;j<3;j++) |
| 300 |
|
dSqr += d[j] * d[j]; |
| 301 |
|
|
| 302 |
< |
accum += sqrt(dSqr); |
| 302 |
> |
accum += dSqr; |
| 303 |
|
nAccums++; |
| 304 |
|
} |
| 305 |
|
} |
| 340 |
|
for(j=0;j<3;j++) |
| 341 |
|
dSqr += d[j] * d[j]; |
| 342 |
|
|
| 343 |
< |
accum += sqrt(dSqr); |
| 343 |
> |
accum += dSqr; |
| 344 |
|
nAccums++; |
| 345 |
|
} |
| 346 |
|
} |