outline the interface region in chimeraX

Hi, I wonder if there is a way to outline the interface region in ChimeraX like below: [cid:image001.png@01D7A597.5344EDF0] Previously, I did this in photoshop, but can we label the interface regions with those lines in ChimeraX? Thank you very much! Bingchun Bingchun Zhao, PhD Postdoctoral, VF Biodefense Research Section VRC/NIAID/NIH Bldg 40, Room 2607B 40 Convent Drive Bethesda, MD 20892 Tel: 301-761-7649 Email: bingchun.zhao@nih.gov<mailto:bingchun.zhao@nih.gov>

Hi Bingchun, There are two ways to show those patches in ChimeraX without using a separate drawing program. One is just by coloring. The only way I can think of to do an outline, however, is by selection. You can change the color of the selection outline and its width, but you can only have one of those at a time, not several different outlines in different colors as shown in your example image. I attach two example images, each with patch coloring on the left and selection outline on the right. First is the default green selection and second is with a fatter white line obtained with command "graphics selection color white width 4" <https://rbvi.ucsf.edu/chimerax/docs/user/commands/graphics.html#selection> To make this example I opened 1zik, split into two models, deleted solvent. I selected the interface atoms using: contacts /a restrict /b sel true log true intersubmodel true <https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html> ...and then colored the chain B contacts and deselected them using: color sel & /b yellow targ s ~sel #1.2 ... and then used the "move picked models" mouse mode to rotate and translate the chains separately (they were in two different models because of the previous split command) so that the interfaces were toward the viewer. 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 9, 2021, at 1:25 PM, Zhao, Bingchun (NIH/VRC) [F] via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi,
I wonder if there is a way to outline the interface region in ChimeraX like below:
<image001.png>
Previously, I did this in photoshop, but can we label the interface regions with those lines in ChimeraX?
Thank you very much! Bingchun

Of course you can have multiple patches in different colors, but that only works where the patches are not overlapping (since you would only be able to show one color per atom). Elaine
On Sep 9, 2021, at 2:03 PM, Elaine Meng via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Bingchun, There are two ways to show those patches in ChimeraX without using a separate drawing program. One is just by coloring. The only way I can think of to do an outline, however, is by selection. You can change the color of the selection outline and its width, but you can only have one of those at a time, not several different outlines in different colors as shown in your example image.
I attach two example images, each with patch coloring on the left and selection outline on the right. First is the default green selection and second is with a fatter white line obtained with command "graphics selection color white width 4"
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/graphics.html#selection> <ex1.png>
<ex2.png>
To make this example I opened 1zik, split into two models, deleted solvent. I selected the interface atoms using:
contacts /a restrict /b sel true log true intersubmodel true
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html>
...and then colored the chain B contacts and deselected them using:
color sel & /b yellow targ s ~sel #1.2
... and then used the "move picked models" mouse mode to rotate and translate the chains separately (they were in two different models because of the previous split command) so that the interfaces were toward the viewer.
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 9, 2021, at 1:25 PM, Zhao, Bingchun (NIH/VRC) [F] via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi,
I wonder if there is a way to outline the interface region in ChimeraX like below:
<image001.png>
Previously, I did this in photoshop, but can we label the interface regions with those lines in ChimeraX?
Thank you very much! Bingchun
_______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users

Hi, Elaine, Thank you so much for your speedy reply! This is really helpful! One following question is, I found that when I select one area, the exported png fig is not with transparent background anymore, even I entered transparentBackground true in the commend line for saving. Is there any solution for this? I mean how to keep those selection outline showing while I can still export png fig with transparent background? Thank you very much! Best, Bingchun From: Elaine Meng <meng@cgl.ucsf.edu> Reply-To: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu> Date: Thursday, September 9, 2021 at 5:03 PM To: "Zhao, Bingchun (NIH/VRC) [F]" <bingchun.zhao@nih.gov> Cc: "chimerax-users@cgl.ucsf.edu" <chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] outline the interface region in chimeraX Hi Bingchun, There are two ways to show those patches in ChimeraX without using a separate drawing program. One is just by coloring. The only way I can think of to do an outline, however, is by selection. You can change the color of the selection outline and its width, but you can only have one of those at a time, not several different outlines in different colors as shown in your example image. I attach two example images, each with patch coloring on the left and selection outline on the right. First is the default green selection and second is with a fatter white line obtained with command "graphics selection color white width 4" <https://rbvi.ucsf.edu/chimerax/docs/user/commands/graphics.html#selection> [cid:image001.png@01D7A5A3.FBBCB6A0] [cid:image002.png@01D7A5A3.FBBCB6A0] To make this example I opened 1zik, split into two models, deleted solvent. I selected the interface atoms using: contacts /a restrict /b sel true log true intersubmodel true <https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html> ...and then colored the chain B contacts and deselected them using: color sel & /b yellow targ s ~sel #1.2 ... and then used the "move picked models" mouse mode to rotate and translate the chains separately (they were in two different models because of the previous split command) so that the interfaces were toward the viewer. 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 9, 2021, at 1:25 PM, Zhao, Bingchun (NIH/VRC) [F] via ChimeraX-users <chimerax-users@cgl.ucsf.edu<mailto:chimerax-users@cgl.ucsf.edu>> wrote: Hi, I wonder if there is a way to outline the interface region in ChimeraX like below: <image001.png> Previously, I did this in photoshop, but can we label the interface regions with those lines in ChimeraX? Thank you very much! Bingchun

