Hi Warren, Actually, I tried to use select .., r. na\+ as the second option, but that didn't work for me (Pymol 0.99b on Suse 9.2).
Oh, and I owe you an elaborate answer still on the mail from a while ago. But that got a bit buried.. sorry ;) Tsjerk On 2/2/07, DeLano Scientific <del...@delsci.info> wrote:
Tsjerk & Abhinav, > Actually, it was a bit surprising to me to see you're right. + is the default list separator in selections. For example: select posi, ARG+HIS+LYS/ select backbone, n. N+CA+C+O That is why it needs to be escaped with a backslash. Commas can also be used, but only within parentheses -- otherwise the parser gets confused, since commas are also used to separate command arguments. select backbone, (n. N,CA,C,O) Also, be aware when using backslashes inside a Python string that they are also a string escape character, so it is best to use two of them "\\+". However, a single slash happens to work in this case for some bizzare reason. In other words, the PyMOL command: select selectionname, r. na\+ has a true Python equivalent of cmd.select("selectionname","r. na\\+") not cmd.select("selectionname","r. na\+") which actually works, but probably shouldn't. Cheers, Warren -- DeLano Scientific LLC Subscriber Support Services mailto:del...@delsci.info > -----Original Message----- > From: pymol-users-boun...@lists.sourceforge.net > [mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf > Of Tsjerk Wassenaar > Sent: Friday, February 02, 2007 2:23 AM > To: Abhinav Verma > Cc: pymol-users@lists.sourceforge.net > Subject: Re: [PyMOL] selecting Na+ in pymol > > Hi Abhi, > > Actually, it was a bit surprising to me to see you're right. > Now, for showing/hiding, it has been dealt with in the code, > by allowing the "+" to be left out. However, for selecting > (and alter_ing) that doesn't go, apparently. A workaround is to use > > cmd.select("selectionname","r. na\+") or > cmd.select("selectionname","n. na\+") > > Alternatively, you can change the residue/atomnames using: > > cmd.alter("r. na\+","resn='Na'") or cmd.alter("n. na\+","name='Na'") > > All of these worked for me. Of course, it would be good to > have this dealt with properly in the same way as for showing/hiding. > > Hope it helps, > > Tsjerk > > On 2/2/07, Abhinav Verma <abhinav1...@gmail.com> wrote: > > Hallo, > > I have an annoying problem. I have pdb file with Na+ atoms > defined as > > > > ATOM 1 Na+ Na+ 53 -1.106 7.854 52.244 > 1.00 0.00 Na > > > > now if want to select these Na+ with > > > > PyMOL>select n. na+ > > Selector: selection "sele" defined with 0 atoms. > > > > Any ideas how to select them? > > > > I tried renaming them to Na and then select n. na which works. So I > > assume the problem is "+" which is used for add in pymol. > > I also tried n. "na+" which did not work either. > > > > > > thanks in advance, > > Abhi. > > > > > ---------------------------------------------------------------------- > > --- Using Tomcat but need to do more? Need to support web services, > > security? > > Get stuff done quickly with pre-integrated technology to > make your job > > easier. > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=1216 > > 42 _______________________________________________ > > PyMOL-users mailing list > > PyMOL-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/pymol-users > > > > > > > -- > Tsjerk A. Wassenaar, Ph.D. > Junior UD (post-doc) > Biomolecular NMR, Bijvoet Center > Utrecht University > Padualaan 8 > 3584 CH Utrecht > The Netherlands > P: +31-30-2539931 > F: +31-30-2537623 > > -------------------------------------------------------------- > ----------- > Using Tomcat but need to do more? Need to support web > services, security? > Get stuff done quickly with pre-integrated technology to make > your job easier. > Download IBM WebSphere Application Server v.1.0.1 based on > Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057& dat=121642 > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users
-- Tsjerk A. Wassenaar, Ph.D. Junior UD (post-doc) Biomolecular NMR, Bijvoet Center Utrecht University Padualaan 8 3584 CH Utrecht The Netherlands P: +31-30-2539931 F: +31-30-2537623