OK, after some fiddling around with 11.9.18, I believe I have it working.

"javascript: appletLoaded();"  is incorrect; it needs to be "javascript 
appletLoaded();" (no colon).

jmolAppletInline() hangs.

However, this works:

                    function jmolLoaded() {
                        jmolLoadInline('\n  Marvin  03180516593D\n\n 22 22  0  
0  0  0            999 V2000\n   -0.4201    0.2577   -1.4146 C   0  0  0  0  0  
0  0  0  0  6  0  0\n    1.0119    0.6024   -0.9257 C   0  0  2  0  0  0  0  0  
0  5  0  0\n    1.4430   -0.3157    0.2489 C   0  0  2  0  0  0  0  0  0  4  0  
0\n    0.4201   -0.2577    1.4146 C   0  0  0  0  0  0  0  0  0  3  0  0\n   
-1.0119   -0.6024    0.9257 C   0  0  0  0  0  0  0  0  0  2  0  0\n   -1.4430  
  0.3157   -0.2489 C   0  0  0  0  0  0  0  0  0  1  0  0\n   -0.7193    0.9460 
  -2.2082 H   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.4212   -0.7482   
-1.8450 H   0  0  0  0  0  0  0  0  0  0  0  0\n    1.7207    0.5093   -1.7516 
H   0  0  0  0  0  0  0  0  0  0  0  0\n    1.5221   -1.3462   -0.1098 H   0  0 
 0  0  0  0  0  0  0  0  0  0\n    0.7193   -0.9460    2.2082 H   0  0  0  0  0 
 0  0  0  0  0  0  0\n    0.4212    0.7482    1.8450 H   0  0  0  0  0  0  0  0 
 0  0  0  0\n   -1.7207   -0.5093    1.7516 H   0  0  0  0  0  0  0  0  0  0  0 
 0\n   -1.0386   -1.6454    0.5961 H   0  0  0  0  0  0  0  0  0  0  0  0\n   
-1.5221    1.3462    0.1098 H   0  0  0  0  0  0  0  0  0  0  0  0\n   -2.4331  
  0.0241   -0.6065 H   0  0  0  0  0  0  0  0  0  0  0  0\n    2.8389    0.0954 
   0.7531 C   0  0  0  0  0  0  0  0  0  0  0  0\n    1.0495    2.0704   
-0.4618 C   0  0  0  0  0  0  0  0  0  0  0  0\n    2.3832    2.8404   -0.4618 
C   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.2742    2.8574   -0.4618 C   0  0 
 0  0  0  0  0  0  0  0  0  0\n    4.1725   -0.6746    0.7531 C   0  0  0  0  0 
 0  0  0  0  0  0  0\n    5.4409   -0.0177    1.3286 C   0  0  0  0  0  0  0  0 
 0  0  0  0\n  1  2  1  0  0  0  0\n  1  6  1  0  0  0  0\n  2  3  1  0  0  0  
0\n  3  4  1  0  0  0  0\n  4  5  1  0  0  0  0\n  5  6  1  0  0  0  0\n  1  7  
1  0  0  0  0\n  1  8  1  0  0  0  0\n  2  9  1  0  0  0  0\n  2 18  1  0  0  0 
 0\n  3 17  1  0  0  0  0\n  3 10  1  0  0  0  0\n  4 11  1  0  0  0  0\n  4 12 
 1  0  0  0  0\n  5 13  1  0  0  0  0\n  5 14  1  0  0  0  0\n  6 15  1  0  0  
0  0\n  6 16  1  0  0  0  0\n 17 21  1  0  0  0  0\n 18 19  1  0  0  0  0\n 18 
20  1  0  0  0  0\n 21 22  1  0  0  0  0\nM  END\n');
                    }
                    jmolInitialize('../../nosession/jmol');
                    var jmolScript = 'javascript jmolLoaded(); ';
                    jmolApplet([250, 250], jmolScript);


________________________________
From: Robert Hanson <hans...@stolaf.edu>
Reply-To: <jmol-users@lists.sourceforge.net>
Date: Thu, 14 Jan 2010 12:29:31 -0500
To: <jmol-users@lists.sourceforge.net>
Conversation: [Jmol-users] Jmol usually not displaying molecule
Subject: Re: [Jmol-users] Jmol usually not displaying molecule

The key is that the jmolApplet command - or whatever is used to create the 
applet - must be the last command given until the applet itself reports that it 
is present and accounted for, and page loading is complete. This is very 
important.

If you have a lot of stuff that doesn't work as a Jmol script, then what you do 
is put this code at the end of the script sent to Jmol with applet creation:

javascript: appletLoaded();

this would then run a JavaScript function "appletLoaded()" on the page to 
notify the page that the applet is loaded, its initial script is complete, and 
it is ready for commands.


Bob


On Thu, Jan 14, 2010 at 10:37 AM, Grossman, Robert B <robert.gross...@uky.edu> 
wrote:
Hm, seems to me there needs to be some documentation on this problem.

So, are there never supposed to be any commands following the jmolApplet() 
command?  If not, could the jmolLoadInline() command, or any other command, 
precede the jmolApplet() command?  That is, could I have a long list of 
commands as long as the jmolApplet() command was last?

I will try the jmolAppletInline() solution.


________________________________
From: Robert Hanson <hans...@stolaf.edu>
Reply-To: <jmol-users@lists.sourceforge.net>
Date: Wed, 13 Jan 2010 23:05:55 -0500
To: <jmol-users@lists.sourceforge.net>
Conversation: [Jmol-users] Jmol usually not displaying molecule
Subject: Re: [Jmol-users] Jmol usually not displaying molecule

OK, I know what it is. You can't give

jmolApplet(...)
jmolLoadInline(..)

right in a row like that.

After jmolApplet the browser is busy creating the applet. VERY unwise to fire 
commands at it while that is happening. In the past you could complete crash 
the browser that way. I think what you want is to put that into a script:

jmolApplet(...., script)

where script includes the

data "MODEL 1"
...
end "MODEL 1"

as shown at http://chemapps.stolaf.edu/jmol/docs/#data

That should work like a charm.

Bob

On Wed, Jan 13, 2010 at 7:10 PM, Grossman, Robert B <robert.gross...@uky.edu> 
wrote:
I'm still not having any luck seeing the molecule, even in 11.9.18.

                <script type="text/javascript">
                    jmolInitialize('../../nosession/jmol');
                    jmolApplet([250, 250]);
                    jmolLoadInline('\n  Marvin  12290623562D          \n\n 23 
26  0  0  0  0            999 V2000\n    4.3508    0.4841    0.0000 C   0  0  0 
 0  0  0  0  0  0  0  0  0\n    3.6363    0.0716    0.0000 C   0  0  0  0  0  0 
 0  0  0  0  0  0\n    3.6363   -0.7535    0.0000 C   0  0  0  0  0  0  0  0  0 
 0  0  0\n    4.3508   -1.1660    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  
0\n    5.0653   -0.7535    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    
5.0653    0.0716    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    5.7797   
 0.4841    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    5.7797   -1.1660  
  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    6.4942   -0.7535    0.0000 
C   0  0  0  0  0  0  0  0  0  0  0  0\n    6.4942    0.0716    0.0000 C   0  0 
 0  0  0  0  0  0  0  0  0  0\n    6.4942    1.7216    0.0000 C   0  0  0  0  0 
 0  0  0  0  0  0  0\n    5.7797    1.3091    0.0000 C   0  0  0  0  0  0  0  0 
 0  0  0  0\n    7.2087    0.4841    0.0000 C   0  0  0  0  0  0  0  0  0  0  0 
 0\n    7.2087    1.3091    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    
6.9067   -0.6429    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    7.6212   
-0.2304    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    8.4181   -0.4439  
  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    3.9383   -1.8804    0.0000 
C   0  0  0  0  0  0  0  0  0  0  0  0\n    4.7633   -1.8804    0.0000 C   0  0 
 0  0  0  0  0  0  0  0  0  0\n    7.9231    1.7216    0.0000 O   0  0  0  0  0 
 0  0  0  0  0  0  0\n    5.0653    0.8966    0.0000 C   0  0  0  0  0  0  0  0 
 0  0  0  0\n    5.0653   -1.5785    0.0000 H   0  0  0  0  0  0  0  0  0  0  0 
 0\n    5.7797   -0.3409    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0\n  1  
2  1  0  0  0  0\n  1  6  1  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  1  0  0 
 0  0\n  4  5  1  0  0  0  0\n  4 18  1  0  0  0  0\n  4 19  1  0  0  0  0\n  6 
 5  1  0  0  0  0\n  5  8  1  0  0  0  0\n  5 22  1  0  0  0  0\n  7  6  1  0  
0  0  0\n  6 21  1  0  0  0  0\n  7 10  1  0  0  0  0\n 12  7  1  0  0  0  0\n  
7 23  1  0  0  0  0\n  8  9  1  0  0  0  0\n  9 10  1  0  0  0  0\n 10 13  1  0 
 0  0  0\n 10 15  1  0  0  0  0\n 11 12  1  0  0  0  0\n 11 14  1  0  0  0  0\n 
13 14  1  0  0  0  0\n 13 16  1  0  0  0  0\n 14 20  2  0  0  0  0\n 16 15  2  
0  0  0  0\n 16 17  1  0  0  0  0\nM  END\n');
                </script>

I think I must be missing something obvious here, but I can't figure out what.

If it helps, Show -> Extract MOL data shows,

zapped
Jmol version 11.9.18  2010-01-12 17:49
EXTRACT: visible
  0  0  0  0  0

-- Bob G.

On 1/13/10 5:37 PM, "Robert Hanson" <hans...@stolaf.edu> wrote:

Works fine in Jmol 11.9.18. Unfortunately we JUST released 11.8.16, and I 
missed this fix in there. Please at least try the Jmol 11.9.

On Wed, Jan 13, 2010 at 3:41 PM, Grossman, Robert B <robert.gross...@uky.edu> 
wrote:
Hi, I spoke too soon before.  I have a new problem.  Now Jmol is only 
occasionally displaying the molecule.  For example, this script gives a blank 
Jmol:

<script type="text/javascript">
    // <!--
    function getMol_0() {
        return '\n  Marvin  10270415522D\n\n  9  9  0  0  0  0            999 
V2000\n   -2.2457    0.8188    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  
 -2.2457   -0.0063    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.5313 
  -0.4188    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.8168   
-0.0063    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.8168    0.8188  
  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.1023    1.2313    0.0000 
O   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.5313    1.2313    0.0000 C   0  0 
 0  0  0  0  0  0  0  0  0  0\n   -1.5313    2.8813    0.0000 C   0  0  0  0  0 
 0  0  0  0  0  0  0\n   -1.5313    2.0563    0.0000 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>


        <script type="text/javascript">
            jmolInitialize('../nosession/jmol');
            jmolApplet([250, 250]);
            jmolLoadInline(getMol_0());
        </script>


As does this:

                <p style="text-align:center;">
                <script type="text/javascript">
                    jmolInitialize('../../nosession/jmol');
                    jmolApplet([250, 250]);
                    jmolLoadInline('\n  Marvin  10270415522D\n\n  9  9  0  0  0 
 0            999 V2000\n   -2.2457    0.8188    0.0000 C   0  0  0  0  0  0  0 
 0  0  0  0  0\n   -2.2457   -0.0063    0.0000 C   0  0  0  0  0  0  0  0  0  0 
 0  0\n   -1.5313   -0.4188    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  
 -0.8168   -0.0063    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.8168 
   0.8188    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.1023    
1.2313    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.5313    1.2313   
 0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.5313    2.8813    0.0000 
C   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.5313    2.0563    0.0000 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>
                </p>

Once in a while I can induce Jmol to give me a picture, but it's not 
reproducible.

Any ideas?

Now using Jmol 11.8.10.

________________________________
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




------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-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


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-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


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to