diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-11-26 16:07:41 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-11-26 16:07:41 (GMT) |
commit | 4d7a005fd8e797fe2b61792f4c881187f2d6d5a0 (patch) | |
tree | eb2ff42dd7ecd848fabb14968f6f8cd86a8680b8 /include | |
parent | 5ca97941b166add88a734033bf6df6be951b02bb (diff) |
Added tng_molecule_system_copy()
Diffstat (limited to 'include')
-rw-r--r-- | include/tng_io.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/include/tng_io.h b/include/tng_io.h index 3c20240..845ad2b 100644 --- a/include/tng_io.h +++ b/include/tng_io.h @@ -473,7 +473,10 @@ typedef enum {TNG_FALSE, TNG_TRUE} tng_bool; typedef enum {TNG_CONSTANT_N_ATOMS, TNG_VARIABLE_N_ATOMS} tng_variable_n_atoms_flag; -/** Return values of API functions */ +/** Return values of API functions. TNG_SUCCESS means that the operation + * was successful. TNG_FAILURE means that the operation failed for some + * reason, but it is possible to try to continue anyhow. TNG_CRITICAL + * means that the error is irrecoverable. */ typedef enum {TNG_SUCCESS, TNG_FAILURE, TNG_CRITICAL} tng_function_status; /** If tng_hash_mode == TNG_USE_HASH md5 hashes will be written to output files @@ -1542,6 +1545,23 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_of_index_get tng_molecule_t *molecule); /** + * @brief Copy all molecules and the molecule counts from one TNG trajectory + * to another. + * @param tng_data_src is the source trajectory containing the molecular + * system to copy. + * @param tng_data_dest is the destination trajectory. + * @pre \code tng_data_src != 0 \endcode The trajectory container (tng_data_src) + * must be initialised before using it. + * @pre \code tng_data_dest != 0 \endcode The trajectory container (tng_data_dest) + * must be initialised before using it. + * @details The molecular system in tng_data_dest will be overwritten. + * @return TNG_SUCCESS(0) if the copying is successful, TNG_FAILURE if a minor + * error has occured or TNG_CRITICAL(2) if a major error has occured. + */ +tng_function_status DECLSPECDLLEXPORT tng_molecule_system_copy(tng_trajectory_t tng_data_src, + tng_trajectory_t tng_data_dest); + +/** * @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. |