From: <ha...@us...> - 2013-04-13 13:18:18
|
Revision: 18106 http://sourceforge.net/p/jmol/code/18106 Author: hansonr Date: 2013-04-13 13:18:15 +0000 (Sat, 13 Apr 2013) Log Message: ----------- ___JmolVersion="13.1.15_dev_2013.04.13a" TODO: PyMOL movies, electron density, CGO code: PyMOL FOV fix Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLReader.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLReader.java 2013-04-12 18:09:53 UTC (rev 18105) +++ trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLReader.java 2013-04-13 13:18:15 UTC (rev 18106) @@ -1394,15 +1394,19 @@ sb.append("center ").append(Escape.eP(ptCenter)).append(";"); float fov = getFloatSetting(PyMOL.field_of_view); + float pymolDistanceToCenter = -getFloatAt(view, 18); - float jmolCameraToCenter = (float) (0.5 / Math.tan(fov / 2 * Math.PI / 180)); // d - float pymolCameraToCenter = -getFloatAt(view, 18) / w; + float tan = (float) Math.tan(fov / 2 * Math.PI / 180); + float jmolCameraToCenter = (0.5f / tan); // d + float pymolCameraToCenter = pymolDistanceToCenter / w; float jmolCameraDepth = (jmolCameraToCenter - 0.5f); - float zoom = jmolCameraToCenter / pymolCameraToCenter * 100; float aspectRatio = viewer.getScreenWidth() * 1.0f / viewer.getScreenHeight(); + float zoom = jmolCameraToCenter / pymolCameraToCenter * 100; if (aspectRatio < 1) - zoom /= aspectRatio; + zoom /= aspectRatio * aspectRatio; + else + zoom *= 1;///= aspectRatio; // was necessary for Fig8 float pymolCameraToSlab = getFloatAt(view, 22) / w; float pymolCameratToDepth = getFloatAt(view, 23) / w; @@ -1413,7 +1417,7 @@ .append("set perspectiveDepth " + (!getBooleanSetting(PyMOL.ortho)) + ";"); - sb.append("set cameraDepth " + jmolCameraDepth + ";"); + sb.append("set cameraDepth " + jmolCameraDepth + "; set rotationRadius " + (w / 2) + ";"); sb.append("zoom " + zoom + "; slab on; slab " + slab + "; depth " + depth + ";"); Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2013-04-12 18:09:53 UTC (rev 18105) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2013-04-13 13:18:15 UTC (rev 18106) @@ -9,10 +9,12 @@ # The quotes above look odd for a parameter file, but they are # important for the JavaScript version of Jmol. -___JmolVersion="13.1.15_dev_2013.04.12c" +___JmolVersion="13.1.15_dev_2013.04.13a" TODO: PyMOL movies, electron density, CGO +code: PyMOL FOV fix + bug fix: MSMS reader broken code: PyMOL unique_settings for atoms and bonds; sphere translucency fix This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |