summaryrefslogtreecommitdiff
path: root/src/tests/tng_io_testing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/tng_io_testing.c')
-rw-r--r--src/tests/tng_io_testing.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tests/tng_io_testing.c b/src/tests/tng_io_testing.c
index 7f778c0..c606217 100644
--- a/src/tests/tng_io_testing.c
+++ b/src/tests/tng_io_testing.c
@@ -1035,7 +1035,7 @@ tng_function_status tng_test_get_positions_data(tng_trajectory_t traj,
tng_function_status tng_test_utility_functions(tng_trajectory_t traj, const char hash_mode)
{
tng_function_status stat;
- int64_t n_particles, i, j, k, codec_id;
+ int64_t n_particles, i, j, k, codec_id, n_frames, n_frames_per_frame_set;
int64_t n_frames_to_read=30, stride_len, next_frame, n_blocks, *block_ids = 0;
double time, multiplier;
float *positions = 0;
@@ -1057,6 +1057,14 @@ tng_function_status tng_test_utility_functions(tng_trajectory_t traj, const char
return(stat);
}
+ tng_num_frames_per_frame_set_get(traj, &n_frames_per_frame_set);
+
+ stat = tng_util_num_frames_with_data_of_block_id_get(traj, TNG_TRAJ_POSITIONS, &n_frames);
+ if(stat != TNG_SUCCESS || n_frames != n_frames_per_frame_set * N_FRAME_SETS)
+ {
+ return(stat);
+ }
+
tng_num_particles_get(traj, &n_particles);
stat = tng_util_pos_read_range(traj, 1, n_frames_to_read, &positions, &stride_len);
contact: Jan Huwald // Impressum