[Chimera-users] Create custom macros / commands

Elaine Meng meng at cgl.ucsf.edu
Tue Apr 9 08:50:28 PDT 2013

Hi Thomas,
Yes and yes.  There are at least a couple ways...

(a) the "alias" command: you can alias some short string to a longer string, which could be an atom specification, or an entire command with or without arguments, or even multiple commands joined together with semicolons.  Aliases are saved in the preferences file, and all can be used in the command line.  In addition, start-of-line aliases indicated with "hat" symbol ^ and that do not require arguments (see documentation) are put into a top-level Aliases menu.

(b) custom presets (Chimera 1.7 and newer):  you can create Chimera command files and/or Python files to be treated as macros, and then specify their location to Chimera (menu Presets... Add Custom Presets).  Although we are calling them presets, in principle you could put any commands in there. This mechanism doesn't allow for argument substitution but it would be reasonable to include generic atom specifications (e.g. "protein" "sel" etc.).  Your custom presets can be accessed from the Presets menu and with the "preset" command.

I hope this helps,
Elaine C. Meng, Ph.D. 
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco

On Apr 8, 2013, at 6:14 PM, Thomas Hrabe wrote:

> Hi everyone,
> I wanted to know if custom "chimera command line" commands / macros can be created by a user?
> Is there any documentation available on that?
> Thanks,
> Thomas

More information about the Chimera-users mailing list