The user will be able to change or create his own multiplet report templates; by following the menu ‘Script/Edit Script’. From Mnova 5.3.2, it will be possible to easily add new multiplet scripts to the Mnova interface (multiplet menus for example). This enhancement in the script feature will make the handle of the scripts easier for the user. It will be easier to share your scripts with another users and with this new feature it will be possible to add new possibilities in the future. You can see below how to add a new multiplet reporter to the Mnova GUI. 1. Follow the menu ‘Script/Edit Script’ to launch the ‘Script editor’.
2. Write your own script or edit the example ‘customMultipletReporter.qs’ under the script folder of Mnova (Mnovaexamplesscripts). Do not forget to include the below sentence in the script; in order to add the reporter to the program: Env.MultipletReportersArray.push(new MyMultipletReporter()); We have created a variable in the scripts which saves a list of the known reporters. To see the list, just type in the editor: print(Env.MultipletReportersArray)
See below how to edit this script.
3. Save the resulting script (for example ‘My Multiplet Reporter’) in a directory where Mnova will be able to find it and restart Mnova. To add new script directories follow the menu ‘Scripts’Scripts Directories’:
4. The script will be automatically added to the Mnova GUI (for example, to the ‘Multiplet Table/Report Special/Setup’ menu). This will allow you to select the ‘Multiplet Report’ format for your analysis. Of course, you can add as many different scripts as you need.
Please bear in mind that the multiplet format that you select on this dialog box, will be applied always when you select the ‘Multiplet Report’ option; however you can select any other formats for individual reports (without changing the default one) just by following the menu ‘Scripts/Report/Multiplets’ and selecting the desired format for that report. Let’s see how to create a new multiplet reporter script from the example ‘customMultipletReporter.qs’ (stored at the ‘example/scripts’ folder of Mnova) :
Firstly, we are going to change the name of the ‘Multiplet Reporter’ and the message which appears at the beginning of the Multiplet Report (customMessage) to ‘My Report’ and ‘My Journal’ respectively’ (see the text below highlighted in yellow)
this.onlyElementName=false; changing false with true, we will obtain only the element name without the atomic mass (For example: H, C instead of 1H, 13C). The function: this.font = “<font style=”font-size: 10pt; font-family: Times New Roman”>”; will define the font size and the font family of the multiplet report. We are going to change the font of the multiplet report to 14pt and Arial:
will define the font size and the font family of the multiplet report. The line: this.header = this.customMessage+ “%1 NMR (%2 MHz, %3) δ “; is used to print the header of the report, where %1 will be the nucleus (H or C), %2 the frequency of the spectrometer (in MHz), and %3 the solvent, followed by a delta symbol (d). For example: “1H NMR (500 MHz, CDCl3) ?”. Let´s modify the header of the report by putting the ‘delta’ symbol in italic:
We can also modify the way to report the multiplet infomration
The sentence: this.reportRange = true is used to obtain the multiplet range instead of the chemical shift. The functions: this.withoutJsTemplate = ” %1 (%2, %3H)” and this.withJsTemplate = ” %1 (%2, %4, %3H)” are used to customize the appearance of the multiplet report by changing the positions of %1, %2, %3H, or %4 (where, %1 means: chemical shift; %2 means: type of multiplet (s, d, t, etc); %3H means: number of hydrogens and %4 means the coupling constant value). As you can see, the first line shows a multiplet without coupling constants, (while the last line shows a multiplet with coupling constants). So, if you need to obtain something like this (japanese format): 1H NMR (300 MHz, Solvent) d ppm 6.43-6.22 (1 H, m), 3.17 (1 H, q, J = 7.15 Hz) etc… You should modify both lines, as you can see below:
If you prefer to obtain something like this: 1H NMR (300 MHz, Solvent) d ppm 1.23 (d, J = 1.2 Hz, 3 H), etc… Just replace the original lines with:
You can also customize the coupling constant format:
To obtain the coupling constant symbol in normal instead of ‘italic’, just modify the script by removing the italic format (<i>J</i>). If you prefer to obtain it in “bold” just type: this.jListTemplate = “<b>J</b> = %1”; The following paragraph will be used to customize the appearance of the coupling constants list: The second line is used for the precision of the coupling constants values, the next will be used for the precision of the chemical shift and the remaining two lines will print the separation (coma, colon, dots, etc.) between the multiplets and the coupling constants values. If you need to obtain the coupling constants in descending order, replace ‘true’ with ‘false’ in the following line:
If you want to obtain the multiplet chemical shifts in ascending order, just replace the ‘false’ with ‘true’ in the script:
To obtain the multiplet range in ascending order, just replace the rangeMin with rangeMax in the below line of the script: shiftStr = this.rangeTemplate.argDec(multipletrangeMax, 0, ‘f’, this.deltaPrecision).argDec(multiplet.rangeMin, 0, ‘f’, this.deltaPrecision); It will be possible to select a multiplet report format as the default one, without allowing the user to modify it, just by removing the two slash symbols (before this sentence:Env.DefaultMultipletReporter = “My Multiplet Reporter”;). Please bear in mind that if you do that, you will not obtain any dialog box when you follow the Menu ‘Multiplets Table/Report Special/Setup’.
Indeed, the variable ‘Env’ contains several environment variables which can be used to customize the Mnova behaviour. Typing print(Env) in the Script editor, you will get the list of the available variables. In the example below, we have only defined the ‘Setup’ of the ‘Multiplet Reports’. All the remaining variables are ‘undefined’. You can define the ‘DefaultMultipletReport’ variable by uncomment this line in the script: Env.DefaultMultipletReporter = “My Multiplet Reporter”; Doing that, the user will not be able to modify the multiplet report. You can define the ‘ReportMultipletUser’ variable by uncomment this line of the script: Env.ReportMultipletsUser = customReportMultipletsUser; Defining this variable, you will have a format for the ‘multiplet report’ and the ‘copy special’ and another different (the default one) for the report which appears on top of the ‘multiplets table’. The ‘ReportMultipletUserSetup’ is the variable defined in the menu ‘Multiplet Table/Report Special/Setup’ for the ‘Multiplet Report’. The ‘MultipletLabelFunctions’ are different options (showed in the ‘Multiplet Properties’ dialog box) which allow the user to customize the information which appears in the multiplet boxes.