diff options
author | Magnus Lundborg <magnus.lundborg@scilifelab.se> | 2013-01-14 13:02:17 (GMT) |
---|---|---|
committer | Magnus Lundborg <magnus.lundborg@scilifelab.se> | 2013-01-14 13:02:17 (GMT) |
commit | b94471a09f76b28bc77af1d3d8469fc72674e7f8 (patch) | |
tree | 9bce56c1b440762e8a88262ebbabfd2a48ad8eea /src/lib/tng_io.h | |
parent | 04d1b62313b529a521f2a961b61fc21210d0c406 (diff) |
Added functions to get residue and chain names from atom number.
Diffstat (limited to 'src/lib/tng_io.h')
-rw-r--r-- | src/lib/tng_io.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/src/lib/tng_io.h b/src/lib/tng_io.h index c00abc0..0530112 100644 --- a/src/lib/tng_io.h +++ b/src/lib/tng_io.h @@ -1341,6 +1341,54 @@ tng_function_status tng_molecule_name_of_particle_nr_get_ } /** + * @brief Get the chain name of real particle number (number in mol system). + * @param tng_data is the trajectory data container containing the atom. + * @param nr is the real number of the particle in the molecular system. + * @param name is a string, which is set to the name of the chain. Memory + * must be reserved beforehand. + * @param max_len is the maximum length of name. + * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error + * has occured. + */ +tng_function_status tng_chain_name_of_particle_nr_get + (const tng_trajectory_t tng_data, + const int64_t nr, + char *name, + int max_len); +tng_function_status tng_chain_name_of_particle_nr_get_ + (const tng_trajectory_t tng_data, + const int64_t nr, + char *name, + int max_len) +{ + return(tng_chain_name_of_particle_nr_get(tng_data, nr, name, max_len)); +} + +/** + * @brief Get the residue name of real particle number (number in mol system). + * @param tng_data is the trajectory data container containing the atom. + * @param nr is the real number of the particle in the molecular system. + * @param name is a string, which is set to the name of the residue. Memory + * must be reserved beforehand. + * @param max_len is the maximum length of name. + * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error + * has occured. + */ +tng_function_status tng_residue_name_of_particle_nr_get + (const tng_trajectory_t tng_data, + const int64_t nr, + char *name, + int max_len); +tng_function_status tng_residue_name_of_particle_nr_get_ + (const tng_trajectory_t tng_data, + const int64_t nr, + char *name, + int max_len) +{ + return(tng_residue_name_of_particle_nr_get(tng_data, nr, name, max_len)); +} + +/** * @brief Get the atom name of real particle number (number in mol system). * @param tng_data is the trajectory data container containing the atom. * @param nr is the real number of the particle in the molecular system. @@ -1365,6 +1413,30 @@ tng_function_status tng_atom_name_of_particle_nr_get_ } /** + * @brief Get the atom type of real particle number (number in mol system). + * @param tng_data is the trajectory data container containing the atom. + * @param nr is the real number of the particle in the molecular system. + * @param type is a string, which is set to the type of the atom. Memory + * must be reserved beforehand. + * @param max_len is the maximum length of type. + * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error + * has occured. + */ +tng_function_status tng_atom_type_of_particle_nr_get + (const tng_trajectory_t tng_data, + const int64_t nr, + char *type, + int max_len); +tng_function_status tng_atom_type_of_particle_nr_get_ + (const tng_trajectory_t tng_data, + const int64_t nr, + char *type, + int max_len) +{ + return(tng_atom_type_of_particle_nr_get(tng_data, nr, type, max_len)); +} + +/** * @brief Add a particle mapping table. * @details Each particle mapping table will be written as a separate block, * followed by the data blocks for the corresponding particles. In most cases |