Bob, Success!

Problem: With the applet you cannot load the isosurface of a JVXL file via
jmolAppletInline()
Solution: New Jmol.js and applet version (11.9.22)

The problem turned out to be with Jmol.js and also the applet itself. I've
made changes to both, and you can check that using
http://chemapps.stolaf.edu/jmol/docs/examples-11/Jmol-11.zip

This problem actually goes WAY back to my first involvement with Jmol in
2004. I was interested in doing exactly this -- load a file "inline" instead
of from a file. Miguel Howard got Jmol doing that for me in short order,
which I then used at the CoolMolecules site (
http://www.stolaf.edu/depts/chemistry/mo/struc/).

Well, what Miguel found out is that different browsers do different things
with line endings in the OBJECT tag structure that loads parameters into
Jmol. So Jmol has to use a substitute character, and vertical bar was
chosen.

But in order for that to work, Jmol.js had to substitute all new line marks
with "|". Of course that assumes the file itself has no vertical bars in it!
Somehow we got along OK until you tried loading a JVXL file --  the molecule
part is fine, but after that, in the isosurface description, there are
veritcal bars.

I've altered Jmol.js when it finds that a model has a vertical bar in it to
substitute the string "\\/n" -- escaped backslash - forward slash - n  --
sort of along the lines of what your server is doing. This would be a VERY
unusual thing to have in a model file. (I suppose it's not impossible, so
technically this is still a hack.)

In addition, this Jmol version upgrade fixes the problem that the command

isosurface ""

which usually reads the isosurface from the currently loaded file but is
broken for cases where the file was loaded inline as a string in all
versions of Jmol prior to Jmol 11.9.22. It was just never set up correctly
to handle that.

I've put your file up as a sample at
http://chemapps.stolaf.edu/jmol/docs/examples-11/appletInline.htm

Thanks for helping fix this. In the end, I hope you will use the webMO .mo
files directly, as they are far richer in information (and smaller!) than
JVXL files.

Bob

-- 
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
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to