Re: [Jmol-users] which jmol applet?

2008-08-30 Thread Angel Herráez
Hi Jeff

That shuld be in the doc... No! jmolEvaluate is not documented in 
http://jmol.sourceforge.net/jslibrary/

Let me take a look at Jmol.js code...
function jmolEvaluate(molecularMath, targetSuffix)

So, you work as with jmolScript. That would be:

var Energy = jmolEvaluate('getProperty(auxiliaryInfo.zeroPoint)' ,  0   );

using 0 for the first applet, 1 for the second, etc.,  or their names if 
you set them.


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] loading external files in the signed applet

2008-08-30 Thread Paul Pillot
I am setting up a web page with the ability to load local files as  
well as external files (for example, files coming from the pdb)

When I run the page locally, the applet is able to load any local  
file, but sends an error message (Jmol 11.6.RC8, Mac OSX, Safari):
java.security.AccessControlException: access denied  
(java.net.SocketPermission www.rcsb.org:80 connect,resolve)
openFile(http://www.rcsb.org/pdb/files/1gzx.pdb): 61 ms
eval ERROR: java.security.AccessControlException: access denied  
(java.net.SocketPermission www.rcsb.org:80 connect,resolve)
line 1 command 1 of  file null:
  load  http://www.rcsb.org/pdb/files/1gzx.pdb; 

When the page is loaded from a webserver, the applet is unable to  
load any local file, as well as remote files coming from elsewhere  
than the webserver :
FileManager.openFile(''file:Users/paul/Desktop/ 
ac.pdb'') //''file:Users/paul/Desktop/ac.pdb''
FileManager opening http://ordinateur-de-judith-ciosi.local/~paul/ 
JMolUSc/''file:Users/paul/Desktop/ac.pdb''
file ERROR: http://ordinateur-de-judith-ciosi.local/~paul/ 
JMolUSc/''file:Users/paul/Desktop/ac.pdb''
java.io.FileNotFoundException: http://ordinateur-de-judith- 
ciosi.local/~paul/JMolUSc/''file:Users/paul/Desktop/ac.pdb''
openFile(''file:Users/paul/Desktop/ac.pdb''): 3 ms
eval ERROR: java.io.FileNotFoundException: http://ordinateur-de- 
judith-ciosi.local/~paul/JMolUSc/''file:Users/paul/Desktop/ac.pdb''
line 1 command 1 of  file null:
  load  ''file:Users/paul/Desktop/ac.pdb'' 

I searched the mailing list archive for this issue and found a one  
year old thread, which stated that this behavior is linked to the  
inability to accept loading external files when the command is issued  
by an unsigned javascript. A workaround is to reload the jmol applet  
with the new file.
I would like to know if there is any other solution to make the  
signed applet accept an external file ? I am also wondering at how  
this problem has been dealt with in jmol protein explorer ?

Thanks in advance,
Paul

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] loading external files in the signed applet

2008-08-30 Thread Robert Hanson
Paul, check out this page to see how yours might be different.

http://chemapps.stolaf.edu/jmol/docs/examples-11/simple.htm

It's using the signed applet and working just fine. Maybe has to be newer
than 11.6.RC8, but I don't think so. It should load files from the PDB using
load = and files from your hard drive using, for example:

load c:/temp/caffeine.xyz


Also, the Jmol Protein Explorer is using using the signed applet without a
hitch.

Bob



On Sat, Aug 30, 2008 at 7:32 AM, Paul Pillot 
[EMAIL PROTECTED] wrote:

 I am setting up a web page with the ability to load local files as
 well as external files (for example, files coming from the pdb)

 When I run the page locally, the applet is able to load any local
 file, but sends an error message (Jmol 11.6.RC8, Mac OSX, Safari):
 java.security.AccessControlException: access denied
 (java.net.SocketPermission www.rcsb.org:80 connect,resolve)
 openFile(http://www.rcsb.org/pdb/files/1gzx.pdb): 61 ms
 eval ERROR: java.security.AccessControlException: access denied
 (java.net.SocketPermission www.rcsb.org:80 connect,resolve)
 line 1 command 1 of  file null:
  load  http://www.rcsb.org/pdb/files/1gzx.pdb; 

 When the page is loaded from a webserver, the applet is unable to
 load any local file, as well as remote files coming from elsewhere
 than the webserver :
 FileManager.openFile(''file:Users/paul/Desktop/
 ac.pdb'') //''file:Users/paul/Desktop/ac.pdb''
 FileManager opening 
 http://ordinateur-de-judith-ciosi.local/~paul/http://ordinateur-de-judith-ciosi.local/%7Epaul/
 JMolUSc/''file:Users/paul/Desktop/ac.pdb''
 file ERROR: 
 http://ordinateur-de-judith-ciosi.local/~paul/http://ordinateur-de-judith-ciosi.local/%7Epaul/
 JMolUSc/''file:Users/paul/Desktop/ac.pdb''
 java.io.FileNotFoundException: http://ordinateur-de-judith-
 ciosi.local/~paul/JMolUSc/''file:Users/paul/Desktop/ac.pdb''
 openFile(''file:Users/paul/Desktop/ac.pdb''): 3 ms
 eval ERROR: java.io.FileNotFoundException: http://ordinateur-de-
 judith-ciosi.local/~paul/JMolUSc/''file:Users/paul/Desktop/ac.pdb''
 line 1 command 1 of  file null:
  load  ''file:Users/paul/Desktop/ac.pdb'' 

 I searched the mailing list archive for this issue and found a one
 year old thread, which stated that this behavior is linked to the
 inability to accept loading external files when the command is issued
 by an unsigned javascript. A workaround is to reload the jmol applet
 with the new file.
 I would like to know if there is any other solution to make the
 signed applet accept an external file ? I am also wondering at how
 this problem has been dealt with in jmol protein explorer ?

 Thanks in advance,
 Paul

 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 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
Northfield, MN
http://www.stolaf.edu/people/hansonr


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 Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] proposed change to Jmol.js

2008-08-30 Thread Robert Hanson
I'm working with them -- they are mostly waiting for 11.6 to be stable. Then
they will go to that.

Bob


On Sat, Aug 30, 2008 at 7:29 AM, Angel Herráez [EMAIL PROTECTED] wrote:

  One of the interesting aspects is that I could use
 
  JMOLJAR=
 http://chemapps.stolaf.edu/jmol/docs/examples-11/JmolAppletSigned.jar
 
  for example to go to the PDB website and use MY applet instead of theirs.


 Assuming that they update their Jmol.js file!!!

 They are still using 10.2, and I think there have been requests for update
 already, to no
 avail


 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 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
Northfield, MN
http://www.stolaf.edu/people/hansonr


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 Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] proposed change to Jmol.js

2008-08-30 Thread Robert Hanson
RCSB beta site is using Jmol 11.4. See for example:

http://betastaging.rcsb.org/pdb/static.do?p=explorer/viewers/jmol.jsp?structureId=1O1I

Current version there is 11.4.6, I think.


On Sat, Aug 30, 2008 at 8:08 AM, Robert Hanson [EMAIL PROTECTED] wrote:

 I'm working with them -- they are mostly waiting for 11.6 to be stable.
 Then they will go to that.

 Bob



 On Sat, Aug 30, 2008 at 7:29 AM, Angel Herráez [EMAIL PROTECTED]wrote:

  One of the interesting aspects is that I could use
 
  JMOLJAR=
 http://chemapps.stolaf.edu/jmol/docs/examples-11/JmolAppletSigned.jar
 
  for example to go to the PDB website and use MY applet instead of
 theirs.


 Assuming that they update their Jmol.js file!!!

 They are still using 10.2, and I think there have been requests for update
 already, to no
 avail


 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the
 world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 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
 Northfield, MN
 http://www.stolaf.edu/people/hansonr


 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
Northfield, MN
http://www.stolaf.edu/people/hansonr


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 Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] New feature inquiry

2008-08-30 Thread [EMAIL PROTECTED]



  This is a preliminary inquiry about two feature requests.  In my  
MolnIquiry site, I have imbedded line objects as bonds that can then  
be ?picked?; for example, students are asked to click on a peptide  
bond.). Creating these objects is a task, particularly if many are  
needed, and the lines can become visible if wireframe is turned off.


  Is it technically feasible that Jmol could:

  1. generate a series of  IDed objects between the connected atoms  
of an atom set  e.g.: ?select (atom expression), drawConnected line,  
ID ?line?+j?


  where j is incrementally increased with each line?

  2. set the color of an object as ?transparent? (but still pickable).

  Does anyone see any other applications of these features?

  Thanks.

  Steve

  Dept of Biology and Environmental Science

  Marietta College


This message was sent using Marietta College WebMail.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] proposed change to Jmol.js

2008-08-30 Thread rhuehne
Quoting Robert Hanson [EMAIL PROTECTED]:

 One of the interesting aspects is that I could use

 JMOLJAR=
 http://chemapps.stolaf.edu/jmol/docs/examples-11/JmolAppletSigned.jar

 for example to go to the PDB website and use MY applet instead of theirs.


Bob,
have you tried that already?
If this is allowed it would be exactly what should pe prevented within  
Jmol.js!
It should only be allowed to load a different Jmol version from the  
same server!

Otherwise anyone could use your/our service by 'URL Spoofing' to  
deliver an evil Jmol applet (or even a totally different applet) to  
the user!!!

Regards,
Rolf




This message was sent using IMP, the Internet Messaging Program.


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] proposed change to Jmol.js

2008-08-30 Thread Robert Hanson
that's why I'm asking. Yes, I have tried this. We could make it only the
applet from the server -- in other words not allow a new codebase -- if you
think that is a major concern.

How would you see the spoof working, Rolf?

Bob


On Sat, Aug 30, 2008 at 12:56 PM, [EMAIL PROTECTED] wrote:

 Quoting Robert Hanson [EMAIL PROTECTED]:

  One of the interesting aspects is that I could use
 
  JMOLJAR=
  http://chemapps.stolaf.edu/jmol/docs/examples-11/JmolAppletSigned.jar
 
  for example to go to the PDB website and use MY applet instead of theirs.
 

 Bob,
 have you tried that already?
 If this is allowed it would be exactly what should pe prevented within
 Jmol.js!
 It should only be allowed to load a different Jmol version from the
 same server!

 Otherwise anyone could use your/our service by 'URL Spoofing' to
 deliver an evil Jmol applet (or even a totally different applet) to
 the user!!!

 Regards,
 Rolf



 
 This message was sent using IMP, the Internet Messaging Program.


 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 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
Northfield, MN
http://www.stolaf.edu/people/hansonr


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 Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] New feature inquiry

2008-08-30 Thread Robert Hanson
Steve, there's probably not much sense in creating a generic bond-equivalent
object like that. But you can do what you say yourself. For example, if a
student is asked to click on a peptide bond, you know what bond it is, so
you can create the link yourself and, like you say, make them transparent
but still clickable. That you can do right now. But I see your point about
lots of these. I don't see why we can't set up bond picking if that is what
you are after. Wouldn't that be better?

Bob


On Sat, Aug 30, 2008 at 10:41 AM, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:

 This is a preliminary inquiry about two feature requests.  In my
 MolnIquiry site, I have imbedded line objects as bonds that can then be
 ?picked?; for example, students are asked to click on a peptide bond.).
 Creating these objects is a task, particularly if many are needed, and the
 lines can become visible if wireframe is turned off.

 Is it technically feasible that Jmol could:

 1. generate a series of  IDed objects between the connected atoms of an
 atom set  e.g.: ?select (atom expression), drawConnected line, ID ?line?+j?

 where j is incrementally increased with each line?

 2. set the color of an object as ?transparent? (but still pickable).

 Does anyone see any other applications of these features?

 Thanks.

 Steve

 Dept of Biology and Environmental Science

 Marietta College


 
 This message was sent using Marietta College WebMail.

 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 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
Northfield, MN
http://www.stolaf.edu/people/hansonr


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 Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] proposed change to Jmol.js

2008-08-30 Thread rhuehne
Quoting Robert Hanson [EMAIL PROTECTED]:

 that's why I'm asking. Yes, I have tried this. We could make it only the
 applet from the server -- in other words not allow a new codebase -- if you
 think that is a major concern.

 How would you see the spoof working, Rolf?


The HTML code shown below just hides the 'JMOLJAR=...' extension  
within the status line. Althugh my Firefox 3 does show the real URL,  
even when I exceptionally allow status line changes, it still works  
with my Internet Eplorer 7. And this is just the most simple way.  
There are more sophisticated techniques possible.

a  
href=http://www.imb-jena.de/cgi-bin/3d_mapping.pl?CODE=1dehMODE=biological1JMOLJAR=http://www.fakejenalib.com/fakejmol.jar;
 onmouseout=window.status='';return true 
onmouseover=window.status='http://www.imb-jena.de/cgi-bin/3d_mapping.pl?CODE=1dehMODE=biological1';return
 trueJenaLib Jmol  
Viewer/a

Since it may be possible that the complete version is only shown as  
links here is a (modified) repeat of the Javascript portion:

onmouseout=window.status='';return true
onmouseover=window.status='original_URL';return true

Regards,
Rolf



This message was sent using IMP, the Internet Messaging Program.


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] New feature inquiry

2008-08-30 Thread Robert Hanson
Jmol 11.6.RC12 now has

  set atomPicking  [default TRUE]
  set bondPicking  [default FALSE]

The report from the bond picking looks like this:

[bond,69 1 [GLY]37.C #263 -- [GLY]37.CA #262
1.5251089,21.2975,16.2235,6.473]

The First number is the bond ID. It is the number you would use to get the
bond properties:

  print getProperty(BondInfo[69])

or

  print getproperty(BondInfo, 69)


This number is also one more than the number you would use to specify that
bond using bond set notation (because in that case 0 is the first bond):

select [{68}]; color BOND white

The number 1 is the bond order; next are the identities of the two atoms and
the bond distance. The last three numbers are the coordinates of the center
of the bond.

That work for you, Steve?

Bob


On Sat, Aug 30, 2008 at 1:11 PM, Robert Hanson [EMAIL PROTECTED] wrote:

 Steve, there's probably not much sense in creating a generic
 bond-equivalent object like that. But you can do what you say yourself. For
 example, if a student is asked to click on a peptide bond, you know what
 bond it is, so you can create the link yourself and, like you say, make them
 transparent but still clickable. That you can do right now. But I see your
 point about lots of these. I don't see why we can't set up bond picking if
 that is what you are after. Wouldn't that be better?

 Bob


 On Sat, Aug 30, 2008 at 10:41 AM, [EMAIL PROTECTED] 
 [EMAIL PROTECTED] wrote:

 This is a preliminary inquiry about two feature requests.  In my
 MolnIquiry site, I have imbedded line objects as bonds that can then be
 ?picked?; for example, students are asked to click on a peptide bond.).
 Creating these objects is a task, particularly if many are needed, and the
 lines can become visible if wireframe is turned off.

 Is it technically feasible that Jmol could:

 1. generate a series of  IDed objects between the connected atoms of an
 atom set  e.g.: ?select (atom expression), drawConnected line, ID ?line?+j?

 where j is incrementally increased with each line?

 2. set the color of an object as ?transparent? (but still pickable).

 Does anyone see any other applications of these features?

 Thanks.

 Steve

 Dept of Biology and Environmental Science

 Marietta College


 
 This message was sent using Marietta College WebMail.

 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the
 world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 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
 Northfield, MN
 http://www.stolaf.edu/people/hansonr


 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
Northfield, MN
http://www.stolaf.edu/people/hansonr


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 Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] New feature inquiry

2008-08-30 Thread Angel Herráez
On 30 Aug 2008 at 14:20, Robert Hanson wrote:
 Jmol 11.6.RC12 now has
 
  set atomPicking [default TRUE]
  set bondPicking [default FALSE]


Nice! and quick
  Are those 2 independently set, or are they alternative options?

And, how does that combine with the different set picking variants?




-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] proposed change to Jmol.js

2008-08-30 Thread rhuehne
Quoting Robert Hanson [EMAIL PROTECTED]:

 ok. Shucks. That's convincing. OK if it allows same-server jar changes?


Yes, I think so. If the server is compromised then I guess it won't  
make much difference anyhow.

Regards,
Rolf


This message was sent using IMP, the Internet Messaging Program.


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] New feature inquiry

2008-08-30 Thread Robert Hanson
all three are independent:

set atomPicking
set bondPicking
set drawPicking


On Sat, Aug 30, 2008 at 2:49 PM, Angel Herráez [EMAIL PROTECTED] wrote:

 On 30 Aug 2008 at 14:20, Robert Hanson wrote:
  Jmol 11.6.RC12 now has
 
   set atomPicking [default TRUE]
   set bondPicking [default FALSE]


 Nice! and quick
  Are those 2 independently set, or are they alternative options?

 And, how does that combine with the different set picking variants?




 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 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
Northfield, MN
http://www.stolaf.edu/people/hansonr


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 Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] The results of your email commands

2008-08-30 Thread spila...@marietta.edu



  Bob,

  (This seemed to have been bounced -- so I'm trying again)
I am trully overwelmed.  This is great!  It should work; I would  like  
to pass the ID of the 'picked' bond to a javascript variable.  Is  the  
report returned to the pickCallback function as is atom picking, such  
that the ID can be parsed out.  Or is there another way   
(jmolEvaluate?) to pass the report or ID to a javascript variable?   
I'll admit to confusion about passing getProperty info to javascript.

Thanks.
Steve




This message was sent using Marietta College WebMail.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] The results of your email commands

