diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-02-28 09:44:35 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-02-28 09:44:35 (GMT) |
commit | 100fb403356da3afeffd4363c14d8bf4ef4b9a40 (patch) | |
tree | baddb11fce428d1207459cf6d68d48339f0c0894 /include/tng_io.h | |
parent | 9044b51534262e6d407305edb91cee659c00a009 (diff) |
Added function tng_molecule_chain_find to the API.
Diffstat (limited to 'include/tng_io.h')
-rw-r--r-- | include/tng_io.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/tng_io.h b/include/tng_io.h index 4b91f7e..d1ce168 100644 --- a/include/tng_io.h +++ b/include/tng_io.h @@ -923,6 +923,26 @@ tng_function_status tng_molecule_cnt_set(tng_trajectory_t tng_data, int64_t cnt); /** + * @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. + * @param name is a string containing the name of the chain. If name is empty + * only id will be used for finding the chain. + * @param id is the id of the chain to look for. If id is -1 only the name of + * the chain will be used for finding the chain. + * @param chain is a pointer to the chain if it was found - otherwise 0. + * @return TNG_SUCCESS (0) if the chain is found or TNG_FAILURE (1) if the + * chain is not found. + * @details If name is an empty string and id is -1 the first chain will be + * found. + */ +tng_function_status tng_molecule_chain_find(tng_trajectory_t tng_data, + tng_molecule_t molecule, + const char *name, + int64_t id, + tng_chain_t *chain); + +/** * @brief Add a chain to a molecule. * @param tng_data is the trajectory data container containing the molecule.. * @param molecule is the molecule to add a chain to. |