From: <ha...@us...> - 2008-05-06 14:31:27
|
Revision: 9362 http://jmol.svn.sourceforge.net/jmol/?rev=9362&view=rev Author: hansonr Date: 2008-05-06 07:31:17 -0700 (Tue, 06 May 2008) Log Message: ----------- 11.5.35 VERSION # bug fix: proper thermal ellipsoid probability measures # code: better garbage collection in relation to JmolAdapter class # bug fix: load FILTER not saved in state # bug fix: application -- undo/redo buttons not disabling # new feature: ZAP clears undo stack Modified Paths: -------------- trunk/Jmol/src/org/jmol/shapespecial/Ellipsoids.java trunk/Jmol/src/org/jmol/shapespecial/EllipsoidsRenderer.java trunk/Jmol/src/org/jmol/symmetry/UnitCell.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/shapespecial/Ellipsoids.java =================================================================== --- trunk/Jmol/src/org/jmol/shapespecial/Ellipsoids.java 2008-05-04 20:52:31 UTC (rev 9361) +++ trunk/Jmol/src/org/jmol/shapespecial/Ellipsoids.java 2008-05-06 14:31:17 UTC (rev 9362) @@ -236,7 +236,7 @@ public void setVisibilityFlags(BitSet bs) { /* * set all fixed objects visible; others based on model being displayed - * + * */ Enumeration e = htEllipsoids.elements(); while (e.hasMoreElements()) { @@ -244,5 +244,28 @@ ellipsoid.visible = ellipsoid.isOn && (ellipsoid.modelIndex < 0 || bs.get(ellipsoid.modelIndex)); } } + + // from ORTEP manual ftp://ftp.ornl.gov/pub/ortep/man/pdf/chap6.pdf + + private static float[] crtval = new float[] { + 0.3389f, 0.4299f, 0.4951f, 0.5479f, 0.5932f, 0.6334f, 0.6699f, 0.7035f, + 0.7349f, 0.7644f, 0.7924f, 0.8192f, 0.8447f, 0.8694f, 0.8932f, 0.9162f, + 0.9386f, 0.9605f, 0.9818f, 1.0026f, 1.0230f, 1.0430f, 1.0627f, 1.0821f, + 1.1012f, 1.1200f, 1.1386f, 1.1570f, 1.1751f, 1.1932f, 1.2110f, 1.2288f, + 1.2464f, 1.2638f, 1.2812f, 1.2985f, 1.3158f, 1.3330f, 1.3501f, 1.3672f, + 1.3842f, 1.4013f, 1.4183f, 1.4354f, 1.4524f, 1.4695f, 1.4866f, 1.5037f, + 1.5209f, 1.5382f, 1.5555f, 1.5729f, 1.5904f, 1.6080f, 1.6257f, 1.6436f, + 1.6616f, 1.6797f, 1.6980f, 1.7164f, 1.7351f, 1.7540f, 1.7730f, 1.7924f, + 1.8119f, 1.8318f, 1.8519f, 1.8724f, 1.8932f, 1.9144f, 1.9360f, 1.9580f, + 1.9804f, 2.0034f, 2.0269f, 2.0510f, 2.0757f, 2.1012f, 2.1274f, 2.1544f, + 2.1824f, 2.2114f, 2.2416f, 2.2730f, 2.3059f, 2.3404f, 2.3767f, 2.4153f, + 2.4563f, 2.5003f, 2.5478f, 2.5997f, 2.6571f, 2.7216f, 2.7955f, 2.8829f, + 2.9912f, 3.1365f, 3.3682f + }; + + final static float getRadius(int prob) { + return crtval[prob < 1 ? 0 : prob > 99 ? 98 : prob - 1]; + } + } Modified: trunk/Jmol/src/org/jmol/shapespecial/EllipsoidsRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/shapespecial/EllipsoidsRenderer.java 2008-05-04 20:52:31 UTC (rev 9361) +++ trunk/Jmol/src/org/jmol/shapespecial/EllipsoidsRenderer.java 2008-05-06 14:31:17 UTC (rev 9362) @@ -144,7 +144,7 @@ colix = Shape.getColix(ellipsoids.colixes, i, atom); if (!g3d.setColix(colix)) continue; - render1(atom, ellipsoids.mads[i] / 100f, ellipsoid); + render1(atom, ellipsoids.mads[i], ellipsoid); } if (ellipsoids.haveEllipsoids) { @@ -187,10 +187,12 @@ int maxX, dx; float perspectiveFactor; - private void render1(Atom atom, float factor, Object[] ellipsoid) { + private void render1(Atom atom, int probPercent, Object[] ellipsoid) { s0.set(atom.screenX, atom.screenY, atom.screenZ); axes = (Vector3f[]) ellipsoid[0]; float[] af = (float[]) ellipsoid[1]; + //float factor = Ellipsoids.getRadius((int)(probPercent * probPercent / 100f)) / Ellipsoids.getRadius(50) / 2f; + float factor = Ellipsoids.getRadius(probPercent); for (int i = 3; --i >= 0;) lengths[i] = af[i] * factor; setMatrices(); Modified: trunk/Jmol/src/org/jmol/symmetry/UnitCell.java =================================================================== --- trunk/Jmol/src/org/jmol/symmetry/UnitCell.java 2008-05-04 20:52:31 UTC (rev 9361) +++ trunk/Jmol/src/org/jmol/symmetry/UnitCell.java 2008-05-06 14:31:17 UTC (rev 9362) @@ -248,7 +248,7 @@ // note -- this is the ellipsoid in INVERSE CARTESIAN SPACE! - double factor = Math.sqrt(8) / Math.PI; + double factor = Math.sqrt(0.5) / Math.PI; for (int i = 0; i < 3; i++) lengths[i] = (float) (factor / lengths[i]); return new Object[] {unitVectors, lengths}; Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2008-05-04 20:52:31 UTC (rev 9361) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2008-05-06 14:31:17 UTC (rev 9362) @@ -1,8 +1,9 @@ # Developers: to add a description of changes you have made, # add it on line starting with # below the "version=..." line -version=11.5.35_dev +version=11.5.35 +# bug fix: proper thermal ellipsoid probability measures # code: better garbage collection in relation to JmolAdapter class # bug fix: load FILTER not saved in state # bug fix: application -- undo/redo buttons not disabling This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |