Author: bugman Date: Tue Jan 13 16:12:27 2009 New Revision: 8431 URL: http://svn.gna.org/viewcvs/relax?rev=8431&view=rev Log: Fixes for the duplicate_data() method. Modified: branches/multi_structure/specific_fns/model_free/main.py Modified: branches/multi_structure/specific_fns/model_free/main.py URL: http://svn.gna.org/viewcvs/relax/branches/multi_structure/specific_fns/model_free/main.py?rev=8431&r1=8430&r2=8431&view=diff ============================================================================== --- branches/multi_structure/specific_fns/model_free/main.py (original) +++ branches/multi_structure/specific_fns/model_free/main.py Tue Jan 13 16:12:27 2009 @@ -1130,7 +1130,7 @@ # Otherwise compare the objects inside the container. else: # Modifiable object checks. - self.__compare_objects(dp_from.structure, dp_to.structure) + self.__compare_objects(dp_from.structure, dp_to.structure, pipe_from, pipe_to) # Tests for the model and molecule containers. if len(dp_from.structure.structural_data) != len(dp_from.structure.structural_data): @@ -1138,12 +1138,22 @@ # Loop over the models. for model_index in range(len(dp_from.structure.structural_data)): + # Alias. + model_from = dp_from.structure.structural_data[model_index] + model_to = dp_to.structure.structural_data[model_index] + + # Model numbers. + if model_from.num != model_to.num: + raise RelaxError, "The structure models are not consistent between the pipes " + `pipe_from` + " and " + `pipe_to` + "." + # Molecule number. - if len(dp_from.structure.structural_data[model_index].mol) != len(dp_from.structure.structural_data[model_index].mol): + if len(model_from.mol) != len(model_to.mol): raise RelaxError, "The number of molecules is not consistent between the pipes " + `pipe_from` + " and " + `pipe_to` + "." - # Modifiable object checks. - self.__compare_objects() + # Loop over the models. + for mol_index in range(len(model_from.mol)): + # Modifiable object checks. + self.__compare_objects(model_from.mol[mol_index], model_to.mol[mol_index], pipe_from, pipe_to) # No sequence data, so skip the rest. if dp_from.mol.is_empty():