From: Jason V. <jas...@sc...> - 2010-01-20 19:13:14
|
Phil, The answers to your questions lie in the "iterate," "iterate_state," "alter," and "alter_state" commands. The PyMOLWiki has extensive documentation on these commands (http://pymolwiki.org/index.php/Iterate). Once you select something with the mouse you can get information using iterate/alter. # make mouse selection; the "(sele)" selection is created # create a copy selection called "myCopy" select myCopy, (sele) # count atoms in myCopy print cmd.count_atoms("myCopy") # see what atom IDs are in the selection iterate myCopy, print ID Hope this helps, -- Jason On Tue, Jan 19, 2010 at 2:00 PM, Phil Payne Local <pp...@ma...> wrote: > I am writing a Pymol plugin, in which I need to extract, manipulate, and > replace the coordinates of selected atoms. Are there examples out there > I could use as a prototype? > > For starters, what command(s) do I use to get the name strings of > residues that I've selected with mouse clicks. I would like to assign > these to a variable. > > Then the same question applies to coordinates. How do I assign the > values of atomic coordinates to a list variable in my plug_in script? > > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > PyMOL-users mailing list (PyM...@li...) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pym...@li... > -- Jason Vertrees, PhD PyMOL Product Manager Schrodinger, LLC (e) Jas...@sc... (o) +1 (603) 374-7120 |