Is it possible in ccpn to get an average between two residues (i.e. 489-1 CB and 488CB) in the chemical shift table?
Not as such.
One option would be to merge those two NmrAtoms, but obviously only do that if you are confident about the assignment. Otherwise, if you un-assign it, the 489-1CBs will still be in the same NmrResidue as the 488CBs (which in an unassigned state they aren’t/shouldn’t be). But you could do SaveAs and basically create a bespoke project just in order to create the ChemicalShiftList. To merge your -1 residues use the following macro (make sure you change it to the correct NmrChain at the top):
nmrChain = get('NC:A') for nmrRes in nmrChain.nmrResidues: if nmrRes.relativeOffset == -1: if nmrRes.mainNmrResidue: mainSeqCode = int(nmrRes.mainNmrResidue.sequenceCode) newSeqCode = mainSeqCode - 1 for nmrAtom in nmrRes.nmrAtoms: nmrAtom.assignTo(sequenceCode=newSeqCode, mergeToExisting=True) nmrRes.delete()
Otherwise you could do a bit of a workaround whereby you create a new ChemicalShiftList and new NmrChain before merging, so that you don’t loose the previous information. You could do that in the following way:
- Right-click on your ChemicalShiftList and select Duplicate
- Create a new NmrChain, e.g. with name B
- Run the following macro, but make sure you have changed the top three lines to refer to the correct (new) ChemicalShiftList and NmrChains.
csl = get('CL:myChemicalShiftList') oldChain = get('NC:A') newChain = get('NC:B') for cs in csl.chemicalShifts: if cs.nmrAtom: print(cs.nmrAtom) if cs.nmrAtom.nmrResidue.nmrChain == oldChain: seqCode = cs.nmrAtom.nmrResidue.sequenceCode resType = cs.nmrAtom.nmrResidue.residueType atomName = cs.nmrAtom.name isotope = cs.nmrAtom.isotopeCode nr = newChain.fetchNmrResidue(sequenceCode=seqCode, residueType=resType) na = nr.fetchNmrAtom(name=atomName, isotopeCode=isotope) cs.nmrAtom = na for nmrRes in newChain.nmrResidues: if nmrRes.relativeOffset == -1: if nmrRes.mainNmrResidue: mainSeqCode = int(nmrRes.mainNmrResidue.sequenceCode) newSeqCode = mainSeqCode - 1 for nmrAtom in nmrRes.nmrAtoms: nmrAtom.assignTo(sequenceCode=newSeqCode, mergeToExisting=True) nmrRes.delete()
But unfortunately, this method has the problem that he two ChemicalShiftValues will simply be averaged as they are. Whereas if you do the merge with the original ChemicalShiftList, then you still have the links to the Assigned Peaks and the averaging will be based on all the individual peak values.
So simple merging (and possibly creating a new project for the merge) might be your safest bet.