| 223 |
|
if( calcMuCorr || calcCosCorr ){ |
| 224 |
|
dumpArray[j].v = |
| 225 |
|
(struct vect *)calloc(n_atoms, sizeof(struct vect)); |
| 226 |
– |
printf( " (Note: reading in vectors)... " ); |
| 227 |
– |
fflush( stdout ); |
| 226 |
|
} |
| 227 |
|
|
| 228 |
|
//read the time and the box sizes |
| 400 |
|
cosCorr1, cosCorr2 ); |
| 401 |
|
fflush( stdout ); |
| 402 |
|
|
| 403 |
< |
// cosCorr call |
| 406 |
< |
|
| 403 |
> |
cosCorr( out_prefix, cosCorr1, cosCorr2, dumpArray, nFrames ); |
| 404 |
|
|
| 405 |
|
fprintf( stdout, |
| 406 |
|
" done.\n" |
| 411 |
|
return 0; |
| 412 |
|
|
| 413 |
|
} |
| 414 |
+ |
|
| 415 |
+ |
|
| 416 |
+ |
void map( double *x, double *y, double *z, |
| 417 |
+ |
double boxX, double boxY, double boxZ ){ |
| 418 |
+ |
|
| 419 |
+ |
*x -= boxX * copysign(1.0,*x) * floor( fabs( *x/boxX ) + 0.5 ); |
| 420 |
+ |
*y -= boxY * copysign(1.0,*y) * floor( fabs( *y/boxY ) + 0.5 ); |
| 421 |
+ |
*z -= boxZ * copysign(1.0,*z) * floor( fabs( *z/boxZ ) + 0.5 ); |
| 422 |
|
|
| 423 |
+ |
} |
| 424 |
|
|
| 425 |
|
|
| 426 |
|
/*************************************************************************** |