[Jmol-users] Jmol 14.12.1 released -- R/S chirality

2017-04-07 Thread Robert Hanson
https://sourceforge.net/projects/jmol/files/Jmol/Version%2014.12/Jmol%2014.12.1/


Jmol.___JmolVersion="14.12.1"

bug fix: NBO update
bug fix: JavaScript bug - missing  Math.signum(f) - causes {atom}.chirality
to not work in JSmol

JmolVersion="14.12.0" // 2017-04-06

new feature: {atom}.chirality
  -- also SELECT chirality = 'R'# or SELECT chirality != ""
  -- uses Cahn-Ingold-Prelog rules to assign R or S to a carbon center
  -- ignores sulfur chirality
  -- may not fully implement high symmetry cases
  -- not fully tested



-- 
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] R: check R/S chirality with Jmol

2017-04-07 Thread Pierluigi Quagliotto

Il 07/04/2017 19:38, Robert Hanson ha scritto:
I've added a "show R/S" button at 
https://chemapps.stolaf.edu/jmol/jsmol/jsmetest2.htm


It just runs

label %[chirality]
background labels yellow



On Fri, Apr 7, 2017 at 12:24 PM, Robert Hanson > wrote:


I have that fixed in JavaScript but want to add a couple more
unrelated items before I release this the normal way. But you  can
also get jsmol.zip here:
https://sourceforge.net/p/jsmol/code/HEAD/tree/trunk/dist/
 and
it should be  working at the St. Olaf site. For example:

>


On Fri, Apr 7, 2017 at 11:57 AM, pinostricc...@alice.it
 mailto:pinostricc...@alice.it>> wrote:

Wonderful implementation Bob and Pierluigi. Veru useful in
Organich Chemistry
Pino

Messaggio originale
Da: hans...@stolaf.edu 
Data: 7-apr-2017 4.25
A: "jmol-users@lists.sourceforge.net

"mailto:jmol-users@lists.sourceforge.net>>
Ogg: [Jmol-users] check R/S chirality with Jmol

*Download Jmol-14.12.0-binary.zip (69.3 MB)




*
*Jmol now allows checking of R/S chirality. For example:

*
load $(R)-glycidol
print {C1}.chirality

/R/

load $cholesterol
select on chirality != ""
label %[chirality]

/8 atoms selected/


Thanks to Pierluigi Quagliotto for the suggestion to
tackle this. It was a good challenge getting it right.

Please test!

Bob

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





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



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


Dear Bob,


the jsmol.zip file you described in the last message, while not released 
is working like a charm, on my developing site! I will try to produce 
some buttons to extend the scope of the page and after a few test I will 
put on the production site for extended testing.



Many thank for all!


Bye!


Pierluigi

--
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] Cahn-Ingold-Prelog priority rules

2017-04-07 Thread Robert Hanson
OK, that is fixed in
https://sourceforge.net/p/jsmol/code/HEAD/tree/trunk/dist and at
https://chemapps.stolaf.edu/jmol/jsmol/jsmetest2.htm

On Fri, Apr 7, 2017 at 12:50 PM, Robert Hanson  wrote:

> That is to say, I just found a mistake in the way the JavaScript version
> is working. Looking into that now. Java is OK.
>
> On Fri, Apr 7, 2017 at 12:46 PM, Robert Hanson  wrote:
>
>> ps -- *before I find it*
>>
>> On Fri, Apr 7, 2017 at 12:42 PM, Robert Hanson 
>> wrote:
>>
>>> Super. Tell them there is a prize for the first student who finds a
>>> mistake in assignment.
>>>
>>>
>>>
>>> On Fri, Apr 7, 2017 at 1:52 AM, Pierluigi Quagliotto <
>>> pierluigi.quaglio...@unito.it> wrote:
>>>
 Dear Bob,

 many thanks for it!

 In this weekend I will try  to update my page and make proper test.
 Once I will be able to put the page on the production site I will put my
 student to make extensive tests, with both simple and complex molecules, to
 help you to validate the novel function. I'll let you know when the page
 will be ready, just to see it "at work".

 Bye!

 Pierluigi Quagliotto


 Il 07/04/2017 01:21, Robert Hanson ha scritto:

 This is done.


 Jmol.___JmolVersion="14.12.0" // 2017-04-06

 new feature: {atom}.chirality
   -- uses Cohen-Ingold-Prelog rules to assign R or S to a carbon center
   -- ignores sulfur chirality
   -- may not fully implement high symmetry cases
   -- not fully tested
   -- Checked using:

 function checkchiral(m) {
   if (m)  load @m
   background label yellow
   color labels black
   select _C
   label %[atomname]
   refresh
   var b = {_C}
   for (var a in b) {
 var c = a.chirality;
 print _smilesString + " " + a + c
 if (c) {
select a
c = a.atomname + " " + c
label @c
 }
   }
   select *
 }

 checkchiral("$(R)-glycidol")
 delay 1
 checkchiral("$glucose")
 delay 1
 checkchiral("$(2S,3R)-2,3-oxiranediol")
 delay 1
 checkchiral("$(S)-2-butanol")
 delay 1
 checkchiral("$(R)-2-butanol")
 delay 1
 checkchiral("$(2S,3R)-2,3-butanediol")
 delay 1
 checkchiral("$(2S,3S)-2,3-butanediol")
 delay 1
 checkchiral("$(2R,3R)-2,3-butanediol")
 delay 1
 checkchiral("$(2R,3S)-2,3-butanediol")
 delay 1
 checkchiral("$1,4-dimethylcyclohexane")
 delay 1
 checkchiral("$cholesterol") // (3S,8S,9S,10R,13R,14S,17R) and sidechain
 R




 On Thu, Apr 6, 2017 at 3:41 PM, Pierluigi Quagliotto <
 pierluigi.quaglio...@unito.it> wrote:

> Dear Bob,
>
> many thanks for your answer.
> I had a look to the paper, but it is very concise, so I would be in
> doubt about how to proceed. If we (I and a young fellowship who should 
> help
> me for the site in next months) can envisage what (and how to do) we will
> let you know some more. Obviously, if this feature will become available 
> in
> JMol/JSMol, this should be nice and also a great improvement for teaching!
>
> I will start to introduce the page I prepared in the production site,
> just to let student to familiarize with the common procedure used to
> approach to chirality determination. If some improvement about chirality
> determination will be available in JMol/JSMol in the future, I will use it
> enthusiastically. In the last two-three years, as long as my site teaching
> site was produced and developed, I observed great improvement in the
> student's ability to comprehend concepts and use them in solving problems,
> so I will try to do all my best to make continuous site improvements, as
> far as I am able to deal with programming.
>
> Many thanks again for the time you dedicate to me,
>
> Bye!
>
> Pierluigi
>
>
>
>
>
>
> Il 06/04/2017 14:29, Robert Hanson ha scritto:
>
>
>
> On Thu, Apr 6, 2017 at 2:20 AM, Pierluigi Quagliotto <
> pierluigi.quaglio...@unito.it> wrote:
>
>> Dear All,
>>
>> I prepared a page for students (on my developing server:
>> http://5.135.186.232/STdM/index.php/it/esercizi/esercitarsi-
>> sulla-chiralita),
>> in which they can:
>>
>> 1) write down an organic molecule in  JSME
>>
>> 2) submit it to JSmol
>>
>> 3) attribute the Cahn-Ingold-Prelog priority to each group by
>> selecting
>> the first atom of each group which is attached to the Chiral Carbon
>> and
>> clicking on a button that create a label for that atom.
>>
>> 4) reorientate properly the molecule, in order to be able to assign
>> the
>> R / S configuration for chirality.
>>
>> This is enough for me to use in classroom just to show how one should
>> proceed to work on exercises.

Re: [Jmol-users] R: check R/S chirality with Jmol

2017-04-07 Thread Pierluigi Quagliotto

Dear Bob,

Sorry for the delay in answering. I was very busy with Unviersity 
activities and when i tried to post this message from my iPad it was 
sent  from the cloud.me  account and was refused from 
the list manager system.


Jmol is working at its best! I had a look but I did not have time yet 
 to inform you about it.


Due to the new functionality It is now possible to ask a student how 
many chiral carbons he can individuate into a molecule and probably this 
could be done also leaving the student to make a selection on the 
molecule and compare the result obtained using the selection piece of 
script you showed  in the examples. Also, this feature eliminate the 
problem I had, to make exercises on molecules having only one chiral 
sterocenter. Now, every chiral stereocenter can be individuated and 
properly managed.


For people teaching Organic Chemistry this is an enormous advance.  I 
could imagine that by using the selection functions you implemented time 
ago, for a biochemist it could be easy to individuate an unnatural amino 
acid or sugar (for which the difference is only the stereochemistry) in 
a complex biopolymer.


You did it on my birthday, so I would take this great advance as a 
"present" that I can share with everyone, student or teacher, who is 
interested in chemistry. Many thanks also for this.


I will introduce some notes on my site to explain that the new page 
should be taken with care because it is "under testing" and I will ask 
everyone doing exercises to inform us about problems and accuracy problems.


@Pino (who wrote in the meantime...): I only made a request for info to 
Bob... He worked hard, and JMol/JSMol made a "quantum leap"! JMol is 
always a piece of "magic".


Many thanks again!

