mailr7342 - in /1.3: generic_fns/structure/api_base.py test_suite/shared_data/results_files/str.bz2


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

Header


Content

Posted by edward on September 26, 2008 - 16:16:
Author: bugman
Date: Fri Sep 26 16:16:13 2008
New Revision: 7342

URL: http://svn.gna.org/viewcvs/relax?rev=7342&view=rev
Log:
The basic structural object data is now converted to XML in the results file.


Modified:
    1.3/generic_fns/structure/api_base.py
    1.3/test_suite/shared_data/results_files/str.bz2

Modified: 1.3/generic_fns/structure/api_base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/api_base.py?rev=7342&r1=7341&r2=7342&view=diff
==============================================================================
--- 1.3/generic_fns/structure/api_base.py (original)
+++ 1.3/generic_fns/structure/api_base.py Fri Sep 26 16:16:13 2008
@@ -28,7 +28,11 @@
 documented.
 """
 
+# Python module imports.
+from types import MethodType
+
 # relax module import.
+from data.relax_xml import fill_object_contents
 from relax_errors import RelaxImplementError
 
 
@@ -255,6 +259,19 @@
         str_element.setAttribute('desc', 'Structural information')
         str_element.setAttribute('id', self.id)
 
+        # Blacklist methods.
+        blacklist = []
+        for name in dir(self):
+            # Get the object.
+            obj = getattr(self, name)
+
+            # Add methods to the list.
+            if isinstance(obj, MethodType):
+                blacklist.append(name)
+
+        # Add all simple python objects within the PipeContainer to the pipe 
element.
+        fill_object_contents(doc, str_element, object=self, 
blacklist=blacklist + ['structural_data'] + self.__class__.__dict__.keys())
+
 
     def write_pdb(self, file, struct_index=None):
         """Prototype method stub for the creation of a PDB file from the 
structural data.

Modified: 1.3/test_suite/shared_data/results_files/str.bz2
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/shared_data/results_files/str.bz2?rev=7342&r1=7341&r2=7342&view=diff
==============================================================================
Binary files - no diff available.




Related Messages


Powered by MHonArc, Updated Fri Sep 26 16:20:03 2008