Hi Martin, You could think of it as what Tsjerk purported:
# pseudocode for iterate def iterate(sel,cmd): for x in selection: return cmd(x) where each 'function' cmd would return a value per atom. For example, # pseucode for an instance of iterate def iterate(organic, 'print b') for x in organic: print_b(organic) > 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. PyMOL has a fully functioning molecular editor, but it's clunky and not well-understood. In Selection Mode you 'select,' whereas in Edit Mode, you 'pick'. In Edit Mode, (pk1) is the first atom you 'pick' with the mouse. Common operations can be completed when you pick the atoms on which you want to operate. For example, in edit mode, pick two atoms and type the word "dist" at the command line. PyMOL will measure the distance between those two atoms. Pick three and you can calculate an angle. PyMOL supports pk1 up to pk4. pkmol is the molecular object associated with your picks; pkresi is the residue. The builder has lots of interesting things built into it. Pick the correct three atoms and you can 'invert' the stereochemistry by flipping the liganded groups. Cheers, -- Jason On Sun, Oct 24, 2010 at 8:12 AM, 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 > -- Jason Vertrees, PhD PyMOL Product Manager Schrodinger, LLC (e) jason.vertr...@schrodinger.com (o) +1 (603) 374-7120 ------------------------------------------------------------------------------ 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