From: <ha...@us...> - 2013-07-04 21:54:43
|
Revision: 18429 http://sourceforge.net/p/jmol/code/18429 Author: hansonr Date: 2013-07-04 21:54:37 +0000 (Thu, 04 Jul 2013) Log Message: ----------- 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-04 21:21:15 UTC (rev 18428) +++ trunk/Jmol/src/org/jmol/quantum/NMRCalculation.java 2013-07-04 21:54:37 UTC (rev 18429) @@ -295,7 +295,6 @@ Map<String, Object> map = new Hashtable<String, Object>(); map.put("isotopes", isotopeData); map.put("shiftRefsHz", shiftRefsHz); - map.put("specFreqMHz", specFreqMHz); return map; } if (Character.isDigit(what.charAt(0))) @@ -314,10 +313,7 @@ if (!Float.isNaN(v)) { String sym = atom.getElementSymbol(); Float ref = shiftRefsHz.get(sym); - Float freq = specFreqMHz.get(sym); v = (ref == null ? 0 : ref.floatValue()) - v; - if (freq != null) - v /= freq.floatValue(); } return v; } @@ -327,26 +323,11 @@ return (t == null ? Float.NaN : t.eigenValues[2]); } - private Map<String, Float> specFreqMHz = new Hashtable<String, Float>(); private Map<String, Float> shiftRefsHz = new Hashtable<String, Float>(); public boolean setChemicalShiftReference(String element, float value) { - float freq = 0; - int pt = element.indexOf("_ppm_"); - if (pt >= 0) { - try { - freq = Float.parseFloat(element.substring(pt + 5)); - value *= freq; - element = element.substring(0, pt); - } catch (Exception e) { - Logger.error("Invalid frequency nnn: shift_ppm_nnn: " + element); - return false; - } - } element = element.substring(0, 1).toUpperCase() + element.substring(1); shiftRefsHz.put(element, Float.valueOf(value)); - if (freq >= 0) - specFreqMHz.put(element, Float.valueOf(freq)); return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |