Revision: 18454
          http://sourceforge.net/p/jmol/code/18454
Author:   hansonr
Date:     2013-07-18 11:16:59 +0000 (Thu, 18 Jul 2013)
Log Message:
-----------
adds option to create property_cs for chemical shift

Modified Paths:
--------------
    trunk/Jmol/src/org/jmol/quantum/NMRCalculation.java

Modified: trunk/Jmol/src/org/jmol/quantum/NMRCalculation.java
===================================================================
--- trunk/Jmol/src/org/jmol/quantum/NMRCalculation.java 2013-07-18 11:14:10 UTC 
(rev 18453)
+++ trunk/Jmol/src/org/jmol/quantum/NMRCalculation.java 2013-07-18 11:16:59 UTC 
(rev 18454)
@@ -334,14 +334,10 @@
 
   public float getChemicalShift(Atom atom) {
     float v = viewer.getDataFloatAt("property_cs", atom.index);
-    if (Float.isNaN(v))
-      v = getMagneticShielding(atom);
-    if (!Float.isNaN(v)) {
-      String sym = atom.getElementSymbol();
-      Float ref = shiftRefsPPM.get(sym);
-      v = (ref == null ? 0 : ref.floatValue()) - v;
-    }
-    return v;
+    if (!Float.isNaN(v) || Float.isNaN(v = getMagneticShielding(atom)))
+      return v;
+    Float ref = shiftRefsPPM.get(atom.getElementSymbol());
+    return (ref == null ? 0 : ref.floatValue()) - v;
   }
 
   public float getMagneticShielding(Atom atom) {

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


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&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