Author: bugman Date: Tue Feb 1 16:41:04 2011 New Revision: 12486 URL: http://svn.gna.org/viewcvs/relax?rev=12486&view=rev Log: Better handling of the EntityID tag in the model-free saveframe. Modified: branches/bmrb/specific_fns/model_free/bmrb.py Modified: branches/bmrb/specific_fns/model_free/bmrb.py URL: http://svn.gna.org/viewcvs/relax/branches/bmrb/specific_fns/model_free/bmrb.py?rev=12486&r1=12485&r2=12486&view=diff ============================================================================== --- branches/bmrb/specific_fns/model_free/bmrb.py (original) +++ branches/bmrb/specific_fns/model_free/bmrb.py Tue Feb 1 16:41:04 2011 @@ -135,12 +135,12 @@ continue # The molecule index and name. - if 'entity_ids' in keys: - mol_index = [] - for i in range(N): + mol_index = [] + for i in range(N): + if 'entity_ids' in keys and data['entity_ids'] != None and data['entity_ids'][i] != None: mol_index.append(int(data['entity_ids'][i]) -1 ) - else: - mol_index = [0]*N + else: + mol_index = [0]*N mol_names = [] for i in range(N): mol_names.append(cdp.mol[mol_index[i]].name)