Pymol superimposition by python script
0
0
Entering edit mode
22 months ago
iamsmor • 0

Hello everyone

I tried to superimpose two protein which I have their pdb id. And I need to print it as png. I would like to do it py python script. I am not good at python. I will be grateful for any help.

Thank you

python superimposition pymol • 1.9k views
ADD COMMENT
1
Entering edit mode

You aren't providing much information about what you've already tried or your current level and familiarity with the software and steps involved here. Are you already familiar with the doing that process via PyMOL's graphical user interface? Have you run any scripts in PyMOL? PyMOL also has its own scripting language that can do this. Have you used those type of scripts in PyMOL? There's several algorithms in PyMOL for superposition. Do you already know which one you prefer. There's also aligners separate from PyMOL, such as TM-align, that often do the superposition task easier than what is available in PyMOL. Then you can use PyMOL to make the image with the PDB file that TM-align makes.

If you go here and press launch binder and then when the session spins up choose 'Determine residues that match to a reference from multiple sequence alignment and use to construct fit commands' from the available Jupyter notebooks, you'll see one of the examples is taking a multiple sequence alignment and using it as a guide to tell which residue pairs to feed PyMOL's pair_fit command for the two structures. (Accessing the Jupyter notebook file via that way let's you start adapting it to your own use; however, the static version is available here for perusal.) This is just one example of what is involved in sort of the upstream steps of what you are trying to do. (And often you don't need the precise control as that particular example demonstrates.) But it the process it covers some of the things I asked you about and links to resources about them, and so you may find it helpful.

ADD REPLY
0
Entering edit mode

Thank you so much for your replying. Yes I know some on the pymol graphical interface but I will try to image superimposition cartoon on the html. So I need set some dynamic script by python. At the first I am trying two protein 6UFO and 4XMB for superimpose and show as png or whatever visualization that I can do. I check your link it seem complicated page but I need something less complicated tutorial for dummies like me

ADD REPLY
1
Entering edit mode

If you are trying to animate between states and have a cartoon show up in HTML, you may be better off using Jmol/ JSmol. See Proteopedia's Morphs page. (This page I made at Proteopedia illustrates a result morphing between two conformations. Give it a few seconds to load and note that you can click on the structure and drag it to see it from different perspectives as it continues to transition between the two states.)
Related to that, the Jmol/ JSmol 'compare' command , see here, has an optional parameter you can add that does the superposition spread out over the amount of seconds you specify, see here, in particular the description of compare {2.1} {1.1} ROTATE TRANSLATE 2.0. The viewer makes the animation itself as it moves the one molecule to superimpose on the other. I can point you to a demonstration of use of that command. Go to this page at Proteopedia on LepA, the ribosomal back translocase. Give it a few seconds to load in the structure and javascript for the viewer. You should see a molecule in the viewer on the right side. In the main pane you should see a gray box listing the Contents, click on '2.2 LepA and EF-G Are Similar' and it will scroll you down the page automatially. (This link should take you there if you are having trouble finding it, but it will reload the the page so the viewer will need time to reload again.) To get ready for the 'compare' command to run click on the green text you now see near the top that says 'The high degree of sequence similarity between LepA and EF-G is reflected in the structural similarity between the individual homologous domains of LepA and EF-G'. That will place two different structures side by side in the viewer to the right. Be patient as it may take a few seconds to load. Now click on the green text link that says 'Compare LepA and Ef-G' to initiate the compare command with a time setting. You'll notice LepA slides on over to cover EF-G. You can click 'popup' from under the viewer to get a window you can resize to better drag around the structure in a larger view window. Now back in the About the Structure pane, click the green text link 'Unsuperimpose' and in the small viewer , you'll see the protein LepA slide back to where it was. If you had the 'popup' open, click on 'Update' in the bottom left side to see the view update to the current one. Sadly, because of the way it is currently set up, you won't see the animation run in the 'popup' window, but you can always make a different HTML implementation with larger main viewer where the animation would run. (Even at the Proteopedia page, the size of the viewer could be enlarged, for example this Gal4 page has a larger view pane on the right.) You may want to repeat that cycle a few times, and drag the structure in the viewer as you do, noting you can turn it around to get different perspectives while the two proteins move apart and then back. Plus, you can throw in clicking the green scene link text 'Color LepA and Ef-G differently', too. Try hitting 'toggle quality' in the popup.

ADD REPLY
0
Entering edit mode

thank you very muchi its looking fancy

ADD REPLY

Login before adding your answer.

Traffic: 2630 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6