Author: bugman Date: Wed Feb 4 17:22:01 2009 New Revision: 8730 URL: http://svn.gna.org/viewcvs/relax?rev=8730&view=rev Log: Another fix for the load_pdb() method. The mol_offset value should be calculated at all times! 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=8730&r1=8729&r2=8730&view=diff ============================================================================== --- 1.3/generic_fns/structure/scientific.py (original) +++ 1.3/generic_fns/structure/scientific.py Wed Feb 4 17:22:01 2009 @@ -569,16 +569,12 @@ mol_index = 0 new_mol_name = [] - # Set the target molecule number offset. - if set_mol_name: - mol_offset = [set_mol_name[mol_index]] - else: - # Number of structures already present for the model. - mol_offset = 0 - for i in range(len(self.structural_data)): - model_index = model_load_num - 1 - if not set_model_num or (model_index <= len(set_model_num) and set_model_num[model_index] == self.structural_data[i].num): - mol_offset = len(self.structural_data[i].mol) + # Set the target molecule number offset (if molecules already exist). + mol_offset = 0 + for i in range(len(self.structural_data)): + model_index = model_load_num - 1 + if not set_model_num or (model_index <= len(set_model_num) and set_model_num[model_index] == self.structural_data[i].num): + mol_offset = len(self.structural_data[i].mol) # Store the original model number. orig_model_num.append(model_num)