Nanoscope

Table of Contents

The Nanoscope is the 3D visualization tool in Virtual NanoLab. The Nanoscope can, for example, be used for visualizing

Different kinds of plots may be displayed simultaneously, implying that you, for example, can view both the electron density and the wave functions superimposed on the geometric layout of the molecule, bulk, or two-probe system.

The general functionality of the Nanoscope, including context menus, is common for all 3D plot windows in Virtual NanoLab; the difference between different tools lies in which plots are available. Tools have different ways of showing the geometry, and some tools (including the Nanoscope itself) provide additional functionality to the context menus. These additional features are described in the associated sections of this manual.

A thiophene molecule visualized in the Nanoscope. The atoms have been plotted with a small, constant radius in order not to obscure the contour plot of the effective potential and the volume plot (red and blue) of the LUMO orbital.

Figure 41: A thiophene molecule visualized in the Nanoscope. The atoms have been plotted with a small, constant radius in order not to obscure the contour plot of the effective potential and the volume plot (red and blue) of the LUMO orbital.


The Nanoscope can be viewed as a camera through which you look at the atomic system. The position and direction of the camera relative to the system determines how the molecule and other plotted quantities appear. The camera can zoom in or out, and may also be rotated and moved (panned) in order to obtain a different view of the system. All the commands for controlling the camera are described in the section Rotating, panning and zooming the camera.

To see the absolute position and element of an atom displayed in a 3D window, hover the mouse over the atom; a small text box will appear, showing the position information.

The Nanoscope is invoked either

Some plots appear directly in the Nanoscope when you either drop a NanoLanguage script on the Nanoscope tool icon or invoke a Nanoscope from another tool such as the Atomic Manipulator. Further plots may be created from within the Nanoscope by using the context menu.

A central concept in the 3D windows is plots. This term is used in Virtual NanoLab not only for plotted quantities such as the electron density, but for any 3D graphical element, including the coordinate axes and the atoms. In addition, each plot may have sub-plots; for example, a plot of a bulk atomic configuration has sub-plots “atoms”, “bonds”, and “unit cell”, while a two-probe plot contains each electrode as a sub-plot, which themselves have sub-plot for atoms, bonds, etc. By choosing Properties from the Nanoscope context menu (right-clicking any part of the 3D window), all plots and sub-plots are present in a tree structure, where you can view and change the relevant parameters of each plot, and also insert, delete, and rename plots. Some of these commands are also directly available from the context menu:

[Note] See also

Inserting plots

When you drop a configuration on a Nanoscope icon on the Toolbar or invoke the Nanoscope from another tool such as the Atomic Manipulator, the plot related to the requested action will appear in the Nanoscope.

It may often be of interest to insert plots for different representations of the same or other quantities. New plots are inserted in the Nanoscope through the Insert Plot context menu, whereas the parameters of existing plots can be modified via the Properties entry in the context menu.

For any system, the context menu Insert plot always contains entries for inserting plots showing the configuration (i.e. the configuration geometry) and the coordinate axes.

If calculations have been performed on the configuration, the context menu Insert plot contains three additional submenus:

  • Contour plot

  • Isosurface

  • Volume plot.

For each of these, several different items may appear depending on the symmetry and the calculations performed on the configuration

  • Real space electron density

  • Electrostatic difference potential

  • Real space effective potential

In general, these calculated physical quantities are three-dimensional functions, i.e. the dependent variable is a function of all three spatial coordinates. To plot such relationships directly is obviously impossible, but different representations of the function can be shown instead. In the Nanoscope, you may choose to represent these functions as a

When a menu item is selected to insert a new plot, a dialog appears which allows you to change certain parameters related to the particular type of plot in question. There is, however, one common parameter for all types of plots, namely the plot title. By default, a plot title based on the plot type and the plotted physical quantity is suggested (edit the title and give it a new name if you wish). The title of each plot is what appears on the Plots context menu, where you hide or show plots. The title is also used to label the different entries in the Properties tree, where the parameters, including the plot title itself, may be modified.

It is possible to insert more than one plot of the same type for the same physical quantity; in this case, an integer counter is automatically appended to the title to allow separate plots a unique identifier. Again, you may edit the plot title when the new plot is inserted (nothing prevents two plots from having identical titles).

While a plot is being prepared for insertion, a preview of the new plot can be shown in the Nanoscope by pressing the Show button, or by forcing a redraw of the Nanoscope window by e.g. moving the dialog box, or zooming or rotating the camera. You may undo your changes by pressing Cancel; only when you press OK will the new plot be created.

Contour plot

A contour plot is a two-dimensional cut of a three-dimensional function, where the function values in the cut plane are represented by color values. Contour plots are inserted via the context menu Insert plotContour plot in the Nanoscope.

