Skip to content

Generation of visualization dashboards for reaction networks in AutoMeKin, including networks, energies, molecular models and profiles, based in Bokeh

Notifications You must be signed in to change notification settings

dgarayr/amk_tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visualization tools for AutoMeKin

Open In Colab

Diego Garay-Ruiz, 2021 Institute of Chemical Research of Catalonia Prof. Carles Bo Research group

Basic features

The amk-tools library provides tools to read, process and visualize the reaction networks generated by AutoMeKin. It is organized in two modules:

  • RXReader (arx). Parses & processes the RXNet files generated by AutoMeKin to NetworkX.Graph objects containing all the information about the network: connectivity, energies, XYZ geometries and frequencies for every intermediate and transition state. Moreover, contains functions to fetch paths in the network and basic Matplotlib-based plots for networks and energy profiles.
  • RXVisualizer (arxviz). Generates Bokeh-based interactive dashboards for the reaction networks processed by RXReader, containing:
    • Interactive network plot, allowing the user to zoom and move around. Hovering over nodes or edges shows the corresponding name and energy.
    • JSMol instance to display 3D models of the selected node/edge in the network, including vibrational normal modes.
    • Visualization of energy profiles along the network, which may be filtered by energy or by the presence of a given species.

These dashboards are generated as independent HTML files, not requiring a live Python server.

Usage guidelines

The simplest way to generate a dashboard from AutoMeKin results is to call the amk_gen_view.py script, taking arguments from STDIN (the amk-tools/scripts directory must be in your $PATH):

$amk_gen_view.py FINALDIR RXNFILE, where FINALDIR is the folder containing AMK results and RXNFILE is the name of the RXNet file to be used (RXNet, RXNet.cg or RXNet.rel). Additional arguments that may be passed are:

  • --barrierless. Include the barrierless routes stored in RXNet.barrless.
  • --vibrations NVIBR. Add only NVIBR normal modes to the visualization. Default is -1, meaning that ALL modes are included.
  • --paths [SOURCE] [TARGET] Locate paths in the network connecting SOURCE to TARGET, to include energy profile visualizations in the dashboards. When both SOURCE and TARGET are specified, a simple search is performed including only the routes that connect both nodes. If --paths is passed without further specification, all possible cyclic paths along the network are searched (much slower). If only SOURCE is specified, all cyclic paths are also searched, and then filtered to only keep these with connections to SOURCE.
  • --cutoff_path CUTOFF. Maximum depth for two-ended path search (number of intermediate nodes between SOURCE and TARGET), default is 4.
  • --outfile FILENAME. Name of the output HTML file containing the dashboard.
  • --title TITLE. Title shown in the dashboard.

If more control is desired, the user should use a custom Python script.

Dependencies

  • NetworkX
  • Bokeh 2.x (>= 2.3.2, < 3.0.0)
  • jsmol_bokeh_extension
  • NodeJS (>= 14.0.0)
  • matplotlib

Installation instructions

A basic installer from setuptools, setup.py is provided. Inside the main folder, run:

pip install -e .

to install the package in editable mode: thus, all changes in the py files of the modules RXReader and RXVisualizer will be directly applied to the calculations where the modules are used.

Bokeh 3.x is not currently supported due to changes in the API.

About

Generation of visualization dashboards for reaction networks in AutoMeKin, including networks, energies, molecular models and profiles, based in Bokeh

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published