summaryrefslogtreecommitdiff
path: root/src/tests/tng_io_read_pos_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/tng_io_read_pos_util.c')
-rw-r--r--src/tests/tng_io_read_pos_util.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/tests/tng_io_read_pos_util.c b/src/tests/tng_io_read_pos_util.c
index 322f4a4..e7b00d3 100644
--- a/src/tests/tng_io_read_pos_util.c
+++ b/src/tests/tng_io_read_pos_util.c
@@ -24,7 +24,7 @@ int main(int argc, char **argv)
tng_trajectory_t traj;
/* Assume that the data is stored as floats. The data is placed in 1-D
* arrays */
- float *positions = 0, *velocities = 0, *forces = 0;
+ float *positions = 0, *box_shape = 0;
int64_t n_particles, n_frames, tot_n_frames, stride_length, i, j;
// Set a default frame range
int64_t first_frame = 0, last_frame = 5000;
@@ -73,6 +73,21 @@ int main(int argc, char **argv)
last_frame = tot_n_frames - 1;
}
+ if(tng_util_box_shape_read(traj, &box_shape, &stride_length) ==
+ TNG_SUCCESS)
+ {
+ printf("Simulation box shape: ");
+ for(i=0; i < 9; i++)
+ {
+ printf("%f ", box_shape[i]);
+ }
+ printf("\n");
+ }
+ else
+ {
+ printf("Simulation box shape not set in the file (or could not be read)\n");
+ }
+
n_frames = last_frame - first_frame + 1;
contact: Jan Huwald // Impressum