Hi Bob,

Thanks for the replies!  Sorry I haven't gotten back to you yet; I was
out of town.

By the way, the talk of these mysterious simulations of mine appears
to be getting ever more murky, albeit in slight increments.  If you're
curious, I'm processing data from simulations as described in "Ab
Initio Multiple Spawning: Photochemistry from First Principles Quantum
Molecular Dynamics" M. Ben-Nun, J. Quenneville, and T. J. Martinez, J.
Phys. Chem., 104, 5161 (2000).   The implementation is usually MolPro
for the ab initio gradient calculations and AMBER for the classical
propagation, though my application is expected to deal with uniform
HDF5 output from any combination of QM and MM engines that a grad
student has managed to hitch together.

Feel free to take that or leave it, depending on your current state of
curiosity and free time.

Anyway...

On Thu, Oct 9, 2008 at 11:09 PM, Robert Hanson <[EMAIL PROTECTED]> wrote:
> or if you wanted an animation, something like
>
> var nSec = 0.1
> for (var i = 1; i < 10;i = i + 1)
>   script inline @{"display 1." + i + ", 2." + i}
>   delay @nSec
> end for
>

This is basically what I'm doing, except I'm doing it in JavaScript.
I'd prefer to do it all in Jmol, but to do so, I'd need a way to store
some global array data.  Because, in my app, each trajectory may start
at an essentially arbitrary time, I keep an array of which trajectory
frames are available at which times, and which frame number in the
trajectory file each is.

So...let's say there are 3 trajectories involved.  Trajectory 1 starts
at time t=0, trajectory 2 starts at t=50, and trajectory 3 starts at
t=100.  I then wish to provide an animation from t=0 onward, but not
display trajectories 2 and 3 until the appropriate animation frame.
My solution to this problem was to create an array like this:

time       traj 1 frame       traj 2 frame       traj 3 frame
0          1                  null               null
10         2                  null               null
20         3                  null               null
30         4                  null               null
40         5                  null               null
50         6                  1                  null
60         7                  2                  null
70         8                  2                  null
80         9                  4                  null
90         10                 5                  null
100        11                 6                  1
110        12                 7                  2

This means that when it's time for animation frame 0, I execute
"display 1.1", and when it's time for frame 5 (t=50), I execute
"display 1.6, 2.1" and so on.  The time data is important, too, as I
use it to echo the time for each animation frame.  I store the
population (transparency) data in a different array of similar
construction.  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.

>> I do use per-frame transparency, which would break if
>> color/transparency information is logically tied to the topology
>> rather than the coordinates (the latter being what changes on a
>> per-animation-frame basis).  If there could be per-trajectory-frame
>> color attributes, it'd be a pretty big help.  The only other helpful
>> thing would be more than 8 levels of transparency (though I can't
>> imagine more than 20 would matter).
>
> All you do is make a for/end for loop as above and basically design your own
> animation.

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

for (var i = 1; i < 10;i = i + 1)
 script inline @{"select 1." + i + ", 2." + i}
 color TRANSLUCENT 0.125
 script inline @{"display 1." + i + ", 2." + i}
 delay @nSec
end for


>> Eventually, my dream is to produce animations not only of the atoms
>> but also of molecular orbitals, but I strongly suspect that's too
>> computationally- or memory-intensive to do in an interactive
>> environment.
>
> Nah. Actually, you could do this. It would require some initial set up.
> I wonder how slow it would be:
>
> 1) set up your trajectory data.
> 2) create the molecular orbitals using Gaussian in terms of a CUBE file for
> each stage along the way.
> 3) use Jmol or Jvxl.jar to create JVXL files (200:1 compressed surfaces) of
> those orbitals from the CUBE files.
>
> That's the slow part. Now load the trajectory data, and as above drive the
> animation, but this time include an isosurface command that loads the
> desired surface from the JVXL files.
>
> If these are reasonably small molecules, I'll bet the JVXL file will load
> and display almost instantly.

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.  It
might just work, though.  These simulations I'm working with last tens
of hours to days, so spending another couple hours in the queue
generating JVXL wouldn't be a terrible thing.  Interesting...

Thanks!
Matt Z.

-------------------------------------------------------------------------
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
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to