Re: [Jmol-developers] bug in the script for ligand pockets in PDB

2014-06-05 Thread Robert Hanson
It's not general because within Jmol there are over 225 references to
.toLowerCase() and over 150 to .toUpperCase(), and any of these are
potential problems in that regard, not just that one script or scripts in
general. And I think it is not possible to do this in JavaScript without an
explicit check for Turkish, which probably is not going to happen.

But it is a good idea to at least fix that one.  cc'ing Jesse Woo (RCSB/San
Diego) for that.

Bob


On Thu, Jun 5, 2014 at 12:45 AM, Angel Herráez angel.herr...@uah.es wrote:

  yes, OK, but that's not a general solution. I suppose that happens in
 Java and JavaScript?

 Not sure, but I will try to check today. It is happening in the PDB site,
 I think it
 was Java Jmol. I guess I can use the ?_USE=HTML5 there for testing.

 Why is it not general?  Just avoid uppercase in scripts.







 --
 Learn Graph Databases - Download FREE O'Reilly Book
 Graph Databases is the definitive new guide to graph databases and their
 applications. Written by three acclaimed leaders in the field,
 this first edition is now available. Download your free book today!
 http://p.sf.net/sfu/NeoTech
 ___
 Jmol-developers mailing list
 Jmol-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-developers




-- 
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
--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] bug in the script for ligand pockets in PDB

2014-06-04 Thread Robert Hanson
yes, short of redesigning all the code references of .toLowerCase() and
.toUpperCase() just for our friends in Turkey, there's not much we can do
about this.


On Wed, Jun 4, 2014 at 1:36 AM, Angel Herráez angel.herr...@uah.es wrote:

 Yes, I had read about such a problem.

 The issue is, however, that it is not a user-given ID with Turkish
 characters,
 but the ID token in the source code.





 --
 Learn Graph Databases - Download FREE O'Reilly Book
 Graph Databases is the definitive new guide to graph databases and their
 applications. Written by three acclaimed leaders in the field,
 this first edition is now available. Download your free book today!
 http://p.sf.net/sfu/NeoTech
 ___
 Jmol-developers mailing list
 Jmol-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-developers




-- 
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
--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] bug in the script for ligand pockets in PDB

2014-06-04 Thread Angel Herráez
Bob, I think you are not getting my point.
I think this happens because there is an upercase ID text in the source 
code of that gotoligand function.
For some reason, Jmol goes later to convert that to lowercase.
But if the gotoligand function had just lowercase id, then I believe no 
harm 
would happen.

That is, 
http://www.rcsb.org/pdb/Viewers/jmol-14.1.1//jsmol/spt/ext/rcsb/gotoLigand.s
pt
has these:

// contact surface 
contact ID surf {ligandAtoms} surface
contact slab 60 fullylit

// hydrogen bonds
contact ID hb {ligandAtoms} hbond
select within(3.3,ligandAtoms)

Those two 'contact ID ' should be changed to 'contact id ' and see if the 
problem goes away.


--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] bug in the script for ligand pockets in PDB

2014-06-04 Thread Robert Hanson
yes, OK, but that's not a general solution. I suppose that happens in Java
and JavaScript?


On Wed, Jun 4, 2014 at 2:20 PM, Angel Herráez angel.herr...@uah.es wrote:

  Bob, I think you are not getting my point.

 I think this happens because there is an upercase ID text in the source
 code of that gotoligand  function.

 For some reason, Jmol goes later to convert that to lowercase.

 But if the  gotoligand function had just lowercase id, then I believe
 no harm would happen.


  That is,
 http://www.rcsb.org/pdb/Viewers/jmol-14.1.1//jsmol/spt/ext/rcsb/gotoLigand.spt

 has these:

  // contact surface
 contact ID surf {ligandAtoms} surface
 contact slab 60 fullylit

  // hydrogen bonds
 contact ID hb {ligandAtoms} hbond
 select within(3.3,ligandAtoms)

  Those two 'contact ID ' should be changed to 'contact id ' and see if
 the problem goes away.




 --
 Learn Graph Databases - Download FREE O'Reilly Book
 Graph Databases is the definitive new guide to graph databases and their
 applications. Written by three acclaimed leaders in the field,
 this first edition is now available. Download your free book today!
 http://p.sf.net/sfu/NeoTech
 ___
 Jmol-developers mailing list
 Jmol-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-developers




-- 
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
--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] bug in the script for ligand pockets in PDB

2014-06-03 Thread Robert Hanson
Yes, that makes sense. Funny that we just talked about this.

string.lowerCase()  apparently chokes with Turkish.

Go figure.

Bob



On Tue, Jun 3, 2014 at 2:13 PM, Angel Herráez angel.herr...@uah.es wrote:

  Dear Bob,
 You're going to love this bug report. It's thrilling!

  I was today demonstrating the new PDB ligand pocket view that uses the
 contact command. Guess what... it breaks in Turkish computers, nothing is
 displayed but the standard protein rendering.

  I think I have tracked down the issue. This is the error in the console
 history:

  line 23 command 20 of function gotoligand:

 contact ıd  surf  { ligandatoms } surface

 

 gotoligand (  , IBP )

  Note that Turkish i without the dot. I guess the uppercase ID (that
 you usually use) is being somewhere converted to lowercase, and in Turkish
 that means without the dot on the i, and Jmol chokes.

  That happens while working directly on the PDB site (Jmol Java), at
 least with Chrome and Firefox, and does not happen on my Spanish laptop in
 the same room and network. This means all Turkish users are deprived of the
 nice display of ligands within the contact-colored surface.

  For clarification, Turkish is unique in having 2 kinds of i in both
 upper and lowercase and the matching makes it different:
  i -- İ
  ı -- I

  while in any other language:
  i -- I

  (I hope the Unicode characters don't get lost in the email)

  Probably changing the original code into lowercase id will avoid the
 issue.
 We can test up to next Friday.

  Cheers,



 --
 Learn Graph Databases - Download FREE O'Reilly Book
 Graph Databases is the definitive new guide to graph databases and their
 applications. Written by three acclaimed leaders in the field,
 this first edition is now available. Download your free book today!
 http://p.sf.net/sfu/NeoTech
 ___
 Jmol-developers mailing list
 Jmol-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-developers




-- 
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
--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] bug in the script for ligand pockets in PDB

2014-06-03 Thread Robert Hanson
here it is:

http://mattryall.net/blog/2009/02/the-infamous-turkish-locale-bug




On Tue, Jun 3, 2014 at 3:21 PM, Robert Hanson hans...@stolaf.edu wrote:

 Yes, that makes sense. Funny that we just talked about this.

 string.lowerCase()  apparently chokes with Turkish.

 Go figure.

 Bob



 On Tue, Jun 3, 2014 at 2:13 PM, Angel Herráez angel.herr...@uah.es
 wrote:

  Dear Bob,
 You're going to love this bug report. It's thrilling!

  I was today demonstrating the new PDB ligand pocket view that uses
 the contact command. Guess what... it breaks in Turkish computers,
 nothing is displayed but the standard protein rendering.

  I think I have tracked down the issue. This is the error in the console
 history:

  line 23 command 20 of function gotoligand:

 contact ıd  surf  { ligandatoms } surface

 

 gotoligand (  , IBP )

  Note that Turkish i without the dot. I guess the uppercase ID (that
 you usually use) is being somewhere converted to lowercase, and in Turkish
 that means without the dot on the i, and Jmol chokes.

  That happens while working directly on the PDB site (Jmol Java), at
 least with Chrome and Firefox, and does not happen on my Spanish laptop in
 the same room and network. This means all Turkish users are deprived of the
 nice display of ligands within the contact-colored surface.

  For clarification, Turkish is unique in having 2 kinds of i in both
 upper and lowercase and the matching makes it different:
  i -- İ
  ı -- I

  while in any other language:
  i -- I

  (I hope the Unicode characters don't get lost in the email)

  Probably changing the original code into lowercase id will avoid the
 issue.
 We can test up to next Friday.

  Cheers,



 --
 Learn Graph Databases - Download FREE O'Reilly Book
 Graph Databases is the definitive new guide to graph databases and their
 applications. Written by three acclaimed leaders in the field,
 this first edition is now available. Download your free book today!
 http://p.sf.net/sfu/NeoTech
 ___
 Jmol-developers mailing list
 Jmol-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-developers




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




-- 
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
--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers