Yes, but you need to write in Python directly.  For example:

from pymol import cmd
cmd.select("mysel","none")
for i in range(10,20): cmd.select("mysel","mysel or resi %d"%i)

Would work in a ".py" file.

Cheers,
Warren

--
mailto:war...@delanoscientific.com
Warren L. DeLano, Ph.D.
Principal Scientist
DeLano Scientific LLC
Voice (650)-346-1154 
Fax   (650)-593-4020

> -----Original Message-----
> From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users-
> ad...@lists.sourceforge.net] On Behalf Of Shu-Hsien Sheu
> Sent: Wednesday, August 27, 2003 1:10 PM
> To: pymol-users@lists.sourceforge.net
> Subject: [PyMOL] Python commands and variables
> 
> Hi,
> 
> I am new to Pymol with some experiences with Python.
> I have a basic question which maybe a little stupid.
> Does Pymal take Python commands in selecting atoms?
> For instance:
> 
> i = range(1, 299)
> select resi i
> 
> or, further:
> for i in range(1, 299)
>     select  resi i
> 
> I understand the above can be easily done with:
> select resi 1-288
> 
> However, I am wondering if variables can work in Pymol in general.
> 
> Thanks!
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users


Reply via email to