Something like this seems to work? (Takes the centered res for the mol no.)
def mutate_all_mets_to_mse():
mol_id=active_residue()[0]
for ch_id in chain_ids(mol_id):
for resn in range(0,chain_n_residues(ch_id,mol_id)):
if (resname_from_serial_number(mol_id,ch_id,resn)=="MET"):
mutate(mol_id,ch_id,resn,'',"MSE")
mutate_all_mets_to_mse()
|