On Tuesday 09 September 2003 18:02, Miguel wrote:
> > It is about time to transfer my Chime pages with structure animations to
> > JMol, and doing so a number of questions pop up:
> >
> > -when I change (by button)  the display style for an animated structure,
> > only the current (visible) frame of the animation is affected.  Can I
> > make the style stick to all frames?
>
> I need some feedback and assistance from end-users so that I can
> understand how changes to rendering styles should affect other frames.
>
> For example, in RasMol/Chime, what happens if I say:
>  select carbon
>  color atoms purple
>
> Does the color purple get applied to all carbons in all frames?

Yes, that would make sense to me... During an animation I would prefer to have 
the styles the same... because the atoms do not really change, just there 
location... (and possible a few other attributes like charge...)

This comes back to something we discussed some time ago.... to store 
animations not as discrete frames but as one frame, with a set of 
dislocations...

But for now, I think it is best to apply coloring to all frames... a possible 
problem would be atom numbering... we need to rely on the fact that atom 
either have IDs attached to all frames, or that the 'order' of the atoms in 
the container stays the same... All carbons purple, is not really a problem 
of course...

> Is there a way to select a specific frame so that you can apply scripting
> commands to a specific frame?

define_chime(window,"ethach","240","300","AnimFrameCallback=JSAnimcontrol","ethane.xyz","wireframe
 
40;spacefill 120;select hydrogen;spacefill 90;zoom 190;select *;background 
[235,255,235];set specular on;anim fps 2;anim mode loop;anim frame next")

Taken from Hens' WetCHe website, ethane.html:
http://www.cmbi.kun.nl/wetche/organic/nalkanesconf/ethane/index.html
That does not answer your question, but shows Chime's anim commands...

Interesting bits are in a separate javascript file:
http://www.cmbi.kun.nl/wetche/moiscript.js

function write_chime(what,pin,height,width,otherprop)
{
        t  = '<embed src="/wetche/1atom.pdb" frank="no" 
pluginspage="http://www.mdlchime.com"; '
        t += 'name="' + top.moi[pin]["gentlename"] + '" '
        t += 'height="' + height + '" width="' + width + '" '
        t += 'debugscript=on MessageCallback="' + top.moi["codeloc"] + 
'.ChimeMessage" PickCallback="' + top.moi["codeloc"] + '.ChimePick" '
        if (typeof(otherprop) != 'undefined' && otherprop != '') t += otherprop
        t += '>'
        if (top.moi["works"] > 1)
        {
                t += '<IFRAME NAME="ifr_' + pin + '" ALIGN=TOP WIDTH=5 HEIGHT=0 
VSPACE=0 
HSPACE=0 SCROLLING="no" FRAMEBORDER="no"></IFRAME>'
        }
        what.document.write(t)
}

Hens, the MessageCallBack and PickCallback values give javascript methods
called when something is selected in Chime?
This seems to be a nice overview of what these attributes do:
http://www.weizmann.ac.il/~cffelder/weiz/embedtags.html
Which call backs are you using?

> > -Chime returns the frame number during an animation, for use in
> > javascripts (AnimFrameCallback). Can JMol do something similar?
> > Examples?
>
> I am sure there is a way we can do something.
>
> But at this point I need basic assistance on what type of functionality is
> needed for multi-frame animations.

Like Jmol itself, Hens' webpage has two views on an animation, one is the 
animation of the atoms, and the second is the energy vs. time plot... Picking 
a point in the energy/time plot should show the selected frame, and the other 
way around, selecting a certain frame in the Jmol applet should 'highlight' 
the currect point in the energy/time plot... Right?

There needs to be a mechanism which can synchronize the two... It seems that 
the callBack mechanism in Chime takes care of this...

Egon

-- 
PhD Molecular Representation in Chemometrics
Dept. Analytical Chemistry
http://www-cac.sci.kun.nl/people/egonw.html


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jmol-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to