Set up Asn/Gln side-chain NH2 groups

Here is a macro which will automatically group your Asn/Gln side-chain peak pairs into the same NmrResidue and rename the NmrAtom names and residue type.
Use this after setting up your backbone NH groups with the Assign / Set up NmrAtoms (shortcut SN).

Simply select the two peaks you want to group together and run the macro.

Python
  1. # A macro to automatically group two NH2 peaks in an HSQC into the same NmrResidue,
  2. # change the NmrAtom names to side chain names and change the NmrResidue type.
  3. # It assumes that the peaks have previously been assigned using Assign / Setup NmrResidues (SN)
  4. #
  5. # To run:
  6. # Select two NH peaks that belong to one NH2 group in an HSQC spectrum and run the macro.
  7. #
  8. # Options:
  9. # If you wish, you can change the new Residue type or Atom names in the top part of the marcro.
  10.  
  11. from ccpn.core.lib.ContextManagers import undoBlock
  12.  
  13. HDim = 0
  14. NDim = 1
  15. peak1 = current.peaks[0]
  16. peak2 = current.peaks[1]
  17. resType = `ASN/GLN`
  18. NAtom = `ND/E1`
  19. H1Atom = `HD/E21`
  20. H2Atom = `HD/E22`
  21.  
  22. with undoBlock():
  23. peak1NNmrAtom = peak1.assignmentsByDimensions[NDim][0]
  24. peak1HNmrAtom = peak1.assignmentsByDimensions[HDim][0]
  25. peak1NmrRes = peak1NNmrAtom.nmrResidue
  26. peak2NmrRes = peak2.assignmentsByDimensions[NDim][0].nmrResidue
  27.  
  28. peak1NNmrAtom.rename(value = NAtom)
  29. peak1HNmrAtom.rename(value = H1Atom)
  30. peak1NmrRes.residueType = resType
  31.  
  32. peak2NmrRes.delete()
  33.  
  34. peak2HNmrAtom = peak1NmrRes.fetchNmrAtom(name=H2Atom)
  35. peak2.assignDimension(axisCode=`H`, value = peak2HNmrAtom)




Vicky