Revision: 20153
          http://sourceforge.net/p/jmol/code/20153
Author:   hansonr
Date:     2014-12-02 13:02:07 +0000 (Tue, 02 Dec 2014)
Log Message:
-----------
Jmol.___JmolVersion="14.3.11_2014.12.02"

bug fix: draw SYMOP fails for incommensurate space groups
bug fix: incommensurate magnetic CIF reading does not apply magnetic spin 
operation to spin modulations

Modified Paths:
--------------
    trunk/Jmol/src/org/jmol/symmetry/SymmetryDesc.java
    trunk/Jmol/src/org/jmol/symmetry/SymmetryOperation.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: trunk/Jmol/src/org/jmol/symmetry/SymmetryDesc.java
===================================================================
--- trunk/Jmol/src/org/jmol/symmetry/SymmetryDesc.java  2014-12-02 03:20:59 UTC 
(rev 20152)
+++ trunk/Jmol/src/org/jmol/symmetry/SymmetryDesc.java  2014-12-02 13:02:07 UTC 
(rev 20153)
@@ -462,8 +462,8 @@
     if (haveCentering)
       info1 += "|centering " + strCoord(op.centering, op.isBio);
 
-    if (op.timeReversal != 0)
-      info1 += "|spin " + (op.timeReversal == 1 ? "m" : "-m");
+    if (op.timeReversal != 0 && op.getSpinOp() == -1)
+      info1 += "|spin flipped";
 
     String cmds = null;
     String xyzNew = (op.isBio ? op.xyzOriginal : SymmetryOperation
@@ -762,8 +762,8 @@
     }
     xyzNew = (op.isBio ? m2.toString() : op.modDim > 0 ? op.xyzOriginal
         : SymmetryOperation.getXYZFromMatrix(m2, false, false, false));
-    if (op.timeReversal != 0)
-      xyzNew += (op.timeReversal == 1 ? ",m" : ",-m");
+    //if (op.timeReversal != 0)
+      //xyzNew += (op.timeReversal == 1 ? ",m" : ",-m");
     return new Object[] { xyzNew, op.xyzOriginal, info1, cmds, approx0(ftrans),
         approx0(trans), approx0(ipt), approx0(pa1), approx0(ax1),
         Integer.valueOf(ang1), m2, vtrans, op.centering };
@@ -846,14 +846,9 @@
     if (xyz == null) {
       SymmetryOperation[] ops = (SymmetryOperation[]) uc
           .getSymmetryOperations();
-      if (ops == null || op == 0 || Math.abs(op) > ops.length) {
+      if (ops == null || op == 0 || Math.abs(op) > ops.length)
         return (type == T.draw ? "draw ID sym_* delete" : "");
-      }
-      if (op > 0) {
-        xyz = ops[iop = op - 1].xyz;
-      } else {
-        xyz = ops[iop = -1 - op].xyz;
-      }
+      xyz = ops[iop = Math.abs(op) - 1].xyz;
       centering = ops[iop].centering;
     } else {
       iop = op = 0;

Modified: trunk/Jmol/src/org/jmol/symmetry/SymmetryOperation.java
===================================================================
--- trunk/Jmol/src/org/jmol/symmetry/SymmetryOperation.java     2014-12-02 
03:20:59 UTC (rev 20152)
+++ trunk/Jmol/src/org/jmol/symmetry/SymmetryOperation.java     2014-12-02 
13:02:07 UTC (rev 20153)
@@ -217,11 +217,7 @@
       return false;
     xyzOriginal = xyz;
     xyz = xyz.toLowerCase();
-    int n = (modDim + 4) * (modDim + 4);
-    this.modDim = modDim;
-    if (modDim > 0)
-      myLabels = labelsXn;
-    linearRotTrans = new float[n];
+    setModDim(modDim);
     boolean isReverse = (xyz.startsWith("!"));
     if (isReverse)
       xyz = xyz.substring(1);
@@ -243,23 +239,30 @@
        * 
        */
       this.xyz = xyz;
-      Parser.parseStringInfestedFloatArray(xyz, null, linearRotTrans);        
+      Parser.parseStringInfestedFloatArray(xyz, null, linearRotTrans);
       return setFromMatrix(null, isReverse);
     }
     if (xyz.indexOf("[[") == 0) {
-      xyz = xyz.replace('[',' ').replace(']',' ').replace(',',' ');
+      xyz = xyz.replace('[', ' ').replace(']', ' ').replace(',', ' ');
       Parser.parseStringInfestedFloatArray(xyz, null, linearRotTrans);
-      for (int i = 0; i < n; i++) {
-        float v = linearRotTrans[i];
-        if (Float.isNaN(v))
+      for (int i = linearRotTrans.length; --i >= 0;)
+        if (Float.isNaN(linearRotTrans[i]))
           return false;
-      }
       setMatrix(isReverse);
       isFinalized = true;
       isBio = (xyz.indexOf("bio") >= 0);
-      this.xyz = (isBio ? toString() : getXYZFromMatrix(this, false, false, 
false));
+      this.xyz = (isBio ? toString() : getXYZFromMatrix(this, false, false,
+          false));
       return true;
     }
+    if (modDim == 0 && xyz.indexOf("x4") >= 0) {
+      for (int i = 14; --i >= 4;) {
+        if (xyz.indexOf("x" + i) >= 0) {
+          setModDim(i - 3);
+          break;
+        }
+      }
+    }
     if (xyz.endsWith("m")) {
       timeReversal = (xyz.indexOf("-m") >= 0 ? -1 : 1);
       allowScaling = true;
@@ -277,6 +280,13 @@
     return true;
   }
 
+  private void setModDim(int dim) {
+    int n = (dim + 4) * (dim + 4);
+    modDim = dim;
+    if (dim > 0)
+      myLabels = labelsXn;
+    linearRotTrans = new float[n];
+  }
 
   private void setMatrix(boolean isReverse) {
     if (linearRotTrans.length > 16) {

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2014-12-02 03:20:59 UTC 
(rev 20152)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2014-12-02 13:02:07 UTC 
(rev 20153)
@@ -17,6 +17,7 @@
 
 Jmol.___JmolVersion="14.3.11_2014.12.01"
 
+bug fix: draw SYMOP fails for incommensurate space groups
 bug fix: incommensurate magnetic CIF reading does not apply magnetic spin 
operation to spin modulations
 bug fix: CIF reader can cycle infinitely if loop_ keywords are not followed by 
any data
 

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=157005751&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