[Chimera-users] Select residue by array index, not residue id

Eric Pettersen pett at cgl.ucsf.edu
Tue Mar 3 11:11:08 PST 2015


On Mar 2, 2015, at 5:25 PM, Thomas Hrabe <thrabe at sanfordburnham.org> wrote:

> Hi everyone,
> 
> is there a way to select a residue by it’s array index, starting at 0 -> sequence length rather than using the residue id?

Hi Thomas,
	I think the answer is no, using only normal Chimera commands.  However a simple Python script can do it, and such a script can be executed with the "runscript" command.  I have attached a script that takes a model number and a residue index as arguments and selects the corresponding residue.  If you put the script in your home directory then "runscript ~/selres.py 0 12" would select the 13th residue (input order) in model 0.

--Eric

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20150303/a01464f4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: selres.py
Type: text/x-python-script
Size: 290 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20150303/a01464f4/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20150303/a01464f4/attachment-0001.html>


More information about the Chimera-users mailing list