Visualization Plugin for Paraview Version 2.0
Total Page:16
File Type:pdf, Size:1020Kb
Alexey I. Baranov Visualization Plugin for ParaView version 2.0 Springer Contents 1 Visualization with ParaView ..................................... 5 1.1 ParaView plugin installation . 5 1.1.1 Installation of precompiled plugins . 6 1.1.2 Compilation of ParaView plugins . 6 1.2 Visualization . 7 1.2.1 Visualizing the Structures . 8 1.2.2 Basics of Grid Data Visualization . 13 1.2.3 Clipping in ParaView . 15 1.2.4 Saving state in ParaView . 15 1.2.5 Tips and Tricks . 15 3 Chapter 1 Visualization with ParaView The visualization of DGrid generated data can be performed with the freeware program ParaView⃝R which is available for many platforms including Microsoft Windows⃝R , Linux⃝R and macOS⃝R . An additional ParaView plugin is necessary for that. It provides routines which read DGrid file formats, adds handy ParaView filters and GUI controls. Plugin for the version 5.2.0 consists of the single shared (dynamically linked) library (earlier versions of plugin contain more files). The ParaView plugin installation is described in Sec. 1.1. Brief introduction into ParaView controls and basic visualization steps is given in Sec. 1.2. Detailed information about the ParaView can be found in the Internet at http://www.paraview.org. 1.1 ParaView plugin installation ParaView plugins are made available as a separate part of the DGrid package. There are two ways to deploy them: • Precompiled plugins are available for x86 32-bit and 64-bit versions of official builds of ParaView for Microsoft Windows and 64-bit version of ParaView for macOS X. At the time of writing this User’s Guide the version of ParaView 5.2.0 is supported. The x86 64-bit plugins have been tested on Microsoft Windows 7 Professional, Microsoft Windows 10 Home and macOS X 10.9.5. They can be downloaded from DGrid website as separate packages. The next subsection 1.1.1 describes how to install the binary plugin. • The plugins can be build from the source code. To do this, one has to build the ParaView from the source code in advance on the same machine. 5 6 1 Visualization with ParaView This is the way to obtain the plugins when pre-build binary plugins are not avail- able for target ParaView version or when customized build of ParaView is used (compiler or libraries differ from those for official built). See the Sec. 1.1.2 for instructions how to build the plugins from source code. 1.1.1 Installation of precompiled plugins When installing a precompiled plugin, download the package from the DGrid web- site and unpack it. Copy the plugin files 1: • SMMDGridPlugin (or libSMMDGridPlugin) • elf mk.xml into folder e.g. PVDGrid-5.2.0 ParaView should be informed about new plugins capable to work with DGrid files. One way to do it is to set up system variable called PV PLUGIN PATH to the path of that plugin folder. Another way is to load plugin via Plugin Manager (menu Tools – Manage Plugins ). ParaView Wiki (http://www.paraview.org/Wiki/Plugin HowTo#Using Plugins) con- tains additional information on loading plugins in ParaView. 1.1.2 Compilation of ParaView plugins First of all, download ParaView source code and build ParaView. Detailed instruc- tions can be obtained at ParaView website at http://paraview.org/Wiki/ParaView:Build And Install. To compile ParaView, some other software packages like Qt or CMake must be available. Then download the plugin source code from DGrid website, create a folder dgrid-4.6/PVDGrid and unpack the plugin source code into it. As for ParaView, plugin build process is controlled by CMake build control sys- tem (http://www.cmake.org) in which one should set up appropriate variables and 1 Plugin versions for ParaView < 5.2.0 include more files. 1.2 Visualization 7 then generate the build configuration files like Makefile under Linux or Microsoft Visual Studio solution file (*.sln) under Microsoft Windows. Usually, the only im- portant variable which has to be set up when configuring ParaView plugin build in CMake is the ParaView DIR which should point to ParaView build directory (and NOT to the ParaView source directory). Finally the plugin is build using the generated configuration file, e.g., invoking make command under Linux or opening the solution in Microsoft Visual Studio and building it. When everything runs successfully, plugin library file called SMMDGridPlu- gin or libSMMDGridPlugin should appear in the plugin build folder. Consult the Sec. 1.1.1 on how to configure the ParaView to use the plugins. 1.2 Visualization Start ParaView by typing paraview or clicking its icon. Load the DGrid plugin via ’Plugin Manager’ if it is not loaded automatically yet (cf. 1.1.1). ParaView plugin can visualize two types of files prepared by DGrid: • DGrid Property files containing the calculated properties on the grid. • DGrid Structure files (STR) containing molecular/crystal structures or topologi- cal graphs. To test plugins prepare some property grid (for instance the electron density grid for oxazole as described in DGrid User’s Guide). 1. Select the file to open (e.g. via menu File – Open ). 2. Select the grid file. It will be scanned and boxes representing data sets found in this file appear in the Pipeline Browser window. Normally each grid file contains ’Structure’ data set with the structure and ’Property’ data set with the scalar field on the grid (Fig. 1.1). A window may appears with the suggestion to select the particular format. Select then the appropriate DGrid format. 3. Press Apply button at the Properties tab to load the data. Some controls of the data set become then available at Properties tab. General information about data set can be found at Information tab. Remark 1.1. If the file is not listed in the selector box and cannot be chosen, se- lect All files (*) in the Files of Type menu of the selector box and try to open that file. This can happen if the file has the extention which was not recognized by ParaView. 8 1 Visualization with ParaView If there is a problem to load the file, check in the ParaView Plugin Manager (accessible via menu items Tools – Manage Plugins ) if the DGrid plugins were found and loaded. When plugins are not found, check how to add them to ParaView in the Sec. 1.1.1. When plugins are found but can not be loaded, consult Sec. 1.1.2 how to recompile them or reinstall the proper version of ParaView. The detailed instructions on the visualization of the grid data and the usage of all the tools is described in details in ParaView guide. A lot of valuable information can also be found at http://www.paraview.org (Wiki, Tutorials, FAQ). A brief guide how to create isosurfaces, slices and basins is given in Sec. 1.2.2. Following section describes the visualization of ’Structure’ data set with current ParaView plugin. Fig. 1.1 Visualization pipeline for structure plot and Atoms tab of ParaView plugin. 1.2.1 Visualizing the Structures Property files in DGrid format include also the structure data of the molecule or crystal structure. To visualize the structure, select the Structure data set in the Pipeline Browser and then apply ’Plot Structure’ filter to it (select from 1.2 Visualization 9 the menu Filters – Alphabetical – Plot Structure and press Apply on the Properties tab. Two additional data sets Ball-n-Stick and Labels appear in the Pipeline Browser . First contains the geometrical representation of molecular structure and second contains labels of the structure elements (Fig. 1.1). Structure plot appearance is controlled via Properties tab of PlotStructure data set. The option Map Scalars , which maps the colors assigned to visual objects using a colormap is activated by default. This means, that the color for an atom, bond, path etc. set at the corresponding tab of Plot Structure filter will be mapped and the object appears on the screen with different color. To switch this option off, select Structure pipeline object, go to its Property tab, find there the section Scalar Coloring (if it is not shown press the button with the gear symbol at the top of the tab to show all the properties of the tab) and uncheck the box Map Scalars . 1.2.1.1 Atoms tab The controls for the Atoms tab are shown in Fig. 1.1. • Desired atom can be selected using pop-up selector. • Each atom type has default radius and color. They can be changed via Set Radius field and Set Color button. • When several atoms of the same element type are present, a general name like ”All C” appears in the atom list. This item allow to set same parameters for all atoms of that element type. Please note, that this item will discard the actual parameters of specific atoms! 1.2.1.2 Bonds tab The controls for the Bonds tab are shown in Fig. 1.2. • Atoms forming bond can be selected using popup selectors Bond between . General names are also available just like for atoms. • Each bond type can have unique radius and color. They can be changed via Set Radius field and Set Color button. • The minimal and maximal bond lengths can be modified via Set Min./Max. Distance fields. 10 1 Visualization with ParaView Fig. 1.2 ParaView plugin – Bonds tab 1.2.1.3 Paths tab To visualize the interconnection paths first the file with the data for the critical points and the path points, written in the DGrid Structure format, must be read in. When file is read the Plot Structure filter can be started in the same way as in case of the structure data, cf.