mailr27722 - /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 March 02, 2015 - 11:58:
Author: bugman
Date: Mon Mar  2 11:58:42 2015
New Revision: 27722

URL: http://svn.gna.org/viewcvs/relax?rev=27722&view=rev
Log:
Improvement for the structure.mean user function.

This can now be used to store an averaged structure in an empty data pipe.  
Previously structural
data needed to be present in the current data pipe for the user function to 
work.


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=27722&r1=27721&r2=27722&view=diff
==============================================================================
--- trunk/pipe_control/structure/main.py        (original)
+++ trunk/pipe_control/structure/main.py        Mon Mar  2 11:58:42 2015
@@ -396,6 +396,10 @@
 
     # Calculate the mean structure.
     struct = mean(coord, axis=0)
+
+    # Place the structural object into the relax data store if needed.
+    if not hasattr(cdp, 'structure'):
+        cdp.structure = Internal()
 
     # Store the data.
     cdp.structure.add_coordinates(coord=struct, mol_names=mol_names, 
res_names=res_names, res_nums=res_nums, atom_names=atom_names, 
elements=elements, set_mol_name=set_mol_name, set_model_num=set_model_num)




Related Messages


Powered by MHonArc, Updated Mon Mar 02 15:40:01 2015