[Chimera-users] How can I load a list of residues of protein?
Elaine Meng
meng at cgl.ucsf.edu
Tue Oct 30 08:18:06 PDT 2018
Hi Wen-Shyong,
Yes, you can do combinations (and/or/not) in command-line atom specifications, see explanation and examples at:
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/atom_spec.html#combinations>
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/framecommand.html>
Also aliases can be combinations of aliases. If you already defined (with alias) set1 and set2, something similar to your example would be
alias combined set1 | set2
alias intersected set1 & ~ set2
I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco
> On Oct 29, 2018, at 9:28 PM, Paris Tzou <paristzou at gmail.com> wrote:
>
> Is it possible to do set operation like
> alias common_set set_A & set_B
> alias subtract_set set A not set_B
> Thanks a lot
> Wen-Shyong
>
> Elaine Meng <meng at cgl.ucsf.edu> 於 2018年10月29日 週一 上午12:12寫道:
> Hi Paris,
> What do you want to do with these residues, only select them? You could just make that list into a command file. E.g.
>
> select :15.c
> select :16.c
>
> (etc.) and name this plain text file something.cmd or something.com. Then opening it will execute the commands. By default each selection command will replace the previous (so that would only select one residue at a time) but if you first choose menu: "Select… Selection mode… append” it will then accumulate the selections instead.
>
> Of course, the command file could do other things like coloring instead of selection.
> <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/indexcommand.html#cmdfile>
>
> However, I’m guessing you really want to do several different things with this set of residues. In that case, just give the set(s) of residues different short names with the “alias" command. Then you can keep doing things easily to that set including selecting/deselecting it.
> <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/alias.html>
>
> However, the alias needs all the residues that you want to give a single name to be in a single command, e.g.
>
> alias myres1 :15-17.C,263-265.A
>
> ….and/or multiple sets with multiple names…
>
> alias cres :15-17.C
> alias ares :263-265.A
>
> Then later you can just use them in other commands,
>
> select myres1
> color orange cres
> color dodger blue ares
>
> These alias commands can be quite long if your residue list is long, but you’d only have to enter a given alias once, and the alias command itself could be in a command file. I’ve often done this for making paper figures where I want to easily color certain sets of residues (domains, catalytic sites, mutation hotspots, etc.)
>
> I hope this helps,
> Elaine
> -----
> Elaine C. Meng, Ph.D.
> UCSF Chimera(X) team
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
>
> > On Oct 27, 2018, at 7:31 PM, Paris Tzou <paristzou at gmail.com> wrote:
> >
> > Dear all,
> > I want to load a file containing a lit of residues of protein which is already shown in Chimera. I don't want to manually select the residues under investigation through "Favorite -- Sequence". Is there a way of doing this ? I know I can do it using command line like:select #0:15-17.C,263-265, 300-310.A. Instead, I can have a text file with content like:
> >
> > 15,C
> > 16,C
> > 17,C
> > 263,A
> > 264,A
> > 265,A
> >
> > Thank you very much.
> > Paris Tzou
More information about the Chimera-users
mailing list