Revision: 20120 http://sourceforge.net/p/jmol/code/20120 Author: hansonr Date: 2014-11-23 22:45:58 +0000 (Sun, 23 Nov 2014) Log Message: ----------- Jmol.___JmolVersion="14.2.9_2014.11.23"
released as Jmol 14.3.9 and Jmol 14.2.9 bug fix: isosurface slab plane -xy not recognizing "-" bug fix: PNGJ writing broken bug fix: VASP CHGCAR reader not recognized for primitive cell bug fix: Euler ZYZ and ZXZ for quaternion({0 0 1},theta) where theta < 0 in error Modified Paths: -------------- branches/v14_2/Jmol/src/org/jmol/io/JmolUtil.java branches/v14_2/Jmol/src/org/jmol/jvxl/data/JvxlCoder.java branches/v14_2/Jmol/src/org/jmol/jvxl/data/JvxlData.java branches/v14_2/Jmol/src/org/jmol/jvxl/data/MeshData.java branches/v14_2/Jmol/src/org/jmol/jvxl/readers/AtomDataReader.java branches/v14_2/Jmol/src/org/jmol/jvxl/readers/CastepDensityReader.java branches/v14_2/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java branches/v14_2/Jmol/src/org/jmol/jvxl/readers/SurfaceReader.java branches/v14_2/Jmol/src/org/jmol/jvxl/readers/VaspChgcarReader.java branches/v14_2/Jmol/src/org/jmol/jvxl/readers/VolumeFileReader.java branches/v14_2/Jmol/src/org/jmol/render/MeshRenderer.java branches/v14_2/Jmol/src/org/jmol/script/ScriptParam.java branches/v14_2/Jmol/src/org/jmol/scriptext/CmdExt.java branches/v14_2/Jmol/src/org/jmol/shape/Mesh.java branches/v14_2/Jmol/src/org/jmol/shapesurface/Isosurface.java branches/v14_2/Jmol/src/org/jmol/shapesurface/IsosurfaceMesh.java branches/v14_2/Jmol/src/org/jmol/util/BoxInfo.java branches/v14_2/Jmol/src/org/jmol/util/MeshSurface.java branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties branches/v14_2/Jmol/src/org/jmol/viewer/OutputManager.java branches/v14_2/Jmol/src/org/jmol/viewer/StatusManager.java Modified: branches/v14_2/Jmol/src/org/jmol/io/JmolUtil.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/io/JmolUtil.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/io/JmolUtil.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -366,8 +366,9 @@ int nAtoms = PT.parseInt(line3); if (nAtoms == Integer.MIN_VALUE) return (line3.indexOf("+") == 0 ? "Jvxl+" : null); - if (line3.indexOf(".") > 0) - return (line3.length() >= 60 || PT.getTokens(line3).length != 3 ? null : "VaspChgcar"); // M40 files are > 60 char + tokens = PT.getTokens(line3); + if (tokens[0].indexOf(".") > 0) + return (line3.length() >= 60 || tokens.length != 3 ? null : "VaspChgcar"); // M40 files are > 60 char if (nAtoms >= 0) return "Cube"; //Can't be a Jvxl file; nAtoms = -nAtoms; Modified: branches/v14_2/Jmol/src/org/jmol/jvxl/data/JvxlCoder.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/jvxl/data/JvxlCoder.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/jvxl/data/JvxlCoder.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -308,6 +308,8 @@ if (!jvxlData.allowVolumeRender) addAttrib(attribs, "\n allowVolumeRender", "false"); if (jvxlData.jvxlPlane == null || vertexDataOnly) { + if (jvxlData.processLattice != null && !vertexDataOnly) + addAttrib(attribs, "\n processLattice", "" + jvxlData.processLattice); if (jvxlData.isContoured) { addAttrib(attribs, "\n contoured", "true"); addAttrib(attribs, "\n colorMapped", "true"); Modified: branches/v14_2/Jmol/src/org/jmol/jvxl/data/JvxlData.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/jvxl/data/JvxlData.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/jvxl/data/JvxlData.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -172,6 +172,7 @@ public boolean allowVolumeRender; public float voxelVolume; public P3 mapLattice; + public P3 processLattice; public String baseColor; public void clear() { @@ -190,6 +191,7 @@ contourColors = null; isSlabbable = false; mapLattice = null; + processLattice = null; meshColor = null; nPointsX = 0; nVertexColors = 0; Modified: branches/v14_2/Jmol/src/org/jmol/jvxl/data/MeshData.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/jvxl/data/MeshData.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/jvxl/data/MeshData.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -364,5 +364,6 @@ vvs[i] = Float.NaN; } + } Modified: branches/v14_2/Jmol/src/org/jmol/jvxl/readers/AtomDataReader.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/jvxl/readers/AtomDataReader.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/jvxl/readers/AtomDataReader.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -104,12 +104,12 @@ bsMyIgnored = params.bsIgnore; if (params.volumeData != null) { setVolumeDataV(params.volumeData); - setBBox(volumeData.volumetricOrigin, 0); + setBBox(volumeData.volumetricOrigin); ptV.setT(volumeData.volumetricOrigin); for (int i = 0; i < 3; i++) ptV.scaleAdd2(volumeData.voxelCounts[i] - 1, volumeData.volumetricVectors[i], ptV); - setBBox(ptV, 0); + setBBox(ptV); } havePlane = (params.thePlane != null); if (havePlane) @@ -265,11 +265,11 @@ Logger.info(myAtomCount + " atoms will be used in the surface calculation"); if (myAtomCount == 0) { - setBBox(P3.new3(10, 10, 10), 0); - setBBox(P3.new3(-10, -10, -10), 0); + setBBox(P3.new3(10, 10, 10)); + setBBox(P3.new3(-10, -10, -10)); } for (int i = 0; i < myAtomCount; i++) - setBBox(atomXyz[i], getRadii ? atomRadius[i] + 0.5f : 0); + setBBox(atomXyz[i]); if (!Float.isNaN(params.scale)) { V3 v = V3.newVsub(xyzMax, xyzMin); v.scale(0.5f); Modified: branches/v14_2/Jmol/src/org/jmol/jvxl/readers/CastepDensityReader.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/jvxl/readers/CastepDensityReader.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/jvxl/readers/CastepDensityReader.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -95,6 +95,7 @@ @Override protected void getPeriodicVoxels() throws Exception { + // no downsampling (yet), because CASTEP writes x, y, z info. for (int i = 0; i < nFilePoints; i++) { int x = parseIntStr(line) - 1; int y = parseInt() - 1; Modified: branches/v14_2/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -236,6 +236,7 @@ params.nContours = (haveContourData ? nContourData : nContoursRead); //TODO ? params.contourFromZero = false; // MEP data to complete the plane } + jvxlData.nVertexColors = parseIntStr(XmlReader.getXmlAttrib(data, "nVertexColors")); params.isBicolorMap = XmlReader.getXmlAttrib(data, "bicolorMap").equals("true"); if (params.isBicolorMap) { @@ -296,6 +297,10 @@ params.thePlane = null; surfaceDataCount = parseIntStr(XmlReader.getXmlAttrib(data, "nSurfaceInts")); edgeDataCount = parseIntStr(XmlReader.getXmlAttrib(data, "nBytesUncompressedEdgeData")); + s = XmlReader.getXmlAttrib(data, "processLattice"); + if (s.indexOf("{") >= 0) + jvxlData.processLattice = (P3) Escape.uP(s); + } excludedVertexCount = parseIntStr(XmlReader.getXmlAttrib(data, "nExcludedVertexes")); excludedTriangleCount = parseIntStr(XmlReader.getXmlAttrib(data, "nExcludedTriangles")); Modified: branches/v14_2/Jmol/src/org/jmol/jvxl/readers/SurfaceReader.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/jvxl/readers/SurfaceReader.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/jvxl/readers/SurfaceReader.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -212,6 +212,7 @@ protected boolean isXLowToHigh = false; //can be overridden in some readers by --progressive private float assocCutoff = 0.3f; protected boolean isQuiet; + protected boolean isPeriodic; boolean vertexDataOnly; boolean hasColorData; @@ -1088,20 +1089,17 @@ private void setBBoxAll() { if (meshDataServer != null) meshDataServer.fillMeshData(meshData, MeshData.MODE_GET_VERTICES, null); - xyzMin = null; - for (int i = 0; i < meshData.vc; i++) { - T3 p = meshData.vs[i]; - if (!Float.isNaN(p.x)) - setBBox(p, 0); - } + xyzMin = new P3(); + xyzMax = new P3(); + meshData.setBox(xyzMin, xyzMax); } - protected void setBBox(T3 pt, float margin) { + protected void setBBox(T3 pt) { if (xyzMin == null) { xyzMin = P3.new3(Float.MAX_VALUE, Float.MAX_VALUE, Float.MAX_VALUE); xyzMax = P3.new3(-Float.MAX_VALUE, -Float.MAX_VALUE, -Float.MAX_VALUE); } - BoxInfo.addPoint(pt, xyzMin, xyzMax, margin); + BoxInfo.addPoint(pt, xyzMin, xyzMax, 0); } /** Modified: branches/v14_2/Jmol/src/org/jmol/jvxl/readers/VaspChgcarReader.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/jvxl/readers/VaspChgcarReader.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/jvxl/readers/VaspChgcarReader.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -40,8 +40,9 @@ void init2(SurfaceGenerator sg, BufferedReader br) { init2VFR(sg, br); isAngstroms = true; + isPeriodic = true; + isProgressive = false; // for now nSurfaces = 1; - canDownsample = isProgressive = false; // for now } // pt @@ -71,7 +72,7 @@ @Override protected void readParameters() throws Exception { jvxlFileHeaderBuffer = new SB(); - jvxlFileHeaderBuffer.append("Vasp CHGCAR format\n"); + jvxlFileHeaderBuffer.append("Vasp CHGCAR format\n\n\n"); rd(); // atoms float scale = parseFloatStr(rd()); float[] data = new float[15]; @@ -108,15 +109,30 @@ @Override protected void getPeriodicVoxels() throws Exception { + // we are not reading the final periodic values int ni = voxelCounts[0] - 1; int nj = voxelCounts[1] - 1; int nk = voxelCounts[2] - 1; - for (int i = 0; i < ni; i++) - for (int j = 0; j < nj; j++) - for (int k = 0; k < nk; k++) + boolean downSampling = (nSkipX > 0); + for (int i = 0; i < ni; i++) { + for (int j = 0; j < nj; j++) { + for (int k = 0; k < nk; k++) { voxelData[i][j][k] = recordData(nextVoxel()); + if (downSampling) + for (int m = nSkipX; --m >= 0;) + nextVoxel(); + } + if (downSampling) + for (int m = nSkipY; --m >= 0;) + nextVoxel(); + } + if (downSampling) + for (int m = nSkipZ; --m >= 0;) + nextVoxel(); + } } + @Override protected void readSkip() throws Exception { // n/a Modified: branches/v14_2/Jmol/src/org/jmol/jvxl/readers/VolumeFileReader.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/jvxl/readers/VolumeFileReader.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/jvxl/readers/VolumeFileReader.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -49,7 +49,7 @@ protected int nSurfaces; protected boolean isAngstroms; protected boolean canDownsample; - private int[] downsampleRemainders; + protected int[] downsampleRemainders; private boolean preProcessPlanes; private int nData; private boolean readerClosed; @@ -145,6 +145,10 @@ int n = voxelCounts[i]; downsampleRemainders[i] = n % downsampleFactor; voxelCounts[i] /= downsampleFactor; + if (isPeriodic) { + voxelCounts[i]++; + downsampleRemainders[i]--; + } volumetricVectors[i].scale(downsampleFactor); Logger.info("downsampling axis " + (i + 1) + " from " + n + " to " + voxelCounts[i]); @@ -191,7 +195,7 @@ } protected int downsampleFactor; - private int nSkipX, nSkipY, nSkipZ; + protected int nSkipX, nSkipY, nSkipZ; void initializeSurfaceData() { downsampleFactor = params.downsampleFactor; @@ -201,9 +205,9 @@ if (canDownsample && downsampleFactor > 0) { nSkipX = downsampleFactor - 1; nSkipY = downsampleRemainders[2] + (downsampleFactor - 1) - * (nSkipZ = (nPointsZ * downsampleFactor + downsampleRemainders[2])); + * (nSkipZ = ((nPointsZ - (isPeriodic ? 1 : 0)) * downsampleFactor + downsampleRemainders[2])); nSkipZ = downsampleRemainders[1] * nSkipZ + (downsampleFactor - 1) - * nSkipZ * (nPointsY * downsampleFactor + downsampleRemainders[1]); + * nSkipZ * ((nPointsY - (isPeriodic ? 1 : 0)) * downsampleFactor + downsampleRemainders[1]); } if (params.thePlane != null) { Modified: branches/v14_2/Jmol/src/org/jmol/render/MeshRenderer.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/render/MeshRenderer.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/render/MeshRenderer.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -97,54 +97,51 @@ if (!doRender) return mesh.title != null; latticeOffset.set(0, 0, 0); - if (mesh.lattice == null && mesh.symops == null || mesh.modelIndex < 0) { + if (mesh.modelIndex < 0 + || mesh.lattice == null && mesh.symops == null) { for (int i = vertexCount; --i >= 0;) if (vertices[i] != null) tm.transformPtScr(vertices[i], screens[i]); render2(isExport); } else { P3 vTemp = new P3(); - SymmetryInterface unitcell; - if ((unitcell = mesh.unitCell) == null - && (unitcell = vwr.ms.am[mesh.modelIndex].biosymmetry) == null - && (unitcell = vwr.getModelUnitCell(mesh.modelIndex)) == null) - unitcell = mesh.getUnitCell(vwr); - if (mesh.symops != null) { - if (mesh.symopNormixes == null) - mesh.symopNormixes = AU.newShort2(mesh.symops.length); - P3[] verticesTemp = null; - int max = mesh.symops.length; - short c = mesh.colix; - for (int j = max; --j >= 0;) { - M4 m = mesh.symops[j]; - if (m == null) - continue; - if (mesh.colorType == T.symop) - mesh.colix = mesh.symopColixes[j]; - short[] normals = mesh.symopNormixes[j]; - boolean needNormals = (normals == null); - verticesTemp = (needNormals ? new P3[vertexCount] : null); - for (int i = vertexCount; --i >= 0;) { - vTemp.setT(vertices[i]); - unitcell.toFractional(vTemp, true); - m.rotTrans(vTemp); - unitcell.toCartesian(vTemp, true); - tm.transformPtScr(vTemp, screens[i]); - if (needNormals) { - verticesTemp[i] = vTemp; - vTemp = new P3(); + SymmetryInterface unitcell = mesh.getUnitCell(vwr); + if (unitcell != null) { + if (mesh.symops != null) { + if (mesh.symopNormixes == null) + mesh.symopNormixes = AU.newShort2(mesh.symops.length); + P3[] verticesTemp = null; + int max = mesh.symops.length; + short c = mesh.colix; + for (int j = max; --j >= 0;) { + M4 m = mesh.symops[j]; + if (m == null) + continue; + if (mesh.colorType == T.symop) + mesh.colix = mesh.symopColixes[j]; + short[] normals = mesh.symopNormixes[j]; + boolean needNormals = (normals == null); + verticesTemp = (needNormals ? new P3[vertexCount] : null); + for (int i = vertexCount; --i >= 0;) { + vTemp.setT(vertices[i]); + unitcell.toFractional(vTemp, true); + m.rotTrans(vTemp); + unitcell.toCartesian(vTemp, true); + tm.transformPtScr(vTemp, screens[i]); + if (needNormals) { + verticesTemp[i] = vTemp; + vTemp = new P3(); + } } + if (needNormals) + normixes = mesh.symopNormixes[j] = mesh.setNormixes(mesh + .getNormals(verticesTemp, null)); + else + normixes = mesh.normixes = mesh.symopNormixes[j]; + render2(isExport); } - if (needNormals) - normixes = mesh.symopNormixes[j] = mesh.setNormixes(mesh.getNormals( - verticesTemp, null)); - else - normixes = mesh.normixes = mesh.symopNormixes[j]; - render2(isExport); - } - mesh.colix = c; - } else { - if (unitcell != null) { + mesh.colix = c; + } else { P3i minXYZ = new P3i(); P3i maxXYZ = P3i.new3((int) mesh.lattice.x, (int) mesh.lattice.y, (int) mesh.lattice.z); Modified: branches/v14_2/Jmol/src/org/jmol/script/ScriptParam.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/script/ScriptParam.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/script/ScriptParam.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -288,12 +288,11 @@ case T.string: String str = paramAsStr(i); if (str.equalsIgnoreCase("xy")) - return P4.new4(0, 0, 1, 0); - if (str.equalsIgnoreCase("xz")) - return P4.new4(0, 1, 0, 0); - if (str.equalsIgnoreCase("yz")) - return P4.new4(1, 0, 0, 0); - iToken += 2; + plane = P4.new4(0, 0, isNegated ? -1 : 1, 0); + else if (str.equalsIgnoreCase("xz")) + plane = P4.new4(0, isNegated ? -1 : 1, 0, 0); + else if (str.equalsIgnoreCase("yz")) + plane = P4.new4(isNegated ? -1 : 1, 0, 0, 0); break; case T.leftbrace: case T.point3f: Modified: branches/v14_2/Jmol/src/org/jmol/scriptext/CmdExt.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/scriptext/CmdExt.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/scriptext/CmdExt.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -2876,6 +2876,7 @@ P3 pt; P4 plane = null; P3 lattice = null; + boolean processLattice = false; P3[] pts; int color = 0; String str = null; @@ -4276,6 +4277,11 @@ propertyValue = pt; } else { lattice = pt; + if (tokAt(i + 1) == T.on) { + sbCommand.append(" true"); + processLattice = true; + i++; + } } break; default: @@ -4385,8 +4391,11 @@ sbCommand.append(" mesh nofill frontOnly"); } } - if (lattice != null) // before MAP, this is a display option + if (lattice != null) { // before MAP, this is a display option setShapeProperty(iShape, "lattice", lattice); + if (processLattice) + setShapeProperty(iShape, "processLattice", Boolean.TRUE); + } if (symops != null) // before MAP, this is a display option setShapeProperty(iShape, "symops", symops); if (isFrontOnly) Modified: branches/v14_2/Jmol/src/org/jmol/shape/Mesh.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/shape/Mesh.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/shape/Mesh.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -270,7 +270,7 @@ public boolean recalcAltVertices; public short[] symopColixes; - + protected void sumVertexNormals(T3[] vertices, V3[] normals) { sumVertexNormals2(vertices, normals); } @@ -515,7 +515,7 @@ * @return unitcell */ public SymmetryInterface getUnitCell(Viewer vwr) { - // isosurface only + // isosurfaceMesh only return null; } Modified: branches/v14_2/Jmol/src/org/jmol/shapesurface/Isosurface.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/shapesurface/Isosurface.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/shapesurface/Isosurface.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -487,6 +487,12 @@ return; } + if ("processLattice" == propertyName) { + if (thisMesh != null) + thisMesh.processLattice(vwr); + return; + } + // Isosurface / SurfaceGenerator both interested if ("slab" == propertyName) { @@ -1409,9 +1415,16 @@ thisMesh.calculatedVolume = null; // from JVXL file: Parameters params = sg.getParams(); - if (!thisMesh.isMerged) + if (!thisMesh.isMerged) { thisMesh.initialize(sg.isFullyLit() ? T.fullylit : T.frontlit, null, sg.getPlane()); + if (jvxlData.processLattice != null) { + thisMesh.lattice = jvxlData.processLattice; + thisMesh.processLattice(vwr); + } + return; + + } if (!params.allowVolumeRender) thisMesh.jvxlData.allowVolumeRender = false; thisMesh.setColorsFromJvxlData(sg.getParams().colorRgb); Modified: branches/v14_2/Jmol/src/org/jmol/shapesurface/IsosurfaceMesh.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/shapesurface/IsosurfaceMesh.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/shapesurface/IsosurfaceMesh.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -46,6 +46,7 @@ import javajs.util.M4; import javajs.util.Measure; import javajs.util.P3; +import javajs.util.P3i; import javajs.util.P4; import javajs.util.PT; import javajs.util.T3; @@ -913,10 +914,63 @@ @Override public SymmetryInterface getUnitCell(Viewer vwr) { - return (spanningVectors == null ? null : - Interface.getSymmetry(vwr, "symmetry").getUnitCell(spanningVectors, true, null)); + return (unitCell != null + || (unitCell = vwr.ms.am[modelIndex].biosymmetry) != null + || (unitCell = vwr.getModelUnitCell(modelIndex)) != null + || spanningVectors != null + && (unitCell = Interface.getSymmetry(vwr, "symmetry").getUnitCell( + spanningVectors, true, null)) != null ? unitCell : null); } + void processLattice(Viewer vwr) { + if (getUnitCell(vwr) == null) + return; + P3i minXYZ = new P3i(); + P3i maxXYZ = P3i.new3((int) lattice.x, (int) lattice.y, (int) lattice.z); + jvxlData.processLattice = lattice; + lattice = null; + unitCell.setMinMaxLatticeParameters(minXYZ, maxXYZ); + int nCells = (maxXYZ.x - minXYZ.x) * (maxXYZ.y - minXYZ.y) + * (maxXYZ.z - minXYZ.z); + P3 latticeOffset = new P3(); + int vc0 = vc; + int vcNew = nCells * vc; + vs = AU.arrayCopyPt(vs, vcNew); + vvs = (vvs == null ? null : AU.ensureLengthA(vvs, vcNew)); + int pc0 = pc; + int pcNew = nCells * pc; + pis = AU.arrayCopyII(pis, pcNew); + int off = 0; + normixes = AU.arrayCopyShort(normixes, vcNew); + for (int tx = minXYZ.x; tx < maxXYZ.x; tx++) + for (int ty = minXYZ.y; ty < maxXYZ.y; ty++) + for (int tz = minXYZ.z; tz < maxXYZ.z; tz++) { + if (tx == 0 && ty == 0 && tz == 0) + continue; + latticeOffset.set(tx, ty, tz); + unitCell.toCartesian(latticeOffset, false); + for (int i = 0; i < vc0; i++) { + normixes[vc] = normixes[i]; + P3 v = P3.newP(vs[i]); + v.add(latticeOffset); + addVCVal(v, vvs[i], false); + } + off += vc0; + for (int i = 0; i < pc0; i++) { + int[] p = AU.arrayCopyI(pis[i], -1); + p[0] += off; + p[1] += off; + p[2] += off; + addPolygonC(p, 0, null); + } + } + P3 xyzMin = new P3(); + P3 xyzMax = new P3(); + setBox(xyzMin, xyzMax); + jvxlData.boundingBox = new P3[] { xyzMin, xyzMax }; + + } + /** * "slabs" an isosurface into the first Brillouin zone moving points as * necessary. Modified: branches/v14_2/Jmol/src/org/jmol/util/BoxInfo.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/util/BoxInfo.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/util/BoxInfo.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -281,7 +281,7 @@ addPoint(pt, bbCorner0, bbCorner1, margin); } - public static void addPoint(T3 pt, P3 xyzMin, P3 xyzMax, float margin) { + public static void addPoint(T3 pt, T3 xyzMin, T3 xyzMax, float margin) { if (pt.x - margin < xyzMin.x) xyzMin.x = pt.x - margin; if (pt.x + margin > xyzMax.x) Modified: branches/v14_2/Jmol/src/org/jmol/util/MeshSurface.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/util/MeshSurface.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/util/MeshSurface.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -519,7 +519,6 @@ vertexSets[vc] = set; } int i = addVCVal(vertex, value, true); - //int i = addVertexCopy(vertex, value, -4, true); mapEdge.put(key, Integer.valueOf(i)); return i; } @@ -1090,4 +1089,14 @@ return newMesh(true, vectors, 0, faces, vectors, 0); } + public void setBox(P3 xyzMin, P3 xyzMax) { + xyzMin.set(Float.MAX_VALUE, Float.MAX_VALUE, Float.MAX_VALUE); + xyzMax.set(-Float.MAX_VALUE, -Float.MAX_VALUE, -Float.MAX_VALUE); + for (int i = 0; i < vc; i++) { + T3 p = vs[i]; + if (!Float.isNaN(p.x)) + BoxInfo.addPoint(p, xyzMin, xyzMax, 0); + } + } + } Modified: branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties 2014-11-23 22:45:58 UTC (rev 20120) @@ -1,12 +1,14 @@ Jmol.___JmolDate="$Date$" Jmol.___fullJmolProperties="src/org/jmol/viewer/Jmol.properties" - # THIS IS THE RELEASE BRANCH # BUG FIXES ONLY, PLEASE -Jmol.___JmolVersion="14.2.9_2014.11.21" +Jmol.___JmolVersion="14.2.9_2014.11.23" +released as Jmol 14.3.9 and Jmol 14.2.9 + +bug fix: isosurface slab plane -xy not recognizing "-" bug fix: PNGJ writing broken bug fix: VASP CHGCAR reader not recognized for primitive cell bug fix: Euler ZYZ and ZXZ for quaternion({0 0 1},theta) where theta < 0 in error @@ -168,7 +170,6 @@ bug fix: Legendre for D,U in Jana2006 reader not implemented - preliminary JmolVersion="14.3.7_2014.10.13" -released as Jmol 14.3.7 new feature: modulation occupancy settable using {*}.occupancy = {*}.modulation('O',t) -- for example: Modified: branches/v14_2/Jmol/src/org/jmol/viewer/OutputManager.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/viewer/OutputManager.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/viewer/OutputManager.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -107,7 +107,7 @@ /** * * Creates an image of params.type form -- PNG, PNGJ, PNGT, JPG, JPG64, PDF, - * PPM, GIF, GIFT + * PPM, GIF, GIFT. * * From createImage and getImageAsBytes * Modified: branches/v14_2/Jmol/src/org/jmol/viewer/StatusManager.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/viewer/StatusManager.java 2014-11-23 22:35:24 UTC (rev 20119) +++ branches/v14_2/Jmol/src/org/jmol/viewer/StatusManager.java 2014-11-23 22:45:58 UTC (rev 20120) @@ -275,6 +275,7 @@ String callbackFunction) { // menu and language setting also use this route CBK callback = CBK.getCallback(callbackType); + System.out.println("callback set for " + callbackType + " " + callbackFunction + " " + callback); if (callback != null) { int pt = (callbackFunction == null ? 0 : callbackFunction.length() > 7 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits