Re: [Jmol-users] Compare SMILES Question

2017-03-29 Thread Robert Hanson
Yes, I think that is appropriate.

$ print "C1=CC=CC=C1".find("smiles", "c1c1")
6
$ print "C1=CC=CC=C1".find("smiles", "/aromaticdefined/c1c1")
0

The first allows for different types of aromatic descriptions to be
matched; the second does not.

These "directives" are described in Table 8 of
https://jcheminf.springeropen.com/articles/10.1186/s13321-016-0160-4



​
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Compare SMILES Question

2017-03-29 Thread Otis Rothenberger
Bob,

I'm writing this question because I discovered that something is working that I 
thought should not work. With Jmol compare SMILES (key studentAnswer), I'm 
getting a match with the following:


C1=CC=CC=C1 (JME)

c1c1 (Jmol)


C1=CC=CC=C1 is the Key

c1c1 is the student answer

This is matching. Is that correct?

Otis

--
Otis Rothenberger
o...@chemagic.org
http://chemagic.org


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Java support in browsers

2017-03-29 Thread David Hibbitts
I don't have any *insider* information of any kind, but their "About" page
seems pretty clear that they're in favor of allowing users to use Java and
any other plugins if they wish. Also revealing is this page from their
blog:

https://www.waterfoxproject.org/blog/waterfox-52.0-release-download

which indicates that the project may soon fork and only get security
updates from now on (because of a major structural change that Firefox is
introducing). Anyways, on that page they also list NPAPI support as part of
the feature-set of Waterfox, so hopefully that doesn't change any time soon.

It doesn't need to last forever, at some stage the performance differences
between jsmol and jmol will be negligible for all but the largest
structures on modern computers.

On Wed, Mar 29, 2017 at 3:59 PM, Angel Herráez  wrote:

> (I'm following another thread started by David Hibbitts but this is a
> different
> topic, so I changed the subject)
>
> David,
> May I ask what is the information you have regarding future support of Java
> by Waterfox?
>
>
> On 29 Mar 2017 at 15:14, David Hibbitts wrote:
> > It's hard to know how much any of us should invest in these
> java-specific issues given the aggressive nature of browsers toward
> javascript --
> > but my website really serves my research group, not the general public,
> and there I can certainly get the users to install Waterfox+JAVA.
>
>
> ---
> El software de antivirus Avast ha analizado este correo electrónico en
> busca de virus.
> https://www.avast.com/antivirus
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] R: Java support in browsers

2017-03-29 Thread pinostricc...@alice.it
I wonder if it is the time to let Java go since every browser has issues with 
Java. A big problem for sure for Jsmol too? 
Pino




Messaggio originale
Da: angel.herr...@uah.es
Data: 29-mar-2017 21.59
A: 
Ogg: [Jmol-users] Java support in browsers

(I'm following another thread started by David Hibbitts but this is a different 
topic, so I changed the subject)

David,
May I ask what is the information you have regarding future support of Java 
by Waterfox?


On 29 Mar 2017 at 15:14, David Hibbitts wrote:
> It's hard to know how much any of us should invest in these java-specific 
> issues given the aggressive nature of browsers toward javascript -- 
> but my website really serves my research group, not the general public, and 
> there I can certainly get the users to install Waterfox+JAVA.


---
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
https://www.avast.com/antivirus


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol Keyboard Interaction

2017-03-29 Thread Robert Hanson
On Wed, Mar 29, 2017 at 2:14 PM, David Hibbitts  wrote:

> Thanks for the input everyone. The keyboard input will control jmol/jsmol
> but also do other things, but I do like using arrow keys to rotate the
> structure, for example. Other features can be added later to allow jmol to
> more easily *modify* rather than merely view structures. It's hard to
> imagine these features without a fuller keyboard interface (features
> similar to the structure-editing capabilities of avogadro or materials
> studio).
>

set modelkitmode

allows substantial editing, but perhaps not up to those programs in terms
of interface. Still, you can do a lot. Have you experimented with it?



>
> The javascript version already works perfectly, as keyed events are
> captured by the website (even if jsmol previously has focus) and I'm just
> using javascript to do whatever I want to do (including interacting with
> jsmol via JmolScript calls).
>
> For the java version, the best I've been able to do is: use a function
> which restores focus to the website (so they keyboard commands aren't
> trapped by jmol) whenever 1) a script is executed by jmol using
> ScriptCallback or 2) the users mouse leaves the jmol div (using a
> standard mouseout event in the DOM). This means the user doesn't have to
> "click" off of jmol to restore focus and re-enable the keyboard
> interactions. It doesn't help if the user, for example, uses the mouse to
> rotate the structure and leaves the mouse on jmol the entire time. In
> that instance, jmolnever loses focus and so the keyboard events aren't
> passed to the website.
>

That's clever.


>
> I could use the callbacks more aggressively, for example by using
> pickcallback and hovercallback -- but those are uncommon cases -- what I
> really need is something more encompassing like a "MouseUpCallback" so that
> any time the clicks on jmol I can redirect focus back to the website.
> Unfortunately, that callback doesn't exist in the jmol scripting
> environment.
>
>