2008-08-30 Thread Robert Hanson
Yes, this information comes back as a string in the pickCallback (second
parameter). The third parameter is an atom index:

  0+ atom
 -2 draw
  -3 bond

Also, you can always check the most recent pick information using

var x = jmolEvaluate(_pickInfo)
or
var x = jmolEvaluate(_atomPicked)

You should be able to parse that as a JavaScript array directly:

 var info = eval(jmolEvaluate(_pickInfo))

or from that second parameter, HOWEVER -- strings passed back to JavaScript
are Java strings, not JavaScript strings, so ALWAYS do

   + xxx

to turn them into JavaScript strings before you do anything with them. So in
a callback:

function myPickCallback(app, msg, atomIndex) {
  var info = eval( + msg)
}

not just

function myPickCallback(app, msg, atomIndex) {
  var info = eval(msg)
}

Bob


I've put sample JAR files up in

http://chemapps.stolaf.edu/jmol/docs/examples-11/Jmol-11_5.jar


(transferring now - takes a few minutes)
Bob

On Sat, Aug 30, 2008 at 3:09 PM, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:

 Bob,

 (This seemed to have been bounced -- so I'm trying again)
 I am trully overwelmed.  This is great!  It should work; I would  like to
 pass the ID of the 'picked' bond to a javascript variable.  Is  the report
 returned to the pickCallback function as is atom picking, such that the ID
 can be parsed out.  Or is there another way  (jmolEvaluate?) to pass the
 report or ID to a javascript variable?  I'll admit to confusion about
 passing getProperty info to javascript.
 Thanks.
 Steve



 
 This message was sent using Marietta College WebMail.

 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 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
Northfield, MN
http://www.stolaf.edu/people/hansonr


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 Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Bond picking

2008-08-30 Thread spila...@marietta.edu



  Bob,

  Wonderful.  I'll let you know how it works.

  Thanks again.

  Steve

  

Yes, this information comes back as a string in the pickCallback (second
parameter). The third parameter is an atom index:

   0+ atom
  -2 draw
   -3 bond

Also, you can always check the most recent pick information using

var x = jmolEvaluate(_pickInfo)
or
var x = jmolEvaluate(_atomPicked)

You should be able to parse that as a JavaScript array directly:

  var info = eval(jmolEvaluate(_pickInfo))

or from that second parameter, HOWEVER -- strings passed back to JavaScript
are Java strings, not JavaScript strings, so ALWAYS do

    + xxx

to turn them into JavaScript strings before you do anything with them. So in
a callback:

function myPickCallback(app, msg, atomIndex) {
   var info = eval( + msg)
}

not just

function myPickCallback(app, msg, atomIndex) {
   var info = eval(msg)
}

Bob



  Steven Spilatro

  Dept of Biology and Environmental Science

  Marietta College


This message was sent using Marietta College WebMail.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Bond picking -- and getProperty in general

2008-08-30 Thread Robert Hanson
getProperty can be a very inefficient function. The algorithm is designed to
return the entire property set, then do the selections. So, for example, if
you say:

  print getProperty(atomInfo[3])

and there are 3 atoms, then first a vector containing 3 elements is
produced and only after that is one selected.

I'm reminded that I thought of that and had a solution to it but forgot. The
alternative format:

  print getProperty(atomInfo, {atomIndex=3})

is far more efficient, as it only creates a single atomInfo entry -- an
array with one element.

I've checked in code now that combines these:

  print getProperty(atominfo[1].sym, {atomIndex=3})

creates only one entry and then selects the information about atom symbol
from that single entry. ([0] would work as well, because that means the
last entry, and there is only one)

In checking through the code, I also noticed that bondInfo works
similarly, but both atoms of the bond must be selected. I've now changed
that so that if you specify just one atom, then bondInfo gives you what
you think it would -- the bond info for that atom:

  print getProperty(bondInfo, {atomno=2})

[[ information about all bonds to atom #2 are displayed ]]

Similarly,

  print getProperty(bondInfo[1], {atomno=2})

give information about just the first bond to atom #2.

In addition, getProperty(modelInfo) was not allowing an atom expression,
but it seems to me that would make sense as well:

  print getProperty(modelInfo, {atomIndex=2})

or perhaps

  print getProperty(modelInfo, {1.3})

So I have added that.

Finally, getProperty(auxiliaryInfo) also could allow for specifying the
model, so I have added that as well:

  print getProperty(auxiliaryInfo, {1.3})


These changes should make for much more efficient extraction of information.


Bob
-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


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 Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users