Hi there,
Would it be possible to generate/ for someone more into python to write
a "wrapper" macro which allows to apply an assignment function to a
selection of peaks simultanously ?
I have been looking at getting two macros below written up and I get lost
in the code - not surprising since I have been avoiding dipping into it
untill now :/
I am using "Link Peaklists to Roots" function which is very nice, but
still quite repetitive at least for HNCACB NHcoCACB pair.
I was thinking of to macros:
"Set Atom Type" to a dimension of all of the selected of peaks would make
pickin/assigning this type of spectra much less mouse-laborious. Ideally
with an option to activate a little type-in-here window in which something
like F2 Cb can be typed right away.
Thats for people who are like me less than precise with mouse clicking.)
"Add to spin system":
also applied to a selection of peaks rather than to a single one.
Cheers
Krys
Just for loughs below is how far i managed to poach other macros/functions
for what needs to be in the first one:
"""Buckets need importing!"""
def setAtomTypesToPeaks(argServer=None, peaks=None):
"""Descrn: Assigns atom type to all selected peaks
Inputs: ArgumentServer, List of Nmr.Peaks, ???
Output: ??
"""
assert argServer or peaks
if not peaks:
peaks = argServer.getCurrentPeaks()
for peak in peaks:
""" select dimension """
assignType(???,???)
"""
In EditAssignmentPopup.py def assignType(self, atomSetMapping)
no idea what the arguments should be in here ???
Ideally would like a tiny type-in-here window to activate so I can
type eg F1 Cb right away, rather than click dim and then in the
Browse Atoms window
Create Gui needs adding to, see Tutorial macro openMyPopup, perhaps
"""
|