diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/tng_io.h | 14 | ||||
-rw-r--r-- | include/tng_io.hpp | 20 |
2 files changed, 30 insertions, 4 deletions
diff --git a/include/tng_io.h b/include/tng_io.h index 719d416..621d6b2 100644 --- a/include/tng_io.h +++ b/include/tng_io.h @@ -843,6 +843,20 @@ tng_function_status tng_num_frames_per_frame_set_get int64_t *n); /** + * @brief Set the number of frames per frame set. + * @param tng_data is the trajectory of which to set the number of frames + * per frame set. + * @param n is the number of frames per frame set. + * @details This does not affect already existing frame sets. For + * consistency the number of frames per frame set should be set + * betfore creating any frame sets. + * @return TNG_SUCCESS (0) if successful. + */ +tng_function_status tng_num_frames_per_frame_set_set + (const tng_trajectory_t tng_data, + const int64_t n); + +/** * @brief Get the number of frame sets. * @details This updates tng_data->n_trajectory_frame_sets before returning it. * @param tng_data is the trajectory from which to get the number of frame sets. diff --git a/include/tng_io.hpp b/include/tng_io.hpp index 4a2cabf..4e420b0 100644 --- a/include/tng_io.hpp +++ b/include/tng_io.hpp @@ -1,5 +1,5 @@ #ifndef _TNGIO_HPP -#define _TNGIO_HPP +#define _TNGIO_HPP #include "tng_io.h" @@ -31,7 +31,7 @@ public: friend class Residue; friend class Chain; friend class Molecule; - + //! Normal constructor Trajectory() { status = tng_trajectory_init(&traj); } @@ -448,6 +448,18 @@ public: return status = tng_num_frames_per_frame_set_get(traj,n); } + /** + * @brief Set the number of frames per frame set. + * @param n is the number of frames per frame set. + * @details This does not affect already existing frame sets. For + * consistency the number of frames per frame set should be set + * betfore creating any frame sets. + * @return TNG_SUCCESS (0) if successful. + */ + tng_function_status setNumFramesPerFrameSet(const int64_t n) + { + return status = tng_num_frames_per_frame_set_set(traj,n); + } /** * @brief Get the number of frame sets. @@ -1072,7 +1084,7 @@ public: Molecule(Trajectory * trajectory) { traj = trajectory; - + //status = tng_molecule_init(traj->traj,mol); } /** @@ -1291,4 +1303,4 @@ public: }; } -#endif +#endif |