summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMagnus Lundborg <lundborg.magnus@gmail.com>2013-11-14 09:59:30 (GMT)
committerMagnus Lundborg <lundborg.magnus@gmail.com>2013-11-14 09:59:30 (GMT)
commit746d750f60a96823acf36c56eb1d7ff0fcc31594 (patch)
tree7ba07a2071dafcd5b1d216f965beee8e572b20af /src
parent8f41d618d43d312a5cea5c14044b0bcab86f8037 (diff)
Minor fixes in tng_implicit_num_particles_set().
Diffstat (limited to 'src')
-rw-r--r--src/lib/tng_io.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c
index d7c8b8b..0c72642 100644
--- a/src/lib/tng_io.c
+++ b/src/lib/tng_io.c
@@ -9716,6 +9716,9 @@ tng_function_status DECLSPECDLLEXPORT tng_implicit_num_particles_set
printf("particle count.\n");
printf("TNG library: Cannot set implicit particle count. %s: %d\n",
__FILE__, __LINE__);
+ /* FIXME: Should we set the count of all other molecules to 0 and add
+ * implicit molecules? */
+ return(TNG_FAILURE);
}
if(diff > 0)
@@ -9741,7 +9744,7 @@ tng_function_status DECLSPECDLLEXPORT tng_implicit_num_particles_set
{
return(stat);
}
- tng_residue_atom_add(tng_data, res, "", "", &atom);
+ stat = tng_residue_atom_add(tng_data, res, "", "", &atom);
}
else
{
@@ -9758,11 +9761,11 @@ tng_function_status DECLSPECDLLEXPORT tng_implicit_num_particles_set
}
diff /= mol->n_atoms;
}
- tng_molecule_cnt_set(tng_data, mol, diff);
+ stat = tng_molecule_cnt_set(tng_data, mol, diff);
}
}
- return(TNG_SUCCESS);
+ return(stat);
}
tng_function_status DECLSPECDLLEXPORT tng_num_particles_get
contact: Jan Huwald // Impressum