Structural inconsistencies, at least partially related to traj length

26 views
Skip to first unread message

Jason Held

unread,
Oct 31, 2023, 2:41:01 PM10/31/23
to MDnalysis discussion
Hi folks,

I'm am running into an issue with a homopentameric protein plus membrane system (GROMACS) that I can't troubleshoot, and would appreciate any thoughts on how to fix this or if you've seen this issue before. I observe it using the newest MDAnalysis version 2.6.1, but I also observed it in version ~2.2 before I upgraded hoping it'd fix the problem, but it didn't.

The issue(s) are that I am seeing residues are in quite different positions in when viewing the same frame in NGLview versus writing the frame to a PDB, and there is also a difference in the structure depending on how many trajectories are loaded. For example when I load a single trajectory (1e6 steps/traj), the first frame looks correct based on my knowledge of the starting structure using NGLview. This is the center picture below, with a 'symmetrical' orientation of 5 important methionines highlighted in red at the center in an ion channel.

Screenshot 2023-10-31 at 1.10.29 PM.png
But, I am seeing two inconsistencies that worry me. 

1: if I save this same exact frame as a pdb with MDAnalysis using 'write', I get a 'wonky' orientation when I open it in chimera (image on the left), with a single red Met that is no longer symmetrical whatsoever. So, I am concerned by NGLview looks different than the pdb for the exact same frame.

2: I also get this same 'wonky', orientation of 1 methionine if I load up and concatenate 29 additional continuation trajectories after the first one using NGLview, which is the image on the right. So, I am concerned why the same frame looks different in NGLview depending on how many trajectories are loaded. If I 'write' this frame to PDB it also looks also wonky in Chimera

I cannot fix this issue using on-the-fly transformations like unwrap, it occurs whether or not I use a pdf, psf, or gro file as the starting structure for the universe, and it happens whether or not I try to adjust the pbc using GROMAC's trjconvert prior to making a universe in MDAnalysis.

And, there is one last wrinkle that is very confusing to me... If I export the 'single' trajectory (with a wonky pdb export but correct NGLView), or the concatenation of 30 trajectories (both wonky PDB and wonky NGLViews) from MDAnalysis and then load it with mdtraj, the atoms/structure traj look totally correct in mdtraj. And, mdtraj will export a pdb that also looks correct. In short, MDAnalysis doesn't appear to corrupting things, but I am sure having a hard time believing that based on the analyses above and am concerned about moving forward with it.

So, I'm looking for ideas about why MDAnalysis is consistently exporting a wonky PDB structure, and about the inconsistencies I observe with the same frame with NGLviewer depending on traj length, and what anyone might suggest to troubleshoot this since I really like MDAnalysis for analysis, but I want to be confident the underlying data is accurate.

Cheers,
Jason

Hugo Macdermott-Opeskin

unread,
Oct 31, 2023, 7:29:13 PM10/31/23
to MDnalysis discussion
Hi Jason, 

So we can help you better would you be able to share your code that you are using to  save your pdb's and load using NGLView?

Cheers, 

Hugo

Jason Held

unread,
Nov 1, 2023, 10:41:12 AM11/1/23
to MDnalysis discussion
Happy to, and if this doesn't spark any ideas I can make a shorter traj suitable for uploading to see if it happens on another setup.

To make a PDB of the first frame, I do this using write:

    u.trajectory[0]
    selectAtoms = u.select_atoms("all")
    selectAtoms.write(str(name + "_allAtoms_firstFrame.pdb"))

To view with NGL viewer i do this:

    view = nv.show_mdanalysis(u.select_atoms('protein'))
    view.background = 'black'
    view.camera = 'orthographic'
    view.add_ball_and_stick("296", color='red')view

Jason Held

unread,
Nov 1, 2023, 10:42:44 AM11/1/23
to MDnalysis discussion
Sorry, that last 'view' should be alone on the last line, but there was a formatting hiccup.
Reply all
Reply to author
Forward
0 new messages