Revision: 20091 http://sourceforge.net/p/jmol/code/20091 Author: hansonr Date: 2014-11-07 13:23:58 +0000 (Fri, 07 Nov 2014) Log Message: ----------- Jmol.___JmolVersion="14.3.8_2014.11.07"
code: code clean-up in GData, Graphics3D, and Export3D code: modifications to GIF writer. Not really satisfying; still using HSL code: PDB reader CONECT efficiency bug fix: PDB reader limited to 20 connections per atom Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/readers/pdb/PdbReader.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/adapter/readers/pdb/PdbReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/pdb/PdbReader.java 2014-11-06 22:35:13 UTC (rev 20090) +++ trunk/Jmol/src/org/jmol/adapter/readers/pdb/PdbReader.java 2014-11-07 13:23:58 UTC (rev 20091) @@ -1102,9 +1102,8 @@ } private boolean haveDoubleBonds; - + private void conect() { - // adapted for improper non-crossreferenced files such as 1W7R if (sbConect == null) { sbConect = new SB(); sb = new SB(); @@ -1115,14 +1114,24 @@ sourceSerial = getSerial(6, 11); if (sourceSerial < 0) return; - for (int i = 0; i < 9; i += (i == 5 ? 2 : 1)) { - int offset = i * 5 + 11; - int offsetEnd = offset + 5; - if (offsetEnd > lineLength) + int order = 1; + // skip ancient salt bridges + int pt1 = Math.min(line.trim().length(), 52); + for (int pt = 11; pt < pt1; pt += 5) { + switch (pt) { + case 31: + order = JmolAdapter.ORDER_HBOND; break; - int targetSerial = getSerial(offset, offsetEnd); - if (targetSerial < 0) + case 41: + // old salt bridge continue; + } + int targetSerial = getSerial(pt, pt + 5); + if (targetSerial < 0) { + if (pt <= 31) // no hbonds -- get out of here + break; + continue; + } boolean isDoubleBond = (sourceSerial == lastSourceSerial && targetSerial == lastTargetSerial); if (isDoubleBond) haveDoubleBonds = true; @@ -1147,8 +1156,7 @@ sb.append(st1); } sbConect.append(st); - addConnection(new int[] { i1, targetSerial, - i < 4 ? 1 : JmolAdapter.ORDER_HBOND }); + addConnection(new int[] { i1, targetSerial, order }); } sbConect.appendSB(sb); } Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2014-11-06 22:35:13 UTC (rev 20090) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2014-11-07 13:23:58 UTC (rev 20091) @@ -14,11 +14,13 @@ TODO: design and implement sidechain mutation -- MUTATE command ? TODO: remove HTML5 dependency on synchronous file loading (check SCRIPT command for problems) +TODO: CAPTURE to PNG -Jmol.___JmolVersion="14.3.8_2014.11.06" +Jmol.___JmolVersion="14.3.8_2014.11.07" code: code clean-up in GData, Graphics3D, and Export3D code: modifications to GIF writer. Not really satisfying; still using HSL +code: PDB reader CONECT efficiency bug fix: PDB reader limited to 20 connections per atom This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits