[Jmol-developers] issue with flot

2010-07-07 Thread P . Canepa
Dear Bob, All,

I try to combine my old page you see once about CRYSTAL09,

I am trying to introduce new function for instance the use of flot as you did 
in the example 
http://chemapps.stolaf.edu/jmol/docs/examples-11/jmol-flot-energy.htm

I think I am doing some mistake somewhere.

In fact if use this string to load up the commands are executed  up to message 
DONE;. The result my flot graphs doesn't work.
jmolApplet(["520","440"], " script scripts/reset.spt;  set messageCallback 
'myMessageCallback'; message DONE; set loadStructCallback 'plotEnergies';");

If now I open the console and I reenter the string script scripts/reset.spt;  
set messageCallback 'myMessageCallback'; message DONE; set loadStructCallback 
'plotEnergies' now I can see the plotwith flot.

Do you have any clue? Should I enter a timeout

P.S. I am using the set messageCallback 'myMessageCallback'; message DONE to 
load up all my models when I load a new structure.

 function myMessageCallback(a,m) {
m = "" + m
// important to do this to change from Java string to JavaScript string
if (m.indexOf("DONE") == 0) loadModels()
  }

where loadModels() is the function which extracts the models and so on ..


Thanks, Piero
--
Please consider the environment before printing this e-mail.

Pieremanuele Canepa
Room 104
Functional Material Group
School of Physical Sciences, Ingram Building,
University of Kent, Canterbury, Kent,
CT2 7NH
United Kingdom

e-mail: pc...@kent.ac.uk
mobile: +44 (0) 7772-9756456
---
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] issue with flot

2010-07-07 Thread Angel Herráez
Hi Piero,
Yes, it looks like it may be a timing problem.
Have you tried to call  set loadStructCallback  before   
set messageCallback  ?



--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] issue with flot

2010-07-07 Thread P . Canepa
Yes I did, but it didn't work!
Thanks
--
Please consider the environment before printing this e-mail.

Pieremanuele Canepa
Room 104
Functional Material Group
School of Physical Sciences, Ingram Building,
University of Kent, Canterbury, Kent,
CT2 7NH
United Kingdom

e-mail: pc...@kent.ac.uk
mobile: +44 (0) 7772-9756456
---

From: Angel Herráez [angel.herr...@uah.es]
Sent: Wednesday, July 07, 2010 2:54 PM
To: jmol-developers@lists.sourceforge.net
Subject: Re: [Jmol-developers] issue with flot

Hi Piero,
Yes, it looks like it may be a timing problem.
Have you tried to call  set loadStructCallback  before
set messageCallback  ?



--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] issue with flot

2010-07-07 Thread Robert Hanson
definitely a timing issue. A few well-placed "alert()"s should tell you what
is going on.

On Wed, Jul 7, 2010 at 8:55 AM, P.Canepa  wrote:

> Yes I did, but it didn't work!
> Thanks
> --
> Please consider the environment before printing this e-mail.
>
> Pieremanuele Canepa
> Room 104
> Functional Material Group
> School of Physical Sciences, Ingram Building,
> University of Kent, Canterbury, Kent,
> CT2 7NH
> United Kingdom
>
> e-mail: pc...@kent.ac.uk
> mobile: +44 (0) 7772-9756456
> ---
> 
> From: Angel Herráez [angel.herr...@uah.es]
> Sent: Wednesday, July 07, 2010 2:54 PM
> To: jmol-developers@lists.sourceforge.net
> Subject: Re: [Jmol-developers] issue with flot
>
> Hi Piero,
> Yes, it looks like it may be a timing problem.
> Have you tried to call  set loadStructCallback  before
> set messageCallback  ?
>
>
>
>
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>



-- 
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 Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] Is is time to update the vecmath library we use?

2010-07-07 Thread Robert Hanson
don't think so. Probably just make it bigger, not better.

On Mon, Jul 5, 2010 at 9:44 AM, Jonathan Gutow  wrote:

> I was looking at the api documenttation for javax.vecmath and realized that
> the present release is 1.5.2 while we have 1.2 in Jmol.  Do we want to
> update this?
>
> Jonathan
> Dr. Jonathan H. Gutow
> Chemistry Departmentgu...@uwosh.edu
> UW-Oshkosh  Office: 920-424-1326
> 800 Algoma BoulevardFAX:920-424-2042
> Oshkosh, WI 54901
>http://www.uwosh.edu/facstaff/gutow
>
>
>
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>



-- 
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 Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] Could we enhance the Jmol.js functions such as jmolButton to accept appletIDs ?

2010-07-07 Thread Robert Hanson
You mean in Jmol.js?

On Mon, Jul 5, 2010 at 9:42 AM, Jonathan Gutow  wrote:

> While working on jmolColorPicker and the widgets in WebExport, I've
> realized that the behavior of our javascript utility functions is
> inconsistent.  Some of them take and appletID and some of them need the
> appletID set before they are called using another function.  I would like to
> propose that we extend the functions that don't accept appletIDs to accept
> appletIDs if they are provided.
>
> I don't think there is a problem with this as the jmolColorPicker function
> does this and works a lot like jmolButton, etc...
>
> Anybody see a problem?  Anybody want to help me work on this?
>
> Jonathan
> Dr. Jonathan H. Gutow
> Chemistry Departmentgu...@uwosh.edu
> UW-Oshkosh  Office: 920-424-1326
> 800 Algoma BoulevardFAX:920-424-2042
> Oshkosh, WI 54901
>http://www.uwosh.edu/facstaff/gutow
>
>
>
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>



-- 
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 Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] Could we enhance the Jmol.js functions such as jmolButton to accept appletIDs ?

2010-07-07 Thread Angel Herráez
El 7 Jul 2010 a las 10:42, Robert Hanson escribió:

> You mean in Jmol.js? 

Yes, that's Jonathan's idea, changing Jmol.js

I suspect there must be some reason why we have the two methods: use 
appletID parameter for jmolScript() and similar ones, or use 
jmolSetTarget() for the others, but Jonathan sees no reason why it 
cannot be done.
I also think that a single method would make life easier (I keep 
forgetting about setTarget)



--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] issue with flot

2010-07-07 Thread P . Canepa
Bob what should I print within alerts ?

--
Please consider the environment before printing this e-mail.

Pieremanuele Canepa
Room 104
Functional Material Group
School of Physical Sciences, Ingram Building,
University of Kent, Canterbury, Kent,
CT2 7NH
United Kingdom

e-mail: pc...@kent.ac.uk
mobile: +44 (0) 7772-9756456
---


From: Robert Hanson [hans...@stolaf.edu]
Sent: Wednesday, July 07, 2010 4:41 PM
To: jmol-developers@lists.sourceforge.net
Subject: Re: [Jmol-developers] issue with flot

definitely a timing issue. A few well-placed "alert()"s should tell you what is 
going on.

On Wed, Jul 7, 2010 at 8:55 AM, P.Canepa 
mailto:pc...@kent.ac.uk>> wrote:
Yes I did, but it didn't work!
Thanks
--
Please consider the environment before printing this e-mail.

Pieremanuele Canepa
Room 104
Functional Material Group
School of Physical Sciences, Ingram Building,
University of Kent, Canterbury, Kent,
CT2 7NH
United Kingdom

e-mail: pc...@kent.ac.uk
mobile: +44 (0) 7772-9756456
---

From: Angel Herráez [angel.herr...@uah.es]
Sent: Wednesday, July 07, 2010 2:54 PM
To: 
jmol-developers@lists.sourceforge.net
Subject: Re: [Jmol-developers] issue with flot

Hi Piero,
Yes, it looks like it may be a timing problem.
Have you tried to call  set loadStructCallback  before
set messageCallback  ?



--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- 
http://p.sf.net/sfu/sprint-com-first
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- 
http://p.sf.net/sfu/sprint-com-first
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers



--
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 Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] issue with flot

2010-07-07 Thread Angel Herráez
Piero,

Mostly, alerts serve to stop the flow of javascript and whatever 
message you put in them just tells you that the flow is there.

I'm afraid I cannot offer any clear hitn as to what is happening 
precisely in your case.

On the other hand, if your only purpose for defining a 
messagecallback is what you have shown, I would try something simpler 
like

jmolApplet(["520","440"], 'script "scripts/reset.spt"; 
set loadStructCallback "plotEnergies"; javascript "loadModels()"; ');

(but I'm just guessing)



--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] Could we enhance the Jmol.js functions such as jmolButton to accept appletIDs ?

2010-07-07 Thread Robert Hanson
It should be that all functions that create HTML and start like this:

function jmol(script, label, id, title)

that is, that users use to create buttons and such, NEVER use any appletID.
You are supposed to set the target first with jmolSetTarget() and then
execute those.

Functions like

function _jmol

which are not documented for user use and are called by other Jmol.js
functions may or may not accept the target text or create their own. I'm
pretty sure there's a reason in each case why they do or don't, so please
don't do anything with those. Ain't broke; don't fix it! :)

I haven't looked at the widget JS to see if it's consistent with this, but
if not it needs to be.

So, Jonathan, before you change anything, send us some suggested revisions
so we can think through if there was some reason it was that way. (Probably
was!)

Bob



2010/7/7 Angel Herráez 

> El 7 Jul 2010 a las 10:42, Robert Hanson escribió:
>
> > You mean in Jmol.js?
>
> Yes, that's Jonathan's idea, changing Jmol.js
>
> I suspect there must be some reason why we have the two methods: use
> appletID parameter for jmolScript() and similar ones, or use
> jmolSetTarget() for the others, but Jonathan sees no reason why it
> cannot be done.
> I also think that a single method would make life easier (I keep
> forgetting about setTarget)
>
>
>
>
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>



-- 
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 Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] issue with flot

2010-07-07 Thread Robert Hanson
It was just an ordering of Jmol commands in the jmolApplet script parameter.


2010/7/7 Angel Herráez 

> Piero,
>
> Mostly, alerts serve to stop the flow of javascript and whatever
> message you put in them just tells you that the flow is there.
>
> I'm afraid I cannot offer any clear hitn as to what is happening
> precisely in your case.
>
> On the other hand, if your only purpose for defining a
> messagecallback is what you have shown, I would try something simpler
> like
>
> jmolApplet(["520","440"], 'script "scripts/reset.spt";
> set loadStructCallback "plotEnergies"; javascript "loadModels()"; ');
>
> (but I'm just guessing)
>
>
>
>
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>



-- 
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 Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] Could we enhance the Jmol.js functions such as jmolButton to accept appletIDs ?

2010-07-07 Thread Robert Hanson
Ah, ok. Now I've looked at JmolColorPicker.js. Yes, some changes need to be
made there for consistency:

1) All functions should start with "jmol" -- uncapitalized -- if they are
intended for user use and "_jmol" if not. That's important because they need
to not interfere with anything else that the user might be using on the
page. If we did this "right" we would have all these be functions that are
properties of the _jmol object, but we aren't quite there yet.

2) In Jmol.js, all functions that require an applet ID are preceded with
jmolSetTarget() when they are used within the page, and they always invoke
the target using _jmol.targetText. But I see you have a different way of
doing it, because you are not storing the scripts the way the other _jmol...
functions do. You are invoking jmolScript directly. That's fine, but I think
you still should be using jmolSetTarget(), just like all the other user
methods. So then you would do the following instead of having the appletID
as a parameter:

function jmolColorPickerBox(scriptStr, startColor, boxID){   // notice the
lower case there
var appletID = _jmol.targetSuffix;
...
}

