From: <ha...@us...> - 2011-11-16 23:00:53
|
Revision: 16476 http://jmol.svn.sourceforge.net/jmol/?rev=16476&view=rev Author: hansonr Date: 2011-11-16 23:00:45 +0000 (Wed, 16 Nov 2011) Log Message: ----------- version=12.2.6_dev # bug fix: contact color density broken # bug fix: contact volume report not correct for color density Modified Paths: -------------- branches/v12_2/Jmol/src/org/jmol/jvxl/data/JvxlData.java branches/v12_2/Jmol/src/org/jmol/jvxl/data/VolumeData.java branches/v12_2/Jmol/src/org/jmol/jvxl/readers/SurfaceReader.java branches/v12_2/Jmol/src/org/jmol/script/ScriptEvaluator.java branches/v12_2/Jmol/src/org/jmol/shapesurface/Contact.java branches/v12_2/Jmol/src/org/jmol/shapesurface/Isosurface.java branches/v12_2/Jmol/src/org/jmol/viewer/Jmol.properties Modified: branches/v12_2/Jmol/src/org/jmol/jvxl/data/JvxlData.java =================================================================== --- branches/v12_2/Jmol/src/org/jmol/jvxl/data/JvxlData.java 2011-11-15 15:24:49 UTC (rev 16475) +++ branches/v12_2/Jmol/src/org/jmol/jvxl/data/JvxlData.java 2011-11-16 23:00:45 UTC (rev 16476) @@ -162,6 +162,7 @@ public int diameter; public String slabInfo; public boolean allowVolumeRender; + public float voxelVolume; public void clear() { allowVolumeRender = true; @@ -186,6 +187,7 @@ translucency = 0; vContours = null; vertexColorMap = null; + voxelVolume = 0; } public void setSurfaceInfo(Point4f thePlane, int nSurfaceInts, String surfaceData) { Modified: branches/v12_2/Jmol/src/org/jmol/jvxl/data/VolumeData.java =================================================================== --- branches/v12_2/Jmol/src/org/jmol/jvxl/data/VolumeData.java 2011-11-15 15:24:49 UTC (rev 16475) +++ branches/v12_2/Jmol/src/org/jmol/jvxl/data/VolumeData.java 2011-11-16 23:00:45 UTC (rev 16476) @@ -201,6 +201,7 @@ public float minGrid; public float maxGrid; + public float voxelVolume; public int getYzCount() { @@ -322,12 +323,14 @@ public boolean setUnitVectors() { maxVectorLength = 0; + voxelVolume = 1; for (int i = 0; i < 3; i++) { float d = volumetricVectorLengths[i] = volumetricVectors[i].length(); if (d == 0) return false; if (d > maxVectorLength) maxVectorLength = d; + voxelVolume *= d; unitVolumetricVectors[i].normalize(volumetricVectors[i]); } minToPlaneDistance = maxVectorLength * 2; Modified: branches/v12_2/Jmol/src/org/jmol/jvxl/readers/SurfaceReader.java =================================================================== --- branches/v12_2/Jmol/src/org/jmol/jvxl/readers/SurfaceReader.java 2011-11-15 15:24:49 UTC (rev 16475) +++ branches/v12_2/Jmol/src/org/jmol/jvxl/readers/SurfaceReader.java 2011-11-16 23:00:45 UTC (rev 16476) @@ -355,6 +355,7 @@ jvxlData.nPointsY = nPointsY; jvxlData.nPointsZ = nPointsZ; jvxlData.jvxlVolumeDataXml = volumeData.xmlData; + jvxlData.voxelVolume = volumeData.voxelVolume; if (justForPlane) { //float[][][] voxelDataTemp = volumeData.voxelData; volumeData.setMappingPlane(params.thePlane); Modified: branches/v12_2/Jmol/src/org/jmol/script/ScriptEvaluator.java =================================================================== --- branches/v12_2/Jmol/src/org/jmol/script/ScriptEvaluator.java 2011-11-15 15:24:49 UTC (rev 16475) +++ branches/v12_2/Jmol/src/org/jmol/script/ScriptEvaluator.java 2011-11-16 23:00:45 UTC (rev 16476) @@ -15573,7 +15573,7 @@ volume = Float.valueOf((float) v); } int nsets = ((Integer) getShapeProperty(JmolConstants.SHAPE_CONTACT, "nSets")).intValue(); - if (displayType == Token.trim) { + if (!colorDensity && displayType == Token.trim) { showString(nsets + " contacts"); } else { showString((nsets == 0 ? "" : nsets + " contacts with ") + "net volume " + volume + " A^3"); Modified: branches/v12_2/Jmol/src/org/jmol/shapesurface/Contact.java =================================================================== --- branches/v12_2/Jmol/src/org/jmol/shapesurface/Contact.java 2011-11-15 15:24:49 UTC (rev 16475) +++ branches/v12_2/Jmol/src/org/jmol/shapesurface/Contact.java 2011-11-16 23:00:45 UTC (rev 16476) @@ -187,7 +187,7 @@ colorByType = false; if (rd == null) rd = rdVDW; - newSurface(Token.trim, null, bsA, bsB, rd, null, null, false, null); + newSurface(Token.trim, null, bsA, bsB, rd, null, null, colorDensity, null); if (displayType == Token.full) { sg.initState(); newSurface(Token.trim, null, bsB, bsA, rd, parameters, func, Modified: branches/v12_2/Jmol/src/org/jmol/shapesurface/Isosurface.java =================================================================== --- branches/v12_2/Jmol/src/org/jmol/shapesurface/Isosurface.java 2011-11-15 15:24:49 UTC (rev 16475) +++ branches/v12_2/Jmol/src/org/jmol/shapesurface/Isosurface.java 2011-11-16 23:00:45 UTC (rev 16476) @@ -769,6 +769,11 @@ fillMeshData(meshData, MeshData.MODE_GET_VERTICES, null); meshData.nSets = thisMesh.nSets; meshData.vertexSets = thisMesh.vertexSets; + if (!isArea && thisMesh.jvxlData.colorDensity) { + float f = thisMesh.jvxlData.voxelVolume; + f *= (thisMesh.bsSlabDisplay == null ? thisMesh.vertexCount : thisMesh.bsSlabDisplay.cardinality()); + return thisMesh.calculatedVolume = Float.valueOf(f); + } Object ret = meshData.calculateVolumeOrArea(thisMesh.thisSet, isArea, false); if (isArea) thisMesh.calculatedArea = ret; Modified: branches/v12_2/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- branches/v12_2/Jmol/src/org/jmol/viewer/Jmol.properties 2011-11-15 15:24:49 UTC (rev 16475) +++ branches/v12_2/Jmol/src/org/jmol/viewer/Jmol.properties 2011-11-16 23:00:45 UTC (rev 16476) @@ -4,6 +4,8 @@ version=12.2.6_dev +# bug fix: contact color density broken +# bug fix: contact volume report not correct for color density # bug fix: MO HOMO not set properly when using LUMO = "lowest E > 0" (GAMESS-US reader) # bug fix: zSlab settings not stored properly in parameters; should have default zSlab = 50 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |