Re: [Chimera-users] Batch mode for Chimera
Hi Greg, I am using Ubuntu with Nvidia driver. I have updated all those packages and copy files to chimera_batch lib dir but it was the same effect. then I found that the problem was hidden in my batch script! "preset apply pub 2" produced that crash ! but if I change it to "preset app int all" everything is fine. P.S. as I found in the resulted images on the default the protein is aligned along its Z vector. Is it possible to turn it via some command to display in-front or in the pseudo-isometrical projection? Thanks!! Gleb 2017-09-04 10:08 GMT+02:00 James Starlight <jmsstarlight@gmail.com>:
Hi Greg,
I am using Ubuntu with Nvidia driver.
I have updated all those packages and copy files to chimera_batch lib dir but it was the same effect.
then I found that the problem was hidden in my batch script! "preset apply pub 2" produced that crash ! but if I change it to "preset app int all" everything is fine.
P.S. as I found in the resulted images on the default the protein is aligned along its Z vector. Is it possible to turn it via some command to display in-front or in the pseudo-isometrical projection?
Thanks!!
Gleb
2017-09-03 2:58 GMT+02:00 Greg Couch <gregc@cgl.ucsf.edu>:
My guess is it is a graphics driver problem.
We haven't updated the software OpenGL driver that is bundled with the headless Chimera in ages (Mesa 7.6.1), but we have updated Chimera's use of OpenGL. Chances are that your Linux server has newer version. So assuming you don't have a graphics driver installed, you should try moving aside the libGL.so* and libOSMesa.so* files in your /home/gleb/.local/UCSF-Chimera64-batch/lib directory so chimera will use the system versions. You might need to install those libraries on your system. On CentOS/RHEL, they are the mesa-libOSMesa and mesa-libGL packages. On Debian/Ubuntu, they are the libosmesa6 and libgl1-mesa-dev packages.
If you have an AMD/NVIDIA graphics driver installed, then you will want to copy the Mesa versions of libGL.so and libOSMesa.so to your /home/gleb/.local/UCSF-Chimera64-batch/lib directory. On CentOS/RHEL, the AMD/NVIDIA installers should have moved the Mesa versions aside somewhere, so they could be restored with the driver is uninstalled -- it will take some detective work to find them. On Ubuntu, the libGL.so* files are in /usr/lib/x86_64-linux-gnu/mesa/.
HTH,
Greg
On 9/1/2017 1:23 AM, James Starlight wrote:
now the errors of the execution of the script using headless chimera:
Opening rmsf_visu_AT1_dry_apo.2rep.step7_1.pdb... The following problems occurred while reading PDB file for rmsf_visu_AT1_dry_apo.2rep.step7_1.pdb warning: Ignored bad PDB record found on line 2
Opened rmsf_visu_AT1_dry_apo.2rep.step7_1.pdb containing 1 model, 903 atoms, and 301 residues Rendering high resolution image... ./run.sh: line 113: 14479 Segmentation fault (core dumped) chimera_batch $pdb "${temp}"/script_${name}.cmd
the same with a pow-ray render
Opened rmsf_visu_AT1_wat_Na.3rep.step7_1.pdb containing 1 model, 903 atoms, and 301 residues Generating POV-Ray data file Exporting POV-Ray data to
/home/gleb/Desktop/Scripts/MegaAnalysis/output/plots/rmsf/rmsf_AT1_wat_Na.3rep.pov Ignoring CHIMERA environment variable Parse error at line 1: no element found
here is my script:
preset apply publication 2 rangecolor bfactor 2 blue 30 red 50 yellow copy file /home/gleb/Desktop/Scripts/MegaAnalysis/output/plots/rmsf/AT1_wat_apo.3rep.png png width 800 height 600
I have made the same images in chimera GUI and it worked very well.
Is it possible to run same script using in chimera-gui but from batch mode?
2017-08-31 22:04 GMT+02:00 Greg Couch <gregc@cgl.ucsf.edu>:
You must have the given the "key" argument to the rangecolor command. That option tries to display the Color Key tool which want you to use the mouse to position the color key in the graphics window. That is not possible in batch mode. You'll need to add the color key afterwards with an image editor if you need it.
HTH,
Greg
On 08/31/2017 01:00 AM, James Starlight wrote:
Thanks Eric!
Everything works fine with the exception of the copy command. On the rendering stage I have:
Opened AT1_dry_apo.1rep.step7_1.pdb containing 1 model, 57791 atoms, and 12661 residues Traceback (most recent call last): File "/home/gleb/.local/UCSF-Chimera64-batch/share/chimeraInit.py", line 683, in init chimera.openModels.open(a, prefixableType=1) File "/home/gleb/.local/UCSF-Chimera64-batch/share/chimera/__init__.py", line 1951, in open models = func(filename, *args, **kw) File
"/home/gleb/.local/UCSF-Chimera64-batch/share/Midas/ChimeraExtension.py", line 31, in func processCommandFile(fileName) File "/home/gleb/.local/UCSF-Chimera64-batch/share/Midas/midas_text.py", line 108, in processCommandFile _processFile(f, emulateRead, filename) File "/home/gleb/.local/UCSF-Chimera64-batch/share/Midas/midas_text.py", line 143, in _processFile if makeCommand(line): File "/home/gleb/.local/UCSF-Chimera64-batch/share/Midas/midas_text.py", line 69, in makeCommand f(c, args) File "/home/gleb/.local/UCSF-Chimera64-batch/share/Midas/midas_text.py", line 1786, in doRangeColor showKey=key) File "/home/gleb/.local/UCSF-Chimera64-batch/share/Midas/__init__.py", line 2526, in rangeColor from Ilabel.gui import IlabelDialog File "/home/gleb/.local/UCSF-Chimera64-batch/share/Ilabel/gui.py", line 13, in <module> from chimera import tkgui, chimage, CLOSE_SESSION File "/home/gleb/.local/UCSF-Chimera64-batch/share/chimera/tkgui.py", line 74, in <module> import Togl ImportError: No module named Togl
Error while processing
/home/gleb/Desktop/Scripts/MegaAnalysis/temp/script_AT1_dry_apo.1rep.step7_1.pdb.cmd: ImportError: No module named Togl
File "/home/gleb/.local/UCSF-Chimera64-batch/share/chimera/tkgui.py", line 74, in <module> import Togl
See reply log for Python traceback.
I have found that it is due to some conflict in PYTHONPATH from my bash since I am running Chimera directly from BASH. The people also wrote that Its related to setting transparency- which was not a case there - I did not set in my script. Anyway how to fix it?
Thanks you!
James
2017-08-30 22:54 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu>:
Hi James, First, if you want to save images without showing the Chimera GUI then you have to use the “headless” version of Chimera, available on the download page. To do the other things you want, just put the equivalent commands in a file that ends in “.cmd” and just add that file to your invocation of Chimera, e.g.:
chimera $pdb script.cmd
The easiest way to handle the image file name is probably to used a fixed name in the Chimera “copy” command, and then in your bash script move that file to the final name you want. Also, "preset” is the command to apply presets — “help preset” in Chimera for more info.
Hope this helps.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Aug 30, 2017, at 8:40 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Dear Chimera Users!
My simple bash script loops the folder with the pdbs and open it in Chimera
for pdb in ${output}/xtc_proc/*.pdb ; do name=$(basename "$pdb") echo "I am sending ${name} to Chimera!" chimera $pdb done
My question - can I use with chimera some batch file which will apply the following commands to each of the loaded pdbs without opening of Chimera GUI:
1- Apply "publications-2" preset
2 - rangecolor bfactor key 2 blue 30 red 50 yellow # color pdb according to b-factor provided in the pdb file
3- make a screen-shot of the colored cartoon figure in the selected output folder.
I thanks so much for the example of batch file and the syntax accepted by chimera from the linux shell.
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
Hi Gleb, Maybe that makes sense, because the “pub” presets use some fancier display settings (compared to the interactive presets) that may be more likely to reveal graphics driver problems. If you already know the degrees of rotation that you want, you can just use the “turn” command in your script. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/turn.html> If you have a whole bunch of different proteins and you don’t know ahead of time how much rotation will make a better image of each one, it becomes more difficult. You might be able to devise something more general by defining the protein long axis (“define axis” command), “align” command to align it along the line of sight, “turn” to rotate 90 degrees (and then perhaps ~define to get rid of the axis). <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/define.html> <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/align.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 Sep 4, 2017, at 1:09 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Hi Greg,
I am using Ubuntu with Nvidia driver.
I have updated all those packages and copy files to chimera_batch lib dir but it was the same effect.
then I found that the problem was hidden in my batch script! "preset apply pub 2" produced that crash ! but if I change it to "preset app int all" everything is fine.
P.S. as I found in the resulted images on the default the protein is aligned along its Z vector. Is it possible to turn it via some command to display in-front or in the pseudo-isometrical projection?
Thanks!!
Gleb
Thank you, Elaine! Regarding presets Is it possible to define step-by-step some commands to obtain something like preset 2 visualization state? Gleb 2017-09-05 18:54 GMT+02:00 Elaine Meng <meng@cgl.ucsf.edu>:
Hi Gleb, Maybe that makes sense, because the “pub” presets use some fancier display settings (compared to the interactive presets) that may be more likely to reveal graphics driver problems.
If you already know the degrees of rotation that you want, you can just use the “turn” command in your script. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/turn.html>
If you have a whole bunch of different proteins and you don’t know ahead of time how much rotation will make a better image of each one, it becomes more difficult. You might be able to devise something more general by defining the protein long axis (“define axis” command), “align” command to align it along the line of sight, “turn” to rotate 90 degrees (and then perhaps ~define to get rid of the axis).
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/define.html> <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/align.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 Sep 4, 2017, at 1:09 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Hi Greg,
I am using Ubuntu with Nvidia driver.
I have updated all those packages and copy files to chimera_batch lib dir but it was the same effect.
then I found that the problem was hidden in my batch script! "preset apply pub 2" produced that crash ! but if I change it to "preset app int all" everything is fine.
P.S. as I found in the resulted images on the default the protein is aligned along its Z vector. Is it possible to turn it via some command to display in-front or in the pseudo-isometrical projection?
Thanks!!
Gleb
Hi Gleb, Yes, but then you don’t know which one of those commands might show the graphics driver problem! I guess you can experiment with which parts will work. The descriptions of the presets say what they include: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/preset.html> Then you can identify individual commands to do those things. Most of the stuff is in the “set” command, see <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/set.html> Publication preset 2 includes white background and silhouette edges, commands: set bgcol white set silhouette It also turns off depth-cueing (mist): ~set depth … and changes to “licorice” style ribbons (which doesn’t show helix and strand differently): ribscale licorice You might also be interested in other “set” options (see link above), and “lighting”: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/lighting.html> Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Sep 6, 2017, at 12:49 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Thank you, Elaine!
Regarding presets Is it possible to define step-by-step some commands to obtain something like preset 2 visualization state?
Gleb
Thank you so much, Elaine! 2017-09-06 18:34 GMT+02:00 Elaine Meng <meng@cgl.ucsf.edu>:
Hi Gleb, Yes, but then you don’t know which one of those commands might show the graphics driver problem! I guess you can experiment with which parts will work. The descriptions of the presets say what they include: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/preset.html>
Then you can identify individual commands to do those things. Most of the stuff is in the “set” command, see <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/set.html>
Publication preset 2 includes white background and silhouette edges, commands:
set bgcol white set silhouette
It also turns off depth-cueing (mist):
~set depth
… and changes to “licorice” style ribbons (which doesn’t show helix and strand differently):
ribscale licorice
You might also be interested in other “set” options (see link above), and “lighting”: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/lighting.html>
Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Sep 6, 2017, at 12:49 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Thank you, Elaine!
Regarding presets Is it possible to define step-by-step some commands to obtain something like preset 2 visualization state?
Gleb
P.S. That option was the source of the problem - #set silhouette 2017-09-08 10:22 GMT+02:00 James Starlight <jmsstarlight@gmail.com>:
Thank you so much, Elaine!
2017-09-06 18:34 GMT+02:00 Elaine Meng <meng@cgl.ucsf.edu>:
Hi Gleb, Yes, but then you don’t know which one of those commands might show the graphics driver problem! I guess you can experiment with which parts will work. The descriptions of the presets say what they include: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/preset.html>
Then you can identify individual commands to do those things. Most of the stuff is in the “set” command, see <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/set.html>
Publication preset 2 includes white background and silhouette edges, commands:
set bgcol white set silhouette
It also turns off depth-cueing (mist):
~set depth
… and changes to “licorice” style ribbons (which doesn’t show helix and strand differently):
ribscale licorice
You might also be interested in other “set” options (see link above), and “lighting”: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/lighting.html>
Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Sep 6, 2017, at 12:49 AM, James Starlight <jmsstarlight@gmail.com> wrote:
Thank you, Elaine!
Regarding presets Is it possible to define step-by-step some commands to obtain something like preset 2 visualization state?
Gleb
participants (2)
-
Elaine Meng
-
James Starlight