-
Notifications
You must be signed in to change notification settings - Fork 635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gromacs TPR file u.atoms.ids
starts from 0
#4450
Comments
Interesting, I thought this was already fixed with #2364 @lilyminium as the person who implemented the original fix, could you weigh in here please? |
@IAlibay I don't think that atomids were addressed #2364, which was about resids. @HankewieDanke GROMACS TPR files internally number from zero, as you can see with
Therefore, we make these atom indices available "as is". In #2364 we had a long discussion that for resids we make the 1-based indices available. I think you're suggesting to do the same for atom ids. Notes
@lilyminium @jbarnoud @IAlibay (and anybody else) do we want to also make |
Thank you for the responses. Still to me this behavior seems misleading, as human readable GMX files start from one. I came upon this, while preparing plumed files. Which also start atom ids from one (just to add an other example). |
Expected & actual behavior
Within GROMACS TPR files the atom ids are continuous and starting from 1 (as far as I am aware -- that is the way it works in gromacs index files at least).
When reading in a
mda.Universe('*.tpr')
, I would expect atom ids starting from 1 as well.Instead they start from 0 -- reflecting the
u.atom.indices
.While not necessarily a breaking bug, this is something that would improve user experience/ prevent errors when forgetting adding 1 to the atom ids when reading in tpr files.
Code to reproduce the behavior
Current version of MDAnalysis
python -c "import MDAnalysis as mda; print(mda.__version__)"
)Version 2.4.2 (This issue is not mentioned in release notes since 2.4.2)
python -V
)?3.10.8
Linux (ubuntu)
The text was updated successfully, but these errors were encountered: