diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-02-08 16:15:54 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-02-08 16:15:54 (GMT) |
commit | e753a0776bd1496d05e8d191a957e0b2eeb7f019 (patch) | |
tree | 8ebd1ee6e3a86904f62e910f8f1802639ee047f1 /src | |
parent | c5020baa6a27af8288d79f02f9ea646ae580710a (diff) |
Add a standard block ID for partial charges.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/tng_io.h | 7 | ||||
-rw-r--r-- | src/tests/tng_io_testing.c | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/tng_io.h b/src/lib/tng_io.h index 9fa13b2..031ca65 100644 --- a/src/lib/tng_io.h +++ b/src/lib/tng_io.h @@ -287,12 +287,13 @@ typedef enum {TNG_GENERAL_INFO, TNG_TRAJECTORY_FRAME_SET, TNG_PARTICLE_MAPPING} tng_non_trajectory_block_ids; -/** Block IDs of standard trajectory blocks. Box shape can be either a - * trajectory block or a non-trajectory block */ +/** Block IDs of standard trajectory blocks. Box shape and partial charges can + * be either trajectory blocks or non-trajectory blocks */ typedef enum {TNG_TRAJ_BOX_SHAPE = 10000, TNG_TRAJ_POSITIONS, TNG_TRAJ_VELOCITIES, - TNG_TRAJ_FORCES} tng_trajectory_block_ids; + TNG_TRAJ_FORCES, + TNG_TRAJ_PARTIAL_CHARGES} tng_trajectory_block_ids; /** Flag to specify if a data block contains data related to particles or not.*/ typedef enum {TNG_NON_PARTICLE_BLOCK_DATA, diff --git a/src/tests/tng_io_testing.c b/src/tests/tng_io_testing.c index 7b88a9f..07852eb 100644 --- a/src/tests/tng_io_testing.c +++ b/src/tests/tng_io_testing.c @@ -197,8 +197,8 @@ static tng_function_status tng_test_write_and_read_traj(tng_trajectory_t traj) printf("Failed setting partial charges.\n"); return(TNG_CRITICAL); } - /* There is no ID for partial charges data in the standard. Make an ID up.*/ - stat = tng_particle_data_block_add(traj, 10099, "PARTIAL CHARGES", + + stat = tng_particle_data_block_add(traj, TNG_TRAJ_PARTIAL_CHARGES, "PARTIAL CHARGES", TNG_FLOAT_DATA, TNG_NON_TRAJECTORY_BLOCK, 1, 1, 1, 0, n_particles, TNG_UNCOMPRESSED, charges); |