summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMagnus Lundborg <lundborg.magnus@gmail.com>2013-10-28 15:30:28 (GMT)
committerMagnus Lundborg <lundborg.magnus@gmail.com>2013-10-28 15:30:28 (GMT)
commit148415f685e501334ac3fb5d6ce28ec70def7266 (patch)
treec871a1b3c414bab8726abff21f207342784478fc /include
parent5e2aa20f61229654d06111e6086ce8d417a7664b (diff)
One more function added in header.
Diffstat (limited to 'include')
-rw-r--r--include/tng_io.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/tng_io.h b/include/tng_io.h
index 2ab3e04..e536725 100644
--- a/include/tng_io.h
+++ b/include/tng_io.h
@@ -2977,6 +2977,30 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_with_time_double_write
const double *forces);
/**
+ * @brief High-level function for adding data to box shape data blocks. If the
+ * frame is at the beginning of a frame set the time stamp of the frame set
+ * is set.
+ * @param tng_data is the trajectory to use.
+ * @param frame_nr is the frame number of the data.
+ * @param time is the time stamp of the frame (in seconds).
+ * @param box_shape is a 1D array of data to add. The array should be of length 9.
+ * @details This function uses tng_util_generic_write() and will
+ * create a box shape data block if none exists. Box shapes are stored as 9
+ * values per frame and compressed using TNG compression.
+ * N.b. Since compressed data is written a whole block at a time the data is not
+ * actually written to disk until the frame set is finished or the TNG
+ * trajectory is closed.
+ * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
+ * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
+ * has occured.
+ */
+tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_with_time_write
+ (tng_trajectory_t tng_data,
+ const int64_t frame_nr,
+ const double time,
+ const float *box_shape);
+
+/**
* @brief High-level function for adding data to box shape data blocks at
* double precision. If the frame is at the beginning of a frame set the
* time stamp of the frame set is set.
contact: Jan Huwald // Impressum