res_list = []

iterate name ca, res_list.append(chain+"/"+resi+"/")

cmd.indicate(res_list[2])
 

--
Warren L. DeLano, Ph.D.                     
Principal Scientist

. DeLano Scientific LLC  
. 400 Oyster Point Blvd., Suite 213           
. South San Francisco, CA 94080 USA   
. Biz:(650)-872-0942  Tech:(650)-872-0834     
. Fax:(650)-872-0273  Cell:(650)-346-1154
. mailto:[email protected]      
 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Dan Kulp
> Sent: Thursday, January 19, 2006 9:37 AM
> To: [email protected]
> Cc: Alex Luso; [email protected]
> Subject: Re: [PyMOL] Possible to select the nth residue?
> 
> Sorry the below actually won't work, you'll need something more...
> 
> nth_residue = 3
> previous = -1
> cur_res  = 0
> nth_resi = 0
> for at in cmd.get_model("molecule1 and chainA").atom:
>     if (at.resi != previous):
>          cur_res++
> 
>     if (cur_res == nth_residue):
>          nth_resi = at.resi
>          break
> 
> # Now do the selection...
> cmd.select("myselection", "molecule1 and chain A and resi %s" 
> % (nth_resi))
> 
> 
> There might be a cleaner way, but something along these lines 
> should work.
> 
> Sorry for the first email,
> Dan
> 
> This looks better. However you'll want to put it in a script, 
> wrap it with a function, etc...  I haven't test the above though.
> 
> 
> Dan Kulp wrote:
> > I just needed to do this and this was my solution
> >
> > NTH_RESIDUE=3
> > cmd.select("myselection", "molecule1 and chain A and resi %s" % 
> > (cmd.get_model("molecule1 and chain A").atom[NTH_RESIDUE]))
> >
> > will create a selection named myselection and contain only the 
> > NTH_RESIDUE of molecule1 and chain  A.
> >
> > Hope this helps,
> > ~Dan
> >
> > Alex Luso wrote:
> >>   One more question.
> >>
> >>   Someone asked me this: is it possible in Pymol to select
> >> the nth (e.g. the 3rd) residue in a molecule/chain without
> >> knowing the pdb residue # itself?
> >>
> >>   -Alex
> >>
> >> __________________________________________________
> >> Do You Yahoo!?
> >> Tired of spam?  Yahoo! Mail has the best spam protection around 
> >> http://mail.yahoo.com
> >>
> >> -------------------------------------------------------
> >> This SF.net email is sponsored by: Splunk Inc. Do you grep through 
> >> log files
> >> for problems?  Stop!  Download the new AJAX search engine 
> that makes
> >> searching your log files as easy as surfing the  web.  
> DOWNLOAD SPLUNK!
> >> 
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&;
> dat=121642
> >> _______________________________________________
> >> PyMOL-users mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/pymol-users
> >>
> >>   
> >
> >
> 
> 
> -- 
>    Dan Kulp
>    Biophysics Graduate Student @ UPenn
>    [email protected]
>    http://dwkulp.homelinux.net/tiki/tiki-index.php
> --
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep 
> through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  
> DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&;
> dat=121642
> _______________________________________________
> PyMOL-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pymol-users
> 
> 
> 
> 

Reply via email to