Re: [Jmol-users] Jmol demo page hangs

2010-01-13 Thread Otis Rothenberger
Hello Bob,

I see the same thing with Firefox and XP. I notice that the page
source ends coordinate file lines with \n - linefeed. I wonder if this
is a cr/lf issue. I run into this problem frequently. I'm not sure
about a cross platform solution, but I wonder is ending the lines with
\r\n would work on your system.

Alternatively, I've had luck with loading an inline file from the JME
applet into Jmol with the following direct approach:

document.getElementById(MyAppleName).loadInlineString(jmeString,
hover %a atomno=%i;echo;isosurface '';mo translucent;isosurface
translucent;, false);

Ignoring my load script, jmeString is simply the un-doctored
coordinate string (molfile) from JME - i.e. no concatenated LF or
CR/LF.

Otis

-- 
Otis Rothenberger
http://chemagic.org


On Wed, Jan 13, 2010 at 1:12 PM, Grossman, Robert B
robert.gross...@uky.edu wrote:
 Hi,

 I'm trying to figure out how to load molecular structures into Jmol from 
 JavaScript variables (instead of files).  When I go to the demo page 
 http://jmol.sourceforge.net/demo/jssample2/ , Jmol fails to load.  That is, 
 it says, Loading Jmol applet ... and the clock begins, but it never 
 finishes loading.  ???

 -- Bob

 --
 This SF.Net email is sponsored by the Verizon Developer Community
 Take advantage of Verizon's best-in-class app development support
 A streamlined, 14 day to market process makes app distribution fast and easy
 Join now and get one step closer to millions of Verizon customers
 http://p.sf.net/sfu/verizon-dev2dev
 ___
 Jmol-users mailing list
 Jmol-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-users




--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol demo page hangs

2010-01-13 Thread Grossman, Robert B
Thanks for your help, Otis.  Unfortunately, your approach won't work for me; we 
acquire the data from a Java variable whose value in turn we acquire from a 
database.

We use MOL files in Javascript variables with \n at the end of each line as 
input for other applets, e.g., MarvinSketch and MarvinView.  So I think this is 
not a platform problem, but a Jmol problem.



From: Otis Rothenberger o...@chemagic.com
Reply-To: jmol-users@lists.sourceforge.net
Date: Wed, 13 Jan 2010 13:47:56 -0500
To: jmol-users@lists.sourceforge.net
Conversation: [Jmol-users] Jmol demo page hangs
Subject: Re: [Jmol-users] Jmol demo page hangs

Hello Bob,

I see the same thing with Firefox and XP. I notice that the page
source ends coordinate file lines with \n - linefeed. I wonder if this
is a cr/lf issue. I run into this problem frequently. I'm not sure
about a cross platform solution, but I wonder is ending the lines with
\r\n would work on your system.

Alternatively, I've had luck with loading an inline file from the JME
applet into Jmol with the following direct approach:

document.getElementById(MyAppleName).loadInlineString(jmeString,
hover %a atomno=%i;echo;isosurface '';mo translucent;isosurface
translucent;, false);

Ignoring my load script, jmeString is simply the un-doctored
coordinate string (molfile) from JME - i.e. no concatenated LF or
CR/LF.

Otis

--
Otis Rothenberger
http://chemagic.org


On Wed, Jan 13, 2010 at 1:12 PM, Grossman, Robert B
robert.gross...@uky.edu wrote:
 Hi,

 I'm trying to figure out how to load molecular structures into Jmol from 
 JavaScript variables (instead of files).  When I go to the demo page 
 http://jmol.sourceforge.net/demo/jssample2/ , Jmol fails to load.  That is, 
 it says, Loading Jmol applet ... and the clock begins, but it never 
 finishes loading.  ???

 -- Bob

 --
 This SF.Net email is sponsored by the Verizon Developer Community
 Take advantage of Verizon's best-in-class app development support
 A streamlined, 14 day to market process makes app distribution fast and easy
 Join now and get one step closer to millions of Verizon customers
 http://p.sf.net/sfu/verizon-dev2dev
 ___
 Jmol-users mailing list
 Jmol-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-users




--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol demo page hangs

2010-01-13 Thread Angel Herráez
Bob G., thanks for reporting this.

I've run a quick check with a local copy of the offending page, and it's not an 
issue of 
linefeeds. 
It's a bug in Jmol. I can trace it back to between 11.8.7 and 11.8.11. 
11.8.15 (the current version at the website) and 11.9.13 fail too.

jmolLoadInline() works fine even with 11.8.15.
It's just jmolAppletInline() that has the problem.
If you change it to
jmolAppletInline(200, )
then the radio buttons that call jmolLoadInline() work fine.


And I've done all that using the Jmol.js of 11.8.15, so it's not a Jmol.js bug


--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol demo page hangs

2010-01-13 Thread Angel Herráez
I've narrowed it down to between 11.8.10 (works) and 11.8.11 (fails). 
That's 20 to 28 nov. 2009



--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol demo page hangs

2010-01-13 Thread Grossman, Robert B
Thanks Angel.  I've changed my invocation of Jmol as follows:

script type=text/javascript
jmolInitialize('%= pathToRoot %nosession/jmol');
jmolApplet([250, 250]);
jmolLoadInline('%= Utils.toValidJS(calcResults) %');
/script

It compiles at runtime as,

jmolInitialize('../../nosession/jmol');
jmolApplet([250, 250]);
jmolLoadInline('\n  Marvin  10270415522D\n\n  9  9  0  0  0  0  
  999 V2000\n   -2.24570.81880. C   0  0  0  0  0  0  0  0  
0  0  0  0\n   -2.2457   -0.00630. C   0  0  0  0  0  0  0  0  0  0  0  
0\n   -1.5313   -0.41880. C   0  0  0  0  0  0  0  0  0  0  0  0\n   
-0.8168   -0.00630. C   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.8168  
  0.81880. C   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.10231.2313 
   0. O   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.53131.2313
0. C   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.53132.88130. C 
  0  0  0  0  0  0  0  0  0  0  0  0\n   -1.53132.05630. C   0  0  
0  0  0  0  0  0  0  0  0  0\n  7  1  1  0  0  0  0\n  7  5  2  0  0  0  0\n  1 
 2  2  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  2  0  0  0  0\n  4  5  1  0  
0  0  0\n  5  6  1  0  0  0  0\n  8  9  1  0  0  0  0\n  7  9  1  0  0  0  0\nM 
 APO  1   9   1\nM  STY  1   1 SUP\nM  SAL   1  2   8   9\nM  SBL   1  1   9\nM 
 SMT   1 Et\nM  END\n');
/script

But although it now appears to load, I don't see a molecule in the viewer.

Furthermore, if I try to open another Jmol applet (with the first page open or 
closed), Safari hangs.


From: Angel Herráez angel.herr...@uah.es
Reply-To: jmol-users@lists.sourceforge.net
Date: Wed, 13 Jan 2010 14:26:28 -0500
To: jmol-users@lists.sourceforge.net
Conversation: [Jmol-users] Jmol demo page hangs
Subject: Re: [Jmol-users] Jmol demo page hangs

Bob G., thanks for reporting this.

I've run a quick check with a local copy of the offending page, and it's not an 
issue of
linefeeds.
It's a bug in Jmol. I can trace it back to between 11.8.7 and 11.8.11.
11.8.15 (the current version at the website) and 11.9.13 fail too.

jmolLoadInline() works fine even with 11.8.15.
It's just jmolAppletInline() that has the problem.
If you change it to
jmolAppletInline(200, )
then the radio buttons that call jmolLoadInline() work fine.


And I've done all that using the Jmol.js of 11.8.15, so it's not a Jmol.js bug


--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol demo page hangs

2010-01-13 Thread Angel Herráez
Yes, I see the same: the applet ends loading, but stays empty.
Try changing to JmolApplet 11.8.10
It works for me with your code


--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol demo page hangs

2010-01-13 Thread Grossman, Robert B
Thanks, it displays now.



From: Angel Herráez angel.herr...@uah.es
Reply-To: jmol-users@lists.sourceforge.net
Date: Wed, 13 Jan 2010 15:28:46 -0500
To: jmol-users@lists.sourceforge.net
Conversation: [Jmol-users] Jmol demo page hangs
Subject: Re: [Jmol-users] Jmol demo page hangs

Yes, I see the same: the applet ends loading, but stays empty.
Try changing to JmolApplet 11.8.10
It works for me with your code


--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol demo page hangs

2010-01-13 Thread Robert Hanson
It's a bug. I've fixed it. Please check
http://chemapps.stolaf.edu/jmol/docs/examples-11/Jmol-11.zip


On Wed, Jan 13, 2010 at 12:12 PM, Grossman, Robert B 
robert.gross...@uky.edu wrote:

 Hi,

 I'm trying to figure out how to load molecular structures into Jmol from
 JavaScript variables (instead of files).  When I go to the demo page
 http://jmol.sourceforge.net/demo/jssample2/ , Jmol fails to load.  That
 is, it says, Loading Jmol applet ... and the clock begins, but it never
 finishes loading.  ???

 -- Bob


 --
 This SF.Net email is sponsored by the Verizon Developer Community
 Take advantage of Verizon's best-in-class app development support
 A streamlined, 14 day to market process makes app distribution fast and
 easy
 Join now and get one step closer to millions of Verizon customers
 http://p.sf.net/sfu/verizon-dev2dev
 ___
 Jmol-users mailing list
 Jmol-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-users




-- 
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
--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev ___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users