-
Notifications
You must be signed in to change notification settings - Fork 824
Closed
Description
Expected behavior
I can round-trip chainID information from files.
Actual behavior
ChainIDs get overwritten by SegmentIDs, even though the latter is not actually in the original PDB specification. Because the default segment name is "system", this also means that the default chainID is "M" and that's kind of weird.
Code to reproduce the behavior
>>> import MDAnalysis as mda
>>> from MDAnalysis.tests.datafiles import PDB
>>> u = mda.Universe(PDB)
>>> u.atoms.chainIDs = "x"
>>> u.atoms.write("chain_x.pdb")
>>> u = mda.Universe("chain_x.pdb")
>>> u.atoms.chainIDs
array(['M', 'M', 'M', ..., 'M', 'M', 'M'], dtype=object)And converting it to RDKit and using that to write it out ends up with weird spacing. :(
Current version of MDAnalysis
- Which version are you using? (run
python -c "import MDAnalysis as mda; print(mda.__version__)") current develop - Which version of Python (
python -V)? - Which operating system?
Reactions are currently unavailable