Hi Bingchun, I tested that and also see that if a selection outline is shown then saving an image with transparent background does not give a transparent background. I will make a bug report for that. In the meantime you might need to use a photo editor and replace black with 100% transparency to work around this bug. Tom
On Sep 9, 2021, at 2:56 PM, Zhao, Bingchun (NIH/VRC) [F] via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi, Elaine,
Thank you so much for your speedy reply! This is really helpful!
One following question is, I found that when I select one area, the exported png fig is not with transparent background anymore, even I entered transparentBackground true in the commend line for saving. Is there any solution for this? I mean how to keep those selection outline showing while I can still export png fig with transparent background?
Thank you very much! Best, Bingchun
From: Elaine Meng <meng@cgl.ucsf.edu <mailto:meng@cgl.ucsf.edu>> Reply-To: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>> Date: Thursday, September 9, 2021 at 5:03 PM To: "Zhao, Bingchun (NIH/VRC) [F]" <bingchun.zhao@nih.gov <mailto:bingchun.zhao@nih.gov>> Cc: "chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>" <chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>> Subject: Re: [chimerax-users] outline the interface region in chimeraX
Hi Bingchun, There are two ways to show those patches in ChimeraX without using a separate drawing program. One is just by coloring. The only way I can think of to do an outline, however, is by selection. You can change the color of the selection outline and its width, but you can only have one of those at a time, not several different outlines in different colors as shown in your example image.
I attach two example images, each with patch coloring on the left and selection outline on the right. First is the default green selection and second is with a fatter white line obtained with command "graphics selection color white width 4"
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/graphics.html#selection <https://rbvi.ucsf.edu/chimerax/docs/user/commands/graphics.html#selection>>
To make this example I opened 1zik, split into two models, deleted solvent. I selected the interface atoms using:
contacts /a restrict /b sel true log true intersubmodel true
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html <https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html>>
...and then colored the chain B contacts and deselected them using:
color sel & /b yellow targ s ~sel #1.2
... and then used the "move picked models" mouse mode to rotate and translate the chains separately (they were in two different models because of the previous split command) so that the interfaces were toward the viewer.
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 9, 2021, at 1:25 PM, Zhao, Bingchun (NIH/VRC) [F] via ChimeraX-users <chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>> wrote:
Hi,
I wonder if there is a way to outline the interface region in ChimeraX like below:
<image001.png>
Previously, I did this in photoshop, but can we label the interface regions with those lines in ChimeraX?
Thank you very much! Bingchun
_______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu <mailto:ChimeraX-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>

