Matt, you are SO in luck.
1) You can define the array data, but it seems to me more appropriate just
to define a starting point for each. Right? Something like this should do
the job:
# Jmol math here
function runAnimation()
frame *
display none
var timeStep = 10 #whatever
var startTimes = array(0, 50,100) #whatever
var endTimes = array(500,550,450) # whatever
var secDelay = 0.5 #whatever
var frameList = array(0,0,0)
var endTime = 0
var time = 0
for (var i = 1; i <= 3; i = i + 1)
if (time >= startTimes[i])
time = startTimes[i]
endif
if (endTime <= endTimes[i])
endTime = endTimes[i]
endif
end for
while(time < endTime)
var s = ""
for (var i = 1; i <= 3; i = i + 1)
if (time >= startTimes[i] && time <= endTimes[i])
frameList[i] = frameList[i] + 1
if (s != "")
s = s + ","
end if
s = s + i + "." + frameList[i]
end if
end for
s = "frame " + s + ";delay " + secDelay
script inline @s
time = time + timeStep
end while
end function
The only way I could figure out to store and access
> that data was to store it all as a JavaScript array, and then use a
> JavaScript loop to do the custom animation.
>
>
> I see that Jmol has capacity to load and store per-atom data (the
> "DATA" command), but might there be a way to store this more
> globally-scoped table in Jmol somewhere? I confess, I don't have a
> firm grasp of Jmol math yet.
>
any data -- not just per atom.
>
> I'm unclear on what you mean here. Currently, I load everything
> (every frame of every applicable trajectory), then loop over each
> frame and set its transparency. This is all done right after the load
> (takes forever in the current every-frame-is-a-model implementation),
> and the animation is nothing but "display ..." and delay steps. Are
> you saying to modify the loop to apply the transparency to each frame
> right before it is displayed? Something like
>
well, in this case what you would do is define the translucency for each
model just before you display it.
That's a really interesting idea. I don't have CUBE files available,
> nor will I ever for this particular application (I have expansion
> coefficients only), so I'd have to have the additional step of
> calculating the MO value as a function of X,Y,Z for each frame.
Using Jmol you could pre-save the MOs as JVXL files and very quickly load
them in on the fly.
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107
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-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers