Skip to main content

Processing of Computational Nanoreactor Simulations

This package implements various tools to automatically post-process and evaluate nanoreactor MD simulations.

Available tools include

  • Automated molecule recognition [1] from ab initio nanoreactor simulations [2] based on Wiberg Bond Orders [3]

  • Automated network construction [1]

    • RDKit [4] based event recognition

    • stored list of reactions for further refinement

  • Visualization tools (plots, molecular grids, PyMOL movie (available only directly from GitHub repository))

Install:

To install nanoreactor_processing type:

$ pip install nanoreactor-processing

Requirements:

  • python >= 3.8
  • numpy >= 1.23
  • scipy >= 1.8
  • pandas >= 1.4
  • networkx >= 2.8
  • matplotlib >= 3.5
  • seaborn >= 0.11
  • pyvis >= 0.2
  • rdkit >= 2021.03.4

Basic Usage:

To use the functions implemented in nanoreactor_processing you should be able to generate files with the following format from your MD simulation:

Trajectory: .xyz file

Format:
1 number of atoms
2 TIME: time step
3 elem x y z
4 elem x y z
.
.

Bond order file: only the upper triangular matrix needs to be stored

Format:

1 TIME: time step
2 wbo(0,1)
3 wbo(0,2)
4 wbo(0,3)
.
.

To start the automated post-processing for your ab initio nanoreactor simulations you have to first create a NanoSim object:

import nanoreactor_processing
from nanoreactor_processing import *
from nanoreactor_processing import NanoSim
from nanoreactor_processing import NanoNetwork

nanoSim = NanoSim(path_to_traj, path_to_bo_file)

# apply functions to your newly created object to generate fragments and compute SMILES:
nanoSim.generate_frag_lists()
nanoSim.generate_mols_smiles()
...

If you have already generated the fragment file (mols file), then you can also include it as an argument to speed up the evaluation:

...
nanoSim = NanoSim(path_to_traj, path_to_bo_file, path_to_mols_file)
...

To generate the reaction network use the stored data frame:

...
df = read_write_utils.read_trafo_df(path_to_df)
reactions_list = nanoreactor_network.construct_reactions_list(df)
nanoNet = NanoNetwork()
nanoNet.create_network(reactions_list)
...

If you encounter any problems with the Draw module in RDKit try to add the following line to your script:

from rdkit.Chem.Draw import IPythonConsole

The scripts for generating a PyMOL movie from your trajectory and data frame are available only at GitHub as they require PyMOL as an interpreter. A free version of PyMOL can be installed with:

$ apt-get install pymol

Documentation:

Code documentation can be created with pdoc3:

$ pip install pdoc3
$ pdoc3 --html nanoreactor_processing -o doc/

References:

This work:

  1. A. Stan et al., J. Chem. Theory Comput. (2022); https://doi.org/10.1021/acs.jctc.2c00754

Other references:

  1. L.-P. Wang et al., Nat. Chem. (2014); https://doi.org/10.1038/nchem.2099
  2. K. Wiberg, Tetrahedron (1968); https://doi.org/10.1016/0040-4020(68)88057-3
  3. G. Landrum, "RDKit: Open-source cheminformatics. https://www.rdkit.org"; https://doi.org/10.5281/zenodo.5085999

Release files for nanoreactor-processing 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nanoreactor-processing 1.1.1
File Size Uploaded
nanoreactor_processing-1.1.1.tar.gz 16.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nanoreactor-processing 1.1.1
File Interpreter ABI Platform
nanoreactor_processing-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 33.5 kB

Release files / nanoreactor_processing-1.1.1.tar.gz

Download URL nanoreactor_processing-1.1.1.tar.gz
Size 16.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c5111601d627a322a4b7e9ff904a33e5c2c05f38b785fafe6fac80a1587f5533
BLAKE2b-256 checksum
How to use checksums
785becbbc552b1ffd088a0a2ebcf366ab1f6b76911dad1bfee41da024c8f0e07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / nanoreactor_processing-1.1.1-py3-none-any.whl

Download URL nanoreactor_processing-1.1.1-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
70cf9ba08a2a8371a786afaaa18ddd6dbc8e27228a23999f578e575e9d623768
BLAKE2b-256 checksum
How to use checksums
7e62066cb36f2db65f8a1fcf73d448fd0fe38df7be910af8fe9b6b0aa353f02d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page