Author: bugman Date: Thu Feb 3 13:30:10 2011 New Revision: 12512 URL: http://svn.gna.org/viewcvs/relax?rev=12512&view=rev Log: Square brackets and commas are now also removed from the BMRB molecule name. Modified: branches/bmrb/generic_fns/mol_res_spin.py Modified: branches/bmrb/generic_fns/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/branches/bmrb/generic_fns/mol_res_spin.py?rev=12512&r1=12511&r2=12512&view=diff ============================================================================== --- branches/bmrb/generic_fns/mol_res_spin.py (original) +++ branches/bmrb/generic_fns/mol_res_spin.py Thu Feb 3 13:30:10 2011 @@ -504,11 +504,19 @@ # Get the entities. for data in star.entity.loop(): - # Remove brackets from the molecule name. + # Remove nasty characters from the molecule name. mol_name = data['mol_name'] if mol_name: + # Round brackets. mol_name = replace(mol_name, '(', '') mol_name = replace(mol_name, ')', '') + + # Square brackets. + mol_name = replace(mol_name, '[', '') + mol_name = replace(mol_name, ']', '') + + # Commas. + mol_name = replace(mol_name, ',', ' ') # Add the residues. for i in range(len(data['res_nums'])):