function jmol_animationmode(selected, n){


should be (in my opinion):

function _jmolAnimationMode(selected, targetSuffix){

if you intend this to be something the HTML widgets are calling.


For

function jmol_spin (state, n) {
if(state == true){
result = jmolScriptWait("spin on", n);
}else {
result = jmolScriptWait("spin off", n);
}
}


I would prefer:

function _jmolSpin (state, targetSuffix) {
   jmolScript("spin " + (state ? "on" : "off"), targetSuffix);
}

Was there a reason there for scriptWait? If so, then:

   jmolScriptWait("spin " + (state ? "on" : "off"), targetSuffix);

Bob


On Mon, Jul 5, 2010 at 9:42 AM, Jonathan Gutow  wrote:

> While working on jmolColorPicker and the widgets in WebExport, I've
> realized that the behavior of our javascript utility functions is
> inconsistent.  Some of them take and appletID and some of them need the
> appletID set before they are called using another function.  I would like to
> propose that we extend the functions that don't accept appletIDs to accept
> appletIDs if they are provided.
>
> I don't think there is a problem with this as the jmolColorPicker function
> does this and works a lot like jmolButton, etc...
>
> Anybody see a problem?  Anybody want to help me work on this?
>
> Jonathan
> Dr. Jonathan H. Gutow
> Chemistry Departmentgu...@uwosh.edu
> UW-Oshkosh  Office: 920-424-1326
> 800 Algoma BoulevardFAX:920-424-2042
> Oshkosh, WI 54901
>http://www.uwosh.edu/facstaff/gutow
>
>
>
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>



-- 
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 Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] Could we enhance the Jmol.js functions such as jmolButton to accept appletIDs ?

2010-07-07 Thread Jonathan Gutow
Hmm...let me look at this again.  I'm now confused.  I thought we decided that 
jmolColorPicker should take an appletID.  It is much more convenient for using 
all these functions to just specify the appletID in the call to the function.  
I'm still not clear on why one would want to use a separate setTarget function 
as you might have to call it multiple times in quick succession if you have 
lots of different applets on a page (suppose you have a table of applets each 
displaying a different property and menus below the table for controlling 
something about each property).

I'll look at the code some more and think more carefully about what the 
different functions do.  But I'm not proposing to remove the old functionality 
just extend it to what I think is a more convenient syntax.

Jonathan
On Jul 7, 2010, at 11:55 AM, Robert Hanson wrote:

> It should be that all functions that create HTML and start like this:
> 
> function jmol(script, label, id, title) 
> 
> that is, that users use to create buttons and such, NEVER use any appletID. 
> You are supposed to set the target first with jmolSetTarget() and then 
> execute those. 
> 
> Functions like
> 
> function _jmol
> 
> which are not documented for user use and are called by other Jmol.js 
> functions may or may not accept the target text or create their own. I'm 
> pretty sure there's a reason in each case why they do or don't, so please 
> don't do anything with those. Ain't broke; don't fix it! :)
> 
> I haven't looked at the widget JS to see if it's consistent with this, but if 
> not it needs to be.
> 
> So, Jonathan, before you change anything, send us some suggested revisions so 
> we can think through if there was some reason it was that way. (Probably was!)
> 
> Bob
> 
> 
> 
> 2010/7/7 Angel Herráez 
> El 7 Jul 2010 a las 10:42, Robert Hanson escribió:
> 
> > You mean in Jmol.js?
> 
> Yes, that's Jonathan's idea, changing Jmol.js
> 
> I suspect there must be some reason why we have the two methods: use
> appletID parameter for jmolScript() and similar ones, or use
> jmolSetTarget() for the others, but Jonathan sees no reason why it
> cannot be done.
> I also think that a single method would make life easier (I keep
> forgetting about setTarget)
> 
> 
> 
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
> 
> 
> 
> -- 
> 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 Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers

 Dr. Jonathan H. Gutow
Chemistry Departmentgu...@uwosh.edu
UW-Oshkosh  Office: 920-424-1326
800 Algoma BoulevardFAX:920-424-2042
Oshkosh, WI 54901
http://www.uwosh.edu/facstaff/gutow

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


[Jmol-developers] bug in WebExport

2010-07-07 Thread Robert Hanson
I get a null pointer exception immediately when I open the Pop-In Jmol page
and click a checkbox.

-- 
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 Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] bug in WebExport

2010-07-07 Thread Robert Hanson
A few more, while we are at it...

id="AnimContrl"

not showing suffix 0,1,2,etc.



JmolColorPickerBox(scriptStr, [0,0,0], 'backbox1',  '1')

is the only one that puts ' ' around the number. Probably should remove
those.

OK, I think for sure looking at the HTML code this produces, that we DO want
appletID for all those because really they are _jmol-type functions, not
something to suggest users implement. There's too much necessary stuff
around them. Perhaps a user function could be created that writes all of
this:


background color:var scriptStr =
'color background $COLOR$;';JmolColorPickerBox(scriptStr, [0,0,0],
'backbox0',  '0');

And then that might allow for the appletID to be gotten from jmolSetTarget()
or the most recent applet written.

By the way, why are we creating the global variable "scriptStr" here instead
of just executing JmolColorPickerBox with that parameter? I'm trying to get
us in the mode of not generating unnecessary global variables that might
interfere with other JavaScript. You know that's a huge pain when that
happens, especially if it is code created by another application, like this
is.

I guess I'd suggest the following in Widgets.java:

  return ""
  + GT._("background color:")
  + ""
  + "var scriptStr = 'color background $COLOR$;';"
  + "JmolColorPickerBox(scriptStr, ["
  + (int)ptRGB.x + "," + (int)ptRGB.y + "," + (int)ptRGB.z
  + "], 'backbox"
  + appletID + "',  '" + appletID + "');"
  + "";

look like this:

  return "jmolBackgroundColorPickerBox();";


Simple as that. And then have jmolBackgroundColorPickerBox() create all the
HTML stuff necessary. (Maybe a default there.)

That to me would be more readable in the HTML and also more similar to what
I see in Jmol -- a bit of code for each checkbox that I create.

I think the idea I'm promoting is to have the Jmol application just send the
essentials -- "we need a box here of this sort" -- to the page and let the
JavaScript there do all the details. This makes sense to me because it then
allows more flexibility by the user (who can change the function or
parameters of jmolBackgroundColorPickerBox if desired at the JavaScript
level) and by developers (who then don't need to go into the Java to fix the
JavaScript).

I'll also suggest that there be one JmolWidgets.js that has all the
necessary code in it for all the widgets. The tiny snippets of code in
JmolSpin.js, for example, is just getting too fine-grained. As long as the
files are small, why not just get them all in Widgets.js. I probably
suggested this breaking them out, but

Finally, I'd like to see these functions allowing the same sort of
flexibility that the jmolButton() and jmolRadio() functions have -- in that
they return code instead of writing it if jmolSetDocument(0) has been
issued.

Consider all this just my 2 cents. Really I defer to Jonathan and Angel on
this.

Bob










On Wed, Jul 7, 2010 at 4:09 PM, Robert Hanson  wrote:

> I get a null pointer exception immediately when I open the Pop-In Jmol page
> and click a checkbox.
>
> --
> 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
>



-- 
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 Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] bug in WebExport

2010-07-07 Thread Jonathan Gutow
Haven't seen this. Which browser, os and local or server?


Sent from my iPod
Jonathan Gutow
jgu...@new.rr.com

On Jul 7, 2010, at 4:09 PM, Robert Hanson  wrote:

> I get a null pointer exception immediately when I open the Pop-In Jmol page 
> and click a checkbox.
> 
> -- 
> 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 Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] bug in WebExport

2010-07-07 Thread Jonathan Gutow
Some good ideas.
On Jul 7, 2010, at 4:54 PM, Robert Hanson wrote:

> A few more, while we are at it...
> 
> id="AnimContrl"
> 
> not showing suffix 0,1,2,etc. 
Have to check this.  We should be keeping track of which is which, thanks.
> 
> 
> 
> JmolColorPickerBox(scriptStr, [0,0,0], 'backbox1',  '1') 
> 
> is the only one that puts ' ' around the number. Probably should remove 
> those. 
I'll look into it, but I was having a problem with numbers...don't remember 
why...
> 
> OK, I think for sure looking at the HTML code this produces, that we DO want 
> appletID for all those because really they are _jmol-type functions, not 
> something to suggest users implement. There's too much necessary stuff around 
> them. Perhaps a user function could be created that writes all of this:
None of the formatting below is necessary for the colorpicker box.  It is just 
necessary for the formatting of the pop-in page.
> 
> 
> background color: style="min-width:70px;">var scriptStr = 
> 'color background $COLOR$;';JmolColorPickerBox(scriptStr, [0,0,0], 
> 'backbox0',  '0');
The formatting just makes sure that the table width is OK for the widgets.  
This is formatting the user would have to decide on when they set up their 
page.  And I see we did screw up the capitalization on 
JmolColorPickerBox...will fix...
> 
> And then that might allow for the appletID to be gotten from jmolSetTarget() 
> or the most recent applet written. 
We could set it up to accept appletID from jmolSetTarget() if the one provided 
is undefined.
> 
> By the way, why are we creating the global variable "scriptStr" here instead 
> of just executing JmolColorPickerBox with that parameter? I'm trying to get 
> us in the mode of not generating unnecessary global variables that might 
> interfere with other JavaScript. You know that's a huge pain when that 
> happens, especially if it is code created by another application, like this 
> is. 

I'm confused.  I think I'm getting mixed up with java and javascript.  Does 
using the "var" in front of a variable make it local or global?

> 
> I guess I'd suggest the following in Widgets.java:
> 
>   return ""
>   + GT._("background color:")
>   + " 'text/javascript'>"
>   + "var scriptStr = 'color background $COLOR$;';"
>   + "JmolColorPickerBox(scriptStr, [" 
>   + (int)ptRGB.x + "," + (int)ptRGB.y + "," + (int)ptRGB.z
>   + "], 'backbox"
>   + appletID + "',  '" + appletID + "');"
>   + "";
> 
> look like this:
> 
>   return " 'text/javascript'>jmolBackgroundColorPickerBox();";
> 
> 
> Simple as that. And then have jmolBackgroundColorPickerBox() create all the 
> HTML stuff necessary. (Maybe a default there.)
> 
> That to me would be more readable in the HTML and also more similar to what I 
> see in Jmol -- a bit of code for each checkbox that I create. 
We could define some particular colorpickerboxes.  I hadn't thought of that.  I 
was trying to make something more general.
> 
> I think the idea I'm promoting is to have the Jmol application just send the 
> essentials -- "we need a box here of this sort" -- to the page and let the 
> JavaScript there do all the details. This makes sense to me because it then 
> allows more flexibility by the user (who can change the function or 
> parameters of jmolBackgroundColorPickerBox if desired at the JavaScript 
> level) and by developers (who then don't need to go into the Java to fix the 
> JavaScript). 
> 
> I'll also suggest that there be one JmolWidgets.js that has all the necessary 
> code in it for all the widgets. The tiny snippets of code in JmolSpin.js, for 
> example, is just getting too fine-grained. As long as the files are small, 
> why not just get them all in Widgets.js. I probably suggested this breaking 
> them out, but
I think the idea was that we could put up the separate widgets in the Wiki.  If 
we are going to include them as a package like Jmol.js, I think you are correct 
that it should be one file.  I'm inclined to keep them in separate files until 
everything is settled and then we can make a combined file that should be 
distributed just like Jmol.js.
> 
> Finally, I'd like to see these functions allowing the same sort of 
> flexibility that the jmolButton() and jmolRadio() functions have -- in that 
> they return code instead of writing it if jmolSetDocument(0) has been issued. 
I need to look at the code again.  I didn't realize this behavior existed.  
Sounds useful.
> 
> Consider all this just my 2 cents. Really I defer to Jonathan and Angel on 
> this. 
As usual a worthwhile 2 cents...

