TNG API 1.8.2
A flexible binary trajectory format
Loading...
Searching...
No Matches
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-2017, 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
305#ifndef TNG_IO_H
306#define TNG_IO_H 1
307
308#include <stdio.h>
309#include <stdlib.h>
310#include <string.h>
311#include <assert.h>
312#include "tng_io_fwd.h"
313
314#ifdef USE_STD_INTTYPES_H
315#include <inttypes.h>
316#else
317/* Visual Studio does not contain inttypes.h and stdint.h. Some defines and
318 * typedefs are used from the GNU C Library */
319#ifdef _MSC_VER
320
321typedef __int32 int32_t;
322typedef unsigned __int32 uint32_t;
323typedef __int64 int64_t;
324typedef unsigned __int64 uint64_t;
325
326#else
327#include <stdint.h>
328#endif /* _MSC_VER */
329
330/* This is from inttypes.h (GNU C Library) */
331/* The ISO C99 standard specifies that these macros must only be
332 defined if explicitly requested. */
333#if !defined __cplusplus || defined __STDC_FORMAT_MACROS
334
335# if __WORDSIZE == 64
336# define __PRI64_PREFIX "l"
337# define __PRIPTR_PREFIX "l"
338# else
339# define __PRI64_PREFIX "ll"
340# define __PRIPTR_PREFIX
341# endif
342
343/* From stdint.h (GNU C Library) */
344/* Macros for printing format specifiers. */
345/* Decimal notation. */
346#ifndef PRId64
347# define PRId64 __PRI64_PREFIX "d"
348#endif
349
350#ifndef PRIu64
351# define PRIu64 __PRI64_PREFIX "u"
352#endif
353
354#ifndef PRIuPTR
355# define PRIuPTR __PRIPTR_PREFIX "u"
356#endif
357
358#endif
359
360#endif /* USE_STD_INTTYPES_H */
361
362#ifndef USE_WINDOWS
363#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
364#define USE_WINDOWS
365#endif /* win32... */
366#endif /* not defined USE_WINDOWS */
367
368#ifndef DECLSPECDLLEXPORT
369#ifdef USE_WINDOWS
370#define DECLSPECDLLEXPORT __declspec(dllexport)
371#else /* USE_WINDOWS */
372#define DECLSPECDLLEXPORT
373#endif /* USE_WINDOWS */
374#endif /* DECLSPECDLLEXPORT */
375
377#define TNG_FRAME_DEPENDENT 1
379#define TNG_PARTICLE_DEPENDENT 2
380
382#define TNG_MAX_DATE_STR_LEN 24
384#define TNG_MD5_HASH_LEN 16
386#define TNG_MAX_STR_LEN 1024
387
388#ifndef NDEBUG
389#define TNG_ASSERT(cnd, msg) if(!(cnd)) {printf("%s\n", msg); assert(cnd);}
390#else
391#define TNG_ASSERT(cnd, msg) (void)0;
392#endif
393
395typedef enum {TNG_BIG_ENDIAN,
397
399typedef enum {TNG_BIG_ENDIAN_32,
402
404typedef enum {TNG_BIG_ENDIAN_64,
409
411typedef enum {TNG_UNCOMPRESSED,
415
417typedef enum {TNG_NO_HASH,
420
423
428#define TNG_GENERAL_INFO 0x0000000000000000LL
429#define TNG_MOLECULES 0x0000000000000001LL
430#define TNG_TRAJECTORY_FRAME_SET 0x0000000000000002LL
431#define TNG_PARTICLE_MAPPING 0x0000000000000003LL
439#define TNG_TRAJ_BOX_SHAPE 0x0000000010000000LL
440#define TNG_TRAJ_POSITIONS 0x0000000010000001LL
441#define TNG_TRAJ_VELOCITIES 0x0000000010000002LL
442#define TNG_TRAJ_FORCES 0x0000000010000003LL
443#define TNG_TRAJ_PARTIAL_CHARGES 0x0000000010000004LL
444#define TNG_TRAJ_FORMAL_CHARGES 0x0000000010000005LL
445#define TNG_TRAJ_B_FACTORS 0x0000000010000006LL
446#define TNG_TRAJ_ANISOTROPIC_B_FACTORS 0x0000000010000007LL
447#define TNG_TRAJ_OCCUPANCY 0x0000000010000008LL
448#define TNG_TRAJ_GENERAL_COMMENTS 0x0000000010000009LL
449#define TNG_TRAJ_MASSES 0x0000000010000010LL
457#define TNG_GMX_LAMBDA 0x1000000010000000LL
458#define TNG_GMX_ENERGY_ANGLE 0x1000000010000001LL
459#define TNG_GMX_ENERGY_RYCKAERT_BELL 0x1000000010000002LL
460#define TNG_GMX_ENERGY_LJ_14 0x1000000010000003LL
461#define TNG_GMX_ENERGY_COULOMB_14 0x1000000010000004LL
462#define TNG_GMX_ENERGY_LJ_(SR) 0x1000000010000005LL
463#define TNG_GMX_ENERGY_COULOMB_(SR) 0x1000000010000006LL
464#define TNG_GMX_ENERGY_COUL_RECIP 0x1000000010000007LL
465#define TNG_GMX_ENERGY_POTENTIAL 0x1000000010000008LL
466#define TNG_GMX_ENERGY_KINETIC_EN 0x1000000010000009LL
467#define TNG_GMX_ENERGY_TOTAL_ENERGY 0x1000000010000010LL
468#define TNG_GMX_ENERGY_TEMPERATURE 0x1000000010000011LL
469#define TNG_GMX_ENERGY_PRESSURE 0x1000000010000012LL
470#define TNG_GMX_ENERGY_CONSTR_RMSD 0x1000000010000013LL
471#define TNG_GMX_ENERGY_CONSTR2_RMSD 0x1000000010000014LL
472#define TNG_GMX_ENERGY_BOX_X 0x1000000010000015LL
473#define TNG_GMX_ENERGY_BOX_Y 0x1000000010000016LL
474#define TNG_GMX_ENERGY_BOX_Z 0x1000000010000017LL
475#define TNG_GMX_ENERGY_BOXXX 0x1000000010000018LL
476#define TNG_GMX_ENERGY_BOXYY 0x1000000010000019LL
477#define TNG_GMX_ENERGY_BOXZZ 0x1000000010000020LL
478#define TNG_GMX_ENERGY_BOXYX 0x1000000010000021LL
479#define TNG_GMX_ENERGY_BOXZX 0x1000000010000022LL
480#define TNG_GMX_ENERGY_BOXZY 0x1000000010000023LL
481#define TNG_GMX_ENERGY_BOXVELXX 0x1000000010000024LL
482#define TNG_GMX_ENERGY_BOXVELYY 0x1000000010000025LL
483#define TNG_GMX_ENERGY_BOXVELZZ 0x1000000010000026LL
484#define TNG_GMX_ENERGY_BOXVELYX 0x1000000010000027LL
485#define TNG_GMX_ENERGY_BOXVELZX 0x1000000010000028LL
486#define TNG_GMX_ENERGY_BOXVELZY 0x1000000010000029LL
487#define TNG_GMX_ENERGY_VOLUME 0x1000000010000030LL
488#define TNG_GMX_ENERGY_DENSITY 0x1000000010000031LL
489#define TNG_GMX_ENERGY_PV 0x1000000010000032LL
490#define TNG_GMX_ENERGY_ENTHALPY 0x1000000010000033LL
491#define TNG_GMX_ENERGY_VIR_XX 0x1000000010000034LL
492#define TNG_GMX_ENERGY_VIR_XY 0x1000000010000035LL
493#define TNG_GMX_ENERGY_VIR_XZ 0x1000000010000036LL
494#define TNG_GMX_ENERGY_VIR_YX 0x1000000010000037LL
495#define TNG_GMX_ENERGY_VIR_YY 0x1000000010000038LL
496#define TNG_GMX_ENERGY_VIR_YZ 0x1000000010000039LL
497#define TNG_GMX_ENERGY_VIR_ZX 0x1000000010000040LL
498#define TNG_GMX_ENERGY_VIR_ZY 0x1000000010000041LL
499#define TNG_GMX_ENERGY_VIR_ZZ 0x1000000010000042LL
500#define TNG_GMX_ENERGY_SHAKEVIR_XX 0x1000000010000043LL
501#define TNG_GMX_ENERGY_SHAKEVIR_XY 0x1000000010000044LL
502#define TNG_GMX_ENERGY_SHAKEVIR_XZ 0x1000000010000045LL
503#define TNG_GMX_ENERGY_SHAKEVIR_YX 0x1000000010000046LL
504#define TNG_GMX_ENERGY_SHAKEVIR_YY 0x1000000010000047LL
505#define TNG_GMX_ENERGY_SHAKEVIR_YZ 0x1000000010000048LL
506#define TNG_GMX_ENERGY_SHAKEVIR_ZX 0x1000000010000049LL
507#define TNG_GMX_ENERGY_SHAKEVIR_ZY 0x1000000010000050LL
508#define TNG_GMX_ENERGY_SHAKEVIR_ZZ 0x1000000010000051LL
509#define TNG_GMX_ENERGY_FORCEVIR_XX 0x1000000010000052LL
510#define TNG_GMX_ENERGY_FORCEVIR_XY 0x1000000010000053LL
511#define TNG_GMX_ENERGY_FORCEVIR_XZ 0x1000000010000054LL
512#define TNG_GMX_ENERGY_FORCEVIR_YX 0x1000000010000055LL
513#define TNG_GMX_ENERGY_FORCEVIR_YY 0x1000000010000056LL
514#define TNG_GMX_ENERGY_FORCEVIR_YZ 0x1000000010000057LL
515#define TNG_GMX_ENERGY_FORCEVIR_ZX 0x1000000010000058LL
516#define TNG_GMX_ENERGY_FORCEVIR_ZY 0x1000000010000059LL
517#define TNG_GMX_ENERGY_FORCEVIR_ZZ 0x1000000010000060LL
518#define TNG_GMX_ENERGY_PRES_XX 0x1000000010000061LL
519#define TNG_GMX_ENERGY_PRES_XY 0x1000000010000062LL
520#define TNG_GMX_ENERGY_PRES_XZ 0x1000000010000063LL
521#define TNG_GMX_ENERGY_PRES_YX 0x1000000010000064LL
522#define TNG_GMX_ENERGY_PRES_YY 0x1000000010000065LL
523#define TNG_GMX_ENERGY_PRES_YZ 0x1000000010000066LL
524#define TNG_GMX_ENERGY_PRES_ZX 0x1000000010000067LL
525#define TNG_GMX_ENERGY_PRES_ZY 0x1000000010000068LL
526#define TNG_GMX_ENERGY_PRES_ZZ 0x1000000010000069LL
527#define TNG_GMX_ENERGY_SURFXSURFTEN 0x1000000010000070LL
528#define TNG_GMX_ENERGY_MUX 0x1000000010000071LL
529#define TNG_GMX_ENERGY_MUY 0x1000000010000072LL
530#define TNG_GMX_ENERGY_MUZ 0x1000000010000073LL
531#define TNG_GMX_ENERGY_VCOS 0x1000000010000074LL
532#define TNG_GMX_ENERGY_VISC 0x1000000010000075LL
533#define TNG_GMX_ENERGY_BAROSTAT 0x1000000010000076LL
534#define TNG_GMX_ENERGY_T_SYSTEM 0x1000000010000077LL
535#define TNG_GMX_ENERGY_LAMB_SYSTEM 0x1000000010000078LL
536#define TNG_GMX_SELECTION_GROUP_NAMES 0x1000000010000079LL
537#define TNG_GMX_ATOM_SELECTION_GROUP 0x1000000010000080LL
543
544
546
551
557
562
564typedef enum {TNG_CHAR_DATA,
568
569
570struct tng_trajectory;
571struct tng_molecule;
572struct tng_chain;
573struct tng_residue;
574struct tng_atom;
575struct tng_bond;
576struct tng_gen_block;
577struct tng_particle_mapping;
578struct tng_trajectory_frame_set;
579struct tng_particle_data;
580struct tng_non_particle_data;
581
584 double d;
585 float f;
586 int64_t i;
587 char *c;
588};
589
590
591#ifdef __cplusplus
592extern "C"
593{
594#endif
595
612 (const tng_trajectory_t tng_data,
613 int *version);
614
624 (const tng_trajectory_t tng_data,
625 int *version);
626
636 (const tng_trajectory_t tng_data,
637 int *patch_level);
638
652 (const tng_trajectory_t tng_data,
653 char *version,
654 const int max_len);
655
665 (tng_trajectory_t *tng_data_p);
666
675 (tng_trajectory_t *tng_data_p);
676
693 (const tng_trajectory_t src, tng_trajectory_t *dest_p);
694
710 (const tng_trajectory_t tng_data,
711 char *file_name, const int max_len);
712
725 (const tng_trajectory_t tng_data,
726 const char *file_name);
727
743 (const tng_trajectory_t tng_data,
744 char *file_name, const int max_len);
745
758 (const tng_trajectory_t tng_data,
759 const char *file_name);
760
774 (const tng_trajectory_t tng_data,
775 const char *file_name);
776
790 (const tng_trajectory_t tng_data, tng_file_endianness *endianness);
791
805 (const tng_trajectory_t tng_data,
806 const tng_file_endianness endianness);
807
823 (const tng_trajectory_t tng_data,
824 char *name, const int max_len);
825
838 (const tng_trajectory_t tng_data,
839 const char *new_name);
840
856 (const tng_trajectory_t tng_data,
857 char *name, const int max_len);
858
871 (const tng_trajectory_t tng_data,
872 const char *new_name);
873
889 (const tng_trajectory_t tng_data,
890 char *name, const int max_len);
891
904 (const tng_trajectory_t tng_data,
905 const char *new_name);
906
922 (const tng_trajectory_t tng_data,
923 char *name, const int max_len);
924
937 (const tng_trajectory_t tng_data,
938 const char *new_name);
939
955 (const tng_trajectory_t tng_data,
956 char *name, const int max_len);
957
970 (const tng_trajectory_t tng_data,
971 const char *new_name);
972
988 (const tng_trajectory_t tng_data,
989 char *name, const int max_len);
990
1003 (const tng_trajectory_t tng_data,
1004 const char *new_name);
1005
1021 (const tng_trajectory_t tng_data,
1022 char *signature, const int max_len);
1023
1036 (const tng_trajectory_t tng_data,
1037 const char *signature);
1038
1054 (const tng_trajectory_t tng_data,
1055 char *signature, const int max_len);
1056
1069 (const tng_trajectory_t tng_data,
1070 const char *signature);
1071
1087 (const tng_trajectory_t tng_data,
1088 char *name, const int max_len);
1089
1102 (const tng_trajectory_t tng_data,
1103 const char *new_name);
1104
1115 (const tng_trajectory_t tng_data,
1116 int64_t *len);
1117
1128 (const tng_trajectory_t tng_data,
1129 const int64_t len);
1130
1141 (const tng_trajectory_t tng_data,
1142 int64_t *len);
1143
1154 (const tng_trajectory_t tng_data,
1155 const int64_t len);
1156
1167 (const tng_trajectory_t tng_data,
1168 double *time);
1169
1181 (const tng_trajectory_t tng_data,
1182 const double time);
1183
1194 (const tng_trajectory_t tng_data,
1195 int64_t *len);
1196
1210 (const tng_trajectory_t tng_data,
1211 int64_t *n);
1212
1226 (const tng_trajectory_t tng_data,
1227 double *precision);
1228
1240 (const tng_trajectory_t tng_data,
1241 const double precision);
1242
1255 (const tng_trajectory_t tng_data,
1256 const int64_t n);
1257
1270 (const tng_trajectory_t tng_data,
1271 int64_t *n);
1272
1286 (const tng_trajectory_t tng_data,
1287 char *variable);
1288
1299 (const tng_trajectory_t tng_data,
1300 int64_t *n);
1301
1314 (const tng_trajectory_t tng_data,
1315 int64_t *n);
1316
1328 (const tng_trajectory_t tng_data,
1329 int64_t **mol_cnt_list);
1330
1343 (const tng_trajectory_t tng_data,
1344 int64_t *exp);
1345
1357 (const tng_trajectory_t tng_data,
1358 const int64_t exp);
1359
1371 (const tng_trajectory_t tng_data,
1372 int64_t *n);
1373
1387 (const tng_trajectory_t tng_data,
1388 const int64_t n);
1389
1402 (const tng_trajectory_t tng_data,
1403 int64_t *n);
1404
1415 (const tng_trajectory_t tng_data,
1416 tng_trajectory_frame_set_t *frame_set_p);
1417
1431 (const tng_trajectory_t tng_data,
1432 const int64_t nr);
1433
1447 (const tng_trajectory_t tng_data,
1448 const int64_t frame);
1449
1462 (const tng_trajectory_t tng_data,
1463 const tng_trajectory_frame_set_t frame_set,
1464 int64_t *pos);
1465
1478 (const tng_trajectory_t tng_data,
1479 const tng_trajectory_frame_set_t frame_set,
1480 int64_t *pos);
1481
1497 (const tng_trajectory_t tng_data,
1498 const tng_trajectory_frame_set_t frame_set,
1499 int64_t *first_frame,
1500 int64_t *last_frame);
1501
1510 tng_molecule_t *molecule_p);
1511
1522 tng_molecule_t *molecule_p);
1523
1532 (const tng_trajectory_t tng_data,
1533 const tng_molecule_t molecule);
1534
1545 (const tng_trajectory_t tng_data,
1546 const tng_molecule_t molecule);
1547
1561 (const tng_trajectory_t tng_data,
1562 const char *name,
1563 tng_molecule_t *molecule);
1564
1579 (const tng_trajectory_t tng_data,
1580 const char *name,
1581 const int64_t id,
1582 tng_molecule_t *molecule);
1583
1595 (const tng_trajectory_t tng_data,
1596 tng_molecule_t *molecule);
1597
1613 (const tng_trajectory_t tng_data,
1614 const tng_molecule_t molecule,
1615 char *name,
1616 const int max_len);
1617
1631 (const tng_trajectory_t tng_data,
1632 const tng_molecule_t molecule,
1633 const char *new_name);
1634
1648 (const tng_trajectory_t tng_data,
1649 const tng_molecule_t molecule,
1650 int64_t *cnt);
1651
1663 (const tng_trajectory_t tng_data,
1664 const tng_molecule_t molecule,
1665 const int64_t cnt);
1666
1685 (const tng_trajectory_t tng_data,
1686 const char *name,
1687 const int64_t id,
1688 tng_molecule_t *molecule);
1689
1702 (const tng_trajectory_t tng_data,
1703 const int64_t index,
1704 tng_molecule_t *molecule);
1705
1721 const tng_trajectory_t tng_data_dest);
1722
1733 (const tng_trajectory_t tng_data,
1734 const tng_molecule_t molecule,
1735 int64_t *n);
1736
1750 (const tng_trajectory_t tng_data,
1751 const tng_molecule_t molecule,
1752 const int64_t index,
1753 tng_chain_t *chain);
1754
1765 (const tng_trajectory_t tng_data,
1766 const tng_molecule_t molecule,
1767 int64_t *n);
1768
1782 (const tng_trajectory_t tng_data,
1783 const tng_molecule_t molecule,
1784 const int64_t index,
1785 tng_residue_t *residue);
1786
1797 (const tng_trajectory_t tng_data,
1798 const tng_molecule_t molecule,
1799 int64_t *n);
1800
1814 (const tng_trajectory_t tng_data,
1815 const tng_molecule_t molecule,
1816 const int64_t index,
1817 tng_atom_t *atom);
1818
1838 (const tng_trajectory_t tng_data,
1839 const tng_molecule_t molecule,
1840 const char *name,
1841 const int64_t id,
1842 tng_chain_t *chain);
1843
1858 (const tng_trajectory_t tng_data,
1859 const tng_molecule_t molecule,
1860 const char *name,
1861 tng_chain_t *chain);
1862
1878 (const tng_trajectory_t tng_data,
1879 const tng_molecule_t molecule,
1880 const char *name,
1881 const int64_t id,
1882 tng_chain_t *chain);
1883
1897 (const tng_trajectory_t tng_data,
1898 const tng_molecule_t molecule,
1899 const int64_t from_atom_id,
1900 const int64_t to_atom_id,
1901 tng_bond_t *bond);
1902
1920 (const tng_trajectory_t tng_data,
1921 const tng_molecule_t molecule,
1922 const char *name,
1923 const int64_t id,
1924 tng_atom_t *atom);
1925
1941 (const tng_trajectory_t tng_data,
1942 const tng_chain_t chain,
1943 char *name,
1944 const int max_len);
1945
1957 (const tng_trajectory_t tng_data,
1958 const tng_chain_t chain,
1959 const char *new_name);
1960
1971 (const tng_trajectory_t tng_data,
1972 const tng_chain_t chain,
1973 int64_t *n);
1974
1988 (const tng_trajectory_t tng_data,
1989 const tng_chain_t chain,
1990 const int64_t index,
1991 tng_residue_t *residue);
1992
2010 (const tng_trajectory_t tng_data,
2011 const tng_chain_t chain,
2012 const char *name,
2013 const int64_t id,
2014 tng_residue_t *residue);
2015
2030 (const tng_trajectory_t tng_data,
2031 const tng_chain_t chain,
2032 const char *name,
2033 tng_residue_t *residue);
2034
2050 (const tng_trajectory_t tng_data,
2051 const tng_chain_t chain,
2052 const char *name,
2053 const int64_t id,
2054 tng_residue_t *residue);
2055
2071 (const tng_trajectory_t tng_data,
2072 const tng_residue_t residue,
2073 char *name,
2074 const int max_len);
2075
2089 (const tng_trajectory_t tng_data,
2090 const tng_residue_t residue,
2091 const char *new_name);
2092
2103 (const tng_trajectory_t tng_data,
2104 const tng_residue_t residue,
2105 int64_t *n);
2106
2120 (const tng_trajectory_t tng_data,
2121 const tng_residue_t residue,
2122 const int64_t index,
2123 tng_atom_t *atom);
2124
2142 (const tng_trajectory_t tng_data,
2143 const tng_residue_t residue,
2144 const char *atom_name,
2145 const char *atom_type,
2146 tng_atom_t *atom);
2147
2166 (const tng_trajectory_t tng_data,
2167 const tng_residue_t residue,
2168 const char *atom_name,
2169 const char *atom_type,
2170 const int64_t id,
2171 tng_atom_t *atom);
2172
2182 (const tng_trajectory_t tng_data,
2183 const tng_atom_t atom,
2184 tng_residue_t *residue);
2185
2201 (const tng_trajectory_t tng_data,
2202 const tng_atom_t atom,
2203 char *name,
2204 const int max_len);
2205
2219 (const tng_trajectory_t tng_data,
2220 const tng_atom_t atom,
2221 const char *new_name);
2222
2238 (const tng_trajectory_t tng_data,
2239 const tng_atom_t atom,
2240 char *type,
2241 const int max_len);
2242
2256 (const tng_trajectory_t tng_data,
2257 const tng_atom_t atom,
2258 const char *new_type);
2259
2275 (const tng_trajectory_t tng_data,
2276 const int64_t nr,
2277 char *name,
2278 const int max_len);
2279
2292 (const tng_trajectory_t tng_data,
2293 const int64_t nr,
2294 int64_t *id);
2295
2321 (const tng_trajectory_t tng_data,
2322 int64_t *n_bonds,
2323 int64_t **from_atoms,
2324 int64_t **to_atoms);
2325
2341 (const tng_trajectory_t tng_data,
2342 const int64_t nr,
2343 char *name,
2344 const int max_len);
2345
2361 (const tng_trajectory_t tng_data,
2362 const int64_t nr,
2363 char *name,
2364 const int max_len);
2365
2379 (const tng_trajectory_t tng_data,
2380 const int64_t nr,
2381 int64_t *id);
2382
2396 (const tng_trajectory_t tng_data,
2397 const int64_t nr,
2398 int64_t *id);
2399
2415 (const tng_trajectory_t tng_data,
2416 const int64_t nr,
2417 char *name,
2418 const int max_len);
2419
2435 (const tng_trajectory_t tng_data,
2436 const int64_t nr,
2437 char *type,
2438 const int max_len);
2439
2462 (const tng_trajectory_t tng_data,
2463 const int64_t num_first_particle,
2464 const int64_t n_particles,
2465 const int64_t *mapping_table);
2466
2478 (const tng_trajectory_t tng_data);
2479
2497 (const tng_trajectory_t tng_data,
2498 const char hash_mode);
2499
2516 (const tng_trajectory_t tng_data,
2517 const char hash_mode);
2518
2540 (const tng_trajectory_t tng_data,
2541 const tng_gen_block_t block_data,
2542 const char hash_mode);
2543
2557 (const tng_trajectory_t tng_data,
2558 const char hash_mode);
2559
2577 (const tng_trajectory_t tng_data,
2578 const char hash_mode,
2579 const int64_t block_id);
2580
2597 (const tng_trajectory_t tng_data,
2598 const char hash_mode);
2599
2617 (const tng_trajectory_t tng_data,
2618 const char hash_mode,
2619 const int64_t block_id);
2620
2636 (const tng_trajectory_t tng_data,
2637 const char hash_mode);
2638
2657 (const tng_trajectory_t tng_data,
2658 const char hash_mode);
2659
2676 (const tng_trajectory_t tng_data,
2677 const int64_t first_frame,
2678 const int64_t n_frames);
2679
2698 (const tng_trajectory_t tng_data,
2699 const int64_t first_frame,
2700 const int64_t n_frames,
2701 const double first_frame_time);
2702
2715 (const tng_trajectory_t tng_data,
2716 const double first_frame_time);
2717
2733 (const tng_trajectory_t tng_data,
2734 int64_t *frame);
2735
2764 (const tng_trajectory_t tng_data,
2765 const int64_t id,
2766 const char *block_name,
2767 const char datatype,
2768 const char block_type_flag,
2769 int64_t n_frames,
2770 const int64_t n_values_per_frame,
2771 int64_t stride_length,
2772 const int64_t codec_id,
2773 void *new_data);
2774
2809 (const tng_trajectory_t tng_data,
2810 const int64_t id,
2811 const char *block_name,
2812 const char datatype,
2813 const char block_type_flag,
2814 int64_t n_frames,
2815 const int64_t n_values_per_frame,
2816 int64_t stride_length,
2817 const int64_t num_first_particle,
2818 const int64_t n_particles,
2819 const int64_t codec_id,
2820 void *new_data);
2821
2837 (const tng_trajectory_t tng_data,
2838 const int64_t block_id,
2839 char *name,
2840 const int max_len);
2841
2858 (const tng_trajectory_t tng_data,
2859 const int64_t block_id,
2860 int *block_dependency);
2861
2875 (const tng_trajectory_t tng_data,
2876 const int64_t block_id,
2877 int64_t *n_values_per_frame);
2878
2900 (const tng_trajectory_t tng_data,
2901 const int64_t frame_nr,
2902 const int64_t block_id,
2903 const void *values,
2904 const char hash_mode);
2905
2934 (const tng_trajectory_t tng_data,
2935 const int64_t frame_nr,
2936 const int64_t block_id,
2937 const int64_t val_first_particle,
2938 const int64_t val_n_particles,
2939 const void *values,
2940 const char hash_mode);
2941
2955 (const tng_trajectory_t tng_data,
2956 union data_values **values,
2957 const int64_t n_frames,
2958 const int64_t n_values_per_frame,
2959 const char type);
2960
2975 (const tng_trajectory_t tng_data,
2976 union data_values ***values,
2977 const int64_t n_frames,
2978 const int64_t n_particles,
2979 const int64_t n_values_per_frame,
2980 const char type);
2981
3012 const int64_t block_id,
3013 union data_values ***values,
3014 int64_t *n_frames,
3015 int64_t *n_values_per_frame,
3016 char *type);
3017
3050 (const tng_trajectory_t tng_data,
3051 const int64_t block_id,
3052 void **values,
3053 int64_t *n_frames,
3054 int64_t *stride_length,
3055 int64_t *n_values_per_frame,
3056 char *type);
3057
3091 (const tng_trajectory_t tng_data,
3092 const int64_t block_id,
3093 const int64_t start_frame_nr,
3094 const int64_t end_frame_nr,
3095 const char hash_mode,
3096 union data_values ***values,
3097 int64_t *n_values_per_frame,
3098 char *type);
3099
3137 (const tng_trajectory_t tng_data,
3138 const int64_t block_id,
3139 const int64_t start_frame_nr,
3140 const int64_t end_frame_nr,
3141 const char hash_mode,
3142 void **values,
3143 int64_t *stride_length,
3144 int64_t *n_values_per_frame,
3145 char *type);
3146
3184 (const tng_trajectory_t tng_data,
3185 const int64_t block_id,
3186 union data_values ****values,
3187 int64_t *n_frames,
3188 int64_t *n_particles,
3189 int64_t *n_values_per_frame,
3190 char *type);
3191
3229 (const tng_trajectory_t tng_data,
3230 const int64_t block_id,
3231 void **values,
3232 int64_t *n_frames,
3233 int64_t *stride_length,
3234 int64_t *n_particles,
3235 int64_t *n_values_per_frame,
3236 char *type);
3237
3280 (const tng_trajectory_t tng_data,
3281 const int64_t block_id,
3282 const int64_t start_frame_nr,
3283 const int64_t end_frame_nr,
3284 const char hash_mode,
3285 union data_values ****values,
3286 int64_t *n_particles,
3287 int64_t *n_values_per_frame,
3288 char *type);
3289
3334 (const tng_trajectory_t tng_data,
3335 const int64_t block_id,
3336 const int64_t start_frame_nr,
3337 const int64_t end_frame_nr,
3338 const char hash_mode,
3339 void **values,
3340 int64_t *n_particles,
3341 int64_t *stride_length,
3342 int64_t *n_values_per_frame,
3343 char *type);
3344
3359 (const tng_trajectory_t tng_data,
3360 const int64_t block_id,
3361 int64_t frame,
3362 int64_t *stride_length);
3363
3376 (const tng_trajectory_t tng_data,
3377 char *time); /* end of group1 */
3379
3404 (const char *filename,
3405 const char mode,
3406 tng_trajectory_t *tng_data_p);
3407
3415 (tng_trajectory_t *tng_data_p);
3416
3430 (const tng_trajectory_t tng_data,
3431 const int64_t frame_nr,
3432 double *time);
3433
3434/*
3435 * @brief High-level function for getting the molecules in the mol system.
3436 * @param tng_data is the trajectory containing the mol system.
3437 * @param n_mols is set to the number of molecules in the system.
3438 * @param molecule_cnt_list will be pointing to the list of counts of each molecule
3439 * in the mol system.
3440 * @param mols pointing to the list of molecules in the mol system.
3441 * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
3442 * must be initialised before using it.
3443 * @pre \code n_mols != 0 \endcode The pointer to the number of molecules must
3444 * not be a NULL pointer.
3445 * @return TNG_SUCCESS (0) if successful.
3446 */
3447/*tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_molecules_get
3448 (const tng_trajectory_t tng_data,
3449 int64_t *n_mols,
3450 int64_t **molecule_cnt_list,
3451 tng_molecule_t *mols);
3452*/
3453/*
3454 * @brief High-level function for adding a molecule to the mol system.
3455 * @param tng_data is the trajectory containing the mol system.
3456 * @param name is the name of the molecule to add.
3457 * @param cnt is the count of the molecule.
3458 * @param mol is set to point to the newly created molecule.
3459 * @pre \code name != 0 \endcode The pointer to the name must not be a
3460 * NULL pointer.
3461 * @pre \code cnt >= 0 \endcode The requested count must be >= 0.
3462 * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
3463 * has occured or TNG_CRITICAL (2) if a major error has occured.
3464 */
3465/*tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_molecule_add
3466 (const tng_trajectory_t tng_data,
3467 const char *name,
3468 const int64_t cnt,
3469 tng_molecule_t *mol);
3470*/
3471/*
3472// tng_function_status DECLSPECDLLEXPORT tng_util_molecule_particles_get
3473// (const tng_trajectory_t tng_data,
3474// const tng_molecule_t mol,
3475// int64_t *n_particles,
3476// char ***names,
3477// char ***types,
3478// char ***res_names,
3479// int64_t **res_ids,
3480// char ***chain_names,
3481// int64_t **chain_ids);
3482//
3483// tng_function_status DECLSPECDLLEXPORT tng_util_molecule_particles_set
3484// (const tng_trajectory_t tng_data,
3485// tng_molecule_t mol,
3486// const int64_t n_particles,
3487// const char **names,
3488// const char **types,
3489// const char **res_names,
3490// const int64_t *res_ids,
3491// const char **chain_names,
3492// const int64_t *chain_ids);
3493*/
3515 (const tng_trajectory_t tng_data,
3516 float **positions,
3517 int64_t *stride_length);
3518
3540 (const tng_trajectory_t tng_data,
3541 float **velocities,
3542 int64_t *stride_length);
3543
3565 (const tng_trajectory_t tng_data,
3566 float **forces,
3567 int64_t *stride_length);
3568
3593 (const tng_trajectory_t tng_data,
3594 float **box_shape,
3595 int64_t *stride_length);
3596
3629 (const tng_trajectory_t tng_data,
3630 const int64_t block_id,
3631 void **values,
3632 char *data_type,
3633 int64_t *retrieved_frame_number,
3634 double *retrieved_time);
3635
3665 (const tng_trajectory_t tng_data,
3666 const int64_t block_id,
3667 void **values,
3668 char *data_type,
3669 int64_t *retrieved_frame_number,
3670 double *retrieved_time);
3671
3697 (const tng_trajectory_t tng_data,
3698 const int64_t first_frame,
3699 const int64_t last_frame,
3700 float **positions,
3701 int64_t *stride_length);
3702
3728 (const tng_trajectory_t tng_data,
3729 const int64_t first_frame,
3730 const int64_t last_frame,
3731 float **velocities,
3732 int64_t *stride_length);
3733
3759 (const tng_trajectory_t tng_data,
3760 const int64_t first_frame,
3761 const int64_t last_frame,
3762 float **forces,
3763 int64_t *stride_length);
3764
3796 (const tng_trajectory_t tng_data,
3797 const int64_t first_frame,
3798 const int64_t last_frame,
3799 float **box_shape,
3800 int64_t *stride_length);
3801
3831 (const tng_trajectory_t tng_data,
3832 const int64_t i,
3833 const int64_t n_values_per_frame,
3834 const int64_t block_id,
3835 const char *block_name,
3836 const char particle_dependency,
3837 const char compression);
3838
3869 (const tng_trajectory_t tng_data,
3870 const int64_t i,
3871 const int64_t n_values_per_frame,
3872 const int64_t block_id,
3873 const char *block_name,
3874 const char particle_dependency,
3875 const char compression);
3876
3906 (const tng_trajectory_t tng_data,
3907 const int64_t i,
3908 const int64_t n_values_per_frame,
3909 const int64_t block_id,
3910 const char *block_name,
3911 const char particle_dependency,
3912 const char compression);
3913
3930 (const tng_trajectory_t tng_data,
3931 const int64_t i);
3932
3949 (const tng_trajectory_t tng_data,
3950 const int64_t i);
3951
3970 (const tng_trajectory_t tng_data,
3971 const int64_t i);
3972
3989 (const tng_trajectory_t tng_data,
3990 const int64_t i);
3991
4008 (const tng_trajectory_t tng_data,
4009 const int64_t i);
4010
4026 (const tng_trajectory_t tng_data,
4027 const int64_t i);
4028
4045 (const tng_trajectory_t tng_data,
4046 const int64_t i);
4047
4064 (const tng_trajectory_t tng_data,
4065 const int64_t i);
4066
4082 (const tng_trajectory_t tng_data,
4083 const int64_t i);
4084
4101 (const tng_trajectory_t tng_data,
4102 const int64_t i);
4103
4120 (const tng_trajectory_t tng_data,
4121 const int64_t i);
4122
4138 (const tng_trajectory_t tng_data,
4139 const int64_t i);
4140
4177 (const tng_trajectory_t tng_data,
4178 const int64_t frame_nr,
4179 const float *values,
4180 const int64_t n_values_per_frame,
4181 const int64_t block_id,
4182 const char *block_name,
4183 const char particle_dependency,
4184 const char compression);
4185
4223 (const tng_trajectory_t tng_data,
4224 const int64_t frame_nr,
4225 const double *values,
4226 const int64_t n_values_per_frame,
4227 const int64_t block_id,
4228 const char *block_name,
4229 const char particle_dependency,
4230 const char compression);
4231
4254 (const tng_trajectory_t tng_data,
4255 const int64_t frame_nr,
4256 const float *positions);
4257
4281 (const tng_trajectory_t tng_data,
4282 const int64_t frame_nr,
4283 const double *positions);
4284
4307 (const tng_trajectory_t tng_data,
4308 const int64_t frame_nr,
4309 const float *velocities);
4310
4334 (const tng_trajectory_t tng_data,
4335 const int64_t frame_nr,
4336 const double *velocities);
4337
4360 (const tng_trajectory_t tng_data,
4361 const int64_t frame_nr,
4362 const float *forces);
4363
4387 (const tng_trajectory_t tng_data,
4388 const int64_t frame_nr,
4389 const double *forces);
4390
4412 (const tng_trajectory_t tng_data,
4413 const int64_t frame_nr,
4414 const float *box_shape);
4415
4438 (const tng_trajectory_t tng_data,
4439 const int64_t frame_nr,
4440 const double *box_shape);
4441
4482 (const tng_trajectory_t tng_data,
4483 const int64_t frame_nr,
4484 const double time,
4485 const float *values,
4486 const int64_t n_values_per_frame,
4487 const int64_t block_id,
4488 const char *block_name,
4489 const char particle_dependency,
4490 const char compression);
4491
4532 (const tng_trajectory_t tng_data,
4533 const int64_t frame_nr,
4534 const double time,
4535 const double *values,
4536 const int64_t n_values_per_frame,
4537 const int64_t block_id,
4538 const char *block_name,
4539 const char particle_dependency,
4540 const char compression);
4541
4568 (const tng_trajectory_t tng_data,
4569 const int64_t frame_nr,
4570 const double time,
4571 const float *positions);
4572
4599 (const tng_trajectory_t tng_data,
4600 const int64_t frame_nr,
4601 const double time,
4602 const double *positions);
4603
4630 (const tng_trajectory_t tng_data,
4631 const int64_t frame_nr,
4632 const double time,
4633 const float *velocities);
4634
4661 (const tng_trajectory_t tng_data,
4662 const int64_t frame_nr,
4663 const double time,
4664 const double *velocities);
4665
4692 (const tng_trajectory_t tng_data,
4693 const int64_t frame_nr,
4694 const double time,
4695 const float *forces);
4696
4723 (const tng_trajectory_t tng_data,
4724 const int64_t frame_nr,
4725 const double time,
4726 const double *forces);
4727
4753 (const tng_trajectory_t tng_data,
4754 const int64_t frame_nr,
4755 const double time,
4756 const float *box_shape);
4757
4783 (const tng_trajectory_t tng_data,
4784 const int64_t frame_nr,
4785 const double time,
4786 const double *box_shape);
4787
4810 (const tng_trajectory_t tng_data,
4811 const int64_t block_id,
4812 int64_t *codec_id,
4813 double *factor);
4814
4849 (const tng_trajectory_t tng_data,
4850 int64_t current_frame,
4851 const int64_t n_requested_data_block_ids,
4852 const int64_t *requested_data_block_ids,
4853 int64_t *next_frame,
4854 int64_t *n_data_blocks_in_next_frame,
4855 int64_t **data_block_ids_in_next_frame);
4856
4857/* @brief High-level function for getting all data block ids and their names
4858 * and stride lengths.
4859 * @param tng_data is the trajectory to use.
4860 * @param n_data_blocks is set to the number of data blocks in the trajectory.
4861 * @param data_block_ids is set to an array (of length
4862 * n_data_blocks) that lists the data block IDs in the trajectory.
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 data_block_names is set to an array (of length
4868 * n_data_blocks) that contains the names 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 stride_lengths is set to an array (of length
4874 * n_data_blocks) that lists the stride lengths 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 n_values_per_frame is set to an array (of length
4880 * n_data_blocks) that lists the number of values per frame 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 block_types is set to an array (of length
4886 * n_data_blocks) that lists the block types 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 * @param dependencies is set to an array (of length
4892 * n_data_blocks) that lists the dependencies of the data blocks.
4893 * It must be pointing at NULL or previously allocated memory.
4894 * Memory for the array is allocated by this function.
4895 * The memory must be freed by the client afterwards or
4896 * there will be a memory leak.
4897 * @param compressions is set to an array (of length
4898 * n_data_blocks) that lists the compressions of the data blocks.
4899 * It must be pointing at NULL or previously allocated memory.
4900 * Memory for the array is allocated by this function.
4901 * The memory must be freed by the client afterwards or
4902 * there will be a memory leak.
4903 * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
4904 * must be initialised before using it.
4905 * @pre \code n_data_blocks != 0 \endcode The pointer to
4906 * n_data_blocks must not be NULL.
4907 * @pre \code data_block_ids != 0 \endcode The pointer to the
4908 * list of data block IDs must not be NULL.
4909 * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
4910 * has occured or TNG_CRITICAL (2) if a major error
4911 * has occured.
4912 */
4913/*
4914tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_all_data_block_types_get
4915 (const tng_trajectory_t tng_data,
4916 int64_t *n_data_blocks,
4917 int64_t **data_block_ids,
4918 char ***data_block_names,
4919 int64_t **stride_lengths,
4920 int64_t **n_values_per_frame,
4921 char **block_types,
4922 char **dependencies,
4923 char **compressions);
4924*/
4925
4938 (const tng_trajectory_t tng_data,
4939 const int64_t prev_frame);
4940
4941
4951 (const tng_trajectory_t tng_data,
4952 const int64_t block_id,
4953 int64_t *n_frames); /* end of group2 */
4955
4956
4957#ifdef __cplusplus
4958} /* end extern "C" */
4959#endif
4960
4961#endif /* TNG_IO_H */
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_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_num_molecules_get(const tng_trajectory_t tng_data, int64_t *n)
Get the current total number of molecules.
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_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_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).
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_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_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_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_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_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_molecule_destroy(const tng_trajectory_t tng_data, const tng_molecule_t molecule)
Clean up a molecule container.
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_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_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_version_major(const tng_trajectory_t tng_data, int *version)
Get the major version of the TNG library.
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_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.
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_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_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_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_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_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_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_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_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_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_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_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_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_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_residue_name_set(const tng_trajectory_t tng_data, const tng_residue_t residue, const char *new_name)
Set the name of a residue.
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_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 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_forcefield_name_set(const tng_trajectory_t tng_data, const char *new_name)
Set the name of the forcefield used in the trajectory.
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_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_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_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_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_chain_name_set(const tng_trajectory_t tng_data, const tng_chain_t chain, const char *new_name)
Set the name of a chain.
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.
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_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_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_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_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_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_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_input_file_get(const tng_trajectory_t tng_data, char *file_name, const int max_len)
Get the name of the input file.
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_compression_precision_set(const tng_trajectory_t tng_data, const double precision)
Set the precision of lossy compression.
tng_function_status DECLSPECDLLEXPORT tng_data_values_free(const tng_trajectory_t tng_data, union data_values **values, const int64_t n_frames, const int64_t n_values_per_frame, const char type)
Free data of an array of values (2D).
tng_function_status DECLSPECDLLEXPORT tng_trajectory_destroy(tng_trajectory_t *tng_data_p)
Clean up a trajectory data container.
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_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_values_per_frame, char *type)
Retrieve a vector (1D array) of non-particle data, from the last read frame set.
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_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_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_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_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_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_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_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.
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_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_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!
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_version_minor(const tng_trajectory_t tng_data, int *version)
Get the minor version of the TNG library.
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_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_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_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).
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_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_long_stride_length_set(const tng_trajectory_t tng_data, const int64_t len)
Set the long stride length of the trajectory.
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_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_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_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_frame_set_of_frame_find(const tng_trajectory_t tng_data, const int64_t frame)
Find the frame set containing a specific frame.
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_num_particles_get(const tng_trajectory_t tng_data, int64_t *n)
Get the current number of particles.
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_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_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_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_init(const tng_trajectory_t tng_data, const tng_molecule_t molecule)
Setup a molecule container.
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_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_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.
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_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_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,...
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_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.
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_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_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_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_molecule_add(const tng_trajectory_t tng_data, const char *name, tng_molecule_t *molecule)
Add a molecule to the trajectory.
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_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_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_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_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_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_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_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_function_status DECLSPECDLLEXPORT tng_molecule_name_of_particle_nr_get(const tng_trajectory_t tng_data, const int64_t nr, char *name, const int max_len)
Get the molecule name of real particle number (number in mol system).
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.
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_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.
tng_function_status DECLSPECDLLEXPORT tng_output_file_get(const tng_trajectory_t tng_data, char *file_name, const int max_len)
Get the name of the output file.
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_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_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_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_trajectory_init(tng_trajectory_t *tng_data_p)
Setup a trajectory data container.
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_output_file_set(const tng_trajectory_t tng_data, const char *file_name)
Set the name of the output file.
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.
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_num_frames_per_frame_set_set(const tng_trajectory_t tng_data, const int64_t n)
Set the number of frames per frame set.
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_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_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_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_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.
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_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_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.
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_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_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_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_num_frames_get(const tng_trajectory_t tng_data, int64_t *n)
Get the number of frames in the trajectory.
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_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_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_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_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(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_util_trajectory_close(tng_trajectory_t *tng_data_p)
High-level function for closing a TNG trajectory.
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_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!...
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_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_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 ...
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_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_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_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_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.
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....
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_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.
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_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_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_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_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_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_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_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_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_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_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_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_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!...
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....
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_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_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_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_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_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.
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.
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_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_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_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_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_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_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_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_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!...
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!...
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_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_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_util_generic_write_frequency_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. Obsolete! Use tng_util_generic_w...
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.
tng_endianness_32
Definition tng_io.h:399
@ TNG_LITTLE_ENDIAN_32
Definition tng_io.h:400
@ TNG_BIG_ENDIAN_32
Definition tng_io.h:399
@ TNG_BYTE_PAIR_SWAP_32
Definition tng_io.h:401
tng_data_type
Definition tng_io.h:564
@ TNG_CHAR_DATA
Definition tng_io.h:564
@ TNG_FLOAT_DATA
Definition tng_io.h:566
@ TNG_INT_DATA
Definition tng_io.h:565
@ TNG_DOUBLE_DATA
Definition tng_io.h:567
tng_compression
Definition tng_io.h:411
@ TNG_GZIP_COMPRESSION
Definition tng_io.h:414
@ TNG_TNG_COMPRESSION
Definition tng_io.h:413
@ TNG_UNCOMPRESSED
Definition tng_io.h:411
@ TNG_XTC_COMPRESSION
Definition tng_io.h:412
tng_particle_dependency
Definition tng_io.h:541
@ TNG_PARTICLE_BLOCK_DATA
Definition tng_io.h:542
@ TNG_NON_PARTICLE_BLOCK_DATA
Definition tng_io.h:541
tng_function_status
Definition tng_io.h:556
@ TNG_CRITICAL
Definition tng_io.h:556
@ TNG_SUCCESS
Definition tng_io.h:556
@ TNG_FAILURE
Definition tng_io.h:556
tng_hash_type
Definition tng_io.h:417
@ TNG_NO_HASH
Definition tng_io.h:417
@ TNG_SHA256
Definition tng_io.h:419
@ TNG_MD5
Definition tng_io.h:418
tng_endianness_64
Definition tng_io.h:404
@ TNG_QUAD_SWAP_64
Definition tng_io.h:406
@ TNG_BIG_ENDIAN_64
Definition tng_io.h:404
@ TNG_BYTE_SWAP_64
Definition tng_io.h:408
@ TNG_BYTE_PAIR_SWAP_64
Definition tng_io.h:407
@ TNG_LITTLE_ENDIAN_64
Definition tng_io.h:405
#define DECLSPECDLLEXPORT
Definition tng_io.h:372
tng_block_type
Definition tng_io.h:422
@ TNG_TRAJECTORY_BLOCK
Definition tng_io.h:422
@ TNG_NON_TRAJECTORY_BLOCK
Definition tng_io.h:422
tng_file_endianness
Definition tng_io.h:395
@ TNG_LITTLE_ENDIAN
Definition tng_io.h:396
@ TNG_BIG_ENDIAN
Definition tng_io.h:395
tng_bool
Definition tng_io.h:545
@ TNG_TRUE
Definition tng_io.h:545
@ TNG_FALSE
Definition tng_io.h:545
tng_hash_mode
Definition tng_io.h:561
@ TNG_USE_HASH
Definition tng_io.h:561
@ TNG_SKIP_HASH
Definition tng_io.h:561
tng_variable_n_atoms_flag
Definition tng_io.h:549
@ TNG_CONSTANT_N_ATOMS
Definition tng_io.h:549
@ TNG_VARIABLE_N_ATOMS
Definition tng_io.h:549
struct tng_gen_block * tng_gen_block_t
Definition tng_io_fwd.h:29
struct tng_chain * tng_chain_t
Definition tng_io_fwd.h:20
struct tng_molecule * tng_molecule_t
Definition tng_io_fwd.h:18
struct tng_trajectory_frame_set * tng_trajectory_frame_set_t
Definition tng_io_fwd.h:33
struct tng_residue * tng_residue_t
Definition tng_io_fwd.h:22
struct tng_trajectory * tng_trajectory_t
Definition tng_io_fwd.h:16
struct tng_bond * tng_bond_t
Definition tng_io_fwd.h:26
struct tng_atom * tng_atom_t
Definition tng_io_fwd.h:24
Definition tng_io.h:583
double d
Definition tng_io.h:584
int64_t i
Definition tng_io.h:586
float f
Definition tng_io.h:585
char * c
Definition tng_io.h:587