I would like to extract one chain from my molecular dynamics trajectory (xtc file) using MDAnalysis. I expected it to be very simple, but an error occurred and I am not sure why I am getting it. Here is the code:
import MDAnalysis as mda
u = mda.Universe('trajectory1.xtc')
protein = u.select_atoms('segid A')
protein.write('trajectory1-A.xtc')
And it returns error: AttributeError: AtomGroup has no attribute segids
On MDAnalysis page, "segid" is used with ".select_atoms". Is the problem that I have trajectory file and not classic PDB file?