[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
command-line specification:

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.

(2) add a label in the upper right/left corner: see command “2dlabels” which has its own size/font/color controls

(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.

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:

(4) save image as png: see command “copy”

I hope this helps,
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