mdanalysis
mdanalysis copied to clipboard
Chain ID not detected in DCD and PDB files created with VMD
I am analysing a VMD-generated trajectory to calculate inter-residue interactions, and MDAnalysis is unable to recognize the chainID despite it being present in these files.
Somehow, the segid is being detected and can be used for selections. <universe>.segments.chainIDs does not generate the list of chains present, as expected. Is there any way to resolve this issue?
Hi @biomolsim , could you please provide a PDB file that reproduces this error along with your expected results?
With standard PDB files, the chains are recognized automatically (with MDA 2.9.0):
In [1]: !curl https://files.rcsb.org/download/4E43.pdb.gz -O
In [2]: u = mda.Universe("./4E43.pdb.gz")
In [3]: u.atoms.chainIDs
Out[3]: array(['A', 'A', 'A', ..., 'B', 'B', 'C'], shape=(1877,), dtype=object)
(and u.segments.chainIDs also works for my example).
We need to see your PDB file (or at least a part with ATOM records) to see what it looks like and how it is formatted.
Without further information there's not much more we can do. Please feel free to re-open the issue.