API of ReacNetGenerator

reacnetgenerator

ReacNetGenerator is an automatic reaction network generator for reactive molecular dynamics simulation.

Notes

Please cite: ReacNetGenerator: an automatic reaction network generator for reactive molecular dynamic simulations, Phys. Chem. Chem. Phys., 2020, 22 (2): 683–691, doi: 10.1039/C9CP05091D

class reacnetgenerator.ReacNetGenerator(**kwargs)

Use ReacNetGenerator for trajectory analysis.

inputfiletype: str
The type of the input file. The following type is allowed:
inputfilename: str or list of strs

The filename(s) of the input file, which can be either relative path or absolute path. If it is a list, the files will be read in order.

atomname: tuple of strs

The list of the atomic names in the input file, such as (‘C’, ‘H’, ‘O’). It should match the order of that in the input file.

runHMM: bool, optional, default: True

Process trajectory with Hidden Markov Model (HMM) or not. If the user find too many species are filtered, they can turn off this option.

pbc: bool, optional, default: True

Use periodic boundary conditions (PBC) or not.

cell: (3,3) array_like or (3,) array_like, optional, default: None

The cell (box size) of the system. If None (default), the cell will be read from the input file. If the input file doesn’t have cell information, this parameter will be necessary.

nproc: int, optional, default: None

The number of processors used for analysis. If None (default), the program will try to use all processors.

selectatoms: str, optional, default: None

Select an element from the atomic names, such as C, and only show species with this element in the reaction network. If None (default), the network will show all elements.

split: int, optional, default: None

Split number for the time axis. For example, if set to 10, the whole trajectroy will be divided into 10 parts and reactions of each part will be shown.

a: (2,2) array_like, optional, default: [[0.999, 0.001], [0.001, 0.009]]

Transition matrix A of HMM parameters. It is recommended for users to choose their own parameters. See the paper for details.

b: (2,2) array_like, optional, default: [[0.6, 0.4], [0.4, 0.6]]

Emission matrix B of HMM parameters. It is recommended for users to choose their own parameters. See the paper for details.

>>> from reacnetgenerator import ReacNetGenerator
>>> rng=ReacNetGenerator(inputfiletype="dump", inputfilename="dump.ch4", atomname=['C', 'H', 'O'])
>>> rng.runanddraw()
class Status(value)

ReacNetGenerator status.

The ReacNetGenerator consists of several modules and algorithms to process the information from the given trajectory, including:

  • DOWNLOAD: Download trajectory from urls

  • DETECT: Read bond information and detect molecules

  • HMM: HMM filter

  • PATH: Indentify isomers and collect reaction paths

  • MATRIX: Reaction matrix generation

  • NETWORK: Draw reaction network

  • REPORT: Generate analysis report

draw()

Draw the reaction network, i.e. NETWORK step.

None

report()

Generate the analysis report, i.e. REPORT step.

None

run()

Process MD trajectory, including DOWNLOAD, DETECT, HMM, PATH, and MATRIX steps.

None

runanddraw(run=True, draw=True, report=True)

Analyze the trajectory from MD simulation.

run: bool, optional, default: True

Process the trajectory or not, including DOWNLOAD, DETECT, HMM, PATH, and MATRIX steps.

draw: bool, optional, default: True

Draw the reaction network or not, i.e. NETWORK step.

report: bool, optional, default: True

Generate the analysis report, i.e. NETWORK step.