Revision: 21656
          http://sourceforge.net/p/jmol/code/21656
Author:   hansonr
Date:     2017-07-07 14:47:49 +0000 (Fri, 07 Jul 2017)
Log Message:
-----------
 * 7/7/17 Jmol 14.20.1 minor coding efficiencies (833 lines)

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

Modified: trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java
===================================================================
--- trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java  2017-07-07 14:36:40 UTC 
(rev 21655)
+++ trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java  2017-07-07 14:47:49 UTC 
(rev 21656)
@@ -140,6 +140,8 @@
  * 
  * code history:
  * 
+ * 7/7/17 Jmol 14.20.1 minor coding efficiencies (833 lines)
+ *  
  * 7/6/17 Jmol 14.20.1 major rewrite to correct and simplify logic; full 
validation
  *  for 433 structures (many duplicates) in AY236, BH64, MV64, MV116, JM, and 
L (836 lines)
  * 
@@ -1153,13 +1155,9 @@
         atom = (root = cipAtom).atom;
         cipAtom.htPathPoints = (cipAtom.parent = new CIPAtom().create(
             parentAtom, null, true, false, false)).htPathPoints;
-      } else {
-        // This is a root-atom call. We do not know at this point if it 
-        // is an atom we can process or not.
-        root = cipAtom = new CIPAtom().create(atom, null, false, false, false);
-        int nSubs = atom.getCovalentBondCount();
-        // P-93.2.4 no double bonds for S=X and P=X
-        if (nSubs != 4 && !cipAtom.isTrigonalPyramidal)   
+      } else if (!(root = cipAtom = new CIPAtom().create(atom, null, false, 
false, false)).canBePseudo) {
+        // This is a root-atom call. 
+        // Just checking here that center has 4 covalent bonds or is trigonal 
pyramidal.
           return NO_CHIRALITY;
       }
       if (cipAtom.setNode()) {
@@ -1583,7 +1581,8 @@
 
     /**
      * a flag set false in evaluation of Rule 5 to indicate that there was 
more 
-     * than one R/S decision made, so this center cannot be r/s. 
+     * than one R/S decision made, so this center cannot be r/s; initially just
+     * indicates that the atom has 4 covalent bonds or is trigonal pyriamidal 
      */
     boolean canBePseudo = true;
 
@@ -2943,7 +2942,7 @@
             }
           }
         }
-      } else if (isTrigonalPyramidal || bondCount == 4) {
+      } else if (canBePseudo) {
         // if here, adj is TIED (0) or NOT_RELEVANT
         CIPAtom atom1 = (CIPAtom) clone();
         if (atom1.setNode()) {

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