mailr8608 - in /branches/multi_structure: data/pipe_container.py generic_fns/structure/api_base.py


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

Header


Content

Posted by edward on January 22, 2009 - 16:56:
Author: bugman
Date: Thu Jan 22 16:56:14 2009
New Revision: 8608

URL: http://svn.gna.org/viewcvs/relax?rev=8608&view=rev
Log:
The parser ID string is now passed all the way to the MolList.from_xml() 
method.


Modified:
    branches/multi_structure/data/pipe_container.py
    branches/multi_structure/generic_fns/structure/api_base.py

Modified: branches/multi_structure/data/pipe_container.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_structure/data/pipe_container.py?rev=8608&r1=8607&r2=8608&view=diff
==============================================================================
--- branches/multi_structure/data/pipe_container.py (original)
+++ branches/multi_structure/data/pipe_container.py Thu Jan 22 16:56:14 2009
@@ -160,7 +160,7 @@
 
             # Fill its contents.
             if not fail:
-                self.structure.from_xml(str_nodes[0], dir=dir)
+                self.structure.from_xml(str_nodes[0], dir=dir, id=parser)
 
 
     def is_empty(self):

Modified: branches/multi_structure/generic_fns/structure/api_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_structure/generic_fns/structure/api_base.py?rev=8608&r1=8607&r2=8608&view=diff
==============================================================================
--- branches/multi_structure/generic_fns/structure/api_base.py (original)
+++ branches/multi_structure/generic_fns/structure/api_base.py Thu Jan 22 
16:56:14 2009
@@ -174,18 +174,21 @@
         raise RelaxImplementError
 
 
-    def from_xml(self, str_node, dir=None):
+    def from_xml(self, str_node, dir=None, id=None):
         """Recreate the structural object from the XML structural object 
node.
 
         @param str_node:    The structural object XML node.
         @type str_node:     xml.dom.minicompat.Element instance
         @keyword dir:       The name of the directory containing the results 
file.
         @type dir:          str
+        @keyword id:        The specific structural object id string.  This 
can be 'scientific',
+                            'internal', etc.
+        @type id:           str
         """
 
         # Recreate the model / molecule data structure.
         model_nodes = str_node.getElementsByTagName('model')
-        self.structural_data.from_xml(model_nodes)
+        self.structural_data.from_xml(model_nodes, id=id)
 
 
     def get_model(self, model):
@@ -753,11 +756,14 @@
         return False
 
 
-    def from_xml(self, model_nodes):
+    def from_xml(self, model_nodes, id=None):
         """Recreate a model list data structure from the XML model nodes.
 
         @param model_nodes: The model XML nodes.
         @type model_nodes:  xml.dom.minicompat.NodeList instance
+        @keyword id:        The specific structural object id string.  This 
can be 'scientific',
+                            'internal', etc.
+        @type id:           str
         """
 
         # Test if empty.
@@ -776,7 +782,7 @@
             mol_nodes = model_node.getElementsByTagName('mol_cont')
 
             # Recreate the molecule data structures for the current model.
-            self[-1].mol.from_xml(mol_nodes)
+            self[-1].mol.from_xml(mol_nodes, id=id)
 
 
     def to_xml(self, doc, element):
@@ -951,11 +957,14 @@
         return False
 
 
-    def from_xml(self, mol_nodes):
+    def from_xml(self, mol_nodes, id=None):
         """Recreate a molecule list data structure from the XML molecule 
nodes.
 
         @param mol_nodes:    The molecule XML nodes.
         @type mol_nodes:     xml.dom.minicompat.NodeList instance
+        @keyword id:        The specific structural object id string.  This 
can be 'scientific',
+                            'internal', etc.
+        @type id:           str
         """
 
         # Test if empty.




Related Messages


Powered by MHonArc, Updated Thu Jan 22 17:20:02 2009