#9238: J. Gutow's update to Jmol in the notebook...
------------------------------------------------+---------------------------
Reporter: gutow | Owner: gutow
Type: enhancement | Status: needs_review
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):
I'm not sure, but I think that
{{{
sage: P = point3d((1,0,0))
sage: P.export_jmol?
}}}
might have what you are looking for. I don't think it's the whole story,
because I don't see the type of filename (including the size 500) that
Jason is reporting, but at least it's a start.
Oh, and
{{{
sage: search_src('jmol','size')
plot/plot3d/base.pyx:988: figsize[0]. This is ignored for the
jmol embedded renderer.
plot/plot3d/implicit_surface.pyx:69:# vertex_color/jmol_color), and output
of size about n^2.
plot/plot3d/shapes2.py:750: return ["draw %s DIAMETER %s {%s %s
%s}\n%s" % (name, int(self.size), cen[0], cen[1], cen[2],
self.texture.jmol_str('$' + name))]
server/notebook/cell.py:2246: # If F ends in -size500.jmol
then we make the viewer applet with size 500.
server/notebook/cell.py:2266: #script =
'<script>jmol_applet(%s, "%s");</script>%s' % (size, url, popup)
server/notebook/cell.py:2269: script =
'<div><script>jmol_applet(%s, "%s?%d");</script></div>' % (size, url,
time.time())
}}}
suggests that maybe it's in server/notebook/cell.py, which is a little
surprising, but line 2259 pretty much seals the deal:
{{{
jmol_script = jmol_script.replace('defaultdirectory
"', 'defaultdirectory "' + self.url_to_self() + '/')
}}}
That looks like what you are describing. Why is this called for non-
notebook usage?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9238#comment:83>
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.