Hi, Tom, Thank you so much for your suggestions! Very helpful! Yes, I have the exactly same idea to make those outlined figs as described in your first email, but got the non-transparent background issue when exported those figs. I’m using the photoshop function now to save the outlines with transparent background, but this does cost more time and effort. So if the team could figure this issue out, that would be super cool. Thank you very much! And really appreciate the helpful suggestions and information from you and Elaine. Best, Bingchun From: Tom Goddard <goddard@sonic.net> Date: Thursday, September 9, 2021 at 7:39 PM To: "Zhao, Bingchun (NIH/VRC) [F]" <bingchun.zhao@nih.gov> Cc: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] outline the interface region in chimeraX Hi Bingchun, I tested that and also see that if a selection outline is shown then saving an image with transparent background does not give a transparent background. I will make a bug report for that. In the meantime you might need to use a photo editor and replace black with 100% transparency to work around this bug. Tom On Sep 9, 2021, at 2:56 PM, Zhao, Bingchun (NIH/VRC) [F] via ChimeraX-users <chimerax-users@cgl.ucsf.edu<mailto:chimerax-users@cgl.ucsf.edu>> wrote: Hi, Elaine, Thank you so much for your speedy reply! This is really helpful! One following question is, I found that when I select one area, the exported png fig is not with transparent background anymore, even I entered transparentBackground true in the commend line for saving. Is there any solution for this? I mean how to keep those selection outline showing while I can still export png fig with transparent background? Thank you very much! Best, Bingchun From: Elaine Meng <meng@cgl.ucsf.edu<mailto:meng@cgl.ucsf.edu>> Reply-To: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu<mailto:chimerax-users@cgl.ucsf.edu>> Date: Thursday, September 9, 2021 at 5:03 PM To: "Zhao, Bingchun (NIH/VRC) [F]" <bingchun.zhao@nih.gov<mailto:bingchun.zhao@nih.gov>> Cc: "chimerax-users@cgl.ucsf.edu<mailto:chimerax-users@cgl.ucsf.edu>" <chimerax-users@cgl.ucsf.edu<mailto:chimerax-users@cgl.ucsf.edu>> Subject: Re: [chimerax-users] outline the interface region in chimeraX Hi Bingchun, There are two ways to show those patches in ChimeraX without using a separate drawing program. One is just by coloring. The only way I can think of to do an outline, however, is by selection. You can change the color of the selection outline and its width, but you can only have one of those at a time, not several different outlines in different colors as shown in your example image. I attach two example images, each with patch coloring on the left and selection outline on the right. First is the default green selection and second is with a fatter white line obtained with command "graphics selection color white width 4" <https://rbvi.ucsf.edu/chimerax/docs/user/commands/graphics.html#selection> [cid:image001.png@01D7A5B3.8C1CDDB0] [cid:image002.png@01D7A5B3.8C1CDDB0] To make this example I opened 1zik, split into two models, deleted solvent. I selected the interface atoms using: contacts /a restrict /b sel true log true intersubmodel true <https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html> ...and then colored the chain B contacts and deselected them using: color sel & /b yellow targ s ~sel #1.2 ... and then used the "move picked models" mouse mode to rotate and translate the chains separately (they were in two different models because of the previous split command) so that the interfaces were toward the viewer. 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 9, 2021, at 1:25 PM, Zhao, Bingchun (NIH/VRC) [F] via ChimeraX-users <chimerax-users@cgl.ucsf.edu<mailto:chimerax-users@cgl.ucsf.edu>> wrote: Hi, I wonder if there is a way to outline the interface region in ChimeraX like below: <image001.png> Previously, I did this in photoshop, but can we label the interface regions with those lines in ChimeraX? Thank you very much! Bingchun _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu<mailto:ChimeraX-users@cgl.ucsf.edu> Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimerax-users

Hi Bingchun, If you really want to draw these outlines with ChimeraX you can create selection outlines for the surface patches as Elaine showed with the color and thickness you want. Then make your surface 100% transparent (command "transparency 100") so the only thing that is visible is the outline and save that outline image with transparent backbground (command "save outline1.png transparent true"). Then layer all your boundary images on top of you surface image in Photoshop or Gimp or the photo editor of your choice. Thick selection outlines are pretty jagged so maybe you won't like this result. Here's an example outline around one alpha helix. Tom
On Sep 9, 2021, at 2:03 PM, Elaine Meng via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Bingchun, There are two ways to show those patches in ChimeraX without using a separate drawing program. One is just by coloring. The only way I can think of to do an outline, however, is by selection. You can change the color of the selection outline and its width, but you can only have one of those at a time, not several different outlines in different colors as shown in your example image.
I attach two example images, each with patch coloring on the left and selection outline on the right. First is the default green selection and second is with a fatter white line obtained with command "graphics selection color white width 4"
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/graphics.html#selection <https://rbvi.ucsf.edu/chimerax/docs/user/commands/graphics.html#selection>>
To make this example I opened 1zik, split into two models, deleted solvent. I selected the interface atoms using:
contacts /a restrict /b sel true log true intersubmodel true
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html <https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html>>
...and then colored the chain B contacts and deselected them using:
color sel & /b yellow targ s ~sel #1.2
... and then used the "move picked models" mouse mode to rotate and translate the chains separately (they were in two different models because of the previous split command) so that the interfaces were toward the viewer.
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 9, 2021, at 1:25 PM, Zhao, Bingchun (NIH/VRC) [F] via ChimeraX-users <chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>> wrote:
Hi,
I wonder if there is a way to outline the interface region in ChimeraX like below:
<image001.png>
Previously, I did this in photoshop, but can we label the interface regions with those lines in ChimeraX?
Thank you very much! Bingchun
_______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
participants (3)
-
Elaine Meng
-
Tom Goddard
-
Zhao, Bingchun (NIH/VRC) [F]