Author: bugman Date: Thu Jan 22 17:19:47 2009 New Revision: 8614 URL: http://svn.gna.org/viewcvs/relax?rev=8614&view=rev Log: Added the MolContainer.from_xml() method for the internal structural object. Modified: branches/multi_structure/generic_fns/structure/internal.py Modified: branches/multi_structure/generic_fns/structure/internal.py URL: http://svn.gna.org/viewcvs/relax/branches/multi_structure/generic_fns/structure/internal.py?rev=8614&r1=8613&r2=8614&view=diff ============================================================================== --- branches/multi_structure/generic_fns/structure/internal.py (original) +++ branches/multi_structure/generic_fns/structure/internal.py Thu Jan 22 17:19:47 2009 @@ -1361,6 +1361,17 @@ self.atom_connect(index1=self.__atom_index(record[1]), index2=self.__atom_index(record[i+2])) + def from_xml(self, mol_node): + """Recreate the MolContainer from the XML molecule node. + + @param mol_node: The molecule XML node. + @type mol_node: xml.dom.minicompat.NodeList instance + """ + + # Recreate the current molecule container. + xml_to_object(mol_node, self) + + def is_empty(self): """Check if the container is empty."""