Revision: 18247 http://sourceforge.net/p/jmol/code/18247 Author: hansonr Date: 2013-05-24 02:50:58 +0000 (Fri, 24 May 2013) Log Message: ----------- ___JmolVersion="13.1.16_dev_2013.05.23a"
PyMOL: measurement font/offsets enabled -- adds measure ID "xxx" FONT scale face style -- adds measure ID "xxx" OFFSET [mode, sx, sy, sz, ax, ay, az] -- adds measure ID "xxx" OFFSET {sx, sy, sz} code: Text.java, Object2d.java moved from shapes to modelset Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLReader.java Modified: trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLReader.java 2013-05-23 23:47:30 UTC (rev 18246) +++ trunk/Jmol/src/org/jmol/adapter/readers/pymol/PyMOLReader.java 2013-05-24 02:50:58 UTC (rev 18247) @@ -1569,26 +1569,29 @@ */ private static void cleanSingletons(Atom[] atoms, BS bs) { BS bsr = new BS(); - for (int pass = 0; pass < 2; pass++) { + int n = bs.length(); + int pass = 0; + while (true) { int offset = 1; int iPrev = Integer.MIN_VALUE; int iSeqLast = Integer.MIN_VALUE; int iSeq = Integer.MIN_VALUE; - for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) { - if (!isSequential(atoms, i, iPrev)) + for (int i = 0; i < n; i++) { + if (nextChain(atoms, i, iPrev)) offset++; iSeq = atoms[i].sequenceNumber; if (iSeq != iSeqLast) { iSeqLast = iSeq; offset++; } - if (pass == 0) - bsr.set(offset); - else if (!bsr.get(offset)) + if (pass == 0) { + if (bs.get(i)) + bsr.set(offset); + } else if (!bsr.get(offset)) bs.clear(i); iPrev = i; } - if (pass == 1) + if (++pass == 2) break; BS bsnot = new BS(); for (int i = bsr.nextSetBit(0); i >= 0; i = bsr.nextSetBit(i + 1)) @@ -1598,12 +1601,12 @@ } } - private static boolean isSequential(Atom[] atoms, int i, int iPrev) { + private static boolean nextChain(Atom[] atoms, int i, int iPrev) { if (i == 0 || iPrev < 0) - return false; + return true; Atom a = atoms[iPrev]; Atom b = atoms[i]; - return a.chainID == b.chainID && a.atomSetIndex == b.atomSetIndex; + return a.chainID != b.chainID; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits