On Mar 27, 2013, at 10:44 AM, Jean-Didier Maréchal wrote:
Hi all,
I have a problem with a prot and it seems that renumbering could help. I'd like to automatically add 230 to the residue number of the aa of my second chain. As I feared, when looping other residue to change res.id.position, my script fails as position can not be modified. How could I do this? Should I delete position and re-create it?
Though you can't modify res.id.position, you can overwrite res.id entirely. So something like:
from chimera import MolResId
for r in residues:
r.id = MolResId(r.id.chainId, r.id.position+230, r.id.insertionCode)
--Eric