* [gentoo-science] sage-notebook & jmol
@ 2010-06-14 19:13 Steven Trogdon
2010-06-14 20:52 ` François Bissey
2010-06-15 10:51 ` François Bissey
0 siblings, 2 replies; 5+ messages in thread
From: Steven Trogdon @ 2010-06-14 19:13 UTC (permalink / raw
To: gentoo-science
[-- Attachment #1: Type: text/plain, Size: 1486 bytes --]
Hello,
I believe Jmol is the default Sage 3D viewer. However, it seems to be
broken from the notebook. A
sphere()
from the sage prompt works as expected but not so from the notebook.
Here I get that the problem is in locating the JmolApplet class. It
appears that sagenb is coded to look in the data directory under sagenb
for package data, i.e. relative to the python tree in
site-packages/sagenb/data. After opening the notebook the contents of
the directory can be viewed by pointing one's browser to
http://localhost:8000/java/
In particular the notebook seems to look in
site-packages/sagenb/data/jmol for the JmolApplet class data which was
removed with the advent of the sage-on-gentoo package,
sci-chemistry/jmol. Now here I'm able to get Jmol to work from the
notebook if I create either of the symlinks,
site-packages/sagenb/data/jmol ->
/usr/share/webapps/jmol/11.6.16/htdocs
or
site-packages/sagenb/data/jmol -> /var/www/localhost/htdocs/jmol
There should be a better way to do this but I'm unable to find a way to
get the sagenb package to access external data other than through a
symlink. If the first of the above is done then a version bump of jmol
will require a new sage-notebook install! There is also an "appletweb"
directory that's present under sagenb/data/jmol and I was curious as to
whether it's needed? Is it perhaps a carry-over from the older
Sage-provided jmol stuff?
Steve
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-science] sage-notebook & jmol
2010-06-14 19:13 [gentoo-science] sage-notebook & jmol Steven Trogdon
@ 2010-06-14 20:52 ` François Bissey
2010-06-15 10:51 ` François Bissey
1 sibling, 0 replies; 5+ messages in thread
From: François Bissey @ 2010-06-14 20:52 UTC (permalink / raw
To: gentoo-science
> Hello,
>
> I believe Jmol is the default Sage 3D viewer. However, it seems to be
> broken from the notebook. A
>
> sphere()
>
> from the sage prompt works as expected but not so from the notebook.
> Here I get that the problem is in locating the JmolApplet class. It
> appears that sagenb is coded to look in the data directory under sagenb
> for package data, i.e. relative to the python tree in
> site-packages/sagenb/data. After opening the notebook the contents of
> the directory can be viewed by pointing one's browser to
>
> http://localhost:8000/java/
>
> In particular the notebook seems to look in
> site-packages/sagenb/data/jmol for the JmolApplet class data which was
> removed with the advent of the sage-on-gentoo package,
> sci-chemistry/jmol. Now here I'm able to get Jmol to work from the
> notebook if I create either of the symlinks,
>
> site-packages/sagenb/data/jmol ->
> /usr/share/webapps/jmol/11.6.16/htdocs
> or
> site-packages/sagenb/data/jmol -> /var/www/localhost/htdocs/jmol
>
> There should be a better way to do this but I'm unable to find a way to
> get the sagenb package to access external data other than through a
> symlink. If the first of the above is done then a version bump of jmol
> will require a new sage-notebook install! There is also an "appletweb"
> directory that's present under sagenb/data/jmol and I was curious as to
> whether it's needed? Is it perhaps a carry-over from the older
> Sage-provided jmol stuff?
>
Hi,
My fault completely. We noticed about a month ago that jmol was broken
and I started to work on fixing it. I had troubles and hadn't find a good
solution at the time.
Then I more or less forgot. You are putting it back on the top of my
priorities here.
Francois
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-science] sage-notebook & jmol
2010-06-14 19:13 [gentoo-science] sage-notebook & jmol Steven Trogdon
2010-06-14 20:52 ` François Bissey
@ 2010-06-15 10:51 ` François Bissey
2010-06-15 15:11 ` Steven Trogdon
1 sibling, 1 reply; 5+ messages in thread
From: François Bissey @ 2010-06-15 10:51 UTC (permalink / raw
To: gentoo-science
> sci-chemistry/jmol. Now here I'm able to get Jmol to work from the
> notebook if I create either of the symlinks,
>
> site-packages/sagenb/data/jmol ->
> /usr/share/webapps/jmol/11.6.16/htdocs
> or
> site-packages/sagenb/data/jmol -> /var/www/localhost/htdocs/jmol
>
> There should be a better way to do this but I'm unable to find a way to
> get the sagenb package to access external data other than through a
> symlink. If the first of the above is done then a version bump of jmol
> will require a new sage-notebook install! There is also an "appletweb"
> directory that's present under sagenb/data/jmol and I was curious as to
> whether it's needed? Is it perhaps a carry-over from the older
> Sage-provided jmol stuff?
>
A bit more details on this. First the cli it is enough to install jmol with
the flag client-only which just install the binary.
The next problem is that to get the web-applet we need either
-client-only or vhost use flags. Which require the gentoo web-app
framework. We don't want that.
*sage uses twisted as its server, this is not supported by web-app.
We basically need a lot of the stuff that is provided for the web-app
without the requirements of the web-app framework.
I can say you have installed jmol as a web-app Steve. The stuff provided
in the appletweb folder could be provided by jmol. At first I was trying
to provide some stuff from jmol and keeping some stuff from sagenb.
This one has tough requirements.
Francois
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-science] sage-notebook & jmol
2010-06-15 10:51 ` François Bissey
@ 2010-06-15 15:11 ` Steven Trogdon
2010-06-17 11:09 ` François Bissey
0 siblings, 1 reply; 5+ messages in thread
From: Steven Trogdon @ 2010-06-15 15:11 UTC (permalink / raw
To: gentoo-science
[-- Attachment #1: Type: text/plain, Size: 1131 bytes --]
Hi François,
On 06/15/10 - 05:51:23, François Bissey wrote:
>
> A bit more details on this. First the cli it is enough to install
> jmol with
> the flag client-only which just install the binary.
> The next problem is that to get the web-applet we need either
> -client-only or vhost use flags. Which require the gentoo web-app
> framework. We don't want that.
> *sage uses twisted as its server, this is not supported by web-app.
>
> We basically need a lot of the stuff that is provided for the web-app
> without the requirements of the web-app framework.
I believe you are correct here and installing the web-app framework
with the provided ebuild was the only way I could get the JmolApplet
class installed.
>
> I can say you have installed jmol as a web-app Steve. The stuff
> provided
> in the appletweb folder could be provided by jmol. At first I was
> trying
> to provide some stuff from jmol and keeping some stuff from sagenb.
> This one has tough requirements.
Yes, tough is what I thought as well. Or, at the least, not
straightforward.
>
> Francois
>
Steve
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-science] sage-notebook & jmol
2010-06-15 15:11 ` Steven Trogdon
@ 2010-06-17 11:09 ` François Bissey
0 siblings, 0 replies; 5+ messages in thread
From: François Bissey @ 2010-06-17 11:09 UTC (permalink / raw
To: gentoo-science
Hi all,
So I committed some changes that makes jmol works
at least on my computer.
At the moment it requires the version of jmol from
the sage-on-gentoo overlay, but it probably would work
with the one in the portage tree.
I required the "vhosts" useflag for jmol so people don't
have to deal with web-app configuration, but it would
also works with "-client-only". So it may end up being
a recommendation.
It has quite a nasty structure as, while there is no link
involved as in Steve's first message, the path is explicit
in the sage-notebook code. A real clean solution to
this will require some changes to the jmol ebuild to
install a simple stripped down web applet not requiring
web-applet.
Happy testing!!!
Francois
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-17 11:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-14 19:13 [gentoo-science] sage-notebook & jmol Steven Trogdon
2010-06-14 20:52 ` François Bissey
2010-06-15 10:51 ` François Bissey
2010-06-15 15:11 ` Steven Trogdon
2010-06-17 11:09 ` François Bissey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox