Author: bugman Date: Sun Nov 18 20:16:14 2007 New Revision: 3557 URL: http://svn.gna.org/viewcvs/relax?rev=3557&view=rev Log: Removed the unused and useless generic_fns.molecule.renumber() function. Modified: 1.3/generic_fns/molecule.py Modified: 1.3/generic_fns/molecule.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/molecule.py?rev=3557&r1=3556&r2=3557&view=diff ============================================================================== --- 1.3/generic_fns/molecule.py (original) +++ 1.3/generic_fns/molecule.py Sun Nov 18 20:16:14 2007 @@ -230,44 +230,3 @@ # Rename the molecule is there is a match. if mol: mol.name = new_name - - -def renumber(res_id, new_number=None): - """Function for renumbering residues. - - @param res_id: The identifier string for the residue to renumber. - @type res_id: str - @param new_number: The new residue number. - @type new_number: str - """ - - # Split up the selection string. - mol_token, res_token, spin_token = tokenise(res_id) - - # Disallow spin selections. - if spin_token != None: - raise RelaxSpinSelectDisallowError - - # Parse the tokens. - residues = parse_token(res_token) - - # Catch multiple renumberings! - number = 0 - for mol in molecule_loop(mol_token): - # Loop over the residues of the molecule. - for i in xrange(len(mol.res)): - # Rename the residue is there is a match. - if mol.res[i].num in residues or mol.res[i].name in residues: - number = number + 1 - - # Fail if multiple residues are numbered. - if number > 1: - raise RelaxError, "The renumbering of multiple residues is disallowed." - - # Molecule loop. - for mol in molecule_loop(mol_token): - # Loop over the residues of the molecule. - for i in xrange(len(mol.res)): - # Rename the residue is there is a match. - if mol.res[i].num in residues or mol.res[i].name in residues: - mol.res[i].num = new_number