Warren DeLano
Mon, 26 Oct 2009 10:56:53 -0700
Sean,
Unfortunately, there isn't any way at present to directly expose PyMOL's internal C coordinate array to Python in an accessible form. Yes, iterate_state and alter_state are highly inefficient - it would make more sense to provide a means of exporting and re-importing coordinate sets via either native Python lists or, even better, NumPy arrays. In what form do you have the current coordinate data? Cheers, Warren ________________________________ From: Sean Law [mailto:magic...@hotmail.com] Sent: Friday, October 23, 2009 4:54 PM To: pymol-users@lists.sourceforge.net Subject: [PyMOL] Replace Coordinates in State Hi All, I was wondering if there was a faster way to replace all coordinates. I've used commands such as iterate_state and alter_state before but they are far too slow since they have to iterate over each atom. Instead, I want to replace one set of coordinates that correspond to a specific state with a different set. Here's what I have to work with: I have a list that contains x, y, z coordinates. Of course, this list can be manipulated and/or separated if necessary. I'm assuming that the coordinates for a specific state are stored somewhere in memory and I would basically like to replace one set of coordinates with the other. I would think that something like "pointers or references" would work a lot faster than having to copy the coordinates over (which is typically slow and is likely what alter_state is doing?). In addition, I am dealing with 100+ states using alter_state for each state would be far too slow. Any suggestions would be greatly appreciated. Thanks in advance! Sean ________________________________ Save up to 84% on Windows 7 until Jan 3-eligible CDN College or University students only. Hurry-buy it now for $39.99! <http://go.microsoft.com/?linkid=9691631>
------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference
_______________________________________________ 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