Author: bugman
Date: Fri Nov 20 15:21:16 2015
New Revision: 28073

URL: http://svn.gna.org/viewcvs/relax?rev=28073&view=rev
Log:
Bug fix for the storage of the XML structural object in the state and results 
files.

Previously any objects added to cdp.structure (or any structure object) would 
not be saved by the
structural object to_xml() method unless the function is explicitly modified to 
store that object.
Now all objects present will be converted to XML.

Modified:
    trunk/lib/structure/internal/object.py

Modified: trunk/lib/structure/internal/object.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/structure/internal/object.py?rev=28073&r1=28072&r2=28073&view=diff
==============================================================================
--- trunk/lib/structure/internal/object.py      (original)
+++ trunk/lib/structure/internal/object.py      Fri Nov 20 15:21:16 2015
@@ -46,7 +46,7 @@
 from lib.structure.internal.molecules import MolContainer
 from lib.structure.internal.selection import Internal_selection
 from lib.warnings import RelaxWarning
-from lib.xml import object_to_xml, xml_to_object
+from lib.xml import fill_object_contents, object_to_xml, xml_to_object
 
 
 # Module variables.
@@ -2818,6 +2818,12 @@
             # Add the displacement data.
             self.displacements.to_xml(doc, disp_element)
 
+        # Blacklisted objects.
+        blacklist = ['structural_data', 'displacements'] + metadata + 
list(Internal.__dict__.keys()) + list(self.__class__.__dict__.keys()) + 
list(object.__dict__.keys())
+
+        # Add all simple python objects within the container to the XML 
element.
+        fill_object_contents(doc, str_element, object=self, 
blacklist=blacklist)
+
 
     def validate_models(self, verbosity=1):
         """Check that the models are consistent with each other.


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to