Mnova DB scripts

Top  Previous  Next

The user will find in the Tools menu some useful scripts for the Database plugin:

 

Tools_DB

 

The Copy Database script will allow you to export databases to any destination:

 

copy Databases

 

You will have the capability to copy the entire database or just a few records.

 

The Search MS in chromatogram script will be useful to search for the MS spectra sitting under the major peaks of a chromatogram. You can select the scoring and tolerance settings and and also the selection mode and the maximum number of top hits per peak:

 

SearchMS

 

The "SDFile to definition" script takes an SDFile and outputs a database definition .xml file. The Database definition .xml file can then be used to create new databases into which the SDFile which can be imported by using Scripts/Database/Import SDFile, preserving 'all tags' and data. So, if you want to import all the tags of your SDF file into a Database, you will need to use this script.

 

Mnsr files can be played to the MnDB server by using the Play Mnsr File script.

 

From the Export section, you will also find some several scripts:

 

export_DB

 

The 'Export CSV' script will "dump" all the metadata information from a selected database into a text file format.

 

The Export Documents scripts will be very useful to export all the selected compounds of the Dabatase as Mnova documents into the desired directory:

 

Export DB

 

Export Assignments to Prediction Database

This script will be useful for example to export a third party prediction DB into the Mnova Prediction Database. For example, let´s import a SDF file containing all the assignments (you can see those assignments by loading the SDF file and following the menu 'View/Table Assignments'. The molecules and the assignments contained in the SDF file can be stored in a Database by following the steps below:

 

1.Create a DB definition from SDFile with "SDFile to Definition" script (under the 'Database/Scripts' menu).

2.Create the database with the desired definition by following the menu 'Database/Create/Advanced/Load' and selecting the xml file created in the step 1

3.Import the SDFile to the DB with "Import SDFile" script (under the 'Database/Scripts' menu)

4.Finally the assignments can be exported to a Prediction DB using the script "Export Assignments to Prediction DB":

 

import assignments into the prediction DB

 

You can also load the SDF file into Mnova containing several molecules with assignments and update the prediction Database by following the menu 'Tools/NMR Tools/Batch Update Prediction DB':

 

Update PredictionDB

 

From the Import section, you will find useful script to import files

 

import_DB

 

The Import Documents script will allow you to save to the Database Mnova documents from a selected directory.  This script looks for Mnova documents on disk, everything in the same document goes into the same database record:

 

Import DB

 

The Import Pages script will save all the pages in the current document to the current Mnova Database.

 

This script goes through the currently open Mnova document, creates a new record for each page, everything on the same page goes into the same database record.

 

The Import Files (by Location) will save to the database the desired type of files from a selected directory:

 

Import files DB

 

For the 'Path Mask'; you can use wildcards, so this could be, for example, .*\.mol$;  or just .*fid$ and click 'OK'. The $ symbol means in '.*fid$' that it will search for the FIDs that are stored at the end of the folders structure (valid for those cases where all the spectra of a given molecule are grouped in the same folder).

 

This script looks for main files matching the given path mask in the specified folder. Then, for each main file found, it looks for optional files according to the second path mask *relative to each main file location*. Depending on your situation, main files could be molfiles and optional files spectra, or vice versa. E.g. You have many spectra (main files), and for some of them you have a molfile (optional files). Or, you have molfiles (main files), and for each molfile you have zero, one, or several spectra (optional files).

 

E.g:

\Data\ABC123\ABC123.mol

\Data\ABC123\NMR\XBlah.fid

\Data\ABC124\Molecule.mol

\Data\ABC124\NMR\124.fid

\Data\ABC125\Whatever.mol

\Data\ABC125\NMR\Any.fid

 

The Import Files (pairwise) will import pairs of molecules and spectra (first spectrum with the first molecule in the applicable folder; second spectrum with second molecule and so on...) and will save them into the Database. Please bear in mind that you must have the same number of molecules and spectra.

 

Import Pairwise

 

You can use wildcards for the 'Path Mask', so this could be, for example, */10/pdata/1r, or just */fid, or */ser. Finally click 'OK' and all the selected spectra and molecules will be saved in the database.

 

It works exactly as the Multi-Open script: You give it two path masks and it will look for files of each type according to the corresponding path mask. Files are associated to each other by the order in which they are found. So there needs to be a 1-to-1 correspondence between spectra and molecule files. The order in which they are found is determined by the file names. You would use is this script if you have two folders (one for molecules and another for spectra) and the files can be associated witch each other via the file name.

 

E.g:

\Data\Molecules\ABC123.mol

\Data\Molecules\ABC124.mol

\Data\Molecules\ABC125.mol

\Data\Spectra\NMR\ABC123.fid

\Data\Spectra\NMR\ABC124.fid

\Data\Spectra\NMR\ABC125.fid

 

The 'ImportSD File' script will allow you to import to your Database the molecules contained in a SDF file.