#9238: J. Gutow's update to Jmol in the notebook...
------------------------------------------------+---------------------------
Reporter: gutow | Owner: gutow
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.7
Component: notebook | Keywords:
Author: Jonathan Gutow | Upstream: N/A
Reviewer: Jason Grout, Karl-Dieter Crisman | Merged:
Work_issues: |
------------------------------------------------+---------------------------
Comment(by kcrisman):
Unfortunately, I can't afford to spend any more time on this, knowing as
little about Jmol and Java as I do. Here is some of the investigating I
did, which ''may'' be useful - hopefully it will be. I suspect that there
is something very subtle that changed in the newer Jmol (there have been
changes) to this resolving business, and somehow the difference between
the applet being used and just the standalone Jmol viewer must be
involved.
The changes made in `EMBEDDED_MODE=True` and the notebook code should not
make a difference; the only substantive ones are that there is something
random in the filename for the notebook, and the notebook rewrites the
.jmol file to get the full url for the cell (as opposed to the full path
to the file in the other case). Neither of these should make a
difference, right?
* When Jmol looks to resolve the file, it 'smartly' actually reads the
file and looks at the contents to see if it's one of a variety of accepted
formats.
* The code for this is
[http://prodata.swmed.edu/CASP9/evaluation/jmol/src/org/jmol/adapter/smarter/Resolver.java
here], among other places (hopefully this isn't too old of a version -
sadly, the sourceforge site requires one to download code, not browse, so
this could all be based on something incorrect).
* The only place there that this message occurs is in the following code,
which means the !determineAtomSetCollectionReader has returned something
with a newline character:
{{{
} else {
atomSetCollectionReaderName = determineAtomSetCollectionReader(
bufferedReader, true);
if (atomSetCollectionReaderName.indexOf("\n") >= 0)
errMsg = "unrecognized file format for file " + fullName + "\n"
+ atomSetCollectionReaderName;
<snip>
if (errMsg != null) {
bufferedReader.close();
return errMsg;
}
}}}
* Since the error message which is returned is the thing that Jason cut
and pasted for us, you'll notice that the contents of our .jmol file
itself is the output of the !determineAtomSetCollectionReader - so no
surprise there is a `\n`, since after going through all the possible
things, it returns the first several lines of the file, with `\n` in
between lines.
{{{
return (returnLines ? "\n" + lines[0] + "\n" + lines[1] + "\n" +
lines[2] + "\n" : null);
}}}
* Of course, why this would work fine in the notebook AND when loading
from the open window is completely mystifying to me.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9238#comment:91>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.