Revision: 18571
          http://sourceforge.net/p/jmol/code/18571
Author:   hansonr
Date:     2013-08-14 14:50:05 +0000 (Wed, 14 Aug 2013)
Log Message:
-----------
___JmolVersion="13.2.4_dev_2013.08.14"

bug fix: {x}.tensor() command fails when no atom tensors

Modified Paths:
--------------
    branches/v13_2/Jmol/src/org/jmol/quantum/NMRCalculation.java
    branches/v13_2/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: branches/v13_2/Jmol/src/org/jmol/quantum/NMRCalculation.java
===================================================================
--- branches/v13_2/Jmol/src/org/jmol/quantum/NMRCalculation.java        
2013-08-14 14:37:03 UTC (rev 18570)
+++ branches/v13_2/Jmol/src/org/jmol/quantum/NMRCalculation.java        
2013-08-14 14:50:05 UTC (rev 18571)
@@ -430,12 +430,14 @@
     for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) {
       if (tensorType == null) {
         Tensor[] a = viewer.modelSet.getAtomTensorList(i);
-        for (int j = 0; j < a.length; j++)
-          data.addLast(a[j].getInfo(infoType));
+        if (a != null)
+          for (int j = 0; j < a.length; j++)
+            data.addLast(a[j].getInfo(infoType));
       } else {
         Tensor t = viewer.modelSet.getAtomTensor(i, tensorType);
-        data.addLast(t == null ? null : isChi ? Float
-            .valueOf(getQuadrupolarConstant(t)) : t.getInfo(infoType));
+        if (t != null)
+          data.addLast(isChi ? Float.valueOf(getQuadrupolarConstant(t)) : t
+              .getInfo(infoType));
       }
     }
     return data;

Modified: branches/v13_2/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- branches/v13_2/Jmol/src/org/jmol/viewer/Jmol.properties     2013-08-14 
14:37:03 UTC (rev 18570)
+++ branches/v13_2/Jmol/src/org/jmol/viewer/Jmol.properties     2013-08-14 
14:50:05 UTC (rev 18571)
@@ -11,6 +11,8 @@
 
 ___JmolVersion="13.2.4_dev_2013.08.14"
 
+bug fix: {x}.tensor() command fails when no atom tensors
+
 FEATURE CHANGE: set wireframeRotation expanded to include bioshapes and 
isosurfaces
 bug fix: set wireframeRotation not working ("inMotion" flag not properly read 
in Viewer).
 

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


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&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