> It's hard to know how much any of us should invest in these java-specific
> issues given the aggressive nature of browsers toward javascript -- but my
> website really serves my research group, not the general public, and there
> I can certainly get the users to install Waterfox+JAVA.
>
>
Ah, that is very good to hear. I have been trying to promote the idea that
browser-based Jmol can be very much for local use such as that.

Bob
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Java support in browsers

2017-03-29 Thread Angel Herráez
(I'm following another thread started by David Hibbitts but this is a different 
topic, so I changed the subject)

David,
May I ask what is the information you have regarding future support of Java 
by Waterfox?


On 29 Mar 2017 at 15:14, David Hibbitts wrote:
> It's hard to know how much any of us should invest in these java-specific 
> issues given the aggressive nature of browsers toward javascript -- 
> but my website really serves my research group, not the general public, and 
> there I can certainly get the users to install Waterfox+JAVA.


---
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
https://www.avast.com/antivirus


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol Keyboard Interaction

2017-03-29 Thread David Hibbitts
Thanks for the input everyone. The keyboard input will control jmol/jsmol
but also do other things, but I do like using arrow keys to rotate the
structure, for example. Other features can be added later to allow jmol to
more easily *modify* rather than merely view structures. It's hard to
imagine these features without a fuller keyboard interface (features
similar to the structure-editing capabilities of avogadro or materials
studio).

The javascript version already works perfectly, as keyed events are
captured by the website (even if jsmol previously has focus) and I'm just
using javascript to do whatever I want to do (including interacting with
jsmol via JmolScript calls).

For the java version, the best I've been able to do is: use a function
which restores focus to the website (so they keyboard commands aren't
trapped by jmol) whenever 1) a script is executed by jmol using
ScriptCallback or 2) the users mouse leaves the jmol div (using a standard
mouseout event in the DOM). This means the user doesn't have to "click" off
of jmol to restore focus and re-enable the keyboard interactions. It
doesn't help if the user, for example, uses the mouse to rotate the
structure and leaves the mouse on jmol the entire time. In that instance,
jmolnever loses focus and so the keyboard events aren't passed to the
website.

I could use the callbacks more aggressively, for example by using
pickcallback and hovercallback -- but those are uncommon cases -- what I
really need is something more encompassing like a "MouseUpCallback" so that
any time the clicks on jmol I can redirect focus back to the website.
Unfortunately, that callback doesn't exist in the jmol scripting
environment.

It's hard to know how much any of us should invest in these java-specific
issues given the aggressive nature of browsers toward javascript -- but my
website really serves my research group, not the general public, and there
I can certainly get the users to install Waterfox+JAVA.

Thanks

On Wed, Mar 29, 2017 at 2:43 PM, Robert Hanson  wrote:

> (sorry, I missed that nuance)
> ​
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Jmol opened from command line behaves different

2017-03-29 Thread Wayne Decatur
I was trying to have Jmol open via the command line on a Mac and ran into a 
roadblock. The Jmol application launches but if I try `load $ethane` in the 
console it gives me an error, `script ERROR: 
javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: 
No subject alternative DNS name matching cactus.nci.nih.gov found`. That same 
command works as expected when I launch by clicking `Jmol.jar` the typical way. 
 I checked and what launches from the command line is the same version of Jmol 
as launches when I click on it. Still what launches looks slightly different if 
you look at the top-most menubar. I see that when I click on Jmol.jar to open 
it that there is "Jmol" up next to the Apple on the menubar, but  I note that 
when you open it from the command line you see "org.openscience.jmol.app.Jmol" 
in upper left next to Apple symbol on menubar  I even tried it with the 
`jmol.sh` script and while it opens, it doesn't connect to NCI or RCSB.
Do I have to somehow point the command at some security preference that I 
allowed the first time I ran the `Jmol.jar` when I said I acknowledged it is 
from the internet but I want to run it? I see at 
http://wiki.jmol.org/index.php/Java_Web_Start#Signing_the_JAR_File that the 
Jmol.jar is now signed since I am using the latest jmol-14.10.0. Or do I need 
to instead do a self-signed test certificate because when called from command 
line, the certificate isn't accessible to the Jmol application? 
Of course, you are asking why can't he just stick with clicking on Jmol.jar to 
open Jmol? The reason is that I was trying to implement a rudimentary Python 
wrapper for some Jmol commands.

Thanks,
Wayne
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol Keyboard Interaction

2017-03-29 Thread Robert Hanson
(sorry, I missed that nuance)
​
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol Keyboard Interaction

2017-03-29 Thread Robert Hanson
Only the JavaScript version.

On Wed, Mar 29, 2017 at 11:32 AM, Rolf Huehne 
wrote:

> Am 29.03.17 um 18:21 schrieb Robert Hanson:
> > David,
> >
> > OK, so the beauty of this system is that you can implement any sort of
> > additional functionality you want using readily available methods that
> > have nothing to do with Jmol or JSmol. It's one of the bonuses of
> > working in JavaScript and jQuery.
> >
> > So, for example, if you want to implement a key listener that
> > implements  + and - to actuate zooming, you can do it this way:
> >
> > c = $("#jmolApplet0_canvas2d")
> > c.attr("tabindex", 1)
> > c.mouseover(function(){c.focus()})
> > c.keypress(function(e){
> >   if (e.key == "+")Jmol.script(jmolApplet0, "zoom *1.2")
> >   else  if (e.key == "-")Jmol.script(jmolApplet0, "zoom /1.2")
> > })
> >
> > Notice that to accept key events, we must (a) provide a tabindex to the
> > canvas and (b) make sure the canvas has focus when we are looking for
> > key events.
> >
> > I would only say that hidden specialized features like this, though
> > potentially useful, are not necessarily recommended.
> > ​
> It looks like the example would only work for the Javascript version. Or
> could it also work for the Java version (with some adjustment)?
>
> Regards,
> Rolf
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
Robert M. Hanson
Larson-Anderson 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
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol Keyboard Interaction

2017-03-29 Thread Rolf Huehne
Am 29.03.17 um 18:21 schrieb Robert Hanson:
> David,
>
> OK, so the beauty of this system is that you can implement any sort of
> additional functionality you want using readily available methods that
> have nothing to do with Jmol or JSmol. It's one of the bonuses of
> working in JavaScript and jQuery.
>
> So, for example, if you want to implement a key listener that
> implements  + and - to actuate zooming, you can do it this way:
>
> c = $("#jmolApplet0_canvas2d")
> c.attr("tabindex", 1)
> c.mouseover(function(){c.focus()})
> c.keypress(function(e){
>   if (e.key == "+")Jmol.script(jmolApplet0, "zoom *1.2")
>   else  if (e.key == "-")Jmol.script(jmolApplet0, "zoom /1.2")
> })
>
> Notice that to accept key events, we must (a) provide a tabindex to the
> canvas and (b) make sure the canvas has focus when we are looking for
> key events.
>
> I would only say that hidden specialized features like this, though
> potentially useful, are not necessarily recommended.
> ​
It looks like the example would only work for the Javascript version. Or 
could it also work for the Java version (with some adjustment)?

Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol Keyboard Interaction

2017-03-29 Thread Robert Hanson
David,

OK, so the beauty of this system is that you can implement any sort of
additional functionality you want using readily available methods that have
nothing to do with Jmol or JSmol. It's one of the bonuses of working in
JavaScript and jQuery.

So, for example, if you want to implement a key listener that implements  +
and - to actuate zooming, you can do it this way:

c = $("#jmolApplet0_canvas2d")
c.attr("tabindex", 1)
c.mouseover(function(){c.focus()})
c.keypress(function(e){
  if (e.key == "+")Jmol.script(jmolApplet0, "zoom *1.2")
  else  if (e.key == "-")Jmol.script(jmolApplet0, "zoom /1.2")
})

Notice that to accept key events, we must (a) provide a tabindex to the
canvas and (b) make sure the canvas has focus when we are looking for key
events.

I would only say that hidden specialized features like this, though
potentially useful, are not necessarily recommended.
​

Bob
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol Keyboard Interaction

2017-03-29 Thread Rolf Huehne
Am 29.03.17 um 17:37 schrieb Angel Herráez:
> Have you checked Jmol's "navigation mode" ?
> As far as I remember, it  used the keyboard.
> But maybe it is only applicable to the Jmol application.
>
> http://chemapps.stolaf.edu/jmol/docs/#navigate
> http://chemapps.stolaf.edu/jmol/docs/#setnavigation
>
I don't find the navigation mode very suitable as a standard method for 
exploring a structure. In some cases it might be useful but my own 
experiences were rather unsatisfying.

Regards,
Rolf


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol Keyboard Interaction

2017-03-29 Thread Angel Herráez
Have you checked Jmol's "navigation mode" ?
As far as I remember, it  used the keyboard. 
But maybe it is only applicable to the Jmol application.

http://chemapps.stolaf.edu/jmol/docs/#navigate
http://chemapps.stolaf.edu/jmol/docs/#setnavigation


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol Keyboard Interaction

2017-03-29 Thread Rolf Huehne
Am 28.03.17 um 22:26 schrieb David Hibbitts:
> So the "allowkeystrokes" feature simply lets you send commands to the
> console?
>
> No, that's not useful for me -- I'm sure someone has tried to implement
> navigation-by-keyboard on their jmol-including website before.
>
It would be great if this would be possible. Especially because mouse 
control of Jmol-Java on MacOS became problematic in browsers.

For example could '+/-' for zoom in/out be very handy. The zoom "slider" 
near the right applet border is quite inconvenient. And the only mouse 
binding that does work is on the left mouse button without any 
modifiers. So keyboard commands for translation and Z-rotation could 
also be very helpful.

Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users