[Chimera-users] Custom presets

Elaine Meng meng at cgl.ucsf.edu
Mon May 19 16:45:46 PDT 2014


Hi Oliver,
You could "hard-code" a model number or list of model numbers into a preset by simply including them in the commands in the preset definition file (e.g., one line in the file could be something like: color red,r #0).  Choosing the preset is the same as executing all the commands in the file.  For many commands, if you don't include a command-line atom specification, they will apply to all applicable items (e.g.: color red).  Similarly, the volume command takes specific model numbers or the word "all" to mean all currently open volume models.

If you mean you want to specify model number on the fly at the time of invoking a macro, that can only be done with aliases.  See the "alias" documentation for how to specify arguments to your macro:
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/alias.html>

One semi-exception to the above is that you could use the word "sel" in many commands to mean the currently selected models or atoms.  Then, you can interactively select only the parts of interest to be subsequently acted upon by the commands in your alias or preset that have "sel" as the atom/model specification.  See the individual command man pages for how atoms/models are specified, as sometimes the specification needs to be preceded by a keyword.
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/selection.html>
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/framecommand.html>

You can test your commands in the command line and then save them to a file using the command history, and/or test Chimera command files (*.com,*.cmd) and Python files (*.py) by simply opening them with File… Open.
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/history.html>
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/filetypes.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 May 19, 2014, at 4:18 PM, Oliver Clarke <olibclarke at gmail.com> wrote:

> Hi Elaine,
> Thanks for the info! How do I specify the model or map number in the preset command? Is there a wildcard I can use? 
> Usually I would be specifying the model or map number explicitly in any commands that I use, but presets seem to be applied to all open models or maps - how do I do that?
> Best,
> Oliver.
> On May 19, 2014, at 1:00 PM, Elaine Meng <meng at cgl.ucsf.edu> wrote:





More information about the Chimera-users mailing list