Hi
I have been tinkering with integrating JSmol with the open source
CMS/ePortfolio system Mahara. https://mahara.org
It's working nicely for text data files (.pdb, .mol, .sdf, .xyz, .cif etc)
but I'm having problems with binary files, specifically PyMOL Session files
.pse with Chrome and Internet Explorer 10. Firefox, Opera and Safari work
fine.
As I understand it, the problem is that Mahara stores files as a number,
without file extension. However, as JSmol does not usually require file
extensions to identify file types, they can still be successfully loaded
into JSmol with, for example:
load "http://localhost/mahara/artefact/file/download.php?file=38&view=8";
I can also get binary PyMOL session files to load and display with JSmol in
Firefox, Opera or Safari by appending, say, &ext=.pse to the load command,
i.e. 'fooling' these browsers that the filename includes .pse (see
http://wiki.jmol.org/index.php/Jmol_JavaScript_Object#Reading_binary_files)
However, this does not work for Chrome or Internet Explorer 10. Chrome just
crashes, though with Firebug reports:
Error reading file at end of file
Type Error:Object [object Object] has no method 'addAll'
for file
http://localhost/mahara/artefact/file/download.php?file=38&view=8&ext=.pse
type PyMOL
Have tried a few other things, such as prepending the load with PSE:: to
try to force binary handling, but without success.
I think I am using jsmol.php correctly. All browsers works fine for the
dna.pse exemplar at http://chemapps.stolaf.edu/jmol/jsmol/test2.htm,
/test3.htm, /jsmol.htm etc either at stolaf.edu or copied to my localhost.
So, I presume it just needs some way of forcing Chrome and IE to recognise
the PSE files as binary, when held in Mahara.
Any suggestions? Have I overlooked something simple?
Cheers
Geoff
<http://wiki.jmol.org/index.php/Jmol_JavaScript_Object#Reading_binary_files>
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users