diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/tng_io.c | 756 | ||||
-rw-r--r-- | src/lib/tng_io.h | 684 |
2 files changed, 756 insertions, 684 deletions
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index d60f0fd..eeba683 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -10333,3 +10333,759 @@ tng_function_status tng_time_get_str(const tng_trajectory_t tng_data, return(TNG_SUCCESS); } + +/* The following is for calling the library from fortran */ + +tng_function_status tng_trajectory_init_(tng_trajectory_t *tng_data_p) +{ + return(tng_trajectory_init(tng_data_p)); +} + +tng_function_status tng_trajectory_destroy_(tng_trajectory_t *tng_data_p) +{ + return(tng_trajectory_destroy(tng_data_p)); +} + +tng_function_status tng_trajectory_init_from_src_(tng_trajectory_t src, + tng_trajectory_t *dest_p) +{ + return(tng_trajectory_init_from_src(src, dest_p)); +} + +tng_function_status tng_input_file_get_(const tng_trajectory_t tng_data, + char *file_name, const int max_len) +{ + return(tng_input_file_get(tng_data, file_name, max_len)); +} + +tng_function_status tng_input_file_set_(tng_trajectory_t tng_data, + const char *file_name, int name_len) +{ + char *name = malloc(name_len + 1); + tng_function_status stat; + + strncpy(name, file_name, name_len); + name[name_len] = 0; + stat = tng_input_file_set(tng_data, name); + free(name); + return(stat); +} + +tng_function_status tng_output_file_get_(const tng_trajectory_t tng_data, + char *file_name, const int max_len) +{ + return(tng_output_file_get(tng_data, file_name, max_len)); +} + +tng_function_status tng_output_file_set_(tng_trajectory_t tng_data, + const char *file_name, int name_len) +{ + char *name = malloc(name_len + 1); + tng_function_status stat; + + strncpy(name, file_name, name_len); + name[name_len] = 0; + stat = tng_output_file_set(tng_data, name); + free(name); + return(stat); +} + +tng_function_status tng_first_program_name_get_(const tng_trajectory_t tng_data, + char *name, const int max_len) +{ + return(tng_first_program_name_get(tng_data, name, max_len)); +} + +tng_function_status tng_first_program_name_set_(tng_trajectory_t tng_data, + const char *new_name, + int name_len) +{ + char *name = malloc(name_len + 1); + tng_function_status stat; + + strncpy(name, new_name, name_len); + name[name_len] = 0; + stat = tng_first_program_name_set(tng_data, name); + free(name); + return(stat); +} + +tng_function_status tng_last_program_name_get_(const tng_trajectory_t tng_data, + char *name, const int max_len) +{ + return(tng_last_program_name_get(tng_data, name, max_len)); +} + +tng_function_status tng_last_program_name_set_(tng_trajectory_t tng_data, + const char *new_name, + int name_len) +{ + char *name = malloc(name_len + 1); + tng_function_status stat; + + strncpy(name, new_name, name_len); + name[name_len] = 0; + stat = tng_last_program_name_set(tng_data, name); + free(name); + return(stat); +} + +tng_function_status tng_first_user_name_get_(const tng_trajectory_t tng_data, + char *name, const int max_len) +{ + return(tng_first_user_name_get(tng_data, name, max_len)); +} + +tng_function_status tng_first_user_name_set_(tng_trajectory_t tng_data, + const char *new_name, + int name_len) +{ + char *name = malloc(name_len + 1); + tng_function_status stat; + + strncpy(name, new_name, name_len); + name[name_len] = 0; + stat = tng_first_user_name_set(tng_data, name); + free(name); + return(stat); +} + +tng_function_status tng_last_user_name_get_(const tng_trajectory_t tng_data, + char *name, const int max_len) +{ + return(tng_last_user_name_get(tng_data, name, max_len)); +} + +tng_function_status tng_last_user_name_set_(tng_trajectory_t tng_data, + const char *new_name, + int name_len) +{ + char *name = malloc(name_len + 1); + tng_function_status stat; + + strncpy(name, new_name, name_len); + name[name_len] = 0; + stat = tng_last_user_name_set(tng_data, name); + free(name); + return(stat); +} + +tng_function_status tng_first_computer_name_get_(const tng_trajectory_t tng_data, + char *name, const int max_len) +{ + return(tng_first_computer_name_get(tng_data, name, max_len)); +} + +tng_function_status tng_first_computer_name_set_(tng_trajectory_t tng_data, + const char *new_name, + int name_len) +{ + char *name = malloc(name_len + 1); + tng_function_status stat; + + strncpy(name, new_name, name_len); + name[name_len] = 0; + stat = tng_first_computer_name_set(tng_data, name); + free(name); + return(stat); +} + +tng_function_status tng_last_computer_name_get_(const tng_trajectory_t tng_data, + char *name, const int max_len) +{ + return(tng_last_computer_name_get(tng_data, name, max_len)); +} + +tng_function_status tng_last_computer_name_set_(tng_trajectory_t tng_data, + const char *new_name, + int name_len) +{ + char *name = malloc(name_len + 1); + tng_function_status stat; + + strncpy(name, new_name, name_len); + name[name_len] = 0; + stat = tng_last_computer_name_set(tng_data, name); + free(name); + return(stat); +} + +tng_function_status tng_first_signature_get_(const tng_trajectory_t tng_data, + char *signature, const int max_len) +{ + return(tng_first_signature_get(tng_data, signature, max_len)); +} + +tng_function_status tng_first_signature_set_(tng_trajectory_t tng_data, + const char *signature, + int sign_len) +{ + char *sign = malloc(sign_len + 1); + tng_function_status stat; + + strncpy(sign, signature, sign_len); + sign[sign_len] = 0; + stat = tng_first_signature_set(tng_data, sign); + free(sign); + return(stat); +} + +tng_function_status tng_last_signature_get_(const tng_trajectory_t tng_data, + char *signature, const int max_len) +{ + return(tng_last_signature_get(tng_data, signature, max_len)); +} + +tng_function_status tng_last_signature_set_(tng_trajectory_t tng_data, + const char *signature, + int sign_len) +{ + char *sign = malloc(sign_len + 1); + tng_function_status stat; + + strncpy(sign, signature, sign_len); + sign[sign_len] = 0; + stat = tng_last_signature_set(tng_data, sign); + free(sign); + return(stat); +} + +tng_function_status tng_forcefield_name_get_(const tng_trajectory_t tng_data, + char *name, const int max_len) +{ + return(tng_forcefield_name_get(tng_data, name, max_len)); +} + +tng_function_status tng_forcefield_name_set_(tng_trajectory_t tng_data, + const char *new_name, + int name_len) +{ + char *name = malloc(name_len + 1); + tng_function_status stat; + + strncpy(name, new_name, name_len); + name[name_len] = 0; + stat = tng_forcefield_name_set(tng_data, name); + free(name); + return(stat); +} + +tng_function_status tng_medium_stride_length_get_(const tng_trajectory_t tng_data, + int64_t *len) +{ + return(tng_medium_stride_length_get(tng_data, len)); +} + +tng_function_status tng_medium_stride_length_set_(tng_trajectory_t tng_data, + const int64_t *len) +{ + return(tng_medium_stride_length_set(tng_data, *len)); +} + +tng_function_status tng_long_stride_length_get_(const tng_trajectory_t tng_data, + int64_t *len) +{ + return(tng_long_stride_length_get(tng_data, len)); +} + +tng_function_status tng_long_stride_length_set_(tng_trajectory_t tng_data, + const int64_t *len) +{ + return(tng_long_stride_length_set(tng_data, *len)); +} + +tng_function_status tng_input_file_len_get_(const tng_trajectory_t tng_data, + int64_t *len) +{ + return(tng_input_file_len_get(tng_data, len)); +} + +tng_function_status tng_num_particles_get_(const tng_trajectory_t tng_data, + int64_t *n) +{ + return(tng_num_particles_get(tng_data, n)); +} + +tng_function_status tng_num_molecules_get_(const tng_trajectory_t tng_data, + int64_t *n) +{ + return(tng_num_molecules_get(tng_data, n)); +} + +tng_function_status tng_num_frames_per_frame_set_get_ + (const tng_trajectory_t tng_data, + int64_t *n) +{ + return(tng_num_frames_per_frame_set_get(tng_data, n)); +} + +tng_function_status tng_num_frame_sets_get_ + (const tng_trajectory_t tng_data, + int64_t *n) +{ + return(tng_num_frame_sets_get(tng_data, n)); +} + +tng_function_status tng_current_frame_set_get_ + (tng_trajectory_t tng_data, + tng_trajectory_frame_set_t *frame_set_p) +{ + return(tng_current_frame_set_get(tng_data, frame_set_p)); +} + +tng_function_status tng_frame_set_nr_find_(tng_trajectory_t tng_data, + const int64_t *nr) +{ + return(tng_frame_set_nr_find(tng_data, *nr)); +} + +tng_function_status tng_frame_set_of_frame_find_(tng_trajectory_t tng_data, + const int64_t *frame) +{ + return(tng_frame_set_of_frame_find(tng_data, *frame)); +} + +tng_function_status tng_frame_set_next_frame_set_file_pos_get_ + (const tng_trajectory_t tng_data, + const tng_trajectory_frame_set_t frame_set, + int64_t *pos) +{ + return(tng_frame_set_next_frame_set_file_pos_get(tng_data, frame_set, pos)); +} + +tng_function_status tng_frame_set_prev_frame_set_file_pos_get_ + (const tng_trajectory_t tng_data, + const tng_trajectory_frame_set_t frame_set, + int64_t *pos) +{ + return(tng_frame_set_prev_frame_set_file_pos_get(tng_data, frame_set, pos)); +} + +tng_function_status tng_frame_set_frame_range_get_ + (const tng_trajectory_t tng_data, + const tng_trajectory_frame_set_t frame_set, + int64_t *first_frame, + int64_t *last_frame) +{ + return(tng_frame_set_frame_range_get(tng_data, frame_set, first_frame, + last_frame)); +} + +tng_function_status tng_molecule_init_(const tng_trajectory_t tng_data, + tng_molecule_t molecule) +{ + return(tng_molecule_init(tng_data, molecule)); +} + +tng_function_status tng_molecule_destroy_(const tng_trajectory_t tng_data, + tng_molecule_t molecule) +{ + return(tng_molecule_destroy(tng_data, molecule)); +} + +tng_function_status tng_molecule_add_(tng_trajectory_t tng_data, + const char *name, + tng_molecule_t *molecule, + int name_len) +{ + char *n = malloc(name_len + 1); + tng_function_status stat; + + strncpy(n, name, name_len); + n[name_len] = 0; + stat = tng_molecule_add(tng_data, n, molecule); + free(n); + return(stat); +} + +tng_function_status tng_molecule_name_set_(tng_trajectory_t tng_data, + tng_molecule_t molecule, + const char *new_name, + int name_len) +{ + char *name = malloc(name_len + 1); + tng_function_status stat; + + strncpy(name, new_name, name_len); + name[name_len] = 0; + stat = tng_molecule_name_set(tng_data, molecule, name); + free(name); + return(stat); +} + +tng_function_status tng_molecule_cnt_get_(tng_trajectory_t tng_data, + tng_molecule_t molecule, + int64_t *cnt) +{ + return(tng_molecule_cnt_get(tng_data, molecule, cnt)); +} + +tng_function_status tng_molecule_cnt_set_(tng_trajectory_t tng_data, + tng_molecule_t molecule, + int64_t *cnt) +{ + return(tng_molecule_cnt_set(tng_data, molecule, *cnt)); +} + +tng_function_status tng_molecule_chain_add_(tng_trajectory_t tng_data, + tng_molecule_t molecule, + const char *name, + tng_chain_t *chain, + int name_len) +{ + char *n = malloc(name_len + 1); + tng_function_status stat; + + strncpy(n, name, name_len); + n[name_len] = 0; + stat = tng_molecule_chain_add(tng_data, molecule, n, chain); + free(n); + return(stat); +} + +tng_function_status tng_chain_name_set_(tng_trajectory_t tng_data, + tng_chain_t chain, + const char *new_name, + int name_len) +{ + char *name = malloc(name_len + 1); + tng_function_status stat; + + strncpy(name, new_name, name_len); + name[name_len] = 0; + stat = tng_chain_name_set(tng_data, chain, name); + free(name); + return(stat); +} + +tng_function_status tng_chain_residue_add_(tng_trajectory_t tng_data, + tng_chain_t chain, + const char *name, + tng_residue_t *residue, + int name_len) +{ + char *n = malloc(name_len + 1); + tng_function_status stat; + + strncpy(n, name, name_len); + n[name_len] = 0; + stat = tng_chain_residue_add(tng_data, chain, n, residue); + free(n); + return(stat); +} + +tng_function_status tng_residue_name_set_(tng_trajectory_t tng_data, + tng_residue_t residue, + const char *new_name, + int name_len) +{ + char *name = malloc(name_len + 1); + tng_function_status stat; + + strncpy(name, new_name, name_len); + name[name_len] = 0; + stat = tng_residue_name_set(tng_data, residue, name); + free(name); + return(stat); +} + +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, + int name_len, + int type_len) +{ + char *name = malloc(name_len + 1); + char *type = malloc(type_len + 1); + tng_function_status stat; + + strncpy(name, atom_name, name_len); + strncpy(type, atom_type, type_len); + name[name_len] = 0; + type[type_len] = 0; + stat = tng_residue_atom_add(tng_data, residue, name, type, atom); + free(name); + free(type); + return(stat); +} + +tng_function_status tng_atom_name_set_(tng_trajectory_t tng_data, + tng_atom_t atom, + const char *new_name, + int name_len) +{ + char *name = malloc(name_len + 1); + tng_function_status stat; + + strncpy(name, new_name, name_len); + name[name_len] = 0; + stat = tng_atom_name_set(tng_data, atom, name); + free(name); + return(stat); +} + +tng_function_status tng_atom_type_set_(tng_trajectory_t tng_data, + tng_atom_t atom, + const char *new_type, + int type_len) +{ + char *type = malloc(type_len + 1); + tng_function_status stat; + + strncpy(type, new_type, type_len); + type[type_len] = 0; + stat = tng_atom_type_set(tng_data, atom, type); + free(type); + return(stat); +} + +tng_function_status tng_molecule_name_of_particle_nr_get_ + (const tng_trajectory_t tng_data, + const int64_t nr, + char *name, + int max_len) +{ + return(tng_molecule_name_of_particle_nr_get(tng_data, nr, name, 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)); +} + +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)); +} + +tng_function_status tng_atom_name_of_particle_nr_get_ + (const tng_trajectory_t tng_data, + const int64_t nr, + char *name, + int max_len) +{ + return(tng_atom_name_of_particle_nr_get(tng_data, nr, name, 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)); +} + +tng_function_status tng_particle_mapping_add_ + (tng_trajectory_t tng_data, + const int64_t *first_particle_number, + const int64_t *n_particles, + const int64_t *mapping_table) +{ + return(tng_particle_mapping_add(tng_data, *first_particle_number, + *n_particles, mapping_table)); +} + +tng_function_status tng_file_headers_read_(tng_trajectory_t tng_data, + const tng_hash_mode *hash_mode) +{ + return(tng_file_headers_read(tng_data, *hash_mode)); +} + +tng_function_status tng_file_headers_write_(tng_trajectory_t tng_data, + const tng_hash_mode *hash_mode) +{ + return(tng_file_headers_write(tng_data, *hash_mode)); +} + +tng_function_status tng_block_read_next_(tng_trajectory_t tng_data, + tng_gen_block_t block_data, + const tng_hash_mode *hash_mode) +{ + return(tng_block_read_next(tng_data, block_data, *hash_mode)); +} + +tng_function_status tng_frame_set_read_next_(tng_trajectory_t tng_data, + const tng_hash_mode *hash_mode) +{ + return(tng_frame_set_read_next(tng_data, *hash_mode)); +} + +tng_function_status tng_frame_set_write_(tng_trajectory_t tng_data, + const tng_hash_mode *hash_mode) +{ + return(tng_frame_set_write(tng_data, *hash_mode)); +} + +tng_function_status tng_frame_set_new_(tng_trajectory_t tng_data, + const int64_t *first_frame, + const int64_t *n_frames) +{ + return(tng_frame_set_new(tng_data, *first_frame, *n_frames)); +} + +tng_function_status tng_data_block_add_(tng_trajectory_t tng_data, + const int64_t *id, + const char *block_name, + const tng_data_type *datatype, + const tng_block_type *block_type_flag, + int64_t *n_frames, + const int64_t *n_values_per_frame, + const int64_t *stride_length, + const int64_t *codec_id, + void *new_data, + int name_len) +{ + char *name = malloc(name_len + 1); + tng_function_status stat; + + strncpy(name, block_name, name_len); + name[name_len] = 0; + stat = tng_data_block_add(tng_data, *id, name, *datatype, *block_type_flag, + *n_frames, *n_values_per_frame, *stride_length, + *codec_id, new_data); + free(name); + return(stat); +} + +tng_function_status tng_particle_data_block_add_ + (tng_trajectory_t tng_data, + const int64_t *id, + const char *block_name, + const tng_data_type *datatype, + const tng_block_type *block_type_flag, + 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, + const int64_t *codec_id, + void *new_data, + int name_len) +{ + char *name = malloc(name_len + 1); + tng_function_status stat; + + strncpy(name, block_name, name_len); + name[name_len] = 0; + stat = tng_particle_data_block_add(tng_data, *id, name, *datatype, + *block_type_flag, *n_frames, + *n_values_per_frame, *stride_length, + *first_particle_number, *n_particles, + *codec_id, new_data); + free(name); + return(stat); +} + +tng_function_status tng_frame_data_write_(tng_trajectory_t tng_data, + const int64_t *frame_nr, + const int64_t *block_id, + const void *data, + const tng_hash_mode *hash_mode) +{ + return(tng_frame_data_write(tng_data, *frame_nr, *block_id, data, + *hash_mode)); +} + +tng_function_status tng_frame_particle_data_write_(tng_trajectory_t tng_data, + const int64_t *frame_nr, + const int64_t *block_id, + const int64_t *val_first_particle, + const int64_t *val_n_particles, + const void *data, + const tng_hash_mode *hash_mode) +{ + return(tng_frame_particle_data_write(tng_data, *frame_nr, *block_id, + *val_first_particle, *val_n_particles, + data, *hash_mode)); +} + +tng_function_status tng_data_values_free_(const tng_trajectory_t tng_data, + union data_values **values, + const int64_t *n_frames, + const int64_t *n_values_per_frame, + const tng_data_type *type) +{ + return(tng_data_values_free(tng_data, values, *n_frames, + *n_values_per_frame, *type)); +} + +tng_function_status tng_particle_data_values_free_(const tng_trajectory_t tng_data, + union data_values ***values, + const int64_t *n_frames, + const int64_t *n_particles, + const int64_t *n_values_per_frame, + const tng_data_type *type) +{ + return(tng_particle_data_values_free(tng_data, values, *n_frames, *n_particles, + *n_values_per_frame, *type)); +} + +tng_function_status tng_data_get_(tng_trajectory_t tng_data, + const int64_t *block_id, + union data_values ***values, + int64_t *n_frames, + int64_t *n_values_per_frame, + tng_data_type *type) +{ + return(tng_data_get(tng_data, *block_id, values, n_frames, + n_values_per_frame, type)); +} + +tng_function_status tng_data_interval_get_(tng_trajectory_t tng_data, + const int64_t *block_id, + const int64_t *start_frame_nr, + const int64_t *end_frame_nr, + const tng_hash_mode *hash_mode, + union data_values ***values, + int64_t *n_values_per_frame, + tng_data_type *type) +{ + return(tng_data_interval_get(tng_data, *block_id, *start_frame_nr, + *end_frame_nr, *hash_mode, values, + n_values_per_frame, type)); +} + +tng_function_status tng_particle_data_get_(tng_trajectory_t tng_data, + const 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) +{ + return(tng_particle_data_get(tng_data, *block_id, values, n_frames, + n_particles, n_values_per_frame, type)); +} + +tng_function_status tng_particle_data_interval_get_(tng_trajectory_t tng_data, + const int64_t *block_id, + const int64_t *start_frame_nr, + const int64_t *end_frame_nr, + const tng_hash_mode *hash_mode, + union data_values ****values, + int64_t *n_particles, + int64_t *n_values_per_frame, + tng_data_type *type) +{ + return(tng_particle_data_interval_get(tng_data, *block_id, *start_frame_nr, + *end_frame_nr, *hash_mode, values, + n_particles, n_values_per_frame, + type)); +} + +tng_function_status tng_time_get_str_(const tng_trajectory_t tng_data, + char *time, int64_t str_len) +{ + return(tng_time_get_str(tng_data, time)); +} diff --git a/src/lib/tng_io.h b/src/lib/tng_io.h index 577eee9..3289b60 100644 --- a/src/lib/tng_io.h +++ b/src/lib/tng_io.h @@ -358,10 +358,6 @@ extern "C" * error has occured. */ tng_function_status tng_trajectory_init(tng_trajectory_t *tng_data_p); -tng_function_status tng_trajectory_init_(tng_trajectory_t *tng_data_p) -{ - return(tng_trajectory_init(tng_data_p)); -} /** * @brief Clean up a trajectory data container. @@ -371,10 +367,6 @@ tng_function_status tng_trajectory_init_(tng_trajectory_t *tng_data_p) * @return TNG_SUCCESS (0) if successful. */ tng_function_status tng_trajectory_destroy(tng_trajectory_t *tng_data_p); -tng_function_status tng_trajectory_destroy_(tng_trajectory_t *tng_data_p) -{ - return(tng_trajectory_destroy(tng_data_p)); -} /** * @brief Copy a trajectory data container (dest is setup as well). @@ -390,11 +382,6 @@ tng_function_status tng_trajectory_destroy_(tng_trajectory_t *tng_data_p) */ tng_function_status tng_trajectory_init_from_src(tng_trajectory_t src, tng_trajectory_t *dest_p); -tng_function_status tng_trajectory_init_from_src_(tng_trajectory_t src, - tng_trajectory_t *dest_p) -{ - return(tng_trajectory_init_from_src(src, dest_p)); -} /** * @brief Get the name of the input file. @@ -408,11 +395,6 @@ tng_function_status tng_trajectory_init_from_src_(tng_trajectory_t src, */ tng_function_status tng_input_file_get(const tng_trajectory_t tng_data, char *file_name, const int max_len); -tng_function_status tng_input_file_get_(const tng_trajectory_t tng_data, - char *file_name, const int max_len) -{ - return(tng_input_file_get(tng_data, file_name, max_len)); -} /** * @brief Set the name of the input file. @@ -423,18 +405,6 @@ tng_function_status tng_input_file_get_(const tng_trajectory_t tng_data, */ tng_function_status tng_input_file_set(tng_trajectory_t tng_data, const char *file_name); -tng_function_status tng_input_file_set_(tng_trajectory_t tng_data, - const char *file_name, int name_len) -{ - char *name = malloc(name_len + 1); - tng_function_status stat; - - strncpy(name, file_name, name_len); - name[name_len] = 0; - stat = tng_input_file_set(tng_data, name); - free(name); - return(stat); -} /** * @brief Get the name of the output file. @@ -448,11 +418,6 @@ tng_function_status tng_input_file_set_(tng_trajectory_t tng_data, */ tng_function_status tng_output_file_get(const tng_trajectory_t tng_data, char *file_name, const int max_len); -tng_function_status tng_output_file_get_(const tng_trajectory_t tng_data, - char *file_name, const int max_len) -{ - return(tng_output_file_get(tng_data, file_name, max_len)); -} /** * @brief Set the name of the output file. @@ -463,18 +428,6 @@ tng_function_status tng_output_file_get_(const tng_trajectory_t tng_data, */ tng_function_status tng_output_file_set(tng_trajectory_t tng_data, const char *file_name); -tng_function_status tng_output_file_set_(tng_trajectory_t tng_data, - const char *file_name, int name_len) -{ - char *name = malloc(name_len + 1); - tng_function_status stat; - - strncpy(name, file_name, name_len); - name[name_len] = 0; - stat = tng_output_file_set(tng_data, name); - free(name); - return(stat); -} /** * @brief Get the name of the program used when creating the trajectory. @@ -488,11 +441,6 @@ tng_function_status tng_output_file_set_(tng_trajectory_t tng_data, */ tng_function_status tng_first_program_name_get(const tng_trajectory_t tng_data, char *name, const int max_len); -tng_function_status tng_first_program_name_get_(const tng_trajectory_t tng_data, - char *name, const int max_len) -{ - return(tng_first_program_name_get(tng_data, name, max_len)); -} /** * @brief Set the name of the program used when creating the trajectory. @@ -503,19 +451,6 @@ tng_function_status tng_first_program_name_get_(const tng_trajectory_t tng_data, */ tng_function_status tng_first_program_name_set(tng_trajectory_t tng_data, const char *new_name); -tng_function_status tng_first_program_name_set_(tng_trajectory_t tng_data, - const char *new_name, - int name_len) -{ - char *name = malloc(name_len + 1); - tng_function_status stat; - - strncpy(name, new_name, name_len); - name[name_len] = 0; - stat = tng_first_program_name_set(tng_data, name); - free(name); - return(stat); -} /** * @brief Get the name of the program used when last modifying the trajectory. @@ -529,11 +464,6 @@ tng_function_status tng_first_program_name_set_(tng_trajectory_t tng_data, */ tng_function_status tng_last_program_name_get(const tng_trajectory_t tng_data, char *name, const int max_len); -tng_function_status tng_last_program_name_get_(const tng_trajectory_t tng_data, - char *name, const int max_len) -{ - return(tng_last_program_name_get(tng_data, name, max_len)); -} /** * @brief Set the name of the program used when last modifying the trajectory. @@ -544,19 +474,6 @@ tng_function_status tng_last_program_name_get_(const tng_trajectory_t tng_data, */ tng_function_status tng_last_program_name_set(tng_trajectory_t tng_data, const char *new_name); -tng_function_status tng_last_program_name_set_(tng_trajectory_t tng_data, - const char *new_name, - int name_len) -{ - char *name = malloc(name_len + 1); - tng_function_status stat; - - strncpy(name, new_name, name_len); - name[name_len] = 0; - stat = tng_last_program_name_set(tng_data, name); - free(name); - return(stat); -} /** * @brief Get the name of the user who created the trajectory. @@ -570,11 +487,6 @@ tng_function_status tng_last_program_name_set_(tng_trajectory_t tng_data, */ tng_function_status tng_first_user_name_get(const tng_trajectory_t tng_data, char *name, const int max_len); -tng_function_status tng_first_user_name_get_(const tng_trajectory_t tng_data, - char *name, const int max_len) -{ - return(tng_first_user_name_get(tng_data, name, max_len)); -} /** * @brief Set the name of the user who created the trajectory. @@ -585,19 +497,6 @@ tng_function_status tng_first_user_name_get_(const tng_trajectory_t tng_data, */ tng_function_status tng_first_user_name_set(tng_trajectory_t tng_data, const char *new_name); -tng_function_status tng_first_user_name_set_(tng_trajectory_t tng_data, - const char *new_name, - int name_len) -{ - char *name = malloc(name_len + 1); - tng_function_status stat; - - strncpy(name, new_name, name_len); - name[name_len] = 0; - stat = tng_first_user_name_set(tng_data, name); - free(name); - return(stat); -} /** * @brief Get the name of the user who last modified the trajectory. @@ -611,11 +510,6 @@ tng_function_status tng_first_user_name_set_(tng_trajectory_t tng_data, */ tng_function_status tng_last_user_name_get(const tng_trajectory_t tng_data, char *name, const int max_len); -tng_function_status tng_last_user_name_get_(const tng_trajectory_t tng_data, - char *name, const int max_len) -{ - return(tng_last_user_name_get(tng_data, name, max_len)); -} /** * @brief Set the name of the user who last modified the trajectory. @@ -626,20 +520,6 @@ tng_function_status tng_last_user_name_get_(const tng_trajectory_t tng_data, */ tng_function_status tng_last_user_name_set(tng_trajectory_t tng_data, const char *new_name); -tng_function_status tng_last_user_name_set_(tng_trajectory_t tng_data, - const char *new_name, - int name_len) -{ - char *name = malloc(name_len + 1); - tng_function_status stat; - - strncpy(name, new_name, name_len); - name[name_len] = 0; - stat = tng_last_user_name_set(tng_data, name); - free(name); - return(stat); -} - /** * @brief Get the name of the computer used when creating the trajectory. @@ -653,11 +533,6 @@ tng_function_status tng_last_user_name_set_(tng_trajectory_t tng_data, */ tng_function_status tng_first_computer_name_get(const tng_trajectory_t tng_data, char *name, const int max_len); -tng_function_status tng_first_computer_name_get_(const tng_trajectory_t tng_data, - char *name, const int max_len) -{ - return(tng_first_computer_name_get(tng_data, name, max_len)); -} /** * @brief Set the name of the computer used when creating the trajectory. @@ -668,19 +543,6 @@ tng_function_status tng_first_computer_name_get_(const tng_trajectory_t tng_data */ tng_function_status tng_first_computer_name_set(tng_trajectory_t tng_data, const char *new_name); -tng_function_status tng_first_computer_name_set_(tng_trajectory_t tng_data, - const char *new_name, - int name_len) -{ - char *name = malloc(name_len + 1); - tng_function_status stat; - - strncpy(name, new_name, name_len); - name[name_len] = 0; - stat = tng_first_computer_name_set(tng_data, name); - free(name); - return(stat); -} /** * @brief Get the name of the computer used when last modifying the trajectory. @@ -694,11 +556,6 @@ tng_function_status tng_first_computer_name_set_(tng_trajectory_t tng_data, */ tng_function_status tng_last_computer_name_get(const tng_trajectory_t tng_data, char *name, const int max_len); -tng_function_status tng_last_computer_name_get_(const tng_trajectory_t tng_data, - char *name, const int max_len) -{ - return(tng_last_computer_name_get(tng_data, name, max_len)); -} /** * @brief Set the name of the computer used when last modifying the trajectory. @@ -709,19 +566,6 @@ tng_function_status tng_last_computer_name_get_(const tng_trajectory_t tng_data, */ tng_function_status tng_last_computer_name_set(tng_trajectory_t tng_data, const char *new_name); -tng_function_status tng_last_computer_name_set_(tng_trajectory_t tng_data, - const char *new_name, - int name_len) -{ - char *name = malloc(name_len + 1); - tng_function_status stat; - - strncpy(name, new_name, name_len); - name[name_len] = 0; - stat = tng_last_computer_name_set(tng_data, name); - free(name); - return(stat); -} /** * @brief Get the pgp_signature of the user creating the trajectory. @@ -735,11 +579,6 @@ tng_function_status tng_last_computer_name_set_(tng_trajectory_t tng_data, */ tng_function_status tng_first_signature_get(const tng_trajectory_t tng_data, char *signature, const int max_len); -tng_function_status tng_first_signature_get_(const tng_trajectory_t tng_data, - char *signature, const int max_len) -{ - return(tng_first_signature_get(tng_data, signature, max_len)); -} /** * @brief Set the pgp_signature of the user creating the trajectory. @@ -750,19 +589,6 @@ tng_function_status tng_first_signature_get_(const tng_trajectory_t tng_data, */ tng_function_status tng_first_signature_set(tng_trajectory_t tng_data, const char *signature); -tng_function_status tng_first_signature_set_(tng_trajectory_t tng_data, - const char *signature, - int sign_len) -{ - char *sign = malloc(sign_len + 1); - tng_function_status stat; - - strncpy(sign, signature, sign_len); - sign[sign_len] = 0; - stat = tng_first_signature_set(tng_data, sign); - free(sign); - return(stat); -} /** * @brief Get the pgp_signature of the user last modifying the trajectory. @@ -776,11 +602,6 @@ tng_function_status tng_first_signature_set_(tng_trajectory_t tng_data, */ tng_function_status tng_last_signature_get(const tng_trajectory_t tng_data, char *signature, const int max_len); -tng_function_status tng_last_signature_get_(const tng_trajectory_t tng_data, - char *signature, const int max_len) -{ - return(tng_last_signature_get(tng_data, signature, max_len)); -} /** * @brief Set the pgp_signature of the user last modifying the trajectory. @@ -791,19 +612,6 @@ tng_function_status tng_last_signature_get_(const tng_trajectory_t tng_data, */ tng_function_status tng_last_signature_set(tng_trajectory_t tng_data, const char *signature); -tng_function_status tng_last_signature_set_(tng_trajectory_t tng_data, - const char *signature, - int sign_len) -{ - char *sign = malloc(sign_len + 1); - tng_function_status stat; - - strncpy(sign, signature, sign_len); - sign[sign_len] = 0; - stat = tng_last_signature_set(tng_data, sign); - free(sign); - return(stat); -} /** * @brief Get the name of the forcefield used in the trajectory. @@ -817,11 +625,6 @@ tng_function_status tng_last_signature_set_(tng_trajectory_t tng_data, */ tng_function_status tng_forcefield_name_get(const tng_trajectory_t tng_data, char *name, const int max_len); -tng_function_status tng_forcefield_name_get_(const tng_trajectory_t tng_data, - char *name, const int max_len) -{ - return(tng_forcefield_name_get(tng_data, name, max_len)); -} /** * @brief Set the name of the forcefield used in the trajectory. @@ -832,19 +635,6 @@ tng_function_status tng_forcefield_name_get_(const tng_trajectory_t tng_data, */ tng_function_status tng_forcefield_name_set(tng_trajectory_t tng_data, const char *new_name); -tng_function_status tng_forcefield_name_set_(tng_trajectory_t tng_data, - const char *new_name, - int name_len) -{ - char *name = malloc(name_len + 1); - tng_function_status stat; - - strncpy(name, new_name, name_len); - name[name_len] = 0; - stat = tng_forcefield_name_set(tng_data, name); - free(name); - return(stat); -} /** * @brief Get the medium stride length of the trajectory. @@ -854,11 +644,6 @@ tng_function_status tng_forcefield_name_set_(tng_trajectory_t tng_data, */ tng_function_status tng_medium_stride_length_get(const tng_trajectory_t tng_data, int64_t *len); -tng_function_status tng_medium_stride_length_get_(const tng_trajectory_t tng_data, - int64_t *len) -{ - return(tng_medium_stride_length_get(tng_data, len)); -} /** * @brief Set the medium stride length of the trajectory. @@ -869,11 +654,6 @@ tng_function_status tng_medium_stride_length_get_(const tng_trajectory_t tng_dat */ tng_function_status tng_medium_stride_length_set(tng_trajectory_t tng_data, const int64_t len); -tng_function_status tng_medium_stride_length_set_(tng_trajectory_t tng_data, - const int64_t *len) -{ - return(tng_medium_stride_length_set(tng_data, *len)); -} /** * @brief Get the long stride length of the trajectory. @@ -883,11 +663,6 @@ tng_function_status tng_medium_stride_length_set_(tng_trajectory_t tng_data, */ tng_function_status tng_long_stride_length_get(const tng_trajectory_t tng_data, int64_t *len); -tng_function_status tng_long_stride_length_get_(const tng_trajectory_t tng_data, - int64_t *len) -{ - return(tng_long_stride_length_get(tng_data, len)); -} /** * @brief Set the long stride length of the trajectory. @@ -898,11 +673,6 @@ tng_function_status tng_long_stride_length_get_(const tng_trajectory_t tng_data, */ tng_function_status tng_long_stride_length_set(tng_trajectory_t tng_data, const int64_t len); -tng_function_status tng_long_stride_length_set_(tng_trajectory_t tng_data, - const int64_t *len) -{ - return(tng_long_stride_length_set(tng_data, *len)); -} /** * @brief Get the length of the input file. @@ -912,11 +682,6 @@ tng_function_status tng_long_stride_length_set_(tng_trajectory_t tng_data, */ tng_function_status tng_input_file_len_get(const tng_trajectory_t tng_data, int64_t *len); -tng_function_status tng_input_file_len_get_(const tng_trajectory_t tng_data, - int64_t *len) -{ - return(tng_input_file_len_get(tng_data, len)); -} /** * @brief Get the current number of particles. @@ -928,11 +693,6 @@ tng_function_status tng_input_file_len_get_(const tng_trajectory_t tng_data, */ tng_function_status tng_num_particles_get(const tng_trajectory_t tng_data, int64_t *n); -tng_function_status tng_num_particles_get_(const tng_trajectory_t tng_data, - int64_t *n) -{ - return(tng_num_particles_get(tng_data, n)); -} /** * @brief Get the current total number of molecules. @@ -944,12 +704,6 @@ tng_function_status tng_num_particles_get_(const tng_trajectory_t tng_data, */ tng_function_status tng_num_molecules_get(const tng_trajectory_t tng_data, int64_t *n); -tng_function_status tng_num_molecules_get_(const tng_trajectory_t tng_data, - int64_t *n) -{ - return(tng_num_molecules_get(tng_data, n)); -} - /** * @brief Get the number of frames per frame set. @@ -961,12 +715,6 @@ tng_function_status tng_num_molecules_get_(const tng_trajectory_t tng_data, tng_function_status tng_num_frames_per_frame_set_get (const tng_trajectory_t tng_data, int64_t *n); -tng_function_status tng_num_frames_per_frame_set_get_ - (const tng_trajectory_t tng_data, - int64_t *n) -{ - return(tng_num_frames_per_frame_set_get(tng_data, n)); -} /** * @brief Get the number of frame sets. @@ -979,12 +727,6 @@ tng_function_status tng_num_frames_per_frame_set_get_ tng_function_status tng_num_frame_sets_get (const tng_trajectory_t tng_data, int64_t *n); -tng_function_status tng_num_frame_sets_get_ - (const tng_trajectory_t tng_data, - int64_t *n) -{ - return(tng_num_frame_sets_get(tng_data, n)); -} /** * @brief Get the current trajectory frame set. @@ -996,12 +738,6 @@ tng_function_status tng_num_frame_sets_get_ tng_function_status tng_current_frame_set_get (tng_trajectory_t tng_data, tng_trajectory_frame_set_t *frame_set_p); -tng_function_status tng_current_frame_set_get_ - (tng_trajectory_t tng_data, - tng_trajectory_frame_set_t *frame_set_p) -{ - return(tng_current_frame_set_get(tng_data, frame_set_p)); -} /** * @brief Find the requested frame set number. @@ -1014,11 +750,6 @@ tng_function_status tng_current_frame_set_get_ */ tng_function_status tng_frame_set_nr_find(tng_trajectory_t tng_data, const int64_t nr); -tng_function_status tng_frame_set_nr_find_(tng_trajectory_t tng_data, - const int64_t *nr) -{ - return(tng_frame_set_nr_find(tng_data, *nr)); -} /** * @brief Find the frame set containing a specific frame. @@ -1031,11 +762,6 @@ tng_function_status tng_frame_set_nr_find_(tng_trajectory_t tng_data, */ tng_function_status tng_frame_set_of_frame_find(tng_trajectory_t tng_data, const int64_t frame); -tng_function_status tng_frame_set_of_frame_find_(tng_trajectory_t tng_data, - const int64_t *frame) -{ - return(tng_frame_set_of_frame_find(tng_data, *frame)); -} /** * @brief Get the file position of the next frame set in the input file. @@ -1049,13 +775,6 @@ tng_function_status tng_frame_set_next_frame_set_file_pos_get (const tng_trajectory_t tng_data, const tng_trajectory_frame_set_t frame_set, int64_t *pos); -tng_function_status tng_frame_set_next_frame_set_file_pos_get_ - (const tng_trajectory_t tng_data, - const tng_trajectory_frame_set_t frame_set, - int64_t *pos) -{ - return(tng_frame_set_next_frame_set_file_pos_get(tng_data, frame_set, pos)); -} /** * @brief Get the file position of the previous frame set in the input file. @@ -1069,13 +788,6 @@ tng_function_status tng_frame_set_prev_frame_set_file_pos_get (const tng_trajectory_t tng_data, const tng_trajectory_frame_set_t frame_set, int64_t *pos); -tng_function_status tng_frame_set_prev_frame_set_file_pos_get_ - (const tng_trajectory_t tng_data, - const tng_trajectory_frame_set_t frame_set, - int64_t *pos) -{ - return(tng_frame_set_prev_frame_set_file_pos_get(tng_data, frame_set, pos)); -} /** * @brief Get the first and last frames of the frame set. @@ -1090,15 +802,6 @@ tng_function_status tng_frame_set_frame_range_get const tng_trajectory_frame_set_t frame_set, int64_t *first_frame, int64_t *last_frame); -tng_function_status tng_frame_set_frame_range_get_ - (const tng_trajectory_t tng_data, - const tng_trajectory_frame_set_t frame_set, - int64_t *first_frame, - int64_t *last_frame) -{ - return(tng_frame_set_frame_range_get(tng_data, frame_set, first_frame, - last_frame)); -} /** * @brief Setup a molecule container. @@ -1109,11 +812,6 @@ tng_function_status tng_frame_set_frame_range_get_ */ tng_function_status tng_molecule_init(const tng_trajectory_t tng_data, tng_molecule_t molecule); -tng_function_status tng_molecule_init_(const tng_trajectory_t tng_data, - tng_molecule_t molecule) -{ - return(tng_molecule_init(tng_data, molecule)); -} /** * @brief Clean up a molecule container. @@ -1126,11 +824,6 @@ tng_function_status tng_molecule_init_(const tng_trajectory_t tng_data, */ tng_function_status tng_molecule_destroy(const tng_trajectory_t tng_data, tng_molecule_t molecule); -tng_function_status tng_molecule_destroy_(const tng_trajectory_t tng_data, - tng_molecule_t molecule) -{ - return(tng_molecule_destroy(tng_data, molecule)); -} /** * @brief Add a molecule to the trajectory. @@ -1143,20 +836,6 @@ tng_function_status tng_molecule_destroy_(const tng_trajectory_t tng_data, tng_function_status tng_molecule_add(tng_trajectory_t tng_data, const char *name, tng_molecule_t *molecule); -tng_function_status tng_molecule_add_(tng_trajectory_t tng_data, - const char *name, - tng_molecule_t *molecule, - int name_len) -{ - char *n = malloc(name_len + 1); - tng_function_status stat; - - strncpy(n, name, name_len); - n[name_len] = 0; - stat = tng_molecule_add(tng_data, n, molecule); - free(n); - return(stat); -} /** * @brief Set the name of a molecule. @@ -1169,20 +848,6 @@ tng_function_status tng_molecule_add_(tng_trajectory_t tng_data, tng_function_status tng_molecule_name_set(tng_trajectory_t tng_data, tng_molecule_t molecule, const char *new_name); -tng_function_status tng_molecule_name_set_(tng_trajectory_t tng_data, - tng_molecule_t molecule, - const char *new_name, - int name_len) -{ - char *name = malloc(name_len + 1); - tng_function_status stat; - - strncpy(name, new_name, name_len); - name[name_len] = 0; - stat = tng_molecule_name_set(tng_data, molecule, name); - free(name); - return(stat); -} /** * @brief Get the count of a molecule. @@ -1195,12 +860,6 @@ tng_function_status tng_molecule_name_set_(tng_trajectory_t tng_data, tng_function_status tng_molecule_cnt_get(tng_trajectory_t tng_data, tng_molecule_t molecule, int64_t *cnt); -tng_function_status tng_molecule_cnt_get_(tng_trajectory_t tng_data, - tng_molecule_t molecule, - int64_t *cnt) -{ - return(tng_molecule_cnt_get(tng_data, molecule, cnt)); -} /** * @brief Set the count of a molecule. @@ -1213,12 +872,6 @@ tng_function_status tng_molecule_cnt_get_(tng_trajectory_t tng_data, tng_function_status tng_molecule_cnt_set(tng_trajectory_t tng_data, tng_molecule_t molecule, int64_t cnt); -tng_function_status tng_molecule_cnt_set_(tng_trajectory_t tng_data, - tng_molecule_t molecule, - int64_t *cnt) -{ - return(tng_molecule_cnt_set(tng_data, molecule, *cnt)); -} /** * @brief Add a chain to a molecule. @@ -1233,21 +886,6 @@ tng_function_status tng_molecule_chain_add(tng_trajectory_t tng_data, tng_molecule_t molecule, const char *name, tng_chain_t *chain); -tng_function_status tng_molecule_chain_add_(tng_trajectory_t tng_data, - tng_molecule_t molecule, - const char *name, - tng_chain_t *chain, - int name_len) -{ - char *n = malloc(name_len + 1); - tng_function_status stat; - - strncpy(n, name, name_len); - n[name_len] = 0; - stat = tng_molecule_chain_add(tng_data, molecule, n, chain); - free(n); - return(stat); -} /** * @brief Set the name of a chain. @@ -1260,20 +898,6 @@ tng_function_status tng_molecule_chain_add_(tng_trajectory_t tng_data, tng_function_status tng_chain_name_set(tng_trajectory_t tng_data, tng_chain_t chain, const char *new_name); -tng_function_status tng_chain_name_set_(tng_trajectory_t tng_data, - tng_chain_t chain, - const char *new_name, - int name_len) -{ - char *name = malloc(name_len + 1); - tng_function_status stat; - - strncpy(name, new_name, name_len); - name[name_len] = 0; - stat = tng_chain_name_set(tng_data, chain, name); - free(name); - return(stat); -} /** * @brief Add a residue to a chain. @@ -1288,21 +912,6 @@ tng_function_status tng_chain_residue_add(tng_trajectory_t tng_data, tng_chain_t chain, const char *name, tng_residue_t *residue); -tng_function_status tng_chain_residue_add_(tng_trajectory_t tng_data, - tng_chain_t chain, - const char *name, - tng_residue_t *residue, - int name_len) -{ - char *n = malloc(name_len + 1); - tng_function_status stat; - - strncpy(n, name, name_len); - n[name_len] = 0; - stat = tng_chain_residue_add(tng_data, chain, n, residue); - free(n); - return(stat); -} /** * @brief Set the name of a residue. @@ -1315,20 +924,6 @@ tng_function_status tng_chain_residue_add_(tng_trajectory_t tng_data, tng_function_status tng_residue_name_set(tng_trajectory_t tng_data, tng_residue_t residue, const char *new_name); -tng_function_status tng_residue_name_set_(tng_trajectory_t tng_data, - tng_residue_t residue, - const char *new_name, - int name_len) -{ - char *name = malloc(name_len + 1); - tng_function_status stat; - - strncpy(name, new_name, name_len); - name[name_len] = 0; - stat = tng_residue_name_set(tng_data, residue, name); - free(name); - return(stat); -} /** * @brief Add an atom to a residue. @@ -1345,27 +940,6 @@ tng_function_status tng_residue_atom_add(tng_trajectory_t tng_data, const char *atom_name, const char *atom_type, tng_atom_t *atom); -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, - int name_len, - int type_len) -{ - char *name = malloc(name_len + 1); - char *type = malloc(type_len + 1); - tng_function_status stat; - - strncpy(name, atom_name, name_len); - strncpy(type, atom_type, type_len); - name[name_len] = 0; - type[type_len] = 0; - stat = tng_residue_atom_add(tng_data, residue, name, type, atom); - free(name); - free(type); - return(stat); -} /** * @brief Set the name of an atom. @@ -1378,20 +952,6 @@ tng_function_status tng_residue_atom_add_(tng_trajectory_t tng_data, tng_function_status tng_atom_name_set(tng_trajectory_t tng_data, tng_atom_t atom, const char *new_name); -tng_function_status tng_atom_name_set_(tng_trajectory_t tng_data, - tng_atom_t atom, - const char *new_name, - int name_len) -{ - char *name = malloc(name_len + 1); - tng_function_status stat; - - strncpy(name, new_name, name_len); - name[name_len] = 0; - stat = tng_atom_name_set(tng_data, atom, name); - free(name); - return(stat); -} /** * @brief Set the atom type of an atom. @@ -1404,20 +964,6 @@ tng_function_status tng_atom_name_set_(tng_trajectory_t tng_data, tng_function_status tng_atom_type_set(tng_trajectory_t tng_data, tng_atom_t atom, const char *new_type); -tng_function_status tng_atom_type_set_(tng_trajectory_t tng_data, - tng_atom_t atom, - const char *new_type, - int type_len) -{ - char *type = malloc(type_len + 1); - tng_function_status stat; - - strncpy(type, new_type, type_len); - type[type_len] = 0; - stat = tng_atom_type_set(tng_data, atom, type); - free(type); - return(stat); -} /** * @brief Get the molecume name of real particle number (number in mol system). @@ -1434,14 +980,6 @@ tng_function_status tng_molecule_name_of_particle_nr_get const int64_t nr, char *name, int max_len); -tng_function_status tng_molecule_name_of_particle_nr_get_ - (const tng_trajectory_t tng_data, - const int64_t nr, - char *name, - int max_len) -{ - return(tng_molecule_name_of_particle_nr_get(tng_data, nr, name, max_len)); -} /** * @brief Get the chain name of real particle number (number in mol system). @@ -1458,14 +996,6 @@ tng_function_status tng_chain_name_of_particle_nr_get 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). @@ -1482,14 +1012,6 @@ tng_function_status tng_residue_name_of_particle_nr_get 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). @@ -1506,14 +1028,6 @@ tng_function_status tng_atom_name_of_particle_nr_get const int64_t nr, char *name, int max_len); -tng_function_status tng_atom_name_of_particle_nr_get_ - (const tng_trajectory_t tng_data, - const int64_t nr, - char *name, - int max_len) -{ - return(tng_atom_name_of_particle_nr_get(tng_data, nr, name, max_len)); -} /** * @brief Get the atom type of real particle number (number in mol system). @@ -1530,14 +1044,6 @@ tng_function_status tng_atom_type_of_particle_nr_get 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. @@ -1563,15 +1069,6 @@ tng_function_status tng_particle_mapping_add const int64_t first_particle_number, const int64_t n_particles, const int64_t *mapping_table); -tng_function_status tng_particle_mapping_add_ - (tng_trajectory_t tng_data, - const int64_t *first_particle_number, - const int64_t *n_particles, - const int64_t *mapping_table) -{ - return(tng_particle_mapping_add(tng_data, *first_particle_number, - *n_particles, mapping_table)); -} /** * @brief Read the header blocks from the input_file of tng_data. @@ -1589,11 +1086,6 @@ tng_function_status tng_particle_mapping_add_ */ tng_function_status tng_file_headers_read(tng_trajectory_t tng_data, const tng_hash_mode hash_mode); -tng_function_status tng_file_headers_read_(tng_trajectory_t tng_data, - const tng_hash_mode *hash_mode) -{ - return(tng_file_headers_read(tng_data, *hash_mode)); -} /** * @brief Write the header blocks to the output_file of tng_data. @@ -1610,12 +1102,6 @@ tng_function_status tng_file_headers_read_(tng_trajectory_t tng_data, */ tng_function_status tng_file_headers_write(tng_trajectory_t tng_data, const tng_hash_mode hash_mode); -tng_function_status tng_file_headers_write_(tng_trajectory_t tng_data, - const tng_hash_mode *hash_mode) -{ - return(tng_file_headers_write(tng_data, *hash_mode)); -} - /** * @brief Read one (the next) block (of any kind) from the input_file of tng_data. @@ -1636,13 +1122,6 @@ tng_function_status tng_file_headers_write_(tng_trajectory_t tng_data, tng_function_status tng_block_read_next(tng_trajectory_t tng_data, tng_gen_block_t block_data, const tng_hash_mode hash_mode); -tng_function_status tng_block_read_next_(tng_trajectory_t tng_data, - tng_gen_block_t block_data, - const tng_hash_mode *hash_mode) -{ - return(tng_block_read_next(tng_data, block_data, *hash_mode)); -} - /** * @brief Read one (the next) frame set, including mapping and related data blocks @@ -1659,11 +1138,6 @@ tng_function_status tng_block_read_next_(tng_trajectory_t tng_data, */ tng_function_status tng_frame_set_read_next(tng_trajectory_t tng_data, const tng_hash_mode hash_mode); -tng_function_status tng_frame_set_read_next_(tng_trajectory_t tng_data, - const tng_hash_mode *hash_mode) -{ - return(tng_frame_set_read_next(tng_data, *hash_mode)); -} /** * @brief Write one frame set, including mapping and related data blocks @@ -1679,11 +1153,6 @@ tng_function_status tng_frame_set_read_next_(tng_trajectory_t tng_data, */ tng_function_status tng_frame_set_write(tng_trajectory_t tng_data, const tng_hash_mode hash_mode); -tng_function_status tng_frame_set_write_(tng_trajectory_t tng_data, - const tng_hash_mode *hash_mode) -{ - return(tng_frame_set_write(tng_data, *hash_mode)); -} /** * @brief Create and initialise a frame set. @@ -1697,12 +1166,6 @@ tng_function_status tng_frame_set_write_(tng_trajectory_t tng_data, 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_frame_set_new_(tng_trajectory_t tng_data, - const int64_t *first_frame, - const int64_t *n_frames) -{ - return(tng_frame_set_new(tng_data, *first_frame, *n_frames)); -} /** * @brief Add a non-particle dependent data block. @@ -1735,30 +1198,6 @@ tng_function_status tng_data_block_add(tng_trajectory_t tng_data, const int64_t stride_length, const int64_t codec_id, void *new_data); -tng_function_status tng_data_block_add_(tng_trajectory_t tng_data, - const int64_t *id, - const char *block_name, - const tng_data_type *datatype, - const tng_block_type *block_type_flag, - int64_t *n_frames, - const int64_t *n_values_per_frame, - const int64_t *stride_length, - const int64_t *codec_id, - void *new_data, - int name_len) -{ - char *name = malloc(name_len + 1); - tng_function_status stat; - - strncpy(name, block_name, name_len); - name[name_len] = 0; - stat = tng_data_block_add(tng_data, *id, name, *datatype, *block_type_flag, - *n_frames, *n_values_per_frame, *stride_length, - *codec_id, new_data); - free(name); - return(stat); -} - /** * @brief Add a particle dependent data block. @@ -1796,34 +1235,6 @@ tng_function_status tng_particle_data_block_add(tng_trajectory_t tng_data, const int64_t n_particles, const int64_t codec_id, void *new_data); -tng_function_status tng_particle_data_block_add_ - (tng_trajectory_t tng_data, - const int64_t *id, - const char *block_name, - const tng_data_type *datatype, - const tng_block_type *block_type_flag, - 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, - const int64_t *codec_id, - void *new_data, - int name_len) -{ - char *name = malloc(name_len + 1); - tng_function_status stat; - - strncpy(name, block_name, name_len); - name[name_len] = 0; - stat = tng_particle_data_block_add(tng_data, *id, name, *datatype, - *block_type_flag, *n_frames, - *n_values_per_frame, *stride_length, - *first_particle_number, *n_particles, - *codec_id, new_data); - free(name); - return(stat); -} /** * @brief Write data of one trajectory frame to the output_file of tng_data. @@ -1845,15 +1256,6 @@ tng_function_status tng_frame_data_write(tng_trajectory_t tng_data, const int64_t block_id, const void *data, const tng_hash_mode hash_mode); -tng_function_status tng_frame_data_write_(tng_trajectory_t tng_data, - const int64_t *frame_nr, - const int64_t *block_id, - const void *data, - const tng_hash_mode *hash_mode) -{ - return(tng_frame_data_write(tng_data, *frame_nr, *block_id, data, - *hash_mode)); -} /** * @brief Write particle data of one trajectory frame to the output_file of @@ -1881,18 +1283,6 @@ tng_function_status tng_frame_particle_data_write(tng_trajectory_t tng_data, const int64_t val_n_particles, const void *data, const tng_hash_mode hash_mode); -tng_function_status tng_frame_particle_data_write_(tng_trajectory_t tng_data, - const int64_t *frame_nr, - const int64_t *block_id, - const int64_t *val_first_particle, - const int64_t *val_n_particles, - const void *data, - const tng_hash_mode *hash_mode) -{ - return(tng_frame_particle_data_write(tng_data, *frame_nr, *block_id, - *val_first_particle, *val_n_particles, - data, *hash_mode)); -} /** * @brief Free data is an array of values (2D). @@ -1908,15 +1298,6 @@ tng_function_status tng_data_values_free(const tng_trajectory_t tng_data, const int64_t n_frames, const int64_t n_values_per_frame, const tng_data_type type); -tng_function_status tng_data_values_free_(const tng_trajectory_t tng_data, - union data_values **values, - const int64_t *n_frames, - const int64_t *n_values_per_frame, - const tng_data_type *type) -{ - return(tng_data_values_free(tng_data, values, *n_frames, - *n_values_per_frame, *type)); -} /** * @brief Free data is an array of values (3D). @@ -1934,16 +1315,6 @@ tng_function_status tng_particle_data_values_free(const tng_trajectory_t tng_dat const int64_t n_particles, const int64_t n_values_per_frame, const tng_data_type type); -tng_function_status tng_particle_data_values_free_(const tng_trajectory_t tng_data, - union data_values ***values, - const int64_t *n_frames, - const int64_t *n_particles, - const int64_t *n_values_per_frame, - const tng_data_type *type) -{ - return(tng_particle_data_values_free(tng_data, values, *n_frames, *n_particles, - *n_values_per_frame, *type)); -} /** * @brief Retrieve non-particle data, from the last read frame set. @@ -1970,16 +1341,6 @@ tng_function_status tng_data_get(tng_trajectory_t tng_data, int64_t *n_frames, int64_t *n_values_per_frame, tng_data_type *type); -tng_function_status tng_data_get_(tng_trajectory_t tng_data, - const int64_t *block_id, - union data_values ***values, - int64_t *n_frames, - int64_t *n_values_per_frame, - tng_data_type *type) -{ - return(tng_data_get(tng_data, *block_id, values, n_frames, - n_values_per_frame, type)); -} /** * @brief Read and retrieve non-particle data, in a specific interval. @@ -2011,19 +1372,6 @@ tng_function_status tng_data_interval_get(tng_trajectory_t tng_data, union data_values ***values, int64_t *n_values_per_frame, tng_data_type *type); -tng_function_status tng_data_interval_get_(tng_trajectory_t tng_data, - const int64_t *block_id, - const int64_t *start_frame_nr, - const int64_t *end_frame_nr, - const tng_hash_mode *hash_mode, - union data_values ***values, - int64_t *n_values_per_frame, - tng_data_type *type) -{ - return(tng_data_interval_get(tng_data, *block_id, *start_frame_nr, - *end_frame_nr, *hash_mode, values, - n_values_per_frame, type)); -} /** * @brief Retrieve particle data, from the last read frame set. @@ -2056,18 +1404,6 @@ tng_function_status tng_particle_data_get(tng_trajectory_t tng_data, int64_t *n_particles, int64_t *n_values_per_frame, tng_data_type *type); -tng_function_status tng_particle_data_get_(tng_trajectory_t tng_data, - const 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) -{ - return(tng_particle_data_get(tng_data, *block_id, values, n_frames, - n_particles, n_values_per_frame, type)); -} - /** * @brief Read and retrieve particle data, in a specific interval. @@ -2105,21 +1441,6 @@ tng_function_status tng_particle_data_interval_get(tng_trajectory_t tng_data, int64_t *n_particles, int64_t *n_values_per_frame, tng_data_type *type); -tng_function_status tng_particle_data_interval_get_(tng_trajectory_t tng_data, - const int64_t *block_id, - const int64_t *start_frame_nr, - const int64_t *end_frame_nr, - const tng_hash_mode *hash_mode, - union data_values ****values, - int64_t *n_particles, - int64_t *n_values_per_frame, - tng_data_type *type) -{ - return(tng_particle_data_interval_get(tng_data, *block_id, *start_frame_nr, - *end_frame_nr, *hash_mode, values, - n_particles, n_values_per_frame, - type)); -} /** @brief Get the date and time of initial file creation in ISO format (string). * @param tng_data is a trajectory data container. @@ -2129,11 +1450,6 @@ tng_function_status tng_particle_data_interval_get_(tng_trajectory_t tng_data, */ tng_function_status tng_time_get_str(const tng_trajectory_t tng_data, char *time); -tng_function_status tng_time_get_str_(const tng_trajectory_t tng_data, - char *time, int64_t str_len) -{ - return(tng_time_get_str(tng_data, time)); -} #ifdef __cplusplus |