...

---------- Forwarded message ----------
From: Tsjerk Wassenaar <tsje...@gmail.com>
Date: Mon, Oct 25, 2010 at 12:39 PM
Subject: Re: [PyMOL] Question about Iterate and Edit-Mode
To: Martin Hediger <ma....@bluewin.ch>


Hi Martin,

Without diving into the source, I think it is more like:

for i in selection:
 execute(command, atom=i)

with execute being a function taking a string and an atom id :) and
doing something like:

eval(command, locals=locals())

Note that there will be some trickery to extend the locals dictionary
with the properties that can be included in the command (resi, ID, b,
etc.).

Hope it helps,

Tsjerk

On Sun, Oct 24, 2010 at 2:12 PM, Martin Hediger <ma....@bluewin.ch> wrote:
> Dear All
> I am trying to get behind the way 'iterate' works, since I see it quite
> frequently in PyMOL scripts.
> The example in the help page is a bit limited in the sense that I cant
> explain to myself what actually is happening.
>
> Say, if I were to write the functionality of 'iterate' using a for-loop,
> how would this for-loop look like?
> Something like this maybe?
>
> for i in selection:
>     i.expression()
>
> I'm a bit confused about what can go into 'expression'.
>
> The second question is related to the Edit-Mode of PyMOL. When I switch
> to Edit-Mode and click on a atom, a couple of states/objects (?) appear
> in the object list: pk1, pkmol, pkresi, pkchain, pkobject.
> What do these objects mean? What are they useful for? I'm sure there is
> a reason for them, but I cant figure it out.
>
> Thanks a lot for your help guys.
>
> Martin
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



--
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to