|
From: Yang Su <su...@cr...> - 2019-08-24 04:09:44
|
Hello, I'm exploring ways to show multiple overlapping peptides on a protein structure (see the picture below for an example). Being able to show overlapping peptides all at once on structure is highly desirable in the field of hydrogen-deuterium exchange mass spectrometry and may be useful in other fields, too, but I don't know any structure visualization program capable of doing that. I'll explain how I made the example picture and the problems/pitfalls with that approach, and would like to hear your suggestions for how to improve or alternative approaches. Example picture: https://pymolwiki.org/index.php/File:Overlapping_peptides.png [image: email.png] What I've done was to first "de-overlap" the peptides, i.e., to sort the peptides into separate groups so that every group contains non-overlapping peptides only. Each group of non-overlapping peptides was then shown in the usual way on a "track". From pymol's perspective, a track is really just an ordinary structure (only backbone atoms, no sidechains); the coordinates of the backbone atoms are carefully offset from the real structure of the protein, so that when all the tracks are displayed, they look like forming an integral structure --- and this is where things get hacky: 1) I need to know the orientation-/normal-/tangent-vectors that pymol uses to draw secondary structure elements. Those vectors are calculated from atomic coordinates in pymol. With them I can back-calculate the coordinates of each track's atoms such that when pymol reads these coordinates and displays as cartoon, the secondary structure elements align nicely across all tracks and the final result looks like one integral structure. The problem is pymol does not provide APIs to get those vectors, so I ended up having to duplicate the relevant logic from pymol's source code (layer2/RepCartoon.cpp) in my code to calculate those vectors. And that made my code tied to a specific version of pymol, neither forward- nor backward-compatible. Whenever pymol changes the way those vectors are calculated, my code breaks. 2) With how pymol calculates those vectors (~November 2018), there are corner cases where the conversion between atomic coordinates and those vectors are not easily reversible (for some beta-strands), which caused ugly twists in some tracks. 3) Because the atoms in the tracks are offset from the real structure in different directions, by different amounts, to make the cartoon look nice, the distances between bonding atoms often became longer, and I had to increase 'connect_cutoff' to keep them connected, which sometimes screwed up other parts of the structure. 4) For large structures with many tracks, the number of atoms that pymol needs to handle becomes huge, and the impact to performance and file size is appreciable. So, the above summarized my current effort, which mostly works, although with its many pitfalls/drawbacks. As I said, I'm looking forward to suggestions, alternatives, or any other ways to approach the central problem: to display overlapping peptides on a structure. Thank you, Yang |