Matt, no problem. You have the right idea, now just animate it yourself. 
For sure, do

load files "xxxx" "yyyy"
frame 0.0;display 1.1,2.1

Now create the animation loop yourself. You could have a problem 
incrementing floating point numbers, so I would recommend instead:

set echo echoBegin [50 50]
echo [GO]
set echo echoBegin script "!quit;doAnimate"
background echo yellow

set echo echoQuit [120 50]
echo [QUIT]
set echo echoQuit script "!quit"
background echo yellow
set debugscript

function doAnimate()
    var nFrames = {*}.model.max
    for (var i = 1; i < nFrames; i = i + 1)
      script inline "display 1." + i + ", 2." + i
      delay 0.10
      refresh
    end for
end function


When that "quit" button is pressed, the animation will stop. You can 
have any sort of buttons -- (now images if you want!) -- just make sure 
that you have the ! there at the beginning. That tells Jmol to interrupt 
the currently running script and process the command.

I bet you can build a nice animator using scripts and such right within 
the applet window now, with no JavaScript. Give it a try.

Bob


Matthew Zwier wrote:

>Dear Eric,
>
>Thanks for your quick, thoughtful reply.  Sorry for the ambiguity.  I
>meant one copy of Jmol; two datasets displayed side-by-side in a
>single Jmol.  Or rather, two datasets superimposed in the display.
>
>My data is in multi-frame XYZ files.  Each file is of the same
>molecule, moving slightly differently through time.  Frame number N in
>file 1 occurs at the same time in the simulation as frame N in file 2.
> I'd like to see the same frame number from more than one file at
>once, to compare how the trajectories are evolving in time.
>
>Displaying two models using
>  load traj1.xyz
>  load append traj2b.xyz
>  frame all
>  display 1.169,2.169
>gives the single-point version of what I'm looking for.  I'd like to
>animate that.
>
>My current impression is that when Jmol animates multiple files, it
>goes like this (excluding the effect of "frame range ..." commands):
>for each file:
>  for each frame in file:
>    display frame
>
>In contrast, I'd like the following (assume the same number of frames
>in each file):
>for each frame number (call it nframe):
>  display file1.nframe, file2.nframe, file3.nframe ...
>
>Attached are three PNG files showing what I'm after.  For the curious,
>the simulation is of the photodissociation of ethane.  Red is from the
>first file and blue from the second.  The molecular fragments begin in
>coincident locations but begin to drift apart, as each file records
>motion driven by different forces (specifically, different electronic
>states).
>
>If the attachments don't make it through the mailing list, they are
>also available at
>http://www.scs.uiuc.edu/~mzwier2/frame169.png
>http://www.scs.uiuc.edu/~mzwier2/frame269.png
>http://www.scs.uiuc.edu/~mzwier2/frame498.png
>
>Hope that helps clear things up!
>
>Matt Z
>
>On Thu, Aug 7, 2008 at 4:42 PM, Eric Martz <[EMAIL PROTECTED]> wrote:
>  
>
>>Dear Matthew,
>>
>>Please clarify what you mean by "in parallel".
>>
>>Do you mean two Jmol's side by side?
>>Do you mean two datasets displayed side by side in a single Jmol?
>>
>>Is it important that the two animations run in frame-by-frame synchrony?
>>
>>Do you want to be able to rotate each animation independently of the
>>other? Or in (aligned) synchrony?
>>
>>If not too much trouble, a snapshot illustrating the layout you
>>envision might help.
>>
>>-Eric
>>    
>>
>>
>> ------------------------------------------------------------------------
>>


-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get. 

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to