Revision: 20165
          http://sourceforge.net/p/jmol/code/20165
Author:   hansonr
Date:     2014-12-19 13:06:49 +0000 (Fri, 19 Dec 2014)
Log Message:
-----------
Jmol.___JmolVersion="14.3.11_2014.12.19"

bug fix: label, echo, and measurement text should not display when deeper
         than zSlab with zShade is TRUE  
bug fix: mmCIF reader load filter biomolecule 1 
         broken for viruses with symmetry ranges listed as "1-60" with a hyphen 
 
bug fix: mmCIF reader coarse-grain load filter bysymop broken
bug fix: mmCIF reader coarse-grain load filter bychain broken 
 

Modified Paths:
--------------
    trunk/Jmol/src/org/jmol/adapter/readers/cif/MMCifReader.java
    trunk/Jmol/src/org/jmol/adapter/smarter/XtalSymmetry.java
    trunk/Jmol/src/org/jmol/modelsetbio/Resolver.java
    trunk/Jmol/src/org/jmol/render/EchoRenderer.java
    trunk/Jmol/src/org/jmol/render/LabelsRenderer.java
    trunk/Jmol/src/org/jmol/render/MeasuresRenderer.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: trunk/Jmol/src/org/jmol/adapter/readers/cif/MMCifReader.java
===================================================================
--- trunk/Jmol/src/org/jmol/adapter/readers/cif/MMCifReader.java        
2014-12-18 00:45:21 UTC (rev 20164)
+++ trunk/Jmol/src/org/jmol/adapter/readers/cif/MMCifReader.java        
2014-12-19 13:06:49 UTC (rev 20165)
@@ -74,7 +74,7 @@
     byChain = checkFilterKey("BYCHAIN");
     bySymop = checkFilterKey("BYSYMOP");
     isCourseGrained = byChain || bySymop;
-    if (byChain) {
+    if (isCourseGrained) {
       chainAtomMap = new Hashtable<String, P3>();
       chainAtomCounts = new Hashtable<String, int[]>();
     }
@@ -113,7 +113,8 @@
         if (note != null)
           appendLoadNote(note);
       }
-      applySymmetryAndSetTrajectory();
+      if (!isCourseGrained)
+        applySymmetryAndSetTrajectory();
     }
     
     if (htSites != null)
@@ -307,7 +308,7 @@
     int iMolecule = parseIntStr(id);
     String list = assem[ASSEM_LIST];
     appendLoadNote("found biomolecule " + id + ": " + list);
-    if (!checkFilterKey("ASSEMBLY " + id + ";"))
+    if (!checkFilterKey("ASSEMBLY " + id + ";") && !checkFilterKey("ASSEMBLY=" 
+ id + ";"))
       return;
     if (vBiomolecules == null) {
       vBiomolecules = new Lst<Map<String, Object>>();
@@ -348,7 +349,7 @@
       if (ops.indexOf("-") >= 0)
         ops = BS.unescape(
             "({" + ops.substring(1, ops.length() - 1).replace('-', ':') + "})")
-            .toString();
+            .toJSON();
       ops = PT.rep(ops, " ", "");
       ops = ops.substring(1, ops.length() - 1);
     }
@@ -841,6 +842,7 @@
         a1.setT(sum);
         a1.scale(1f / count);
         a1.radius = 16;
+        asc.addAtom(a1);
       }
     } else {
       nAtoms = bsAll.cardinality();

Modified: trunk/Jmol/src/org/jmol/adapter/smarter/XtalSymmetry.java
===================================================================
--- trunk/Jmol/src/org/jmol/adapter/smarter/XtalSymmetry.java   2014-12-18 
00:45:21 UTC (rev 20164)
+++ trunk/Jmol/src/org/jmol/adapter/smarter/XtalSymmetry.java   2014-12-19 
13:06:49 UTC (rev 20165)
@@ -1045,6 +1045,7 @@
       a.scale(1f / (atomMax - firstSymmetryAtom));
       a.atomName = "Pt";
       a.radius = 16;
+      asc.addAtom(a);
       firstSymmetryAtom = atomMax++;
       break;
     }

Modified: trunk/Jmol/src/org/jmol/modelsetbio/Resolver.java
===================================================================
--- trunk/Jmol/src/org/jmol/modelsetbio/Resolver.java   2014-12-18 00:45:21 UTC 
(rev 20164)
+++ trunk/Jmol/src/org/jmol/modelsetbio/Resolver.java   2014-12-19 13:06:49 UTC 
(rev 20165)
@@ -1053,16 +1053,13 @@
     ",[SUC],[TRE],[GCU],[MTL],[NAG],[NDG],[RHA],[SOR],[SOL],[SOE]" +  
     ",[XYL],[A2G],[LBT],[NGA],[SIA],[SLB]" + 
     ",[AFL],[AGC],[GLB],[NAN],[RAA]"; //these 4 are deprecated in PDB
-    // from Eric Martz; revision by Angel Herraez
+
+  // from Eric Martz; revision by Angel Herraez
   public static short knownGroupID(String group3) {
-    if (group3 != null) {
-      if (group3.length() == 0)
-        return 0;
-      Short boxedGroupID = Group.htGroup.get(group3);
-      if (boxedGroupID != null)
-        return boxedGroupID.shortValue();
-    }
-    return -1;
+    if (group3 == null || group3.length() == 0)
+      return 0;
+    Short boxedGroupID = Group.htGroup.get(group3);
+    return (boxedGroupID == null ? -1 : boxedGroupID.shortValue());
   }
   /**
    * @param group3 a potential group3 name

Modified: trunk/Jmol/src/org/jmol/render/EchoRenderer.java
===================================================================
--- trunk/Jmol/src/org/jmol/render/EchoRenderer.java    2014-12-18 00:45:21 UTC 
(rev 20164)
+++ trunk/Jmol/src/org/jmol/render/EchoRenderer.java    2014-12-19 13:06:49 UTC 
(rev 20165)
@@ -42,6 +42,7 @@
         .getScalePixelsPerAngstrom(true) * 10000 : 0);
     imageFontScaling = vwr.getImageFontScaling();
     boolean haveTranslucent = false;
+    setZcutoff();
     for (Text t: echo.objects.values()) {
       if (!t.visible || t.hidden) {
         continue;
@@ -60,6 +61,8 @@
           z = pt0i.z - vwr.tm.zValueFromPercent(0) + z;
         t.setZs(z, z);
       }
+      if (t.zSlab >= zCutoff)
+        continue;
       if (t.pointerPt == null) {
         t.pointer = JC.POINTER_NONE;
       } else {

Modified: trunk/Jmol/src/org/jmol/render/LabelsRenderer.java
===================================================================
--- trunk/Jmol/src/org/jmol/render/LabelsRenderer.java  2014-12-18 00:45:21 UTC 
(rev 20164)
+++ trunk/Jmol/src/org/jmol/render/LabelsRenderer.java  2014-12-19 13:06:49 UTC 
(rev 20165)
@@ -49,7 +49,6 @@
 
   byte fidPrevious;
   
-  private int zCutoff;
   private P3 pTemp = new P3();
 
   protected short bgcolix;
@@ -70,6 +69,8 @@
 
   protected int zSlab = Integer.MIN_VALUE;
 
+  protected int zCutoff;
+
   private int zBox;
 
   private float[] boxXY;
@@ -79,8 +80,6 @@
   @Override
   protected boolean render() {
     fidPrevious = 0;
-    zCutoff =(tm.zShadeEnabled ? tm.zDepthValue : 0);
-
     Labels labels = (Labels) shape;
 
     String[] labelStrings = labels.strings;
@@ -88,6 +87,7 @@
     int[] offsets = labels.offsets;
     if (labelStrings == null)
       return false;
+    setZcutoff();
     Atom[] atoms = ms.at;
     short backgroundColixContrast = vwr.cm.colixBackgroundContrast;
     int backgroundColor = vwr.getBackgroundArgb();
@@ -121,7 +121,7 @@
       textAlign = Labels.getAlignment(offsetFull);
       pointer = offsetFull & JC.LABEL_POINTER_FLAGS;
       zSlab = atom.sZ - atom.sD / 2 - 3;
-      if (zCutoff > 0 && zSlab > zCutoff)
+      if (zSlab > zCutoff)
         continue;
       if (zSlab < 1)
         zSlab = 1;
@@ -157,6 +157,10 @@
     return false;
   }
 
+  protected void setZcutoff() {
+    zCutoff =(tm.zShadeEnabled ? tm.zSlabValue : Integer.MAX_VALUE);
+  }
+
   protected Text renderLabelOrMeasure(Text text, String label) {
     boolean newText = false;
     if (text != null) {

Modified: trunk/Jmol/src/org/jmol/render/MeasuresRenderer.java
===================================================================
--- trunk/Jmol/src/org/jmol/render/MeasuresRenderer.java        2014-12-18 
00:45:21 UTC (rev 20164)
+++ trunk/Jmol/src/org/jmol/render/MeasuresRenderer.java        2014-12-19 
13:06:49 UTC (rev 20165)
@@ -91,6 +91,7 @@
       return false;
     boolean showMeasurementLabels = vwr.getBoolean(T.measurementlabels);
     measures.setVisibilityInfo();
+    setZcutoff();
     for (int i = measures.measurementCount; --i >= 0;) {
       m = measures.measurements.get(i);
       if (!m.isVisible || !m.isValid || (count = m.count) == 1 && m.traceX == 
Integer.MIN_VALUE)
@@ -199,7 +200,7 @@
     int zB = b.sZ - b.sD - 10;
     int radius = drawLine(a.sX, a.sY, zA, b.sX,
         b.sY, zB, mad);
-    if (s == null)
+    if (s == null || zB >= zCutoff)
       return;
     if (mad > 0)
       radius <<= 1;
@@ -230,7 +231,7 @@
         b.sY, zB, mad);
     radius += drawLine(b.sX, b.sY, zB, c.sX,
         c.sY, zC, mad);
-    if (s == null)
+    if (s == null || zB >= zCutoff)
       return;
     radius = (radius + 1) / 2;
     if (m.value > 175) {
@@ -305,14 +306,14 @@
         c.sY, zC, mad);
     radius += drawLine(c.sX, c.sY, zC, d.sX,
         d.sY, zD, mad);
-    if (s == null)
+    int zLabel = (zA + zB + zC + zD) / 4;
+    if (s == null || zLabel >= zCutoff)
       return;
     radius /= 3;
     if (m.text == null) {
       g3d.setC(labelColix);
       drawString((a.sX + b.sX + c.sX + d.sX) / 4,
-          (a.sY + b.sY + c.sY + d.sY) / 4,
-          (zA + zB + zC + zD) / 4, radius, false, false, false,
+          (a.sY + b.sY + c.sY + d.sY) / 4, zLabel, radius, false, false, false,
           (doJustify ? 0 : Integer.MAX_VALUE), s);
     } else {
       atomPt.add2(a, b);

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2014-12-18 00:45:21 UTC 
(rev 20164)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2014-12-19 13:06:49 UTC 
(rev 20165)
@@ -16,8 +16,17 @@
 TODO: remove HTML5 dependency on synchronous file loading (check SCRIPT 
command for problems)
 
 
-Jmol.___JmolVersion="14.3.11_2014.12.17"
+Jmol.___JmolVersion="14.3.11_2014.12.19"
 
+bug fix: label, echo, and measurement text should not display when deeper
+         than zSlab with zShade is TRUE  
+bug fix: mmCIF reader load filter biomolecule 1 
+         broken for viruses with symmetry ranges listed as "1-60" with a 
hyphen  
+bug fix: mmCIF reader coarse-grain load filter bysymop broken
+bug fix: mmCIF reader coarse-grain load filter bychain broken 
+ 
+JmolVersion="14.3.11_2014.12.17"
+
 bug fix: rotate selected <4x4 matrix> should not rotate about center of atoms
 bug fix: use of a subset command will change value of a variable bitset if 
"select x" is used
  -- example:

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to