Question: Problem with Pymol's orient function in certain cases
gravatar for Yuval
4.1 years ago by
European Union
Yuval0 wrote:

Hey! This question has been asked in one way or another a couple of times, so I'll try to be specific.

I need to write a Pymol script to generate an image of a protein-peptide complex, focusing on the peptide showing its details. Generally, Pymol should be able to get a correct view of the peptide by using `orient peptide` (where `peptide` is naturally my peptide object). On some cases, though, it fails, and while the peptide might be aligned with the view, it's partially or completely obscured by the receptor molecule. This is because Pymol's `orient` chooses the shortest camera rotation in needs in order to align it with the main axes of the peptide. It doesn't appear to be taking account on the line of view from the camera to the peptide. By rotating the image manually, I am able to run `orient` again and get a better view.

I am constrained to Pymol as my script is supposed to run as part of a larger framework which relies on Pymol.

I tried a couple of ways to "force" Pymol to choose the better angle myself, but none worked.

My thought was to either calculate the moment matrix myself, or, probably simpler, after orienting, choosing the better side by passing a line between the camera and the different peptide residues, and seeing whether certain 90 degree rotations might reveal more of the peptide.

Before I do so, I wanted to ask and see whether someone already did this?



P.S. I know of these related questions:


EDIT: here's an example of a problematic image

fetch 2hle
extract receptor, chain A
extract peptide, chain B and resi 119-125
hide everything
show surface, receptor
color white, receptor
show sticks, peptide
hide (peptide and hydro)
util.cbac peptide
orient peptide


pdb pymol orient generate image • 2.0k views
ADD COMMENTlink modified 4.1 years ago by Biostar ♦♦ 20 • written 4.1 years ago by Yuval0

Would any 90 degree rotations fix your example above? It seems to me that many more rotations would need to be tested. 

At first this sounded like a niche use case, but it seems like any software that has to focus on a ligand binding site would want to optimize this view.

ADD REPLYlink written 4.1 years ago by Keith Callenberg890
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1584 users visited in the last hour