[Chimera-users] Setting selection mode command line

Elaine Meng meng at cgl.ucsf.edu
Mon Dec 16 09:51:46 PST 2013


Hi Rebecca,
As far as I know, you cannot change the selection mode in a command.  However, with commands you can often circumvent selection entirely, or in the few cases where you can't easily do that (for example, the "findhbond" command uses selections), there are sometimes alternative routes to achieving the same result.   In the command line, you can make a selection and then use ~select to deselect only part of it.  Sometimes instead of selections you can use aliases and combinations of aliases.  For writing a subset of the coordinates, you could undisplay the unwanted atoms and use the corresponding option to the "write" command to exclude them from the output.  Or, depending on exactly what you are doing, you could just delete the unwanted atoms before saving to a file.

<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/select.html#newer>
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/alias.html>
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/write.html>

Avoiding selection may be one of the advantages of commands, since (as you found) drawing the selection outlines can make things slow.

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 Dec 16, 2013, at 8:13 AM, rswett at chem.wayne.edu wrote:

> Hi all,
> I'm interested in putting together a script that will open several large pdb files, select some very specific pieces of those files and save the output to another file. The problem is that they are large files and unwieldy in a graphics window. I have no problem generating the commands to select the regions I'm interested in, but I still need to be able to switch selection modes in between commands. Is there a way to change the selection mode at the command line without navigating the selection menu?
> Rebecca



More information about the Chimera-users mailing list