Author: bugman Date: Sun Oct 5 13:30:09 2008 New Revision: 7511 URL: http://svn.gna.org/viewcvs/relax?rev=7511&view=rev Log: Partial fix for bug #12409 (https://gna.org/bugs/index.php?12409). Updated the add_struct() method to match that of the internal structural object. Modified: 1.3/generic_fns/structure/scientific.py Modified: 1.3/generic_fns/structure/scientific.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/scientific.py?rev=7511&r1=7510&r2=7511&view=diff ============================================================================== --- 1.3/generic_fns/structure/scientific.py (original) +++ 1.3/generic_fns/structure/scientific.py Sun Oct 5 13:30:09 2008 @@ -96,10 +96,6 @@ if file != self.file[struct_index]: raise RelaxError, "The file names of " + `file` + " and " + `self.file[struct_index]` + " do not match." - # Path. - if path != self.path[struct_index]: - raise RelaxError, "The paths of " + `path` + " and " + `self.path[struct_index]` + " do not match." - # Initialise. else: self.num = self.num + 1 @@ -107,6 +103,18 @@ self.model.append(model) self.file.append(file) self.path.append(path) + + # Initialise the structural object if not provided. + if str == None: + raise RelaxError, "The Scientific python structural object cannot be set to None." + + # Add the structural data. + if struct_index != None: + if struct_index >= len(self.structural_data): + self.structural_data.append(str) + else: + self.structural_data[struct_index] = str + else: self.structural_data.append(str)