Revision: 21564
          http://sourceforge.net/p/jmol/code/21564
Author:   hansonr
Date:     2017-04-27 20:58:32 +0000 (Thu, 27 Apr 2017)
Log Message:
-----------
CIP alkene + RS

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

Modified: trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java
===================================================================
--- trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java  2017-04-27 19:00:54 UTC 
(rev 21563)
+++ trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java  2017-04-27 20:58:32 UTC 
(rev 21564)
@@ -353,7 +353,7 @@
       // using BSAtoms here because we need the entire graph, even starting 
with an H atom. 
       getSmallRings(atoms[bsAtoms.nextSetBit(0)]);
       for (int i = bsToDo.nextSetBit(0); i >= 0; i = bsToDo.nextSetBit(i + 1))
-        getAtomBondChirality(atoms[i], false, lstEZ, bsToDo);
+        getAtomBondChirality(atoms[i], false, RULE_3, lstEZ, bsToDo);
     }
 
     
@@ -366,6 +366,13 @@
       a.setCIPChirality(getAtomChiralityLimited(a, null, null, 5));
     }
 
+    if (haveAlkenes) {
+      for (int i = bsToDo.nextSetBit(0); i >= 0; i = bsToDo.nextSetBit(i + 1))
+        getAtomBondChirality(atoms[i], false, RULE_5, lstEZ, bsToDo);
+    }
+
+
+    
     // Finally, remove any E/Z indications in small rings
 
     if (lstSmallRings.size() > 0 && lstEZ.size() > 0)
@@ -597,7 +604,7 @@
    * @param bsToDo 
    */
 
-  private void getAtomBondChirality(Node atom, boolean allBonds, 
Lst<int[]>lstEZ, BS bsToDo) {
+  private void getAtomBondChirality(Node atom, boolean allBonds, int ruleMax, 
Lst<int[]>lstEZ, BS bsToDo) {
     Edge[] bonds = atom.getEdges();
     int index = atom.getIndex();
     for (int j = bonds.length; --j >= 0;) {
@@ -605,10 +612,10 @@
       if (bond.getCovalentOrder() == 2) {
         int index2 = bond.getOtherAtomNode(atom).getIndex();
         if ((allBonds || index2 > index)
-          && getBondChiralityLimited(bond, RULE_3) != NO_CHIRALITY) {
+          && getBondChiralityLimited(bond, ruleMax) != NO_CHIRALITY) {
           lstEZ.addLast(new int[] {index, index2});
-          bsToDo.clear(index);
-          bsToDo.clear(index2);
+          //bsToDo.clear(index);
+          //bsToDo.clear(index2);
         }
       }
     }

Modified: trunk/Jmol/src/org/jmol/viewer/GlobalSettings.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/GlobalSettings.java  2017-04-27 19:00:54 UTC 
(rev 21563)
+++ trunk/Jmol/src/org/jmol/viewer/GlobalSettings.java  2017-04-27 20:58:32 UTC 
(rev 21564)
@@ -202,9 +202,9 @@
     setF("axesScale", axesScale);
     setF("axesOffset", axesOffset);
     setB("axesOrientationRasmol", axesOrientationRasmol);
-    setF("backboneBlock", backboneBlockWidth);
-    setB("backboneBlocks", backboneBlocks);
-    setB("backboneSteps", backboneSteps);
+    setF("cartoonBlockHeight", cartoonBlockHeight);
+    setB("cartoonBlocks", cartoonBlocks);
+    setB("cartoonSteps", cartoonSteps);
     setB("bondModeOr", bondModeOr);
     setB("bondPicking", bondPicking);
     setI("bondRadiusMilliAngstroms", bondRadiusMilliAngstroms);
@@ -544,9 +544,9 @@
 
   boolean cartoonBaseEdges = false;
   boolean cartoonRockets = false;
-  float backboneBlockWidth = 0.5f;
-  boolean backboneBlocks = false;
-  boolean backboneSteps = false;
+  float cartoonBlockHeight = 0.5f;
+  boolean cartoonBlocks = false;
+  boolean cartoonSteps = false;
   boolean cartoonFancy = false;
   boolean cartoonLadders = false;
   boolean cartoonRibose = false;

Modified: trunk/Jmol/src/org/jmol/viewer/JC.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/JC.java      2017-04-27 19:00:54 UTC (rev 
21563)
+++ trunk/Jmol/src/org/jmol/viewer/JC.java      2017-04-27 20:58:32 UTC (rev 
21564)
@@ -52,8 +52,8 @@
   public final static int CIP_CHIRALITY_r_FLAG = 5;
   public final static int CIP_CHIRALITY_s_FLAG = 6;
   public final static int CIP_CHIRALITY_CANTDETERMINE = 7;
-  public final static int CIP_CHIRALITY_Z_FLAG = 8;
-  public final static int CIP_CHIRALITY_E_FLAG = 0x10; // Z|E is "no chirality"
+  public final static int CIP_CHIRALITY_Z_FLAG = 1 << 3;
+  public final static int CIP_CHIRALITY_E_FLAG = 2 << 3; // Z|E is "no 
chirality"
 
   public static String getCIPChiralityName(int flags) {
     switch (flags) {

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2017-04-27 19:00:54 UTC 
(rev 21563)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2017-04-27 20:58:32 UTC 
(rev 21564)
@@ -61,6 +61,8 @@
 bug fix: CIP chirality broken for carbonyl groups
 bug fix: CIP chirality E/Z should not be indicated for rings of size < 8
 
+bug fix: values not saved in state for cartoonBlockHeight, cartoonBlocks, and 
cartoonSteps
+
 code: CIPChirality.java 779 lines Rules 1-5 validated on 145 compounds 
   - see https://sourceforge.net/p/jmol/code/HEAD/tree/trunk/Jmol-datafiles/cip/
 code: CIP optimizations

Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Viewer.java  2017-04-27 19:00:54 UTC (rev 
21563)
+++ trunk/Jmol/src/org/jmol/viewer/Viewer.java  2017-04-27 20:58:32 UTC (rev 
21564)
@@ -5142,9 +5142,9 @@
     case T.axesorientationrasmol:
       return g.axesOrientationRasmol;
     case T.cartoonsteps:
-      return g.backboneSteps;
+      return g.cartoonSteps;
     case T.cartoonblocks:
-      return g.backboneBlocks;
+      return g.cartoonBlocks;
     case T.bondmodeor:
       return g.bondModeOr;
     case T.cartoonbaseedges:
@@ -5381,7 +5381,7 @@
       return g.vibrationPeriod;
     case T.cartoonblockheight:
       // 14.11.0
-      return g.backboneBlockWidth;
+      return g.cartoonBlockHeight;
     }
     Logger.error("viewer.getFloat(" + T.nameOf(tok) + ") - not listed");
     return 0;
@@ -5648,7 +5648,7 @@
     switch (tok) {
     case T.cartoonblockheight:
       // 14.11.0
-      g.backboneBlockWidth = value;
+      g.cartoonBlockHeight = value;
       break;
     case T.modulationscale:
       // 14.0.1
@@ -6126,11 +6126,11 @@
       break;
     case T.cartoonblocks:
       // 14.11.0
-      g.backboneBlocks = value;
+      g.cartoonBlocks = value;
       break;
     case T.cartoonsteps:
       // 14.1.14
-      g.backboneSteps = value;
+      g.cartoonSteps = value;
       break;
     case T.cartoonribose:
       // 14.1.8

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