[Chimera-users] Saving images in nogui mode

Tom Goddard goddard at sonic.net
Fri Jan 14 15:12:03 PST 2022


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 at 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 at 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 at cgl.ucsf.edu
>> Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
> 




More information about the Chimera-users mailing list