From 818e9a500896a07f885be77aac840117ffe6af85 Mon Sep 17 00:00:00 2001 From: James Graham <J.A.Graham@soton.ac.uk> Date: Tue, 15 Aug 2017 11:18:34 +0100 Subject: [PATCH] Made output every 100 frames - 10x faster on xtcs with few atoms --- xtc-length.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xtc-length.c b/xtc-length.c index c34ed8d..a60c05a 100644 --- a/xtc-length.c +++ b/xtc-length.c @@ -49,7 +49,7 @@ int get_xtc_num_frames(const char *filename, int *nframes, int *natoms, float *p frame_size = u4_from_buffer(header+88); /* Read frame size from header */ skip = (frame_size+3) & ~((uint32_t)3); /* Round up to 4 byte boundary */ avg_frame_size += (skip - avg_frame_size + 92) / *nframes; - if(!quiet && *nframes % 10 == 0){ + if(!quiet && *nframes % 100 == 0){ est_nframes = (int)(size / avg_frame_size); ps_tmp = u4_from_buffer(header+12); memcpy(psec, &ps_tmp, 4); -- GitLab