Skip to content
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

PDBWriter uses first character of segid as chainID instead of the last as written in the documentation #2224

Open
capslockwizard opened this issue Mar 20, 2019 · 0 comments

Comments

@capslockwizard
Copy link

commented Mar 20, 2019

Expected behavior
When writing out a PDB file with MDAnalysis, the chains IDs in the PDB file are taken from the last character of the segid as documented here.

Actual behavior
Instead, the first character from segid is used as the chain ID in PDB files. From the source:

vals['chainID'] = segids[i][:1]

Code to reproduce the behavior

import MDAnalysis as mda
from MDAnalysis.tests.datafiles import PSF, DCD,  GRO, PDB, TPR, XTC, TRR,  PRMncdf, NCDF

u = mda.Universe(PSF, DCD)
u.write('test.pdb')

Current version of MDAnalysis

  • Which version are you using? 0.19.2
  • Which version of Python (python -V)? 2.7.15
  • Which operating system? Ubuntu 16.04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.