Visualisation in Headless Chimera

Dear Chimera users! I am using headless version of Chimera inside of my Bash script to prepare images of the pdbs. Normally I provide a pdb file with a script in loop to obrain images automatically Here are some of my questions related to the visualisation: 1) I have a problem with the "preset apply publication 1" notably Chimera is crushed when I use #set silhouette option Is it possible to make "a black border of a selected thickness" for all of the elements of secondary structure of my proteins via some another command? Actually in terms of the cartoon's style (but not a colour) I would like to obtain something like was shown here https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles-contras... 2) I am using "rangecolor bfactor 2 blue 30 red 50 yellow" option to colour the structure according to the B-factor information provided in the given PDB. The problem is when I provide "key" option for it to place a colour diagram on the resulted picture I ontain a crush in headless version. Do some other methods exist for the placement of the colour legend for the B-factor colouring which could be used in the headless version? Thank you for help in avance! James

Hi James, (1) The black outlines are silhouettes, so if silhouettes cause the problem there is no way around it. The preset also does some other things, however, so you could doublecheck just using the “set silhouettes” command instead of “preset.” The image you attached is from the ribbon styles tutorial. The tutorial shows the commands you would need to make that image. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles.html> Image description is "smooth ribbons, default lighting except decreased contrast and reflectivity” …corresponding to the the first two “set” commands in that tutorial (white background and black silhouettes) and the last two commands (lighting contrast and reflectivity). (2) The “key” command option only enables interactive placement of a color key by hand using the GUI. Sorry, there is no option to place the color key directly, without human intervention. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rangecolor.html> Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 28, 2019, at 4:11 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Dear Chimera users!
I am using headless version of Chimera inside of my Bash script to prepare images of the pdbs. Normally I provide a pdb file with a script in loop to obrain images automatically
Here are some of my questions related to the visualisation:
1) I have a problem with the "preset apply publication 1" notably Chimera is crushed when I use #set silhouette option Is it possible to make "a black border of a selected thickness" for all of the elements of secondary structure of my proteins via some another command? Actually in terms of the cartoon's style (but not a colour) I would like to obtain something like was shown here https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles-contras...
2) I am using "rangecolor bfactor 2 blue 30 red 50 yellow" option to colour the structure according to the B-factor information provided in the given PDB. The problem is when I provide "key" option for it to place a colour diagram on the resulted picture I ontain a crush in headless version. Do some other methods exist for the placement of the colour legend for the B-factor colouring which could be used in the headless version?
Thank you for help in avance!
James _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Thank you so much, Elaine! Yes, indeed, I have tested it's a problem in set silhouettes command which cause headless-chimera to crush. the same is for the "preset" command. And the problem is on the step of the rendering of the image Rendering high resolution image... ./structure.sh : ligne 70 : 3515 Erreur de segmentation (core dumped) chimera-batch ${pdb} ${temp}/chimera.${pdb_name}.com and here is my script set bgcol white set silhouette ~set depth ribscale licorice ribrep edged strand #light options light contrast 0.4 light reflectivity 0.9 #structure pre-processing ksdssp #use this commands to re-orient PDB turn x 90 center view #turn y 20 center view turn z -80 center view move z -15 # make visualisation of b-factors rangecolor bfactor 2 blue 30 red 50 yellow # make a png immage copy file ./B-factors_EvXynTS_apo_340K.png png width 800 height 600 Finally I just have checked it also in chimera-gui, everything works fine with the same commands! чт, 28 мар. 2019 г. в 17:31, Elaine Meng <meng@cgl.ucsf.edu>:
Hi James, (1) The black outlines are silhouettes, so if silhouettes cause the problem there is no way around it. The preset also does some other things, however, so you could doublecheck just using the “set silhouettes” command instead of “preset.”
The image you attached is from the ribbon styles tutorial. The tutorial shows the commands you would need to make that image. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles.html>
Image description is "smooth ribbons, default lighting except decreased contrast and reflectivity” …corresponding to the the first two “set” commands in that tutorial (white background and black silhouettes) and the last two commands (lighting contrast and reflectivity).
(2) The “key” command option only enables interactive placement of a color key by hand using the GUI. Sorry, there is no option to place the color key directly, without human intervention. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rangecolor.html>
Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 28, 2019, at 4:11 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Dear Chimera users!
I am using headless version of Chimera inside of my Bash script to prepare images of the pdbs. Normally I provide a pdb file with a script in loop to obrain images automatically
Here are some of my questions related to the visualisation:
1) I have a problem with the "preset apply publication 1" notably Chimera is crushed when I use #set silhouette option Is it possible to make "a black border of a selected thickness" for all of the elements of secondary structure of my proteins via some another command? Actually in terms of the cartoon's style (but not a colour) I would like to obtain something like was shown here https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles-contras...
2) I am using "rangecolor bfactor 2 blue 30 red 50 yellow" option to colour the structure according to the B-factor information provided in the given PDB. The problem is when I provide "key" option for it to place a colour diagram on the resulted picture I ontain a crush in headless version. Do some other methods exist for the placement of the colour legend for the B-factor colouring which could be used in the headless version?
Thank you for help in avance!
James _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

The software OpenGL library, libOSMesa.so, in Chimera is based on Mesa 7.6.1. Chances are that your system has a newer version available, so if you install it (eg., "sudo apt install libosmesas6" or "sudo yum install mesa-libOSMesa"), and remove the version in Chimera (might have to copy the system version to CHIMERA/lib, don't remember), it should be much better. If that doesn't work, then I'd recommend getting the libOSMesa.so from ChimeraX and installing it in your Chimera library. The one in ChimeraX is Mesa 18.2.5, and it uses llvm, unlike many of the system version of libOSMesa.so, so it supports newer OpenGL APIs. Ubuntu 19.04's libOSMesa.so is supposed to be the llvm version, but that isn't out yet. Salut, Greg On 3/28/19 9:49 AM, James Starlight wrote:
Thank you so much, Elaine!
Yes, indeed, I have tested it's a problem in set silhouettes command which cause headless-chimera to crush. the same is for the "preset" command. And the problem is on the step of the rendering of the image
Rendering high resolution image... ./structure.sh : ligne 70 : 3515 Erreur de segmentation (core dumped) chimera-batch ${pdb} ${temp}/chimera.${pdb_name}.com
and here is my script
set bgcol white set silhouette ~set depth ribscale licorice ribrep edged strand
#light options light contrast 0.4 light reflectivity 0.9
#structure pre-processing ksdssp #use this commands to re-orient PDB turn x 90 center view #turn y 20 center view turn z -80 center view move z -15
# make visualisation of b-factors rangecolor bfactor 2 blue 30 red 50 yellow
# make a png immage copy file ./B-factors_EvXynTS_apo_340K.png png width 800 height 600
Finally I just have checked it also in chimera-gui, everything works fine with the same commands!
чт, 28 мар. 2019 г. в 17:31, Elaine Meng <meng@cgl.ucsf.edu>:
Hi James, (1) The black outlines are silhouettes, so if silhouettes cause the problem there is no way around it. The preset also does some other things, however, so you could doublecheck just using the “set silhouettes” command instead of “preset.”
The image you attached is from the ribbon styles tutorial. The tutorial shows the commands you would need to make that image. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles.html>
Image description is "smooth ribbons, default lighting except decreased contrast and reflectivity” …corresponding to the the first two “set” commands in that tutorial (white background and black silhouettes) and the last two commands (lighting contrast and reflectivity).
(2) The “key” command option only enables interactive placement of a color key by hand using the GUI. Sorry, there is no option to place the color key directly, without human intervention. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rangecolor.html>
Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 28, 2019, at 4:11 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Dear Chimera users!
I am using headless version of Chimera inside of my Bash script to prepare images of the pdbs. Normally I provide a pdb file with a script in loop to obrain images automatically
Here are some of my questions related to the visualisation:
1) I have a problem with the "preset apply publication 1" notably Chimera is crushed when I use #set silhouette option Is it possible to make "a black border of a selected thickness" for all of the elements of secondary structure of my proteins via some another command? Actually in terms of the cartoon's style (but not a colour) I would like to obtain something like was shown here https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles-contras...
2) I am using "rangecolor bfactor 2 blue 30 red 50 yellow" option to colour the structure according to the B-factor information provided in the given PDB. The problem is when I provide "key" option for it to place a colour diagram on the resulted picture I ontain a crush in headless version. Do some other methods exist for the placement of the colour legend for the B-factor colouring which could be used in the headless version?
Thank you for help in avance!
James _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

If your key is the same for all your images, there is a trick you can use. Use the regular Chimera graphical interface to draw the color key (Tools→Utilities→Color Key) positioned and looking the way you want with no other models open, then save an image. When saving the image, make sure to tick the “Transparent background” option in the Save-Image dialog (and make sure the image is the same size as your pipeline images). Then there are many possible image-processing programs you can use to superimpose that key on the images you are getting from your pipeline. —Eric Eric Pettersen UCSF Computer Graphics Lab
On Mar 28, 2019, at 9:49 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Thank you so much, Elaine!
Yes, indeed, I have tested it's a problem in set silhouettes command which cause headless-chimera to crush. the same is for the "preset" command. And the problem is on the step of the rendering of the image
Rendering high resolution image... ./structure.sh : ligne 70 : 3515 Erreur de segmentation (core dumped) chimera-batch ${pdb} ${temp}/chimera.${pdb_name}.com
and here is my script
set bgcol white set silhouette ~set depth ribscale licorice ribrep edged strand
#light options light contrast 0.4 light reflectivity 0.9
#structure pre-processing ksdssp #use this commands to re-orient PDB turn x 90 center view #turn y 20 center view turn z -80 center view move z -15
# make visualisation of b-factors rangecolor bfactor 2 blue 30 red 50 yellow
# make a png immage copy file ./B-factors_EvXynTS_apo_340K.png png width 800 height 600
Finally I just have checked it also in chimera-gui, everything works fine with the same commands!
чт, 28 мар. 2019 г. в 17:31, Elaine Meng <meng@cgl.ucsf.edu>:
Hi James, (1) The black outlines are silhouettes, so if silhouettes cause the problem there is no way around it. The preset also does some other things, however, so you could doublecheck just using the “set silhouettes” command instead of “preset.”
The image you attached is from the ribbon styles tutorial. The tutorial shows the commands you would need to make that image. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles.html>
Image description is "smooth ribbons, default lighting except decreased contrast and reflectivity” …corresponding to the the first two “set” commands in that tutorial (white background and black silhouettes) and the last two commands (lighting contrast and reflectivity).
(2) The “key” command option only enables interactive placement of a color key by hand using the GUI. Sorry, there is no option to place the color key directly, without human intervention. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rangecolor.html>
Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 28, 2019, at 4:11 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Dear Chimera users!
I am using headless version of Chimera inside of my Bash script to prepare images of the pdbs. Normally I provide a pdb file with a script in loop to obrain images automatically
Here are some of my questions related to the visualisation:
1) I have a problem with the "preset apply publication 1" notably Chimera is crushed when I use #set silhouette option Is it possible to make "a black border of a selected thickness" for all of the elements of secondary structure of my proteins via some another command? Actually in terms of the cartoon's style (but not a colour) I would like to obtain something like was shown here https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles-contras...
2) I am using "rangecolor bfactor 2 blue 30 red 50 yellow" option to colour the structure according to the B-factor information provided in the given PDB. The problem is when I provide "key" option for it to place a colour diagram on the resulted picture I ontain a crush in headless version. Do some other methods exist for the placement of the colour legend for the B-factor colouring which could be used in the headless version?
Thank you for help in avance!
James _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Eric’s idea for incorporating the color key if it’s the same in all your final images gave me a different crazy idea, but it might be slightly tricky to do on the headless system: (1) using the GUI version of Chimera, save an image of nothing but the white background with the color key on it, using the same image size as you plan to make your structure images on the headless machine (2) in Chimera preferences (still in the Chimera GUI), category: Background, set Background method: image, and use for the Background image: the file you saved in step #1, and then save preferences. Quit from the GUI Chimera. (3) the harder part: copy the image file to the headless machine, and edit the Chimera preferences file on that machine (you can look at the preferences file on the GUI machine as a guide to how to edit it) to use an image for the background, and to give the correct pathname for the image file on the headless machine. The default location of the preferences file (actually named “preferences”) is in a .chimera subdirectory of the user’s home directory. Elaine
On Mar 28, 2019, at 1:48 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
If your key is the same for all your images, there is a trick you can use. Use the regular Chimera graphical interface to draw the color key (Tools→Utilities→Color Key) positioned and looking the way you want with no other models open, then save an image. When saving the image, make sure to tick the “Transparent background” option in the Save-Image dialog (and make sure the image is the same size as your pipeline images). Then there are many possible image-processing programs you can use to superimpose that key on the images you are getting from your pipeline.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Mar 28, 2019, at 9:49 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Thank you so much, Elaine!
Yes, indeed, I have tested it's a problem in set silhouettes command which cause headless-chimera to crush. the same is for the "preset" command. And the problem is on the step of the rendering of the image
Rendering high resolution image... ./structure.sh : ligne 70 : 3515 Erreur de segmentation (core dumped) chimera-batch ${pdb} ${temp}/chimera.${pdb_name}.com
and here is my script
set bgcol white set silhouette ~set depth ribscale licorice ribrep edged strand
#light options light contrast 0.4 light reflectivity 0.9
#structure pre-processing ksdssp #use this commands to re-orient PDB turn x 90 center view #turn y 20 center view turn z -80 center view move z -15
# make visualisation of b-factors rangecolor bfactor 2 blue 30 red 50 yellow
# make a png immage copy file ./B-factors_EvXynTS_apo_340K.png png width 800 height 600
Finally I just have checked it also in chimera-gui, everything works fine with the same commands!
чт, 28 мар. 2019 г. в 17:31, Elaine Meng <meng@cgl.ucsf.edu>:
Hi James, (1) The black outlines are silhouettes, so if silhouettes cause the problem there is no way around it. The preset also does some other things, however, so you could doublecheck just using the “set silhouettes” command instead of “preset.”
The image you attached is from the ribbon styles tutorial. The tutorial shows the commands you would need to make that image. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles.html>
Image description is "smooth ribbons, default lighting except decreased contrast and reflectivity” …corresponding to the the first two “set” commands in that tutorial (white background and black silhouettes) and the last two commands (lighting contrast and reflectivity).
(2) The “key” command option only enables interactive placement of a color key by hand using the GUI. Sorry, there is no option to place the color key directly, without human intervention. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rangecolor.html>
Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 28, 2019, at 4:11 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Dear Chimera users!
I am using headless version of Chimera inside of my Bash script to prepare images of the pdbs. Normally I provide a pdb file with a script in loop to obrain images automatically
Here are some of my questions related to the visualisation:
1) I have a problem with the "preset apply publication 1" notably Chimera is crushed when I use #set silhouette option Is it possible to make "a black border of a selected thickness" for all of the elements of secondary structure of my proteins via some another command? Actually in terms of the cartoon's style (but not a colour) I would like to obtain something like was shown here https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles-contras...
2) I am using "rangecolor bfactor 2 blue 30 red 50 yellow" option to colour the structure according to the B-factor information provided in the given PDB. The problem is when I provide "key" option for it to place a colour diagram on the resulted picture I ontain a crush in headless version. Do some other methods exist for the placement of the colour legend for the B-factor colouring which could be used in the headless version?
Thank you for help in avance!
James

yes, thank you very much again for you very usefull suggestions! Indeed, I have created an image with transparent background containing of only the bar and than superimposed it using "composite" utility... чт, 28 мар. 2019 г. в 22:08, Elaine Meng <meng@cgl.ucsf.edu>:
Eric’s idea for incorporating the color key if it’s the same in all your final images gave me a different crazy idea, but it might be slightly tricky to do on the headless system:
(1) using the GUI version of Chimera, save an image of nothing but the white background with the color key on it, using the same image size as you plan to make your structure images on the headless machine
(2) in Chimera preferences (still in the Chimera GUI), category: Background, set Background method: image, and use for the Background image: the file you saved in step #1, and then save preferences. Quit from the GUI Chimera.
(3) the harder part: copy the image file to the headless machine, and edit the Chimera preferences file on that machine (you can look at the preferences file on the GUI machine as a guide to how to edit it) to use an image for the background, and to give the correct pathname for the image file on the headless machine.
The default location of the preferences file (actually named “preferences”) is in a .chimera subdirectory of the user’s home directory.
Elaine
On Mar 28, 2019, at 1:48 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
If your key is the same for all your images, there is a trick you can use. Use the regular Chimera graphical interface to draw the color key (Tools→Utilities→Color Key) positioned and looking the way you want with no other models open, then save an image. When saving the image, make sure to tick the “Transparent background” option in the Save-Image dialog (and make sure the image is the same size as your pipeline images). Then there are many possible image-processing programs you can use to superimpose that key on the images you are getting from your pipeline.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Mar 28, 2019, at 9:49 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Thank you so much, Elaine!
Yes, indeed, I have tested it's a problem in set silhouettes command which cause headless-chimera to crush. the same is for the "preset" command. And the problem is on the step of the rendering of the image
Rendering high resolution image... ./structure.sh : ligne 70 : 3515 Erreur de segmentation (core dumped) chimera-batch ${pdb} ${temp}/chimera.${pdb_name}.com
and here is my script
set bgcol white set silhouette ~set depth ribscale licorice ribrep edged strand
#light options light contrast 0.4 light reflectivity 0.9
#structure pre-processing ksdssp #use this commands to re-orient PDB turn x 90 center view #turn y 20 center view turn z -80 center view move z -15
# make visualisation of b-factors rangecolor bfactor 2 blue 30 red 50 yellow
# make a png immage copy file ./B-factors_EvXynTS_apo_340K.png png width 800 height 600
Finally I just have checked it also in chimera-gui, everything works fine with the same commands!
чт, 28 мар. 2019 г. в 17:31, Elaine Meng <meng@cgl.ucsf.edu>:
Hi James, (1) The black outlines are silhouettes, so if silhouettes cause the problem there is no way around it. The preset also does some other things, however, so you could doublecheck just using the “set silhouettes” command instead of “preset.”
The image you attached is from the ribbon styles tutorial. The tutorial shows the commands you would need to make that image. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles.html>
Image description is "smooth ribbons, default lighting except decreased contrast and reflectivity” …corresponding to the the first two “set” commands in that tutorial (white background and black silhouettes) and the last two commands (lighting contrast and reflectivity).
(2) The “key” command option only enables interactive placement of a color key by hand using the GUI. Sorry, there is no option to place the color key directly, without human intervention. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rangecolor.html>
Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 28, 2019, at 4:11 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Dear Chimera users!
I am using headless version of Chimera inside of my Bash script to prepare images of the pdbs. Normally I provide a pdb file with a script in loop to obrain images automatically
Here are some of my questions related to the visualisation:
1) I have a problem with the "preset apply publication 1" notably Chimera is crushed when I use #set silhouette option Is it possible to make "a black border of a selected thickness" for all of the elements of secondary structure of my proteins via some another command? Actually in terms of the cartoon's style (but not a colour) I would like to obtain something like was shown here https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles-contras...
2) I am using "rangecolor bfactor 2 blue 30 red 50 yellow" option to colour the structure according to the B-factor information provided in the given PDB. The problem is when I provide "key" option for it to place a colour diagram on the resulted picture I ontain a crush in headless version. Do some other methods exist for the placement of the colour legend for the B-factor colouring which could be used in the headless version?
Thank you for help in avance!
James

Just one question: is it possible to fix the bug resulting in crush while using "set silhouette" option in a script loaded with headless chimera ? just checked, everything works fine from GUI chimera but with headless version I usually have a crush on the final stage of the rendering of the immage Rendering high resolution image... ./structure.sh : ligne 70 : 19507 Erreur de segmentation (core dumped) thanks so much in advance! пт, 29 мар. 2019 г. в 16:45, James Starlight <jmsstarlight@gmail.com>:
yes, thank you very much again for you very usefull suggestions! Indeed, I have created an image with transparent background containing of only the bar and than superimposed it using "composite" utility...
чт, 28 мар. 2019 г. в 22:08, Elaine Meng <meng@cgl.ucsf.edu>:
Eric’s idea for incorporating the color key if it’s the same in all your final images gave me a different crazy idea, but it might be slightly tricky to do on the headless system:
(1) using the GUI version of Chimera, save an image of nothing but the white background with the color key on it, using the same image size as you plan to make your structure images on the headless machine
(2) in Chimera preferences (still in the Chimera GUI), category: Background, set Background method: image, and use for the Background image: the file you saved in step #1, and then save preferences. Quit from the GUI Chimera.
(3) the harder part: copy the image file to the headless machine, and edit the Chimera preferences file on that machine (you can look at the preferences file on the GUI machine as a guide to how to edit it) to use an image for the background, and to give the correct pathname for the image file on the headless machine.
The default location of the preferences file (actually named “preferences”) is in a .chimera subdirectory of the user’s home directory.
Elaine
On Mar 28, 2019, at 1:48 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
If your key is the same for all your images, there is a trick you can use. Use the regular Chimera graphical interface to draw the color key (Tools→Utilities→Color Key) positioned and looking the way you want with no other models open, then save an image. When saving the image, make sure to tick the “Transparent background” option in the Save-Image dialog (and make sure the image is the same size as your pipeline images). Then there are many possible image-processing programs you can use to superimpose that key on the images you are getting from your pipeline.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Mar 28, 2019, at 9:49 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Thank you so much, Elaine!
Yes, indeed, I have tested it's a problem in set silhouettes command which cause headless-chimera to crush. the same is for the "preset" command. And the problem is on the step of the rendering of the image
Rendering high resolution image... ./structure.sh : ligne 70 : 3515 Erreur de segmentation (core dumped) chimera-batch ${pdb} ${temp}/chimera.${pdb_name}.com
and here is my script
set bgcol white set silhouette ~set depth ribscale licorice ribrep edged strand
#light options light contrast 0.4 light reflectivity 0.9
#structure pre-processing ksdssp #use this commands to re-orient PDB turn x 90 center view #turn y 20 center view turn z -80 center view move z -15
# make visualisation of b-factors rangecolor bfactor 2 blue 30 red 50 yellow
# make a png immage copy file ./B-factors_EvXynTS_apo_340K.png png width 800 height 600
Finally I just have checked it also in chimera-gui, everything works fine with the same commands!
чт, 28 мар. 2019 г. в 17:31, Elaine Meng <meng@cgl.ucsf.edu>:
Hi James, (1) The black outlines are silhouettes, so if silhouettes cause the problem there is no way around it. The preset also does some other things, however, so you could doublecheck just using the “set silhouettes” command instead of “preset.”
The image you attached is from the ribbon styles tutorial. The tutorial shows the commands you would need to make that image. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles.html>
Image description is "smooth ribbons, default lighting except decreased contrast and reflectivity” …corresponding to the the first two “set” commands in that tutorial (white background and black silhouettes) and the last two commands (lighting contrast and reflectivity).
(2) The “key” command option only enables interactive placement of a color key by hand using the GUI. Sorry, there is no option to place the color key directly, without human intervention. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rangecolor.html>
Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 28, 2019, at 4:11 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Dear Chimera users!
I am using headless version of Chimera inside of my Bash script to prepare images of the pdbs. Normally I provide a pdb file with a script in loop to obrain images automatically
Here are some of my questions related to the visualisation:
1) I have a problem with the "preset apply publication 1" notably Chimera is crushed when I use #set silhouette option Is it possible to make "a black border of a selected thickness" for all of the elements of secondary structure of my proteins via some another command? Actually in terms of the cartoon's style (but not a colour) I would like to obtain something like was shown here https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles-contras...
2) I am using "rangecolor bfactor 2 blue 30 red 50 yellow" option to colour the structure according to the B-factor information provided in the given PDB. The problem is when I provide "key" option for it to place a colour diagram on the resulted picture I ontain a crush in headless version. Do some other methods exist for the placement of the colour legend for the B-factor colouring which could be used in the headless version?
Thank you for help in avance!
James

P.S. could you also suggest me how it would be possible to change pov-ray options working in Headless Chimera? I am using it with a simple script: # make visualisation of b-factors rangecolor bfactor 2 dark red 20 firebrick 40 orange red 60 orange 100 yellow # make a png immage copy file ${output}/structure/${pdb_name}.png png width 800 height 600 supersample 4 raytrace rtwait" > "${temp}/chimera.${pdb_name}.com" As the result I have an image with the alpha channel (although I indicated not to use it in my session via chimera-headless ${pdb} script.com --nobgopacity finally I would like to change some rendeting options using the same scripting work-flow like "Quality", "Antialias depth" etc пн, 1 апр. 2019 г. в 11:25, James Starlight <jmsstarlight@gmail.com>:
Just one question:
is it possible to fix the bug resulting in crush while using "set silhouette" option in a script loaded with headless chimera ? just checked, everything works fine from GUI chimera but with headless version I usually have a crush on the final stage of the rendering of the immage Rendering high resolution image... ./structure.sh : ligne 70 : 19507 Erreur de segmentation (core dumped)
thanks so much in advance!
пт, 29 мар. 2019 г. в 16:45, James Starlight <jmsstarlight@gmail.com>:
yes, thank you very much again for you very usefull suggestions! Indeed, I have created an image with transparent background containing of only the bar and than superimposed it using "composite" utility...
чт, 28 мар. 2019 г. в 22:08, Elaine Meng <meng@cgl.ucsf.edu>:
Eric’s idea for incorporating the color key if it’s the same in all your final images gave me a different crazy idea, but it might be slightly tricky to do on the headless system:
(1) using the GUI version of Chimera, save an image of nothing but the white background with the color key on it, using the same image size as you plan to make your structure images on the headless machine
(2) in Chimera preferences (still in the Chimera GUI), category: Background, set Background method: image, and use for the Background image: the file you saved in step #1, and then save preferences. Quit from the GUI Chimera.
(3) the harder part: copy the image file to the headless machine, and edit the Chimera preferences file on that machine (you can look at the preferences file on the GUI machine as a guide to how to edit it) to use an image for the background, and to give the correct pathname for the image file on the headless machine.
The default location of the preferences file (actually named “preferences”) is in a .chimera subdirectory of the user’s home directory.
Elaine
On Mar 28, 2019, at 1:48 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
If your key is the same for all your images, there is a trick you can use. Use the regular Chimera graphical interface to draw the color key (Tools→Utilities→Color Key) positioned and looking the way you want with no other models open, then save an image. When saving the image, make sure to tick the “Transparent background” option in the Save-Image dialog (and make sure the image is the same size as your pipeline images). Then there are many possible image-processing programs you can use to superimpose that key on the images you are getting from your pipeline.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Mar 28, 2019, at 9:49 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Thank you so much, Elaine!
Yes, indeed, I have tested it's a problem in set silhouettes command which cause headless-chimera to crush. the same is for the "preset" command. And the problem is on the step of the rendering of the image
Rendering high resolution image... ./structure.sh : ligne 70 : 3515 Erreur de segmentation (core dumped) chimera-batch ${pdb} ${temp}/chimera.${pdb_name}.com
and here is my script
set bgcol white set silhouette ~set depth ribscale licorice ribrep edged strand
#light options light contrast 0.4 light reflectivity 0.9
#structure pre-processing ksdssp #use this commands to re-orient PDB turn x 90 center view #turn y 20 center view turn z -80 center view move z -15
# make visualisation of b-factors rangecolor bfactor 2 blue 30 red 50 yellow
# make a png immage copy file ./B-factors_EvXynTS_apo_340K.png png width 800 height 600
Finally I just have checked it also in chimera-gui, everything works fine with the same commands!
чт, 28 мар. 2019 г. в 17:31, Elaine Meng <meng@cgl.ucsf.edu>:
Hi James, (1) The black outlines are silhouettes, so if silhouettes cause the problem there is no way around it. The preset also does some other things, however, so you could doublecheck just using the “set silhouettes” command instead of “preset.”
The image you attached is from the ribbon styles tutorial. The tutorial shows the commands you would need to make that image. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles.html>
Image description is "smooth ribbons, default lighting except decreased contrast and reflectivity” …corresponding to the the first two “set” commands in that tutorial (white background and black silhouettes) and the last two commands (lighting contrast and reflectivity).
(2) The “key” command option only enables interactive placement of a color key by hand using the GUI. Sorry, there is no option to place the color key directly, without human intervention. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rangecolor.html>
Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
> On Mar 28, 2019, at 4:11 AM, James Starlight <jmsstarlight@gmail.com> wrote: > > Dear Chimera users! > > I am using headless version of Chimera inside of my Bash script to > prepare images of the pdbs. Normally I provide a pdb file with a > script in loop to obrain images automatically > > Here are some of my questions related to the visualisation: > > 1) I have a problem with the "preset apply publication 1" > notably Chimera is crushed when I use #set silhouette option > Is it possible to make "a black border of a selected thickness" for > all of the elements of secondary structure of my proteins via some > another command? > Actually in terms of the cartoon's style (but not a colour) I would > like to obtain something like was shown here > https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/tutorials/ribstyles-contras... > > 2) I am using "rangecolor bfactor 2 blue 30 red 50 yellow" option to > colour the structure according to the B-factor information provided in > the given PDB. > The problem is when I provide "key" option for it to place a colour > diagram on the resulted picture I ontain a crush in headless version. > Do some other methods exist for the placement of the colour legend for > the B-factor colouring which could be used in the headless version? > > Thank you for help in avance! > > James

Hi James, In my experience, i get much better images just using Chimera rendering, not POVray. If you want shadows you can turn them on directly in Chimera (e.g. command: set shadows), and some Chimera settings are not relevant to POVray (silhouette edges, etc.). <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/print.html#tips> However, if you really want to use it, you can set POV-Ray Options in the Preferences, save the preferences, and then copy that preferences file to the headless machine. Still this is only a small subset of the things one could possibly change in povray, so if you’re a POVray expert you could fiddle with the POVray conf file (see Chimera Log for where this would be), and possibly re-run povray directly using the Chimera-generated .ini and .pov files (from the “copy” command with “raytrace”). <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/copy.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 Apr 1, 2019, at 2:58 AM, James Starlight <jmsstarlight@gmail.com> wrote:
P.S. could you also suggest me how it would be possible to change pov-ray options working in Headless Chimera?
I am using it with a simple script:
# make visualisation of b-factors rangecolor bfactor 2 dark red 20 firebrick 40 orange red 60 orange 100 yellow
# make a png immage copy file ${output}/structure/${pdb_name}.png png width 800 height 600 supersample 4 raytrace rtwait" > "${temp}/chimera.${pdb_name}.com"
As the result I have an image with the alpha channel (although I indicated not to use it in my session via chimera-headless ${pdb} script.com --nobgopacity
finally I would like to change some rendeting options using the same scripting work-flow like "Quality", "Antialias depth" etc

Thank you very much, Elaine! The only thing is to understand why "set silhouette" produces crush at the stage of the image rendering both with chimera-headless or pow-ray rendering ;o пн, 1 апр. 2019 г. в 20:10, Elaine Meng <meng@cgl.ucsf.edu>:
Hi James, In my experience, i get much better images just using Chimera rendering, not POVray. If you want shadows you can turn them on directly in Chimera (e.g. command: set shadows), and some Chimera settings are not relevant to POVray (silhouette edges, etc.). <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/print.html#tips>
However, if you really want to use it, you can set POV-Ray Options in the Preferences, save the preferences, and then copy that preferences file to the headless machine. Still this is only a small subset of the things one could possibly change in povray, so if you’re a POVray expert you could fiddle with the POVray conf file (see Chimera Log for where this would be), and possibly re-run povray directly using the Chimera-generated .ini and .pov files (from the “copy” command with “raytrace”). <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/copy.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 Apr 1, 2019, at 2:58 AM, James Starlight <jmsstarlight@gmail.com> wrote:
P.S. could you also suggest me how it would be possible to change pov-ray options working in Headless Chimera?
I am using it with a simple script:
# make visualisation of b-factors rangecolor bfactor 2 dark red 20 firebrick 40 orange red 60 orange 100 yellow
# make a png immage copy file ${output}/structure/${pdb_name}.png png width 800 height 600 supersample 4 raytrace rtwait" > "${temp}/chimera.${pdb_name}.com"
As the result I have an image with the alpha channel (although I indicated not to use it in my session via chimera-headless ${pdb} script.com --nobgopacity
finally I would like to change some rendeting options using the same scripting work-flow like "Quality", "Antialias depth" etc

The crash due to "set silhouette" is probably due to the ancient version of libOSMesa.so that is bundled with Chimera. See my earlier response to you, that I mistakenly only sent to the mailing list: http://plato.cgl.ucsf.edu/pipermail/chimera-users/2019-March/015584.html. And if you're going to use povray for the final image, then "set silhouette" doesn't help you, as that setting is not exported, so you could remove it and not crash :-). Bonne chance, Greg On 4/2/2019 12:39 AM, James Starlight wrote:
Thank you very much, Elaine! The only thing is to understand why "set silhouette" produces crush at the stage of the image rendering both with chimera-headless or pow-ray rendering ;o
пн, 1 апр. 2019 г. в 20:10, Elaine Meng <meng@cgl.ucsf.edu>:
Hi James, In my experience, i get much better images just using Chimera rendering, not POVray. If you want shadows you can turn them on directly in Chimera (e.g. command: set shadows), and some Chimera settings are not relevant to POVray (silhouette edges, etc.). <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/print.html#tips>
However, if you really want to use it, you can set POV-Ray Options in the Preferences, save the preferences, and then copy that preferences file to the headless machine. Still this is only a small subset of the things one could possibly change in povray, so if you’re a POVray expert you could fiddle with the POVray conf file (see Chimera Log for where this would be), and possibly re-run povray directly using the Chimera-generated .ini and .pov files (from the “copy” command with “raytrace”). <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/copy.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 Apr 1, 2019, at 2:58 AM, James Starlight <jmsstarlight@gmail.com> wrote:
P.S. could you also suggest me how it would be possible to change pov-ray options working in Headless Chimera?
I am using it with a simple script:
# make visualisation of b-factors rangecolor bfactor 2 dark red 20 firebrick 40 orange red 60 orange 100 yellow
# make a png immage copy file ${output}/structure/${pdb_name}.png png width 800 height 600 supersample 4 raytrace rtwait" > "${temp}/chimera.${pdb_name}.com"
As the result I have an image with the alpha channel (although I indicated not to use it in my session via chimera-headless ${pdb} script.com --nobgopacity
finally I would like to change some rendeting options using the same scripting work-flow like "Quality", "Antialias depth" etc
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Thanks Greg! So I need to update libOSMesa.so in the /lib of my chimera-headles, needn't it? Actually I have found only libOSMesa.so in the lib of chimera-headless but not in the ChimeraX - I have version 1.13.1 installed in parallel on my ubuntu machine... вт, 2 апр. 2019 г. в 18:20, Greg Couch <gregc@cgl.ucsf.edu>:
The crash due to "set silhouette" is probably due to the ancient version of libOSMesa.so that is bundled with Chimera. See my earlier response to you, that I mistakenly only sent to the mailing list: http://plato.cgl.ucsf.edu/pipermail/chimera-users/2019-March/015584.html.
And if you're going to use povray for the final image, then "set silhouette" doesn't help you, as that setting is not exported, so you could remove it and not crash :-).
Bonne chance,
Greg
On 4/2/2019 12:39 AM, James Starlight wrote:
Thank you very much, Elaine! The only thing is to understand why "set silhouette" produces crush at the stage of the image rendering both with chimera-headless or pow-ray rendering ;o
пн, 1 апр. 2019 г. в 20:10, Elaine Meng <meng@cgl.ucsf.edu>:
Hi James, In my experience, i get much better images just using Chimera rendering, not POVray. If you want shadows you can turn them on directly in Chimera (e.g. command: set shadows), and some Chimera settings are not relevant to POVray (silhouette edges, etc.). <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/print.html#tips>
However, if you really want to use it, you can set POV-Ray Options in the Preferences, save the preferences, and then copy that preferences file to the headless machine. Still this is only a small subset of the things one could possibly change in povray, so if you’re a POVray expert you could fiddle with the POVray conf file (see Chimera Log for where this would be), and possibly re-run povray directly using the Chimera-generated .ini and .pov files (from the “copy” command with “raytrace”). <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/copy.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 Apr 1, 2019, at 2:58 AM, James Starlight <jmsstarlight@gmail.com> wrote:
P.S. could you also suggest me how it would be possible to change pov-ray options working in Headless Chimera?
I am using it with a simple script:
# make visualisation of b-factors rangecolor bfactor 2 dark red 20 firebrick 40 orange red 60 orange 100 yellow
# make a png immage copy file ${output}/structure/${pdb_name}.png png width 800 height 600 supersample 4 raytrace rtwait" > "${temp}/chimera.${pdb_name}.com"
As the result I have an image with the alpha channel (although I indicated not to use it in my session via chimera-headless ${pdb} script.com --nobgopacity
finally I would like to change some rendeting options using the same scripting work-flow like "Quality", "Antialias depth" etc
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

You have Chimera 1.13.1, not ChimeraX. ChimeraX is our eventual replacement for Chimera and "early releases" are available from https://www.cgl.ucsf.edu/chimerax/. ChimeraX's scripting is similar to Chimera, and the graphics are much better. -- Greg On 4/3/2019 12:51 AM, James Starlight wrote:
Thanks Greg! So I need to update libOSMesa.so in the /lib of my chimera-headles, needn't it? Actually I have found only libOSMesa.so in the lib of chimera-headless but not in the ChimeraX - I have version 1.13.1 installed in parallel on my ubuntu machine...
вт, 2 апр. 2019 г. в 18:20, Greg Couch <gregc@cgl.ucsf.edu>:
The crash due to "set silhouette" is probably due to the ancient version of libOSMesa.so that is bundled with Chimera. See my earlier response to you, that I mistakenly only sent to the mailing list: http://plato.cgl.ucsf.edu/pipermail/chimera-users/2019-March/015584.html.
And if you're going to use povray for the final image, then "set silhouette" doesn't help you, as that setting is not exported, so you could remove it and not crash :-).
Bonne chance,
Greg
On 4/2/2019 12:39 AM, James Starlight wrote:
Thank you very much, Elaine! The only thing is to understand why "set silhouette" produces crush at the stage of the image rendering both with chimera-headless or pow-ray rendering ;o
пн, 1 апр. 2019 г. в 20:10, Elaine Meng <meng@cgl.ucsf.edu>:
Hi James, In my experience, i get much better images just using Chimera rendering, not POVray. If you want shadows you can turn them on directly in Chimera (e.g. command: set shadows), and some Chimera settings are not relevant to POVray (silhouette edges, etc.). <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/print.html#tips>
However, if you really want to use it, you can set POV-Ray Options in the Preferences, save the preferences, and then copy that preferences file to the headless machine. Still this is only a small subset of the things one could possibly change in povray, so if you’re a POVray expert you could fiddle with the POVray conf file (see Chimera Log for where this would be), and possibly re-run povray directly using the Chimera-generated .ini and .pov files (from the “copy” command with “raytrace”). <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/copy.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 Apr 1, 2019, at 2:58 AM, James Starlight <jmsstarlight@gmail.com> wrote:
P.S. could you also suggest me how it would be possible to change pov-ray options working in Headless Chimera?
I am using it with a simple script:
# make visualisation of b-factors rangecolor bfactor 2 dark red 20 firebrick 40 orange red 60 orange 100 yellow
# make a png immage copy file ${output}/structure/${pdb_name}.png png width 800 height 600 supersample 4 raytrace rtwait" > "${temp}/chimera.${pdb_name}.com"
As the result I have an image with the alpha channel (although I indicated not to use it in my session via chimera-headless ${pdb} script.com --nobgopacity
finally I would like to change some rendeting options using the same scripting work-flow like "Quality", "Antialias depth" etc
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
participants (4)
-
Elaine Meng
-
Eric Pettersen
-
Greg Couch
-
James Starlight