Jonathan
 Dr. Jonathan H. Gutow
Chemistry Departmentgu...@uwosh.edu
UW-Oshkosh  Office: 920-424-1326
800 Algoma BoulevardFAX:920-424-2042
Oshkosh, WI 54901
http://www.uwosh.edu/facstaff/gutow


---

[Jmol-developers] RES: RES: RES: Virtual Reality

2010-07-07 Thread Moacyr Francischetti Corrêa
Bob,

 

After a time away from that project, I am returning now.

Considering the scheme described in
http://chemapps.stolaf.edu/jmol/docs/misc/navigation.pdf, you can change the
position of the observer and maintain the position of the molecule
unchanged?

 

Moacyr

 

De: Robert Hanson [mailto:hans...@stolaf.edu] 
Enviada em: quinta-feira, 18 de março de 2010 11:17
Para: jmol-developers@lists.sourceforge.net
Assunto: Re: [Jmol-developers] RES: RES: Virtual Reality

 

Moacyr,

Excellent. What I'd like to do is spend some time chatting with you (by
email, perhaps, or Skype). It sounds like this could involve some rather
"deep" code changes, so I want to be sure that we have a clear plan before
starting. Sounds like there are some good standards out there, so this might
actually be very simple. Do you have references to these standards?

When you want to do some coding we can set up a branch for you to work on.
We wouldn't do anything with trunk for now. Also, you don't need to be a
Jmol developer to work on this -- just get a Sourceforge account and check
out the code. You don't want to do too much on that, because it could be
difficult to integrate it. 

I think the main chunk of code you want to be working with is in
org/jmol/viewer/TransformManager11.java.

Camera position is pretty well described in the code as well as at
http://chemapps.stolaf.edu/jmol/docs/misc/navigation.pdf
and
http://chemapps.stolaf.edu/jmol/docs/misc/perspective.gif


Looking forward to working with you,

Bob
  

On Tue, Mar 16, 2010 at 7:38 PM, Moacyr Francischetti Corrêa
 wrote:

I will try to implement multi-projection in 2 weeks.

But need help to start.

I analyzed the source code of Jmol and found many references to the camera.
Where exactly is the control of the point of view?

 

I could be part of the Jmol's development team?

My proposal is to make Jmol works in CAVEs or other multi-projection
environments, in addition to making this software collaborative among
research groups dispersed geographically – the same visualization for all
users in real time!

 

Moacyr

 

De: Robert Hanson [mailto:hans...@stolaf.edu] 
Enviada em: terça-feira, 9 de março de 2010 18:35


Para: jmol-developers@lists.sourceforge.net

Assunto: Re: [Jmol-developers] RES: Virtual Reality

 

 

On Tue, Mar 9, 2010 at 2:57 PM, Moacyr Francischetti Corrêa
 wrote:

Sorry... I was not clear.

How each applet will know which angle is to display the molecule, since each
pojetor should show the molecule from a different angle from the others?

Can Jmol be manipulated by 6DOF devices?

It can also be used HMD (Head-mounted-displays) with motion sensor?


Sounds like a great project. No one has worked on that.  

 

De: Robert Hanson [mailto:hans...@stolaf.edu] 
Enviada em: terça-feira, 9 de março de 2010 17:32


Para: jmol-developers@lists.sourceforge.net

Assunto: Re: [Jmol-developers] Virtual Reality

 

Actually, ok

five applets, synchronized. Piece of cake.

On Tue, Mar 9, 2010 at 2:31 PM, Robert Hanson  wrote:

No suggestions!

On Tue, Mar 9, 2010 at 11:40 AM, Moacyr Francischetti Corrêa
 wrote:

Is it possible to run Jmol in a virtual reality environment, such as a CAVE?

It would require that the software could generate 5 different views of the
molecule, one for each wall of the CAVE.

 

Any suggestion?

 

Moacyr

 


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers




-- 
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




-- 
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



--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.n