The cut plane is defined by a normal direction and an origin (the point where the surface normal intersects the plane) both of which are specified in the dialog, either directly in Cartesian coordinates (in Ångström) or relative to the lattice vectors (scaled coordinates). In order to interpret the results properly, it is important to keep the system orientation in mind when choosing the surface normal to cut plane. For this reason, it is highly recommended to align the molecular axis symmetrically to the coordinate axes. To verify the system orientation, include the atomic configuration in the plot,

The coloring of the contour plane is controlled by the Color by option (see the related help section for information about the Color bar). For periodic systems and two-probe systems, it is possible to specify how many times the plot should be repeated in each of the three directions (denoted A, B and C in the program) specified by the lattice vectors.

A contour plot representing the electron density of a thiophene molecule. The colors represent the value of the density on the cut plane.

Figure 42: A contour plot representing the electron density of a thiophene molecule. The colors represent the value of the density on the cut plane.


Isosurface plot

An isosurface is a method for visualizing a three-dimensional function by displaying a surface where the function has a specified value (the isovalue). The function may be either real or complex.

Isosurface plots are inserted via the context menu Insert plotIsosurface in the Nanoscope.

In the dialog, you may adjust the isovalue and the coloring of the isosurface which is controlled by the Color by option; also see the related help section for information about the Color bar. For periodic systems (including two-probe systems) it is possible to specify how many times the plot should be repeated in each of the three directions defined by the three lattice vectors (denoted A, B and C).

An isosurface representing the electron density of a thiophene molecule.

Figure 43: An isosurface representing the electron density of a thiophene molecule.


Volume plot

In a volume plot, a three-dimensional function is illustrated by plotting points with a point density determined by the magnitude of the function.

Volume plots are inserted via the context menu Insert plotVolume plot in the Nanoscope.

The option Use shading adds shading to the 3D plot. It is computationally more demanding and therefore turned off by default, but also gives the plot a better look. Note, due to limitations in the underlying graphical engine, only a single volume plot can be visible at any time.

The coloring of the volume plot is controlled by the Color by option; see also the related help section for information about the Color bar.

A volume plot representing the electron density of a thiophene molecule. The color represents the magnitude of the density.

Figure 44: A volume plot representing the electron density of a thiophene molecule. The color represents the magnitude of the density.


Atomic configuration plot

The configuration atoms, bonds, and unit cell (if applicable) are automatically displayed in the Nanoscope if a configuration is dropped on the Nanoscope icon. For samples imported from older versions of Virtual NanoLab, this menu may sometimes contain several entries, but it is a simple matter to locate the relevant one by inspection.

When inserting configuration plots, there are not really any options to modify, except the repetition (see below) for bulk and two-probe systems. However, once the plot has been inserted, there are several properties that can be configured via the Properties context menu.

An Atomic Configuration plot usually has several sub-plots, corresponding to the various parts of the system. In particular, this is noticeable for two-probe systems where each electrode and each molecule in the central region appear as sub-plots of the system. In addition, each electrode plot has sub-plots corresponding to the electrode and surface configurations, respectively.

The visibility of each sub-plot can be set individually. In addition, the plot parameters of the atoms, bonds, and unit cell of each sub-plot can be set independently.

The Atom sizes can be specified as Constant radius, in which case all atoms will be displayed with the same radius (in units of 0.1 Å). With the Covalent radius option (which is the default), the atoms are displayed according to the size of their valence orbitals. The van der Waals radii are larger and this selection gives a space filling look of the material. Constant radius is suitable for a "ball-and-stick" representation; alternatively, with a sphere radius equal to the tube radius a “simple sticks” representation is obtained. Covalent radius is suitable for a “touching spheres” representation.

The boundaries of the unit cell are visualized either as tubes with a specified radius (in units of 0.1 Å) or as sticks (if the tube radius is set to zero). You can also change the labels printed at the corners of the unit cell; by default, these are set to A, B, and C, respectively.

A chain of lithium atoms with the unit cell displayed. The unit cell has been colored yellow.

Figure 45: A chain of lithium atoms with the unit cell displayed. The unit cell has been colored yellow.


In the lowest panel it is possible to change certain aspects of the Appearance of both atoms, bonds, and unit cells. These options are common for several plot types and are therefore described in a separate section.

Thiophene molecule plotted with the atom size determined by the covalent radius.

Figure 46: Thiophene molecule plotted with the atom size determined by the covalent radius.


Thiophene molecule plotted with the atom size determined by the van der Waals radius.

Figure 47: Thiophene molecule plotted with the atom size determined by the van der Waals radius.


Thiophene molecule plotted with a constant atom size (25) and bonds as tubes with size 12.

Figure 48: Thiophene molecule plotted with a constant atom size (25) and bonds as tubes with size 12.


Coordinate axes plot

The coordinate axes may be useful determining the orientation of a complex geometry, in particular for systems described by non-orthogonal lattice vectors. By choosing Insert plotAxes from the Nanoscope context menu you may insert Cartesian (x, y, z) coordinate axes at an arbitrary point in the geometry.

It is also possible to adjust the position of the origin (in units of Ångström), the label of the origin, axes lengths (in units of Ångström) and the axes labels. The outlines of the coordinate axes are visualized with either tubes with a specified radius (in units of 0.1 Ångström) or sticks (if the tube radius is set to zero).

The coordinate axes are assigned the following colors: red = x, yellow = y, and green = z.

Modifying plots

Once a plot has been inserted, you may change its parameters by choosing Properties from the Nanoscope context menu. If you right-click on a plot (such as an atom, or a contour plane), the corresponding plot will automatically be selected in the appearing Properties. Note, once that dialog is opened, you can freely select and modify any other plot from the tree in the left-hand side panel.

As the tree structure indicates, a plot may have sub-plots. For example, a plot of a bulk atomic configuration contain sub-plots for “atoms”, “bonds”, and “unit cell”, while a two-probe plot contains each electrode as a sub-plot; these themselves have sub-plot for atoms, bonds, etc. Plots can be deleted or renamed by right-clicking their entries in the tree view (only plots can be deleted, not sub-plots).

When you change a parameter, the plot itself does not change immediately, but similar to plot insertions, you may press the Show button (or force a redraw of the Nanoscope window by e.g. rotating the camera) to see how the change will influence the appearance of the plot. You may still undo your changes by pressing Cancel; only when you press OK will the changes take effect permanently.

For more information on the parameters that are available for each type of plot, see the help pages related to inserting each individual plot type:

Coloring of three-dimensional plots

Different types of three-dimensional plots have different available options for coloring:

  • Magnitude: available for all types of functions.

  • Phase: available for complex functions, such as wave functions.

  • Sign: available for real functions.

  • Value: available for real functions.

As with other plot options, the coloring can either be specified when the plot is created, or through the Properties context menu entry for existing plots.

For isosurface and contour plot, the Color field in the Properties dialog also contains options for changing both the color map itself as well as the range of function values that are mapped to a given color map:

  • Use the Color scheme drop-down list to select a desired color map.

  • Change the range of function values mapped to a given color map by editing the text fields Minimum and Maximum.

In order to translate the colors to values, it is possible to insert a color bar (inserted by default for contour and volume plots). The color bar can be placed either above, below, to the left, or to the right in the plot window. The program will automatically try to avoid positioning two color bars at the same location, but if too many plots are defined, it is up to the user to ensure that the desired information can be visualized.

See also:

Changing the appearance of plots

Virtual NanoLab always chooses a default appearance for each plot type displayed in the Nanoscope. By “appearance”, we refer to the coloring, shading, surface representation, lighting, and other visual properties of each plot object. Some of these settings can be fine tuned to highlight a particular feature of the results.

The appearance of an object (such as atoms, bonds, a unit cell, or a three-dimensional plot) is changed in the Properties dialog, accessible from the Nanoscope context menu.

By default, surfaces are represented as surfaces, but it is also possible to plot the grid that defines the surface by choosing wire frame in the Representation list (see the figure below), or the grid points themselves by choosing the point representation.

When Shading is flat, the surface is represented as polygons, while Gouraud (default) and Phong shadings interpolate the polygons and thereby give a smoother look. The Opacity setting controls the transparency of the object (when the slider is moved to the far left, the object is completely transparent (not opaque).

For unit cells, you can also change the coloring of the tubes that enclose the cell as well as the color of the lattice vector labels.

A water molecule plotted with a wire frame representation of atoms and flat shading of bonds.

Figure 49: A water molecule plotted with a wire frame representation of atoms and flat shading of bonds.


As with all options in the Properties menu, the plot itself does not change immediately when you change an option; instead, you need to press Show in order to inspect how the changes influence the appearance of the plot. You may still undo your changes by pressing Cancel; only by pressing OK will the changes be permanent.

Controlling which plots are displayed

It is possible to create a large number of plots in the same Nanoscope, but it is not always desirable to view them all at the same time. Therefore, it is possible to select which plots are visible.

An easy way to hide or show plots is to enable the corresponding entry in the Plots context menu, which also contains handy commands for making all plots either visible or hidden.

In addition, each plot has a setting called Visible in the Properties dialog. Note, for Atomic Configuration plots, there is one overall visibility setting. You may, however, choose to hide either of the sub-plots. For example, you can hide the bonds and the unit cell while still showing the atoms.

Rotating, panning, and zooming the camera

The 3D plot windows work in the same way in all tools in Virtual NanoLab.

The camera is rotated, zoomed, or panned using the mouse:

  • To rotate the camera angle, hold down the left mouse button and move the mouse around to obtain the desired view angle.

  • To zoom in and out, scroll the mouse wheel. Alternatively, hold down Ctrl, press the left mouse button and move the mouse backwards and forwards.

  • To pan the camera across the view, press the middle mouse button (or hold down Shift and press the left mouse button) and move the mouse.

[Note] Note

Initially, it may be a bit difficult to master the mouse actions required to obtain a desired view; but with practice, the movements should appear intuitive.

To reset the camera position and zoom level to their defaults, press Ctrl-R or choose CameraReset from the context menu. The command preserves the camera orientation.

Exporting and printing 3D plots

Virtual NanoLab has two different modes for exporting the 3D plots shown in the Nanoscope and in the 3D preview windows in the other tools:

Exporting

If you want to export the image in a format that easily can be incorporated in another document, select CameraExport from the context menu (or press Ctrl-E). This will save the plot exactly as rendered on the screen, with an option for magnifying the image for better resolution.

Use the appearing dialog for specifying the name and location of the exported file. Set the image size (and consequently the resolution) by specifying the Magnification factor. Bear in mind that the file size may increase dramatically when changing the resolution, especially for uncompressed image formats.

The file format of the exported image is determined by the extension. Currently, the following standard bitmap formats are supported, with some advantages and disadvantages listed to assist in the choice of format for different purposes:

  • PNG (Portable Network Graphics): Loss-less compression, suitable for publication on web pages and for printed media. This file format is the default if no extension (or, notably, an unknown extension) is given.

  • TIF or TIFF (Tag Image File Format): Uncompressed, not possible to use directly on web pages, suitable for high-resolution reproduction.

  • EPS or PS (Postscript): Uncompressed, not possible to use directly on web pages, suitable for printed publications.

  • JPEG or JPG (Joint Photographic Expert Group): Lossy compression, possible to use directly on web pages (although png is preferable), not suitable for printed publications due to lossy compression.

  • PNM (Portable Anymap File Format): Uncompressed, may sometimes be useful as a temporary format for conversion to other formats.

  • BMP (Windows bitmap): Uncompressed, not possible to use directly on web pages.

Printing

Printing is intended for hard copy printout and uses the Postscript format. To print the image displayed in a 3D window, choose CameraPrint view from the context menu (or press Ctrl-P).

By default a white background color will be used, but another color may be specified in the Camera settings dialog, where the magnification factor can be changed to a high-resolution reproduction.

Exporting and printing 2D plots

In addition, 2D plots displayed in Virtual NanoLab can be printed or exported to various file formats.

To export a 2D plot, right-click the plot and choose Export plot from the context menu, and specify the name and location of the exported file. There is also an option to specify the file format of the exported image and (for bitmap formats) the resolution in dpi (dots per inch). Currently, the following formats are supported:

  • PNG (Portable Network Graphics): bitmap format, loss-less compression, suitable for publication on web pages and for printed media. This file format is used if no file format is specified (using the All files (*) option).

  • EPS or PS (Postscript): fully editable vector format with infinite resolution, not possible to use directly on web pages, suitable for printed publications.

To print the plot, instead choose Print plot from the context menu.

Camera settings

Some global camera settings for the 3D plot windows can be controlled via the root entry in the plot tree view shown in the Properties dialog opened via the context menu.

Rendering

  • Use stereo: A stereo 3D image can be obtained using various techniques. The Red/Blue mode requires that you use special Red/Blue glasses. The mode can also be used for creating respective hard copies for the left and right eyes. The Interlaced, Crystal Eyes, and Dresden modes all require special hardware.

  • Background color: The background color used for the Nanoscope main window or the Preview window in the Atomic Manipulator. The background color used for hard copies (printing) is specified independently in the printing preferences (see below).

  • Light follows camera: When disabled, the light source will be kept fixed at the current position, until it is “picked up” by selecting “Light follows camera” again. This means that you can position the light by moving the camera to the wanted light position and then deselect “Light follows camera” before moving the camera to the wanted view position. By default (i.e. when this option is ticked), the light source is placed on the camera, so the plots are illuminated from the view point.

  • Two sided lighting: If two sided lighting is off, then only the side of a surface facing the light source will be lit, while the other side is not illuminated. If two sided lighting is on, then both sides of the surface will be lit.

  • Performance: Usually it is desirable to favor high computational speed. If you are not satisfied with the performance of the program and you have an older computer with limited memory resources, you may prefer low memory usage. The desired frame rate controls the level of detail when manipulating objects (such as rotating or moving them), a lower number meaning higher detail. The object is always rendered with highest resolution when it is not being manipulated, i.e. when it is standing still.

Printing

The default background color for hard copies is white.

The Magnification factor allows for high resolution images. The magnification specifies the increase in resolution relative to the screen resolution. Please note that using a large magnification factor will put a very high demand on memory, and may cause the program to crash if insufficient resources are available.