[Chimera-users] scripting: howto add IDATM labels

Elaine Meng meng at cgl.ucsf.edu
Wed Nov 15 09:30:15 PST 2017


Hello wpron,
Before putting the commands into your python script, you should of course try entering them directly as commands and seeing if they do what you want. There is always some trial and error (we can’t write all the exact commands you will need for your  specific situation).

(1) adding IDATM labels to atoms:
labelopt info idatmType
label [atomspec]
…where atomspec is command-line specifier for specific atoms, or blank for all atoms
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/labelopt.html>
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/label.html>
command-line specification:
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/frameatom_spec.html>

See also Preferences (from Favorites menu), category: Labels for setting size/font of these atom labels.  There is no command for this, sorry, but you can save the preferences beforehand and then use them when running your script.  Atom label color can be changed with command “color” using “,l” appended to the color name.
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/color.html>

(2) add a label in the upper right/left corner: see command “2dlabels” which has its own size/font/color controls
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/2dlabels.html>

(3) make image nice:  this is very subjective.  See “Tips on preparing images” which covers several topics and links to the commands for each topic.
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/print.html#tips>

There are also some image tutorials with various commands in them, and some of the Image Gallery entries have details on what settings were used:
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/frametut.html>
<http://www.rbvi.ucsf.edu/chimera/ImageGallery/>

(4) save image as png: see command “copy”
<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 Nov 15, 2017, at 5:45 AM, Wiktor Pronobis <wiktor.pronobis at gmail.com> wrote:
> 
> Hi all,
> I have a python script and want to know, how do I 
> 1. add IDATM labels to the atoms
> 2. add a label in the upper right/left corner
> 3. make image nicer
> 4. save image as png
> 
> I use the command 
> "from chimera import runCommand as rc"
> and then "rc(COMMAND)"
> 
> What should COMMAND be for my questions 1. - 4.?
> 
> Thanks in advance,
> wpron




More information about the Chimera-users mailing list