Skip to content

Detect reactions from atomic simulation trajectory

Notifications You must be signed in to change notification settings

yanzewu/reaxdetect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReaxDetect - Reaction Analysis of Atomistic Simulation Trajectory

ReaxDetect aims at extracting time evolution of reaction and species information from atomistic simulation (includes ReaxFF, Ab-inito MD, Quantum Chemistry, etc.). ReaxDetect detects molecule fragment based on connectivity and reactions based on connectivity change. The species are outputed in canonicalized SMILES format. By default, ReaxDetect accepts ReaxFF trajectory as input, but an alternative trajectory parser can be easily written and integrated.

Example

Analysis for a system with volume 512000 A^3 and frame interval 1.0 ps:

$ reaxdetect -v 512000 -t 1.0 trajectory.trj

Alternatively:

$ echo '{"volume":512000, "t":1.0}' > config.json
$ reaxdetect -c config.json trajectory.trj

Installation

Prerequisties: C++14 supported compiler (*nix); Visual Studio 2017 (Windows).

Install command (*nix):

make

Windows:

msbuild /p:Configuration=Release

Command-line Options:

SYNOPSIS:

reaxdetect [OPTION] ... [FILE]

OPTION

  • -c, --config [CONFIG]: Load external configuration file. If not specified, the name is 'reacdetect.ini'.
  • -b, --RecognizeBegin [BEGIN]: Integer, begin frame number of trajectory reading. Default is 0.
  • -s, --RecognizeInterval [STEP]: Integer, step of trajectory reading.
  • -m, --RecognizeLimit [MAX]: Integer, maximum frame number of trajectory reading, Default is -1 (end).
  • -t, --timestep [TIMESTEP]: Float, timestep of trajectory file. Default is 0.0 and reading from trajectory.
  • -v, --volume [VOLUME]: Volume of system. Default is 1.0.
  • -h, --help: Display help.
  • --version: Display version.

FILE

By default, trajectory file is the control file output from LAMMPS command:

pair_style reax/c [control_file]

In the control_file, atom_info and bond_info must be set to 1, atom_forces, atom_velocities and angle_info must be set to 0.

Extended Configuration

Configuration file is in JSON format, with options below:

BondOrderCutoff: Filename of cutoff description file. Use "default" to disable. Format of cutoff description file is:

A-B c0,c1,c2,...

Where A, B is atom name, and A must be ahead of B in periodic table. c0, c1, c2 are step cutoff for bond order 0, 1, 2,... sequentially. Note: 0 is also a valid value for bond order, representing weak connections.

If a bond is not in cutoff description, default value is used.

BondOrderCutoffDefault: Cutoff for each type of bond order if not specified in BondOrderCutoff. The format is same (c0,c1,c2,...).

CountBondOrder: Frame step for bond order statistics. Set '0' to disable. The bond orders will be written in '[name]_bondorder.csv'.

FrameBufferSize: How many frames (>= 2) are used to detect a chemical reaction. Default is 2.

ReadAtomPos: 0/1, whether parsing atom positions or simply skipping them in ReaxFF trajectory.

Output

All files are in csv format.

  • Dump file (*_full_dump.csv, *_full_reac.csv): Species and reaction frequency in each frame.
  • Report file (*_full_report.csv): Basic analysis of trajectory read, including species lifetimes.
  • Bondorder file (*_boc.csv): Bond order of each type of bond. Based on row. Only output when CountBondOrder != 0.

Alternative Trajectory Reader

The default trajectory reader is only suitable for ReaxFF MD output generated by LAMMPS. You may write your own trajectory reader based on the interface of TrajReader at trajectory.h. Details are described in the file.

Custom User Interaction

To change the style of command-line option or configuration file, you may modify reaxdetect.cpp. All the external options are registered in ReaxDetect::set_default_opt(), and all command-line options are registered in ReaxDetect::read_opt(). Notice: In order to create an command-line input option, the option must be regiested in both functions. An option which is not registered in set_default_opt() will be discarded after read_opt().

The ReaxDetect::translate_opt() serves as an interpretion of external options to classes. Each option is first stored in a config class, such as ReaxTrajReader::Config and ReaxReader::Config. Then the major class reads data from its config class. If your want to use your own class, its config class and interpretion codes in translate_opt() also need to be changed. Other details are described in the file.

Citing

If you use (part of) this program for academic research, please cite:

  • Wu, Y., Sun, H., Wu, L., & Deetz, J. D. (2019). Extracting the mechanisms and kinetic models of complex reactions from atomistic simulation data. Journal of computational chemistry. link

About

Detect reactions from atomic simulation trajectory

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published