summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Lundborg <lundborg.magnus@gmail.com>2013-08-22 09:09:17 (GMT)
committerMagnus Lundborg <lundborg.magnus@gmail.com>2013-08-22 09:09:17 (GMT)
commit3a1c70fbf2d7740d4d16c55bc2d92ad619229bad (patch)
treed4a287a3d5c4c2e6689bbf38f32cb6195a4b3c48
parent456809f7db953a7e992e9353b74112f9cad79f3d (diff)
Added tng_molecule_find_ to Fortran API
-rw-r--r--src/lib/tng_io.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c
index e3a50f6..d2b5acb 100644
--- a/src/lib/tng_io.c
+++ b/src/lib/tng_io.c
@@ -14623,6 +14623,22 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_set_(tng_trajectory_t tng
return(tng_molecule_cnt_set(tng_data, molecule, *cnt));
}
+tng_function_status DECLSPECDLLEXPORT tng_molecule_find_(tng_trajectory_t tng_data,
+ const char *name,
+ int64_t nr,
+ 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_find(tng_data, n, id, molecule);
+ free(n);
+ return(stat);
+}
+
tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_find_(tng_trajectory_t tng_data,
tng_molecule_t molecule,
const char *name,
contact: Jan Huwald // Impressum