Revision: 20948 http://sourceforge.net/p/jmol/code/20948 Author: hansonr Date: 2016-02-06 06:22:04 +0000 (Sat, 06 Feb 2016) Log Message: ----------- Jmol.___JmolVersion="14.4.2_2016.02.06"
bug fix: small MRC map files mistaken for DELPHI files, which start with the 4-byte integer 20. bug fix: MRC/CCP4 surface/map files still sometimes inside out. Modified Paths: -------------- branches/v14_4/Jmol/src/org/jmol/jvxl/data/JvxlData.java branches/v14_4/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java branches/v14_4/Jmol/src/org/jmol/jvxl/readers/MapFileReader.java branches/v14_4/Jmol/src/org/jmol/jvxl/readers/MrcBinaryReader.java branches/v14_4/Jmol/src/org/jmol/jvxl/readers/Parameters.java branches/v14_4/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java branches/v14_4/Jmol/src/org/jmol/jvxl/readers/SurfaceReader.java branches/v14_4/Jmol/src/org/jmol/scriptext/IsoExt.java branches/v14_4/Jmol/src/org/jmol/shapesurface/Isosurface.java branches/v14_4/Jmol/src/org/jmol/viewer/FileManager.java branches/v14_4/Jmol/src/org/jmol/viewer/JC.java branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties branches/v14_4/Jmol/src/org/jmol/viewer/Viewer.java Modified: branches/v14_4/Jmol/src/org/jmol/jvxl/data/JvxlData.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/jvxl/data/JvxlData.java 2016-02-05 05:56:22 UTC (rev 20947) +++ branches/v14_4/Jmol/src/org/jmol/jvxl/data/JvxlData.java 2016-02-06 06:22:04 UTC (rev 20948) @@ -111,7 +111,6 @@ public int colorFractionBase = JvxlCoder.defaultColorFractionBase; public int colorFractionRange = JvxlCoder.defaultColorFractionRange; - public boolean dataXYReversed; public boolean insideOut; public boolean isXLowToHigh; public boolean isContoured; Modified: branches/v14_4/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java 2016-02-05 05:56:22 UTC (rev 20947) +++ branches/v14_4/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java 2016-02-06 06:22:04 UTC (rev 20948) @@ -403,10 +403,9 @@ jvxlData.mappedDataMin = params.mappedDataMin; jvxlData.mappedDataMax = params.mappedDataMax; jvxlData.isColorReversed = params.isColorReversed; - jvxlData.insideOut = insideOut; if (params.insideOut) - jvxlData.insideOut = !jvxlData.insideOut; - params.insideOut = jvxlData.insideOut; + insideOut = !insideOut; + params.insideOut = jvxlData.insideOut = insideOut; } @Override Modified: branches/v14_4/Jmol/src/org/jmol/jvxl/readers/MapFileReader.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/jvxl/readers/MapFileReader.java 2016-02-05 05:56:22 UTC (rev 20947) +++ branches/v14_4/Jmol/src/org/jmol/jvxl/readers/MapFileReader.java 2016-02-06 06:22:04 UTC (rev 20948) @@ -84,7 +84,7 @@ protected void getVectorsAndOrigin() { - Logger.info("grid parameters: nx,ny,nz: " + nx + "," + ny + "," + nz); + Logger.info("grid parameters: nx,ny,nz: " + nx + "," + ny + "," + nz); Logger.info("grid parameters: nxStart,nyStart,nzStart: " + nxyzStart[0] + "," + nxyzStart[1] + "," + nxyzStart[2]); Modified: branches/v14_4/Jmol/src/org/jmol/jvxl/readers/MrcBinaryReader.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/jvxl/readers/MrcBinaryReader.java 2016-02-05 05:56:22 UTC (rev 20947) +++ branches/v14_4/Jmol/src/org/jmol/jvxl/readers/MrcBinaryReader.java 2016-02-06 06:22:04 UTC (rev 20948) @@ -121,13 +121,14 @@ if (nx < 0 || nx > 1<<8) { setStream(null, false); nx = binarydoc.swapBytesI(nx); - if (params.thePlane == null) - params.insideOut = !params.insideOut; + //removed for PDBE CCP4 files + //if (params.thePlane == null) + //params.insideOut = !params.insideOut; if (nx < 0 || nx > 1000) { Logger.info("nx=" + nx + " not displayable as MRC file"); throw new Exception("MRC file type not readable"); } - Logger.info("reading nonstandard little-endian MRC file"); + Logger.info("reading little-endian MRC file"); } ny = binarydoc.readInt(); nz = binarydoc.readInt(); @@ -182,10 +183,13 @@ mapr = binarydoc.readInt(); maps = binarydoc.readInt(); - Logger.info("MRC header: mapc mapr maps: " + mapc + " " + mapr + " " + maps); + String s = "" + mapc + mapr + maps; + Logger.info("MRC header: mapc mapr maps: " + s); - if (mapc != 1 && params.thePlane == null) + if (params.thePlane == null && "21321".indexOf(s) >= 1) { + Logger.info("MRC header: data are xy-reversed"); params.dataXYReversed = true; + } dmin = binarydoc.readFloat(); dmax = binarydoc.readFloat(); @@ -223,7 +227,7 @@ labels[0] = "Jmol MrcBinaryReader"; for (int i = 0; i < 10; i++) { - String s = binarydoc.readString(80).trim(); + s = binarydoc.readString(80).trim(); if (i < nlabel) { labels[i] = s; Logger.info(labels[i]); @@ -232,7 +236,7 @@ for (int i = 0; i < nsymbt; i += 80) { long position = binarydoc.getPosition(); - String s = binarydoc.readString(80).trim(); + s = binarydoc.readString(80).trim(); if (s.indexOf('\0') != s.lastIndexOf('\0')) { // must not really be symmetry info! Logger.error("File indicates " + nsymbt + " symmetry lines, but " + i + " found!"); Modified: branches/v14_4/Jmol/src/org/jmol/jvxl/readers/Parameters.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/jvxl/readers/Parameters.java 2016-02-05 05:56:22 UTC (rev 20947) +++ branches/v14_4/Jmol/src/org/jmol/jvxl/readers/Parameters.java 2016-02-06 06:22:04 UTC (rev 20948) @@ -882,4 +882,13 @@ slabInfo.addLast(slabObject); } + public boolean isInsideOut() { + return insideOut != dataXYReversed; + } + + public boolean isFullyLit() { + return (thePlane != null || fullyLit); + } + + } Modified: branches/v14_4/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java 2016-02-05 05:56:22 UTC (rev 20947) +++ branches/v14_4/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java 2016-02-06 06:22:04 UTC (rev 20948) @@ -185,14 +185,6 @@ jvxlData.version = version; } - public boolean isInsideOut() { - return params.insideOut != params.dataXYReversed; - } - - public boolean isFullyLit() { - return (params.thePlane != null || params.fullyLit); - } - ////////////////////////////////////////////////////////////// /** Modified: branches/v14_4/Jmol/src/org/jmol/jvxl/readers/SurfaceReader.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/jvxl/readers/SurfaceReader.java 2016-02-05 05:56:22 UTC (rev 20947) +++ branches/v14_4/Jmol/src/org/jmol/jvxl/readers/SurfaceReader.java 2016-02-06 06:22:04 UTC (rev 20948) @@ -370,8 +370,7 @@ nPointsY = voxelCounts[1]; nPointsZ = voxelCounts[2]; jvxlData.isSlabbable = ((params.dataType & Parameters.IS_SLABBABLE) != 0); - jvxlData.insideOut = params.insideOut; - jvxlData.dataXYReversed = params.dataXYReversed; + jvxlData.insideOut = params.isInsideOut(); jvxlData.isBicolorMap = params.isBicolorMap; jvxlData.nPointsX = nPointsX; jvxlData.nPointsY = nPointsY; Modified: branches/v14_4/Jmol/src/org/jmol/scriptext/IsoExt.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/scriptext/IsoExt.java 2016-02-05 05:56:22 UTC (rev 20947) +++ branches/v14_4/Jmol/src/org/jmol/scriptext/IsoExt.java 2016-02-06 06:22:04 UTC (rev 20948) @@ -2422,7 +2422,14 @@ * Or =xxxx, an EDM from Uppsala Electron Density Server * If the model auxiliary info has "jmolSufaceInfo", we use that. */ - if (filename.startsWith("=") && filename.length() > 1) { + boolean checkWithin = false; + if (filename.startsWith("*") && filename.length() > 1) { + // new PDB ccp4 option + filename = (String) vwr.setLoadFormat(filename, '_', false); + // filename = info[0]; + checkWithin = true; + } else if (filename.startsWith("=") && filename.length() > 1) { + checkWithin = true; String[] info = (String[]) vwr.setLoadFormat(filename, '_', false); filename = info[0]; String strCutoff = (!firstPass || !Float.isNaN(cutoff) ? null @@ -2456,8 +2463,10 @@ sbCommand.append(" cutoff ").appendF(cutoff); } } + } + if (checkWithin) { if (ptWithin == 0) { - onlyOneModel = "=xxxx"; + onlyOneModel = filename; if (modelIndex < 0) modelIndex = vwr.am.cmi; bs = vwr.getModelUndeletedAtomsBitSet(modelIndex); @@ -2469,7 +2478,6 @@ if (firstPass) defaultMesh = true; } - if (firstPass && vwr.getP("_fileType").equals("Pdb") && Float.isNaN(sigma) && Float.isNaN(cutoff)) { // negative sigma just indicates that Modified: branches/v14_4/Jmol/src/org/jmol/shapesurface/Isosurface.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/shapesurface/Isosurface.java 2016-02-05 05:56:22 UTC (rev 20947) +++ branches/v14_4/Jmol/src/org/jmol/shapesurface/Isosurface.java 2016-02-06 06:22:04 UTC (rev 20948) @@ -1480,7 +1480,7 @@ public boolean notifySurfaceGenerationCompleted() { setMeshI(); setBsVdw(); - thisMesh.insideOut = sg.isInsideOut(); + thisMesh.insideOut = sg.params.isInsideOut(); thisMesh.isModelConnected = sg.params.isModelConnected; thisMesh.vertexSource = sg.params.vertexSource; thisMesh.spanningVectors = sg.getSpanningVectors(); @@ -1488,7 +1488,7 @@ thisMesh.calculatedVolume = null; // from JVXL file: if (!thisMesh.isMerged) { - thisMesh.initialize(sg.isFullyLit() ? T.fullylit + thisMesh.initialize(sg.params.isFullyLit() ? T.fullylit : T.frontlit, null, sg.params.thePlane); if (jvxlData.fixedLattice != null) { thisMesh.lattice = jvxlData.fixedLattice; @@ -1511,7 +1511,7 @@ @Override public void notifySurfaceMappingCompleted() { if (!thisMesh.isMerged) - thisMesh.initialize(sg.isFullyLit() ? T.fullylit : T.frontlit, null, + thisMesh.initialize(sg.params.isFullyLit() ? T.fullylit : T.frontlit, null, sg.params.thePlane); setBsVdw(); thisMesh.isColorSolid = false; Modified: branches/v14_4/Jmol/src/org/jmol/viewer/FileManager.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/viewer/FileManager.java 2016-02-05 05:56:22 UTC (rev 20947) +++ branches/v14_4/Jmol/src/org/jmol/viewer/FileManager.java 2016-02-06 06:22:04 UTC (rev 20948) @@ -1107,7 +1107,7 @@ ///// FILE TYPING ///// - private final static String DELPHI_BINARY_MAGIC_NUMBER = "\24\0\0\0"; + private final static String DELPHI_BINARY_MAGIC_NUMBER = "\24\0\0\0"; //0x14 0 0 0 == "20-byte character string follows" public final static String PMESH_BINARY_MAGIC_NUMBER = "PM\1\0"; public static final String JPEG_CONTINUE_STRING = " #Jmol...\0"; Modified: branches/v14_4/Jmol/src/org/jmol/viewer/JC.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/viewer/JC.java 2016-02-05 05:56:22 UTC (rev 20947) +++ branches/v14_4/Jmol/src/org/jmol/viewer/JC.java 2016-02-06 06:22:04 UTC (rev 20948) @@ -70,7 +70,9 @@ "aflow", "http://aflowlib.mems.duke.edu/users/jmolers/binary_new/%FILE.aflow_binary", // _#CHANGEABLE_ flag indicates that the loaded file should be saved in any state in full // ' at start indicates a Jmol script evaluation - "ams", "'http://rruff.geo.arizona.edu/AMS/viewJmol.php?'+(0+'%file'==0? 'mineral':('%file'.length==7? 'amcsd':'id'))+'=%file&action=showcif#_DOCACHE_'" + "ams", "'http://rruff.geo.arizona.edu/AMS/viewJmol.php?'+(0+'%file'==0? 'mineral':('%file'.length==7? 'amcsd':'id'))+'=%file&action=showcif#_DOCACHE_'", + "pdbemap", "http://wwwdev.ebi.ac.uk/pdbe/coordinates/files/%file.ccp4", + "pdbemapdiff", "http://wwwdev.ebi.ac.uk/pdbe/coordinates/files/%file_diff.ccp4" }; public static String[] macros = { Modified: branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties 2016-02-05 05:56:22 UTC (rev 20947) +++ branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties 2016-02-06 06:22:04 UTC (rev 20948) @@ -7,7 +7,12 @@ # see also http://chemapps.stolaf.edu/jmol/zip for daily updates -Jmol.___JmolVersion="14.4.2_2016.02.05" +Jmol.___JmolVersion="14.4.2_2016.02.06" + +bug fix: small MRC map files mistaken for DELPHI files, which start with the 4-byte integer 20. +bug fix: MRC/CCP4 surface/map files still sometimes inside out. + +JmolVersion="14.4.2_2016.02.05" released bug fix: LOAD $benzene; SHOW smiles should give c1ccccc1 not c1=cc=cc=c1 Modified: branches/v14_4/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/viewer/Viewer.java 2016-02-05 05:56:22 UTC (rev 20947) +++ branches/v14_4/Jmol/src/org/jmol/viewer/Viewer.java 2016-02-06 06:22:04 UTC (rev 20948) @@ -4055,6 +4055,13 @@ return (withPrefix ? "MOL3D::" : "") + PT.formatStringS(format, "FILE", id); case '_': // isosurface "=...", but we code that type as '_' + if (name.startsWith("*")) { + boolean isDiff = id.startsWith("*"); + if (isDiff) + id = id.substring(1); + return g.resolveDataBase((isDiff ? "pdbemapdiff" : "pdbemap"), id, + null); + } return g.fixSurfaceFileNameVariables(id); } return id; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits