Revision: 20100 http://sourceforge.net/p/jmol/code/20100 Author: hansonr Date: 2014-11-10 22:55:24 +0000 (Mon, 10 Nov 2014) Log Message: ----------- Jmol.___JmolVersion="14.3.9_2014.11.11"
bug fix: JmolVersion 14.3.3_2014.07.27 broke ligand bond reading when fetching ligands. -- mmCIF reader was not being selected by the Resolver -- Requires an increment of version number to 14.3.9 Modified Paths: -------------- trunk/Jmol/src/javajs/img/GifEncoder.java trunk/Jmol/src/org/jmol/adapter/readers/cif/MMCifReader.java trunk/Jmol/src/org/jmol/adapter/smarter/Resolver.java trunk/Jmol/src/org/jmol/awtjs2d/Platform.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties trunk/Jmol/src/org/jmol/viewer/OutputManager.java Modified: trunk/Jmol/src/javajs/img/GifEncoder.java =================================================================== --- trunk/Jmol/src/javajs/img/GifEncoder.java 2014-11-10 12:26:03 UTC (rev 20099) +++ trunk/Jmol/src/javajs/img/GifEncoder.java 2014-11-10 22:55:24 UTC (rev 20100) @@ -495,6 +495,9 @@ private void quantizePixels(Map<Integer, ColorCell> colorMap, Lst<ColorCell> boxes) { P3[] pixelErr = new P3[pixels.length]; + // We should replace, not overwrite, pixels + // as this may be the raw canvas.buf32. + int[] newPixels = new int[pixels.length]; P3 err = new P3(); P3 lab; int rgb; @@ -507,7 +510,8 @@ rgb = pixels[p]; } else { lab = toLAB(pixels[p]); - err = pixelErr[p]; // it does not matter that we repurpose errors[p] here. + err = pixelErr[p]; + // it does not matter that we repurpose errors[p] here. // important not to round the clamp here -- full floating precision err.x = clamp(err.x, -75, 75); err.y = clamp(err.y, -75, 75); @@ -551,12 +555,14 @@ } } } - pixels[p] = cell.index; + newPixels[p] = cell.index; } } + pixels = newPixels; } private void addError(P3 err, int f, P3[] pixelErr, int p) { + // GIMP will allow changing the background color. if (pixels[p] == backgroundColor) return; P3 errp = pixelErr[p]; Modified: trunk/Jmol/src/org/jmol/adapter/readers/cif/MMCifReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/cif/MMCifReader.java 2014-11-10 12:26:03 UTC (rev 20099) +++ trunk/Jmol/src/org/jmol/adapter/readers/cif/MMCifReader.java 2014-11-10 22:55:24 UTC (rev 20100) @@ -62,6 +62,10 @@ private P3 chainSum; private int[] chainAtomCount; + + private boolean isLigandBondBug; + // Jmol-14.3.3_2014.07.27 broke mmCIF bond reading for ligands + // Jmol-1 @Override protected void initSubclass() { @@ -77,6 +81,10 @@ if (checkFilterKey("BIOMOLECULE")) // PDB format filter = PT.rep(filter, "BIOMOLECULE", "ASSEMBLY"); isBiomolecule = checkFilterKey("ASSEMBLY"); + + isLigandBondBug = (stateScriptVersionInt >= 140204 && stateScriptVersionInt <= 140208 + || stateScriptVersionInt >= 140304 && stateScriptVersionInt <= 140308); + } @Override @@ -880,6 +888,12 @@ }; private boolean processLigandBondLoopBlock() throws Exception { parseLoopParametersFor(FAMILY_COMPBOND, chemCompBondFields); + // alas -- saved states must not read ligand bonding + // the problem was that these files were not recognized as mmCIF + // files by the resolver when this MMCifReader was created. + + if (isLigandBondBug) + return false; for (int i = propertyCount; --i >= 0;) if (fieldOf[i] == NONE) { Logger.warn("?que? missing property: " + chemCompBondFields[i]); Modified: trunk/Jmol/src/org/jmol/adapter/smarter/Resolver.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/Resolver.java 2014-11-10 12:26:03 UTC (rev 20099) +++ trunk/Jmol/src/org/jmol/adapter/smarter/Resolver.java 2014-11-10 22:55:24 UTC (rev 20100) @@ -703,7 +703,7 @@ //////////////////////////////////////////////////////////////// private final static String[] mmcifLineStartRecords = - { "MMCif", "_entry.id", "_database_PDB_", "_pdbx_", "_audit_author.name" }; + { "MMCif", "_entry.id", "_database_PDB_", "_pdbx_", "_chem_comp.pdbx_type", "_audit_author.name" }; private final static String[] cifLineStartRecords = { "Cif", "data_", "_publ" }; Modified: trunk/Jmol/src/org/jmol/awtjs2d/Platform.java =================================================================== --- trunk/Jmol/src/org/jmol/awtjs2d/Platform.java 2014-11-10 12:26:03 UTC (rev 20099) +++ trunk/Jmol/src/org/jmol/awtjs2d/Platform.java 2014-11-10 22:55:24 UTC (rev 20100) @@ -217,7 +217,7 @@ @Override public int[] grabPixels(Object canvas, int width, int height, int[] pixels, int startRow, int nRows) { - // from PNG and JPG image creators, also g3d.ImageRenderer.plotImage via drawImageToBuffer + // from PNG and GIF and JPG image creators, also g3d.ImageRenderer.plotImage via drawImageToBuffer /** * Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2014-11-10 12:26:03 UTC (rev 20099) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2014-11-10 22:55:24 UTC (rev 20100) @@ -15,6 +15,13 @@ TODO: design and implement sidechain mutation -- MUTATE command ? TODO: remove HTML5 dependency on synchronous file loading (check SCRIPT command for problems) + +Jmol.___JmolVersion="14.3.9_2014.11.11" + +bug fix: JmolVersion 14.3.3_2014.07.27 broke ligand bond reading when fetching ligands. + -- mmCIF reader was not being selected by the Resolver + -- Requires an increment of version number to 14.3.9 + Jmol.___JmolVersion="14.3.8_2014.11.10" bug fix: slightly better GIF processing Modified: trunk/Jmol/src/org/jmol/viewer/OutputManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/OutputManager.java 2014-11-10 12:26:03 UTC (rev 20099) +++ trunk/Jmol/src/org/jmol/viewer/OutputManager.java 2014-11-10 22:55:24 UTC (rev 20100) @@ -130,7 +130,7 @@ String fileName = (String) params.get("fileName"); String[] scripts = (String[]) params.get("scripts"); Object objImage = params.get("image"); - int[] rgbbuf = (int[]) params.get("rgbbuf"); + int[] rgbbuf = (int[]) params.get("rgbbuf"); // only from OBJ exporter creating PNG output OC out = (OC) params.get("outputChannel"); boolean asBytes = (out == null && fileName == null); boolean closeChannel = (out == null && fileName != null); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits