Revision: 21572
          http://sourceforge.net/p/jmol/code/21572
Author:   hansonr
Date:     2017-04-29 18:56:28 +0000 (Sat, 29 Apr 2017)
Log Message:
-----------
Jmol.___JmolVersion="14.15.2" // 4/29/17

bug fix: CIP chirality adds axial chirality (M/P[Ra/Sa], m/p[ra/sa]) for 
cumulenes
bug fix: CIP chirality adds atropisomer chirality (M/P[Ra/Sa], m/p[ra/sa]) for 
biaryls
bug fix: CIP chirality adds cumulene E/Z chirality
 -- 816 lines
 -- validation data are at 
https://sourceforge.net/p/jmol/code/HEAD/tree/trunk/Jmol-datafiles/cip/
 -- validates for 160 structures (some duplicates; both cip_examples.zip and 
stereo_test_cases.sdf)
 -- validates for all cases considered:
   -- simple R/S and E/Z
   -- small-ring removal of E/Z
   -- parallel-strand Rule 4b and Rule 5 (Mata)
   -- pseudochiral r/s and m/p
   -- odd and even cumulenes
   -- atropisomers

Modified Paths:
--------------
    trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java
    trunk/Jmol/src/org/jmol/viewer/JC.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java
===================================================================
--- trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java  2017-04-29 18:49:38 UTC 
(rev 21571)
+++ trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java  2017-04-29 18:56:28 UTC 
(rev 21572)
@@ -233,6 +233,9 @@
   static final int STEREO_R = JC.CIP_CHIRALITY_R_FLAG;
   static final int STEREO_S = JC.CIP_CHIRALITY_S_FLAG;
 
+  static final int STEREO_M = JC.CIP_CHIRALITY_M_FLAG;
+  static final int STEREO_P = JC.CIP_CHIRALITY_P_FLAG;
+  
   static final int STEREO_Z = JC.CIP_CHIRALITY_Z_FLAG;
   static final int STEREO_E = JC.CIP_CHIRALITY_E_FLAG;
 
@@ -807,13 +810,10 @@
     int c = NO_CHIRALITY;
     if (atop >= 0 && btop >= 0) {
       if (isAxial) {
-        c = (isRa(b2.atoms[btop], b2, a1, a1.atoms[atop]) ? STEREO_R
-            : STEREO_S);
-        if (c != NO_CHIRALITY) {
-          c |= JC.CIP_CHIRALITY_AXIAL_FLAG;
-          if ((a2.ties == null) != (b2.ties == null))
-            c |= JC.CIP_CHIRALITY_PSEUDO_FLAG;
-        }
+        c = (isPos(b2.atoms[btop], b2, a1, a1.atoms[atop]) ? STEREO_P
+            : STEREO_M);
+        if ((a2.ties == null) != (b2.ties == null))
+          c |= JC.CIP_CHIRALITY_PSEUDO_FLAG;
       } else {
         c = (isCis(b2.atoms[btop], b2, a1, a1.atoms[atop]) ? STEREO_Z
             : STEREO_E);
@@ -847,7 +847,8 @@
   }
 
   /**
-   * 
+   * Checks the torsion angle and returns true if it is positive
+   *  
    * @param a
    * @param b
    * @param c
@@ -854,10 +855,9 @@
    * @param d
    * @return true if torsion angle is
    */
-  boolean isRa(CIPAtom a, CIPAtom b, CIPAtom c, CIPAtom d) {
-    float angle = Measure.computeTorsion(a.atom.getXYZ(), b.atom.getXYZ(), 
c.atom.getXYZ(),
-        d.atom.getXYZ(), true);
-    return angle < 0;
+  boolean isPos(CIPAtom a, CIPAtom b, CIPAtom c, CIPAtom d) {
+    return (Measure.computeTorsion(a.atom.getXYZ(), b.atom.getXYZ(), 
c.atom.getXYZ(),
+        d.atom.getXYZ(), true) > 0);
   }
 
   final static int[] PRIORITY_SHIFT = new int[] { 24, 20, 12, 8, 4, 0 };

Modified: trunk/Jmol/src/org/jmol/viewer/JC.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/JC.java      2017-04-29 18:49:38 UTC (rev 
21571)
+++ trunk/Jmol/src/org/jmol/viewer/JC.java      2017-04-29 18:56:28 UTC (rev 
21572)
@@ -48,18 +48,21 @@
   public final static int CIP_CHIRALITY_R_FLAG = 1;
   public final static int CIP_CHIRALITY_S_FLAG = 2;
   public final static int CIP_CHIRALITY_NONE = 3;
-  public final static int CIP_CHIRALITY_PSEUDO_FLAG = 4;
-  public final static int CIP_CHIRALITY_r_FLAG = CIP_CHIRALITY_R_FLAG | 
CIP_CHIRALITY_PSEUDO_FLAG;
-  public final static int CIP_CHIRALITY_s_FLAG = CIP_CHIRALITY_S_FLAG | 
CIP_CHIRALITY_PSEUDO_FLAG;
   public final static int CIP_CHIRALITY_CANTDETERMINE = 7;
+  
   public final static int CIP_CHIRALITY_Z_FLAG = 1 << 3; // 0x08
   public final static int CIP_CHIRALITY_E_FLAG = 2 << 3; // 0x10 Z|E is "no 
chirality"
+  
   public final static int CIP_CHIRALITY_AXIAL_FLAG = 4 << 3;
-  public final static int CIP_CHIRALITY_Ra_FLAG = CIP_CHIRALITY_R_FLAG | 
CIP_CHIRALITY_AXIAL_FLAG;
-  public final static int CIP_CHIRALITY_Sa_FLAG = CIP_CHIRALITY_S_FLAG | 
CIP_CHIRALITY_AXIAL_FLAG;
-  public final static int CIP_CHIRALITY_ra_FLAG = CIP_CHIRALITY_Ra_FLAG | 
CIP_CHIRALITY_PSEUDO_FLAG;
-  public final static int CIP_CHIRALITY_sa_FLAG = CIP_CHIRALITY_Sa_FLAG | 
CIP_CHIRALITY_PSEUDO_FLAG;
+  public final static int CIP_CHIRALITY_M_FLAG = CIP_CHIRALITY_R_FLAG | 
CIP_CHIRALITY_AXIAL_FLAG;
+  public final static int CIP_CHIRALITY_P_FLAG = CIP_CHIRALITY_S_FLAG | 
CIP_CHIRALITY_AXIAL_FLAG;
 
+  public final static int CIP_CHIRALITY_PSEUDO_FLAG = 4;
+  public final static int CIP_CHIRALITY_r_FLAG = CIP_CHIRALITY_R_FLAG | 
CIP_CHIRALITY_PSEUDO_FLAG;
+  public final static int CIP_CHIRALITY_s_FLAG = CIP_CHIRALITY_S_FLAG | 
CIP_CHIRALITY_PSEUDO_FLAG;
+  public final static int CIP_CHIRALITY_m_FLAG = CIP_CHIRALITY_M_FLAG | 
CIP_CHIRALITY_PSEUDO_FLAG;
+  public final static int CIP_CHIRALITY_p_FLAG = CIP_CHIRALITY_P_FLAG | 
CIP_CHIRALITY_PSEUDO_FLAG;
+
   public static String getCIPChiralityName(int flags) {
     switch (flags) {
     case CIP_CHIRALITY_Z_FLAG:
@@ -66,10 +69,10 @@
       return "Z";
     case CIP_CHIRALITY_E_FLAG:
       return "E";
-    case CIP_CHIRALITY_Ra_FLAG:
-      return "Ra";
-    case CIP_CHIRALITY_Sa_FLAG:
-      return "Sa";
+    case CIP_CHIRALITY_M_FLAG:
+      return "M";
+    case CIP_CHIRALITY_P_FLAG:
+      return "P";
     case CIP_CHIRALITY_R_FLAG:
       return "R";
     case CIP_CHIRALITY_S_FLAG:
@@ -78,10 +81,10 @@
       return "r";
     case CIP_CHIRALITY_s_FLAG:
       return "s";
-    case CIP_CHIRALITY_ra_FLAG:
-      return "ra";
-    case CIP_CHIRALITY_sa_FLAG:
-      return "sa";
+    case CIP_CHIRALITY_m_FLAG:
+      return "m";
+    case CIP_CHIRALITY_p_FLAG:
+      return "p";
     case CIP_CHIRALITY_CANTDETERMINE:
       return "?";
     case CIP_CHIRALITY_NONE:

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2017-04-29 18:49:38 UTC 
(rev 21571)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2017-04-29 18:56:28 UTC 
(rev 21572)
@@ -51,12 +51,19 @@
 
 Jmol.___JmolVersion="14.15.2" // 4/29/17
 
-bug fix: CIP chirality adds axial chirality (Ra/Sa, ra/sa) for cumulenes
-bug fix: CIP chirality adds atropisomer chirality (Ra/Sa, ra/sa) for biaryls
+bug fix: CIP chirality adds axial chirality (M/P[Ra/Sa], m/p[ra/sa]) for 
cumulenes
+bug fix: CIP chirality adds atropisomer chirality (M/P[Ra/Sa], m/p[ra/sa]) for 
biaryls
 bug fix: CIP chirality adds cumulene E/Z chirality
+ -- 816 lines
+ -- validation data are at 
https://sourceforge.net/p/jmol/code/HEAD/tree/trunk/Jmol-datafiles/cip/
  -- validates for 160 structures (some duplicates; both cip_examples.zip and 
stereo_test_cases.sdf)
- -- 817 lines
- 
+ -- validates for all cases considered:
+   -- simple R/S and E/Z
+   -- small-ring removal of E/Z
+   -- parallel-strand Rule 4b and Rule 5 (Mata)
+   -- pseudochiral r/s and m/p
+   -- odd and even cumulenes
+   -- atropisomers
 
 JmolVersion="14.15.1" // 4/28/17
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


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

Reply via email to