Expected behaviour
When I use ag.write('foo.pdb') I expect the atom ids to be the same as in the AtomGroup
Actual behaviour
The atom ids's always start from 0.
Code to reproduce the behaviour
import MDAnalysis as mda
from MDAnalysisTests.datafiles import PDB
u = mda.Universe(PDB)
bb = u.select_atoms('backbone')
bb.write('foo.pdb')
u2 = mda.Universe('foo.pdb')
assert np.all(bb.ids == u2.atoms.ids)
Currently version of MDAnalysis:
(run python -c "import MDAnalysis as mda; print(mda.__version__)")
develop branch