mailr25197 - /trunk/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:20:
Author: bugman
Date: Fri Aug 22 11:20:33 2014
New Revision: 25197

URL: http://svn.gna.org/viewcvs/relax?rev=25197&view=rev
Log:
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:
    trunk/pipe_control/structure/main.py

Modified: trunk/pipe_control/structure/main.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/structure/main.py?rev=25197&r1=25196&r2=25197&view=diff
==============================================================================
--- trunk/pipe_control/structure/main.py        (original)
+++ trunk/pipe_control/structure/main.py        Fri Aug 22 11:20:33 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