[Chimera-users] python and MD
Daniel Gurnon
danielgurnon at depauw.edu
Sun Aug 7 11:14:42 PDT 2011
Hi everyone,
I have a question for the python experts:
Suppose I have opened an MD trajectory using MD movie.
I want a script that will capture images along the trajectory spaced by
user-defined timespans. Problem is, I don't know how to use a script to go
to a specific frame in MD movie. As I understand it, coordset, as employed
in the following example, requires the user to first play through the entire
trajectory. With a million frames, that's not practical. Here's what I have
so far, cobbled together from examples and my own limited understanding of
Python.
----------------------------
from chimera import runCommand
timestep=input ("How many picoseconds pass between frames?")
spacing=input ("What spacing, in ps, do you want between structures?")
start=input ("Which frame do you want to start with?")
end=input ("What frame do you want to end with?")
runCommand("coordset #0" + start)
runCommand("focus")
runCommand("copy file C:\Users\Dan\Desktop" + "\\" +start + ".png" + " width
2000 width 2000 supersample 3")
----------------------------
So in place of coordest, what could I use to jump to frames within MD movie?
And while I'm at it,
How can I generically specify the desktop in a windows environment (so that
I could give this to a student and they wouldn't have to change "Dan" in
c:\users\Dan\Desktp")
How can I change the filename for the image to reflect framenumber?
Thanks as always for your help.
Dan
--
____________________________
Daniel Gurnon, Ph. D.
Associate Professor of Chemistry and Biochemistry
DePauw University
Greencastle, IN 46135
p: 765-658-6279
e: danielgurnon at depauw.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20110807/662f2d79/attachment.html>
More information about the Chimera-users
mailing list