[chimerax-users] 2D plots and graphs for protein-ligand interactions

Tom Goddard goddard at sonic.net
Fri Sep 9 10:40:42 PDT 2022


Not sure why you are installing ChimeraX on Ubuntu 20.04 with a different command from the instructions on the download page.

	sudo apt-get install ~/Downloads/chimerax-daily.deb

Maybe that is the cause of the error you are getting about the post-installation script failing

	"installed ucsf-chimerax-daily package post-installation script subprocess returned error exit status 70"

  Tom



> On Sep 9, 2022, at 1:07 AM, Enrico Martinez <jmsstarlight at gmail.com> wrote:
> 
> Thank you Tom!
> Actually I faced the problem with the installation of the chimerax-daily on the ubuntu-20.04 
> (currently I am using the 1.4 version realized in june 2022). Here is the error of the installation:
> 
> root at Perfetto-7920-Tower:/home/enrico/Downloads# dpkg -i ./chimerax-daily.deb
> (Reading database ... 322925 files and directories currently installed.)
> Preparing to unpack ./chimerax-daily.deb ...
> Deregister desktop menu and associated mime types
> Remove Python cache files
> Unpacking ucsf-chimerax-daily (2022.09.08ubuntu20.04) over (2022.09.08ubuntu20.04) ...
> Setting up ucsf-chimerax-daily (2022.09.08ubuntu20.04) ...
> Install desktop menu and associated mime types
> Traceback (most recent call last):
>   File "/usr/lib/ucsf-chimerax-daily/lib/python3.9/site-packages/chimerax/core/__main__.py", line 724, in init
>     run(sess, cmd)
>   File "/usr/lib/ucsf-chimerax-daily/lib/python3.9/site-packages/chimerax/core/commands/run.py", line 38, in run
>     results = command.run(text, log=log, return_json=return_json)
>   File "/usr/lib/ucsf-chimerax-daily/lib/python3.9/site-packages/chimerax/core/commands/cli.py", line 2897, in run
>     result = ci.function(session, **kw_args)
>   File "/usr/lib/ucsf-chimerax-daily/lib/python3.9/site-packages/chimerax/linux/cmd.py", line 23, in linux_xdg_install
>     install(session, verbose=verbose, system=system)
>   File "/usr/lib/ucsf-chimerax-daily/lib/python3.9/site-packages/chimerax/linux/_xdg.py", line 428, in install
>     generate(session, info, system, verbose)
>   File "/usr/lib/ucsf-chimerax-daily/lib/python3.9/site-packages/chimerax/linux/_xdg.py", line 421, in generate
>     from chimerax.core import localized_app_name
> ImportError: cannot import name 'localized_app_name' from 'chimerax.core' (/usr/lib/ucsf-chimerax-daily/lib/python3.9/site-packages/chimerax/core/__init__.py)
> dpkg: error processing package ucsf-chimerax-daily (--install):
>  installed ucsf-chimerax-daily package post-installation script subprocess returned error exit status 70
> Processing triggers for man-db (2.9.1-1) ...
> Errors were encountered while processing:
>  ucsf-chimerax-daily
> 
> 
> Il giorno ven 9 set 2022 alle ore 00:07 Tom Goddard <goddard at sonic.net <mailto:goddard at sonic.net>> ha scritto:
> Hi Enrico,
> 
>   As Elaine says, ChimeraX isn't a plotting package, so it doesn't let you set colors, sizes, scales, ..., of plots.  You could save the plot ChimeraX makes with Python, but I don't think it is very useful to do in an automated way because the aspect ratio of the plot will probably be poor and you cannot control it in a script.  At any rate, for reference here is Python that would save the image
> 
> from chimerax.core.commands import run
> plot = run(session, 'crosslinks histo #1.1')
> plot.save_plot('histogram.png')
> 
> This will need a September 9, 2022 or newer daily build because I just made the "crosslinks histogram" command return the plot, before it did not return it.
> 
>   The figures in the paper were made interactively in ChimeraX on a high resolution display and just a screen capture was used to save an image.  Although as Elaine notes the right-click context menu on those plot windows has a "Save Plot As..." menu entry that will save at 300 dots per inch resolution.
> 
> 	Tom
> 
> Example histogram of hydrogen bond lengths for pdb 7qfc saved with the context menu entry "Save Plot As..."
> 
> <histogram.png>
> 
>> On Sep 8, 2022, at 9:10 AM, Elaine Meng via ChimeraX-users <chimerax-users at cgl.ucsf.edu <mailto:chimerax-users at cgl.ucsf.edu>> wrote:
>> 
>> Hello,
>> The main advantage of these plots inside ChimeraX is that they are interactive with the 3D structure (e.g. you click something on the plot, it does something in the 3D window).  They weren't meant for making figures for hundreds of molecules in scripts.   
>> 
>> So, there are no options to customize plot appearance, and the only way to save the histogram currently is by interactively using the context menu on that window, as mentioned in the help:
>> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/crosslinks.html#histogram <https://rbvi.ucsf.edu/chimerax/docs/user/commands/crosslinks.html#histogram>>
>> 
>> If you wanted to make your own plots with everything about the appearance customized, currently you would have to write python scripts to dump the data and then use your own favorite plotting program to generate images.
>> Best,
>> Elaine
>> -----
>> Elaine C. Meng, Ph.D.                       
>> UCSF Chimera(X) team
>> Department of Pharmaceutical Chemistry
>> University of California, San Francisco
>> 
>> 
>>> On Sep 8, 2022, at 1:40 AM, Enrico Martinez via ChimeraX-users <chimerax-users at cgl.ucsf.edu <mailto:chimerax-users at cgl.ucsf.edu>> wrote:
>>> 
>>> Thanks a lot, Elaine!
>>> Actually crosslink hist #1 works very well!
>>> Could you please specify would it be possible to plot the histogram
>>> (using batch chimera-x execution) or alternatively add it directly to
>>> the produced png image?
>>> I did not find any possibility to save the plot or to customize its
>>> appearance (color of the bars etc).
>>> Cheers
>>> Enrico
>>> 
>>> Il giorno mer 7 set 2022 alle ore 17:52 Elaine Meng
>>> <meng at cgl.ucsf.edu <mailto:meng at cgl.ucsf.edu>> ha scritto:
>>>> 
>>>> Hello!
>>>> The chain contacts diagram shown in Fig 4b is made with the "interfaces" command.  Then you can use context menu on that contacts diagram to make the interface-residue plot in Fig 4d.  Please see the "interfaces" help for details on both of those.
>>>> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/interfaces.html <https://rbvi.ucsf.edu/chimerax/docs/user/commands/interfaces.html>>
>>>> 
>>>> The histogram plot in Fig 5b  is made with the command "crosslinks histogram" but first you have to have some crosslinks, or other pseudobonds such as from finding H-bonds or contacts.  Then in the "crosslinks histogram" command you specify the pseudobond model to plot their distances.  See "crosslinks histogram" help:
>>>> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/crosslinks.html#histogram <https://rbvi.ucsf.edu/chimerax/docs/user/commands/crosslinks.html#histogram>>
>>>> 
>>>> Also for a more detailed example see the "Interactive H-bond Histogram" feature highlight, which includes a script (.cxc file):
>>>> <https://www.rbvi.ucsf.edu/chimerax/features.html#hbond-histogram <https://www.rbvi.ucsf.edu/chimerax/features.html#hbond-histogram>>
>>>> 
>>>> I hope this helps,
>>>> Elaine
>>>> -----
>>>> Elaine C. Meng, Ph.D.
>>>> UCSF Chimera(X) team
>>>> Department of Pharmaceutical Chemistry
>>>> University of California, San Francisco
>>>> 
>>>> 
>>>>> On Sep 7, 2022, at 2:18 AM, Enrico Martinez via ChimeraX-users <chimerax-users at cgl.ucsf.edu <mailto:chimerax-users at cgl.ucsf.edu>> wrote:
>>>>> 
>>>>> Dear ChimeraX users!
>>>>> I am dealing with the analysis of protein-ligand interactions in a
>>>>> single PDB structure. I am looking for any tools implemented in
>>>>> Chimera-X, which could be used to analyse the interactions (besides
>>>>> the hbond and contact tools giving info in the log files).
>>>>> I wonder to know which commands and corresponded ChimeraX tools could
>>>>> be used to produce the 2D contact diagrams shown on the Fig.4 as well
>>>>> as python graphs demonstrated on the Fig.5 in the Chimera-X article:
>>>>> https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5734306/ <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5734306/>
>>>>> 
>>>>> Many thanks in advance!
>>>>> Cheers
>>>>> Enrico
>> 
>> 
>> _______________________________________________
>> ChimeraX-users mailing list
>> ChimeraX-users at cgl.ucsf.edu <mailto:ChimeraX-users at cgl.ucsf.edu>
>> Manage subscription:
>> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20220909/d7e41c2d/attachment.html>


More information about the ChimeraX-users mailing list