That looks very good. Congratulations!

1) you can use

jmolScript('frame 4')

rather than

document.jmol.script('frame 4')

Looks like you may have already changed that -- I don't see the code you
describe. I think the problem was that you have the onClick events as part
of the option. Generally I've only used onClick as an attribute of select.
For example:

<select id=selVib onClick=doOption()>
<option class='green' value='4'>T(Ca....)</option>

and then

function doOption(obj) {
  var d = document.getElementById("selVib")
  var f = parseInt(d[d.selectedIndex].value)
  if (!isNaN(f))jmolScript("frame " + f)
}

I think the vibrations you have are unrealistically large. It's not uncommon
for people to do this; bonds don't really stretch and compress that much. A
more realistic scale would be

set vibrationscale 0.1

in this case, I think.

Bob

On Fri, Oct 9, 2009 at 6:27 PM, Tzontonel <[email protected]>wrote:

> I fixed the "problem", now I have another problem. Go to the page:
> http://rdrs.uaic.ro/minerals/calcite.html, in the same section (scroll
> down to the Raman spectrum and vibrations) I have this code:
>
> <form action="" name="vibrations">
>     <strong>Vibrations:</strong><br>
>     <select>
>     <option value="select">Select vibration by clicking here</option>
>     <option class="green" value="T(Ca, CO3)"
> onClick="document.jmol.script('frame 4')">T(Ca, CO3)</option>
>     <option value="T(Ca, CO3)" onClick="document.jmol.script('frame
> 5')">T(Ca, CO3)</option>
>     <option class="green" value="ν4b (E')"
> onClick="document.jmol.script('frame 6')">ν4b (E')</option>
>     <option value="ν4a (E')" onClick="document.jmol.script('frame 7')">ν4a
> (E')</option>
>     <option value="ν2 (A''2)" onClick="document.jmol.script('frame 8')">ν2
> (A''2)</option>
>     <option class="green" value="ν1 (A'1)"
> onClick="document.jmol.script('frame 9')">ν1 (A'1)</option>
>     <option class="green" value="ν3a (E')"
> onClick="document.jmol.script('frame 10')">ν3a (E')</option>
>     <option value="ν3b (E')" onClick="document.jmol.script('frame 11')">ν3b
> (E')</option>
>     <option value="all vibration" onClick="document.jmol.script('frame
> all')">All vibration</option>
>     </select>
> </form>
>
> This form (onClick event) works fine just in Firefox, in Internet Explorer
> don't work. I used google search and some people says: IE don't support
> onClick event attribute. Someone can help me to fix onClick event for IE?
>
> P.S. "unrealistically large!" - I don't understand.
>
> stud. Andrei Ionut Apopei
>
> ------------------------------
>
> Possibly. But first you will have to promise me you won't make the atom
> vibrations be so totally unrealistically large! ;)
>
> So you are using animated gifs there that you produce with something. You
> will need to:
>
> 1) create a JavaScript function on that page that will be called by the
> image map.
> 2) have access to the G03 log file.
> 3) decide what you want to have happen in the Jmol window -- will it be the
> atoms of the crystal themselves vibrating? Will it be another structure,
> simpler and more like the one in the GIF?
> 4) assign vibration vectors to the atoms in the Jmol crystal and get them
> vibrating.
>
> (4) is the tricky part. If you want the crystal atoms to vibrate, I suggest
> loading the G03 log file into a second Jmol frame using "load append", then
> copy the vibration vectors when needed to the atoms in the first model --
> the crystal using something like:
>
> load append "myfile.g03"
> display 1.1
> {1.1}.vxyz = {2.2}.vxyz.all
> vibration on
>
> But you may have to map the atoms differently -- the above assumes the
> first atom of the g03 file is the same as the first atom in the CIF file,
> etc. So you might need something like:
>
> {atomIndex=0}.vxyz = {atomnoIndex=33}.vxyz
> {atomIndex=1}.vxyz = {atomnoIndex=34}.vxyz
>
> etc.
>
> Bob Hanson
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Jmol-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>
>


-- 
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
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to