Author: bugman Date: Mon Mar 18 15:27:56 2013 New Revision: 18858 URL: http://svn.gna.org/viewcvs/relax?rev=18858&view=rev Log: Bug fix for the structural data consistency test in the pack_structs() structural API method. The index was not correct causing failures in certain rare cases. Modified: trunk/generic_fns/structure/api_base.py Modified: trunk/generic_fns/structure/api_base.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/structure/api_base.py?rev=18858&r1=18857&r2=18858&view=diff ============================================================================== --- trunk/generic_fns/structure/api_base.py (original) +++ trunk/generic_fns/structure/api_base.py Mon Mar 18 15:27:56 2013 @@ -554,7 +554,7 @@ print("Adding molecule '%s' to model %s (from the original molecule number %s of model %s)" % (set_mol_name[j], set_model_num[i], orig_mol_num[j], orig_model_num[i])) # Consistency check. - index = len(model.mol) + index = len(model.mol) - 1 if model.num != self.structural_data[0].num and self.structural_data[0].mol[index].mol_name != set_mol_name[j]: raise RelaxError("The new molecule name of '%s' in model %s does not match the corresponding molecule's name of '%s' in model %s." % (set_mol_name[j], set_model_num[i], self.structural_data[0].mol[index].mol_name, self.structural_data[0].num))