Revision: 18460 http://sourceforge.net/p/jmol/code/18460 Author: hansonr Date: 2013-07-18 17:14:27 +0000 (Thu, 18 Jul 2013) Log Message: ----------- problems with isc_spin tensor checking
Modified Paths: -------------- trunk/Jmol/src/org/jmol/modelset/Measurement.java trunk/Jmol/src/org/jmol/quantum/NMRCalculation.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/modelset/Measurement.java =================================================================== --- trunk/Jmol/src/org/jmol/modelset/Measurement.java 2013-07-18 16:08:53 UTC (rev 18459) +++ trunk/Jmol/src/org/jmol/modelset/Measurement.java 2013-07-18 17:14:27 UTC (rev 18460) @@ -74,6 +74,7 @@ private AxisAngle4f aa; private P3 pointArc; public Text text; + private String type; public Measurement setM(ModelSet modelSet, Measurement m, float value, short colix, String strFormat, int index) { @@ -305,13 +306,16 @@ if (i1 >= 0 && i2 >= 0) { Atom a1 = (Atom) getAtom(1); Atom a2 = (Atom) getAtom(2); + boolean isDC = (!isPercent && nmrType(units) == NMR_DC); + type = (isPercent ? "percent" : isDC ? "dipoleCouplingConstant" + : "J-CouplingConstant"); dist = (isPercent ? dist - / a1.getVanderwaalsRadiusFloat(viewer, EnumVdw.AUTO) - + a2.getVanderwaalsRadiusFloat(viewer, EnumVdw.AUTO) : - nmrType(units) == NMR_DC ? viewer.getNMRCalculation() - .getDipolarConstantHz(a1, a2) : viewer.getNMRCalculation() - .getJCouplingHz(a1, a2, units, null)); - isValid = !Float.isNaN(dist); + / (a1.getVanderwaalsRadiusFloat(viewer, EnumVdw.AUTO) + + a2.getVanderwaalsRadiusFloat(viewer, EnumVdw.AUTO)) + : isDC ? viewer.getNMRCalculation().getDipolarConstantHz(a1, a2) + : viewer.getNMRCalculation().getJCouplingHz(a1, a2, units, + null)); + isValid = !Float.isNaN(dist); if (isPercent) units = "pm"; } @@ -492,7 +496,7 @@ public String getInfoAsString(String units) { float f = fixValue(units, true); SB sb = new SB(); - sb.append(count == 2 ? (units != null && units.indexOf("hz") >= 0 ? "dipolarCouplingConstant" : "distance") : count == 3 ? "angle" : "dihedral"); + sb.append(count == 2 ? (type == null ? "distance" : type) : count == 3 ? "angle" : "dihedral"); sb.append(" \t").appendF(f); sb.append(" \t").append(Escape.eS(strMeasurement)); for (int i = 1; i <= count; i++) Modified: trunk/Jmol/src/org/jmol/quantum/NMRCalculation.java =================================================================== --- trunk/Jmol/src/org/jmol/quantum/NMRCalculation.java 2013-07-18 16:08:53 UTC (rev 18459) +++ trunk/Jmol/src/org/jmol/quantum/NMRCalculation.java 2013-07-18 17:14:27 UTC (rev 18460) @@ -403,10 +403,10 @@ BS bs) { JmolList<Object> data = new JmolList<Object>(); - boolean isJ = tensorType.equals("isc") && infoType.equals(";jcoupling."); - boolean isChi = tensorType.equals("efg") && infoType.equals(";chi."); - if (tensorType.equals("isc")) { - JmolList<Tensor> list = getInteractionTensorList("isc", bs, null); + boolean isJ = tensorType.startsWith("isc") && infoType.equals(";jcoupling."); + boolean isChi = tensorType.startsWith("efg") && infoType.equals(";chi."); + if (tensorType.startsWith("isc")) { + JmolList<Tensor> list = getInteractionTensorList(tensorType, bs, null); int n = (list == null ? 0 : list.size()); for (int i = 0; i < n; i++) { Tensor t = list.get(i); Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2013-07-18 16:08:53 UTC (rev 18459) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2013-07-18 17:14:27 UTC (rev 18460) @@ -910,7 +910,7 @@ for example: write INLINE "testing" "myfile.txt" for example: write INLINE @{load("$caffeine")} "caffeine.mol" new feature: set defaultDropScript for drag-drop and File|Open -new feature: (JmolViewer) public void cacheFile(String fileName, byte[] bytes) +code: (JmolViewer) public void cacheFile(String fileName, byte[] bytes) -- allows a mechanism for applets or embedding apps to deliver file content as bytes -- for applets, first getPropertyAsJavaObject("Viewer") 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