ChimeraX in no-gui mode: visualisation of protein-ligand interactions

Dear Chimera's users! First I wish Happy New Year to everyone! I am just switching from Chimera to ChimeraX that I am going to use in no-gui (batch) mode to prepare screen shots of protein-ligand interactions based on the protein-ligand docking poses. Basically I am loading a pdb file of the complex (consisted of protein and ligand in multi-model format) from the terminal of my macOSX. I have a template for a batch file created in the bash script on the fly, that I used 2 years ago with an early version of ChimeraX. # a batch file for chimeraX printf "open ${pdb} view; zoom 1.0; turn x 90; turn z -80; wait # options for appearance preset 'overall look' publication # set bg powder blue set silhouettes t; set silhouetteColor indigo; set silhouetteDepthJump 0.02 # make info of the screen 2dlab create title text \"${pdb_name}\" color red font gothic xpos .04 ypos .92 size 35 # options for light light depthcuestart .4 depthcueend .8; lighting full intensity 1.4 shadows true qualityOfShadows finer save image ${structure}/${pdb_name}.png format png width 800 height 600 supersample 4 transparentBackground false wait exit" > chimeraX.${pdb_name}.cxc" then I use it directly in terminal as chimerax-daily chimeraX.${pdb_name}.cxc" may you suggest some commands that I may introduce into my batch file to 1) delete all models from the multi-model pdb file with the exemption of the first model. 2) switch from cartoon to surface representation of the protein 3) visualize protein-ligand non-covalent interactions in the current model Yours with thanks Enrico

Hello, It isn't my area of expertise, but I don't think you can save images in nogui mode except with Linux OSMesa. As for your other questions, which commands do certain things...
may you suggest some commands that I may introduce into my batch file to 1) delete all models from the multi-model pdb file with the exemption of the first model. 2) switch from cartoon to surface representation of the protein 3) visualize protein-ligand non-covalent interactions in the current model
(1) close submodels except for first one. Maybe something like command: close #1.2-end <https://rbvi.ucsf.edu/chimerax/docs/user/commands/close.html> (2) switch from ribbon to molecular surface of protein. Well, you probably want to do some coloring and other stuff besides just hiding ribbon and showing surface, which could be something like commands: ~ribbon surface protein <https://rbvi.ucsf.edu/chimerax/docs/user/commands/cartoon.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/surface.html> Or you could try a surface-showing preset, e.g. preset ghost <https://rbvi.ucsf.edu/chimerax/docs/user/commands/preset.html> (3) depends what you mean by showing interactions (lines? selection? coloring?). You should take a look at commands "contacts" and/or "hbonds" and choose the options that give what you want. <https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/hbonds.html> You will need to spend some time trying the commands since there are an infinite number of possibilities for combinations of coloring and display styles and lighting and graphics effects. See also commands "lighting" and "graphics" and "set" <https://rbvi.ucsf.edu/chimerax/docs/user/commands/lighting.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/graphics.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/set.html> ... and the "making images" page with several relevant commands <https://rbvi.ucsf.edu/chimerax/docs/user/images.html> I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 14, 2022, at 2:17 PM, Enrico Martinez via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Dear Chimera's users! First I wish Happy New Year to everyone! I am just switching from Chimera to ChimeraX that I am going to use in no-gui (batch) mode to prepare screen shots of protein-ligand interactions based on the protein-ligand docking poses. Basically I am loading a pdb file of the complex (consisted of protein and ligand in multi-model format) from the terminal of my macOSX. I have a template for a batch file created in the bash script on the fly, that I used 2 years ago with an early version of ChimeraX.
# a batch file for chimeraX printf "open ${pdb} view; zoom 1.0; turn x 90; turn z -80; wait # options for appearance preset 'overall look' publication # set bg powder blue set silhouettes t; set silhouetteColor indigo; set silhouetteDepthJump 0.02
# make info of the screen 2dlab create title text \"${pdb_name}\" color red font gothic xpos .04 ypos .92 size 35
# options for light light depthcuestart .4 depthcueend .8; lighting full intensity 1.4 shadows true qualityOfShadows finer
save image ${structure}/${pdb_name}.png format png width 800 height 600 supersample 4 transparentBackground false wait exit" > chimeraX.${pdb_name}.cxc"
then I use it directly in terminal as chimerax-daily chimeraX.${pdb_name}.cxc"
may you suggest some commands that I may introduce into my batch file to 1) delete all models from the multi-model pdb file with the exemption of the first model. 2) switch from cartoon to surface representation of the protein 3) visualize protein-ligand non-covalent interactions in the current model
Yours with thanks Enrico

Thank you very much, Elaine! I really like ChimeraX and it looks so great for me with all of those presents :-) I will look for the details regarding the options. Just a few addtional questions regarding customizing representation of protein-ligand interactions using ghost preset: In particular: I would like to color ligand (in orange??) To add labels (like Try-193) on the displayed side-chains around the ligands To change background from black to indigo! :-) Many thanks in advance! Cheers Enrico пт, 14 янв. 2022 г. в 23:48, Elaine Meng <meng@cgl.ucsf.edu>:
Hello, It isn't my area of expertise, but I don't think you can save images in nogui mode except with Linux OSMesa.
As for your other questions, which commands do certain things...
may you suggest some commands that I may introduce into my batch file to 1) delete all models from the multi-model pdb file with the exemption of the first model. 2) switch from cartoon to surface representation of the protein 3) visualize protein-ligand non-covalent interactions in the current model
(1) close submodels except for first one. Maybe something like command:
close #1.2-end
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/close.html>
(2) switch from ribbon to molecular surface of protein. Well, you probably want to do some coloring and other stuff besides just hiding ribbon and showing surface, which could be something like commands:
~ribbon surface protein
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/cartoon.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/surface.html>
Or you could try a surface-showing preset, e.g.
preset ghost
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/preset.html>
(3) depends what you mean by showing interactions (lines? selection? coloring?). You should take a look at commands "contacts" and/or "hbonds" and choose the options that give what you want. <https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/hbonds.html>
You will need to spend some time trying the commands since there are an infinite number of possibilities for combinations of coloring and display styles and lighting and graphics effects. See also commands "lighting" and "graphics" and "set"
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/lighting.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/graphics.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/set.html>
... and the "making images" page with several relevant commands <https://rbvi.ucsf.edu/chimerax/docs/user/images.html>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 14, 2022, at 2:17 PM, Enrico Martinez via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Dear Chimera's users! First I wish Happy New Year to everyone! I am just switching from Chimera to ChimeraX that I am going to use in no-gui (batch) mode to prepare screen shots of protein-ligand interactions based on the protein-ligand docking poses. Basically I am loading a pdb file of the complex (consisted of protein and ligand in multi-model format) from the terminal of my macOSX. I have a template for a batch file created in the bash script on the fly, that I used 2 years ago with an early version of ChimeraX.
# a batch file for chimeraX printf "open ${pdb} view; zoom 1.0; turn x 90; turn z -80; wait # options for appearance preset 'overall look' publication # set bg powder blue set silhouettes t; set silhouetteColor indigo; set silhouetteDepthJump 0.02
# make info of the screen 2dlab create title text \"${pdb_name}\" color red font gothic xpos .04 ypos .92 size 35
# options for light light depthcuestart .4 depthcueend .8; lighting full intensity 1.4 shadows true qualityOfShadows finer
save image ${structure}/${pdb_name}.png format png width 800 height 600 supersample 4 transparentBackground false wait exit" > chimeraX.${pdb_name}.cxc"
then I use it directly in terminal as chimerax-daily chimeraX.${pdb_name}.cxc"
may you suggest some commands that I may introduce into my batch file to 1) delete all models from the multi-model pdb file with the exemption of the first model. 2) switch from cartoon to surface representation of the protein 3) visualize protein-ligand non-covalent interactions in the current model
Yours with thanks Enrico

That is correct. You would need to start ChimeraX with the --offscreen flag to be able to save images in nogui mode (offscreen implies nogui). And that only works with the Ubuntu and CentOS versions of ChimeraX. -- Greg On 1/14/2022 2:48 PM, Elaine Meng via Chimera-users wrote:
Hello, It isn't my area of expertise, but I don't think you can save images in nogui mode except with Linux OSMesa.
As for your other questions, which commands do certain things...
may you suggest some commands that I may introduce into my batch file to 1) delete all models from the multi-model pdb file with the exemption of the first model. 2) switch from cartoon to surface representation of the protein 3) visualize protein-ligand non-covalent interactions in the current model
(1) close submodels except for first one. Maybe something like command:
close #1.2-end
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/close.html>
(2) switch from ribbon to molecular surface of protein. Well, you probably want to do some coloring and other stuff besides just hiding ribbon and showing surface, which could be something like commands:
~ribbon surface protein
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/cartoon.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/surface.html>
Or you could try a surface-showing preset, e.g.
preset ghost
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/preset.html>
(3) depends what you mean by showing interactions (lines? selection? coloring?). You should take a look at commands "contacts" and/or "hbonds" and choose the options that give what you want. <https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/hbonds.html>
You will need to spend some time trying the commands since there are an infinite number of possibilities for combinations of coloring and display styles and lighting and graphics effects. See also commands "lighting" and "graphics" and "set"
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/lighting.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/graphics.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/set.html>
... and the "making images" page with several relevant commands <https://rbvi.ucsf.edu/chimerax/docs/user/images.html>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 14, 2022, at 2:17 PM, Enrico Martinez via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Dear Chimera's users! First I wish Happy New Year to everyone! I am just switching from Chimera to ChimeraX that I am going to use in no-gui (batch) mode to prepare screen shots of protein-ligand interactions based on the protein-ligand docking poses. Basically I am loading a pdb file of the complex (consisted of protein and ligand in multi-model format) from the terminal of my macOSX. I have a template for a batch file created in the bash script on the fly, that I used 2 years ago with an early version of ChimeraX.
# a batch file for chimeraX printf "open ${pdb} view; zoom 1.0; turn x 90; turn z -80; wait # options for appearance preset 'overall look' publication # set bg powder blue set silhouettes t; set silhouetteColor indigo; set silhouetteDepthJump 0.02
# make info of the screen 2dlab create title text \"${pdb_name}\" color red font gothic xpos .04 ypos .92 size 35
# options for light light depthcuestart .4 depthcueend .8; lighting full intensity 1.4 shadows true qualityOfShadows finer
save image ${structure}/${pdb_name}.png format png width 800 height 600 supersample 4 transparentBackground false wait exit" > chimeraX.${pdb_name}.cxc"
then I use it directly in terminal as chimerax-daily chimeraX.${pdb_name}.cxc"
may you suggest some commands that I may introduce into my batch file to 1) delete all models from the multi-model pdb file with the exemption of the first model. 2) switch from cartoon to surface representation of the protein 3) visualize protein-ligand non-covalent interactions in the current model
Yours with thanks Enrico
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Hi Erico, Greg is right that only Ubuntu and CentOS Linux ChimeraX versions include rendering images in no gui mode. But I made rendering in no gui mode work on macOS about a year ago, but it is not in the distribution because it is such a rarely used feature it did not seem worth increasing the distribution by 16 Mbytes. But I could provide this to individuals who need it. Tom
On Jan 14, 2022, at 3:05 PM, Greg Couch via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
That is correct. You would need to start ChimeraX with the --offscreen flag to be able to save images in nogui mode (offscreen implies nogui). And that only works with the Ubuntu and CentOS versions of ChimeraX.
-- Greg
On 1/14/2022 2:48 PM, Elaine Meng via Chimera-users wrote:
Hello, It isn't my area of expertise, but I don't think you can save images in nogui mode except with Linux OSMesa.
As for your other questions, which commands do certain things...
may you suggest some commands that I may introduce into my batch file to 1) delete all models from the multi-model pdb file with the exemption of the first model. 2) switch from cartoon to surface representation of the protein 3) visualize protein-ligand non-covalent interactions in the current model
(1) close submodels except for first one. Maybe something like command:
close #1.2-end
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/close.html>
(2) switch from ribbon to molecular surface of protein. Well, you probably want to do some coloring and other stuff besides just hiding ribbon and showing surface, which could be something like commands:
~ribbon surface protein
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/cartoon.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/surface.html>
Or you could try a surface-showing preset, e.g.
preset ghost
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/preset.html>
(3) depends what you mean by showing interactions (lines? selection? coloring?). You should take a look at commands "contacts" and/or "hbonds" and choose the options that give what you want. <https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/hbonds.html>
You will need to spend some time trying the commands since there are an infinite number of possibilities for combinations of coloring and display styles and lighting and graphics effects. See also commands "lighting" and "graphics" and "set"
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/lighting.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/graphics.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/set.html>
... and the "making images" page with several relevant commands <https://rbvi.ucsf.edu/chimerax/docs/user/images.html>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 14, 2022, at 2:17 PM, Enrico Martinez via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Dear Chimera's users! First I wish Happy New Year to everyone! I am just switching from Chimera to ChimeraX that I am going to use in no-gui (batch) mode to prepare screen shots of protein-ligand interactions based on the protein-ligand docking poses. Basically I am loading a pdb file of the complex (consisted of protein and ligand in multi-model format) from the terminal of my macOSX. I have a template for a batch file created in the bash script on the fly, that I used 2 years ago with an early version of ChimeraX.
# a batch file for chimeraX printf "open ${pdb} view; zoom 1.0; turn x 90; turn z -80; wait # options for appearance preset 'overall look' publication # set bg powder blue set silhouettes t; set silhouetteColor indigo; set silhouetteDepthJump 0.02
# make info of the screen 2dlab create title text \"${pdb_name}\" color red font gothic xpos .04 ypos .92 size 35
# options for light light depthcuestart .4 depthcueend .8; lighting full intensity 1.4 shadows true qualityOfShadows finer
save image ${structure}/${pdb_name}.png format png width 800 height 600 supersample 4 transparentBackground false wait exit" > chimeraX.${pdb_name}.cxc"
then I use it directly in terminal as chimerax-daily chimeraX.${pdb_name}.cxc"
may you suggest some commands that I may introduce into my batch file to 1) delete all models from the multi-model pdb file with the exemption of the first model. 2) switch from cartoon to surface representation of the protein 3) visualize protein-ligand non-covalent interactions in the current model
Yours with thanks Enrico
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Hi Greg, chimerax produces good images in batch mode on my macOSX (I use Mojave) without --offscreen option (which indeed does not work) I only see the message in the terminal, but the results are great :-) WARNING: Release of profile requested but WebEnginePage still not deleted. Expect troubles ! сб, 15 янв. 2022 г. в 00:05, Greg Couch <gregc@cgl.ucsf.edu>:
That is correct. You would need to start ChimeraX with the --offscreen flag to be able to save images in nogui mode (offscreen implies nogui). And that only works with the Ubuntu and CentOS versions of ChimeraX.
-- Greg
On 1/14/2022 2:48 PM, Elaine Meng via Chimera-users wrote:
Hello, It isn't my area of expertise, but I don't think you can save images in nogui mode except with Linux OSMesa.
As for your other questions, which commands do certain things...
may you suggest some commands that I may introduce into my batch file to 1) delete all models from the multi-model pdb file with the exemption of the first model. 2) switch from cartoon to surface representation of the protein 3) visualize protein-ligand non-covalent interactions in the current model
(1) close submodels except for first one. Maybe something like command:
close #1.2-end
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/close.html>
(2) switch from ribbon to molecular surface of protein. Well, you probably want to do some coloring and other stuff besides just hiding ribbon and showing surface, which could be something like commands:
~ribbon surface protein
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/cartoon.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/surface.html>
Or you could try a surface-showing preset, e.g.
preset ghost
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/preset.html>
(3) depends what you mean by showing interactions (lines? selection? coloring?). You should take a look at commands "contacts" and/or "hbonds" and choose the options that give what you want. <https://rbvi.ucsf.edu/chimerax/docs/user/commands/clashes.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/hbonds.html>
You will need to spend some time trying the commands since there are an infinite number of possibilities for combinations of coloring and display styles and lighting and graphics effects. See also commands "lighting" and "graphics" and "set"
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/lighting.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/graphics.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/set.html>
... and the "making images" page with several relevant commands <https://rbvi.ucsf.edu/chimerax/docs/user/images.html>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 14, 2022, at 2:17 PM, Enrico Martinez via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Dear Chimera's users! First I wish Happy New Year to everyone! I am just switching from Chimera to ChimeraX that I am going to use in no-gui (batch) mode to prepare screen shots of protein-ligand interactions based on the protein-ligand docking poses. Basically I am loading a pdb file of the complex (consisted of protein and ligand in multi-model format) from the terminal of my macOSX. I have a template for a batch file created in the bash script on the fly, that I used 2 years ago with an early version of ChimeraX.
# a batch file for chimeraX printf "open ${pdb} view; zoom 1.0; turn x 90; turn z -80; wait # options for appearance preset 'overall look' publication # set bg powder blue set silhouettes t; set silhouetteColor indigo; set silhouetteDepthJump 0.02
# make info of the screen 2dlab create title text \"${pdb_name}\" color red font gothic xpos .04 ypos .92 size 35
# options for light light depthcuestart .4 depthcueend .8; lighting full intensity 1.4 shadows true qualityOfShadows finer
save image ${structure}/${pdb_name}.png format png width 800 height 600 supersample 4 transparentBackground false wait exit" > chimeraX.${pdb_name}.cxc"
then I use it directly in terminal as chimerax-daily chimeraX.${pdb_name}.cxc"
may you suggest some commands that I may introduce into my batch file to 1) delete all models from the multi-model pdb file with the exemption of the first model. 2) switch from cartoon to surface representation of the protein 3) visualize protein-ligand non-covalent interactions in the current model
Yours with thanks Enrico
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
participants (4)
-
Elaine Meng
-
Enrico Martinez
-
Greg Couch
-
Tom Goddard