Revision: 18631
          http://sourceforge.net/p/jmol/code/18631
Author:   hansonr
Date:     2013-08-30 01:12:26 +0000 (Fri, 30 Aug 2013)
Log Message:
-----------


Modified Paths:
--------------
    trunk/Jmol/src/org/jmol/adapter/readers/more/JcampdxReader.java
    trunk/Jmol/src/org/jmol/viewer/JSpecView.java

Modified: trunk/Jmol/src/org/jmol/adapter/readers/more/JcampdxReader.java
===================================================================
--- trunk/Jmol/src/org/jmol/adapter/readers/more/JcampdxReader.java     
2013-08-29 15:55:40 UTC (rev 18630)
+++ trunk/Jmol/src/org/jmol/adapter/readers/more/JcampdxReader.java     
2013-08-30 01:12:26 UTC (rev 18631)
@@ -331,6 +331,7 @@
     Object spectrum = null;
     
     try {
+      int offset = (isSignals ? 1 : 0);
       String tag1 = (isSignals ? "Signals" : "Peaks");
       String tag2 = (isSignals ? "<Signal" : "<PeakData");
       String line = discardUntil(reader, tag1);
@@ -403,7 +404,7 @@
         if (bs != null) {
           String s = "";
           for (int j = bs.nextSetBit(0); j >= 0; j = bs.nextSetBit(j + 1))
-            s += "," + (j + 1);
+            s += "," + (j + offset);
           int na = bs.cardinality();
           nH += na;
           stringInfo = simpleReplace(stringInfo, "%ATOMS%", s

Modified: trunk/Jmol/src/org/jmol/viewer/JSpecView.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/JSpecView.java       2013-08-29 15:55:40 UTC 
(rev 18630)
+++ trunk/Jmol/src/org/jmol/viewer/JSpecView.java       2013-08-30 01:12:26 UTC 
(rev 18631)
@@ -49,19 +49,24 @@
     Hashtable<String, BS> htPeaks = viewer.modelSet.htPeaks;
     for (int i = 0; i < peaks.size(); i++) {
       String peak = peaks.get(i);
+      System.out.println("Jmol JSpecView.java peak="  + peak);
       BS bsPeak = htPeaks.get(peak);
+      System.out.println("Jmol JSpecView.java bspeak="  + bsPeak);
       if (bsPeak == null) {
         htPeaks.put(peak, bsPeak = new BS());
         String satoms = Parser.getQuotedAttribute(peak, "atoms");
         String select = Parser.getQuotedAttribute(peak, "select");
+        System.out.println("Jmol JSpecView.java satoms select " + satoms + " " 
+ select);
         String script = "";
         if (satoms != null)
           script += "visible & (atomno="
               + TextFormat.simpleReplace(satoms, ",", " or atomno=") + ")";
         else if (select != null)
           script += "visible & (" + select + ")";
+        System.out.println("Jmol JSpecView.java script : " + script);
         bsPeak.or(viewer.getAtomBitSet(script));
       }
+      System.out.println("Jmol JSpecView bsPeak now : " + bsPeak + " " + 
atomIndex);
       if (bsPeak.get(atomIndex))
         return peak;
     }

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


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&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