Renaming HN to H / synthetic peak list

My tip for the day having been puzzled by the failure to generate a synthetic peak list that had any peaks in it from an imported SPARTA+ prediction (made simple by Gary’s nef-pipelines) is the following code for renaming HNs to Hs.

In [11]: chain = project.getByPid(“NC:A”)

In [12]: for nmrAtom in chain.nmrAtoms:
…: if ( == “HN”):
…: nmrAtom.rename(“H”)

and yes, the SPARTA+ prediction was no help!

NB Luca gave a much more sophisticated version for renaming multiple atoms at once back in this thread

1 Like

Translation of atom names is coming (very slowly…)