Revision: 20272 http://sourceforge.net/p/jmol/code/20272 Author: hansonr Date: 2015-02-08 03:22:38 +0000 (Sun, 08 Feb 2015) Log Message: ----------- Jmol.___JmolVersion="14.2.12_2015.02.07"
bug fix: zoomTo{xxx} 0 does not center (broken in 13.1.16_dev_2013.05.23) bug fix: appending a model to a model with data can fail bug fix: hydrogen addition should not follow component file Modified Paths: -------------- branches/v14_2/Jmol/src/org/jmol/modelsetbio/Resolver.java branches/v14_2/Jmol/src/org/jmol/script/ScriptEval.java branches/v14_2/Jmol/src/org/jmol/viewer/DataManager.java branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties Modified: branches/v14_2/Jmol/src/org/jmol/modelsetbio/Resolver.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/modelsetbio/Resolver.java 2015-02-08 03:21:49 UTC (rev 20271) +++ branches/v14_2/Jmol/src/org/jmol/modelsetbio/Resolver.java 2015-02-08 03:22:38 UTC (rev 20272) @@ -126,7 +126,7 @@ group3Count = s.length() / 6; Group.standardGroupList = s.toString(); for (int i = 0, n = predefinedGroup3Names.length; i < n; ++i) - addGroup3Name(predefinedGroup3Names[i]); + addGroup3Name(predefinedGroup3Names[i].trim()); } return this; } @@ -919,7 +919,7 @@ target = "HB3@HB2"; break; case 'D': // CD - target = "HD2@HD3"; + target = "HD3@HD2"; break; case 'G': // CG target = "HG3@HG2"; @@ -955,41 +955,42 @@ public final static String[] pdbBondInfo = { // added O3' HO3' O5' HO5' for nucleic and added 1 H atom for res 1 for 13.1.17 // this could throw off states from previous versions + // CH2 and NH2 labeling revised 2015.02.07 "", /*ALA*/ "N N CA HA C O CB HB?", - /*ARG*/ "N N CA HA C O CB HB2@HB3 CG HG2@HG3 CD D NE HE CZ NH1 NH1 HH11@HH12 NH2 HH21@HH22", + /*ARG*/ "N N CA HA C O CB B CG G CD D NE HE CZ NH1 NH1 HH11@HH12 NH2 HH22@HH21", /*ASN*/ "N N CA HA C O CB B CG OD1 ND2 HD21@HD22", /*ASP*/ "N N CA HA C O CB B CG OD1", /*CYS*/ "N N CA HA C O CB B SG HG", - /*GLN*/ "N N CA HA C O CB B CG G CD OE1 NE2 HE21@HE22", + /*GLN*/ "N N CA HA C O CB B CG G CD OE1 NE2 HE22@HE21", /*GLU*/ "N N CA HA C O CB B CG G CD OE1", /*GLY*/ "N N CA HA2@HA3 C O", /*HIS*/ "N N CA HA C O CB B CG CD2 ND1 CE1 ND1 HD1 CD2 HD2 CE1 HE1 NE2 HE2", - /*ILE*/ "N N CA HA C O CB HB CG1 HG12@HG13 CG2 HG2? CD1 HD1?", - /*LEU*/ "N N CA HA C O CB HB2@HB3 CG HG CD1 HD1? CD2 HD2?", + /*ILE*/ "N N CA HA C O CB HB CG1 HG13@HG12 CG2 HG2? CD1 HD1?", + /*LEU*/ "N N CA HA C O CB B CG HG CD1 HD1? CD2 HD2?", /*LYS*/ "N N CA HA C O CB B CG G CD HD2@HD3 CE HE3@HE2 NZ HZ?", - /*MET*/ "N N CA HA C O CB HB2@HB3 CG HG2@HG3 CE HE?", + /*MET*/ "N N CA HA C O CB B CG G CE HE?", /*PHE*/ "N N CA HA C O CB B CG CD1 CD1 HD1 CD2 CE2 CD2 HD2 CE1 CZ CE1 HE1 CE2 HE2 CZ HZ", - /*PRO*/ "N H CA HA C O CB B CG G CD HD2@HD3", + /*PRO*/ "N H CA HA C O CB B CG G CD D", /*SER*/ "N N CA HA C O CB B OG HG", /*THR*/ "N N CA HA C O CB HB OG1 HG1 CG2 HG2?", /*TRP*/ "N N CA HA C O CB B CG CD1 CD1 HD1 CD2 CE2 NE1 HE1 CE3 CZ3 CE3 HE3 CZ2 CH2 CZ2 HZ2 CZ3 HZ3 CH2 HH2", /*TYR*/ "N N CA HA C O CB B CG CD1 CD1 HD1 CD2 CE2 CD2 HD2 CE1 CZ CE1 HE1 CE2 HE2 OH HH", /*VAL*/ "N N CA HA C O CB HB CG1 HG1? CG2 HG2?", - /*ASX*/ "CA HA C O CB HB2@HB1 C H", - /*GLX*/ "CA HA C O CB HB1 CB HB2 CG HG1 CG HG2", + /*ASX*/ "N N CA HA C O CB B", + /*GLX*/ "N N CA HA C O CB B CG G", /*UNK*/ "", - /*G*/ "P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C8 N7 C8 H8 C5 C4 C6 O6 N1 H1 C2 N3 N2 H21@H22 O3' HO3' O5' HO5'", + /*G*/ "P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C8 N7 C8 H8 C5 C4 C6 O6 N1 H1 C2 N3 N2 H22@H21 O3' HO3' O5' HO5'", /*C*/ "P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C2 O2 N3 C4 N4 H41@H42 C5 C6 C5 H5 C6 H6 O3' HO3' O5' HO5'", /*A*/ "P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C8 N7 C8 H8 C5 C4 C6 N1 N6 H61@H62 C2 N3 C2 H2 O3' HO3' O5' HO5'", /*T*/ "P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C2 O2 N3 H3 C4 O4 C5 C6 C7 H7? C6 H6 O3' HO3' O5' HO5'", /*U*/ "P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C2 O2 N3 H3 C4 O4 C5 C6 C5 H5 C6 H6 O3' HO3' O5' HO5'", /*I*/ "P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C8 N7 C8 H8 C5 C4 C6 O6 N1 H1 C2 N3 C2 H2 O3' HO3' O5' HO5'", - /*DG*/ "P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C8 N7 C8 H8 C5 C4 C6 O6 N1 H1 C2 N3 N2 H21@H22 O3' HO3' O5' HO5'", + /*DG*/ "P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C8 N7 C8 H8 C5 C4 C6 O6 N1 H1 C2 N3 N2 H22@H21 O3' HO3' O5' HO5'", /*DC*/ "P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C2 O2 N3 C4 N4 H41@H42 C5 C6 C5 H5 C6 H6 O3' HO3' O5' HO5'", /*DA*/ "P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C8 N7 C8 H8 C5 C4 C6 N1 N6 H61@H62 C2 N3 C2 H2 O3' HO3' O5' HO5'", - /*DT*/ "P OP1 C5' H5'@H5'' C4' H4' C3' H3' C2' H2'@H2'' C1' H1' C2 O2 N3 H3 C4 O4 C5 C6 C7 H7? C6 H6 O3' HO3' O5' HO5'", - /*DU*/ "P OP1 C5' 5 C4' H4' C3' H3' C2' H2'@H2'' C1' H1' C2 O2 N3 H3 C4 O4 C5 C6 C5 H5 C6 H6 O3' HO3' O5' HO5'", + /*DT*/ "P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C2 O2 N3 H3 C4 O4 C5 C6 C7 H7? C6 H6 O3' HO3' O5' HO5'", + /*DU*/ "P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C2 O2 N3 H3 C4 O4 C5 C6 C5 H5 C6 H6 O3' HO3' O5' HO5'", /*DI*/ "P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C8 N7 C8 H8 C5 C4 C6 O6 N1 H1 C2 N3 C2 H2 O3' HO3' O5' HO5'", }; private final static int[] pdbHydrogenCount = { @@ -1053,6 +1054,7 @@ Short boxedGroupID = Group.htGroup.get(group3); return (boxedGroupID == null ? -1 : boxedGroupID.shortValue()); } + /** * @param group3 a potential group3 name * @return whether this is a carbohydrate from the list @@ -1061,7 +1063,9 @@ return (group3 != null && allCarbohydrates.indexOf("[" + group3.toUpperCase() + "]") >= 0); } + private static int group3Count; + final static char[] predefinedGroup1Names = { /* rmh * @@ -1214,6 +1218,35 @@ }; + + @Override + public short getGroupID(String g3) { + return getGroupIdFor(g3); + } + + static short getGroupIdFor(String group3) { + group3 = group3.trim(); + short groupID = knownGroupID(group3); + return (groupID == -1 ? + addGroup3Name(group3) : + groupID); + } + + /** + * These can overrun 3 characters; that is not significant. + * + * @param group3 + * @return a short group ID + */ + private synchronized static short addGroup3Name(String group3) { + if (group3NameCount == Group.group3Names.length) + Group.group3Names = AU.doubleLengthS(Group.group3Names); + short groupID = group3NameCount++; + Group.group3Names[groupID] = group3; + Group.htGroup.put(group3, Short.valueOf(groupID)); + return groupID; + } + private static int getStandardPdbHydrogenCount(String group3) { int pt = knownGroupID(group3); return (pt < 0 || pt >= pdbHydrogenCount.length ? -1 : pdbHydrogenCount[pt]); @@ -1708,31 +1741,6 @@ return null; } - @Override - public short getGroupID(String g3) { - return getGroupIdFor(g3); - } - - /** - * These can overrun 3 characters; that is not significant. - * - * @param group3 - * @return a short group ID - */ - public synchronized static short addGroup3Name(String group3) { - if (group3NameCount == Group.group3Names.length) - Group.group3Names = AU.doubleLengthS(Group.group3Names); - short groupID = group3NameCount++; - Group.group3Names[groupID] = group3; - Group.htGroup.put(group3, Short.valueOf(groupID)); - return groupID; - } - - public static short getGroupIdFor(String group3) { - short groupID = knownGroupID(group3); - return (groupID == -1 ? addGroup3Name(group3) : groupID); - } - } Modified: branches/v14_2/Jmol/src/org/jmol/script/ScriptEval.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/script/ScriptEval.java 2015-02-08 03:21:49 UTC (rev 20271) +++ branches/v14_2/Jmol/src/org/jmol/script/ScriptEval.java 2015-02-08 03:22:38 UTC (rev 20272) @@ -8127,10 +8127,10 @@ } if (chk) return; - //if (Float.isNaN(xTrans)) - //xTrans = 0; - //if (Float.isNaN(yTrans)) - //yTrans = 0; + if (Float.isNaN(xTrans)) + xTrans = 0; + if (Float.isNaN(yTrans)) + yTrans = 0; if (isSameAtom && Math.abs(zoom - newZoom) < 1) floatSecondsTotal = 0; vwr.moveTo(this, floatSecondsTotal, center, JC.center, Float.NaN, null, Modified: branches/v14_2/Jmol/src/org/jmol/viewer/DataManager.java =================================================================== --- branches/v14_2/Jmol/src/org/jmol/viewer/DataManager.java 2015-02-08 03:21:49 UTC (rev 20271) +++ branches/v14_2/Jmol/src/org/jmol/viewer/DataManager.java 2015-02-08 03:22:38 UTC (rev 20272) @@ -158,13 +158,15 @@ // just get the selected token values bs = (BS) data[DATA_SELECTION_MAP]; if (floatData != null) { - if (floatData.length == bs.cardinality()) + int n = floatData.length; + if (n == bs.cardinality()) { for (int i = bs.nextSetBit(0), pt = 0; i >= 0; i = bs .nextSetBit(i + 1), pt++) f[i] = floatData[pt]; - else - for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) + } else { + for (int i = bs.nextSetBit(0); i >= 0 && i < n; i = bs.nextSetBit(i + 1)) f[i] = floatData[i]; + } } else { Parser.parseFloatArrayBsData( strData == null ? PT.getTokens(stringData) : strData, bs, f); Modified: branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties 2015-02-08 03:21:49 UTC (rev 20271) +++ branches/v14_2/Jmol/src/org/jmol/viewer/Jmol.properties 2015-02-08 03:22:38 UTC (rev 20272) @@ -5,12 +5,19 @@ # THIS IS THE RELEASE BRANCH # BUG FIXES ONLY, PLEASE -Jmol.___JmolVersion="14.2.12_2015.02.04" +Jmol.___JmolVersion="14.2.12_2015.02.07" +bug fix: zoomTo{xxx} 0 does not center (broken in 13.1.16_dev_2013.05.23) +bug fix: appending a model to a model with data can fail +bug fix: hydrogen addition should not follow component file + +JmolVersion="14.2.12_2015.02.04" +released + bug fix: show mouse fails in JavaScript -- we cannot test using PT.isAI() in org.jmol.viewer.binding.Binding - -- because of a Java2Script compiler creates standard array [...] - -- from new int[] {....} whereas it should create Clazz.newArray() and fill it + because the Java2Script compiler creates standard array [...] + from new int[] {....} whereas it should use Clazz.newIntArray(-1,....) bug fix: label %r should print "1" for non-PDB file atoms bug fix; lcaoCartoon broken in 14.3.10_2014.11.27/14.2.12_2015.01.22 bug fix: isosurface id surf1 solvent; select within(2.0, $surf1) broken @@ -19,7 +26,7 @@ bug fix: select thisModel does not select all atoms in visible frame set bug fix: select %w %x %y %z not implemented -Jmol.___JmolVersion="14.2.12_2015.01.27" +JmolVersion="14.2.12_2015.01.27" bug fix: CGO LINE_LOOP not closing bug fix: configuration 1 broken This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits