Thursday, August 1, 2013

Jmol-NBO Visualization Helper



Recent string of posts detailed different aspects of natural bond orbital (NBO) visualization. In one example, JmolApplet was built for web visualization. In another, Jmol scripts were generated for a simple copy/paste transfer to Jmol macro files. The last example presented java application for direct generation of Jmol macros. This post expands on the last example and introduces new, full featured java application:

 Jmol-Nbo Visualization Helper
Typical imagery based on Jmol-Nbo Visualization Helper macro files.
Fig. 1 Jmol-NBO Visualization Helper GUI.


As earlier versions, Jmol-NBO Helper is written in Java and compiled with JDK7. Successful run requires having the latest version of Java installed on your computer. Jmol-NBO Helper was developed and tested in java environment of Windows 7 and Linux systems.

Installation involves unpacking files from JmolNboVHelper.zip archive  (see download section at the bottom) and placing them into any disk/directory on your system. Recommended  location is c:/nbo/JmolNboVHelper.
Requirements for a successful visualization of NBOs are Jmol and NBO PLOT files.
Jmol-Nbo Visualization Helper is a Java application that generates sets of Jmol .macro files that assist with generating orbital images in Jmol molecular viewer. Specific NBOs and NBO-NBO* pairs can be easily visualized and their interactions analyzed. Additional features include options to write .macro files into the default Jmol directory and to inspect source .nbo files for the key properties associated with NBO orbitals. The application has also options for visualization of 2-D contour images in customizable planes and an option to generate imagery for spin-polarized unrestricted solutions (alpha and beta spin orbitals). Java app GUI is now running both under Windows and Linux systems.



Overview:

Jmol-NBO Helper features two distinct tabs, Jmol Setup and NBO Analysis (Fig. 1). Jmol macro files are created from the first tab, selected NBO outputs can be retrieved on the NBO Analysis tab. By clicking the "1. Browse Dir" button on the Jmol Setup pane (A), browse for the desired PLOT file on your computer. Choose any of the related plot files in range of .31-.40. Selected filename and its extension are parsed into the corresponding fields (2 and 3). Alternatively, select the requested basis from drop-down menu (B) and the logical file name (LFN) in 3 will be updated accordingly (Fig. 2).

Fig. 2 Inputs

After a succesful run, when Jmol-Nbo Helper is opened the next time,  filename and file extension from the previous run will be retrieved and filled into fields 12, and 3. Next step involves selecting individual orbitals or range of orbitals in format 1,2,5,9 or 1-9, respectively. Homo and Lumo abbreviations are also allowed (Fig. 1). At the lower part of Jmol Setup panel, choose whether to write macro file(s) into Jmol default .macros directory (typical use) and if you want previously created macros be overwritten (i.e, clear the default directory). If none of the check boxes is selected, macro files will be written into the directory of .31-.40 files. Press "Create" (C) and set of macro files will be created. Confirmation message will appear in the text box at the bottom.

Orbital Interactions:

Now, let's move to options for creating imagery of orbital  interactions. "NBO Interactions?" box is the key in instructing Jmol to display two orbitals of your choice at the same time. This feature is useful for inspecting Donor-Acceptor pairs as seen in the center image of the main application interface (Fig. 3). First, check the "NBO Interactions?" box then select interacting pairs and enter them into field "Orbital pairs". Format is D:A, D:A (columns and commas). For any visualization in Jmol, selection of background color is optional. Default is dark blue background.  "Turn axes on" and "Labels OFF" options are self-explanatory. As with the single orbitals, check the "Default directory", "Clear default directory" boxes, and press "Create".
Fig. 3 Options for interacting orbitals

In case that D-A orbitals overlap with opposite signs (i.i, positive lobe with negative one, blue with yellow), use suffix i appended to the orbital number that you want the sign be inverted (e.g., 12:87i will invert sign of orbital 87).


Contours:

Generation of macro files for contour imagery is a new addition to the Jmol-Nbo Helper. For either single or interacting orbitals, checking "Contours" box will lead to additional 2-D orbital imagery (Fig. 4). Both surface (s) rendered and contours (c) images will be available. With "Contours" check box selected, choose definition of the plane onto which contours will be projected. Plane can be defined by atom numbers, atom numbers in combination with XYZ coordinates, just XYZ coordinates for each point, or by non parametric plane equation.
Due to the need for the plane definition, note that only one orbital or one orbital pair should be generated at the time. For one orbital only, use the field "Orb 1" to define projection plane (Fig. 5). For interacting pairs, plane for each orbital is defined in "Orb 1" and "Orb 2" fields. Scaling of projection contours is done experimentally for each orbital. While default values (Low, High) are often satisfactory, feel free to change limits to fit your requirements.

Fig. 4 Contours and plane definition

Fig. 5 Contours and scaling

Just underneath the Contour area is "NBO6 Surfaces (now Surfaces)" check box for including cutoff option to 3-D surfaces (Fig. 6). While this may be only a temporary option, it can be used in general to affect the size of orbital lobes. The greater the number, the small is orbital lobe.
Fig. 6 Cutoff values for Jmol orbitals

NBO6 Surfaces option has been changed in ver. 1.0.2. Surface scaling is now optional as normalization of primitives was fixed in NBO6. History of changes on NBO6 web site says: "Errors in PLOT, NJC, and NBCP output arising from inconsistencies in normalization of Gaussian primitives from different ESS hosts have been eliminated. The current code renormalizes GTOs as necessary to insure consistent results for all ESS hosts".



Output Analysis:

NBO Analysis pane was added to guide users with selecting orbitals and the corresponding numbers for input into Jmol Setup tab.

First, load the .nbo or .out file that corresponds to PLOT files used for NBO imagery (A). Path and filename are again saved in local xml file and will be retrieved in the next session. Next, choose one of the radio buttons indicating the requested information from the nbo/out file (B). By clicking "Run" button (C), selected output will be printed into the text field below.
Fig. 7 Content of the NBO output file

At the bottom of NBO Analysis tab, there are two free-text fields where you can make notes about selected orbitals and pairs. Copy and paste your list(s) into designated fields on the Jmol Setup tab.

Fig. 8 Running macros from Jmol.

Once done with generating macro files, launch the Jmol and go to Macros drop-down menu. Earlier created files will be listed by their abbreviated file names. Just click the macro name and further adjust created images from Jmol console or menus.


Current version 2.1


Version 2 of the JmolNbo Visualization Helper added an option to analyze open-shell NBO output. By checking the box "Open-shell?" in the lower part of the JmolSetup tab (Fig. 9), content of the loaded lfn file (section 3.) will be parsed for the corresponding alpha and beta sections and two lfn files will be created (e.g., filename_a.37 and filename_b.37). New files are created in directory from which the original lfn file was loaded from (1. Browse Dir). Accordingly, two macro files for each initial (α + β) NPA output will be created and can be visualized in JmolViewer.

Since new files are written to the directory containing .31-.46 files, make sure that the folder is given -write permission (Linux users).

Fig. 9  Option to create two separate alpha and beta spin sets and orbital imagery.

NBO Analysis tab now prints different portions of the NBO output file (.nbo or .out) with sections for α and β spin sets (Fig. 10). As a result of such separation, values are not anymore sorted. NBO output files (closed-shell and open-shell) are automatically recognized and parsed accordingly.

An example of open-shell system (HF+ radical cation) is part of the application download.
Fig. 10  Details of the Natural Bond Orbitals summary output for two spin systems.

Exemplary images for α-spin orbitals 5 and 6 of HF+ radical cation are shown in Fig. 11.
Fig. 11  2D countours and 3D images of alpha spin set for NBO 5 and 6 of HF+ radical cation.

Enhancements in version 2.1 include the option to generation Jmol scripts to output .x3d and .jvxl files for visualization of Natural Bond Orbitals in web browsers. As for version 2.1, the GUI is shown in Figure 12
Fig. 12  Details of the application's main panel.

While not directly implemented in Jmol-NBO Visualization Helper, Gary Breton has described a creation of multiple orbital surfaces using combination of Jmol and Visualization Helper.

Downloads:

To download the latest version of Jmol-NBO Visualization Helper, please visit the NBO Scripts and Handy Applications web page at http://www.marcelpatek.com/nbo/nbo.html
Since the version 1.3, both Windows and Linux .jar files are part of the .zip download file. W suffix refers to the Windows OS, Ub/Lin suffix refers to the Linux (Ubuntu) OS.



Video Tutorial:






References:


  • Jmol: an open-source Java viewer for chemical structures in 3D.
  • Jmol/JSmol interactive scripting documentation.
  • F. Weinhold and C. R. Landis, Discovering Chemistry with Natural Bond Orbitals (Wiley-VCH, 2012), 319pp.
  • References at NBO6 Website.
  • NBOView and NBOPro are "gold" standards for creating NBO imagery and analysis of NBO outputs both originating and expanding concepts and software of Frank Weinhold.
Back to TOP

No comments:

Post a Comment