1 /* This code is part of the tng binary trajectory format.
3 * Written by Magnus Lundborg
4 * Copyright (c) 2012-2013, The GROMACS development team.
5 * Check out http://www.gromacs.org for more information.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the Revised BSD License.
12 #include "../../include/tng_io.h"
14 /* The following is for calling the library from fortran */
16 tng_function_status DECLSPECDLLEXPORT tng_trajectory_init_(tng_trajectory_t *tng_data_p)
18 return(tng_trajectory_init(tng_data_p));
21 tng_function_status DECLSPECDLLEXPORT tng_trajectory_destroy_(tng_trajectory_t *tng_data_p)
23 return(tng_trajectory_destroy(tng_data_p));
26 tng_function_status DECLSPECDLLEXPORT tng_trajectory_init_from_src_(tng_trajectory_t src,
27 tng_trajectory_t *dest_p)
29 return(tng_trajectory_init_from_src(src, dest_p));
32 tng_function_status DECLSPECDLLEXPORT tng_input_file_get_(const tng_trajectory_t tng_data,
33 char *file_name, const int max_len)
35 return(tng_input_file_get(tng_data, file_name, max_len));
38 tng_function_status DECLSPECDLLEXPORT tng_input_file_set_(tng_trajectory_t tng_data,
39 const char *file_name, int name_len)
41 char *name = malloc(name_len + 1);
42 tng_function_status stat;
44 strncpy(name, file_name, name_len);
46 stat = tng_input_file_set(tng_data, name);
51 tng_function_status DECLSPECDLLEXPORT tng_output_file_get_(const tng_trajectory_t tng_data,
52 char *file_name, const int max_len)
54 return(tng_output_file_get(tng_data, file_name, max_len));
57 tng_function_status DECLSPECDLLEXPORT tng_output_file_set_(tng_trajectory_t tng_data,
58 const char *file_name, int name_len)
60 char *name = malloc(name_len + 1);
61 tng_function_status stat;
63 strncpy(name, file_name, name_len);
65 stat = tng_output_file_set(tng_data, name);
70 tng_function_status DECLSPECDLLEXPORT tng_first_program_name_get_(const tng_trajectory_t tng_data,
71 char *name, const int max_len)
73 return(tng_first_program_name_get(tng_data, name, max_len));
76 tng_function_status DECLSPECDLLEXPORT tng_output_file_endianness_get_
77 (tng_trajectory_t tng_data, tng_file_endianness *endianness)
79 return(tng_output_file_endianness_get(tng_data, endianness));
82 tng_function_status DECLSPECDLLEXPORT tng_output_file_endianness_set_
83 (tng_trajectory_t tng_data, const tng_file_endianness *endianness)
85 return(tng_output_file_endianness_set(tng_data, *endianness));
88 tng_function_status DECLSPECDLLEXPORT tng_first_program_name_set_(tng_trajectory_t tng_data,
92 char *name = malloc(name_len + 1);
93 tng_function_status stat;
95 strncpy(name, new_name, name_len);
97 stat = tng_first_program_name_set(tng_data, name);
102 tng_function_status DECLSPECDLLEXPORT tng_last_program_name_get_(const tng_trajectory_t tng_data,
103 char *name, const int max_len)
105 return(tng_last_program_name_get(tng_data, name, max_len));
108 tng_function_status DECLSPECDLLEXPORT tng_last_program_name_set_(tng_trajectory_t tng_data,
109 const char *new_name,
112 char *name = malloc(name_len + 1);
113 tng_function_status stat;
115 strncpy(name, new_name, name_len);
117 stat = tng_last_program_name_set(tng_data, name);
122 tng_function_status DECLSPECDLLEXPORT tng_first_user_name_get_(const tng_trajectory_t tng_data,
123 char *name, const int max_len)
125 return(tng_first_user_name_get(tng_data, name, max_len));
128 tng_function_status DECLSPECDLLEXPORT tng_first_user_name_set_(tng_trajectory_t tng_data,
129 const char *new_name,
132 char *name = malloc(name_len + 1);
133 tng_function_status stat;
135 strncpy(name, new_name, name_len);
137 stat = tng_first_user_name_set(tng_data, name);
142 tng_function_status DECLSPECDLLEXPORT tng_last_user_name_get_(const tng_trajectory_t tng_data,
143 char *name, const int max_len)
145 return(tng_last_user_name_get(tng_data, name, max_len));
148 tng_function_status DECLSPECDLLEXPORT tng_last_user_name_set_(tng_trajectory_t tng_data,
149 const char *new_name,
152 char *name = malloc(name_len + 1);
153 tng_function_status stat;
155 strncpy(name, new_name, name_len);
157 stat = tng_last_user_name_set(tng_data, name);
162 tng_function_status DECLSPECDLLEXPORT tng_first_computer_name_get_(const tng_trajectory_t tng_data,
163 char *name, const int max_len)
165 return(tng_first_computer_name_get(tng_data, name, max_len));
168 tng_function_status DECLSPECDLLEXPORT tng_first_computer_name_set_(tng_trajectory_t tng_data,
169 const char *new_name,
172 char *name = malloc(name_len + 1);
173 tng_function_status stat;
175 strncpy(name, new_name, name_len);
177 stat = tng_first_computer_name_set(tng_data, name);
182 tng_function_status DECLSPECDLLEXPORT tng_last_computer_name_get_(const tng_trajectory_t tng_data,
183 char *name, const int max_len)
185 return(tng_last_computer_name_get(tng_data, name, max_len));
188 tng_function_status DECLSPECDLLEXPORT tng_last_computer_name_set_(tng_trajectory_t tng_data,
189 const char *new_name,
192 char *name = malloc(name_len + 1);
193 tng_function_status stat;
195 strncpy(name, new_name, name_len);
197 stat = tng_last_computer_name_set(tng_data, name);
202 tng_function_status DECLSPECDLLEXPORT tng_first_signature_get_
203 (const tng_trajectory_t tng_data,
204 char *signature, const int max_len)
206 return(tng_first_signature_get(tng_data, signature, max_len));
209 tng_function_status DECLSPECDLLEXPORT tng_first_signature_set_(tng_trajectory_t tng_data,
210 const char *signature,
213 char *sign = malloc(sign_len + 1);
214 tng_function_status stat;
216 strncpy(sign, signature, sign_len);
218 stat = tng_first_signature_set(tng_data, sign);
223 tng_function_status DECLSPECDLLEXPORT tng_last_signature_get_
224 (const tng_trajectory_t tng_data,
225 char *signature, const int max_len)
227 return(tng_last_signature_get(tng_data, signature, max_len));
230 tng_function_status DECLSPECDLLEXPORT tng_last_signature_set_
231 (tng_trajectory_t tng_data,
232 const char *signature,
235 char *sign = malloc(sign_len + 1);
236 tng_function_status stat;
238 strncpy(sign, signature, sign_len);
240 stat = tng_last_signature_set(tng_data, sign);
245 tng_function_status DECLSPECDLLEXPORT tng_forcefield_name_get_
246 (const tng_trajectory_t tng_data,
247 char *name, const int max_len)
249 return(tng_forcefield_name_get(tng_data, name, max_len));
252 tng_function_status DECLSPECDLLEXPORT tng_forcefield_name_set_
253 (tng_trajectory_t tng_data,
254 const char *new_name,
257 char *name = malloc(name_len + 1);
258 tng_function_status stat;
260 strncpy(name, new_name, name_len);
262 stat = tng_forcefield_name_set(tng_data, name);
267 tng_function_status DECLSPECDLLEXPORT tng_medium_stride_length_get_
268 (const tng_trajectory_t tng_data,
271 return(tng_medium_stride_length_get(tng_data, len));
274 tng_function_status DECLSPECDLLEXPORT tng_medium_stride_length_set_
275 (tng_trajectory_t tng_data,
278 return(tng_medium_stride_length_set(tng_data, *len));
281 tng_function_status DECLSPECDLLEXPORT tng_long_stride_length_get_
282 (const tng_trajectory_t tng_data,
285 return(tng_long_stride_length_get(tng_data, len));
288 tng_function_status DECLSPECDLLEXPORT tng_long_stride_length_set_
289 (tng_trajectory_t tng_data,
292 return(tng_long_stride_length_set(tng_data, *len));
295 tng_function_status DECLSPECDLLEXPORT tng_time_per_frame_get_
296 (const tng_trajectory_t tng_data,
299 return(tng_time_per_frame_get(tng_data, time));
302 tng_function_status DECLSPECDLLEXPORT tng_time_per_frame_set_
303 (tng_trajectory_t tng_data,
306 return(tng_time_per_frame_set(tng_data, *time));
309 tng_function_status DECLSPECDLLEXPORT tng_input_file_len_get_
310 (const tng_trajectory_t tng_data,
313 return(tng_input_file_len_get(tng_data, len));
316 tng_function_status DECLSPECDLLEXPORT tng_num_frames_get_
317 (const tng_trajectory_t tng_data,
320 return(tng_num_frames_get(tng_data, n));
323 tng_function_status DECLSPECDLLEXPORT tng_num_particles_get_
324 (const tng_trajectory_t tng_data,
327 return(tng_num_particles_get(tng_data, n));
330 tng_function_status DECLSPECDLLEXPORT tng_num_molecules_get_
331 (const tng_trajectory_t tng_data,
334 return(tng_num_molecules_get(tng_data, n));
337 tng_function_status DECLSPECDLLEXPORT tng_distance_unit_exponential_get_
338 (const tng_trajectory_t tng_data,
341 return(tng_distance_unit_exponential_get(tng_data, exp));
344 tng_function_status DECLSPECDLLEXPORT tng_distance_unit_exponential_set_
345 (const tng_trajectory_t tng_data,
348 return(tng_distance_unit_exponential_set(tng_data, *exp));
351 tng_function_status DECLSPECDLLEXPORT tng_num_frames_per_frame_set_get_
352 (const tng_trajectory_t tng_data,
355 return(tng_num_frames_per_frame_set_get(tng_data, n));
358 tng_function_status DECLSPECDLLEXPORT tng_num_frames_per_frame_set_set_
359 (const tng_trajectory_t tng_data,
362 return(tng_num_frames_per_frame_set_set(tng_data, *n));
365 tng_function_status DECLSPECDLLEXPORT tng_num_frame_sets_get_
366 (const tng_trajectory_t tng_data,
369 return(tng_num_frame_sets_get(tng_data, n));
372 tng_function_status DECLSPECDLLEXPORT tng_current_frame_set_get_
373 (tng_trajectory_t tng_data,
374 tng_trajectory_frame_set_t *frame_set_p)
376 return(tng_current_frame_set_get(tng_data, frame_set_p));
379 tng_function_status DECLSPECDLLEXPORT tng_frame_set_nr_find_(tng_trajectory_t tng_data,
382 return(tng_frame_set_nr_find(tng_data, *nr));
385 tng_function_status DECLSPECDLLEXPORT tng_frame_set_of_frame_find_
386 (tng_trajectory_t tng_data,
387 const int64_t *frame)
389 return(tng_frame_set_of_frame_find(tng_data, *frame));
392 tng_function_status DECLSPECDLLEXPORT tng_frame_set_next_frame_set_file_pos_get_
393 (const tng_trajectory_t tng_data,
394 const tng_trajectory_frame_set_t frame_set,
397 return(tng_frame_set_next_frame_set_file_pos_get(tng_data, frame_set, pos));
400 tng_function_status DECLSPECDLLEXPORT tng_frame_set_prev_frame_set_file_pos_get_
401 (const tng_trajectory_t tng_data,
402 const tng_trajectory_frame_set_t frame_set,
405 return(tng_frame_set_prev_frame_set_file_pos_get(tng_data, frame_set, pos));
408 tng_function_status DECLSPECDLLEXPORT tng_frame_set_frame_range_get_
409 (const tng_trajectory_t tng_data,
410 const tng_trajectory_frame_set_t frame_set,
411 int64_t *first_frame,
414 return(tng_frame_set_frame_range_get(tng_data, frame_set, first_frame,
418 tng_function_status DECLSPECDLLEXPORT tng_molecule_init_(const tng_trajectory_t tng_data,
419 tng_molecule_t molecule)
421 return(tng_molecule_init(tng_data, molecule));
424 tng_function_status DECLSPECDLLEXPORT tng_molecule_destroy_
425 (const tng_trajectory_t tng_data,
426 tng_molecule_t molecule)
428 return(tng_molecule_destroy(tng_data, molecule));
431 tng_function_status DECLSPECDLLEXPORT tng_molecule_add_(tng_trajectory_t tng_data,
433 tng_molecule_t *molecule,
436 char *n = malloc(name_len + 1);
437 tng_function_status stat;
439 strncpy(n, name, name_len);
441 stat = tng_molecule_add(tng_data, n, molecule);
446 tng_function_status DECLSPECDLLEXPORT tng_molecule_name_set_(tng_trajectory_t tng_data,
447 tng_molecule_t molecule,
448 const char *new_name,
451 char *name = malloc(name_len + 1);
452 tng_function_status stat;
454 strncpy(name, new_name, name_len);
456 stat = tng_molecule_name_set(tng_data, molecule, name);
461 tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_get_(tng_trajectory_t tng_data,
462 tng_molecule_t molecule,
465 return(tng_molecule_cnt_get(tng_data, molecule, cnt));
468 tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_set_(tng_trajectory_t tng_data,
469 tng_molecule_t molecule,
472 return(tng_molecule_cnt_set(tng_data, molecule, *cnt));
475 tng_function_status DECLSPECDLLEXPORT tng_molecule_find_(tng_trajectory_t tng_data,
478 tng_molecule_t *molecule,
481 char *n = malloc(name_len + 1);
482 tng_function_status stat;
484 strncpy(n, name, name_len);
486 stat = tng_molecule_find(tng_data, n, nr, molecule);
491 tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_find_(tng_trajectory_t tng_data,
492 tng_molecule_t molecule,
498 char *n = malloc(name_len + 1);
499 tng_function_status stat;
501 strncpy(n, name, name_len);
503 stat = tng_molecule_chain_find(tng_data, molecule, n, id, chain);
508 tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_add_(tng_trajectory_t tng_data,
509 tng_molecule_t molecule,
514 char *n = malloc(name_len + 1);
515 tng_function_status stat;
517 strncpy(n, name, name_len);
519 stat = tng_molecule_chain_add(tng_data, molecule, n, chain);
524 tng_function_status DECLSPECDLLEXPORT tng_chain_name_set_(tng_trajectory_t tng_data,
526 const char *new_name,
529 char *name = malloc(name_len + 1);
530 tng_function_status stat;
532 strncpy(name, new_name, name_len);
534 stat = tng_chain_name_set(tng_data, chain, name);
539 tng_function_status DECLSPECDLLEXPORT tng_chain_residue_add_(tng_trajectory_t tng_data,
542 tng_residue_t *residue,
545 char *n = malloc(name_len + 1);
546 tng_function_status stat;
548 strncpy(n, name, name_len);
550 stat = tng_chain_residue_add(tng_data, chain, n, residue);
555 tng_function_status DECLSPECDLLEXPORT tng_residue_name_set_(tng_trajectory_t tng_data,
556 tng_residue_t residue,
557 const char *new_name,
560 char *name = malloc(name_len + 1);
561 tng_function_status stat;
563 strncpy(name, new_name, name_len);
565 stat = tng_residue_name_set(tng_data, residue, name);
570 tng_function_status DECLSPECDLLEXPORT tng_residue_atom_add_(tng_trajectory_t tng_data,
571 tng_residue_t residue,
572 const char *atom_name,
573 const char *atom_type,
578 char *name = malloc(name_len + 1);
579 char *type = malloc(type_len + 1);
580 tng_function_status stat;
582 strncpy(name, atom_name, name_len);
583 strncpy(type, atom_type, type_len);
586 stat = tng_residue_atom_add(tng_data, residue, name, type, atom);
592 tng_function_status DECLSPECDLLEXPORT tng_atom_name_set_(tng_trajectory_t tng_data,
594 const char *new_name,
597 char *name = malloc(name_len + 1);
598 tng_function_status stat;
600 strncpy(name, new_name, name_len);
602 stat = tng_atom_name_set(tng_data, atom, name);
607 tng_function_status DECLSPECDLLEXPORT tng_atom_type_set_(tng_trajectory_t tng_data,
609 const char *new_type,
612 char *type = malloc(type_len + 1);
613 tng_function_status stat;
615 strncpy(type, new_type, type_len);
617 stat = tng_atom_type_set(tng_data, atom, type);
622 tng_function_status DECLSPECDLLEXPORT tng_molecule_name_of_particle_nr_get_
623 (const tng_trajectory_t tng_data,
628 return(tng_molecule_name_of_particle_nr_get(tng_data, nr, name, max_len));
631 tng_function_status DECLSPECDLLEXPORT tng_chain_name_of_particle_nr_get_
632 (const tng_trajectory_t tng_data,
637 return(tng_chain_name_of_particle_nr_get(tng_data, nr, name, max_len));
640 tng_function_status DECLSPECDLLEXPORT tng_residue_name_of_particle_nr_get_
641 (const tng_trajectory_t tng_data,
646 return(tng_residue_name_of_particle_nr_get(tng_data, nr, name, max_len));
649 tng_function_status DECLSPECDLLEXPORT tng_residue_id_of_particle_nr_get_
650 (const tng_trajectory_t tng_data,
654 return(tng_residue_id_of_particle_nr_get(tng_data, nr, id));
657 tng_function_status DECLSPECDLLEXPORT tng_atom_name_of_particle_nr_get_
658 (const tng_trajectory_t tng_data,
663 return(tng_atom_name_of_particle_nr_get(tng_data, nr, name, max_len));
666 tng_function_status DECLSPECDLLEXPORT tng_atom_type_of_particle_nr_get_
667 (const tng_trajectory_t tng_data,
672 return(tng_atom_type_of_particle_nr_get(tng_data, nr, type, max_len));
675 tng_function_status DECLSPECDLLEXPORT tng_particle_mapping_add_
676 (tng_trajectory_t tng_data,
677 const int64_t *first_particle_number,
678 const int64_t *n_particles,
679 const int64_t *mapping_table)
681 return(tng_particle_mapping_add(tng_data, *first_particle_number,
682 *n_particles, mapping_table));
685 tng_function_status DECLSPECDLLEXPORT tng_file_headers_read_(tng_trajectory_t tng_data,
686 const char *hash_mode)
688 return(tng_file_headers_read(tng_data, *hash_mode));
691 tng_function_status DECLSPECDLLEXPORT tng_file_headers_write_
692 (tng_trajectory_t tng_data,
693 const char *hash_mode)
695 return(tng_file_headers_write(tng_data, *hash_mode));
698 tng_function_status DECLSPECDLLEXPORT tng_block_read_next_
699 (tng_trajectory_t tng_data,
700 tng_gen_block_t block_data,
701 const char *hash_mode)
703 return(tng_block_read_next(tng_data, block_data, *hash_mode));
706 tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_next_
707 (tng_trajectory_t tng_data,
708 const char *hash_mode)
710 return(tng_frame_set_read_next(tng_data, *hash_mode));
713 tng_function_status DECLSPECDLLEXPORT tng_frame_set_write_(tng_trajectory_t tng_data,
714 const char *hash_mode)
716 return(tng_frame_set_write(tng_data, *hash_mode));
719 tng_function_status DECLSPECDLLEXPORT tng_frame_set_new_(tng_trajectory_t tng_data,
720 const int64_t *first_frame,
721 const int64_t *n_frames)
723 return(tng_frame_set_new(tng_data, *first_frame, *n_frames));
726 tng_function_status DECLSPECDLLEXPORT tng_frame_set_with_time_new_
727 (tng_trajectory_t tng_data,
728 const int64_t *first_frame,
729 const int64_t *n_frames,
730 const double *first_frame_time)
732 return(tng_frame_set_with_time_new(tng_data, *first_frame, *n_frames,
736 tng_function_status DECLSPECDLLEXPORT tng_frame_set_first_frame_time_set_
737 (tng_trajectory_t tng_data,
738 const double *first_frame_time)
740 return(tng_frame_set_first_frame_time_set(tng_data, *first_frame_time));
743 tng_function_status DECLSPECDLLEXPORT tng_data_block_add_
744 (tng_trajectory_t tng_data,
746 const char *block_name,
747 const char *datatype,
748 const char *block_type_flag,
750 const int64_t *n_values_per_frame,
751 const int64_t *stride_length,
752 const int64_t *codec_id,
756 char *name = malloc(name_len + 1);
757 tng_function_status stat;
759 strncpy(name, block_name, name_len);
761 stat = tng_data_block_add(tng_data, *id, name, *datatype, *block_type_flag,
762 *n_frames, *n_values_per_frame, *stride_length,
763 *codec_id, new_data);
768 tng_function_status DECLSPECDLLEXPORT tng_particle_data_block_add_
769 (tng_trajectory_t tng_data,
771 const char *block_name,
772 const char *datatype,
773 const char *block_type_flag,
775 const int64_t *n_values_per_frame,
776 const int64_t *stride_length,
777 const int64_t *first_particle_number,
778 const int64_t *n_particles,
779 const int64_t *codec_id,
783 char *name = malloc(name_len + 1);
784 tng_function_status stat;
786 strncpy(name, block_name, name_len);
788 stat = tng_particle_data_block_add(tng_data, *id, name, *datatype,
789 *block_type_flag, *n_frames,
790 *n_values_per_frame, *stride_length,
791 *first_particle_number, *n_particles,
792 *codec_id, new_data);
797 tng_function_status DECLSPECDLLEXPORT tng_frame_data_write_
798 (tng_trajectory_t tng_data,
799 const int64_t *frame_nr,
800 const int64_t *block_id,
802 const char *hash_mode)
804 return(tng_frame_data_write(tng_data, *frame_nr, *block_id, data,
808 tng_function_status DECLSPECDLLEXPORT tng_frame_particle_data_write_
809 (tng_trajectory_t tng_data,
810 const int64_t *frame_nr,
811 const int64_t *block_id,
812 const int64_t *val_first_particle,
813 const int64_t *val_n_particles,
815 const char *hash_mode)
817 return(tng_frame_particle_data_write(tng_data, *frame_nr, *block_id,
818 *val_first_particle, *val_n_particles,
822 tng_function_status DECLSPECDLLEXPORT tng_data_values_free_
823 (const tng_trajectory_t tng_data,
824 union data_values **values,
825 const int64_t *n_frames,
826 const int64_t *n_values_per_frame,
829 return(tng_data_values_free(tng_data, values, *n_frames,
830 *n_values_per_frame, *type));
833 tng_function_status DECLSPECDLLEXPORT tng_particle_data_values_free_
834 (const tng_trajectory_t tng_data,
835 union data_values ***values,
836 const int64_t *n_frames,
837 const int64_t *n_particles,
838 const int64_t *n_values_per_frame,
841 return(tng_particle_data_values_free(tng_data, values, *n_frames, *n_particles,
842 *n_values_per_frame, *type));
845 tng_function_status DECLSPECDLLEXPORT tng_data_get_
846 (tng_trajectory_t tng_data,
847 const int64_t *block_id,
848 union data_values ***values,
850 int64_t *n_values_per_frame,
853 return(tng_data_get(tng_data, *block_id, values, n_frames,
854 n_values_per_frame, type));
857 tng_function_status DECLSPECDLLEXPORT tng_data_interval_get_
858 (tng_trajectory_t tng_data,
859 const int64_t *block_id,
860 const int64_t *start_frame_nr,
861 const int64_t *end_frame_nr,
862 const char *hash_mode,
863 union data_values ***values,
864 int64_t *n_values_per_frame,
867 return(tng_data_interval_get(tng_data, *block_id, *start_frame_nr,
868 *end_frame_nr, *hash_mode, values,
869 n_values_per_frame, type));
872 tng_function_status DECLSPECDLLEXPORT tng_particle_data_get_
873 (tng_trajectory_t tng_data,
874 const int64_t *block_id,
875 union data_values ****values,
877 int64_t *n_particles,
878 int64_t *n_values_per_frame,
881 return(tng_particle_data_get(tng_data, *block_id, values, n_frames,
882 n_particles, n_values_per_frame, type));
885 tng_function_status DECLSPECDLLEXPORT tng_particle_data_interval_get_
886 (tng_trajectory_t tng_data,
887 const int64_t *block_id,
888 const int64_t *start_frame_nr,
889 const int64_t *end_frame_nr,
890 const char *hash_mode,
891 union data_values ****values,
892 int64_t *n_particles,
893 int64_t *n_values_per_frame,
896 return(tng_particle_data_interval_get(tng_data, *block_id, *start_frame_nr,
897 *end_frame_nr, *hash_mode, values,
898 n_particles, n_values_per_frame,
902 tng_function_status DECLSPECDLLEXPORT tng_time_get_str_
903 (const tng_trajectory_t tng_data,
904 char *time, int64_t str_len)
906 return(tng_time_get_str(tng_data, time));
909 tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_open_
910 (const char *filename, const char *mode,
911 tng_trajectory_t *tng_data_p)
913 return(tng_util_trajectory_open(filename, *mode, tng_data_p));
916 tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_close_
917 (tng_trajectory_t *tng_data_p)
919 return(tng_util_trajectory_close(tng_data_p));
922 tng_function_status DECLSPECDLLEXPORT tng_util_pos_read_
923 (tng_trajectory_t tng_data,
925 int64_t *stride_length)
927 return(tng_util_pos_read(tng_data, positions, stride_length));
930 tng_function_status DECLSPECDLLEXPORT tng_util_vel_read_
931 (tng_trajectory_t tng_data,
933 int64_t *stride_length)
935 return(tng_util_vel_read(tng_data, velocities, stride_length));
938 tng_function_status DECLSPECDLLEXPORT tng_util_force_read_
939 (tng_trajectory_t tng_data,
941 int64_t *stride_length)
943 return(tng_util_force_read(tng_data, forces, stride_length));
946 tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_read_
947 (tng_trajectory_t tng_data,
949 int64_t *stride_length)
951 return(tng_util_box_shape_read(tng_data, box_shape, stride_length));
954 tng_function_status DECLSPECDLLEXPORT tng_util_pos_read_range_
955 (tng_trajectory_t tng_data,
956 const int64_t *first_frame,
957 const int64_t *last_frame,
959 int64_t *stride_length)
961 return(tng_util_pos_read_range(tng_data, *first_frame, *last_frame,
962 positions, stride_length));
965 tng_function_status DECLSPECDLLEXPORT tng_util_vel_read_range_
966 (tng_trajectory_t tng_data,
967 const int64_t *first_frame,
968 const int64_t *last_frame,
970 int64_t *stride_length)
972 return(tng_util_vel_read_range(tng_data, *first_frame, *last_frame,
973 velocities, stride_length));
976 tng_function_status DECLSPECDLLEXPORT tng_util_force_read_range_
977 (tng_trajectory_t tng_data,
978 const int64_t *first_frame,
979 const int64_t *last_frame,
981 int64_t *stride_length)
983 return(tng_util_force_read_range(tng_data, *first_frame, *last_frame,
984 forces, stride_length));
987 tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_read_range_
988 (tng_trajectory_t tng_data,
989 const int64_t *first_frame,
990 const int64_t *last_frame,
992 int64_t *stride_length)
994 return(tng_util_box_shape_read_range(tng_data, *first_frame, *last_frame,
995 box_shape, stride_length));
998 tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_frequency_set_
999 (tng_trajectory_t tng_data,
1001 const int64_t *n_values_per_frame,
1002 const int64_t *block_id,
1003 const char *block_name,
1004 const char *particle_dependency,
1005 const char *compression)
1007 return(tng_util_generic_write_frequency_set(tng_data, *f,
1008 *n_values_per_frame, *block_id,
1010 *particle_dependency,
1014 tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_frequency_set_
1015 (tng_trajectory_t tng_data,
1018 return(tng_util_pos_write_frequency_set(tng_data, *f));
1021 tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_frequency_set_
1022 (tng_trajectory_t tng_data,
1025 return(tng_util_vel_write_frequency_set(tng_data, *f));
1028 tng_function_status DECLSPECDLLEXPORT tng_util_force_write_frequency_set_
1029 (tng_trajectory_t tng_data,
1032 return(tng_util_force_write_frequency_set(tng_data, *f));
1035 tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_frequency_set_
1036 (tng_trajectory_t tng_data,
1039 return(tng_util_box_shape_write_frequency_set(tng_data, *f));
1042 tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_
1043 (tng_trajectory_t tng_data,
1044 const int64_t *frame_nr,
1045 const float *values,
1046 const int64_t *n_values_per_frame,
1047 const int64_t *block_id,
1048 const char *block_name,
1049 const char *particle_dependency,
1050 const char *compression)
1052 return(tng_util_generic_write(tng_data, *frame_nr, values,
1053 *n_values_per_frame, *block_id, block_name,
1054 *particle_dependency, *compression));
1057 tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_
1058 (tng_trajectory_t tng_data,
1059 const int64_t *frame_nr,
1060 const float *positions)
1062 return(tng_util_vel_write(tng_data, *frame_nr, positions));
1065 tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_
1066 (tng_trajectory_t tng_data,
1067 const int64_t *frame_nr,
1068 const float *velocities)
1070 return(tng_util_vel_write(tng_data, *frame_nr, velocities));
1073 tng_function_status DECLSPECDLLEXPORT tng_util_force_write_
1074 (tng_trajectory_t tng_data,
1075 const int64_t *frame_nr,
1076 const float *forces)
1078 return(tng_util_force_write(tng_data, *frame_nr, forces));
1081 tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_
1082 (tng_trajectory_t tng_data,
1083 const int64_t *frame_nr,
1084 const float *box_shape)
1086 return(tng_util_box_shape_write(tng_data, *frame_nr, box_shape));
1089 tng_function_status DECLSPECDLLEXPORT tng_util_pos_with_time_write_
1090 (tng_trajectory_t tng_data,
1091 const int64_t *frame_nr,
1092 const int64_t *time,
1093 const float *positions)
1095 return(tng_util_pos_with_time_write(tng_data, *frame_nr, *time,
1099 tng_function_status DECLSPECDLLEXPORT tng_util_vel_with_time_write_
1100 (tng_trajectory_t tng_data,
1101 const int64_t *frame_nr,
1102 const int64_t *time,
1103 const float *velocities)
1105 return(tng_util_vel_with_time_write(tng_data, *frame_nr, *time,
1109 tng_function_status DECLSPECDLLEXPORT tng_util_force_with_time_write_
1110 (tng_trajectory_t tng_data,
1111 const int64_t *frame_nr,
1112 const int64_t *time,
1113 const float *forces)
1115 return(tng_util_force_with_time_write(tng_data, *frame_nr, *time,
1119 tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_with_time_write_
1120 (tng_trajectory_t tng_data,
1121 const int64_t *frame_nr,
1122 const int64_t *time,
1123 const float *box_shape)
1125 return(tng_util_box_shape_with_time_write(tng_data, *frame_nr, *time,