TNG API  1.7.8
A flexible binary trajectory format
tng_io.h
Go to the documentation of this file.
1 /* This code is part of the tng binary trajectory format.
2  *
3  * Written by Magnus Lundborg
4  * Copyright (c) 2012-2014, The GROMACS development team.
5  * Check out http://www.gromacs.org for more information.
6  *
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the Revised BSD License.
10  */
11 
297 #ifndef TNG_IO_H
298 #define TNG_IO_H 1
299 
300 #include <stdio.h>
301 #include <stdlib.h>
302 #include <string.h>
303 #include <assert.h>
304 #include "tng_io_fwd.h"
305 
306 #ifdef USE_STD_INTTYPES_H
307 #include <inttypes.h>
308 #else
309 /* Visual Studio does not contain inttypes.h and stdint.h. Some defines and
310  * typedefs are used from the GNU C Library */
311 #ifdef _MSC_VER
312 
313 typedef __int32 int32_t;
314 typedef unsigned __int32 uint32_t;
315 typedef __int64 int64_t;
316 typedef unsigned __int64 uint64_t;
317 
318 #else
319 #include <stdint.h>
320 #endif /* _MSC_VER */
321 
322 /* This is from inttypes.h (GNU C Library) */
323 /* The ISO C99 standard specifies that these macros must only be
324  defined if explicitly requested. */
325 #if !defined __cplusplus || defined __STDC_FORMAT_MACROS
326 
327 # if __WORDSIZE == 64
328 # define __PRI64_PREFIX "l"
329 # define __PRIPTR_PREFIX "l"
330 # else
331 # define __PRI64_PREFIX "ll"
332 # define __PRIPTR_PREFIX
333 # endif
334 
335 /* From stdint.h (GNU C Library) */
336 /* Macros for printing format specifiers. */
337 /* Decimal notation. */
338 #ifndef PRId64
339 # define PRId64 __PRI64_PREFIX "d"
340 #endif
341 
342 #ifndef PRIu64
343 # define PRIu64 __PRI64_PREFIX "u"
344 #endif
345 
346 #ifndef PRIuPTR
347 # define PRIuPTR __PRIPTR_PREFIX "u"
348 #endif
349 
350 #endif
351 
352 #endif /* USE_STD_INTTYPES_H */
353 
354 #ifndef USE_WINDOWS
355 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
356 #define USE_WINDOWS
357 #endif /* win32... */
358 #endif /* not defined USE_WINDOWS */
359 
360 #ifndef DECLSPECDLLEXPORT
361 #ifdef USE_WINDOWS
362 #define DECLSPECDLLEXPORT __declspec(dllexport)
363 #else /* USE_WINDOWS */
364 #define DECLSPECDLLEXPORT
365 #endif /* USE_WINDOWS */
366 #endif /* DECLSPECDLLEXPORT */
367 
369 #define TNG_FRAME_DEPENDENT 1
370 
371 #define TNG_PARTICLE_DEPENDENT 2
372 
374 #define TNG_MAX_DATE_STR_LEN 24
375 
376 #define TNG_MD5_HASH_LEN 16
377 
378 #define TNG_MAX_STR_LEN 1024
379 
380 #ifndef NDEBUG
381 #define TNG_ASSERT(cnd, msg) if(!(cnd)) {printf("%s\n", msg); assert(cnd);}
382 #else
383 #define TNG_ASSERT(cnd, msg) (void)0;
384 #endif
385 
387 typedef enum {TNG_BIG_ENDIAN,
389 
391 typedef enum {TNG_BIG_ENDIAN_32,
394 
396 typedef enum {TNG_BIG_ENDIAN_64,
401 
403 typedef enum {TNG_UNCOMPRESSED,
407 
409 typedef enum {TNG_NO_HASH,
412 
415 
420 #define TNG_GENERAL_INFO 0x0000000000000000LL
421 #define TNG_MOLECULES 0x0000000000000001LL
422 #define TNG_TRAJECTORY_FRAME_SET 0x0000000000000002LL
423 #define TNG_PARTICLE_MAPPING 0x0000000000000003LL
424 
431 #define TNG_TRAJ_BOX_SHAPE 0x0000000010000000LL
432 #define TNG_TRAJ_POSITIONS 0x0000000010000001LL
433 #define TNG_TRAJ_VELOCITIES 0x0000000010000002LL
434 #define TNG_TRAJ_FORCES 0x0000000010000003LL
435 #define TNG_TRAJ_PARTIAL_CHARGES 0x0000000010000004LL
436 #define TNG_TRAJ_FORMAL_CHARGES 0x0000000010000005LL
437 #define TNG_TRAJ_B_FACTORS 0x0000000010000006LL
438 #define TNG_TRAJ_ANISOTROPIC_B_FACTORS 0x0000000010000007LL
439 #define TNG_TRAJ_OCCUPANCY 0x0000000010000008LL
440 #define TNG_TRAJ_GENERAL_COMMENTS 0x0000000010000009LL
441 
448 #define TNG_GMX_LAMBDA 0x1000000010000000LL
449 #define TNG_GMX_ENERGY_ANGLE 0x1000000010000001LL
450 #define TNG_GMX_ENERGY_RYCKAERT_BELL 0x1000000010000002LL
451 #define TNG_GMX_ENERGY_LJ_14 0x1000000010000003LL
452 #define TNG_GMX_ENERGY_COULOMB_14 0x1000000010000004LL
453 #define TNG_GMX_ENERGY_LJ_(SR) 0x1000000010000005LL
454 #define TNG_GMX_ENERGY_COULOMB_(SR) 0x1000000010000006LL
455 #define TNG_GMX_ENERGY_COUL_RECIP 0x1000000010000007LL
456 #define TNG_GMX_ENERGY_POTENTIAL 0x1000000010000008LL
457 #define TNG_GMX_ENERGY_KINETIC_EN 0x1000000010000009LL
458 #define TNG_GMX_ENERGY_TOTAL_ENERGY 0x1000000010000010LL
459 #define TNG_GMX_ENERGY_TEMPERATURE 0x1000000010000011LL
460 #define TNG_GMX_ENERGY_PRESSURE 0x1000000010000012LL
461 #define TNG_GMX_ENERGY_CONSTR_RMSD 0x1000000010000013LL
462 #define TNG_GMX_ENERGY_CONSTR2_RMSD 0x1000000010000014LL
463 #define TNG_GMX_ENERGY_BOX_X 0x1000000010000015LL
464 #define TNG_GMX_ENERGY_BOX_Y 0x1000000010000016LL
465 #define TNG_GMX_ENERGY_BOX_Z 0x1000000010000017LL
466 #define TNG_GMX_ENERGY_BOXXX 0x1000000010000018LL
467 #define TNG_GMX_ENERGY_BOXYY 0x1000000010000019LL
468 #define TNG_GMX_ENERGY_BOXZZ 0x1000000010000020LL
469 #define TNG_GMX_ENERGY_BOXYX 0x1000000010000021LL
470 #define TNG_GMX_ENERGY_BOXZX 0x1000000010000022LL
471 #define TNG_GMX_ENERGY_BOXZY 0x1000000010000023LL
472 #define TNG_GMX_ENERGY_BOXVELXX 0x1000000010000024LL
473 #define TNG_GMX_ENERGY_BOXVELYY 0x1000000010000025LL
474 #define TNG_GMX_ENERGY_BOXVELZZ 0x1000000010000026LL
475 #define TNG_GMX_ENERGY_BOXVELYX 0x1000000010000027LL
476 #define TNG_GMX_ENERGY_BOXVELZX 0x1000000010000028LL
477 #define TNG_GMX_ENERGY_BOXVELZY 0x1000000010000029LL
478 #define TNG_GMX_ENERGY_VOLUME 0x1000000010000030LL
479 #define TNG_GMX_ENERGY_DENSITY 0x1000000010000031LL
480 #define TNG_GMX_ENERGY_PV 0x1000000010000032LL
481 #define TNG_GMX_ENERGY_ENTHALPY 0x1000000010000033LL
482 #define TNG_GMX_ENERGY_VIR_XX 0x1000000010000034LL
483 #define TNG_GMX_ENERGY_VIR_XY 0x1000000010000035LL
484 #define TNG_GMX_ENERGY_VIR_XZ 0x1000000010000036LL
485 #define TNG_GMX_ENERGY_VIR_YX 0x1000000010000037LL
486 #define TNG_GMX_ENERGY_VIR_YY 0x1000000010000038LL
487 #define TNG_GMX_ENERGY_VIR_YZ 0x1000000010000039LL
488 #define TNG_GMX_ENERGY_VIR_ZX 0x1000000010000040LL
489 #define TNG_GMX_ENERGY_VIR_ZY 0x1000000010000041LL
490 #define TNG_GMX_ENERGY_VIR_ZZ 0x1000000010000042LL
491 #define TNG_GMX_ENERGY_SHAKEVIR_XX 0x1000000010000043LL
492 #define TNG_GMX_ENERGY_SHAKEVIR_XY 0x1000000010000044LL
493 #define TNG_GMX_ENERGY_SHAKEVIR_XZ 0x1000000010000045LL
494 #define TNG_GMX_ENERGY_SHAKEVIR_YX 0x1000000010000046LL
495 #define TNG_GMX_ENERGY_SHAKEVIR_YY 0x1000000010000047LL
496 #define TNG_GMX_ENERGY_SHAKEVIR_YZ 0x1000000010000048LL
497 #define TNG_GMX_ENERGY_SHAKEVIR_ZX 0x1000000010000049LL
498 #define TNG_GMX_ENERGY_SHAKEVIR_ZY 0x1000000010000050LL
499 #define TNG_GMX_ENERGY_SHAKEVIR_ZZ 0x1000000010000051LL
500 #define TNG_GMX_ENERGY_FORCEVIR_XX 0x1000000010000052LL
501 #define TNG_GMX_ENERGY_FORCEVIR_XY 0x1000000010000053LL
502 #define TNG_GMX_ENERGY_FORCEVIR_XZ 0x1000000010000054LL
503 #define TNG_GMX_ENERGY_FORCEVIR_YX 0x1000000010000055LL
504 #define TNG_GMX_ENERGY_FORCEVIR_YY 0x1000000010000056LL
505 #define TNG_GMX_ENERGY_FORCEVIR_YZ 0x1000000010000057LL
506 #define TNG_GMX_ENERGY_FORCEVIR_ZX 0x1000000010000058LL
507 #define TNG_GMX_ENERGY_FORCEVIR_ZY 0x1000000010000059LL
508 #define TNG_GMX_ENERGY_FORCEVIR_ZZ 0x1000000010000060LL
509 #define TNG_GMX_ENERGY_PRES_XX 0x1000000010000061LL
510 #define TNG_GMX_ENERGY_PRES_XY 0x1000000010000062LL
511 #define TNG_GMX_ENERGY_PRES_XZ 0x1000000010000063LL
512 #define TNG_GMX_ENERGY_PRES_YX 0x1000000010000064LL
513 #define TNG_GMX_ENERGY_PRES_YY 0x1000000010000065LL
514 #define TNG_GMX_ENERGY_PRES_YZ 0x1000000010000066LL
515 #define TNG_GMX_ENERGY_PRES_ZX 0x1000000010000067LL
516 #define TNG_GMX_ENERGY_PRES_ZY 0x1000000010000068LL
517 #define TNG_GMX_ENERGY_PRES_ZZ 0x1000000010000069LL
518 #define TNG_GMX_ENERGY_SURFXSURFTEN 0x1000000010000070LL
519 #define TNG_GMX_ENERGY_MUX 0x1000000010000071LL
520 #define TNG_GMX_ENERGY_MUY 0x1000000010000072LL
521 #define TNG_GMX_ENERGY_MUZ 0x1000000010000073LL
522 #define TNG_GMX_ENERGY_VCOS 0x1000000010000074LL
523 #define TNG_GMX_ENERGY_VISC 0x1000000010000075LL
524 #define TNG_GMX_ENERGY_BAROSTAT 0x1000000010000076LL
525 #define TNG_GMX_ENERGY_T_SYSTEM 0x1000000010000077LL
526 #define TNG_GMX_ENERGY_LAMB_SYSTEM 0x1000000010000078LL
527 #define TNG_GMX_SELECTION_GROUP_NAMES 0x1000000010000079LL
528 #define TNG_GMX_ATOM_SELECTION_GROUP 0x1000000010000080LL
529 
534 
535 
536 typedef enum {TNG_FALSE, TNG_TRUE} tng_bool;
537 
542 
548 
553 
555 typedef enum {TNG_CHAR_DATA,
559 
560 
561 struct tng_trajectory;
562 struct tng_molecule;
563 struct tng_chain;
564 struct tng_residue;
565 struct tng_atom;
566 struct tng_bond;
567 struct tng_gen_block;
568 struct tng_particle_mapping;
569 struct tng_trajectory_frame_set;
570 struct tng_particle_data;
571 struct tng_non_particle_data;
572 
574 union data_values {
575  double d;
576  float f;
577  int64_t i;
578  char *c;
579 };
580 
581 
582 #ifdef __cplusplus
583 extern "C"
584 {
585 #endif
586 
603  (const tng_trajectory_t tng_data,
604  int *version);
605 
615  (const tng_trajectory_t tng_data,
616  int *version);
617 
627  (const tng_trajectory_t tng_data,
628  int *patch_level);
629 
643  (const tng_trajectory_t tng_data,
644  char *version,
645  const int max_len);
646 
656  (tng_trajectory_t *tng_data_p);
657 
666  (tng_trajectory_t *tng_data_p);
667 
684  (const tng_trajectory_t src, tng_trajectory_t *dest_p);
685 
701  (const tng_trajectory_t tng_data,
702  char *file_name, const int max_len);
703 
716  (const tng_trajectory_t tng_data,
717  const char *file_name);
718 
733 tng_function_status DECLSPECDLLEXPORT tng_output_file_get
734  (const tng_trajectory_t tng_data,
735  char *file_name, const int max_len);
736 
748 tng_function_status DECLSPECDLLEXPORT tng_output_file_set
749  (const tng_trajectory_t tng_data,
750  const char *file_name);
751 
765  (const tng_trajectory_t tng_data,
766  const char *file_name);
767 
781  (const tng_trajectory_t tng_data, tng_file_endianness *endianness);
782 
796  (const tng_trajectory_t tng_data,
797  const tng_file_endianness endianness);
798 
814  (const tng_trajectory_t tng_data,
815  char *name, const int max_len);
816 
829  (const tng_trajectory_t tng_data,
830  const char *new_name);
831 
847  (const tng_trajectory_t tng_data,
848  char *name, const int max_len);
849 
862  (const tng_trajectory_t tng_data,
863  const char *new_name);
864 
880  (const tng_trajectory_t tng_data,
881  char *name, const int max_len);
882 
895  (const tng_trajectory_t tng_data,
896  const char *new_name);
897 
913  (const tng_trajectory_t tng_data,
914  char *name, const int max_len);
915 
928  (const tng_trajectory_t tng_data,
929  const char *new_name);
930 
946  (const tng_trajectory_t tng_data,
947  char *name, const int max_len);
948 
961  (const tng_trajectory_t tng_data,
962  const char *new_name);
963 
979  (const tng_trajectory_t tng_data,
980  char *name, const int max_len);
981 
994  (const tng_trajectory_t tng_data,
995  const char *new_name);
996 
1012  (const tng_trajectory_t tng_data,
1013  char *signature, const int max_len);
1014 
1027  (const tng_trajectory_t tng_data,
1028  const char *signature);
1029 
1045  (const tng_trajectory_t tng_data,
1046  char *signature, const int max_len);
1047 
1060  (const tng_trajectory_t tng_data,
1061  const char *signature);
1062 
1078  (const tng_trajectory_t tng_data,
1079  char *name, const int max_len);
1080 
1093  (const tng_trajectory_t tng_data,
1094  const char *new_name);
1095 
1106  (const tng_trajectory_t tng_data,
1107  int64_t *len);
1108 
1119  (const tng_trajectory_t tng_data,
1120  const int64_t len);
1121 
1132  (const tng_trajectory_t tng_data,
1133  int64_t *len);
1134 
1145  (const tng_trajectory_t tng_data,
1146  const int64_t len);
1147 
1158  (const tng_trajectory_t tng_data,
1159  double *time);
1160 
1172  (const tng_trajectory_t tng_data,
1173  const double time);
1174 
1185  (const tng_trajectory_t tng_data,
1186  int64_t *len);
1187 
1201  (const tng_trajectory_t tng_data,
1202  int64_t *n);
1203 
1217  (const tng_trajectory_t tng_data,
1218  double *precision);
1219 
1231  (const tng_trajectory_t tng_data,
1232  const double precision);
1233 
1246  (const tng_trajectory_t tng_data,
1247  const int64_t n);
1248 
1261  (const tng_trajectory_t tng_data,
1262  int64_t *n);
1263 
1277  (const tng_trajectory_t tng_data,
1278  char *variable);
1279 
1290  (const tng_trajectory_t tng_data,
1291  int64_t *n);
1292 
1305  (const tng_trajectory_t tng_data,
1306  int64_t *n);
1307 
1319  (const tng_trajectory_t tng_data,
1320  int64_t **mol_cnt_list);
1321 
1334  (const tng_trajectory_t tng_data,
1335  int64_t *exp);
1336 
1348  (const tng_trajectory_t tng_data,
1349  const int64_t exp);
1350 
1362  (const tng_trajectory_t tng_data,
1363  int64_t *n);
1364 
1378  (const tng_trajectory_t tng_data,
1379  const int64_t n);
1380 
1393  (const tng_trajectory_t tng_data,
1394  int64_t *n);
1395 
1406  (const tng_trajectory_t tng_data,
1407  tng_trajectory_frame_set_t *frame_set_p);
1408 
1422  (const tng_trajectory_t tng_data,
1423  const int64_t nr);
1424 
1438  (const tng_trajectory_t tng_data,
1439  const int64_t frame);
1440 
1453  (const tng_trajectory_t tng_data,
1454  const tng_trajectory_frame_set_t frame_set,
1455  int64_t *pos);
1456 
1469  (const tng_trajectory_t tng_data,
1470  const tng_trajectory_frame_set_t frame_set,
1471  int64_t *pos);
1472 
1488  (const tng_trajectory_t tng_data,
1489  const tng_trajectory_frame_set_t frame_set,
1490  int64_t *first_frame,
1491  int64_t *last_frame);
1492 
1501  tng_molecule_t *molecule_p);
1502 
1513  tng_molecule_t *molecule_p);
1514 
1523  (const tng_trajectory_t tng_data,
1524  const tng_molecule_t molecule);
1525 
1536  (const tng_trajectory_t tng_data,
1537  const tng_molecule_t molecule);
1538 
1552  (const tng_trajectory_t tng_data,
1553  const char *name,
1554  tng_molecule_t *molecule);
1555 
1570  (const tng_trajectory_t tng_data,
1571  const char *name,
1572  const int64_t id,
1573  tng_molecule_t *molecule);
1574 
1586  (const tng_trajectory_t tng_data,
1587  tng_molecule_t *molecule);
1588 
1604  (const tng_trajectory_t tng_data,
1605  const tng_molecule_t molecule,
1606  char *name,
1607  const int max_len);
1608 
1622  (const tng_trajectory_t tng_data,
1623  const tng_molecule_t molecule,
1624  const char *new_name);
1625 
1639  (const tng_trajectory_t tng_data,
1640  const tng_molecule_t molecule,
1641  int64_t *cnt);
1642 
1654  (const tng_trajectory_t tng_data,
1655  const tng_molecule_t molecule,
1656  const int64_t cnt);
1657 
1676  (const tng_trajectory_t tng_data,
1677  const char *name,
1678  const int64_t id,
1679  tng_molecule_t *molecule);
1680 
1693  (const tng_trajectory_t tng_data,
1694  const int64_t index,
1695  tng_molecule_t *molecule);
1696 
1712  const tng_trajectory_t tng_data_dest);
1713 
1724  (const tng_trajectory_t tng_data,
1725  const tng_molecule_t molecule,
1726  int64_t *n);
1727 
1741  (const tng_trajectory_t tng_data,
1742  const tng_molecule_t molecule,
1743  const int64_t index,
1744  tng_chain_t *chain);
1745 
1756  (const tng_trajectory_t tng_data,
1757  const tng_molecule_t molecule,
1758  int64_t *n);
1759 
1773  (const tng_trajectory_t tng_data,
1774  const tng_molecule_t molecule,
1775  const int64_t index,
1776  tng_residue_t *residue);
1777 
1788  (const tng_trajectory_t tng_data,
1789  const tng_molecule_t molecule,
1790  int64_t *n);
1791 
1805  (const tng_trajectory_t tng_data,
1806  const tng_molecule_t molecule,
1807  const int64_t index,
1808  tng_atom_t *atom);
1809 
1829  (const tng_trajectory_t tng_data,
1830  const tng_molecule_t molecule,
1831  const char *name,
1832  const int64_t id,
1833  tng_chain_t *chain);
1834 
1849  (const tng_trajectory_t tng_data,
1850  const tng_molecule_t molecule,
1851  const char *name,
1852  tng_chain_t *chain);
1853 
1869  (const tng_trajectory_t tng_data,
1870  const tng_molecule_t molecule,
1871  const char *name,
1872  const int64_t id,
1873  tng_chain_t *chain);
1874 
1888  (const tng_trajectory_t tng_data,
1889  const tng_molecule_t molecule,
1890  const int64_t from_atom_id,
1891  const int64_t to_atom_id,
1892  tng_bond_t *bond);
1893 
1911  (const tng_trajectory_t tng_data,
1912  const tng_molecule_t molecule,
1913  const char *name,
1914  const int64_t id,
1915  tng_atom_t *atom);
1916 
1932  (const tng_trajectory_t tng_data,
1933  const tng_chain_t chain,
1934  char *name,
1935  const int max_len);
1936 
1948  (const tng_trajectory_t tng_data,
1949  const tng_chain_t chain,
1950  const char *new_name);
1951 
1962  (const tng_trajectory_t tng_data,
1963  const tng_chain_t chain,
1964  int64_t *n);
1965 
1979  (const tng_trajectory_t tng_data,
1980  const tng_chain_t chain,
1981  const int64_t index,
1982  tng_residue_t *residue);
1983 
2001  (const tng_trajectory_t tng_data,
2002  const tng_chain_t chain,
2003  const char *name,
2004  const int64_t id,
2005  tng_residue_t *residue);
2006 
2021  (const tng_trajectory_t tng_data,
2022  const tng_chain_t chain,
2023  const char *name,
2024  tng_residue_t *residue);
2025 
2041  (const tng_trajectory_t tng_data,
2042  const tng_chain_t chain,
2043  const char *name,
2044  const int64_t id,
2045  tng_residue_t *residue);
2046 
2062  (const tng_trajectory_t tng_data,
2063  const tng_residue_t residue,
2064  char *name,
2065  const int max_len);
2066 
2080  (const tng_trajectory_t tng_data,
2081  const tng_residue_t residue,
2082  const char *new_name);
2083 
2094  (const tng_trajectory_t tng_data,
2095  const tng_residue_t residue,
2096  int64_t *n);
2097 
2111  (const tng_trajectory_t tng_data,
2112  const tng_residue_t residue,
2113  const int64_t index,
2114  tng_atom_t *atom);
2115 
2133  (const tng_trajectory_t tng_data,
2134  const tng_residue_t residue,
2135  const char *atom_name,
2136  const char *atom_type,
2137  tng_atom_t *atom);
2138 
2157  (const tng_trajectory_t tng_data,
2158  const tng_residue_t residue,
2159  const char *atom_name,
2160  const char *atom_type,
2161  const int64_t id,
2162  tng_atom_t *atom);
2163 
2173  (const tng_trajectory_t tng_data,
2174  const tng_atom_t atom,
2175  tng_residue_t *residue);
2176 
2192  (const tng_trajectory_t tng_data,
2193  const tng_atom_t atom,
2194  char *name,
2195  const int max_len);
2196 
2210  (const tng_trajectory_t tng_data,
2211  const tng_atom_t atom,
2212  const char *new_name);
2213 
2229  (const tng_trajectory_t tng_data,
2230  const tng_atom_t atom,
2231  char *type,
2232  const int max_len);
2233 
2247  (const tng_trajectory_t tng_data,
2248  const tng_atom_t atom,
2249  const char *new_type);
2250 
2265 tng_function_status DECLSPECDLLEXPORT tng_molecule_name_of_particle_nr_get
2266  (const tng_trajectory_t tng_data,
2267  const int64_t nr,
2268  char *name,
2269  const int max_len);
2270 
2283  (const tng_trajectory_t tng_data,
2284  const int64_t nr,
2285  int64_t *id);
2286 
2312  (const tng_trajectory_t tng_data,
2313  int64_t *n_bonds,
2314  int64_t **from_atoms,
2315  int64_t **to_atoms);
2316 
2332  (const tng_trajectory_t tng_data,
2333  const int64_t nr,
2334  char *name,
2335  const int max_len);
2336 
2352  (const tng_trajectory_t tng_data,
2353  const int64_t nr,
2354  char *name,
2355  const int max_len);
2356 
2370  (const tng_trajectory_t tng_data,
2371  const int64_t nr,
2372  int64_t *id);
2373 
2387  (const tng_trajectory_t tng_data,
2388  const int64_t nr,
2389  int64_t *id);
2390 
2406  (const tng_trajectory_t tng_data,
2407  const int64_t nr,
2408  char *name,
2409  const int max_len);
2410 
2426  (const tng_trajectory_t tng_data,
2427  const int64_t nr,
2428  char *type,
2429  const int max_len);
2430 
2453  (const tng_trajectory_t tng_data,
2454  const int64_t num_first_particle,
2455  const int64_t n_particles,
2456  const int64_t *mapping_table);
2457 
2469  (const tng_trajectory_t tng_data);
2470 
2488  (const tng_trajectory_t tng_data,
2489  const char hash_mode);
2490 
2507  (const tng_trajectory_t tng_data,
2508  const char hash_mode);
2509 
2531  (const tng_trajectory_t tng_data,
2532  const tng_gen_block_t block_data,
2533  const char hash_mode);
2534 
2548  (const tng_trajectory_t tng_data,
2549  const char hash_mode);
2550 
2568  (const tng_trajectory_t tng_data,
2569  const char hash_mode,
2570  const int64_t block_id);
2571 
2588  (const tng_trajectory_t tng_data,
2589  const char hash_mode);
2590 
2608  (const tng_trajectory_t tng_data,
2609  const char hash_mode,
2610  const int64_t block_id);
2611 
2627  (const tng_trajectory_t tng_data,
2628  const char hash_mode);
2629 
2648  (const tng_trajectory_t tng_data,
2649  const char hash_mode);
2650 
2667  (const tng_trajectory_t tng_data,
2668  const int64_t first_frame,
2669  const int64_t n_frames);
2670 
2689  (const tng_trajectory_t tng_data,
2690  const int64_t first_frame,
2691  const int64_t n_frames,
2692  const double first_frame_time);
2693 
2706  (const tng_trajectory_t tng_data,
2707  const double first_frame_time);
2708 
2724  (const tng_trajectory_t tng_data,
2725  int64_t *frame);
2726 
2755  (const tng_trajectory_t tng_data,
2756  const int64_t id,
2757  const char *block_name,
2758  const char datatype,
2759  const char block_type_flag,
2760  int64_t n_frames,
2761  const int64_t n_values_per_frame,
2762  int64_t stride_length,
2763  const int64_t codec_id,
2764  void *new_data);
2765 
2800  (const tng_trajectory_t tng_data,
2801  const int64_t id,
2802  const char *block_name,
2803  const char datatype,
2804  const char block_type_flag,
2805  int64_t n_frames,
2806  const int64_t n_values_per_frame,
2807  int64_t stride_length,
2808  const int64_t num_first_particle,
2809  const int64_t n_particles,
2810  const int64_t codec_id,
2811  void *new_data);
2812 
2828  (const tng_trajectory_t tng_data,
2829  const int64_t block_id,
2830  char *name,
2831  const int max_len);
2832 
2849  (const tng_trajectory_t tng_data,
2850  const int64_t block_id,
2851  int *block_dependency);
2852 
2866  (const tng_trajectory_t tng_data,
2867  const int64_t block_id,
2868  int64_t *n_values_per_frame);
2869 
2891  (const tng_trajectory_t tng_data,
2892  const int64_t frame_nr,
2893  const int64_t block_id,
2894  const void *values,
2895  const char hash_mode);
2896 
2925  (const tng_trajectory_t tng_data,
2926  const int64_t frame_nr,
2927  const int64_t block_id,
2928  const int64_t val_first_particle,
2929  const int64_t val_n_particles,
2930  const void *values,
2931  const char hash_mode);
2932 
2945 tng_function_status DECLSPECDLLEXPORT tng_data_values_free
2946  (const tng_trajectory_t tng_data,
2947  union data_values **values,
2948  const int64_t n_frames,
2949  const int64_t n_values_per_frame,
2950  const char type);
2951 
2966  (const tng_trajectory_t tng_data,
2967  union data_values ***values,
2968  const int64_t n_frames,
2969  const int64_t n_particles,
2970  const int64_t n_values_per_frame,
2971  const char type);
2972 
3003  const int64_t block_id,
3004  union data_values ***values,
3005  int64_t *n_frames,
3006  int64_t *n_values_per_frame,
3007  char *type);
3008 
3039 tng_function_status DECLSPECDLLEXPORT tng_data_vector_get
3040  (const tng_trajectory_t tng_data,
3041  const int64_t block_id,
3042  void **values,
3043  int64_t *n_frames,
3044  int64_t *stride_length,
3045  int64_t *n_values_per_frame,
3046  char *type);
3047 
3081  (const tng_trajectory_t tng_data,
3082  const int64_t block_id,
3083  const int64_t start_frame_nr,
3084  const int64_t end_frame_nr,
3085  const char hash_mode,
3086  union data_values ***values,
3087  int64_t *n_values_per_frame,
3088  char *type);
3089 
3126  (const tng_trajectory_t tng_data,
3127  const int64_t block_id,
3128  const int64_t start_frame_nr,
3129  const int64_t end_frame_nr,
3130  const char hash_mode,
3131  void **values,
3132  int64_t *stride_length,
3133  int64_t *n_values_per_frame,
3134  char *type);
3135 
3173  (const tng_trajectory_t tng_data,
3174  const int64_t block_id,
3175  union data_values ****values,
3176  int64_t *n_frames,
3177  int64_t *n_particles,
3178  int64_t *n_values_per_frame,
3179  char *type);
3180 
3218  (const tng_trajectory_t tng_data,
3219  const int64_t block_id,
3220  void **values,
3221  int64_t *n_frames,
3222  int64_t *stride_length,
3223  int64_t *n_particles,
3224  int64_t *n_values_per_frame,
3225  char *type);
3226 
3269  (const tng_trajectory_t tng_data,
3270  const int64_t block_id,
3271  const int64_t start_frame_nr,
3272  const int64_t end_frame_nr,
3273  const char hash_mode,
3274  union data_values ****values,
3275  int64_t *n_particles,
3276  int64_t *n_values_per_frame,
3277  char *type);
3278 
3323  (const tng_trajectory_t tng_data,
3324  const int64_t block_id,
3325  const int64_t start_frame_nr,
3326  const int64_t end_frame_nr,
3327  const char hash_mode,
3328  void **values,
3329  int64_t *n_particles,
3330  int64_t *stride_length,
3331  int64_t *n_values_per_frame,
3332  char *type);
3333 
3348  (const tng_trajectory_t tng_data,
3349  const int64_t block_id,
3350  int64_t frame,
3351  int64_t *stride_length);
3352 
3365  (const tng_trajectory_t tng_data,
3366  char *time); /* end of group1 */
3368 
3393  (const char *filename,
3394  const char mode,
3395  tng_trajectory_t *tng_data_p);
3396 
3404  (tng_trajectory_t *tng_data_p);
3405 
3419  (const tng_trajectory_t tng_data,
3420  const int64_t frame_nr,
3421  double *time);
3422 
3423 /*
3424  * @brief High-level function for getting the molecules in the mol system.
3425  * @param tng_data is the trajectory containing the mol system.
3426  * @param n_mols is set to the number of molecules in the system.
3427  * @param molecule_cnt_list will be pointing to the list of counts of each molecule
3428  * in the mol system.
3429  * @param mols pointing to the list of molecules in the mol system.
3430  * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
3431  * must be initialised before using it.
3432  * @pre \code n_mols != 0 \endcode The pointer to the number of molecules must
3433  * not be a NULL pointer.
3434  * @return TNG_SUCCESS (0) if successful.
3435  */
3436 /*tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_molecules_get
3437  (const tng_trajectory_t tng_data,
3438  int64_t *n_mols,
3439  int64_t **molecule_cnt_list,
3440  tng_molecule_t *mols);
3441 */
3442 /*
3443  * @brief High-level function for adding a molecule to the mol system.
3444  * @param tng_data is the trajectory containing the mol system.
3445  * @param name is the name of the molecule to add.
3446  * @param cnt is the count of the molecule.
3447  * @param mol is set to point to the newly created molecule.
3448  * @pre \code name != 0 \endcode The pointer to the name must not be a
3449  * NULL pointer.
3450  * @pre \code cnt >= 0 \endcode The requested count must be >= 0.
3451  * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
3452  * has occured or TNG_CRITICAL (2) if a major error has occured.
3453  */
3454 /*tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_molecule_add
3455  (const tng_trajectory_t tng_data,
3456  const char *name,
3457  const int64_t cnt,
3458  tng_molecule_t *mol);
3459 */
3460 /*
3461 // tng_function_status DECLSPECDLLEXPORT tng_util_molecule_particles_get
3462 // (const tng_trajectory_t tng_data,
3463 // const tng_molecule_t mol,
3464 // int64_t *n_particles,
3465 // char ***names,
3466 // char ***types,
3467 // char ***res_names,
3468 // int64_t **res_ids,
3469 // char ***chain_names,
3470 // int64_t **chain_ids);
3471 //
3472 // tng_function_status DECLSPECDLLEXPORT tng_util_molecule_particles_set
3473 // (const tng_trajectory_t tng_data,
3474 // tng_molecule_t mol,
3475 // const int64_t n_particles,
3476 // const char **names,
3477 // const char **types,
3478 // const char **res_names,
3479 // const int64_t *res_ids,
3480 // const char **chain_names,
3481 // const int64_t *chain_ids);
3482 */
3504  (const tng_trajectory_t tng_data,
3505  float **positions,
3506  int64_t *stride_length);
3507 
3529  (const tng_trajectory_t tng_data,
3530  float **velocities,
3531  int64_t *stride_length);
3532 
3554  (const tng_trajectory_t tng_data,
3555  float **forces,
3556  int64_t *stride_length);
3557 
3582  (const tng_trajectory_t tng_data,
3583  float **box_shape,
3584  int64_t *stride_length);
3585 
3617  (const tng_trajectory_t tng_data,
3618  const int64_t block_id,
3619  void **values,
3620  char *data_type,
3621  int64_t *retrieved_frame_number,
3622  double *retrieved_time);
3623 
3653  (const tng_trajectory_t tng_data,
3654  const int64_t block_id,
3655  void **values,
3656  char *data_type,
3657  int64_t *retrieved_frame_number,
3658  double *retrieved_time);
3659 
3685  (const tng_trajectory_t tng_data,
3686  const int64_t first_frame,
3687  const int64_t last_frame,
3688  float **positions,
3689  int64_t *stride_length);
3690 
3716  (const tng_trajectory_t tng_data,
3717  const int64_t first_frame,
3718  const int64_t last_frame,
3719  float **velocities,
3720  int64_t *stride_length);
3721 
3747  (const tng_trajectory_t tng_data,
3748  const int64_t first_frame,
3749  const int64_t last_frame,
3750  float **forces,
3751  int64_t *stride_length);
3752 
3784  (const tng_trajectory_t tng_data,
3785  const int64_t first_frame,
3786  const int64_t last_frame,
3787  float **box_shape,
3788  int64_t *stride_length);
3789 
3819  (const tng_trajectory_t tng_data,
3820  const int64_t i,
3821  const int64_t n_values_per_frame,
3822  const int64_t block_id,
3823  const char *block_name,
3824  const char particle_dependency,
3825  const char compression);
3826 
3857  (const tng_trajectory_t tng_data,
3858  const int64_t i,
3859  const int64_t n_values_per_frame,
3860  const int64_t block_id,
3861  const char *block_name,
3862  const char particle_dependency,
3863  const char compression);
3864 
3893 tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_frequency_set
3894  (const tng_trajectory_t tng_data,
3895  const int64_t i,
3896  const int64_t n_values_per_frame,
3897  const int64_t block_id,
3898  const char *block_name,
3899  const char particle_dependency,
3900  const char compression);
3901 
3918  (const tng_trajectory_t tng_data,
3919  const int64_t i);
3920 
3937  (const tng_trajectory_t tng_data,
3938  const int64_t i);
3939 
3958  (const tng_trajectory_t tng_data,
3959  const int64_t i);
3960 
3977  (const tng_trajectory_t tng_data,
3978  const int64_t i);
3979 
3996  (const tng_trajectory_t tng_data,
3997  const int64_t i);
3998 
4014  (const tng_trajectory_t tng_data,
4015  const int64_t i);
4016 
4033  (const tng_trajectory_t tng_data,
4034  const int64_t i);
4035 
4052  (const tng_trajectory_t tng_data,
4053  const int64_t i);
4054 
4070  (const tng_trajectory_t tng_data,
4071  const int64_t i);
4072 
4089  (const tng_trajectory_t tng_data,
4090  const int64_t i);
4091 
4108  (const tng_trajectory_t tng_data,
4109  const int64_t i);
4110 
4126  (const tng_trajectory_t tng_data,
4127  const int64_t i);
4128 
4165  (const tng_trajectory_t tng_data,
4166  const int64_t frame_nr,
4167  const float *values,
4168  const int64_t n_values_per_frame,
4169  const int64_t block_id,
4170  const char *block_name,
4171  const char particle_dependency,
4172  const char compression);
4173 
4211  (const tng_trajectory_t tng_data,
4212  const int64_t frame_nr,
4213  const double *values,
4214  const int64_t n_values_per_frame,
4215  const int64_t block_id,
4216  const char *block_name,
4217  const char particle_dependency,
4218  const char compression);
4219 
4242  (const tng_trajectory_t tng_data,
4243  const int64_t frame_nr,
4244  const float *positions);
4245 
4269  (const tng_trajectory_t tng_data,
4270  const int64_t frame_nr,
4271  const double *positions);
4272 
4295  (const tng_trajectory_t tng_data,
4296  const int64_t frame_nr,
4297  const float *velocities);
4298 
4322  (const tng_trajectory_t tng_data,
4323  const int64_t frame_nr,
4324  const double *velocities);
4325 
4348  (const tng_trajectory_t tng_data,
4349  const int64_t frame_nr,
4350  const float *forces);
4351 
4375  (const tng_trajectory_t tng_data,
4376  const int64_t frame_nr,
4377  const double *forces);
4378 
4400  (const tng_trajectory_t tng_data,
4401  const int64_t frame_nr,
4402  const float *box_shape);
4403 
4426  (const tng_trajectory_t tng_data,
4427  const int64_t frame_nr,
4428  const double *box_shape);
4429 
4470  (const tng_trajectory_t tng_data,
4471  const int64_t frame_nr,
4472  const double time,
4473  const float *values,
4474  const int64_t n_values_per_frame,
4475  const int64_t block_id,
4476  const char *block_name,
4477  const char particle_dependency,
4478  const char compression);
4479 
4520  (const tng_trajectory_t tng_data,
4521  const int64_t frame_nr,
4522  const double time,
4523  const double *values,
4524  const int64_t n_values_per_frame,
4525  const int64_t block_id,
4526  const char *block_name,
4527  const char particle_dependency,
4528  const char compression);
4529 
4556  (const tng_trajectory_t tng_data,
4557  const int64_t frame_nr,
4558  const double time,
4559  const float *positions);
4560 
4587  (const tng_trajectory_t tng_data,
4588  const int64_t frame_nr,
4589  const double time,
4590  const double *positions);
4591 
4618  (const tng_trajectory_t tng_data,
4619  const int64_t frame_nr,
4620  const double time,
4621  const float *velocities);
4622 
4649  (const tng_trajectory_t tng_data,
4650  const int64_t frame_nr,
4651  const double time,
4652  const double *velocities);
4653 
4680  (const tng_trajectory_t tng_data,
4681  const int64_t frame_nr,
4682  const double time,
4683  const float *forces);
4684 
4711  (const tng_trajectory_t tng_data,
4712  const int64_t frame_nr,
4713  const double time,
4714  const double *forces);
4715 
4741  (const tng_trajectory_t tng_data,
4742  const int64_t frame_nr,
4743  const double time,
4744  const float *box_shape);
4745 
4771  (const tng_trajectory_t tng_data,
4772  const int64_t frame_nr,
4773  const double time,
4774  const double *box_shape);
4775 
4798  (const tng_trajectory_t tng_data,
4799  const int64_t block_id,
4800  int64_t *codec_id,
4801  double *factor);
4802 
4837  (const tng_trajectory_t tng_data,
4838  int64_t current_frame,
4839  const int64_t n_requested_data_block_ids,
4840  const int64_t *requested_data_block_ids,
4841  int64_t *next_frame,
4842  int64_t *n_data_blocks_in_next_frame,
4843  int64_t **data_block_ids_in_next_frame);
4844 
4845 /* @brief High-level function for getting all data block ids and their names
4846  * and stride lengths.
4847  * @param tng_data is the trajectory to use.
4848  * @param n_data_blocks is set to the number of data blocks in the trajectory.
4849  * @param data_block_ids is set to an array (of length
4850  * n_data_blocks) that lists the data block IDs in the trajectory.
4851  * It must be pointing at NULL or previously allocated memory.
4852  * Memory for the array is allocated by this function.
4853  * The memory must be freed by the client afterwards or
4854  * there will be a memory leak.
4855  * @param data_block_names is set to an array (of length
4856  * n_data_blocks) that contains the names of the data blocks.
4857  * It must be pointing at NULL or previously allocated memory.
4858  * Memory for the array is allocated by this function.
4859  * The memory must be freed by the client afterwards or
4860  * there will be a memory leak.
4861  * @param stride_lengths is set to an array (of length
4862  * n_data_blocks) that lists the stride lengths of the data blocks.
4863  * It must be pointing at NULL or previously allocated memory.
4864  * Memory for the array is allocated by this function.
4865  * The memory must be freed by the client afterwards or
4866  * there will be a memory leak.
4867  * @param n_values_per_frame is set to an array (of length
4868  * n_data_blocks) that lists the number of values per frame of the data blocks.
4869  * It must be pointing at NULL or previously allocated memory.
4870  * Memory for the array is allocated by this function.
4871  * The memory must be freed by the client afterwards or
4872  * there will be a memory leak.
4873  * @param block_types is set to an array (of length
4874  * n_data_blocks) that lists the block types of the data blocks.
4875  * It must be pointing at NULL or previously allocated memory.
4876  * Memory for the array is allocated by this function.
4877  * The memory must be freed by the client afterwards or
4878  * there will be a memory leak.
4879  * @param dependencies is set to an array (of length
4880  * n_data_blocks) that lists the dependencies of the data blocks.
4881  * It must be pointing at NULL or previously allocated memory.
4882  * Memory for the array is allocated by this function.
4883  * The memory must be freed by the client afterwards or
4884  * there will be a memory leak.
4885  * @param compressions is set to an array (of length
4886  * n_data_blocks) that lists the compressions of the data blocks.
4887  * It must be pointing at NULL or previously allocated memory.
4888  * Memory for the array is allocated by this function.
4889  * The memory must be freed by the client afterwards or
4890  * there will be a memory leak.
4891  * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
4892  * must be initialised before using it.
4893  * @pre \code n_data_blocks != 0 \endcode The pointer to
4894  * n_data_blocks must not be NULL.
4895  * @pre \code data_block_ids != 0 \endcode The pointer to the
4896  * list of data block IDs must not be NULL.
4897  * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
4898  * has occured or TNG_CRITICAL (2) if a major error
4899  * has occured.
4900  */
4901 /*
4902 tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_all_data_block_types_get
4903  (const tng_trajectory_t tng_data,
4904  int64_t *n_data_blocks,
4905  int64_t **data_block_ids,
4906  char ***data_block_names,
4907  int64_t **stride_lengths,
4908  int64_t **n_values_per_frame,
4909  char **block_types,
4910  char **dependencies,
4911  char **compressions);
4912 */
4913 
4926  (const tng_trajectory_t tng_data,
4927  const int64_t prev_frame);
4928 
4929 
4939  (const tng_trajectory_t tng_data,
4940  const int64_t block_id,
4941  int64_t *n_frames); /* end of group2 */
4943 
4944 
4945 #ifdef __cplusplus
4946 } /* end extern "C" */
4947 #endif
4948 
4949 #endif /* TNG_IO_H */
Definition: tng_io.h:414
tng_function_status DECLSPECDLLEXPORT tng_num_frame_sets_get(const tng_trajectory_t tng_data, int64_t *n)
Get the number of frame sets.
tng_function_status DECLSPECDLLEXPORT tng_first_computer_name_get(const tng_trajectory_t tng_data, char *name, const int max_len)
Get the name of the computer used when creating the trajectory.
Definition: tng_io.h:414
tng_function_status DECLSPECDLLEXPORT tng_molecule_atom_of_index_get(const tng_trajectory_t tng_data, const tng_molecule_t molecule, const int64_t index, tng_atom_t *atom)
Retrieve the atom of a molecule with specified index in the list of atoms.
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_interval_double_set(const tng_trajectory_t tng_data, const int64_t i)
High-level function for setting the writing interval of box shape data blocks containing double preci...
tng_function_status DECLSPECDLLEXPORT tng_time_per_frame_get(const tng_trajectory_t tng_data, double *time)
Get the current time per frame of the trajectory.
Definition: tng_io.h:536
tng_function_status DECLSPECDLLEXPORT tng_util_generic_with_time_double_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const double time, const double *values, const int64_t n_values_per_frame, const int64_t block_id, const char *block_name, const char particle_dependency, const char compression)
High-level function for writing data of one frame to a double precision data block. If the frame is at the beginning of a frame set the time stamp of the frame set is set.
tng_function_status DECLSPECDLLEXPORT tng_molecule_w_id_add(const tng_trajectory_t tng_data, const char *name, const int64_t id, tng_molecule_t *molecule)
Add a molecule with a specific ID to the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_version_patchlevel(const tng_trajectory_t tng_data, int *patch_level)
Get the patch level of the TNG library.
tng_function_status DECLSPECDLLEXPORT tng_distance_unit_exponential_set(const tng_trajectory_t tng_data, const int64_t exp)
Set the exponent used for distances in the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_chain_residue_of_index_get(const tng_trajectory_t tng_data, const tng_chain_t chain, const int64_t index, tng_residue_t *residue)
Retrieve the residue of a chain with specified index in the list of residues.
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const float *box_shape)
High-level function for adding data to box shape data blocks.
tng_function_status DECLSPECDLLEXPORT tng_num_molecules_get(const tng_trajectory_t tng_data, int64_t *n)
Get the current total number of molecules.
tng_function_status DECLSPECDLLEXPORT tng_util_force_write_frequency_set(const tng_trajectory_t tng_data, const int64_t i)
High-level function for setting the writing interval of force data blocks. Obsolete! Use tng_util_for...
tng_function_status DECLSPECDLLEXPORT tng_util_pos_read_range(const tng_trajectory_t tng_data, const int64_t first_frame, const int64_t last_frame, float **positions, int64_t *stride_length)
High-level function for reading the positions of all particles from a specific range of frames...
tng_function_status DECLSPECDLLEXPORT tng_compression_precision_get(const tng_trajectory_t tng_data, double *precision)
Get the precision of lossy compression.
tng_function_status DECLSPECDLLEXPORT tng_forcefield_name_set(const tng_trajectory_t tng_data, const char *new_name)
Set the name of the forcefield used in the trajectory.
struct tng_bond * tng_bond_t
Definition: tng_io_fwd.h:26
#define DECLSPECDLLEXPORT
Definition: tng_io.h:364
tng_function_status DECLSPECDLLEXPORT tng_block_read_next(const tng_trajectory_t tng_data, const tng_gen_block_t block_data, const char hash_mode)
Read one (the next) block (of any kind) from the input_file of tng_data.
struct tng_gen_block * tng_gen_block_t
Definition: tng_io_fwd.h:29
tng_function_status DECLSPECDLLEXPORT tng_chain_name_get(const tng_trajectory_t tng_data, const tng_chain_t chain, char *name, const int max_len)
Get the name of a chain.
tng_function_status DECLSPECDLLEXPORT tng_num_particles_variable_get(const tng_trajectory_t tng_data, char *variable)
Get if the number of particle can be varied during the simulation.
tng_function_status DECLSPECDLLEXPORT tng_frame_set_read(const tng_trajectory_t tng_data, const char hash_mode)
Read one frame set, including all particle mapping blocks and data blocks, starting from the current ...
tng_function_status DECLSPECDLLEXPORT tng_last_computer_name_get(const tng_trajectory_t tng_data, char *name, const int max_len)
Get the name of the computer used when last modifying the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_add(const tng_trajectory_t tng_data, const tng_molecule_t molecule, const char *name, tng_chain_t *chain)
Add a chain to a molecule.
tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_interval_double_set(const tng_trajectory_t tng_data, const int64_t i)
High-level function for setting the writing interval of position data blocks containing double precis...
tng_function_status DECLSPECDLLEXPORT tng_data_interval_get(const tng_trajectory_t tng_data, const int64_t block_id, const int64_t start_frame_nr, const int64_t end_frame_nr, const char hash_mode, union data_values ***values, int64_t *n_values_per_frame, char *type)
Read and retrieve non-particle data, in a specific interval. Obsolete!
tng_function_status DECLSPECDLLEXPORT tng_util_vel_read(const tng_trajectory_t tng_data, float **velocities, int64_t *stride_length)
High-level function for reading the velocities of all particles from all frames.
tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_interval_set(const tng_trajectory_t tng_data, const int64_t i)
High-level function for setting the writing interval of velocity data blocks.
char * c
Definition: tng_io.h:578
tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_interval_set(const tng_trajectory_t tng_data, const int64_t i)
High-level function for setting the writing interval of position data blocks.
tng_function_status DECLSPECDLLEXPORT tng_data_get_stride_length(const tng_trajectory_t tng_data, const int64_t block_id, int64_t frame, int64_t *stride_length)
Get the stride length of a specific data (particle dependency does not matter) block, either in the current frame set or of a specific frame.
tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_get(const tng_trajectory_t tng_data, const tng_molecule_t molecule, int64_t *cnt)
Get the count of a molecule.
tng_function_status DECLSPECDLLEXPORT tng_particle_data_block_add(const tng_trajectory_t tng_data, const int64_t id, const char *block_name, const char datatype, const char block_type_flag, int64_t n_frames, const int64_t n_values_per_frame, int64_t stride_length, const int64_t num_first_particle, const int64_t n_particles, const int64_t codec_id, void *new_data)
Add a particle dependent data block.
tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_interval_double_set(const tng_trajectory_t tng_data, const int64_t i)
High-level function for setting the writing interval of velocity data blocks containing double precis...
tng_function_status DECLSPECDLLEXPORT tng_frame_particle_data_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const int64_t block_id, const int64_t val_first_particle, const int64_t val_n_particles, const void *values, const char hash_mode)
Write particle data of one trajectory frame to the output_file of tng_data.
tng_function_status DECLSPECDLLEXPORT tng_forcefield_name_get(const tng_trajectory_t tng_data, char *name, const int max_len)
Get the name of the forcefield used in the trajectory.
tng_hash_mode
Definition: tng_io.h:552
tng_function_status DECLSPECDLLEXPORT tng_util_generic_with_time_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const double time, const float *values, const int64_t n_values_per_frame, const int64_t block_id, const char *block_name, const char particle_dependency, const char compression)
High-level function for writing data of one frame to a data block. If the frame is at the beginning o...
tng_function_status DECLSPECDLLEXPORT tng_file_headers_write(const tng_trajectory_t tng_data, const char hash_mode)
Write the header blocks to the output_file of tng_data.
tng_function_status DECLSPECDLLEXPORT tng_particle_mapping_add(const tng_trajectory_t tng_data, const int64_t num_first_particle, const int64_t n_particles, const int64_t *mapping_table)
Add a particle mapping table.
tng_function_status DECLSPECDLLEXPORT tng_global_residue_id_of_particle_nr_get(const tng_trajectory_t tng_data, const int64_t nr, int64_t *id)
Get the residue id (based on other molecules and molecule counts) of real particle number (number in ...
tng_function_status DECLSPECDLLEXPORT tng_first_program_name_set(const tng_trajectory_t tng_data, const char *new_name)
Set the name of the program used when creating the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_trajectory_init(tng_trajectory_t *tng_data_p)
Setup a trajectory data container.
Definition: tng_io.h:556
Definition: tng_io.h:393
tng_function_status DECLSPECDLLEXPORT tng_compression_precision_set(const tng_trajectory_t tng_data, const double precision)
Set the precision of lossy compression.
tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_w_id_add(const tng_trajectory_t tng_data, const tng_molecule_t molecule, const char *name, const int64_t id, tng_chain_t *chain)
Add a chain with a specific id to a molecule.
Definition: tng_io.h:540
tng_function_status DECLSPECDLLEXPORT tng_num_particles_get(const tng_trajectory_t tng_data, int64_t *n)
Get the current number of particles.
tng_function_status DECLSPECDLLEXPORT tng_data_block_dependency_get(const tng_trajectory_t tng_data, const int64_t block_id, int *block_dependency)
Get the dependency of a data block of a specific ID.
tng_function_status DECLSPECDLLEXPORT tng_medium_stride_length_set(const tng_trajectory_t tng_data, const int64_t len)
Set the medium stride length of the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_double_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const double *box_shape)
High-level function for adding data to box shape data blocks at double precision. ...
tng_function_status DECLSPECDLLEXPORT tng_trajectory_init_from_src(const tng_trajectory_t src, tng_trajectory_t *dest_p)
Copy a trajectory data container (dest is setup as well).
tng_function_status DECLSPECDLLEXPORT tng_frame_set_prev_frame_set_file_pos_get(const tng_trajectory_t tng_data, const tng_trajectory_frame_set_t frame_set, int64_t *pos)
Get the file position of the previous frame set in the input file.
tng_endianness_32
Definition: tng_io.h:391
tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_frequency_set(const tng_trajectory_t tng_data, const int64_t i)
High-level function for setting the writing interval of position data blocks. Obsolete! Use tng_util_...
Definition: tng_io.h:536
tng_function_status DECLSPECDLLEXPORT tng_molecule_id_of_particle_nr_get(const tng_trajectory_t tng_data, const int64_t nr, int64_t *id)
Get the molecule id of real particle number (number in mol system).
tng_function_status DECLSPECDLLEXPORT tng_num_frames_per_frame_set_get(const tng_trajectory_t tng_data, int64_t *n)
Get the number of frames per frame set.
tng_function_status DECLSPECDLLEXPORT tng_chain_residue_w_id_add(const tng_trajectory_t tng_data, const tng_chain_t chain, const char *name, const int64_t id, tng_residue_t *residue)
Add a residue with a specific ID to a chain.
tng_function_status DECLSPECDLLEXPORT tng_util_force_read_range(const tng_trajectory_t tng_data, const int64_t first_frame, const int64_t last_frame, float **forces, int64_t *stride_length)
High-level function for reading the forces of all particles from a specific range of frames...
tng_function_status DECLSPECDLLEXPORT tng_util_force_write_interval_double_set(const tng_trajectory_t tng_data, const int64_t i)
High-level function for setting the writing interval of force data blocks containing double precision...
tng_function_status DECLSPECDLLEXPORT tng_distance_unit_exponential_get(const tng_trajectory_t tng_data, int64_t *exp)
Get the exponent used for distances in the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_molsystem_bonds_get(const tng_trajectory_t tng_data, int64_t *n_bonds, int64_t **from_atoms, int64_t **to_atoms)
Get the bonds of the current molecular system.
tng_function_status DECLSPECDLLEXPORT tng_molecule_free(const tng_trajectory_t tng_data, tng_molecule_t *molecule_p)
Clean up a molecule container and free its allocated memory.
tng_function_status DECLSPECDLLEXPORT tng_first_frame_nr_of_next_frame_set_get(const tng_trajectory_t tng_data, int64_t *frame)
Read the number of the first frame of the next frame set.
tng_function_status DECLSPECDLLEXPORT tng_atom_type_set(const tng_trajectory_t tng_data, const tng_atom_t atom, const char *new_type)
Set the atom type of an atom.
double d
Definition: tng_io.h:575
tng_function_status DECLSPECDLLEXPORT tng_molecule_destroy(const tng_trajectory_t tng_data, const tng_molecule_t molecule)
Clean up a molecule container.
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_with_time_double_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const double time, const double *box_shape)
High-level function for adding data to box shape data blocks at double precision. If the frame is at ...
tng_function_status DECLSPECDLLEXPORT tng_particle_data_values_free(const tng_trajectory_t tng_data, union data_values ***values, const int64_t n_frames, const int64_t n_particles, const int64_t n_values_per_frame, const char type)
Free data of an array of values (3D).
struct tng_residue * tng_residue_t
Definition: tng_io_fwd.h:22
tng_function_status DECLSPECDLLEXPORT tng_first_program_name_get(const tng_trajectory_t tng_data, char *name, const int max_len)
Get the name of the program used when creating the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_find(const tng_trajectory_t tng_data, const tng_molecule_t molecule, const char *name, const int64_t id, tng_chain_t *chain)
Find a chain in a molecule.
tng_function_status DECLSPECDLLEXPORT tng_last_computer_name_set(const tng_trajectory_t tng_data, const char *new_name)
Set the name of the computer used when last modifying the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_util_generic_double_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const double *values, const int64_t n_values_per_frame, const int64_t block_id, const char *block_name, const char particle_dependency, const char compression)
High-level function for writing data of one frame to a double precision data block.
Definition: tng_io.h:388
Definition: tng_io.h:391
tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_next(const tng_trajectory_t tng_data, const char hash_mode)
Read one (the next) frame set, including particle mapping and related data blocks from the input_file...
tng_function_status DECLSPECDLLEXPORT tng_util_force_with_time_double_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const double time, const double *forces)
High-level function for adding data to forces data blocks at double precision. If the frame is at the...
tng_function_status DECLSPECDLLEXPORT tng_util_vel_double_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const double *velocities)
High-level function for adding data to velocities data blocks at double precision.
tng_function_status DECLSPECDLLEXPORT tng_util_num_frames_with_data_of_block_id_get(const tng_trajectory_t tng_data, const int64_t block_id, int64_t *n_frames)
Get the number of frames containing data of a specific type.
tng_function_status DECLSPECDLLEXPORT tng_frame_set_with_time_new(const tng_trajectory_t tng_data, const int64_t first_frame, const int64_t n_frames, const double first_frame_time)
Create and initialise a frame set with the time of the first frame specified.
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_frequency_set(const tng_trajectory_t tng_data, const int64_t i)
High-level function for setting the writing interval of velocity data blocks. Obsolete! Use tng_util_...
tng_function_status DECLSPECDLLEXPORT tng_particle_data_interval_get(const tng_trajectory_t tng_data, const int64_t block_id, const int64_t start_frame_nr, const int64_t end_frame_nr, const char hash_mode, union data_values ****values, int64_t *n_particles, int64_t *n_values_per_frame, char *type)
Read and retrieve particle data, in a specific interval. Obsolete!
Definition: tng_io.h:411
float f
Definition: tng_io.h:576
Definition: tng_io.h:409
tng_function_status DECLSPECDLLEXPORT tng_util_force_read(const tng_trajectory_t tng_data, float **forces, int64_t *stride_length)
High-level function for reading the forces of all particles from all frames.
Definition: tng_io.h:547
Definition: tng_io.h:397
Definition: tng_io.h:558
tng_function_status DECLSPECDLLEXPORT tng_molecule_system_copy(const tng_trajectory_t tng_data_src, const tng_trajectory_t tng_data_dest)
Copy all molecules and the molecule counts from one TNG trajectory to another.
tng_function_status DECLSPECDLLEXPORT tng_util_vel_with_time_double_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const double time, const double *velocities)
High-level function for adding data to velocities 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.
tng_function_status DECLSPECDLLEXPORT tng_num_molecule_types_get(const tng_trajectory_t tng_data, int64_t *n)
Get the number of molecule types (length of tng_data->molecules).
tng_function_status DECLSPECDLLEXPORT tng_long_stride_length_set(const tng_trajectory_t tng_data, const int64_t len)
Set the long stride length of the trajectory.
tng_data_type
Definition: tng_io.h:555
tng_function_status DECLSPECDLLEXPORT tng_util_particle_data_next_frame_read(const tng_trajectory_t tng_data, const int64_t block_id, void **values, char *data_type, int64_t *retrieved_frame_number, double *retrieved_time)
High-level function for reading the next frame of particle-dependent data of a specific type...
tng_function_status DECLSPECDLLEXPORT tng_molecule_bond_add(const tng_trajectory_t tng_data, const tng_molecule_t molecule, const int64_t from_atom_id, const int64_t to_atom_id, tng_bond_t *bond)
Add a bond between two atoms to a molecule.
tng_file_endianness
Definition: tng_io.h:387
tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_next_frame_present_data_blocks_find(const tng_trajectory_t tng_data, int64_t current_frame, const int64_t n_requested_data_block_ids, const int64_t *requested_data_block_ids, int64_t *next_frame, int64_t *n_data_blocks_in_next_frame, int64_t **data_block_ids_in_next_frame)
High-level function for determining the next frame with data and what data blocks have data for that ...
tng_function_status DECLSPECDLLEXPORT tng_util_pos_read(const tng_trajectory_t tng_data, float **positions, int64_t *stride_length)
High-level function for reading the positions of all particles from all frames.
tng_function_status DECLSPECDLLEXPORT tng_molecule_atom_find(const tng_trajectory_t tng_data, const tng_molecule_t molecule, const char *name, const int64_t id, tng_atom_t *atom)
Find an atom in a molecule.
tng_function_status DECLSPECDLLEXPORT tng_atom_residue_get(const tng_trajectory_t tng_data, const tng_atom_t atom, tng_residue_t *residue)
Get the residue of an atom.
tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_of_index_get(const tng_trajectory_t tng_data, const tng_molecule_t molecule, const int64_t index, tng_chain_t *chain)
Retrieve the chain of a molecule with specified index in the list of chains.
tng_function_status DECLSPECDLLEXPORT tng_data_get(const tng_trajectory_t tng_data, const int64_t block_id, union data_values ***values, int64_t *n_frames, int64_t *n_values_per_frame, char *type)
Retrieve non-particle data, from the last read frame set. Obsolete!
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_interval_set(const tng_trajectory_t tng_data, const int64_t i)
High-level function for setting the writing interval of box shape data blocks.
tng_function_status DECLSPECDLLEXPORT tng_chain_residue_add(const tng_trajectory_t tng_data, const tng_chain_t chain, const char *name, tng_residue_t *residue)
Add a residue to a chain.
tng_function_status DECLSPECDLLEXPORT tng_util_vel_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const float *velocities)
High-level function for adding data to velocities data blocks.
tng_function_status DECLSPECDLLEXPORT tng_molecule_name_get(const tng_trajectory_t tng_data, const tng_molecule_t molecule, char *name, const int max_len)
Get the name of a molecule.
tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_current_only_data_from_block_id(const tng_trajectory_t tng_data, const char hash_mode, const int64_t block_id)
Read data from the current frame set from the input_file. Only read particle mapping and data blocks ...
tng_block_type
Definition: tng_io.h:414
struct tng_trajectory_frame_set * tng_trajectory_frame_set_t
Definition: tng_io_fwd.h:33
Definition: tng_io.h:547
tng_function_status DECLSPECDLLEXPORT tng_input_file_len_get(const tng_trajectory_t tng_data, int64_t *len)
Get the length of the input file.
tng_function_status DECLSPECDLLEXPORT tng_molecule_num_atoms_get(const tng_trajectory_t tng_data, const tng_molecule_t molecule, int64_t *n)
Get the number of atoms in a molecule.
tng_function_status DECLSPECDLLEXPORT tng_particle_data_get(const tng_trajectory_t tng_data, const int64_t block_id, union data_values ****values, int64_t *n_frames, int64_t *n_particles, int64_t *n_values_per_frame, char *type)
Retrieve particle data, from the last read frame set. Obsolete!
tng_variable_n_atoms_flag
Definition: tng_io.h:540
tng_function_status DECLSPECDLLEXPORT tng_residue_atom_w_id_add(const tng_trajectory_t tng_data, const tng_residue_t residue, const char *atom_name, const char *atom_type, const int64_t id, tng_atom_t *atom)
Add an atom with a specific ID to a residue.
tng_function_status DECLSPECDLLEXPORT tng_molecule_num_chains_get(const tng_trajectory_t tng_data, const tng_molecule_t molecule, int64_t *n)
Get the number of chains in a molecule.
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_with_time_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const double time, const float *box_shape)
High-level function for adding data to box shape data blocks. If the frame is at the beginning of a f...
tng_function_status DECLSPECDLLEXPORT tng_time_get_str(const tng_trajectory_t tng_data, char *time)
Get the date and time of initial file creation in ISO format (string).
tng_bool
Definition: tng_io.h:536
Definition: tng_io.h:557
struct tng_atom * tng_atom_t
Definition: tng_io_fwd.h:24
Definition: tng_io.h:400
tng_function_status DECLSPECDLLEXPORT tng_frame_set_first_frame_time_set(const tng_trajectory_t tng_data, const double first_frame_time)
Set the time stamp of the first frame of the current frame set.
tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_frequency_set(const tng_trajectory_t tng_data, const int64_t i)
High-level function for setting the writing interval of velocity data blocks. Obsolete! Use tng_util_...
Definition: tng_io.h:403
tng_function_status DECLSPECDLLEXPORT tng_output_file_endianness_get(const tng_trajectory_t tng_data, tng_file_endianness *endianness)
Get the endianness of the output file.
tng_function_status DECLSPECDLLEXPORT tng_atom_type_get(const tng_trajectory_t tng_data, const tng_atom_t atom, char *type, const int max_len)
Get the type of an atom.
tng_function_status DECLSPECDLLEXPORT tng_first_computer_name_set(const tng_trajectory_t tng_data, const char *new_name)
Set the name of the computer used when creating the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_output_append_file_set(const tng_trajectory_t tng_data, const char *file_name)
Set the name of the output file for appending. The output file will not be overwritten.
Definition: tng_io.h:533
tng_function_status DECLSPECDLLEXPORT tng_util_time_of_frame_get(const tng_trajectory_t tng_data, const int64_t frame_nr, double *time)
High-level function for getting the time (in seconds) of a frame.
tng_function_status DECLSPECDLLEXPORT tng_util_frame_current_compression_get(const tng_trajectory_t tng_data, const int64_t block_id, int64_t *codec_id, double *factor)
High-level function for getting the compression method and multiplication factor of the last read fra...
tng_function_status DECLSPECDLLEXPORT tng_atom_name_set(const tng_trajectory_t tng_data, const tng_atom_t atom, const char *new_name)
Set the name of an atom.
tng_function_status DECLSPECDLLEXPORT tng_data_block_num_values_per_frame_get(const tng_trajectory_t tng_data, const int64_t block_id, int64_t *n_values_per_frame)
Get the number of values per frame of a data block of a specific ID.
tng_function_status DECLSPECDLLEXPORT tng_num_frames_per_frame_set_set(const tng_trajectory_t tng_data, const int64_t n)
Set the number of frames per frame set.
Definition: tng_io.h:552
Definition: tng_io.h:405
tng_function_status DECLSPECDLLEXPORT tng_medium_stride_length_get(const tng_trajectory_t tng_data, int64_t *len)
Get the medium stride length of the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_last_program_name_set(const tng_trajectory_t tng_data, const char *new_name)
Set the name of the program used when last modifying the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_data_block_add(const tng_trajectory_t tng_data, const int64_t id, const char *block_name, const char datatype, const char block_type_flag, int64_t n_frames, const int64_t n_values_per_frame, int64_t stride_length, const int64_t codec_id, void *new_data)
Add a non-particle dependent data block.
tng_function_status DECLSPECDLLEXPORT tng_last_user_name_get(const tng_trajectory_t tng_data, char *name, const int max_len)
Get the name of the user who last modified the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_frame_set_nr_find(const tng_trajectory_t tng_data, const int64_t nr)
Find the requested frame set number.
tng_function_status DECLSPECDLLEXPORT tng_output_file_endianness_set(const tng_trajectory_t tng_data, const tng_file_endianness endianness)
Set the endianness of the output file.
tng_function_status DECLSPECDLLEXPORT tng_first_user_name_set(const tng_trajectory_t tng_data, const char *new_name)
Set the name of the user who created the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_residue_name_get(const tng_trajectory_t tng_data, const tng_residue_t residue, char *name, const int max_len)
Get the name of a residue.
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_read_range(const tng_trajectory_t tng_data, const int64_t first_frame, const int64_t last_frame, float **box_shape, int64_t *stride_length)
High-level function for reading the box shape from a specific range of frames.
tng_function_status DECLSPECDLLEXPORT tng_particle_data_vector_interval_get(const tng_trajectory_t tng_data, const int64_t block_id, const int64_t start_frame_nr, const int64_t end_frame_nr, const char hash_mode, void **values, int64_t *n_particles, int64_t *stride_length, int64_t *n_values_per_frame, char *type)
Read and retrieve a vector (1D array) particle data, in a specific interval.
tng_function_status DECLSPECDLLEXPORT tng_frame_set_particle_mapping_free(const tng_trajectory_t tng_data)
Remove all particle mappings (in memory) from the current frame set.
tng_function_status DECLSPECDLLEXPORT tng_frame_set_write(const tng_trajectory_t tng_data, const char hash_mode)
Write one frame set, including mapping and related data blocks to the output_file of tng_data...
tng_function_status DECLSPECDLLEXPORT tng_util_force_double_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const double *forces)
High-level function for adding data to forces data blocks at double precision.
tng_function_status DECLSPECDLLEXPORT tng_version_major(const tng_trajectory_t tng_data, int *version)
Get the major version of the TNG library.
tng_function_status DECLSPECDLLEXPORT tng_data_vector_interval_get(const tng_trajectory_t tng_data, const int64_t block_id, const int64_t start_frame_nr, const int64_t end_frame_nr, const char hash_mode, void **values, int64_t *stride_length, int64_t *n_values_per_frame, char *type)
Read and retrieve a vector (1D array) of non-particle data, in a specific interval.
tng_function_status DECLSPECDLLEXPORT tng_long_stride_length_get(const tng_trajectory_t tng_data, int64_t *len)
Get the long stride length of the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_frame_set_next_frame_set_file_pos_get(const tng_trajectory_t tng_data, const tng_trajectory_frame_set_t frame_set, int64_t *pos)
Get the file position of the next frame set in the input file.
tng_function_status DECLSPECDLLEXPORT tng_util_pos_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const float *positions)
High-level function for adding data to positions data blocks.
tng_function_status DECLSPECDLLEXPORT tng_molecule_residue_of_index_get(const tng_trajectory_t tng_data, const tng_molecule_t molecule, const int64_t index, tng_residue_t *residue)
Retrieve the residue of a molecule with specified index in the list of chains.
tng_function_status DECLSPECDLLEXPORT tng_last_user_name_set(const tng_trajectory_t tng_data, const char *new_name)
Set the name of the user who last modified the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_input_file_set(const tng_trajectory_t tng_data, const char *file_name)
Set the name of the input file.
tng_function_status DECLSPECDLLEXPORT tng_util_non_particle_data_next_frame_read(const tng_trajectory_t tng_data, const int64_t block_id, void **values, char *data_type, int64_t *retrieved_frame_number, double *retrieved_time)
High-level function for reading the next frame of non-particle-dependent data of a specific type...
tng_function_status DECLSPECDLLEXPORT tng_data_block_name_get(const tng_trajectory_t tng_data, const int64_t block_id, char *name, const int max_len)
Get the name of a data block of a specific ID.
tng_function_status DECLSPECDLLEXPORT tng_last_signature_set(const tng_trajectory_t tng_data, const char *signature)
Set the pgp_signature of the user last modifying the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_molecule_alloc(const tng_trajectory_t tng_data, tng_molecule_t *molecule_p)
Allocate memory for and setup a molecule container.
tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_open(const char *filename, const char mode, tng_trajectory_t *tng_data_p)
High-level function for opening and initializing a TNG trajectory.
tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_close(tng_trajectory_t *tng_data_p)
High-level function for closing a TNG trajectory.
tng_function_status DECLSPECDLLEXPORT tng_molecule_add(const tng_trajectory_t tng_data, const char *name, tng_molecule_t *molecule)
Add a molecule to the trajectory.
Definition: tng_io.h:555
tng_function_status DECLSPECDLLEXPORT tng_version_minor(const tng_trajectory_t tng_data, int *version)
Get the minor version of the TNG library.
tng_hash_type
Definition: tng_io.h:409
tng_function_status DECLSPECDLLEXPORT tng_util_pos_with_time_double_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const double time, const double *positions)
High-level function for adding data to positions data blocks at double precision. If the frame is at ...
tng_function_status DECLSPECDLLEXPORT tng_util_force_with_time_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const double time, const float *forces)
High-level function for adding data to forces data blocks. If the frame is at the beginning of a fram...
tng_function_status DECLSPECDLLEXPORT tng_residue_id_of_particle_nr_get(const tng_trajectory_t tng_data, const int64_t nr, int64_t *id)
Get the residue id (local to molecule) of real particle number (number in mol system).
Definition: tng_io.h:398
tng_compression
Definition: tng_io.h:403
tng_function_status DECLSPECDLLEXPORT tng_molecule_find(const tng_trajectory_t tng_data, const char *name, const int64_t id, tng_molecule_t *molecule)
Find a molecule.
tng_function_status DECLSPECDLLEXPORT tng_residue_atom_of_index_get(const tng_trajectory_t tng_data, const tng_residue_t residue, const int64_t index, tng_atom_t *atom)
Retrieve the atom of a residue with specified index in the list of atoms.
tng_function_status DECLSPECDLLEXPORT tng_residue_num_atoms_get(const tng_trajectory_t tng_data, const tng_residue_t residue, int64_t *n)
Get the number of atoms in a residue.
tng_function_status DECLSPECDLLEXPORT tng_version(const tng_trajectory_t tng_data, char *version, const int max_len)
Get the full version string of the TNG library.
tng_function_status DECLSPECDLLEXPORT tng_input_file_get(const tng_trajectory_t tng_data, char *file_name, const int max_len)
Get the name of the input file.
Definition: tng_io.h:574
tng_function_status DECLSPECDLLEXPORT tng_residue_name_set(const tng_trajectory_t tng_data, const tng_residue_t residue, const char *new_name)
Set the name of a residue.
Definition: tng_io.h:532
tng_function_status DECLSPECDLLEXPORT tng_last_signature_get(const tng_trajectory_t tng_data, char *signature, const int max_len)
Get the pgp_signature of the user last modifying the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_residue_atom_add(const tng_trajectory_t tng_data, const tng_residue_t residue, const char *atom_name, const char *atom_type, tng_atom_t *atom)
Add an atom to a residue.
tng_function_status DECLSPECDLLEXPORT tng_util_vel_with_time_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const double time, const float *velocities)
High-level function for adding data to velocities data blocks. If the frame is at the beginning of a ...
int64_t i
Definition: tng_io.h:577
tng_function_status DECLSPECDLLEXPORT tng_time_per_frame_set(const tng_trajectory_t tng_data, const double time)
Set the time per frame of the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_first_signature_set(const tng_trajectory_t tng_data, const char *signature)
Set the pgp_signature of the user creating the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_particle_data_vector_get(const tng_trajectory_t tng_data, const int64_t block_id, void **values, int64_t *n_frames, int64_t *stride_length, int64_t *n_particles, int64_t *n_values_per_frame, char *type)
Retrieve a vector (1D array) of particle data, from the last read frame set.
tng_function_status DECLSPECDLLEXPORT tng_chain_name_set(const tng_trajectory_t tng_data, const tng_chain_t chain, const char *new_name)
Set the name of a chain.
Definition: tng_io.h:540
tng_function_status DECLSPECDLLEXPORT tng_molecule_name_set(const tng_trajectory_t tng_data, const tng_molecule_t molecule, const char *new_name)
Set the name of a molecule.
tng_function_status DECLSPECDLLEXPORT tng_frame_set_premature_write(const tng_trajectory_t tng_data, const char hash_mode)
Write one frame set even if it does not have as many frames as expected. The function also writes map...
tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_interval_set(const tng_trajectory_t tng_data, const int64_t i, const int64_t n_values_per_frame, const int64_t block_id, const char *block_name, const char particle_dependency, const char compression)
High-level function for setting the writing interval of data blocks.
struct tng_trajectory * tng_trajectory_t
Definition: tng_io_fwd.h:16
tng_particle_dependency
Definition: tng_io.h:532
tng_function_status DECLSPECDLLEXPORT tng_current_frame_set_get(const tng_trajectory_t tng_data, tng_trajectory_frame_set_t *frame_set_p)
Get the current trajectory frame set.
tng_function_status DECLSPECDLLEXPORT tng_trajectory_destroy(tng_trajectory_t *tng_data_p)
Clean up a trajectory data container.
tng_function_status DECLSPECDLLEXPORT tng_frame_set_new(const tng_trajectory_t tng_data, const int64_t first_frame, const int64_t n_frames)
Create and initialise a frame set.
tng_function_status DECLSPECDLLEXPORT tng_atom_name_of_particle_nr_get(const tng_trajectory_t tng_data, const int64_t nr, char *name, const int max_len)
Get the atom name of real particle number (number in mol system).
tng_function_status DECLSPECDLLEXPORT tng_util_force_write_interval_set(const tng_trajectory_t tng_data, const int64_t i)
High-level function for setting the writing interval of force data blocks.
tng_function_status DECLSPECDLLEXPORT tng_util_vel_read_range(const tng_trajectory_t tng_data, const int64_t first_frame, const int64_t last_frame, float **velocities, int64_t *stride_length)
High-level function for reading the velocities of all particles from a specific range of frames...
Definition: tng_io.h:406
tng_function_status DECLSPECDLLEXPORT tng_residue_name_of_particle_nr_get(const tng_trajectory_t tng_data, const int64_t nr, char *name, const int max_len)
Get the residue name of real particle number (number in mol system).
tng_function_status DECLSPECDLLEXPORT tng_num_frames_get(const tng_trajectory_t tng_data, int64_t *n)
Get the number of frames in the trajectory.
Definition: tng_io.h:547
tng_function_status DECLSPECDLLEXPORT tng_frame_set_frame_range_get(const tng_trajectory_t tng_data, const tng_trajectory_frame_set_t frame_set, int64_t *first_frame, int64_t *last_frame)
Get the first and last frames of the frame set.
tng_function_status DECLSPECDLLEXPORT tng_atom_type_of_particle_nr_get(const tng_trajectory_t tng_data, const int64_t nr, char *type, const int max_len)
Get the atom type of real particle number (number in mol system).
tng_function_status DECLSPECDLLEXPORT tng_chain_name_of_particle_nr_get(const tng_trajectory_t tng_data, const int64_t nr, char *name, const int max_len)
Get the chain name of real particle number (number in mol system).
tng_function_status DECLSPECDLLEXPORT tng_last_program_name_get(const tng_trajectory_t tng_data, char *name, const int max_len)
Get the name of the program used when last modifying the trajectory.
Definition: tng_io.h:552
struct tng_chain * tng_chain_t
Definition: tng_io_fwd.h:20
Definition: tng_io.h:410
tng_function_status DECLSPECDLLEXPORT tng_chain_residue_find(const tng_trajectory_t tng_data, const tng_chain_t chain, const char *name, const int64_t id, tng_residue_t *residue)
Find a residue in a chain.
Definition: tng_io.h:399
tng_function_status DECLSPECDLLEXPORT tng_chain_num_residues_get(const tng_trajectory_t tng_data, const tng_chain_t chain, int64_t *n)
Get the number of residues in a molecule chain.
tng_endianness_64
Definition: tng_io.h:396
tng_function_status DECLSPECDLLEXPORT tng_util_generic_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const float *values, const int64_t n_values_per_frame, const int64_t block_id, const char *block_name, const char particle_dependency, const char compression)
High-level function for writing data of one frame to a data block.
tng_function_status DECLSPECDLLEXPORT tng_molecule_existing_add(const tng_trajectory_t tng_data, tng_molecule_t *molecule)
Add an existing molecule (from a molecule container) to the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_atom_name_get(const tng_trajectory_t tng_data, const tng_atom_t atom, char *name, const int max_len)
Get the name of an atom.
tng_function_status DECLSPECDLLEXPORT tng_molecule_of_index_get(const tng_trajectory_t tng_data, const int64_t index, tng_molecule_t *molecule)
Retrieve the molecule with specified index in the list of molecules.
tng_function_status DECLSPECDLLEXPORT tng_first_user_name_get(const tng_trajectory_t tng_data, char *name, const int max_len)
Get the name of the user who created the trajectory.
Definition: tng_io.h:404
tng_function_status DECLSPECDLLEXPORT tng_util_pos_with_time_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const double time, const float *positions)
High-level function for adding data to positions data blocks. If the frame is at the beginning of a f...
tng_function_status DECLSPECDLLEXPORT tng_first_signature_get(const tng_trajectory_t tng_data, char *signature, const int max_len)
Get the pgp_signature of the user creating the trajectory.
tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_next_only_data_from_block_id(const tng_trajectory_t tng_data, const char hash_mode, const int64_t block_id)
Read one (the next) frame set, including particle mapping and data blocks with a specific block id fr...
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_read(const tng_trajectory_t tng_data, float **box_shape, int64_t *stride_length)
High-level function for reading the box shape from all frames.
tng_function_status DECLSPECDLLEXPORT tng_util_pos_double_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const double *positions)
High-level function for adding data to positions data blocks at double precision. ...
tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_set(const tng_trajectory_t tng_data, const tng_molecule_t molecule, const int64_t cnt)
Set the count of a molecule.
tng_function_status
Definition: tng_io.h:547
Definition: tng_io.h:392
Definition: tng_io.h:396
Definition: tng_io.h:387
tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_interval_double_set(const tng_trajectory_t tng_data, const int64_t i, const int64_t n_values_per_frame, const int64_t block_id, const char *block_name, const char particle_dependency, const char compression)
High-level function for setting the writing interval of data blocks containing double precision data...
tng_function_status DECLSPECDLLEXPORT tng_molecule_num_residues_get(const tng_trajectory_t tng_data, const tng_molecule_t molecule, int64_t *n)
Get the number of residues in a molecule.
tng_function_status DECLSPECDLLEXPORT tng_util_prepare_append_after_frame(const tng_trajectory_t tng_data, const int64_t prev_frame)
Finds the frame set of the specified frame in order to prepare for writing after it.
tng_function_status DECLSPECDLLEXPORT tng_molecule_init(const tng_trajectory_t tng_data, const tng_molecule_t molecule)
Setup a molecule container.
tng_function_status DECLSPECDLLEXPORT tng_util_force_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const float *forces)
High-level function for adding data to forces data blocks.
tng_function_status DECLSPECDLLEXPORT tng_frame_data_write(const tng_trajectory_t tng_data, const int64_t frame_nr, const int64_t block_id, const void *values, const char hash_mode)
Write data of one trajectory frame to the output_file of tng_data.
tng_function_status DECLSPECDLLEXPORT tng_file_headers_read(const tng_trajectory_t tng_data, const char hash_mode)
Read the header blocks from the input_file of tng_data.
tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_list_get(const tng_trajectory_t tng_data, int64_t **mol_cnt_list)
Get the list of the count of each molecule.
tng_function_status DECLSPECDLLEXPORT tng_frame_set_of_frame_find(const tng_trajectory_t tng_data, const int64_t frame)
Find the frame set containing a specific frame.
struct tng_molecule * tng_molecule_t
Definition: tng_io_fwd.h:18
tng_function_status DECLSPECDLLEXPORT tng_implicit_num_particles_set(const tng_trajectory_t tng_data, const int64_t n)
Set the number of particles, in the case no molecular system is used.