Warren,
I was trying to write a script that would read in CHARMM trajectory files (DCD)
specifically for users who do not have access to the most current version of
PyMOL. I have written a Python script that will interpret a DCD file and load
it into the corresponding object but this process is definitely not as fast as
the C implementation already available in version 1.2. I can see where it
would be difficult to access the coordinates in the C array via Python. This
is not a pressing need of mine by any means as it was something that I am
revisiting (if you recall, I had tried this in the past) as I definitely made
some mistakes earlier that made the script very slow and inefficient. Now, I
have an "optimized" version of the Python script with the limitation being the
replacement of the coordinates.
Sean
Subject: RE: [PyMOL] Replace Coordinates in State
Date: Mon, 26 Oct 2009 10:54:39 -0700
From: war...@delsci.com
To: magic...@hotmail.com; pymol-users@lists.sourceforge.net
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!
_________________________________________________________________
Save up to 84% on Windows 7 until Jan 3—eligible CDN College & University
students only. Hurry—buy it now for $39.99!
http://go.microsoft.com/?linkid=9691635
------------------------------------------------------------------------------
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