Revision: 21580 http://sourceforge.net/p/jmol/code/21580 Author: hansonr Date: 2017-04-30 20:40:31 +0000 (Sun, 30 Apr 2017) Log Message: ----------- Jmol.___JmolVersion="14.15.3"
bug fix: set cartoonRibose misses the C1'-O4' and O3'-P(+1) edges bug fix: JVXL reader not reading Gaussian files with "1" in the third line, 5th field bug fix: CIP chirality may not show M/P for atropisomeric atoms test: load "$2,2'-dibromobiphenyl"; calculate chirality; print {*}.chirality.join("") Modified Paths: -------------- trunk/Jmol/src/org/jmol/renderbio/NucleicRenderer.java trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java trunk/Jmol/src/org/jmol/viewer/FileManager.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/renderbio/NucleicRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/renderbio/NucleicRenderer.java 2017-04-30 02:04:08 UTC (rev 21579) +++ trunk/Jmol/src/org/jmol/renderbio/NucleicRenderer.java 2017-04-30 20:40:31 UTC (rev 21580) @@ -114,12 +114,16 @@ } bsr.renderHermiteConic(i, false, 4); colix = bsr.getLeadColix(i); - if (bsr.setBioColix(colix)) - renderNucleicBaseStep(i); + if (bsr.setBioColix(colix)) { + if (cartoonRibose && bsVisible.get(i + 1)) + renderNucleicBaseStep(i, pts[i + 1], screens[i + 1]); + else + renderNucleicBaseStep(i, null, null); + } } } - private void renderNucleicBaseStep(int im) { + private void renderNucleicBaseStep(int im, T3 ptPnext, T3 scrPnext) { if (bsr.isPhosphorusOnly) return; NucleicMonomer nucleotide = (NucleicMonomer) bsr.monomers[im]; @@ -201,7 +205,10 @@ renderEdge(rScr, rPt, 3, 6); // C4' - C5' renderEdge(rScr, rPt, 6, 7); // C5' - O5' renderEdge(rScr, rPt, 7, 8); // O5' - P' + renderEdge(rScr, rPt, 0, 4); // C1' - O4' renderCyl(rScr[0], baseScreen, rPt[0], basePt); // C1' - N1 or N9 + if (ptPnext != null) + renderCyl(rScr[5], (P3) scrPnext, rPt[5], (P3) ptPnext); // O3' - P(+1) drawEdges(rScr, rPt, 5); } } Modified: trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java =================================================================== --- trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java 2017-04-30 02:04:08 UTC (rev 21579) +++ trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java 2017-04-30 20:40:31 UTC (rev 21580) @@ -905,12 +905,18 @@ boolean isAlkene; /** - * parent atom of a second alkene or cumulene atom + * first atom of an alkene or cumulene atom */ CIPAtom alkeneParent; /** + * last atom of an alkene or cumulene atom + */ + + CIPAtom alkeneChild; + + /** * a flag used in Rule 3 to indicate the second carbon of a double bond */ @@ -1154,7 +1160,9 @@ } else { isAlkeneAtom2 = true; } + parent.alkeneChild = null; alkeneParent = (parent.alkeneParent == null ? parent : parent.alkeneParent); + alkeneParent.alkeneChild = this; if (parent.alkeneParent == null) parent.nextSP2 = this; } @@ -1606,7 +1614,7 @@ * the root atom. This must be reconstructed, because until this point we * have not carried out many of the necessary comparisons. * - * @return [1: "Zaux", 2: "Eaux", 3: no chirality] + * @return one of [STEREO_Z, STEREO_E, NO_CHIRALITY] */ private int getEZaux() { // this is the second atom of the alkene, checked as the parent of the next atom @@ -1791,11 +1799,11 @@ int n = aStr.length(); if (n == 0 || n != bStr.length()) return TIED; - char aref = aStr.charAt(0); - char bref = bStr.charAt(0); + char aref = fixMataRef(aStr.charAt(0)); + char bref = fixMataRef(bStr.charAt(0)); for (int c = 1; c < n; c++) { - boolean alike = (aref == aStr.charAt(c)); - boolean blike = (bref == bStr.charAt(c)); + boolean alike = (aref == fixMataRef(aStr.charAt(c))); + boolean blike = (bref == fixMataRef(bStr.charAt(c))); if (alike != blike) return (isRSTest ? c : 1) * (alike ? A_WINS : B_WINS); } @@ -1810,6 +1818,20 @@ return aref < bref ? A_WINS : B_WINS; } + private char fixMataRef(char c) { + switch (c) { + case 'R': + case 'M': + case 'Z': + return 'R'; + case 'S': + case 'P': + case 'E': + return 'S'; + default: + return c; + } + } /** * Retrieve the Mata Rule 4b list for a given atom. * @@ -2056,6 +2078,12 @@ if (!done) { s = "?" + sphere; subRS = "[" + subRS + "]"; + } else if (isAlkene && alkeneChild != null) { + // this does not work. Is "E" a "chiral unit"? +// int ez = alkeneChild.getEZaux(); +// s = (ez == STEREO_Z ? "D" : ez == STEREO_E ? "E" : "~"); +// System.out.println(myPath + s); +// System.out.println("?"); } else if (!isRoot && (bondCount == 4 && nPriorities >= 3 - Math.abs(adj) || bondCount == 3 && elemNo > 10 && nPriorities >= 2 - Math.abs(adj))) { // if here, adj is TIED (0), A_WINS (-1), or B_WINS (1) Modified: trunk/Jmol/src/org/jmol/viewer/FileManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/FileManager.java 2017-04-30 02:04:08 UTC (rev 21579) +++ trunk/Jmol/src/org/jmol/viewer/FileManager.java 2017-04-30 20:40:31 UTC (rev 21580) @@ -1256,8 +1256,8 @@ 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 (tokens.length == 4 ? "Cube" : null); //Can't be a Jvxl file; + if (nAtoms >= 0) + return (tokens.length == 4 || tokens.length == 5 && tokens[4].equals("1") ? "Cube" : null); //Can't be a Jvxl file; nAtoms = -nAtoms; for (int i = 4 + nAtoms; --i >= 0;) if ((line = br.readLineWithNewline()) == null) Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2017-04-30 02:04:08 UTC (rev 21579) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2017-04-30 20:40:31 UTC (rev 21580) @@ -51,6 +51,8 @@ Jmol.___JmolVersion="14.15.3" +bug fix: set cartoonRibose misses the C1'-O4' and O3'-P(+1) edges +bug fix: JVXL reader not reading Gaussian files with "1" in the third line, 5th field bug fix: CIP chirality may not show M/P for atropisomeric atoms test: load "$2,2'-dibromobiphenyl"; calculate chirality; print {*}.chirality.join("") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits