diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-11-15 14:59:22 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-11-15 14:59:22 (GMT) |
commit | b6140664d54e948ddfada3a5dc0ec0be7a159525 (patch) | |
tree | d5028ce061ba7d8645896ef044a9558f85cb33ca /include | |
parent | 6ca5fc9a24327e7243707cdd3b52397ccdb80378 (diff) |
Added tng_molecule_of_index_get()
Diffstat (limited to 'include')
-rw-r--r-- | include/tng_io.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/tng_io.h b/include/tng_io.h index 1a584e3..6ce98d0 100644 --- a/include/tng_io.h +++ b/include/tng_io.h @@ -1477,6 +1477,22 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_find tng_molecule_t *molecule); /** + * @brief Retrieve the molecule with specified index in the list of molecules. + * @param tng_data is the trajectory data container containing the molecule. + * @param index is the index (in tng_data->molecules) of the molecule to return + * @param molecule is a pointer to the molecule if it was found - otherwise 0. + * @pre \code tng_data != 0 \endcode The trajectory container (tng_data) + * must be initialised before using it. + * @pre \code molecule != 0 \endcode molecule must not be a NULL pointer. + * @return TNG_SUCCESS (0) if the molecule is found or TNG_FAILURE (1) if the + * molecule is not found. + */ +tng_function_status DECLSPECDLLEXPORT tng_molecule_of_index_get + (tng_trajectory_t tng_data, + int64_t index, + tng_molecule_t *molecule); + +/** * @brief Find a chain in a molecule. * @param tng_data is the trajectory data container containing the molecule. * @param molecule is the molecule in which to search for the chain. |