Bye!

Pierluigi

Il 07/04/2017 19:38, Robert Hanson ha scritto:
I've added a "show R/S" button at 
https://chemapps.stolaf.edu/jmol/jsmol/jsmetest2.htm


It just runs

label %[chirality]
background labels yellow



On Fri, Apr 7, 2017 at 12:24 PM, Robert Hanson > wrote:


I have that fixed in JavaScript but want to add a couple more
unrelated items before I release this the normal way. But you  can
also get jsmol.zip here:
https://sourceforge.net/p/jsmol/code/HEAD/tree/trunk/dist/
 and
it should be  working at the St. Olaf site. For example:

>


On Fri, Apr 7, 2017 at 11:57 AM, pinostricc...@alice.it
 mailto:pinostricc...@alice.it>> wrote:

Wonderful implementation Bob and Pierluigi. Veru useful in
Organich Chemistry
Pino

Messaggio originale
Da: hans...@stolaf.edu 
Data: 7-apr-2017 4.25
A: "jmol-users@lists.sourceforge.net

"mailto:jmol-users@lists.sourceforge.net>>
Ogg: [Jmol-users] check R/S chirality with Jmol

*Download Jmol-14.12.0-binary.zip (69.3 MB)




*
*Jmol now allows checking of R/S chirality. For example:

*
load $(R)-glycidol
print {C1}.chirality

/R/

load $cholesterol
select on chirality != ""
label %[chirality]

/8 atoms selected/


Thanks to Pierluigi Quagliotto for the suggestion to
tackle this. It was a good challenge getting it right.

Please test!

Bob

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





-- 
Robert M. Hanson

Larson-A

Re: [Jmol-users] Cahn-Ingold-Prelog priority rules

2017-04-07 Thread Robert Hanson
That is to say, I just found a mistake in the way the JavaScript version is
working. Looking into that now. Java is OK.

On Fri, Apr 7, 2017 at 12:46 PM, Robert Hanson  wrote:

> ps -- *before I find it*
>
> On Fri, Apr 7, 2017 at 12:42 PM, Robert Hanson  wrote:
>
>> Super. Tell them there is a prize for the first student who finds a
>> mistake in assignment.
>>
>>
>>
>> On Fri, Apr 7, 2017 at 1:52 AM, Pierluigi Quagliotto <
>> pierluigi.quaglio...@unito.it> wrote:
>>
>>> Dear Bob,
>>>
>>> many thanks for it!
>>>
>>> In this weekend I will try  to update my page and make proper test. Once
>>> I will be able to put the page on the production site I will put my student
>>> to make extensive tests, with both simple and complex molecules, to help
>>> you to validate the novel function. I'll let you know when the page will be
>>> ready, just to see it "at work".
>>>
>>> Bye!
>>>
>>> Pierluigi Quagliotto
>>>
>>>
>>> Il 07/04/2017 01:21, Robert Hanson ha scritto:
>>>
>>> This is done.
>>>
>>>
>>> Jmol.___JmolVersion="14.12.0" // 2017-04-06
>>>
>>> new feature: {atom}.chirality
>>>   -- uses Cohen-Ingold-Prelog rules to assign R or S to a carbon center
>>>   -- ignores sulfur chirality
>>>   -- may not fully implement high symmetry cases
>>>   -- not fully tested
>>>   -- Checked using:
>>>
>>> function checkchiral(m) {
>>>   if (m)  load @m
>>>   background label yellow
>>>   color labels black
>>>   select _C
>>>   label %[atomname]
>>>   refresh
>>>   var b = {_C}
>>>   for (var a in b) {
>>> var c = a.chirality;
>>> print _smilesString + " " + a + c
>>> if (c) {
>>>select a
>>>c = a.atomname + " " + c
>>>label @c
>>> }
>>>   }
>>>   select *
>>> }
>>>
>>> checkchiral("$(R)-glycidol")
>>> delay 1
>>> checkchiral("$glucose")
>>> delay 1
>>> checkchiral("$(2S,3R)-2,3-oxiranediol")
>>> delay 1
>>> checkchiral("$(S)-2-butanol")
>>> delay 1
>>> checkchiral("$(R)-2-butanol")
>>> delay 1
>>> checkchiral("$(2S,3R)-2,3-butanediol")
>>> delay 1
>>> checkchiral("$(2S,3S)-2,3-butanediol")
>>> delay 1
>>> checkchiral("$(2R,3R)-2,3-butanediol")
>>> delay 1
>>> checkchiral("$(2R,3S)-2,3-butanediol")
>>> delay 1
>>> checkchiral("$1,4-dimethylcyclohexane")
>>> delay 1
>>> checkchiral("$cholesterol") // (3S,8S,9S,10R,13R,14S,17R) and sidechain R
>>>
>>>
>>>
>>>
>>> On Thu, Apr 6, 2017 at 3:41 PM, Pierluigi Quagliotto <
>>> pierluigi.quaglio...@unito.it> wrote:
>>>
 Dear Bob,

 many thanks for your answer.
 I had a look to the paper, but it is very concise, so I would be in
 doubt about how to proceed. If we (I and a young fellowship who should help
 me for the site in next months) can envisage what (and how to do) we will
 let you know some more. Obviously, if this feature will become available in
 JMol/JSMol, this should be nice and also a great improvement for teaching!

 I will start to introduce the page I prepared in the production site,
 just to let student to familiarize with the common procedure used to
 approach to chirality determination. If some improvement about chirality
 determination will be available in JMol/JSMol in the future, I will use it
 enthusiastically. In the last two-three years, as long as my site teaching
 site was produced and developed, I observed great improvement in the
 student's ability to comprehend concepts and use them in solving problems,
 so I will try to do all my best to make continuous site improvements, as
 far as I am able to deal with programming.

 Many thanks again for the time you dedicate to me,

 Bye!

 Pierluigi






 Il 06/04/2017 14:29, Robert Hanson ha scritto:



 On Thu, Apr 6, 2017 at 2:20 AM, Pierluigi Quagliotto <
 pierluigi.quaglio...@unito.it> wrote:

> Dear All,
>
> I prepared a page for students (on my developing server:
> http://5.135.186.232/STdM/index.php/it/esercizi/esercitarsi-
> sulla-chiralita),
> in which they can:
>
> 1) write down an organic molecule in  JSME
>
> 2) submit it to JSmol
>
> 3) attribute the Cahn-Ingold-Prelog priority to each group by selecting
> the first atom of each group which is attached to the Chiral Carbon and
> clicking on a button that create a label for that atom.
>
> 4) reorientate properly the molecule, in order to be able to assign the
> R / S configuration for chirality.
>
> This is enough for me to use in classroom just to show how one should
> proceed to work on exercises.
>
>
> My question is: Is there a way to obtain priority (by CIP rules) for
> each group attached to a Chiral Carbon? Is it possible to use some
> JSmol
> function(s) to obtain this information?
>
>
 ho, ho! No, sorry. Can't do that. But I love the idea. In principal the
 algorithm is not all that difficult.
 https://www.chemcomp.com/journal/chiral.htm

Re: [Jmol-users] Cahn-Ingold-Prelog priority rules

2017-04-07 Thread Robert Hanson
ps -- *before I find it*

On Fri, Apr 7, 2017 at 12:42 PM, Robert Hanson  wrote:

> Super. Tell them there is a prize for the first student who finds a
> mistake in assignment.
>
>
>
> On Fri, Apr 7, 2017 at 1:52 AM, Pierluigi Quagliotto <
> pierluigi.quaglio...@unito.it> wrote:
>
>> Dear Bob,
>>
>> many thanks for it!
>>
>> In this weekend I will try  to update my page and make proper test. Once
>> I will be able to put the page on the production site I will put my student
>> to make extensive tests, with both simple and complex molecules, to help
>> you to validate the novel function. I'll let you know when the page will be
>> ready, just to see it "at work".
>>
>> Bye!
>>
>> Pierluigi Quagliotto
>>
>>
>> Il 07/04/2017 01:21, Robert Hanson ha scritto:
>>
>> This is done.
>>
>>
>> Jmol.___JmolVersion="14.12.0" // 2017-04-06
>>
>> new feature: {atom}.chirality
>>   -- uses Cohen-Ingold-Prelog rules to assign R or S to a carbon center
>>   -- ignores sulfur chirality
>>   -- may not fully implement high symmetry cases
>>   -- not fully tested
>>   -- Checked using:
>>
>> function checkchiral(m) {
>>   if (m)  load @m
>>   background label yellow
>>   color labels black
>>   select _C
>>   label %[atomname]
>>   refresh
>>   var b = {_C}
>>   for (var a in b) {
>> var c = a.chirality;
>> print _smilesString + " " + a + c
>> if (c) {
>>select a
>>c = a.atomname + " " + c
>>label @c
>> }
>>   }
>>   select *
>> }
>>
>> checkchiral("$(R)-glycidol")
>> delay 1
>> checkchiral("$glucose")
>> delay 1
>> checkchiral("$(2S,3R)-2,3-oxiranediol")
>> delay 1
>> checkchiral("$(S)-2-butanol")
>> delay 1
>> checkchiral("$(R)-2-butanol")
>> delay 1
>> checkchiral("$(2S,3R)-2,3-butanediol")
>> delay 1
>> checkchiral("$(2S,3S)-2,3-butanediol")
>> delay 1
>> checkchiral("$(2R,3R)-2,3-butanediol")
>> delay 1
>> checkchiral("$(2R,3S)-2,3-butanediol")
>> delay 1
>> checkchiral("$1,4-dimethylcyclohexane")
>> delay 1
>> checkchiral("$cholesterol") // (3S,8S,9S,10R,13R,14S,17R) and sidechain R
>>
>>
>>
>>
>> On Thu, Apr 6, 2017 at 3:41 PM, Pierluigi Quagliotto <
>> pierluigi.quaglio...@unito.it> wrote:
>>
>>> Dear Bob,
>>>
>>> many thanks for your answer.
>>> I had a look to the paper, but it is very concise, so I would be in
>>> doubt about how to proceed. If we (I and a young fellowship who should help
>>> me for the site in next months) can envisage what (and how to do) we will
>>> let you know some more. Obviously, if this feature will become available in
>>> JMol/JSMol, this should be nice and also a great improvement for teaching!
>>>
>>> I will start to introduce the page I prepared in the production site,
>>> just to let student to familiarize with the common procedure used to
>>> approach to chirality determination. If some improvement about chirality
>>> determination will be available in JMol/JSMol in the future, I will use it
>>> enthusiastically. In the last two-three years, as long as my site teaching
>>> site was produced and developed, I observed great improvement in the
>>> student's ability to comprehend concepts and use them in solving problems,
>>> so I will try to do all my best to make continuous site improvements, as
>>> far as I am able to deal with programming.
>>>
>>> Many thanks again for the time you dedicate to me,
>>>
>>> Bye!
>>>
>>> Pierluigi
>>>
>>>
>>>
>>>
>>>
>>>
>>> Il 06/04/2017 14:29, Robert Hanson ha scritto:
>>>
>>>
>>>
>>> On Thu, Apr 6, 2017 at 2:20 AM, Pierluigi Quagliotto <
>>> pierluigi.quaglio...@unito.it> wrote:
>>>
 Dear All,

 I prepared a page for students (on my developing server:
 http://5.135.186.232/STdM/index.php/it/esercizi/esercitarsi-
 sulla-chiralita),
 in which they can:

 1) write down an organic molecule in  JSME

 2) submit it to JSmol

 3) attribute the Cahn-Ingold-Prelog priority to each group by selecting
 the first atom of each group which is attached to the Chiral Carbon and
 clicking on a button that create a label for that atom.

 4) reorientate properly the molecule, in order to be able to assign the
 R / S configuration for chirality.

 This is enough for me to use in classroom just to show how one should
 proceed to work on exercises.


 My question is: Is there a way to obtain priority (by CIP rules) for
 each group attached to a Chiral Carbon? Is it possible to use some JSmol
 function(s) to obtain this information?


>>> ho, ho! No, sorry. Can't do that. But I love the idea. In principal the
>>> algorithm is not all that difficult.
>>> https://www.chemcomp.com/journal/chiral.htm Maybe it's time to add
>>> that...
>>>
>>>
>>>
>>>
>>>
 If the answer is yes, this could help me to modify the page to give the
 student the chance to explore the correct result by viewing a model with
 correct priority labelling and also by clicking on a button which
 activate a function that perform the check.



Re: [Jmol-users] Cahn-Ingold-Prelog priority rules

2017-04-07 Thread Robert Hanson
Super. Tell them there is a prize for the first student who finds a mistake
in assignment.



On Fri, Apr 7, 2017 at 1:52 AM, Pierluigi Quagliotto <
pierluigi.quaglio...@unito.it> wrote:

> Dear Bob,
>
> many thanks for it!
>
> In this weekend I will try  to update my page and make proper test. Once I
> will be able to put the page on the production site I will put my student
> to make extensive tests, with both simple and complex molecules, to help
> you to validate the novel function. I'll let you know when the page will be
> ready, just to see it "at work".
>
> Bye!
>
> Pierluigi Quagliotto
>
>
> Il 07/04/2017 01:21, Robert Hanson ha scritto:
>
> This is done.
>
>
> Jmol.___JmolVersion="14.12.0" // 2017-04-06
>
> new feature: {atom}.chirality
>   -- uses Cohen-Ingold-Prelog rules to assign R or S to a carbon center
>   -- ignores sulfur chirality
>   -- may not fully implement high symmetry cases
>   -- not fully tested
>   -- Checked using:
>
> function checkchiral(m) {
>   if (m)  load @m
>   background label yellow
>   color labels black
>   select _C
>   label %[atomname]
>   refresh
>   var b = {_C}
>   for (var a in b) {
> var c = a.chirality;
> print _smilesString + " " + a + c
> if (c) {
>select a
>c = a.atomname + " " + c
>label @c
> }
>   }
>   select *
> }
>
> checkchiral("$(R)-glycidol")
> delay 1
> checkchiral("$glucose")
> delay 1
> checkchiral("$(2S,3R)-2,3-oxiranediol")
> delay 1
> checkchiral("$(S)-2-butanol")
> delay 1
> checkchiral("$(R)-2-butanol")
> delay 1
> checkchiral("$(2S,3R)-2,3-butanediol")
> delay 1
> checkchiral("$(2S,3S)-2,3-butanediol")
> delay 1
> checkchiral("$(2R,3R)-2,3-butanediol")
> delay 1
> checkchiral("$(2R,3S)-2,3-butanediol")
> delay 1
> checkchiral("$1,4-dimethylcyclohexane")
> delay 1
> checkchiral("$cholesterol") // (3S,8S,9S,10R,13R,14S,17R) and sidechain R
>
>
>
>
> On Thu, Apr 6, 2017 at 3:41 PM, Pierluigi Quagliotto <
> pierluigi.quaglio...@unito.it> wrote:
>
>> Dear Bob,
>>
>> many thanks for your answer.
>> I had a look to the paper, but it is very concise, so I would be in doubt
>> about how to proceed. If we (I and a young fellowship who should help me
>> for the site in next months) can envisage what (and how to do) we will let
>> you know some more. Obviously, if this feature will become available in
>> JMol/JSMol, this should be nice and also a great improvement for teaching!
>>
>> I will start to introduce the page I prepared in the production site,
>> just to let student to familiarize with the common procedure used to
>> approach to chirality determination. If some improvement about chirality
>> determination will be available in JMol/JSMol in the future, I will use it
>> enthusiastically. In the last two-three years, as long as my site teaching
>> site was produced and developed, I observed great improvement in the
>> student's ability to comprehend concepts and use them in solving problems,
>> so I will try to do all my best to make continuous site improvements, as
>> far as I am able to deal with programming.
>>
>> Many thanks again for the time you dedicate to me,
>>
>> Bye!
>>
>> Pierluigi
>>
>>
>>
>>
>>
>>
>> Il 06/04/2017 14:29, Robert Hanson ha scritto:
>>
>>
>>
>> On Thu, Apr 6, 2017 at 2:20 AM, Pierluigi Quagliotto <
>> pierluigi.quaglio...@unito.it> wrote:
>>
>>> Dear All,
>>>
>>> I prepared a page for students (on my developing server:
>>> http://5.135.186.232/STdM/index.php/it/esercizi/esercitarsi-
>>> sulla-chiralita),
>>> in which they can:
>>>
>>> 1) write down an organic molecule in  JSME
>>>
>>> 2) submit it to JSmol
>>>
>>> 3) attribute the Cahn-Ingold-Prelog priority to each group by selecting
>>> the first atom of each group which is attached to the Chiral Carbon and
>>> clicking on a button that create a label for that atom.
>>>
>>> 4) reorientate properly the molecule, in order to be able to assign the
>>> R / S configuration for chirality.
>>>
>>> This is enough for me to use in classroom just to show how one should
>>> proceed to work on exercises.
>>>
>>>
>>> My question is: Is there a way to obtain priority (by CIP rules) for
>>> each group attached to a Chiral Carbon? Is it possible to use some JSmol
>>> function(s) to obtain this information?
>>>
>>>
>> ho, ho! No, sorry. Can't do that. But I love the idea. In principal the
>> algorithm is not all that difficult.
>> https://www.chemcomp.com/journal/chiral.htm Maybe it's time to add
>> that...
>>
>>
>>
>>
>>
>>> If the answer is yes, this could help me to modify the page to give the
>>> student the chance to explore the correct result by viewing a model with
>>> correct priority labelling and also by clicking on a button which
>>> activate a function that perform the check.
>>>
>>>
>>> Sorry to bothering you...
>>>
>>>
>>> Bye!
>>>
>>>
>>> Pierluigi Quagliotto
>>>
>>>
>>>
>>> 
>>> --
>>> Check out the vibrant tech community on one of the world's most
>>

Re: [Jmol-users] R: check R/S chirality with Jmol

2017-04-07 Thread Robert Hanson
I've added a "show R/S" button at
https://chemapps.stolaf.edu/jmol/jsmol/jsmetest2.htm

It just runs

label %[chirality]
background labels yellow



On Fri, Apr 7, 2017 at 12:24 PM, Robert Hanson  wrote:

> I have that fixed in JavaScript but want to add a couple more unrelated
> items before I release this the normal way. But you  can also get jsmol.zip
> here: https://sourceforge.net/p/jsmol/code/HEAD/tree/trunk/dist/  and it
> should be  working at the St. Olaf site. For example: <
> https://chemapps.stolaf.edu/jmol/jsmol/simple2.htm?load%
> 20$(R)-2-butanol;label%20%[chirality];background%20labels%20yellow;set%
> 20antialiasdisplay>
>
>
> On Fri, Apr 7, 2017 at 11:57 AM, pinostricc...@alice.it <
> pinostricc...@alice.it> wrote:
>
>> Wonderful implementation Bob and Pierluigi. Veru useful in Organich
>> Chemistry
>> Pino
>>
>> Messaggio originale
>> Da: hans...@stolaf.edu
>> Data: 7-apr-2017 4.25
>> A: "jmol-users@lists.sourceforge.net"
>> Ogg: [Jmol-users] check R/S chirality with Jmol
>>
>>
>>
>> * Download Jmol-14.12.0-binary.zip (69.3 MB)
>>  *
>>
>>
>> *Jmol now allows checking of R/S chirality. For example:*
>> load $(R)-glycidol
>> print {C1}.chirality
>>
>> *R*
>>
>> load $cholesterol
>> select on chirality != ""
>> label %[chirality]
>>
>> *8 atoms selected*
>>
>>
>> Thanks to Pierluigi Quagliotto for the suggestion to tackle this. It was
>> a good challenge getting it right.
>>
>> Please test!
>>
>> Bob
>>
>> --
>> 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
>>
>>
>
>
> --
> 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
--
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] R: check R/S chirality with Jmol

2017-04-07 Thread Robert Hanson
I have that fixed in JavaScript but want to add a couple more unrelated
items before I release this the normal way. But you  can also get jsmol.zip
here: https://sourceforge.net/p/jsmol/code/HEAD/tree/trunk/dist/  and it
should be  working at the St. Olaf site. For example: <
https://chemapps.stolaf.edu/jmol/jsmol/simple2.htm?load%20$(R)-2-butanol;label%20%[chirality];background%20labels%20yellow;set%20antialiasdisplay
>


On Fri, Apr 7, 2017 at 11:57 AM, pinostricc...@alice.it <
pinostricc...@alice.it> wrote:

> Wonderful implementation Bob and Pierluigi. Veru useful in Organich
> Chemistry
> Pino
>
> Messaggio originale
> Da: hans...@stolaf.edu
> Data: 7-apr-2017 4.25
> A: "jmol-users@lists.sourceforge.net"
> Ogg: [Jmol-users] check R/S chirality with Jmol
>
>
>
> * Download Jmol-14.12.0-binary.zip (69.3 MB)
>  *
>
>
> *Jmol now allows checking of R/S chirality. For example:*
> load $(R)-glycidol
> print {C1}.chirality
>
> *R*
>
> load $cholesterol
> select on chirality != ""
> label %[chirality]
>
> *8 atoms selected*
>
>
> Thanks to Pierluigi Quagliotto for the suggestion to tackle this. It was a
> good challenge getting it right.
>
> Please test!
>
> Bob
>
> --
> 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
>
>


-- 
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] JSmol applet creation of mo surfaces or contour plot is slow

2017-04-07 Thread Bruce Tattershall
Thanks to Dr. Bob Hanson and Dr. Angel Herráez for their very helpful advice 
about this.

The problem was that, on a page displaying MOs for teaching purposes, I was 
offering both a  translucent orbital
surface, produced using the mo command, and a two-dimensional contour plot on a 
plane through the orbital,
produced using the isosurface command.

It was the isosurface command which was taking most of the time.  Thus, for the 
pi_nb_in_plane HOMO orbital
(mo 16) of BF3 in 
https://www.staff.ncl.ac.uk/bruce.tattershall/teaching/maingrps/bf3mo/bf3.php
Chrome using the HMTL5.0 JSmol option took 5 seconds to produce the 3D orbital 
surface but
16 seconds to produce the 2D line contour plot.  (This speeds up to 3 s and 10 
s respectively on the
more powerful PCs our U provides for student class use.)

I took the suggestion of calculating the surface immediately after loading the 
model, but waiting for the student
to request the contour plot by clicking a Jmol button.

I also took the suggestion to put in echoes to tell the user what they were 
waiting for in each case.

Although the two representations are each calculated in less than 2 seconds 
using the Java Jmol option in
Java enhanced IE11, I think that, for students stuck with using a browser 
without Java, then a 3 - 5 second
initial wait is tolerable if they are given information about what is 
happening.   The original offering of
a 13 - 21 second unexplained wait was putting such students off.

  Bruce

(original post 20 March 2017)



--
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: check R/S chirality with Jmol

2017-04-07 Thread pinostricc...@alice.it
Wonderful implementation Bob and Pierluigi. Veru useful in Organich Chemistry
Pino




Messaggio originale

Da: hans...@stolaf.edu

Data: 7-apr-2017 4.25

A: "jmol-users@lists.sourceforge.net"

Ogg: [Jmol-users] check R/S chirality with Jmol



 

Download Jmol-14.12.0-binary.zip (69.3 MB)



Jmol now allows checking of R/S chirality. For example:

load $(R)-glycidol
print {C1}.chirality

R

load $cholesterol
select on chirality != ""
label %[chirality]

8 atoms selected

Thanks to Pierluigi Quagliotto for the suggestion to tackle this. It was a good 
challenge getting it right. 

Please test!

Bob

-- 
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] check R/S chirality with Jmol

2017-04-07 Thread Robert Hanson
OK, I see. I used a Java Math function that I did not implement in
JavaScript. Easy fix...

On Fri, Apr 7, 2017 at 10:31 AM, Robert Hanson  wrote:

> Hmm. I do know where that is coming from. Admittedly I had not tried it in
> JavaScript! Will do. Working  in Jmol.jar, right?
>
>
>
> On Fri, Apr 7, 2017 at 3:39 AM, Pierluigi Quagliotto <
> pierluigi.quaglio...@unito.it> wrote:
>
>> Dear Bob,
>>
>> there is something working wrong with JSMol 14.12.0 working on my
>> developing site...
>>
>> I obtain an error in the console when trying to execute some commands.
>>
>> here below the message is always the same and appears when the first call
>> to the novel function is tried.
>>
>>
>>
>>
>>
>> *Jmol now allows checking of R/S chirality. For example: *
>> load $(R)-glycidol
>> print {C1}.chirality
>>
>> script ERROR: TypeError: The object does not support the property or the
>> method 'printStackTrace'
>>
>>
>> *R*
>>
>> load $cholesterol
>> select on chirality != ""
>>
>> script ERROR: TypeError: The object does not support the property or the
>> method 'printStackTrace'
>>
>> label %[chirality]
>>
>> *8 atoms selected*
>>
>>
>>
>> I simply transferred the jsmol dir on the server, as usual and gave
>> proper 755 permission and apache.apache ownership. JSMol seems to work fine
>> but ht euse of the new function gave this error.
>>
>> Bye,
>>
>> Pierluigi Quagliotto
>>
>>
>>
>> 
>> --
>> 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
>
>


-- 
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] check R/S chirality with Jmol

2017-04-07 Thread Robert Hanson
Hmm. I do know where that is coming from. Admittedly I had not tried it in
JavaScript! Will do. Working  in Jmol.jar, right?



On Fri, Apr 7, 2017 at 3:39 AM, Pierluigi Quagliotto <
pierluigi.quaglio...@unito.it> wrote:

> Dear Bob,
>
> there is something working wrong with JSMol 14.12.0 working on my
> developing site...
>
> I obtain an error in the console when trying to execute some commands.
>
> here below the message is always the same and appears when the first call
> to the novel function is tried.
>
>
>
>
>
> *Jmol now allows checking of R/S chirality. For example: *
> load $(R)-glycidol
> print {C1}.chirality
>
> script ERROR: TypeError: The object does not support the property or the
> method 'printStackTrace'
>
>
> *R*
>
> load $cholesterol
> select on chirality != ""
>
> script ERROR: TypeError: The object does not support the property or the
> method 'printStackTrace'
>
> label %[chirality]
>
> *8 atoms selected*
>
>
>
> I simply transferred the jsmol dir on the server, as usual and gave proper
> 755 permission and apache.apache ownership. JSMol seems to work fine but ht
> euse of the new function gave this error.
>
> Bye,
>
> Pierluigi Quagliotto
>
>
>
> 
> --
> 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] check R/S chirality with Jmol

2017-04-07 Thread Pierluigi Quagliotto

Dear Bob,

there is something working wrong with JSMol 14.12.0 working on my 
developing site...


I obtain an error in the console when trying to execute some commands.

here below the message is always the same and appears when the first 
call to the novel function is tried.


*

*

*Jmol now allows checking of R/S chirality. For example:

*
load $(R)-glycidol
print {C1}.chirality
script ERROR: TypeError: The object does not support the property or the 
method 'printStackTrace'




/R/

load $cholesterol
select on chirality != ""
script ERROR: TypeError: The object does not support the property or the 
method 'printStackTrace'



label %[chirality]

/8 atoms selected/




I simply transferred the jsmol dir on the server, as usual and gave 
proper 755 permission and apache.apache ownership. JSMol seems to work 
fine but ht euse of the new function gave this error.


Bye,

Pierluigi Quagliotto


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