mailr25207 - in /branches/frame_order_cleanup: ./ lib/structure/represent/diffusion_tensor.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on August 22, 2014 - 12:09:
Author: bugman
Date: Fri Aug 22 12:09:52 2014
New Revision: 25207

URL: http://svn.gna.org/viewcvs/relax?rev=25207&view=rev
Log:
Merged revisions 25206 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r25206 | bugman | 2014-08-22 12:08:09 +0200 (Fri, 22 Aug 2014) | 9 lines
  
  Fix for bug #22502 (https://gna.org/bugs/?22502).
  
  This is the problem whereby the geometric prolate diffusion representation 
does not align with axis
  in PDB, as reported by Martin Ballaschk (https://gna.org/users/mab).
  
  This problem was not the main prolate tensor axis, but that the geometric 
object needed to be
  rotated 90 degrees about the z-axis to bring the object and axis into the 
same frame.
........

Modified:
    branches/frame_order_cleanup/   (props changed)
    branches/frame_order_cleanup/lib/structure/represent/diffusion_tensor.py

Propchange: branches/frame_order_cleanup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Aug 22 12:09:52 2014
@@ -1 +1 @@
-/trunk:1-25204
+/trunk:1-25206

Modified: 
branches/frame_order_cleanup/lib/structure/represent/diffusion_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/structure/represent/diffusion_tensor.py?rev=25207&r1=25206&r2=25207&view=diff
==============================================================================
--- branches/frame_order_cleanup/lib/structure/represent/diffusion_tensor.py  
  (original)
+++ branches/frame_order_cleanup/lib/structure/represent/diffusion_tensor.py  
  Fri Aug 22 12:09:52 2014
@@ -68,12 +68,24 @@
     # Print out.
     print("\nGenerating the geometric object.")
 
+    # Swap the x and y axes for the prolate spheroid (the vector 
distributions are centred on the z-axis).
+    if diff_type == 'prolate':
+        # 90 deg rotation about the diffusion frame z-axis.
+        z_rot = array([[  0, -1,  0],
+                       [  1,  0,  0],
+                       [  0,  0,  1]], float64)
+
+        # Rotate the tensor and rotation matrix.
+        rotation = dot(transpose(rotation), z_rot)
+        tensor = dot(z_rot, dot(tensor_diag, transpose(z_rot)))
+        tensor = dot(rotation, dot(tensor, transpose(rotation)))
+
     # Swap the x and z axes for the oblate spheroid (the vector 
distributions are centred on the z-axis).
     if diff_type == 'oblate':
         # 90 deg rotation about the diffusion frame y-axis.
-        y_rot = array([[  0, 0,  1],
-                       [  0, 1,  0],
-                       [ -1, 0,  0]], float64)
+        y_rot = array([[  0,  0,  1],
+                       [  0,  1,  0],
+                       [ -1,  0,  0]], float64)
 
         # Rotate the tensor and rotation matrix.
         rotation = dot(transpose(rotation), y_rot)




Related Messages


Powered by MHonArc, Updated Fri Aug 22 12:40:02 2014