[Chimera-users] Smoothing a trajectory

Darren Weber dweber at cgl.ucsf.edu
Tue Sep 20 11:31:36 PDT 2011


Why does it have a 'while' loop inside a 'for' loop?

-- Darren


On 09/20/2011 11:10 AM, Daniel Gurnon wrote:
> Here it is:
>
> from chimera import openModels, Molecule, runCommand
> i=1
> runCommand ("morph start #0 frames 2")
> totalModels=len(openModels.list(modelTypes=[Molecule]))
> for m in openModels.list(modelTypes=[Molecule]):
>     while i < totalModels:
>         runCommand ("morph interpolate #" +str(i)+ " frames 2")
>         i=int(i)+1
> runCommand ("morph movie")
>
>
>
> On Tue, Sep 20, 2011 at 1:54 PM, Darren Weber <dweber at cgl.ucsf.edu 
> <mailto:dweber at cgl.ucsf.edu>> wrote:
>
>
>     Hi,
>
>     Can we see the interpolation code?
>
>     -- Darren
>
>
>
>     On 09/20/2011 09:40 AM, Daniel Gurnon wrote:
>     > Hi everyone,
>     > For the purpose of making educational content, I'm interested in
>     > smoothing out the often jumpy transitions from frame to frame in
>     a MD
>     > trajectory. My approach was to write two python scripts (with
>     critical
>     > help from Eric of course); one goes through the trajectory and saves
>     > pdbs of each desired frame, while the second opens these pdbs and
>     > creates a morph, interpolating from one pdb to the next.
>     >
>     > It seemed like I was almost there, and it looked great when I
>     tried 50
>     > frames.....but Chimera crashed when I tried morphing 200 frames,
>     > adding 3 frames of interpolation between each.
>     >
>     > Is there a better way to add transitions in between (ideally
>     thousands
>     > of) frames of an MD trajectory?
>     >
>     > Thanks
>     > Dan
>     > --
>     > ____________________________
>     >
>     > Daniel Gurnon, Ph. D.
>     > Associate Professor of Chemistry and Biochemistry
>     > DePauw University
>     > Greencastle, IN 46135
>     >
>     > p: 765-658-6279 <tel:765-658-6279>
>     > e: danielgurnon at depauw.edu <mailto:danielgurnon at depauw.edu>
>     <mailto:danielgurnon at depauw.edu <mailto:danielgurnon at depauw.edu>>
>     >
>     >
>     > _______________________________________________
>     > Chimera-users mailing list
>     > Chimera-users at cgl.ucsf.edu <mailto:Chimera-users at cgl.ucsf.edu>
>     > http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
>     _______________________________________________
>     Chimera-users mailing list
>     Chimera-users at cgl.ucsf.edu <mailto:Chimera-users at cgl.ucsf.edu>
>     http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
>
>
>
>
> -- 
> ____________________________
>
> Daniel Gurnon, Ph. D.
> Associate Professor of Chemistry and Biochemistry
> DePauw University
> Greencastle, IN 46135
>
> p: 765-658-6279
> e: danielgurnon at depauw.edu <mailto:danielgurnon at depauw.edu>



More information about the Chimera-users mailing list