[Chimera-users] automating a task

Elaine Meng meng at cgl.ucsf.edu
Tue Mar 24 08:09:51 PDT 2020


Hi Dieter,
You can use the command "scolor" in a Chimera command script:
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/scolor.html>

... and for gradient specifically:
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/scolor.html#gradient>

For example, something like this for volume #2 (see docs for other options) and then repeat for all other models you want to color the same way: 

scolor #2 gradient #2 cmap rainbow

Generally  if you want to know if there is a command equivalent for a tool and what that command is, just click the Help button on the tool dialog.  The help page for that tool will say something like "is also implemented as the command [blah]."

For example, it's in the first few paragraphs on the Surface Color page:
<http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/surfcolor/surfcolor.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 Mar 23, 2020, at 10:32 PM, Dieter Blaas <dieter.blaas at meduniwien.ac.at> wrote:
> 
> Dear Elaine and all,
> 
>       I need to run the following repeatedly on five loaded volumes (x1.mrc, x2.mrc, x3.mrc, x4.mrc, and x5.mrc) each time with a different x:
> 
> Tools > Volume Data > Surface Color >  Color Surface x1.mrc by volume data gradient norm volume file x1.mrc > options set > color
> 
>  The colors and palette settings remain the same for all runs.
> 
> Is there a way of automating this with a script? I have tried to save the session, change all occurrences of x for the different x but on evoking the modified python script all volumes are shown in the correct arrangement and level but not coloured and I get the Chimera Warning:
> 
> Could not restore surface color on surface model with id 0.0 because volume used in colouring was not restored
> 
> Thank you very much, stay healthy!
> 
> Dieter




More information about the Chimera-users mailing list