NMR users rejoice!
In 2017, the Gerwick lab published a paper on the use of their system called SMARTnmr which uses some really nice pattern matching techniques to point you to a compound you have based on similarities of the HSQC spectra. Sounds like a cool idea right? Well, they’ve spent a lot of time and effort over the last year and some change to get this system up for others to use and have expanded the library of spectra to over 50,000 compounds! So, give it a try at smart.ucsd.edu - The documentation currently is set up for Mestrenova users and gives step by step instructions on how to get your data into the system.
But what if you’re not using Mestrenova? Well, if you’re using Topspin, I have a solution for you:
To make it as easy as possible for these users to be able to import their data, I've created a small script that utilizes Topspin's native python environment to do the heavy lifting.
Note: you can try changing the directories, but I found that sometimes the permissions don't line up too well. To circumvent this, the script puts peak lists a folder in the Bruker directory on your hard drive named SMART Peak Lists.You must change the directory to the relevant Mac directory if you are not on windows.
Step by Step on how to get these to work:
Navigate to your Topspin directory (in windows, this is "C:Bruker")
Create a new folder called "SMART Peak Lists"
Open Topspin and type 'edpy' - hit enter
In this dialog, go to the top right corner where it says "Source = [ combo bar filled with a few things] "
Select the option in the combo box that ends with /py/user
Go to File->New and name the script what you want (Hint: you can directly call the script from the input bar from now on, so call it something easy - I called mine SMART.py)
Copy the code into the box and hit save.
Open a data set that is peak picked to your satisfaction and type the name of your script into the input bar and hit enter. (I.E. 'SMART')
If you do NOT get an error message, it should say 'SMART.py: finished' in the lower left corner.
Navigate to the directory where your lists are stored.
You'll see the sample name of your open data set followed by "_Peaks.csv"
Submit them into the website and rejoice.
After the first success, you'll be able to simply open a data set and type 'SMART' and your lists will be generated and given the right sample name, ready for the SMART server.
The Script:
import csv, os
curdat = CURDATA()
Peaklist = GETPEAKSARRAY()
SMART_PATH = os.path.abspath("C:\Bruker\SMART Peak Lists") #This is what you change if you are on MAC or wish to give the directory a different name.
Dest_Path=os.path.join(SMART_PATH,str(curdat[0])+'_Peaks.csv')
with open(Dest_Path, 'w') as csvfile:
fieldnames = ['1H', '13C']
writer = csv.DictWriter(csvfile,fieldnames=fieldnames,lineterminator = '\n')
writer.writeheader()
for peak in Peaklist:
proton = round(peak.getPositions()[0],2)
carbon = round(peak.getPositions()[1],1)
writer.writerow({'1H':proton,'13C':carbon})