diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-04-18 09:57:39 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-04-18 09:57:39 (GMT) |
commit | b054bef7b59e535bb696b1c7a58b33f94af6ab43 (patch) | |
tree | f245b01a604da64c01faf39f439806edae8082c0 /include | |
parent | dc88a1b81befe574228c00712530a53ce9245c60 (diff) |
Add tng_num_frames_get() to get the number of frames in the trajectory. Added to reading example as well.
Diffstat (limited to 'include')
-rw-r--r-- | include/tng_io.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/tng_io.h b/include/tng_io.h index 96d9fc1..7b685bb 100644 --- a/include/tng_io.h +++ b/include/tng_io.h @@ -797,6 +797,16 @@ tng_function_status tng_input_file_len_get(const tng_trajectory_t tng_data, int64_t *len); /** + * @brief Get the number of frames in the trajectory + * @param tng_data the trajectory of which to get the number of frames. + * @param n is pointing to a value set to the number of frames. + * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error + * has occurred (could not find last frame set). + */ +tng_function_status tng_num_frames_get(const tng_trajectory_t tng_data, + int64_t *n); + +/** * @brief Get the current number of particles. * @param tng_data is the trajectory from which to get the number of particles. * @param n is pointing to a value set to the number of particles. |