Yes, I'm certainly volunteering. This is the first I've looked at jmol, but I'm fairly impressed already. I've done extensive work with Chime, essentially all of it in an "on-the-fly" mode, where frames are filled with structures based on user input. But I've been frustrated that even with that I have to be referencing static files. I would be delighted to at least work out a simple sample page that would at least demonstrate some of these capabilities. For more information about my background, see http://www.stolaf.edu/people/hansonr
A couple of years ago I looked into creating a plug-in with LiveConnect functionality, but that was right when Netscape dropped LiveConnect (Netscape 6?), so I didn't follow up on that. I've also played around a bit with Java and applets, but that's not my forte at all.
Also extremely useful would be the capability for JavaScript to read the data for a currently displayed file using scripting. For example,
A=new Array() A=jmolapplet.getAtomCoordinates()
or
XYZ=new Array() XYZ=jmolapplet.getAtomCoordinates(3)
or setting them:
jmolapplet.setAtomCoordinates(3,XYZ)
or all at once:
jmolapplet.setAtomCoordinates(A)
Is there information somewhere regarding the interactions possible between jmol and JavaScript commands?
Bob Hanson
Miguel wrote:
Bob wrote:
Does/will the jmol applet have the capability to introduce data in-line?
It is a little complicated ... but the story has a happy ending ... read on ...
My reason for this is that then as a JavaScript programmer, I could create structures on the the fly right at the client without reference to a fixed server-based file. I think Chime-Pro can do this, but not Chime.
Thank you
Bob Hanson
For example, something like:
<parame name=moldata value="
6 5 0.0000 0.0000 0.0000 S 0.0000 0.0000 1.3400 H 0.0000 1.3400 0.0000 H 0.0000 -1.3400 0.0000 H 1.3400 0.0000 0.0000 H -1.3400 0.0000 0.0000 H 1 6 1 1 5 1 1 4 1 1 3 1 1 2 1 M END ">
First, the bad news.
What you have written *should* work, but it does not ... for reasons that are beyond our control.
It turns out that newline characters get stripped from param value strings. This is according to the HTML/w3c spec. If I recall correctly, they do not get replace with spaces, they just get removed. So, by the time we get this string, it has all been put onto one line.
Interestingly, this means that we can read CML/XML (Chemical Markup Language) files just fine ... because white space and newline characters do not matter. But for all the other file formats, we are dead.
People can write scripts on multiple lines ... but each line of the script must be terminated by ';' characters. Again because the newlines will be removed.
The good news is, I have been thinking about another solution to this problem. And I think I have something that will work well. But I need to talk/work with someone on it.
It is not a lot of coding work, but I don't want to implement it until I can talk to a JavaScript/HTML programmer who is going to use it.
Did I just hear you volunteer? :-)
Miguel
------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ Jmol-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jmol-developers
--
Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107 Professor of Chemistry, St. Olaf College 1520 St. Olaf Ave., Northfield, MN 55057 mailto:[EMAIL PROTECTED] http://www.stolaf.edu/people/hansonr
"Imagination is more important than knowledge." - Albert Einstein
------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ Jmol-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jmol-developers
