[Chimera-users] Create custom macros / commands

Thomas Hrabe thrabe at sanfordburnham.org
Tue Apr 9 11:15:52 PDT 2013


Thanks,
I guess the links will suffice for what I am looking for.

Cheers,
Thomas


On Apr 9, 2013, at 11:13 AM, Eric Pettersen <pett at cgl.ucsf.edu<mailto:pett at cgl.ucsf.edu>>
 wrote:

Hi Thomas,
As a short addendum to Elaine's answer, if the things you want to do can't be performed as a series of currently-available commands then you would need to resort to implementing a command yourself in Python.  This is described in the "Adding Command-Line Commands" example in the programmer's guide:

http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/index.html

--Eric


                        Eric Pettersen
                        UCSF Computer Graphics Lab
                        http://www.cgl.ucsf.edu<http://www.cgl.ucsf.edu/>


On Apr 9, 2013, at 8:50 AM, Elaine Meng wrote:

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.
<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/alias.html>

(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.
<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/preferences.html#Presets>
<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/preset.html>

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


_______________________________________________
Chimera-users mailing list
Chimera-users at cgl.ucsf.edu<mailto:Chimera-users at cgl.ucsf.edu>
http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20130409/7ad420c4/attachment-0001.html>


More information about the Chimera-users mailing list