summaryrefslogtreecommitdiff
path: root/Trajectoryformatspecification.mk
diff options
context:
space:
mode:
authorMagnus Lundborg <lundborg.magnus@gmail.com>2012-12-11 10:16:10 (GMT)
committerMagnus Lundborg <lundborg.magnus@gmail.com>2012-12-11 10:16:10 (GMT)
commit758fc036192faf325deb46992bc60f7721c755c0 (patch)
tree2a0ca9c1743df262d19ecd4e1096b01fe340bf51 /Trajectoryformatspecification.mk
parent58b3b3e93840318355044c6a05c5b3ac4f9ba705 (diff)
Removed the API docs from the specs description
Diffstat (limited to 'Trajectoryformatspecification.mk')
-rw-r--r--Trajectoryformatspecification.mk2735
1 files changed, 2 insertions, 2733 deletions
diff --git a/Trajectoryformatspecification.mk b/Trajectoryformatspecification.mk
index d1d2474..db8825d 100644
--- a/Trajectoryformatspecification.mk
+++ b/Trajectoryformatspecification.mk
@@ -525,2740 +525,9 @@ API
(The API should be separated into one high- and one low-level API, using
e.g. a tng\_low tag for the low-level functions.)
-/\* Setup a trajectory data container.
+API documentation is generated using the -DBUILD_DOCUMENTATION=ON option
+when running cmake. Requires a doxygen installation.
-\*tng\_data is a pointer to pre-allocated memory.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_trajectory\_init(tng\_trajectory\_t
-tng\_data);
-
-/\* Clean up a trajectory data container.
-
-\*tng\_data is a pointer to pre-allocated memory containing trajectory
-data.
-
-All allocated memory in the data structure is freed.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_trajectory\_destroy(tng\_trajectory\_t
-tng\_data);
-
-/\* Set the name of the input file.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_input\_file\_set(tng\_trajectory\_t
-tng\_data,
-
-const char \*file\_name);
-
-/\* Set the name of the output file.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_output\_file\_set(tng\_trajectory\_t
-tng\_data,
-
-const char \*file\_name);
-
-/\* Set the program name used when creating the trajectory.
-
-\*tng\_data is a pointer to pre-allocated memory containing trajectory
-data.
-
-\*new\_name is a pointer to the string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_program\_name\_set(tng\_trajectory\_t
-tng\_data,
-
-const char \*new\_name);
-
-/\* Set the name of the forcefield used in the trajectory.
-
-\*tng\_data is a pointer to pre-allocated memory containing trajectory
-data.
-
-\*new\_name is a pointer to the string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_forcefield\_name\_set(tng\_trajectory\_t
-tng\_data,
-
-const char \*new\_name);
-
-/\* Set the name of the user creating the trajectory.
-
-\*tng\_data is a pointer to pre-allocated memory containing trajectory
-data.
-
-\*new\_name is a pointer to the string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_user\_name\_set(tng\_trajectory\_t tng\_data,
-
-const char \*new\_name);
-
-/\* Set the name of the computer used when creating the trajectory.
-
-\*tng\_data is a pointer to pre-allocated memory containing trajectory
-data.
-
-\*new\_name is a pointer to the string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_computer\_name\_set(tng\_trajectory\_t
-tng\_data,
-
-const char \*new\_name);
-
-/\* Set the pgp\_signature of the trajectory.
-
-\*tng\_data is a pointer to pre-allocated memory containing trajectory
-data.
-
-\*signature is a pointer to the string containing the pgp\_signature.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_signature\_set(tng\_trajectory\_t tng\_data,
-
-const char \*signature);
-
-/\* Setup a molecule container.
-
-\*molecule is a pointer to pre-allocated memory.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_molecule\_init(tng\_molecule\_t molecule);
-
-/\* Clean up a molecule container.
-
-\*molecule is a pointer to pre-allocated memory containing a molecule.
-
-All allocated memory in the data structure is freed.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_molecule\_destroy(tng\_molecule\_t molecule);
-
-/\* Setup a data block.
-
-\*block is a pointer to pre-allocated memory.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_block\_init(struct tng\_gen\_block \*block);
-
-/\* Clean up a data block.
-
-\*block is a pointer to pre-allocated memory.
-
-All allocated memory in the data structure is freed.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_block\_destroy(struct tng\_gen\_block
-\*block);
-
-/\* Set the name of a data block.
-
-tng\_data is the trajectory data container containing the block..
-
-\*block is a pointer to the block to rename.
-
-\*new\_name is a string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_block\_name\_set(tng\_trajectory\_t
-tng\_data,
-
-struct tng\_gen\_block \*block,
-
-const char \*new\_name);
-
-/\* Add a molecule to the trajectory.
-
-tng\_data is the trajectory data container containing the block..
-
-\*name is a pointer to the string containing the name of the new
-molecule.
-
-\*\*molecule is a pointer to a pointer to the newly created molecule.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_molecule\_add(tng\_trajectory\_t tng\_data,
-
-const char \*name,
-
-tng\_molecule\_t \*molecule);
-
-/\* Set the name of a molecule.
-
-tng\_data is the trajectory data container containing the molecule..
-
-\*molecule is a pointer to the molecule to rename.
-
-\*new\_name is a string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_molecule\_name\_set(tng\_trajectory\_t
-tng\_data,
-
-tng\_molecule\_t molecule,
-
-const char \*new\_name);
-
-/\* Set the count of a molecule.
-
-tng\_data is the trajectory data container containing the molecule..
-
-\*molecule is a pointer to the molecule to rename.
-
-\*cnt is a pointer to the variable to be populated with the count.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_molecule\_cnt\_get(tng\_trajectory\_t
-tng\_data,
-
-tng\_molecule\_t molecule,
-
-int64\_t \*cnt);
-
-/\* Set the count of a molecule.
-
-tng\_data is the trajectory data container containing the molecule..
-
-\*molecule is a pointer to the molecule to rename.
-
-cnt is the number of instances of this molecule.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_molecule\_cnt\_set(tng\_trajectory\_t
-tng\_data,
-
-tng\_molecule\_t molecule,
-
-int64\_t cnt);
-
-/\* Add a chain to a molecule.
-
-tng\_data is the trajectory data container containing the molecule..
-
-\*molecule is a pointer to the molecule to add a chain to.
-
-\*name is a pointer to a string containing the name of the chain.
-
-\*\*chain is a pointer to a pointer to the newly created chain.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_molecule\_chain\_add(tng\_trajectory\_t
-tng\_data,
-
-tng\_molecule\_t molecule,
-
-const char \*name,
-
-tng\_chain\_t \*chain);
-
-/\* Set the name of a chain.
-
-tng\_data is the trajectory data container containing the atom..
-
-\*chain is a pointer to the chain to rename.
-
-\*new\_name is a string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_chain\_name\_set(tng\_trajectory\_t
-tng\_data,
-
-tng\_chain\_t chain,
-
-const char \*new\_name);
-
-/\* Add a residue to a chain.
-
-tng\_data is the trajectory data container containing the chain..
-
-\*chain is a pointer to the chain to add a residue to.
-
-\*name is a pointer to a string containing the name of the residue.
-
-\*\*residue is a pointer to a pointer to the newly created residue.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_chain\_residue\_add(tng\_trajectory\_t
-tng\_data,
-
-tng\_chain\_t chain,
-
-const char \*name,
-
-tng\_residue\_t \*residue);
-
-/\* Set the name of a residue.
-
-tng\_data is the trajectory data container containing the residue.due.
-
-\*residue is a pointer to the residue to rename.
-
-\*new\_name is a string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_residue\_name\_set(tng\_trajectory\_t
-tng\_data,
-
-tng\_residue\_t residue,
-
-const char \*new\_name);
-
-/\* Add an atom to a residue.
-
-\*tng\_data is a pointer to the trajectory containing the residue.
-
-\*residue is a pointer to the residue to add an atom to.
-
-\*atom\_name is a pointer to a string containing the name of the atom.
-
-\*atom\_type is a pointer to a string containing the atom type of the
-atom.
-
-\*\*atom is a pointer to a pointer to the newly created atom.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_residue\_atom\_add(tng\_trajectory\_t
-tng\_data,
-
-tng\_residue\_t residue,
-
-const char \*atom\_name,
-
-const char \*atom\_type,
-
-tng\_atom\_t \*atom);
-
-/\* Set the name of an atom.
-
-tng\_data is the trajectory data container containing the atom..
-
-\*atom is a pointer to the atom to rename.
-
-\*new\_name is a string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_atom\_name\_set(tng\_trajectory\_t tng\_data,
-
-tng\_atom\_t atom,
-
-const char \*new\_name);
-
-/\* Set the atom type of an atom.
-
-tng\_data is the trajectory data container containing the atom..
-
-\*atom is a pointer to the atom to change.
-
-\*new\_name is a string containing the atom type.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_atom\_type\_set(tng\_trajectory\_t tng\_data,
-
-tng\_atom\_t atom,
-
-const char \*new\_type);
-
-/\* Read the header blocks from the input\_file of tng\_data.
-
-The trajectory blocks must be read separately and iteratively in chunks
-
-to fit in memory.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-If hash\_mode == TNG\_USE\_HASH the written md5 hash in the file will be
-
-compared to the md5 hash of the read contents to ensure valid data.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_file\_headers\_read(tng\_trajectory\_t
-tng\_data,
-
-const tng\_hash\_mode hash\_mode);
-
-/\* Write the header blocks to the output\_file of tng\_data.
-
-The trajectory blocks must be written separately and iteratively in
-chunks
-
-to fit in memory.
-
-tng\_data is a trajectory data container. tng\_data-\>output\_file\_path
-
-specifies which file to write to. If the file (output\_file) is not open
-it
-
-will be opened.
-
-If hash\_mode == TNG\_USE\_HASH an md5 hash for each header block will
-be generated.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_file\_headers\_write(tng\_trajectory\_t
-tng\_data,
-
-const tng\_hash\_mode hash\_mode);
-
-/\* Read one (the next) block (of any kind) from the input\_file of
-tng\_data.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-\*block\_data is a pointer to the struct which will be populated with
-the
-
-data. If block\_data-\>input\_file\_pos \> 0 it is the position from
-where the
-
-reading starts otherwise it starts from the current position.
-
-If hash\_mode == TNG\_USE\_HASH the written md5 hash in the file will be
-
-compared to the md5 hash of the read contents to ensure valid data.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-
-error has occurred or TNG\_CRITICAL (2) if a major error has occured.
-\*/
-
-tng\_function\_status tng\_block\_read\_next(tng\_trajectory\_t
-tng\_data,
-
-struct tng\_gen\_block \*block\_data,
-
-const tng\_hash\_mode hash\_mode);
-
-/\* Read one (the next) frame set, including toc, mapping and related
-data blocks
-
-from the input\_file of tng\_data.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-If hash\_mode == TNG\_USE\_HASH the written md5 hash in the file will be
-
-compared to the md5 hash of the read contents to ensure valid data.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_frame\_set\_read\_next(tng\_trajectory\_t
-tng\_data,
-
-const tng\_hash\_mode hash\_mode);
-
-/\* Write one frame set, including toc, mapping and related data blocks
-
-to the output\_file of tng\_data.
-
-tng\_data is a trajectory data container. tng\_data-\>output\_file\_path
-specifies
-
-which file to write to. If the file (output\_file) is not open it will
-be
-
-opened.
-
-If hash\_mode == TNG\_USE\_HASH an md5 hash for each block will be
-generated.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_frame\_set\_write(tng\_trajectory\_t
-tng\_data,
-
-const tng\_hash\_mode hash\_mode);
-
-tng\_function\_status tng\_frame\_set\_new(tng\_trajectory\_t tng\_data,
-
-const int64\_t first\_frame,
-
-const int64\_t n\_frames);
-
-tng\_function\_status tng\_particle\_data\_block\_add(tng\_trajectory\_t
-tng\_data,
-
-const int64\_t id,
-
-const char \*block\_name,
-
-const char datatype,
-
-const int64\_t n\_frames,
-
-const int64\_t n\_values\_per\_frame,
-
-const int64\_t stride\_length,
-
-const int64\_t first\_particle\_number,
-
-const int64\_t n\_particles,
-
-int64\_t codec\_id,
-
-void \*new\_data);
-
-/\* Read one trajectory block from the input\_file of tng\_data.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-block\_id is the ID of the block to read.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_traj\_block\_read(tng\_trajectory\_t
-tng\_data,
-
-int64\_t block\_id);
-
-/\* Write one trajectory block to the output\_file of tng\_data.
-
-tng\_data is a trajectory data container. tng\_data-\>output\_file\_path
-specifies
-
-which file to write to. If the file (output\_file) is not open it will
-be
-
-opened.
-
-block\_id is the ID of the block to write.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_traj\_block\_write(tng\_trajectory\_t
-tng\_data,
-
-int64\_t block\_id);
-
-/\* Read a requested frame set.
-
-tng\_data is a trajectory data container.
-
-tng\_data-\>current\_trajectory\_frame\_set will be the read frame set.
-
-frame\_set\_nr is the number of the frame set to return (starting from
-0).
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_frame\_set\_read\_nr(tng\_trajectory\_t
-tng\_data,
-
-int64\_t frame\_set\_nr);
-
-/\* Read a number of consecutive trajectory frames from the input\_file
-of
-
-tng\_data.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-start\_frame\_nr is the index number of the first frame to read.
-
-end\_frame\_nr is the index number of the last frame to read.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_frame\_read\_interval(tng\_trajectory\_t
-tng\_data,
-
-int64\_t start\_frame\_nr,
-
-int64\_t end\_frame\_nr);
-
-/\* Write a number of consecutive trajectory frames to the output\_file
-of
-
-tng\_data.
-
-tng\_data is a trajectory data container. tng\_data-\>output\_file\_path
-specifies
-
-which file to write to. If the file (output\_file) is not open it will
-be
-
-opened.
-
-start\_frame\_nr is the index number of the first frame to write.
-
-end\_frame\_nr is the index number of the last frame to write.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_frame\_write\_interval(tng\_trajectory\_t
-tng\_data,
-
-int64\_t start\_frame\_nr,
-
-int64\_t end\_frame\_nr);
-
-/\* Free data is an array of values (2D).
-
-\*\*values is the array to free and will be set to 0 afterwards.
-
-n\_frames is the number of frames in the data array.
-
-n\_values\_per\_frame is the number of values per frame in the data
-array.
-
-type is the data type of the data in the array.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_data\_values\_free(union data\_values
-\*\*values,
-
-int64\_t n\_frames,
-
-int64\_t n\_values\_per\_frame,
-
-tng\_data\_type type);
-
-/\* Free data is an array of values (3D).
-
-\*\*\*values is the array to free and will be set to 0 afterwards.
-
-n\_frames is the number of frames in the data array.
-
-n\_particles is the number of particles in the data array.
-
-n\_values\_per\_frame is the number of values per frame in the data
-array.
-
-type is the data type of the data in the array.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_particle\_data\_values\_free(union
-data\_values \*\*\*values,
-
-int64\_t n\_frames,
-
-int64\_t n\_particles,
-
-int64\_t n\_values\_per\_frame,
-
-tng\_data\_type type);
-
-/\* Retrieve non-particle data from the last read frame set.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-block\_id is the id number of the data block to read.
-
-\*\*\*values is a pointer to a 2-dimensional array (memory unallocated),
-which
-
-will point to the data of the requested data block. The array will be
-sized
-
-(n\_frames \* n\_values\_per\_frame).
-
-Since \*\*\*values is allocated in this function it is the callers
-
-responsibility to free the memory.
-
-\*n\_frames is set to the number of frames in the data. This is needed
-to
-
-properly reach and/or free the data.
-
-\*n\_values\_per\_frame is set to the number of values per frame in the
-data.
-
-This is needed to properly reach and/or free the data.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_data\_get(tng\_trajectory\_t tng\_data,
-
-int64\_t block\_id,
-
-union data\_values \*\*\*values,
-
-int64\_t \*n\_frames,
-
-int64\_t \*n\_values\_per\_frame,
-
-tng\_data\_type \*type);
-
-/\* Read and retrieve non-particle data, in a specific interval, from
-the
-
-trajectory.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-block\_id is the id number of the data block to read.
-
-start\_frame\_nr is the index number of the first frame to read.
-
-end\_frame\_nr is the index number of the last frame to read.
-
-\*\*\*values is a pointer to a 2-dimensional array (memory unallocated),
-which
-
-will be filled with data. The array will be sized
-
-(n\_frames \* n\_values\_per\_frame).
-
-Since \*\*\*values is allocated in this function it is the callers
-
-responsibility to free the memory.
-
-\*n\_values\_per\_frame is set to the number of values per frame in the
-data.
-
-This is needed to properly reach and/or free the data.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_data\_interval\_get(tng\_trajectory\_t
-tng\_data,
-
-int64\_t block\_id,
-
-int64\_t start\_frame\_nr,
-
-int64\_t end\_frame\_nr,
-
-union data\_values \*\*\*values,
-
-int64\_t \*n\_values\_per\_frame,
-
-tng\_data\_type \*type);
-
-/\* Retrieve particle data, from the last read frame set.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-block\_id is the id number of the particle data block to read.
-
-\*\*\*\*values is a pointer to a 3-dimensional array (memory
-unallocated), which
-
-will point to the data of the requested data block. The array will be
-sized
-
-(n\_frames \* n\_particles \* n\_values\_per\_frame).
-
-Since \*\*\*\*values is allocated in this function it is the callers
-
-responsibility to free the memory.
-
-\*n\_frames is set to the number of frames in the data. This is needed
-to
-
-properly reach and/or free the data.
-
-\*n\_particles is set to the number of particles in the returned data.
-This is
-
-needed to properly reach and/or free the data.
-
-\*n\_values\_per\_frame is set to the number of values per frame in the
-data.
-
-This is needed to properly reach and/or free the data.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_particle\_data\_get(tng\_trajectory\_t
-tng\_data,
-
-int64\_t block\_id,
-
-union data\_values \*\*\*\*values,
-
-int64\_t \*n\_frames,
-
-int64\_t \*n\_particles,
-
-int64\_t \*n\_values\_per\_frame,
-
-tng\_data\_type \*type);
-
-/\* Read and retrieve particle data, in a specific interval, from the
-trajectory.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-block\_id is the id number of the particle data block to read.
-
-start\_frame\_nr is the index number of the first frame to read.
-
-end\_frame\_nr is the index number of the last frame to read.
-
-first\_particle\_number is the number of the first particle, for which
-to
-
-retrive data.
-
-last\_particle\_number is the number of the last particle, for which to
-
-retrieve data.
-
-\*\*\*\*values is a pointer to a 3-dimensional array (memory
-unallocated), which
-
-will be filled with data. The array will be sized
-
-(n\_frames \* n\_particles \* n\_values\_per\_frame).
-
-Since \*\*\*\*values is allocated in this function it is the callers
-
-responsibility to free the memory.
-
-\*n\_values\_per\_frame is set to the number of values per frame in the
-data.
-
-This is needed to properly reach and/or free the data.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status
-tng\_particle\_data\_interval\_get(tng\_trajectory\_t tng\_data,
-
-int64\_t block\_id,
-
-int64\_t start\_frame\_nr,
-
-int64\_t end\_frame\_nr,
-
-int64\_t first\_particle\_number,
-
-int64\_t last\_particle\_number,
-
-union data\_values \*\*\*\*values,
-
-int64\_t \*n\_values\_per\_frame,
-
-tng\_data\_type \*type);
-
-/\* Get the date and time of initial file creation in ISO format
-(string).
-
-tng\_data is a trajectory data container.
-
-\*time is a pointer to the string in which the date will be stored.
-Memory
-
-must be reserved beforehand.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_time\_get\_str(tng\_trajectory\_t tng\_data,
-char \*time);
-
-Full API Header file:
-
-(WIP)
-
-\#ifndef \_TNGIO\_H
-
-\#define \_TNGIO\_H 1
-
-\#include <stdio.h\>
-
-\#include <inttypes.h\>
-
-\#define TNG\_VERSION 1
-
-\#define TNG\_PARTICLE\_DEPENDENT 1
-
-\#define TNG\_FRAME\_DEPENDENT 2
-
-// \#define TNG\_MAX\_BLOCK\_PARTICLES 1000
-
-\#define TNG\_MAX\_DATE\_STR\_LEN 24
-
-\#define TNG\_HASH\_LEN 16
-
-\#define TNG\_MAX\_STR\_LEN 1024
-
-typedef enum {TNG\_BIG\_ENDIAN\_32,
-
-TNG\_LITTLE\_ENDIAN\_32,
-
-TNG\_BYTE\_PAIR\_SWAP\_32} tng\_endianness\_32;
-
-typedef enum {TNG\_BIG\_ENDIAN\_64,
-
-TNG\_LITTLE\_ENDIAN\_64,
-
-TNG\_QUAD\_SWAP\_64,
-
-TNG\_BYTE\_PAIR\_SWAP\_64,
-
-TNG\_BYTE\_SWAP\_64} tng\_endianness\_64;
-
-\#define min(a,b) \\
-
-({ \_\_typeof\_\_ (a) \_a = (a); \\
-
-\_\_typeof\_\_ (b) \_b = (b); \\
-
-\_a < \_b ? \_a : \_b; })
-
-\#define max(a,b) \\
-
-({ \_\_typeof\_\_ (a) \_a = (a); \\
-
-\_\_typeof\_\_ (b) \_b = (b); \\
-
-\_a \> \_b ? \_a : \_b; })
-
-typedef enum {TNG\_UNCOMPRESSED,
-
-TNG\_XTC\_COMPRESSION,
-
-TNG\_TNG\_COMPRESSION} tng\_compression;
-
-typedef enum {TNG\_NON\_TRAJECTORY\_BLOCK, TNG\_TRAJECTORY\_BLOCK}
-tng\_block\_type;
-
-typedef enum {TNG\_ENDIANNESS\_AND\_STRING\_LENGTH,
-
-TNG\_GENERAL\_INFO,
-
-TNG\_MOLECULES,
-
-TNG\_TRAJECTORY\_IDS\_AND\_NAMES,
-
-TNG\_TRAJECTORY\_FRAME\_SET,
-
-TNG\_BLOCK\_TABLE\_OF\_CONTENTS,
-
-TNG\_PARTICLE\_MAPPING} tng\_non\_trajectory\_block\_ids;
-
-typedef enum {TNG\_TRAJ\_BOX\_SHAPE = 10000,
-
-TNG\_TRAJ\_POSITIONS,
-
-TNG\_TRAJ\_VELOCITIES,
-
-TNG\_TRAJ\_FORCES} tng\_trajectory\_block\_ids;
-
-typedef enum {TNG\_NON\_PARTICLE\_BLOCK\_DATA,
-
-TNG\_PARTICLE\_BLOCK\_DATA} tng\_particle\_block\_data;
-
-/\*typedef enum {TNG\_NO\_HASH, TNG\_OTHER\_HASH,
-
-TNG\_MD5\_HASH, TNG\_MD6\_HASH,
-
-TNG\_SHA0\_HASH, TNG\_SHA1\_HASH,
-
-TNG\_SHA256\_HASH, TNG\_SHA512\_HASH} tng\_hash\_type;\*/
-
-typedef enum {FALSE, TRUE} tng\_bool;
-
-typedef enum {TNG\_CONSTANT\_N\_ATOMS, TNG\_VARIABLE\_N\_ATOMS}
-
-tng\_variable\_n\_atoms\_flag;
-
-typedef enum {TNG\_SUCCESS, TNG\_FAILURE, TNG\_CRITICAL}
-tng\_function\_status;
-
-typedef enum {TNG\_NORMAL\_WRITE, TNG\_COPY\_EXISTING} tng\_write\_mode;
-
-typedef enum {TNG\_SKIP\_HASH, TNG\_USE\_HASH} tng\_hash\_mode;
-
-typedef enum {TNG\_CHAR\_DATA,
-
-TNG\_INT\_DATA,
-
-TNG\_FLOAT\_DATA,
-
-TNG\_DOUBLE\_DATA} tng\_data\_type;
-
-typedef struct tng\_trajectory \*tng\_trajectory\_t;
-
-typedef struct tng\_molecule \*tng\_molecule\_t;
-
-typedef struct tng\_chain \*tng\_chain\_t;
-
-typedef struct tng\_residue \*tng\_residue\_t;
-
-typedef struct tng\_atom \*tng\_atom\_t;
-
-typedef struct tng\_bond \*tng\_bond\_t;
-
-\#ifdef \_\_cplusplus
-
-extern "C"
-
-{
-
-\#endif
-
-struct tng\_bond {
-
-int64\_t from\_atom\_id; /\* One of the atoms of the bond \*/
-
-int64\_t to\_atom\_id; /\* The other atom of the bond \*/
-
-};
-
-struct tng\_atom {
-
-tng\_residue\_t residue; /\* The molecule containing this atom \*/
-
-int64\_t id; /\* A unique (per molecule) ID number of the atom \*/
-
-char \*atom\_type; /\* The atom\_type (depending on the forcefield) \*/
-
-char \*name; /\* The name of the atom \*/
-
-};
-
-struct tng\_residue {
-
-tng\_chain\_t chain; /\* The chain containing this residue \*/
-
-int64\_t id; /\* A unique (per chain) ID number of the residue \*/
-
-char \*name; /\* The name of the residue \*/
-
-int64\_t n\_atoms; /\* The number of atoms in the residue \*/
-
-tng\_atom\_t atoms; /\* A list of atoms in the residue \*/
-
-};
-
-struct tng\_chain {
-
-tng\_molecule\_t molecule; /\* The molecule containing this chain \*/
-
-int64\_t id; /\* A unique (per molecule) ID number of the
-
-chain \*/
-
-char \*name; /\* The name of the chain \*/
-
-int64\_t n\_residues; /\* The number of residues in the chain \*/
-
-tng\_residue\_t residues; /\* A list of residues in the chain \*/
-
-};
-
-struct tng\_molecule {
-
-int64\_t id; /\* A unique ID number of the molecule \*/
-
-int64\_t quaternary\_str; /\* Quaternary structure of the molecule.
-
-1 =\> monomeric
-
-2 =\> dimeric
-
-3 =\> trimeric
-
-etc \*/
-
-int64\_t n\_chains; /\* The number of chains in the molecule \*/
-
-int64\_t n\_residues; /\* The number of residues in the molecule \*/
-
-int64\_t n\_atoms; /\* The number of atoms in the molecule \*/
-
-int64\_t n\_bonds; /\* The number of bonds in the molecule.
-
-If the bonds are not specified this
-
-value can be 0. \*/
-
-char \*name; /\* The name of the molecule \*/
-
-tng\_chain\_t chains; /\* A list of chains in the molecule \*/
-
-tng\_residue\_t residues; /\* A list of residues in the molecule \*/
-
-tng\_atom\_t atoms; /\* A list of the atoms in the molecule \*/
-
-tng\_bond\_t bonds; /\* A list of the bonds in the molecule \*/
-
-};
-
-struct tng\_gen\_block {
-
-int64\_t header\_contents\_size; /\* The size of the block header in
-bytes \*/
-
-int64\_t block\_contents\_size; /\* The size of the block contents in
-bytes \*/
-
-int64\_t id; /\* The ID of the block to determine its
-
-type \*/
-
-char hash[TNG\_HASH\_LEN]; /\* The MD5 hash of the block to verify
-
-integrity \*/
-
-char \*name; /\* The name of the block \*/
-
-int64\_t block\_version; /\* The library version used to write the block
-\*/
-
-char \*header\_contents; /\* The full block header contents \*/
-
-char \*block\_contents; /\* The full block contents \*/
-
-};
-
-struct tng\_frame\_set\_toc {
-
-int64\_t n\_blocks; /\* The number of blocks listed in this
-
-table of contents \*/
-
-char \*\*block\_names; /\* A list of block names \*/
-
-};
-
-struct tng\_particle\_mapping {
-
-int64\_t num\_first\_particle; /\* The index number of the first
-particle
-
-in this mapping block \*/
-
-int64\_t n\_particles; /\* The number of particles list in this
-
-mapping block \*/
-
-int64\_t \*real\_particle\_numbers; /\* the mapping of index numbers to
-the
-
-real particle numbers in the
-
-trajectory \*/
-
-};
-
-struct tng\_trajectory\_frame\_set {
-
-struct tng\_frame\_set\_toc contents; /\* The table of contents of this
-frame
-
-set \*/
-
-int64\_t n\_mapping\_blocks; /\* The number of different particle
-
-mapping blocks present. \*/
-
-struct tng\_particle\_mapping \*mappings; /\* The atom mappings of this
-frame
-
-set \*/
-
-int64\_t first\_frame; /\* The first frame of this frame set \*/
-
-int64\_t n\_frames; /\* The number of frames in this frame
-
-set \*/
-
-int64\_t \*molecule\_cnt\_list; /\* A list of the number of each
-molecule
-
-type - only used when using variable
-
-number of atoms \*/
-
-int64\_t n\_particles; /\* The number of particles/atoms - only
-
-used when using variable number of
-
-atoms \*/
-
-int64\_t next\_frame\_set\_file\_pos; /\* The file position of the next
-frame
-
-set \*/
-
-int64\_t prev\_frame\_set\_file\_pos; /\* The file position of the
-previous
-
-frame set \*/
-
-int64\_t long\_stride\_next\_frame\_set\_file\_pos; /\* The file
-position of the
-
-frame set one stride step
-
-ahead \*/
-
-int64\_t long\_stride\_prev\_frame\_set\_file\_pos; /\* The file
-position of the
-
-frame set one stride step
-
-behind \*/
-
-/\* The data blocks in a frame set are trajectory data blocks \*/
-
-int n\_particle\_data\_blocks; /\* The number of data blocks
-
-of particle dependent data \*/
-
-struct tng\_particle\_data \*tr\_particle\_data; /\* A list of data
-blocks
-
-containing particle
-
-dependent data \*/
-
-int n\_data\_blocks;
-
-struct tng\_data \*tr\_data;
-
-};
-
-/\* Data can be either double, float, int or a string \*/
-
-union data\_values {
-
-double d;
-
-float f;
-
-int i;
-
-char \*c;
-
-};
-
-/\* FIXME: Should there be a pointer to a tng\_gen\_block from each data
-block? \*/
-
-struct tng\_particle\_data {
-
-int64\_t block\_id; /\* The block ID of the data block
-
-containing this particle data.
-
-This is used to determine the
-
-kind of data that is stored \*/
-
-char \*block\_name; /\* The name of the data block.
-
-This is used to determine the
-
-kind of data that is stored \*/
-
-tng\_data\_type datatype; /\* The type of data stored. \*/
-
-int64\_t first\_frame\_with\_data; /\* The first frame number of the
-
-first data point \*/
-
-int64\_t n\_frames; /\* The number of frames in this
-
-frame set \*/
-
-int64\_t n\_values\_per\_frame; /\* The number of values stored per
-
-frame \*/
-
-int64\_t stride\_length; /\* The number of frames between
-
-each data point - e.g. when
-
-storing sparse data. \*/
-
-int64\_t codec\_id; /\* ID of the CODEC used for compression
-
-0 == no compression. \*/
-
-double compression\_multiplier; /\* The multiplier used for getting
-
-integer values for compression \*/
-
-union data\_values \*\*\*values; /\* A 3-dimensional array of values,
-
-sized n\_frames x n\_particles x
-
-n\_values\_per\_frame \*/
-
-};
-
-struct tng\_data {
-
-int64\_t block\_id;
-
-char \*block\_name; /\* The name of the data block.
-
-This is used to determine the
-
-kind of data that is stored \*/
-
-tng\_data\_type datatype; /\* The type of data stored. \*/
-
-int64\_t first\_frame\_with\_data;
-
-int64\_t n\_frames;
-
-int64\_t n\_values\_per\_frame;
-
-int64\_t stride\_length;
-
-int64\_t codec\_id; /\* ID of the CODEC used for compression
-
-0 == no compression. \*/
-
-double compression\_multiplier;
-
-union data\_values \*\*values; /\* A 2-dimensional array of values,
-
-sized n\_frames x n\_values\_per\_frame \*/
-
-};
-
-struct tng\_trajectory {
-
-char \*input\_file\_path; /\* The path of the input trajectory file \*/
-
-FILE \*input\_file; /\* A handle to the input file \*/
-
-long int input\_file\_pos; /\* The reading position of the file \*/
-
-long int input\_file\_len; /\* The length of the input file \*/
-
-char \*output\_file\_path; /\* The path of the output trajectory
-
-file \*/
-
-FILE \*output\_file; /\* A handle to the output file \*/
-
-long int output\_file\_pos; /\* The writing position of the file \*/
-
-tng\_endianness\_32 endianness\_32; /\* The endianness of 32 bit values
-of
-
-the current computer \*/
-
-tng\_endianness\_64 endianness\_64; /\* The endianness of 64 bit values
-of
-
-the current computer \*/
-
-char \*program\_name; /\* The name of the program producing
-
-this trajectory \*/
-
-char \*forcefield\_name; /\* The forcefield used in the
-
-simulations \*/
-
-char \*user\_name; /\* The name of the user running the
-
-simulations \*/
-
-int64\_t time; /\* The time (n seconds since 1970) when
-
-the file was created \*/
-
-char \*computer\_name; /\* The name of the computer on which the
-
-simulations were performed \*/
-
-char \*pgp\_signature; /\* The PGP signature of the user creating
-
-the file. \*/
-
-char var\_num\_atoms\_flag; /\* A flag indicating if the number of atoms
-
-can vary throughout the simulation, e.g.
-
-using a grand canonical ensemble \*/
-
-int64\_t frame\_set\_n\_frames; /\* The number of frames in a frame set.
-
-It is allowed to have frame sets with
-
-fewer frames, but this will help
-
-searching for specific frames \*/
-
-int64\_t stride\_length; /\* The number of frame sets in a long
-
-stride step \*/
-
-int64\_t n\_molecules; /\* The number of different kinds of
-
-molecules in the trajectory \*/
-
-tng\_molecule\_t molecules; /\* A list of molecules in the trajectory
-\*/
-
-int64\_t \*molecule\_cnt\_list; /\* A list of the count of each molecule
--
-
-if using variable number of particles
-
-this will be specified in each frame
-
-set \*/
-
-int64\_t n\_particles; /\* The total number of particles/atoms. If
-
-using variable number of particles this
-
-will be specified in each frame set \*/
-
-int64\_t n\_id\_name\_pairs; /\* The number of ID-name
-
-pairs \*/
-
-struct tng\_block\_id\_name\_pair \*id\_name\_pairs; /\* A list of
-ID-name
-
-pairs \*/
-
-int64\_t first\_trajectory\_frame\_set\_input\_file\_pos; /\* The pos in
-the src
-
-file of the first
-
-frame set \*/
-
-int64\_t first\_trajectory\_frame\_set\_output\_file\_pos; /\* The pos
-in the dest
-
-file of the first
-
-frame set \*/
-
-int64\_t last\_trajectory\_frame\_set\_input\_file\_pos; /\* The pos in
-the src
-
-file of the last
-
-frame set \*/
-
-int64\_t last\_trajectory\_frame\_set\_output\_file\_pos; /\* The pos in
-the dest
-
-file of the last
-
-frame set \*/
-
-struct tng\_trajectory\_frame\_set current\_trajectory\_frame\_set;/\*
-The current-
-
-ly active
-
-frame set \*/
-
-long int current\_trajectory\_frame\_set\_input\_file\_pos; /\* The pos
-in the src
-
-file of the current
-
-frame set \*/
-
-long int current\_trajectory\_frame\_set\_output\_file\_pos;/\* The pos
-in the dest
-
-file of the current
-
-frame set \*/
-
-int64\_t n\_trajectory\_frame\_sets; /\* The number of frame
-
-sets in the
-
-trajectory \*/
-
-int64\_t n\_trajectory\_blocks; /\* The number of trajectory blocks
-
-in the file \*/
-
-int64\_t n\_non\_trajectory\_blocks; /\* The number of non-trajectory
-blocks
-
-in the file \*/
-
-struct tng\_gen\_block non\_trajectory\_blocks[32]; /\* A list of
-non-trajectory
-
-blocks \*/
-
-/\* These data blocks are non-trajectory data blocks \*/
-
-int n\_particle\_data\_blocks; /\* The number of non-frame
-
-dependent particle
-
-dependent data blocks \*/
-
-struct tng\_particle\_data \*non\_tr\_particle\_data; /\* A list of data
-blocks
-
-containing particle
-
-dependent data \*/
-
-int n\_data\_blocks; /\* The number of frame and particle
-
-independent data blocks \*/
-
-struct tng\_data \*non\_tr\_data; /\* A list of frame and particle
-
-indepdendent data blocks \*/
-
-};
-
-/\* Setup a trajectory data container.
-
-\*tng\_data is a pointer to pre-allocated memory.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_trajectory\_init(tng\_trajectory\_t
-tng\_data);
-
-/\* Clean up a trajectory data container.
-
-\*tng\_data is a pointer to pre-allocated memory containing trajectory
-data.
-
-All allocated memory in the data structure is freed.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_trajectory\_destroy(tng\_trajectory\_t
-tng\_data);
-
-/\* Set the name of the input file.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_input\_file\_set(tng\_trajectory\_t
-tng\_data,
-
-const char \*file\_name);
-
-/\* Set the name of the output file.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_output\_file\_set(tng\_trajectory\_t
-tng\_data,
-
-const char \*file\_name);
-
-/\* Set the program name used when creating the trajectory.
-
-\*tng\_data is a pointer to pre-allocated memory containing trajectory
-data.
-
-\*new\_name is a pointer to the string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_program\_name\_set(tng\_trajectory\_t
-tng\_data,
-
-const char \*new\_name);
-
-/\* Set the name of the forcefield used in the trajectory.
-
-\*tng\_data is a pointer to pre-allocated memory containing trajectory
-data.
-
-\*new\_name is a pointer to the string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_forcefield\_name\_set(tng\_trajectory\_t
-tng\_data,
-
-const char \*new\_name);
-
-/\* Set the name of the user creating the trajectory.
-
-\*tng\_data is a pointer to pre-allocated memory containing trajectory
-data.
-
-\*new\_name is a pointer to the string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_user\_name\_set(tng\_trajectory\_t tng\_data,
-
-const char \*new\_name);
-
-/\* Set the name of the computer used when creating the trajectory.
-
-\*tng\_data is a pointer to pre-allocated memory containing trajectory
-data.
-
-\*new\_name is a pointer to the string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_computer\_name\_set(tng\_trajectory\_t
-tng\_data,
-
-const char \*new\_name);
-
-/\* Set the pgp\_signature of the trajectory.
-
-\*tng\_data is a pointer to pre-allocated memory containing trajectory
-data.
-
-\*signature is a pointer to the string containing the pgp\_signature.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_signature\_set(tng\_trajectory\_t tng\_data,
-
-const char \*signature);
-
-/\* Setup a molecule container.
-
-\*molecule is a pointer to pre-allocated memory.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_molecule\_init(tng\_molecule\_t molecule);
-
-/\* Clean up a molecule container.
-
-\*molecule is a pointer to pre-allocated memory containing a molecule.
-
-All allocated memory in the data structure is freed.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_molecule\_destroy(tng\_molecule\_t molecule);
-
-/\* Setup a data block.
-
-\*block is a pointer to pre-allocated memory.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_block\_init(struct tng\_gen\_block \*block);
-
-/\* Clean up a data block.
-
-\*block is a pointer to pre-allocated memory.
-
-All allocated memory in the data structure is freed.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_block\_destroy(struct tng\_gen\_block
-\*block);
-
-/\* Set the name of a data block.
-
-tng\_data is the trajectory data container containing the block..
-
-\*block is a pointer to the block to rename.
-
-\*new\_name is a string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_block\_name\_set(tng\_trajectory\_t
-tng\_data,
-
-struct tng\_gen\_block \*block,
-
-const char \*new\_name);
-
-/\* Add a molecule to the trajectory.
-
-tng\_data is the trajectory data container containing the block..
-
-\*name is a pointer to the string containing the name of the new
-molecule.
-
-\*\*molecule is a pointer to a pointer to the newly created molecule.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_molecule\_add(tng\_trajectory\_t tng\_data,
-
-const char \*name,
-
-tng\_molecule\_t \*molecule);
-
-/\* Set the name of a molecule.
-
-tng\_data is the trajectory data container containing the molecule..
-
-\*molecule is a pointer to the molecule to rename.
-
-\*new\_name is a string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_molecule\_name\_set(tng\_trajectory\_t
-tng\_data,
-
-tng\_molecule\_t molecule,
-
-const char \*new\_name);
-
-/\* Set the count of a molecule.
-
-tng\_data is the trajectory data container containing the molecule..
-
-\*molecule is a pointer to the molecule to rename.
-
-\*cnt is a pointer to the variable to be populated with the count.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_molecule\_cnt\_get(tng\_trajectory\_t
-tng\_data,
-
-tng\_molecule\_t molecule,
-
-int64\_t \*cnt);
-
-/\* Set the count of a molecule.
-
-tng\_data is the trajectory data container containing the molecule..
-
-\*molecule is a pointer to the molecule to rename.
-
-cnt is the number of instances of this molecule.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_molecule\_cnt\_set(tng\_trajectory\_t
-tng\_data,
-
-tng\_molecule\_t molecule,
-
-int64\_t cnt);
-
-/\* Add a chain to a molecule.
-
-tng\_data is the trajectory data container containing the molecule..
-
-\*molecule is a pointer to the molecule to add a chain to.
-
-\*name is a pointer to a string containing the name of the chain.
-
-\*\*chain is a pointer to a pointer to the newly created chain.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_molecule\_chain\_add(tng\_trajectory\_t
-tng\_data,
-
-tng\_molecule\_t molecule,
-
-const char \*name,
-
-tng\_chain\_t \*chain);
-
-/\* Set the name of a chain.
-
-tng\_data is the trajectory data container containing the atom..
-
-\*chain is a pointer to the chain to rename.
-
-\*new\_name is a string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_chain\_name\_set(tng\_trajectory\_t
-tng\_data,
-
-tng\_chain\_t chain,
-
-const char \*new\_name);
-
-/\* Add a residue to a chain.
-
-tng\_data is the trajectory data container containing the chain..
-
-\*chain is a pointer to the chain to add a residue to.
-
-\*name is a pointer to a string containing the name of the residue.
-
-\*\*residue is a pointer to a pointer to the newly created residue.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_chain\_residue\_add(tng\_trajectory\_t
-tng\_data,
-
-tng\_chain\_t chain,
-
-const char \*name,
-
-tng\_residue\_t \*residue);
-
-/\* Set the name of a residue.
-
-tng\_data is the trajectory data container containing the residue.due.
-
-\*residue is a pointer to the residue to rename.
-
-\*new\_name is a string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_residue\_name\_set(tng\_trajectory\_t
-tng\_data,
-
-tng\_residue\_t residue,
-
-const char \*new\_name);
-
-/\* Add an atom to a residue.
-
-\*tng\_data is a pointer to the trajectory containing the residue.
-
-\*residue is a pointer to the residue to add an atom to.
-
-\*atom\_name is a pointer to a string containing the name of the atom.
-
-\*atom\_type is a pointer to a string containing the atom type of the
-atom.
-
-\*\*atom is a pointer to a pointer to the newly created atom.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_residue\_atom\_add(tng\_trajectory\_t
-tng\_data,
-
-tng\_residue\_t residue,
-
-const char \*atom\_name,
-
-const char \*atom\_type,
-
-tng\_atom\_t \*atom);
-
-/\* Set the name of an atom.
-
-tng\_data is the trajectory data container containing the atom..
-
-\*atom is a pointer to the atom to rename.
-
-\*new\_name is a string containing the wanted name.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_atom\_name\_set(tng\_trajectory\_t tng\_data,
-
-tng\_atom\_t atom,
-
-const char \*new\_name);
-
-/\* Set the atom type of an atom.
-
-tng\_data is the trajectory data container containing the atom..
-
-\*atom is a pointer to the atom to change.
-
-\*new\_name is a string containing the atom type.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_atom\_type\_set(tng\_trajectory\_t tng\_data,
-
-tng\_atom\_t atom,
-
-const char \*new\_type);
-
-/\* Read the header blocks from the input\_file of tng\_data.
-
-The trajectory blocks must be read separately and iteratively in chunks
-
-to fit in memory.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-If hash\_mode == TNG\_USE\_HASH the written md5 hash in the file will be
-
-compared to the md5 hash of the read contents to ensure valid data.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_file\_headers\_read(tng\_trajectory\_t
-tng\_data,
-
-const tng\_hash\_mode hash\_mode);
-
-/\* Write the header blocks to the output\_file of tng\_data.
-
-The trajectory blocks must be written separately and iteratively in
-chunks
-
-to fit in memory.
-
-tng\_data is a trajectory data container. tng\_data-\>output\_file\_path
-
-specifies which file to write to. If the file (output\_file) is not open
-it
-
-will be opened.
-
-If hash\_mode == TNG\_USE\_HASH an md5 hash for each header block will
-be generated.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_file\_headers\_write(tng\_trajectory\_t
-tng\_data,
-
-const tng\_hash\_mode hash\_mode);
-
-/\* Read one (the next) block (of any kind) from the input\_file of
-tng\_data.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-\*block\_data is a pointer to the struct which will be populated with
-the
-
-data. If block\_data-\>input\_file\_pos \> 0 it is the position from
-where the
-
-reading starts otherwise it starts from the current position.
-
-If hash\_mode == TNG\_USE\_HASH the written md5 hash in the file will be
-
-compared to the md5 hash of the read contents to ensure valid data.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-
-error has occurred or TNG\_CRITICAL (2) if a major error has occured.
-\*/
-
-tng\_function\_status tng\_block\_read\_next(tng\_trajectory\_t
-tng\_data,
-
-struct tng\_gen\_block \*block\_data,
-
-const tng\_hash\_mode hash\_mode);
-
-/\* Read one (the next) frame set, including toc, mapping and related
-data blocks
-
-from the input\_file of tng\_data.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-If hash\_mode == TNG\_USE\_HASH the written md5 hash in the file will be
-
-compared to the md5 hash of the read contents to ensure valid data.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_frame\_set\_read\_next(tng\_trajectory\_t
-tng\_data,
-
-const tng\_hash\_mode hash\_mode);
-
-/\* Write one frame set, including toc, mapping and related data blocks
-
-to the output\_file of tng\_data.
-
-tng\_data is a trajectory data container. tng\_data-\>output\_file\_path
-specifies
-
-which file to write to. If the file (output\_file) is not open it will
-be
-
-opened.
-
-If hash\_mode == TNG\_USE\_HASH an md5 hash for each block will be
-generated.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_frame\_set\_write(tng\_trajectory\_t
-tng\_data,
-
-const tng\_hash\_mode hash\_mode);
-
-tng\_function\_status tng\_frame\_set\_new(tng\_trajectory\_t tng\_data,
-
-const int64\_t first\_frame,
-
-const int64\_t n\_frames);
-
-tng\_function\_status tng\_particle\_data\_block\_add(tng\_trajectory\_t
-tng\_data,
-
-const int64\_t id,
-
-const char \*block\_name,
-
-const char datatype,
-
-const int64\_t n\_frames,
-
-const int64\_t n\_values\_per\_frame,
-
-const int64\_t stride\_length,
-
-const int64\_t first\_particle\_number,
-
-const int64\_t n\_particles,
-
-int64\_t codec\_id,
-
-void \*new\_data);
-
-/\* Read one trajectory block from the input\_file of tng\_data.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-block\_id is the ID of the block to read.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_traj\_block\_read(tng\_trajectory\_t
-tng\_data,
-
-int64\_t block\_id);
-
-/\* Write one trajectory block to the output\_file of tng\_data.
-
-tng\_data is a trajectory data container. tng\_data-\>output\_file\_path
-specifies
-
-which file to write to. If the file (output\_file) is not open it will
-be
-
-opened.
-
-block\_id is the ID of the block to write.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_traj\_block\_write(tng\_trajectory\_t
-tng\_data,
-
-int64\_t block\_id);
-
-/\* Read a requested frame set.
-
-tng\_data is a trajectory data container.
-
-tng\_data-\>current\_trajectory\_frame\_set will be the read frame set.
-
-frame\_set\_nr is the number of the frame set to return (starting from
-0).
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_frame\_set\_read\_nr(tng\_trajectory\_t
-tng\_data,
-
-int64\_t frame\_set\_nr);
-
-/\* Read a number of consecutive trajectory frames from the input\_file
-of
-
-tng\_data.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-start\_frame\_nr is the index number of the first frame to read.
-
-end\_frame\_nr is the index number of the last frame to read.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_frame\_read\_interval(tng\_trajectory\_t
-tng\_data,
-
-int64\_t start\_frame\_nr,
-
-int64\_t end\_frame\_nr);
-
-/\* Write a number of consecutive trajectory frames to the output\_file
-of
-
-tng\_data.
-
-tng\_data is a trajectory data container. tng\_data-\>output\_file\_path
-specifies
-
-which file to write to. If the file (output\_file) is not open it will
-be
-
-opened.
-
-start\_frame\_nr is the index number of the first frame to write.
-
-end\_frame\_nr is the index number of the last frame to write.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_frame\_write\_interval(tng\_trajectory\_t
-tng\_data,
-
-int64\_t start\_frame\_nr,
-
-int64\_t end\_frame\_nr);
-
-/\* Free data is an array of values (2D).
-
-\*\*values is the array to free and will be set to 0 afterwards.
-
-n\_frames is the number of frames in the data array.
-
-n\_values\_per\_frame is the number of values per frame in the data
-array.
-
-type is the data type of the data in the array.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_data\_values\_free(union data\_values
-\*\*values,
-
-int64\_t n\_frames,
-
-int64\_t n\_values\_per\_frame,
-
-tng\_data\_type type);
-
-/\* Free data is an array of values (3D).
-
-\*\*\*values is the array to free and will be set to 0 afterwards.
-
-n\_frames is the number of frames in the data array.
-
-n\_particles is the number of particles in the data array.
-
-n\_values\_per\_frame is the number of values per frame in the data
-array.
-
-type is the data type of the data in the array.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_particle\_data\_values\_free(union
-data\_values \*\*\*values,
-
-int64\_t n\_frames,
-
-int64\_t n\_particles,
-
-int64\_t n\_values\_per\_frame,
-
-tng\_data\_type type);
-
-/\* Retrieve non-particle data from the last read frame set.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-block\_id is the id number of the data block to read.
-
-\*\*\*values is a pointer to a 2-dimensional array (memory unallocated),
-which
-
-will point to the data of the requested data block. The array will be
-sized
-
-(n\_frames \* n\_values\_per\_frame).
-
-Since \*\*\*values is allocated in this function it is the callers
-
-responsibility to free the memory.
-
-\*n\_frames is set to the number of frames in the data. This is needed
-to
-
-properly reach and/or free the data.
-
-\*n\_values\_per\_frame is set to the number of values per frame in the
-data.
-
-This is needed to properly reach and/or free the data.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_data\_get(tng\_trajectory\_t tng\_data,
-
-int64\_t block\_id,
-
-union data\_values \*\*\*values,
-
-int64\_t \*n\_frames,
-
-int64\_t \*n\_values\_per\_frame,
-
-tng\_data\_type \*type);
-
-/\* Read and retrieve non-particle data, in a specific interval, from
-the
-
-trajectory.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-block\_id is the id number of the data block to read.
-
-start\_frame\_nr is the index number of the first frame to read.
-
-end\_frame\_nr is the index number of the last frame to read.
-
-\*\*\*values is a pointer to a 2-dimensional array (memory unallocated),
-which
-
-will be filled with data. The array will be sized
-
-(n\_frames \* n\_values\_per\_frame).
-
-Since \*\*\*values is allocated in this function it is the callers
-
-responsibility to free the memory.
-
-\*n\_values\_per\_frame is set to the number of values per frame in the
-data.
-
-This is needed to properly reach and/or free the data.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_data\_interval\_get(tng\_trajectory\_t
-tng\_data,
-
-int64\_t block\_id,
-
-int64\_t start\_frame\_nr,
-
-int64\_t end\_frame\_nr,
-
-union data\_values \*\*\*values,
-
-int64\_t \*n\_values\_per\_frame,
-
-tng\_data\_type \*type);
-
-/\* Retrieve particle data, from the last read frame set.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-block\_id is the id number of the particle data block to read.
-
-\*\*\*\*values is a pointer to a 3-dimensional array (memory
-unallocated), which
-
-will point to the data of the requested data block. The array will be
-sized
-
-(n\_frames \* n\_particles \* n\_values\_per\_frame).
-
-Since \*\*\*\*values is allocated in this function it is the callers
-
-responsibility to free the memory.
-
-\*n\_frames is set to the number of frames in the data. This is needed
-to
-
-properly reach and/or free the data.
-
-\*n\_particles is set to the number of particles in the returned data.
-This is
-
-needed to properly reach and/or free the data.
-
-\*n\_values\_per\_frame is set to the number of values per frame in the
-data.
-
-This is needed to properly reach and/or free the data.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_particle\_data\_get(tng\_trajectory\_t
-tng\_data,
-
-int64\_t block\_id,
-
-union data\_values \*\*\*\*values,
-
-int64\_t \*n\_frames,
-
-int64\_t \*n\_particles,
-
-int64\_t \*n\_values\_per\_frame,
-
-tng\_data\_type \*type);
-
-/\* Read and retrieve particle data, in a specific interval, from the
-trajectory.
-
-tng\_data is a trajectory data container. tng\_data-\>input\_file\_path
-specifies
-
-which file to read from. If the file (input\_file) is not open it will
-be
-
-opened.
-
-block\_id is the id number of the particle data block to read.
-
-start\_frame\_nr is the index number of the first frame to read.
-
-end\_frame\_nr is the index number of the last frame to read.
-
-first\_particle\_number is the number of the first particle, for which
-to
-
-retrive data.
-
-last\_particle\_number is the number of the last particle, for which to
-
-retrieve data.
-
-\*\*\*\*values is a pointer to a 3-dimensional array (memory
-unallocated), which
-
-will be filled with data. The array will be sized
-
-(n\_frames \* n\_particles \* n\_values\_per\_frame).
-
-Since \*\*\*\*values is allocated in this function it is the callers
-
-responsibility to free the memory.
-
-\*n\_values\_per\_frame is set to the number of values per frame in the
-data.
-
-This is needed to properly reach and/or free the data.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status
-tng\_particle\_data\_interval\_get(tng\_trajectory\_t tng\_data,
-
-int64\_t block\_id,
-
-int64\_t start\_frame\_nr,
-
-int64\_t end\_frame\_nr,
-
-int64\_t first\_particle\_number,
-
-int64\_t last\_particle\_number,
-
-union data\_values \*\*\*\*values,
-
-int64\_t \*n\_values\_per\_frame,
-
-tng\_data\_type \*type);
-
-/\* Get the date and time of initial file creation in ISO format
-(string).
-
-tng\_data is a trajectory data container.
-
-\*time is a pointer to the string in which the date will be stored.
-Memory
-
-must be reserved beforehand.
-
-Returns TNG\_SUCCESS (0) if successful, TNG\_FAILURE (1) if a minor
-error
-
-has occurred or TNG\_CRITICAL (2) if a major error has occured. \*/
-
-tng\_function\_status tng\_time\_get\_str(tng\_trajectory\_t tng\_data,
-char \*time);
-
-\#ifdef \_\_cplusplus
-
-} /\* end extern "C" \*/
-
-\#endif
-
-\#endif /\* \_TNGIO\_H \*/
^[[g]](#cmnt7)^
contact: Jan Huwald // Impressum