Revision: 18623
          http://sourceforge.net/p/jmol/code/18623
Author:   hansonr
Date:     2013-08-23 16:53:13 +0000 (Fri, 23 Aug 2013)
Log Message:
-----------
bug fix for select n; 

Modified Paths:
--------------
    branches/v13_2/Jmol/src/org/jmol/modelset/AtomCollection.java
    branches/v13_2/Jmol/src/org/jmol/modelset/ModelCollection.java
    branches/v13_2/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: branches/v13_2/Jmol/src/org/jmol/modelset/AtomCollection.java
===================================================================
--- branches/v13_2/Jmol/src/org/jmol/modelset/AtomCollection.java       
2013-08-23 16:52:44 UTC (rev 18622)
+++ branches/v13_2/Jmol/src/org/jmol/modelset/AtomCollection.java       
2013-08-23 16:53:13 UTC (rev 18623)
@@ -2339,17 +2339,12 @@
     bs.and(bsInsert);
     if (pt >= len)
       return bs;
-    //
-    // look for a chain spec -- no colon
-    //
-    char chainID = identifier.charAt(pt++);
-    bs.and(getChainBits(chainID));
-    if (pt == len)
-      return bs;
-    //
-    // not applicable
-    //
-    return null;
+    if(pt != len - 1)
+      return null;
+    // ALA32B  (no colon; not ALA32:B)
+    // old school; not supported for multi-character chains
+    bs.and(getChainBits(identifier.charAt(pt)));
+    return bs;
   }
 
   private BS getSpecName(String name) {
@@ -2432,7 +2427,7 @@
 
   protected BS getChainBits(int chainID) {
     boolean caseSensitive = viewer.getBoolean(T.chaincasesensitive);
-   if (!caseSensitive)
+   if (chainID >= 0 && !caseSensitive)
       chainID = Character.toUpperCase(chainID);
     BS bs = new BS();
     BS bsDone = BSUtil.newBitSet(atomCount);

Modified: branches/v13_2/Jmol/src/org/jmol/modelset/ModelCollection.java
===================================================================
--- branches/v13_2/Jmol/src/org/jmol/modelset/ModelCollection.java      
2013-08-23 16:52:44 UTC (rev 18622)
+++ branches/v13_2/Jmol/src/org/jmol/modelset/ModelCollection.java      
2013-08-23 16:53:13 UTC (rev 18623)
@@ -1933,10 +1933,10 @@
       info = (int[]) specInfo;
       int seqcodeA = info[0];
       int seqcodeB = info[1];
-      char chainID = (char) info[2];
+      int chainID = info[2];
       bs = new BS();
       boolean caseSensitive = viewer.getBoolean(T.chaincasesensitive);
-      if (!caseSensitive)
+      if (chainID >= 0 && !caseSensitive)
         chainID = Character.toUpperCase(chainID);
       for (int i = modelCount; --i >= 0;)
         if (models[i].isBioModel)

Modified: branches/v13_2/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- branches/v13_2/Jmol/src/org/jmol/viewer/Jmol.properties     2013-08-23 
16:52:44 UTC (rev 18622)
+++ branches/v13_2/Jmol/src/org/jmol/viewer/Jmol.properties     2013-08-23 
16:53:13 UTC (rev 18623)
@@ -9,8 +9,11 @@
 #  Don't use ___ in your text, as that is the key for stripping out
 #  the information saved in the JAR version of this file.
 
+
 ___JmolVersion="13.2.4"
 
+bug fix: select 1-5 broken
+
 JmolVersion="13.2.4_dev_2013.08.20"
 
 bug fix: CIF reader not processing _ccdc_geom_bond_order records

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


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to