diff options
author | Daniel Spangberg <daniels@kemi.uu.se> | 2013-05-25 10:17:20 (GMT) |
---|---|---|
committer | Daniel Spangberg <daniels@kemi.uu.se> | 2013-05-25 10:17:20 (GMT) |
commit | 583a3deb5bd37d5e81e17761b32831a190192281 (patch) | |
tree | 26017dee6c3ed38b1af61d37c1da0c49b39fcdfc /src/compression/tng_compress.c | |
parent | 4f846bcb0d2027955d5bab4151dcfedf86347cd8 (diff) |
Added debugging code to locate where velocities get trashed.
Diffstat (limited to 'src/compression/tng_compress.c')
-rw-r--r-- | src/compression/tng_compress.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compression/tng_compress.c b/src/compression/tng_compress.c index 3fad3df..cccab04 100644 --- a/src/compression/tng_compress.c +++ b/src/compression/tng_compress.c @@ -63,6 +63,16 @@ static int verify_input_data_float(float *x, int natoms, int nframes, float prec #if 1 for (iframe=0; iframe<nframes; iframe++) for (i=0; i<natoms; i++) + { + printf("vel test: %d %d:",iframe,i); + for (j=0; j<3; j++) + printf(" %g",x[iframe*natoms*3+i*3+j]); + printf("\n"); + } +#endif +#if 1 + for (iframe=0; iframe<nframes; iframe++) + for (i=0; i<natoms; i++) for (j=0; j<3; j++) if (fabs(x[iframe*natoms*3+i*3+j]/precision+0.5)>=MAX_FVAL) printf("ERROR. Too large value: %d %d %d: %g %g %g\n",iframe,i,j,x[iframe*natoms*3+i*3+j],precision,x[iframe*natoms*3+i*3+j]/precision/MAX_FVAL); |