[chimerax-users] Pymol view
Rechiche, Othman
othman.rechiche at psu.edu
Fri Jun 24 12:53:08 PDT 2022
Thank you Tom and Elaine for your replies.
Best Regards,
Othman
> On Jun 23, 2022, at 9:31 PM, Tom Goddard <goddard at sonic.net> wrote:
>
> Hi Othman,
>
> The PyMol cmd.set_view() function
>
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpymolwiki.org%2Findex.php%2FSet_View&data=05%7C01%7Cothman.rechiche%40psu.edu%7Ca26282fe7b9345f10e4808da5581317e%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637916310627493301%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qOZbsBH1oUq1TVoEJyZi01T143gJ0ZCSPBOGNnkjWBo%3D&reserved=0
>
> uses a bit different parameters than ChimeraX to specify the camera position for viewing the models. ChimeraX uses a 3 by 3 rotation matrix about 0,0,0 followed by a translation that maps the camera coordinates to the scene coordinates (12 parameters). The PyMol documentation says its 3x3 rotation maps model to camera axes. If model PyMol model coordinates means the same thing as ChimeraX scene coordinates then that rotation is the inverse of what ChimeraX uses. But the inverse of a rotation matrix is just the transpose so that just rearranges the numbers. PyMol uses two origins (model rotation center and camera rotation center) and it will take some math to convert that to the single translation ChimeraX uses. The rotation matrix will need to be applied in a specific way to get the translation ChimeraX needs. I could guess the conversion equations from the PyMol documentation but it would require testing in both programs to get it right. PyMol also specifies the clip planes that can be set in ChimeraX with its clip command. Also the camera field of view will have to match to get the same view. I don't know how you get that from PyMol. The camera command in ChimeraX gets and sets horizontal field of view (default 30 degrees).
>
> Tom
>
>
>> On Jun 23, 2022, at 5:27 PM, Elaine Meng via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>>
>> Hi Othman,
>> Thank you for the clarification! Maybe I can provide a better answer, then:
>>
>> ChimeraX can report (or set) model positions with the "view matrix" command. So if you can output the matrix information from Pymol (with the get_view command shown in the page you sent), then you can use it in ChimeraX with this command. However, you may need to rearrange the numbers if the matrix format has them in a different order. For how it is interpreted, see:
>> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Frbvi.ucsf.edu%2Fchimerax%2Fdocs%2Fuser%2Fcommands%2Fview.html%23matrix&data=05%7C01%7Cothman.rechiche%40psu.edu%7Ca26282fe7b9345f10e4808da5581317e%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637916310627493301%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2FM0FJ8b9hnwT2rVpR9ohv2m%2B5mDgoBwZIyU%2B1E7t6fg%3D&reserved=0>
>>
>> Similarly, Chimera can set model positions with matrices in a file, using Chimera command "matrixset" (as well as write matrices to a file with "matrixget"):
>> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fchimera%2Fdocs%2FUsersGuide%2Fmidas%2Fmatrixset.html&data=05%7C01%7Cothman.rechiche%40psu.edu%7Ca26282fe7b9345f10e4808da5581317e%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637916310627493301%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=lBFhK4nKfhQMkDu12UgQwDRVIrBPPUCygYIdRF7hVMY%3D&reserved=0>
>>
>> I hope this helps,
>> Elaine
>> -----
>> Elaine C. Meng, Ph.D.
>> UCSF Chimera(X) team
>> Department of Pharmaceutical Chemistry
>> University of California, San Francisco
>>
>>
>>>> On Jun 23, 2022, at 5:01 PM, Rechiche, Othman via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>>>
>>> Hi Elaine,
>>> Thank you for your reply.
>>>
>>> I want to keep the matrix coordinates from a view (as from https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpymolwiki.org%2Findex.php%2FSet_View&data=05%7C01%7Cothman.rechiche%40psu.edu%7Ca26282fe7b9345f10e4808da5581317e%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637916310627493301%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qOZbsBH1oUq1TVoEJyZi01T143gJ0ZCSPBOGNnkjWBo%3D&reserved=0) and use them in ChimeraX.
>>> Yes views are in a PyMol session.
>>> ChimeraX displays coordinates in a single line not as matrix.
>>>
>>> I will look at the links you sent.
>>>
>>> Thank you again.
>>>
>>> Best Regards,
>>> Othman
>>>
>>>> On Jun 23, 2022, at 6:33 PM, Elaine Meng <meng at cgl.ucsf.edu> wrote:
>>>>
>>>> Of course, one can change the display styles, colors, etc. directly in ChimeraX (or Chimera). But you are probably asking because you are more familiar with Pymol, or somebody else has given you Pymol sessions.
>>>>
>>>> In case you would like to try setting up the view directly in ChimeraX, there are several example images and associated ChimeraX command scripts (.cxc files):
>>>> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fchimerax%2Fgallery.html&data=05%7C01%7Cothman.rechiche%40psu.edu%7Ca26282fe7b9345f10e4808da5581317e%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637916310627493301%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2Bs0OLIqIrCTOkEul7TxBrIRlXzAcCK9AGVu4zGypHUU%3D&reserved=0>
>>>> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fchimerax%2Ffeatures.html&data=05%7C01%7Cothman.rechiche%40psu.edu%7Ca26282fe7b9345f10e4808da5581317e%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637916310627493301%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=w65E%2F9GYPxnFUw6V%2BeYxZk3pgI68HrytU1BQwai87Ok%3D&reserved=0>
>>>>
>>>> ...as well as ChimeraX tutorials:
>>>> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fchimera%2Fdocs%2FUsersGuide%2Fframetut.html&data=05%7C01%7Cothman.rechiche%40psu.edu%7Ca26282fe7b9345f10e4808da5581317e%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637916310627493301%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=l8XpGNu%2FnqYmsFFQyJFBq48tst4xomJmqvrYBfEY4ZA%3D&reserved=0>
>>>> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fchimerax%2Ftutorials.html&data=05%7C01%7Cothman.rechiche%40psu.edu%7Ca26282fe7b9345f10e4808da5581317e%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637916310627493301%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ouuFJzaqkJ7sl9u8Ap1iEhBXCzvL8nPb%2BGe%2FjPoxGOA%3D&reserved=0>
>>>>
>>>> There are also many Chimera tutorials:
>>>> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fchimera%2Ftutorials.html&data=05%7C01%7Cothman.rechiche%40psu.edu%7Ca26282fe7b9345f10e4808da5581317e%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637916310627493301%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2Fdk46%2BAMUYnx0XnpvxFjgl4OG2OSZLmxIFHfy8%2BT1sU%3D&reserved=0>
>>>>
>>>> Best,
>>>> Elaine
>>>>
>>>>
>>>>> On Jun 23, 2022, at 1:27 PM, Elaine Meng <meng at cgl.ucsf.edu> wrote:
>>>>>
>>>>> Hi Othman,
>>>>> Sorry no, Chimera and ChimeraX cannot read Pymol session files. By "view" I'm guessing you mean colors, display styles, etc. If you meant only the orientation of the structure, maybe Pymol has an option to save a PDB file of the currently transformed coordinates, which could then be opened in Chimera or ChimeraX, but that still would not include the exact amount of zoom.
>>>>>
>>>>> If somebody else has created a converter for Pymol session -> Chimera (or ChimeraX) session, we are not aware of it.
>>>>>
>>>>> Best Regards,
>>>>> Elaine
>>>>> -----
>>>>> Elaine C. Meng, Ph.D.
>>>>> UCSF Chimera(X) team
>>>>> Department of Pharmaceutical Chemistry
>>>>> University of California, San Francisco
>>>>>
>>>>>> On Jun 23, 2022, at 11:27 AM, Rechiche, Othman via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>>>>>>
>>>>>> Hi everyone,
>>>>>> Is there a way to import/open “views” set with PyMol and open them in Chimera or ChimeraX?
>>>>>> Best Regards,
>>>>>> Othman
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> ChimeraX-users mailing list
>>> ChimeraX-users at cgl.ucsf.edu
>>> Manage subscription:
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fmailman%2Flistinfo%2Fchimerax-users&data=05%7C01%7Cothman.rechiche%40psu.edu%7Ca26282fe7b9345f10e4808da5581317e%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637916310627493301%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VSjSJVJkQE8HWpSLnWQOLjLS1lRoeA1ynWOlTMiAGAs%3D&reserved=0
>>
>>
>> _______________________________________________
>> ChimeraX-users mailing list
>> ChimeraX-users at cgl.ucsf.edu
>> Manage subscription:
>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fmailman%2Flistinfo%2Fchimerax-users&data=05%7C01%7Cothman.rechiche%40psu.edu%7Ca26282fe7b9345f10e4808da5581317e%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637916310627493301%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VSjSJVJkQE8HWpSLnWQOLjLS1lRoeA1ynWOlTMiAGAs%3D&reserved=0
>>
>
More information about the ChimeraX-users
mailing list