Changing the assigned peaks to a new chain


Now I’m finished with the backbone assignment of the protein. Now I want to do a tiny thing that I don’t know if it is possible. I have all the peaks assigned and they are assigned to a chain called “A”. This chain was generated with the sequence of the protein but without the first methionine. Now I want to get the peaks assigned but with a chain that has this extra first methionine, so all the numbers of all peaks will increase in one unit.

Is it possible to do it?

Hi Alejandro,

at the moment it still isn’t possible to edit Chains (and the associated NmrChains with them). But of course you can simply delete your current Chain A and create a new one (also A) which has the correct sequence and numbering. (Or you could just create a new Chain B with the correct sequence and numbering.)
But this obviously won’t change the numbering of your NmrResidues, so they won’t initially match up. But you can change those with this little macro which will increase all the NmrResidue sequence codes (numbers) by one:

nc = get('NC:A')
newCh= 'NC:A'
for nr in nc.nmrResidues[::-1]:
    if not nr.relativeOffset:
        newSC = str(int(nr.sequenceCode) + 1)
        newRT = nr.residueType
        nr.moveToNmrChain(newNmrChain = newCh, sequenceCode = newSC, residueType = newRT)

If you are using a new Chain B, the you will simply have to change NC:A to NC:B in the second line.
To run the macro, simply go to Macro/New, then copy/paste the code above into the Macro editor and then press the green Play button to run the macro.
Alternatively, you can also just open the console by pressing the Space bar twice and then copy/paste the code into the lower part of the console and press Enter to run it.

Best wishes,

1 Like