mailr25199 - in /branches/frame_order_cleanup: ./ pipe_control/structure/main.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 - 11:21:
Author: bugman
Date: Fri Aug 22 11:21:50 2014
New Revision: 25199

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

........
  r25197 | bugman | 2014-08-22 11:20:33 +0200 (Fri, 22 Aug 2014) | 7 lines
  
  Fix for bug #22505 (https://gna.org/bugs/?22505).
  
  This is the failure of the structure.create_diff_tensor_pdb user function 
when no structural data is
  present.  The solution was simple - the CoM of the representation is set to 
the origin when no
  structural data is present, and the check for the presence of data removed.
........

Modified:
    branches/frame_order_cleanup/   (props changed)
    branches/frame_order_cleanup/pipe_control/structure/main.py

Propchange: branches/frame_order_cleanup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Aug 22 11:21:50 2014
@@ -1 +1 @@
-/trunk:1-25195
+/trunk:1-25198

Modified: branches/frame_order_cleanup/pipe_control/structure/main.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/pipe_control/structure/main.py?rev=25199&r1=25198&r2=25199&view=diff
==============================================================================
--- branches/frame_order_cleanup/pipe_control/structure/main.py (original)
+++ branches/frame_order_cleanup/pipe_control/structure/main.py Fri Aug 22 
11:21:50 2014
@@ -152,7 +152,10 @@
     pipes.test()
 
     # Calculate the centre of mass.
-    com = pipe_centre_of_mass()
+    if hasattr(cdp, 'structure'):
+        com = pipe_centre_of_mass()
+    else:
+        com = zeros(3, float64)
 
     # Create the structural object.
     structure = Internal()
@@ -179,10 +182,6 @@
         # Test if the diffusion tensor data is loaded.
         if not hasattr(pipe, 'diff_tensor'):
             raise RelaxNoTensorError('diffusion')
-
-        # Test if a structure has been loaded.
-        if not hasattr(cdp, 'structure'):
-            raise RelaxNoPdbError
 
         # Add a new structure.
         structure.add_molecule(name=mol_names[pipe_index])




Related Messages


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