Bug #1252
residual ids and atomIDs
Description
In my testss I noticed that sometimes atoms are not written (or read)
in the same order as they are added to a residual. Moreover, I cannot specify atomIDs or
residual IDs when I add them.
It was also not able to correct for the permutations in some of the residuals by
adding a corresponding mapping in the trajectory data block (usigng mapping 1 to
n_particles works but does not correct for the API-permutations
and specifying a mapping which would link the positions to the correct particles i.e.
numbers from 1:n_particles with appropriate permutations where necessary produced a segfault.)
I also encountered a problem, when I tried to find a workaround for it:
I just called the API and added the molecules and checked for the permutations in the particles and returned
these permutations.
Then I reordered the positions accordingly and called the API again for writing which ?roduced a segfault, although
the same call without the previous call (which just checks for the permutations) does not produce a sergfault.
History
#1 Updated by Magnus Lundborg almost 8 years ago
I have noticed the fact that you cannot add IDs when adding atoms and residues, and it's mentioned in the code of these functions that it should be fixed. I have been reluctant to change the API since it's supposed to be stable, but there are two options:
1) Change the API (breaking your code).
2) Add new functions to the API allowing specifying IDs as well.
What would be the best for you?
I will look into the problem with varying order of atoms and the segfaults as well. I might contact you for more information on how to reproduce it later on.
#2 Updated by Christoph Bernau over 7 years ago
Hi Magnus,
yes, I have noticed that you are aware of the problem and that you have noted it in the code.
I would probably prefer solution number 2.
Best,
Christoph
#3 Updated by Magnus Lundborg over 7 years ago
There are now new functions for adding molecules, residues, chains and atoms with specific IDs. They're called e.g. tng_molecule_w_id_add. Please see if this solves your other problem as well.
#4 Updated by Magnus Lundborg over 7 years ago
- Status changed from New to Feedback wanted