Re: [Jmol-users] try again (select)

2015-09-25 Thread Robert Hanson
I will look these over carefully. I think there are some inconsistencies
that need reconciling.

Bob
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again (select)

2015-09-25 Thread Rolf Huehne
On 09/25/2015 07:56 AM, Robert Hanson wrote:
> Your keys are only "1" and "2" -- there are no "res" anythings at that
> level.
>
Yes, because I thought the '**' was specially for searching at the 
second level.
Wouldn't it be more consistent if it would be 'xxx*' (etc.) and not 
'xxx**' when only the first level is searched?

Regards,
Rolf

-- 

Rolf Huehne
Postdoc

Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany

Phone:   +49 3641 65 6205
Fax: +49 3641 65 6210
E-Mail:  rhue...@fli-leibniz.de
Website: http://www.fli-leibniz.de

   Scientific Director: Prof. Dr. K. Lenhard Rudolph
Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Dennys Klein

VAT No: DE 153 925 464
Register of Associations: No. 230296, Amtsgericht Jena
Tax Number: 162/141/08228


--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again (select)

2015-09-24 Thread Robert Hanson
Your keys are only "1" and "2" -- there are no "res" anythings at that
level.

$ print selectTest("1** where resName='VAL'")
{
  "1"  :
  {
"resName"  :  "VAL"
"resNumber"  :  1
"siteMembers"  :
[
  {
"resName"  :  "VAL"
"resNumber"  :  10
   }
  {
"resName"  :  "TYR"
"resNumber"  :  14
   }
  {
"resName"  :  "GLY"
"resNumber"  :  17
   }
]
   }
 }


Bob
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again (select)

2015-09-24 Thread Rolf Huehne
On 09/16/2015 07:00 AM, Robert Hanson wrote:
> new feature: JmolSQL {associative array}.select("xxx** where...")
>-- double * indicates desire to return full sub-arrays, with keys
>-- "all keys starting with "xxx";
>-- uses LIKE
>-- can be at beginning or end or both: xxx**, **xxx, **xxx**
>-- WHERE clause is optional
>
Maybe I have misunderstood something but none of the three variants 
worked for me, only '**' alone:

 Example Code 
function selectTest(filter) {
   var testHash = [1: [resName: "VAL", resNumber: 1,
   siteMembers: [[resName: "VAL", resNumber: 10],
 [resName: "TYR", resNumber: 14],
 [resName: "GLY", resNumber: 17]
]
  ],
   2: [resName: "TYR", resNumber: 14,
   siteMembers: [[resName: "VAL", resNumber: 1],
 [resName: "VAL", resNumber: 10],
 [resName: "GLY", resNumber: 17]
]
  ]
  ];

   return testHash.select(filter);
}

print " Result 1 (res**) =";
print selectTest("res** WHERE resName='VAL'");

print " Result 2 (**res) =";
print selectTest("**res WHERE resName='VAL'");

print " Result 3 (**res**) =";
print selectTest("**res** WHERE resName='VAL'");

print " Result 4 (**) =";
print selectTest("** WHERE resName='VAL'");

 Example Output --
 Result 1 (res**) =

 Result 2 (**res) =

 Result 3 (**res**) =

 Result 4 (**) =
{
   "1"  :
   {
 "resName"  :  "VAL"
 "resNumber"  :  1
 "siteMembers"  :
 [
   {
 "resName"  :  "VAL"
 "resNumber"  :  10
}
   {
 "resName"  :  "TYR"
 "resNumber"  :  14
}
   {
 "resName"  :  "GLY"
 "resNumber"  :  17
}
 ]
}
  }
--

Regards,
Rolf
-- 

Rolf Huehne
Postdoc

Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany

Phone:   +49 3641 65 6205
Fax: +49 3641 65 6210
E-Mail:  rhue...@fli-leibniz.de
Website: http://www.fli-leibniz.de

   Scientific Director: Prof. Dr. K. Lenhard Rudolph
Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Dennys Klein

VAT No: DE 153 925 464
Register of Associations: No. 230296, Amtsgericht Jena
Tax Number: 162/141/08228


--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again (local variables)

2015-09-23 Thread Rolf Huehne
On 09/23/2015 02:04 PM, Robert Hanson wrote:
> First thought is that we should  leave it this way.  That is really really
> bad programming.
> Fixed.
>
Actually there is one case in Jmol where it is needed:

If the loop variable is supposed to be part of an automatically 
actualized echo message. I could only get the automatic update to work 
with a global variable (which makes sense).

Regards,
Rolf

-- 

Rolf Huehne
Postdoc

Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany

Phone:   +49 3641 65 6205
Fax: +49 3641 65 6210
E-Mail:  rhue...@fli-leibniz.de
Website: http://www.fli-leibniz.de

   Scientific Director: Prof. Dr. K. Lenhard Rudolph
Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Dennys Klein

VAT No: DE 153 925 464
Register of Associations: No. 230296, Amtsgericht Jena
Tax Number: 162/141/08228


--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again (local variables)

2015-09-23 Thread Robert Hanson
(I was referring to the reuse of var i and global i; actually this was
failing for any global)

Will update later in the day.

On Wed, Sep 23, 2015 at 7:04 AM, Robert Hanson  wrote:

> First thought is that we should  leave it this way.  That is really really
> bad programming.
> Fixed.
>
> On Wed, Sep 23, 2015 at 6:40 AM, Rolf Huehne 
> wrote:
>
>> On 09/22/2015 07:33 PM, Robert Hanson wrote:
>> > http://chemapps.stolaf.edu/jmol/zip/jmol-14.3.16_2015.09.22.zip
>> >
>> > Jmol.___JmolVersion="14.3.16_2015.09.22"
>> >
>> > bug fix: for(var x in ...) does not respect "var"
>> >
>> Now a new global variable cannot be used in a 'for' loop:
>>
>>  Example Code -
>> function loopTest() {
>>var testList = [1,2,3];
>>
>>for (var i in testList) {
>>  print "VAR: i=" + i;
>>}
>>
>>for (i in testList) {
>>  print "NO VAR: i=" + i;
>>}
>> }
>>
>> loopTest;
>>
>>  Example Output ---
>> VAR: i=1
>> VAR: i=2
>> VAR: i=3
>> NO VAR: i=
>> NO VAR: i=
>> NO VAR: i=
>> ---
>>
>> Generally one wouldn't want to do this. But it worked in former versions
>> and could break existing code. In my case the 'var' was missing
>> accidentally.
>>
>> Regards,
>> Rolf
>>
>> --
>>
>> Rolf Huehne
>> Postdoc
>>
>> Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
>> Beutenbergstrasse 11
>> 07745 Jena, Germany
>>
>> Phone:   +49 3641 65 6205
>> Fax: +49 3641 65 6210
>> E-Mail:  rhue...@fli-leibniz.de
>> Website: http://www.fli-leibniz.de
>>
>>Scientific Director: Prof. Dr. K. Lenhard Rudolph
>> Head of Administration: Dr. Daniele Barthel
>> Chairman of Board of Trustees: Dennys Klein
>>
>> VAT No: DE 153 925 464
>> Register of Associations: No. 230296, Amtsgericht Jena
>> Tax Number: 162/141/08228
>>
>>
>>
>> --
>> Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
>> Get real-time metrics from all of your servers, apps and tools
>> in one place.
>> SourceForge users - Click here to start your Free Trial of Datadog now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
>> ___
>> 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
> Chair, Department 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
Chair, Department 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
--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again (local variables)

2015-09-23 Thread Robert Hanson
First thought is that we should  leave it this way.  That is really really
bad programming.
Fixed.

On Wed, Sep 23, 2015 at 6:40 AM, Rolf Huehne  wrote:

> On 09/22/2015 07:33 PM, Robert Hanson wrote:
> > http://chemapps.stolaf.edu/jmol/zip/jmol-14.3.16_2015.09.22.zip
> >
> > Jmol.___JmolVersion="14.3.16_2015.09.22"
> >
> > bug fix: for(var x in ...) does not respect "var"
> >
> Now a new global variable cannot be used in a 'for' loop:
>
>  Example Code -
> function loopTest() {
>var testList = [1,2,3];
>
>for (var i in testList) {
>  print "VAR: i=" + i;
>}
>
>for (i in testList) {
>  print "NO VAR: i=" + i;
>}
> }
>
> loopTest;
>
>  Example Output ---
> VAR: i=1
> VAR: i=2
> VAR: i=3
> NO VAR: i=
> NO VAR: i=
> NO VAR: i=
> ---
>
> Generally one wouldn't want to do this. But it worked in former versions
> and could break existing code. In my case the 'var' was missing
> accidentally.
>
> Regards,
> Rolf
>
> --
>
> Rolf Huehne
> Postdoc
>
> Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
> Beutenbergstrasse 11
> 07745 Jena, Germany
>
> Phone:   +49 3641 65 6205
> Fax: +49 3641 65 6210
> E-Mail:  rhue...@fli-leibniz.de
> Website: http://www.fli-leibniz.de
>
>Scientific Director: Prof. Dr. K. Lenhard Rudolph
> Head of Administration: Dr. Daniele Barthel
> Chairman of Board of Trustees: Dennys Klein
>
> VAT No: DE 153 925 464
> Register of Associations: No. 230296, Amtsgericht Jena
> Tax Number: 162/141/08228
>
>
>
> --
> Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
> Get real-time metrics from all of your servers, apps and tools
> in one place.
> SourceForge users - Click here to start your Free Trial of Datadog now!
> http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
> ___
> 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
Chair, Department 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
--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again (local variables)

2015-09-23 Thread Rolf Huehne
On 09/22/2015 07:33 PM, Robert Hanson wrote:
> http://chemapps.stolaf.edu/jmol/zip/jmol-14.3.16_2015.09.22.zip
>
> Jmol.___JmolVersion="14.3.16_2015.09.22"
>
> bug fix: for(var x in ...) does not respect "var"
>
Now a new global variable cannot be used in a 'for' loop:

 Example Code -
function loopTest() {
   var testList = [1,2,3];

   for (var i in testList) {
 print "VAR: i=" + i;
   }

   for (i in testList) {
 print "NO VAR: i=" + i;
   }
}

loopTest;

 Example Output ---
VAR: i=1
VAR: i=2
VAR: i=3
NO VAR: i=
NO VAR: i=
NO VAR: i=
---

Generally one wouldn't want to do this. But it worked in former versions 
and could break existing code. In my case the 'var' was missing 
accidentally.

Regards,
Rolf

-- 

Rolf Huehne
Postdoc

Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany

Phone:   +49 3641 65 6205
Fax: +49 3641 65 6210
E-Mail:  rhue...@fli-leibniz.de
Website: http://www.fli-leibniz.de

   Scientific Director: Prof. Dr. K. Lenhard Rudolph
Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Dennys Klein

VAT No: DE 153 925 464
Register of Associations: No. 230296, Amtsgericht Jena
Tax Number: 162/141/08228


--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again (local variables)

2015-09-22 Thread Robert Hanson
http://chemapps.stolaf.edu/jmol/zip/jmol-14.3.16_2015.09.22.zip

Jmol.___JmolVersion="14.3.16_2015.09.22"

bug fix: for(var x in ...) does not respect "var"

bug fix: x.format("JSON") fails for recursive x
  -- arrays or associative arrays can be recursive
  -- detection of recursion during SHOW, x.format("JSON"), and @x (deep
copy)
 now delivers empty array or associative array

  -- example:

$ a = [[1,2],3]
$ a..2 = a
$ print a.format("JSON")

[ [ 1,2 ],[ [ 1,2 ],[  ] ] ]

$ a = [b:1]
$ a.b = a
$ print a.format("JSON")

{ "b": { "b": {  } } }

$ y = @x
$ show y

y = { "b":{ "b":{  } } }

new feature: x = @a
  -- deep copy for a = array or associative array
  -- @a for string variable still gets the value of the variable named by
variable a
  -- math environment only, not SELECT
  -- works also with expressions using @{...}:  x = @{y.select("* where
atomno > 10")}



new feature: for allows one continuation line, as in JavaScript and Java
  -- for example:
for (i = 1; i <= 3; i++)
print i;

bug fix: for (key in hash){...} fails upon functional iteration (deepCopy)
  -- code was reusing the FOR variable when it should have been caching it
in the context stack



On Tue, Sep 22, 2015 at 8:57 AM, Robert Hanson  wrote:

> Great test!
> ​This was a problem with the for(var x in...) not respecting the "var"
>



-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department 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
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again (local variables)

2015-09-22 Thread Robert Hanson
Great test!
​This was a problem with the for(var x in...) not respecting the "var"
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again (local variables)

2015-09-22 Thread Rolf Huehne
On 09/22/2015 03:46 AM, Robert Hanson wrote:
> I think this is the essence of a deep copy:
>
>   function deepCopy(a) {
>switch (a.type) {
>case "hash":
>  var b = {};
>  for (var i = a.keys.length; i > 0; --i) {
>var key = a.keys[i];
>b[key] = deepCopy(a[key]);
>  }
>  return b;
>case "array":
>  var b = [];
>  for (var j = a.length; j > 0; --j) {
>b[j] = deepCopy(a[j]);
>  }
>  return b;
>default:
>  return a;
>}
> }
>
Thanks, Bob!
It does work with my example.

So the major difference for scalar values is that the value is assigned 
as the return value of a function instead of directly with 'x=a' or 'x=@a'?

When I used the result of the copy I observed an interference problem 
between local variables and other local or global variables:

 Example Code -
function deepCopy(a) {
   switch (a.type) {
   case "hash":
 var b = {};
 for (var i = a.keys.length; i > 0; --i) {
   var key = a.keys[i];
   b[key] = deepCopy(a[key]);
 }
 return b;
   case "array":
 var b = [];
 for (var j = a.length; j > 0; --j) {
   b[j] = deepCopy(a[j]);
 }
 return b;
   default:
 return a;
   }
}

function renumber(atomInfos) {
   for (var atomId in atomInfos) {
 atomInfos[atomId]..seqNum *= 10;
   }
}

function localTest(atomInfos, subsetKey) {
   for (var atomId in atomInfos) {
 var atomInfo = atomInfos[atomId];
 var seqNum   = atomInfo..seqNum;
 print "LOCALTEST: subsetKey=" + subsetKey + "  atomId=" + atomId + 
"  seqNum=" + seqNum;
   }
}

globalHash = [subsets: [subset1: [atomInfos: [atom1: [seqNum: 1],
   atom2: [seqNum: 2],
   atom3: [seqNum: 3]
  ]
  ],
 subset2: {}
]
  ];

filter = "[SELECT ** WHERE seqNum > 1]";
globalHash..subsets..subset2..atomInfos = 
deepCopy(getProperty(globalHash..subsets..subset1..atomInfos, filter));

renumber(globalHash..subsets..subset2..atomInfos);
print "== Subset 2 ===";
print globalHash..subsets..subset2..atomInfos;
print "== Subset 1 ===";
print globalHash..subsets..subset1..atomInfos

for (var atomId in globalHash..subsets..subset2..atomInfos) {
   var atomInfo = globalHash..subsets..subset2..atomInfos[atomId];
   var seqNum   = atomInfo..seqNum;

   localTest(globalHash..subsets..subset1..atomInfos, "subset1");
   print "GLOBALLOOP: subsetKey=subset2  atomId=" + atomId + "  seqNum=" 
+ seqNum;
   print atomInfo;
}

- Example output -
== Subset 2 ===
{
   "atom2"  :
   {
 "seqNum"  :  20
}
   "atom3"  :
   {
 "seqNum"  :  30
}
  }
== Subset 1 ===
{
   "atom1"  :
   {
 "seqNum"  :  1
}
   "atom2"  :
   {
 "seqNum"  :  2
}
   "atom3"  :
   {
 "seqNum"  :  3
}
  }
LOCALTEST: subsetKey=subset1 atomId=atom1 seqNum=1
LOCALTEST: subsetKey=subset1 atomId=atom2 seqNum=2
LOCALTEST: subsetKey=subset1 atomId=atom3 seqNum=3
GLOBALLOOP: subsetKey=subset2 atomId=atom3 seqNum=20
{
   "seqNum"  :  20
  }
LOCALTEST: subsetKey=subset1 atomId=atom1 seqNum=1
LOCALTEST: subsetKey=subset1 atomId=atom2 seqNum=2
LOCALTEST: subsetKey=subset1 atomId=atom3 seqNum=3
GLOBALLOOP: subsetKey=subset2 atomId=atom3 seqNum=30
{
   "seqNum"  :  30
  }
--

So the problem in the example is that the loop variable 'atomId' in the 
global loop is influenced by the local loop variable 'atomId' in the 
function 'localTest'. Before 'localTest' is called it is still ok, 
because 'seqNum' is ok which means that 'atomInfo' was assigned correctly.
Even after calling 'localTest' the variable 'atomInfo' is still ok in 
the global loop.

The same problem occurs if the loop variable is a global variable and/or 
the global loop is moved into a second function or both loops are moved 
into the same function:

 Example Code 2 --
function mainLoop() {
   for (var atomId in globalHash..subsets..subset2..atomInfos) {
 var atomInfo = globalHash..subsets..subset2..atomInfos[atomId];
 var seqNum = atomInfo..seqNum;

 for (var atomId in globalHash..subsets..subset1..atomInfos) {
   var atomInfo = globalHash..subsets..subset1..atomInfos[atomId];
   var seqNum = atomInfo..seqNum;
   print "LOCALTEST: subsetKey=subset1 atomId=" + atomId + " 
seqNum=" + seqNum;
 }
 print "MAINLOOP: subsetKey=subset2 atomId=" + atomId + " seqNum=" + 
seqNum;
 print atomInfo;
   }
}

 Example Output 2 
LOCALTEST: subsetKey=subset1 atomId=atom1 seqNum=1
LOCALTEST: subsetKey=subset1 atomId=atom2 seqNum=2
LOCALTEST: subsetKey=subset1 atomId=atom3 seqNum=3
MAINLOOP: subsetKey=subset2 atomId=atom3 seqNum=20
{
   "seqNum"  :  20
  }
LOCALTEST: subsetKey=subset1 atomId=atom1 seqNum=1
LOCALTEST:

Re: [Jmol-users] try again

2015-09-21 Thread Robert Hanson
Jmol.___JmolVersion="14.3.16_2015.09.21b"

new feature: x = @a
  -- deep copy for a = array or associative array
  -- @a for string variable still gets the value of the variable named by
variable a
  -- math environment only, not SELECT



On Mon, Sep 21, 2015 at 8:46 PM, Robert Hanson  wrote:

> I think this is the essence of a deep copy:
>
>  function deepCopy(a) {
>   switch (a.type) {
>   case "hash":
> var b = {};
> for (var i = a.keys.length; i > 0; --i) {
>   var key = a.keys[i];
>   b[key] = deepCopy(a[key]);
> }
> return b;
>   case "array":
> var b = [];
> for (var j = a.length; j > 0; --j) {
>   b[j] = deepCopy(a[j]);
> }
> return b;
>   default:
> return a;
>   }
> }
>
>


-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department 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
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again

2015-09-21 Thread Robert Hanson
I think this is the essence of a deep copy:

 function deepCopy(a) {
  switch (a.type) {
  case "hash":
var b = {};
for (var i = a.keys.length; i > 0; --i) {
  var key = a.keys[i];
  b[key] = deepCopy(a[key]);
}
return b;
  case "array":
var b = [];
for (var j = a.length; j > 0; --j) {
  b[j] = deepCopy(a[j]);
}
return b;
  default:
return a;
  }
}
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again

2015-09-18 Thread Rolf Huehne
On 09/18/2015 04:38 PM, Robert Hanson wrote:
> Oh, I mistyped. I did not mean to add that colon.
>
> Use of "*" and/or "," leads to copying, but we may want to rethink how that
> works. *only that level* is copied. If there are references in there to
> deeper levels, those levels are not copied. I have to think if there is a
> straightforward way to do a deep copy. Right now it's a bit of a mixture.
>
I tried to build my own (multi-level) hash copying function with Jmol 
script but wasn't succesful, even without trying to get a deep copy.

In the long run I will need a deep copy function but currently it would 
be sufficient to copy only the single-level values (e.g.: number, 
string, boolean) of the top level as values and multi-level values 
(e.g.: hash, array) as references.
In my example below (copying the 'atomInfos' subhash of 'globalHash') 
that would mean to copy the 'seqNum' values as values and the 'SNPs' 
array as array reference.
The example hash has a few extra levels because I didn't want to get any 
surprises when I would switch to 'real world examples' that have several 
upper levels that will not be copied.

The documentation says that adding '@' in math context before the 
variable name would result in copying the value. For simple cases it 
seems to work, even without the '@':

-
x = 1;
y = @x;
x = 2;
print "x=" + x + "  y=" + y;

x=2  y=1
-
x = 1;
y = x;
x = 2;
print "x=" + x + "  y=" + y

x=2  y=1
-
x = [a: 1, b: 2];
y = @x["a"];
x["a"] = 3;
print "x=" + x + "\ny=" + y;

x={
   "a"  :  3
   "b"  :  2
  }
y=1
-
x = [a: 1, b: 2];
y = x["a"];
x["a"] = 3;
print "x=" + x + "\ny=" + y

x={
   "a"  :  3
   "b"  :  2
  }
y=1
-

But within my function I couldn't get it to work:

--- Example --
function copyHashKeys(sourceHash, destinationHash, keyList) {
   if (keyList.type != "array") {
 keyList = sourceHash.keys;
   }

   if (keyList.size > 0) {
 for (var currentKey in keyList) {
   destinationHash[currentKey] = @sourceHash[currentKey];
 }
   }
}

function copyHash(sourceHash) {   # IMPORTANT: no deep copy
   var destinationHash = {};

   if (sourceHash.type == "hash") {
 copyHashKeys(sourceHash, destinationHash);
   }

   return destinationHash;
}

function renumber(atomInfos) {
   for (var atomId in atomInfos) {
 atomInfos[atomId]..seqNum *= 10;
   }
}

globalHash = [subsets: [subset1: [atomInfos: [atom1: [seqNum: 1],
   atom2: [seqNum: 2],
   atom3: [seqNum: 3, SNPs: 
["snp1","snp2"]]
  ]
  ],
 subset2: {}
]
  ];

globalHash..subsets..subset2..atomInfos = 
copyHash(globalHash..subsets..subset1..atomInfos);
renumber(globalHash..subsets..subset2..atomInfos);
print "== Subset 2 ===";
print globalHash..subsets..subset2..atomInfos;
print "== Subset 1 ===";
print globalHash..subsets..subset1..atomInfos

- Result -
== Subset 2 ===
{
   "atom1"  :
   {
 "seqNum"  :  10
}
   "atom2"  :
   {
 "seqNum"  :  20
}
   "atom3"  :
   {
 "SNPs"  :
 [
   snp1
   snp2
 ]
 "seqNum"  :  30
}
  }
== Subset 1 ===
{
   "atom1"  :
   {
 "seqNum"  :  10
}
   "atom2"  :
   {
 "seqNum"  :  20
}
   "atom3"  :
   {
 "SNPs"  :
 [
   snp1
   snp2
 ]
 "seqNum"  :  30
}
  }
--

I also tried other variants without success:

--- Variant 1 ---
   var value = sourceHash[currentKey];
   destinationHash[currentKey] = @value;

--- Variant 2 ---
   var value = @sourceHash[currentKey];
   destinationHash[currentKey] = value;

--- Variant 3 ---
  var value = @sourceHash[currentKey];
  destinationHash[currentKey] = @value;

--- Variant 4 ---
   destinationHash[currentKey] = sourceHash[currentKey];

--- Variant 5 ---
   var value = sourceHash[currentKey];
   destinationHash[currentKey] = value;
--

Regards,
Rolf
-- 

Rolf Huehne
Postdoc

Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany

Phone:   +49 3641 65 6205
Fax: +49 3641 65 6210
E-Mail:  rhue...@fli-leibniz.de
Website: http://www.fli-leibniz.de

   Scientific Director: Prof. Dr. K. Lenhard Rudolph
Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Dennys Klein

VAT No: DE 153 925 464
Register of Associations: No. 230296, Amtsgericht Jena
Tax Number: 162/141/08228


--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/

Re: [Jmol-users] try again

2015-09-18 Thread Robert Hanson
Oh, I mistyped. I did not mean to add that colon.

Use of "*" and/or "," leads to copying, but we may want to rethink how that
works. *only that level* is copied. If there are references in there to
deeper levels, those levels are not copied. I have to think if there is a
straightforward way to do a deep copy. Right now it's a bit of a mixture.

Bob


On Fri, Sep 18, 2015 at 9:28 AM, Robert Hanson  wrote:

> Hmm. Curious. I will check to see what is going on there.
>
> On Thu, Sep 17, 2015 at 9:11 AM, Rolf Huehne 
> wrote:
>
>> On 09/16/2015 08:27 PM, Robert Hanson wrote:
>> > Use of "*:"or ","  does result in copying. Use of the actual key does
>> not:
>> >
>> > $ x = { "b": 4,"a": 3,"d": { "d2": 4,"d1":  },"c": 5 }
>> > $ y  = x.d
>> > $ y.d1 = 0
>> > $ print x.format("JSON")
>> >
>> > *{ "b": 4,"a": 3,"d": { "d2": 4,"d1": 0 },"c": 5 }*
>> > $ y = x.select("d,")
>> > $ y.d1 = -1
>> > $ print x.format("JSON")
>> >
>> > *{ "b": 4,"a": 3,"d": { "d2": 4,"d1": 0 },"c": 5 }*
>> >
>> I would rather need '**:' (or '**,'?) but both give an empty result in
>> the old and the new syntax:
>>
>> - Example -
>> globalHash = [subsets: [subset1: [atomInfos: [atom1: [seqNum: 1],
>>atom2: [seqNum: 2],
>>atom3: [seqNum: 3]
>>   ]
>>   ],
>>  subset2: {},
>>  subset3: {}
>>]
>>   ];
>>
>> filter = "[SELECT **: WHERE seqNum > 1]";
>> globalHash..subsets..subset2..atomInfos =
>> getProperty(globalHash..subsets..subset1..atomInfos, filter);
>>
>> filter = "**: WHERE seqNum > 1";
>> globalHash..subsets..subset3..atomInfos =
>> globalHash..subsets..subset1..atomInfos.select(filter);
>>
>> print globalHash..subsets
>>
>> - Example output -
>> {
>>"subset1"  :
>>{
>>  "atomInfos"  :
>>  {
>>"atom1"  :
>>{
>>  "seqNum"  :  1
>> }
>>"atom2"  :
>>{
>>  "seqNum"  :  2
>> }
>>"atom3"  :
>>{
>>  "seqNum"  :  3
>> }
>>   }
>> }
>>"subset2"  :
>>{
>>  "atomInfos"  :  ""
>> }
>>"subset3"  :
>>{
>>  "atomInfos"  :  ""
>> }
>>   }
>> --
>>
>> Regards,
>> Rolf
>>
>> --
>>
>> Rolf Huehne
>> Postdoc
>>
>> Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
>> Beutenbergstrasse 11
>> 07745 Jena, Germany
>>
>> Phone:   +49 3641 65 6205
>> Fax: +49 3641 65 6210
>> E-Mail:  rhue...@fli-leibniz.de
>> Website: http://www.fli-leibniz.de
>>
>>Scientific Director: Prof. Dr. K. Lenhard Rudolph
>> Head of Administration: Dr. Daniele Barthel
>> Chairman of Board of Trustees: Dennys Klein
>>
>> VAT No: DE 153 925 464
>> Register of Associations: No. 230296, Amtsgericht Jena
>> Tax Number: 162/141/08228
>>
>>
>>
>> --
>> Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
>> Get real-time metrics from all of your servers, apps and tools
>> in one place.
>> SourceForge users - Click here to start your Free Trial of Datadog now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
>> ___
>> 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
> Chair, Department 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
Chair, Department 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
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again

2015-09-18 Thread Robert Hanson
Hmm. Curious. I will check to see what is going on there.

On Thu, Sep 17, 2015 at 9:11 AM, Rolf Huehne  wrote:

> On 09/16/2015 08:27 PM, Robert Hanson wrote:
> > Use of "*:"or ","  does result in copying. Use of the actual key does
> not:
> >
> > $ x = { "b": 4,"a": 3,"d": { "d2": 4,"d1":  },"c": 5 }
> > $ y  = x.d
> > $ y.d1 = 0
> > $ print x.format("JSON")
> >
> > *{ "b": 4,"a": 3,"d": { "d2": 4,"d1": 0 },"c": 5 }*
> > $ y = x.select("d,")
> > $ y.d1 = -1
> > $ print x.format("JSON")
> >
> > *{ "b": 4,"a": 3,"d": { "d2": 4,"d1": 0 },"c": 5 }*
> >
> I would rather need '**:' (or '**,'?) but both give an empty result in
> the old and the new syntax:
>
> - Example -
> globalHash = [subsets: [subset1: [atomInfos: [atom1: [seqNum: 1],
>atom2: [seqNum: 2],
>atom3: [seqNum: 3]
>   ]
>   ],
>  subset2: {},
>  subset3: {}
>]
>   ];
>
> filter = "[SELECT **: WHERE seqNum > 1]";
> globalHash..subsets..subset2..atomInfos =
> getProperty(globalHash..subsets..subset1..atomInfos, filter);
>
> filter = "**: WHERE seqNum > 1";
> globalHash..subsets..subset3..atomInfos =
> globalHash..subsets..subset1..atomInfos.select(filter);
>
> print globalHash..subsets
>
> - Example output -
> {
>"subset1"  :
>{
>  "atomInfos"  :
>  {
>"atom1"  :
>{
>  "seqNum"  :  1
> }
>"atom2"  :
>{
>  "seqNum"  :  2
> }
>"atom3"  :
>{
>  "seqNum"  :  3
> }
>   }
> }
>"subset2"  :
>{
>  "atomInfos"  :  ""
> }
>"subset3"  :
>{
>  "atomInfos"  :  ""
> }
>   }
> --
>
> Regards,
> Rolf
>
> --
>
> Rolf Huehne
> Postdoc
>
> Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
> Beutenbergstrasse 11
> 07745 Jena, Germany
>
> Phone:   +49 3641 65 6205
> Fax: +49 3641 65 6210
> E-Mail:  rhue...@fli-leibniz.de
> Website: http://www.fli-leibniz.de
>
>Scientific Director: Prof. Dr. K. Lenhard Rudolph
> Head of Administration: Dr. Daniele Barthel
> Chairman of Board of Trustees: Dennys Klein
>
> VAT No: DE 153 925 464
> Register of Associations: No. 230296, Amtsgericht Jena
> Tax Number: 162/141/08228
>
>
>
> --
> Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
> Get real-time metrics from all of your servers, apps and tools
> in one place.
> SourceForge users - Click here to start your Free Trial of Datadog now!
> http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
> ___
> 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
Chair, Department 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
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again

2015-09-17 Thread Rolf Huehne
On 09/16/2015 08:27 PM, Robert Hanson wrote:
> Use of "*:"or ","  does result in copying. Use of the actual key does not:
>
> $ x = { "b": 4,"a": 3,"d": { "d2": 4,"d1":  },"c": 5 }
> $ y  = x.d
> $ y.d1 = 0
> $ print x.format("JSON")
>
> *{ "b": 4,"a": 3,"d": { "d2": 4,"d1": 0 },"c": 5 }*
> $ y = x.select("d,")
> $ y.d1 = -1
> $ print x.format("JSON")
>
> *{ "b": 4,"a": 3,"d": { "d2": 4,"d1": 0 },"c": 5 }*
>
I would rather need '**:' (or '**,'?) but both give an empty result in 
the old and the new syntax:

- Example -
globalHash = [subsets: [subset1: [atomInfos: [atom1: [seqNum: 1],
   atom2: [seqNum: 2],
   atom3: [seqNum: 3]
  ]
  ],
 subset2: {},
 subset3: {}
   ]
  ];

filter = "[SELECT **: WHERE seqNum > 1]";
globalHash..subsets..subset2..atomInfos = 
getProperty(globalHash..subsets..subset1..atomInfos, filter);

filter = "**: WHERE seqNum > 1";
globalHash..subsets..subset3..atomInfos = 
globalHash..subsets..subset1..atomInfos.select(filter);

print globalHash..subsets

- Example output -
{
   "subset1"  :
   {
 "atomInfos"  :
 {
   "atom1"  :
   {
 "seqNum"  :  1
}
   "atom2"  :
   {
 "seqNum"  :  2
}
   "atom3"  :
   {
 "seqNum"  :  3
}
  }
}
   "subset2"  :
   {
 "atomInfos"  :  ""
}
   "subset3"  :
   {
 "atomInfos"  :  ""
}
  }
--

Regards,
Rolf

-- 

Rolf Huehne
Postdoc

Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany

Phone:   +49 3641 65 6205
Fax: +49 3641 65 6210
E-Mail:  rhue...@fli-leibniz.de
Website: http://www.fli-leibniz.de

   Scientific Director: Prof. Dr. K. Lenhard Rudolph
Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Dennys Klein

VAT No: DE 153 925 464
Register of Associations: No. 230296, Amtsgericht Jena
Tax Number: 162/141/08228


--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again

2015-09-16 Thread Robert Hanson
Use of "*:"or ","  does result in copying. Use of the actual key does not:

$ x = { "b": 4,"a": 3,"d": { "d2": 4,"d1":  },"c": 5 }
$ y  = x.d
$ y.d1 = 0
$ print x.format("JSON")

*{ "b": 4,"a": 3,"d": { "d2": 4,"d1": 0 },"c": 5 }*
$ y = x.select("d,")
$ y.d1 = -1
$ print x.format("JSON")

*{ "b": 4,"a": 3,"d": { "d2": 4,"d1": 0 },"c": 5 }*

​
--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again

2015-09-16 Thread Rolf Huehne
On 09/16/2015 07:00 AM, Robert Hanson wrote:
> new feature: JmolSQL {associative array}.select("xxx** where...")
>-- double * indicates desire to return full sub-arrays, with keys
>-- "all keys starting with "xxx";
>-- uses LIKE
>-- can be at beginning or end or both: xxx**, **xxx, **xxx**
>-- WHERE clause is optional
>
I havn't checked the new syntax yet but have a question related to the 
command with the old syntax. The documentation says that an array 
queried is copied. But with 'SQL "drilling" in associative arrays' there 
are not made copies. so if an element is changed in the old or the new 
list it is changed in both.

Q: Is this the intended (stable) behaviour or is it a bug?

Regards,
Rolf

-- 

Rolf Huehne
Postdoc

Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany

Phone:   +49 3641 65 6205
Fax: +49 3641 65 6210
E-Mail:  rhue...@fli-leibniz.de
Website: http://www.fli-leibniz.de

   Scientific Director: Prof. Dr. K. Lenhard Rudolph
Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Dennys Klein

VAT No: DE 153 925 464
Register of Associations: No. 230296, Amtsgericht Jena
Tax Number: 162/141/08228


--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again

2015-09-16 Thread Robert Hanson
Hoooray!

Some interesting issues there.

JSME and 2D/3D -  It turns out that JSME has two modes of delivery of
SMILES -- "canonize" and "nocanonize".  These are not dynamically
switchable, as far as I can tell. I wish they were. The problem is that
"canonize" delivers aromatic symbols for rings that  are not
huekel-aromatic -- all six carbons, for example, in benzoquinone. Jmol does
this, too, but Jmol adds double bond indications as well, so ...c=cc=c
The difference is significant -- Jmol's SMILES representations are
interpretable by the NCI Resolver; JSME's "canonize" versions are not. So
I  have to have JSME in nocanonize mode in order to convert 2D to 3D using
the NCI Resolver.

The problem was that at jsmetest.htm and jsmetest2.htm Jmol's SMARTS/SMILES
matching algorithm was not finding the (non-aromatic) JSME nocanonize
SMILES in aromatic molecular structures. So JSmol was reloading all
aromatic compounds coming from JSME.

That is fixed through the addition of a SMILES/SMARTS search option
"/noncanonical/" (added in JSmolJME.js), which tells Jmol to just look at
hydrogen count, not aromaticity, for SMARTS and SMILES matching. For
example, Jmol's SMILES string for benzoquinone is:

$ load $benzoquinone
$ show SMILES


*c12=O.c2=cc3=O.c3=c1 *
which works at NCI. For example,

$ load $c12=O.c2=cc3=O.c3=c1

(same structure)

JSME's SMILES strings are:

O=c1ccc(=O)cc1  (canonize)
C1(=O)C=CC(=O)C=C1  (nocanonize)

NCI Resolver's string is:

$ load $benzoquinone
$ show chemical SMILES


*C1(C=CC(C=C1)=O)=O*
While JSME's canonize version is closest to Jmol's, only its nocanonize
version matches NCI.  Sending JSME's version to NCI for resolution is the
problem. It returns cyclohexane-1,4-dione. No C=C double bonds!

Thus, when working with JSME for 2D->3D work, one needs to use JSME's
nocanonize option. That was what was failing in Jmol in

var jmolAtoms = Jmol.evaluateVar("{*}.find('SMILES', '" + jsmeSMILES +
"')");

as JSME's noncanonical SMILES, though working at NCI Resolver, does not
match Jmol's molecular structure. The solution is to force Jmol to ignore
the difference between aromatic and nonaromatic atoms, provided the
hydrogen count is identical. So that is now changed to

var jmolAtoms = Jmol.evaluateVar("{*}.find('SMILES', '/noncanonical/" +
jsmeSMILES + " ' )");

and, in addition, Jmol, too, can return its own "noncanonical" (read
"nonaromatic") SMILES using

$ load $benzoquinone
$ print {*}.find("SMILES", "NOAROMATIC")


*C12=O.C2=CC3=O.C3=C1*
(I considered calling this "NONCANONICAL" but decided against it, because
it might imply that Jmol has a canonical option, which it does not. Jmol
will return different SMILES strings depending upon how a structure was
drawn or where it originates. )


This now matches both NCI and JSME:

$ print "C12=O.C2=CC3=O.C3=C1".find("SMILES", "C1(=O)C=CC(=O)C=C1")
*8*

$ print "C12=O.C2=CC3=O.C3=C1".find("SMILES", "C1(C=CC(C=C1)=O)=O")
*8*

As an aside, PubCHEM's "canonical SMILES" for benzoquinone is still
different from all of these:

C1=CC(=O)C=CC1=O

JSME's canonical SMILES string, O=c1ccc(=O)cc1, does work at PubCHEM, as
evidenced by the following Jmol command returning a proper structure of
benzoquinone:

$ load :smiles:O=c1ccc(=O)cc1

(The reason we cannot use PubCHEM in general is that it only returns
compounds that have been entered into the PubCHEM database.)

Bob


On Wed, Sep 16, 2015 at 9:21 AM, Robert Hanson  wrote:

>
>
> On Wed, Sep 16, 2015 at 8:09 AM, Paul PILLOT  wrote:
>
>>
>> The only remaining glitch is in the test2.htm page that displays 2 still
>> images in the forefront, having the active molecule displayed ind the
>> background.
>> It appears on the two browsers I’ve checked. It doesn’t appear in any of
>> the other pages I’ve tried so it should only be related to a code in this
>> specific page.
>>
>>
> Not a glitch. It is a test page. ;)
>
>
> 16-09-2015 à 03:49, Angel Herráez  a écrit :
>
> simple.htm  runs ok now here, without errors and the language is correct
> (it
> also was before)
>
> On 16 Sep 2015 at 0:00, Robert Hanson wrote:
>
>
> http://sourceforge.net/projects/jmol/files/Jmol-beta/Jmol%2014.3/Jmol%2014.3.16/Jmol-14.3.16_
> 2015.09.15-binary.zip
>
> Jmol.___JmolVersion="14.3.16_2015.09.15"
>
>
>
>
>>
>> --
>> Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
>> Get real-time metrics from all of your servers, apps and tools
>> in one place.
>> SourceForge users - Click here to start your Free Trial of Datadog now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
>> ___
>> 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
> Chair, Department of Chemistry
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr
>
>

Re: [Jmol-users] try again

2015-09-16 Thread Robert Hanson
On Wed, Sep 16, 2015 at 8:09 AM, Paul PILLOT  wrote:

>
> The only remaining glitch is in the test2.htm page that displays 2 still
> images in the forefront, having the active molecule displayed ind the
> background.
> It appears on the two browsers I’ve checked. It doesn’t appear in any of
> the other pages I’ve tried so it should only be related to a code in this
> specific page.
>
>
Not a glitch. It is a test page. ;)


16-09-2015 à 03:49, Angel Herráez  a écrit :

simple.htm  runs ok now here, without errors and the language is correct
(it
also was before)

On 16 Sep 2015 at 0:00, Robert Hanson wrote:

http://sourceforge.net/projects/jmol/files/Jmol-beta/Jmol%2014.3/Jmol%2014.3.16/Jmol-14.3.16_
2015.09.15-binary.zip

Jmol.___JmolVersion="14.3.16_2015.09.15"




>
> --
> Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
> Get real-time metrics from all of your servers, apps and tools
> in one place.
> SourceForge users - Click here to start your Free Trial of Datadog now!
> http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
> ___
> 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
Chair, Department 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
--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again

2015-09-16 Thread Paul PILLOT
You’re right : jsmol.htm indeed works like a charm !
Paul

> Le 16-09-2015 à 09:16, J. Bays  a écrit :
> 
> Paul: I think that is intentional. Try jsmol.htm.  It is the same test without
> 
> J. Philip Bays
> Emeritus Professor of Chemistry
> Saint Mary's Collegethe images. 
> Norte Dame, IN
> 
> Sent from my iPad
> 


--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again

2015-09-16 Thread J. Bays
Paul: I think that is intentional. Try jsmol.htm.  It is the same test
without

J. Philip Bays
Emeritus Professor of Chemistry
Saint Mary's Collegethe images.
Norte Dame, IN

Sent from my iPad

On Sep 16, 2015, at 9:10 AM, Paul PILLOT  wrote:

Everything works as expected (including localization alerts, filter2D,
fractional coordinates shorthand notation) ! Thanks a lot Bob !

The only remaining glitch is in the test2.htm page that displays 2 still
images in the forefront, having the active molecule displayed ind the
background.
It appears on the two browsers I’ve checked. It doesn’t appear in any of
the other pages I’ve tried so it should only be related to a code in this
specific page.

Here are the images :
- screen shot of the jsmol window : screen_capture.png

- image of the windows as computed per jsmol (image command) :
test2_jsmol.png


-Paul

Le 16-09-2015 à 03:49, Angel Herráez  a écrit :

simple.htm  runs ok now here, without errors and the language is correct
(it
also was before)

On 16 Sep 2015 at 0:00, Robert Hanson wrote:

http://sourceforge.net/projects/jmol/files/Jmol-beta/Jmol%2014.3/Jmol%2014.3.16/Jmol-14.3.16_
2015.09.15-binary.zip

Jmol.___JmolVersion="14.3.16_2015.09.15"



--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140

___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users
--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again

2015-09-16 Thread Paul PILLOT
Everything works as expected (including localization alerts, filter2D, 
fractional coordinates shorthand notation) ! Thanks a lot Bob !

The only remaining glitch is in the test2.htm page that displays 2 still images 
in the forefront, having the active molecule displayed ind the background.
It appears on the two browsers I’ve checked. It doesn’t appear in any of the 
other pages I’ve tried so it should only be related to a code in this specific 
page.

Here are the images :
- screen shot of the jsmol window : screen_capture.png 

- image of the windows as computed per jsmol (image command) : test2_jsmol.png 


-Paul

> Le 16-09-2015 à 03:49, Angel Herráez  a écrit :
> 
> simple.htm  runs ok now here, without errors and the language is correct (it 
> also was before)
> 
> On 16 Sep 2015 at 0:00, Robert Hanson wrote:
>> http://sourceforge.net/projects/jmol/files/Jmol-beta/Jmol%2014.3/Jmol%2014.3.16/Jmol-14.3.16_
>> 2015.09.15-binary.zip
>> 
>> Jmol.___JmolVersion="14.3.16_2015.09.15"
> 

--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] try again

2015-09-16 Thread Angel Herráez
simple.htm  runs ok now here, without errors and the language is correct (it 
also was before)

On 16 Sep 2015 at 0:00, Robert Hanson wrote:
> http://sourceforge.net/projects/jmol/files/Jmol-beta/Jmol%2014.3/Jmol%2014.3.16/Jmol-14.3.16_
> 2015.09.15-binary.zip
> 
> Jmol.___JmolVersion="14.3.16_2015.09.15"


--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] try again

2015-09-15 Thread Robert Hanson
http://sourceforge.net/projects/jmol/files/Jmol-beta/Jmol%2014.3/Jmol%2014.3.16/Jmol-14.3.16_2015.09.15-binary.zip

Jmol.___JmolVersion="14.3.16_2015.09.15"

bug fix: JSmol does not automatically start non-English language

bug fix: JSME's noncanonical SMILES does not match Jmol's standard SMILES
for aromatics
 -- solution is to use /noncanonical/ with find().

new feature: SMILES /noncanonical/
  -- matches Jmol's aromatic with JSME's "noncanonical" aromatic
  $ load $aspirin
  $ show smiles
c1=cc=cc2=c1C(O)=O.O2C(C)=O
  $ print {*}.find("smiles", "/noncanonical/C1=CC=CC(OC(C)=O)=C1C(O)=O")
({0:20})
  $ print "c1=cc=cc2=c1C(O)=O.O2C(C)=O".find("smiles",
"/aromaticImplied/C1=CC=CC(OC(C)=O)=C1C(O)=O")
13

new feature: {*}.find("SMILES", "NOAROMATIC")
 -- creates nonaromatic (noncanonical) SMILES

new feature: JmolSQL x.select("...")
  -- shortcut for x.getProperty("[select ... ]")
  -- x should by an associative array  {key:value,..} or a sequential array
[a,b,c,d]

new feature: JmolSQL {associative array}.select("xxx** where...")
  -- double * indicates desire to return full sub-arrays, with keys
  -- "all keys starting with "xxx";
  -- uses LIKE
  -- can be at beginning or end or both: xxx**, **xxx, **xxx**
  -- WHERE clause is optional

-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department 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
--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users