### Install ReacNetGenerator with uv Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/install.md Install ReacNetGenerator using the uv tool and check the installation. ```bash uv tool install reacnetgenerator reacnetgenerator -h ``` -------------------------------- ### Test Pip Installation Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/build.md Verify the pip installation by running the help command. ```bash reacnetgenerator -h ``` -------------------------------- ### Install ReacNetGenerator with Pip Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/install.md Upgrade pip and then install ReacNetGenerator. Verify the installation with the command line. ```bash pip install -U pip pip install reacnetgenerator reacnetgenerator -h ``` -------------------------------- ### Install and Get Help for ReacNetGenerator Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/README.md Install ReacNetGenerator using conda and view its help message to understand available commands and options. ```sh conda install reacnetgenerator -c conda-forge ``` ```sh reacnetgenerator -h ``` -------------------------------- ### Project and Python Setup Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/CMakeLists.txt Initializes the CMake project and finds the required Python interpreter and development components. This is essential for projects that integrate Python code. ```cmake cmake_minimum_required(VERSION 3.26...3.28) project(${SKBUILD_PROJECT_NAME} LANGUAGES C CXX) find_package( Python COMPONENTS Interpreter Development.SABIModule # NumPy REQUIRED) ``` -------------------------------- ### Build ReacNetGenerator Docker Image Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/build.md Build a Docker image for ReacNetGenerator. Docker must be installed. ```bash docker build . -t njzjz/reacnetgenerator docker run njzjz/reacnetgenerator reacnetgenerator -h ``` -------------------------------- ### Install ReacNetGenerator via Pip Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/build.md Install ReacNetGenerator using pip after cloning the repository. A C/C++ compiler is required. ```bash pip install -U pip pip install . ``` -------------------------------- ### Install ReacNetGenerator with Pip Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/install.ipynb Use this command to install the ReacNetGenerator package. Ensure you have pip installed and configured in your environment. ```bash pip install reacnetgenerator ``` -------------------------------- ### XYZ File Format Example Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/format.md An example of a standard XYZ file format. Note that XYZ files do not contain cell information, which must be provided separately. ```xyz 3 Water frame 1 H 0.7493682 0.0000000 0.4424329 O 0.0000000 0.0000000 -0.1653507 H -0.7493682 0.0000000 0.4424329 3 Water frame 2 H 0.7493682 0.0000000 0.4424329 O 0.0000000 0.0000000 -0.1653507 H -0.7493682 0.0000000 0.4424329 ``` -------------------------------- ### ASE Mode with Custom Pair Cutoffs Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/cli.md This example demonstrates using the Atomic Simulation Environment (ASE) for bond detection with custom pair cutoff values. It's suitable for fine-tuning bond detection sensitivity. ```bash uvx --refresh --from reacnetgenerator reacnetgenerator \ --type xyz \ -i md.xyz \ -a C H O \ --use-ase \ --ase-cutoff-mult 1.2 \ --ase-pair-cutoffs C-O:1.8,H-O:1.2 ``` -------------------------------- ### Verify ReacNetGenerator Installation Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/install.ipynb Run this command to check if ReacNetGenerator has been installed correctly and to view its usage information. ```bash %%bash reacnetgenerator -h ``` -------------------------------- ### Reaction Overview Output - Text Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/analysis.ipynb This is an example of the output from viewing the reaction overview file. It shows a chemical reaction where a CL-20 molecule decomposes into a nitrogen dioxide molecule and another complex molecule. ```text 1 [H]C12N(N(=O)=O)C3([H])N(N(=O)=O)C1([H])N(N(=O)=O)C1([H])N(N(=O)=O)C3([H])N(N(=O)=O)C1([H])N2N(=O)=O->O=NO+[H]C12NC3([H])N(N(=O)=O)C1([H])N(N(=O)=O)C1([H])N(N(=O)=O)C3([H])N(N(=O)=O)C1([H])N2N(=O)=O ``` -------------------------------- ### Build ReacNetGenerator Conda Package Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/build.md Build a conda package for ReacNetGenerator. Ensure Anaconda or Miniconda is installed. ```bash conda config --add channels conda-forge conda build conda/recipe conda install reacnetgenerator --use-local reacnetgenerator -h ``` -------------------------------- ### ReacNetGenerator Command-Line Usage (Bond File) Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/analysis.ipynb Example of using ReacNetGenerator to process a LAMMPS bond file. Specify the input file, atomic elements, and file type. The --nohmm flag is used to disable HMM filtering. ```bash $ reacnetgenerator --type bond -i bonds.reaxc -a C H O --nohmm ``` -------------------------------- ### ReacNetGenerator Command-Line Usage (Dump File) Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/analysis.ipynb Example of using ReacNetGenerator to process a LAMMPS dump file. Specify the input file, atomic elements, and file type. The --nohmm flag is used to disable HMM filtering. ```bash $ reacnetgenerator --type dump -i dump.reaxc -a C H O --nohmm ``` -------------------------------- ### ReacNetGenerator Initialization and Run Source: https://github.com/deepmodeling/reacnetgenerator/wiki/Python-API Demonstrates how to initialize the ReacNetGenerator class with input parameters and execute the network generation and drawing process. ```APIDOC ## ReacNetGenerator Class Usage ### Description This section shows how to instantiate the `ReacNetGenerator` class and call its primary methods. ### Initialization Initialize `ReacNetGenerator` with input file type, filename, and atom names. ```python from reacnetgenerator import ReacNetGenerator rng = ReacNetGenerator(inputfiletype='lammpsbondfile', inputfilename='bonds.reaxc', atomname=['C', 'H', 'O']) ``` ### Running the Generator Call the `runanddraw` method to generate the reaction network and visualize it. ```python rng.runanddraw() ``` ``` -------------------------------- ### Initialize and Run ReacNetGenerator Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/python.md Instantiate the ReacNetGenerator class with input file details and atom names, then execute the simulation and drawing process. Refer to the ReacNetGenerator class documentation for a full list of parameters. ```python from reacnetgenerator import ReacNetGenerator ReacNetGenerator( inputfiletype="dump", inputfilename="dump.ch4", atomname=['C', 'H', 'O'], ).runanddraw() ``` -------------------------------- ### Launch ReacNetGenerator GUI Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/gui.md To open the graphical user interface, execute this command in your terminal. ```bash reacnetgeneratorgui ``` -------------------------------- ### Launch Local Browser UI Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/examples.md Launch the ReacNetGenerator web application locally for interactive visualization and analysis. Specify the host and port. ```bash uvx --refresh --from reacnet-md-tools rng-webapp \ --reac out/run/run.reactionabcd \ --host 127.0.0.1 \ --port 8000 ``` -------------------------------- ### Reacnetgenerator CLI Help Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/cli.md Displays the help message for the Reacnetgenerator command line tool, outlining all available arguments and options. ```bash reacnetgenerator --help ``` -------------------------------- ### View Reaction Overview - Bash Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/analysis.ipynb Use the 'cat' command in bash to view the overview of reactions in the trajectory file. This is useful for quickly inspecting the decomposition products. ```bash cat cl20.lammpstrj.reactionabcd ``` -------------------------------- ### Initialize and Run ReacNetGenerator Source: https://github.com/deepmodeling/reacnetgenerator/wiki/Python-API Initializes the ReacNetGenerator with specified input file type and atom names, then runs the generation and drawing process. Ensure the input file exists and is correctly formatted. ```python from reacnetgenerator import ReacNetGenerator rng = ReacNetGenerator(inputfiletype='lammpsbondfile', inputfilename='bonds.reaxc', atomname=['C', 'H', 'O'], ) rng.runanddraw() ``` -------------------------------- ### Native CLI for XYZ with Explicit Cell Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/examples.md Process XYZ files using the native CLI, specifying an explicit cell for periodic boundary conditions. ```bash uvx --refresh --from reacnetgenerator reacnetgenerator \ --type xyz \ -i /path/to/md.xyz \ -a C H O \ --nohmm \ --cell 10 0 0 0 10 0 0 0 10 ``` -------------------------------- ### Download Trajectory Data Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/analysis.ipynb Use wget to download the CL-20 trajectory data file. This is a prerequisite for the analysis. ```bash %%bash wget https://raw.githubusercontent.com/tongzhugroup/TRAJREAX/f10a5c2cab77d3f3b659d9dd08256ae7b27c2820/cl20/cl20.lammpstrj -O cl20.lammpstrj ``` -------------------------------- ### Run ReacNetGenerator with Singularity Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/install.md Use Singularity to run the ReacNetGenerator Docker image. Mount local directories when analyzing trajectories. ```bash singularity run docker://ghcr.io/deepmodeling/reacnetgenerator reacnetgenerator -h ``` -------------------------------- ### Native CLI for Non-Periodic XYZ Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/examples.md Process non-periodic XYZ files using the native CLI. The `--nopbc` flag disables periodic boundary conditions. ```bash uvx --refresh --from reacnetgenerator reacnetgenerator \ --type xyz \ -i /path/to/md.xyz \ -a C H O \ --nohmm \ --nopbc ``` -------------------------------- ### Run ReacNetGenerator with Docker Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/install.md Execute ReacNetGenerator using an official Docker image. Mount local directories when analyzing trajectories. ```bash docker run ghcr.io/deepmodeling/reacnetgenerator reacnetgenerator -h ``` -------------------------------- ### Native CLI with Isomer Merging Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/examples.md Process dump files using the native CLI and enable isomer merging with the `--miso` flag. This groups similar isomers together. ```bash uvx --refresh --from reacnetgenerator reacnetgenerator \ --type dump \ -i /path/to/dump.reaxc \ -a C H O \ --miso 1 ``` -------------------------------- ### Inspect Reaction Formula with rng-query Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/examples.md Query for reaction formulas using reactant and product information. This is useful for verifying reaction pathways. ```bash uvx --refresh --from reacnet-md-tools rng-query rxn-formula \ --reac out/run/run.reactionabcd \ --reactants C6H6 \ --products C6H5+H ``` -------------------------------- ### Native CLI for Bond Trajectory Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/examples.md Use the native ReacNetGenerator CLI to process bond trajectory files. Specify the atoms to analyze. ```bash uvx --refresh --from reacnetgenerator reacnetgenerator \ --type bond \ -i /path/to/bonds.reaxc \ -a C H O \ --nohmm ``` -------------------------------- ### Native CLI with Selective Graph Elements Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/examples.md Process dump files using the native CLI, selecting specific atoms for graph element analysis. This is useful for focusing on particular species. ```bash uvx --refresh --from reacnetgenerator reacnetgenerator \ --type dump \ -i /path/to/dump.reaxc \ -a C H O Cl \ --nohmm \ --selectatoms C O ``` -------------------------------- ### HMM Tuning with Matrix Parameters Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/cli.md Tune the Hidden Markov Model (HMM) parameters by providing custom transition and emission matrices. This allows for precise control over the reaction network's species identification. ```bash uvx --refresh --from reacnetgenerator reacnetgenerator \ --type dump \ -i dump.reaxc \ -a C H O \ --matrixa 0.999 0.001 0.001 0.999 \ --matrixb 0.6 0.4 0.4 0.6 ``` -------------------------------- ### Inspect Next Reaction with rng-query Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/examples.md Query for the next reaction in the output using SMILES notation. This helps in identifying sequential reaction steps. ```bash uvx --refresh --from reacnet-md-tools rng-query next \ --reac out/run/run.reactionabcd \ --smiles '[CH3][CH3]' ``` -------------------------------- ### Inspect Species with rng-query Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/examples.md Use `rng-query` to inspect existing outputs, specifically querying for species information. Provide the reaction output path and the desired chemical formula. ```bash uvx --refresh --from reacnet-md-tools rng-query species \ --reac out/run/run.reactionabcd \ --formula C6H6 ``` -------------------------------- ### XYZ Trajectory Analysis with Explicit Cell Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/cli.md Analyze XYZ trajectory files with explicit cell parameters. This command is useful when the input file lacks cell information but periodic boundary conditions are enabled. ```bash uvx --refresh --from reacnetgenerator reacnetgenerator \ --type xyz \ -i md.xyz \ -a C H O \ --nohmm \ --cell 10 0 0 0 10 0 0 0 10 ``` -------------------------------- ### Freeze Deep Potential Model Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/methane.md Extract the trained neural network model into a protobuf file. The output file name is specified with the `-o` flag. ```sh $deepmd_root/bin/dp freeze -o graph.pb ``` -------------------------------- ### Clone ReacNetGenerator Repository Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/build.md Clone the ReacNetGenerator source code from GitHub to build it locally. ```bash git clone https://github.com/deepmodeling/reacnetgenerator cd reacnetgenerator ``` -------------------------------- ### Run Native ReacNetGenerator with Official Flags Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/SKILL.md Execute the native ReacNetGenerator CLI, allowing access to all official low-level flags. This is useful when the high-level wrapper does not expose specific options. ```bash uvx --refresh --from reacnetgenerator reacnetgenerator --help ``` -------------------------------- ### Webpack Build Configuration Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/CMakeLists.txt Configures the build process for webpack assets. It finds the Node.js executable, determines the Yarn path using a Python script, and defines a custom command to build the bundle.html. ```cmake # webpack set(WEBPACK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/reacnetgenerator/static/webpack) # find node find_program( NODE_EXECUTABLE NAMES node DOC "Node.js executable" REQUIRED) message(STATUS "Found Node.js: ${NODE_EXECUTABLE}") # use python to get yarn path from .yarnrc.yml execute_process( COMMAND ${Python_EXECUTABLE} -c "import yaml; print(yaml.safe_load(open('.yarnrc.yml'))['yarnPath'])" WORKING_DIRECTORY ${WEBPACK_DIR} OUTPUT_VARIABLE YARN_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE) if(NOT YARN_EXECUTABLE) message(FATAL_ERROR "Yarn executable not found") endif() message(STATUS "Found Yarn: ${YARN_EXECUTABLE}") add_custom_command( OUTPUT bundle.html COMMAND ${NODE_EXECUTABLE} ${YARN_EXECUTABLE} COMMAND ${NODE_EXECUTABLE} ${YARN_EXECUTABLE} start COMMENT "Building bundle.html using webpack" WORKING_DIRECTORY ${WEBPACK_DIR} VERBATIM) add_custom_target(run ALL DEPENDS bundle.html) # install generated bundle.html install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/reacnetgenerator/static/webpack/bundle.html DESTINATION reacnetgenerator/static/webpack/) ``` -------------------------------- ### Train Deep Potential Model Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/methane.md Execute the DeepMD training command with the specified JSON parameter file. Ensure the `deepmd_root` environment variable is set. ```sh $deepmd_root/bin/dp train methane_param.json ``` -------------------------------- ### Standard LAMMPS Dump Workflow Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/examples.md Use this for normal LAMMPS dump workflows. It processes a trajectory file and generates output. ```bash uvx --refresh --from reacnet-md-tools rng-pipeline \ --input /path/to/trajectory.lammpstrj \ --type dump \ --outroot out \ --data /path/to/system.data \ --nohmm \ --stepinterval 10 \ --maxspecies 50 ``` -------------------------------- ### Compress Frozen Model Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/methane.md Compress the frozen model for efficient use in simulations. Requires the input frozen model, output file name, and the parameter JSON file. ```sh $deepmd_root/bin/dp compress -i graph.pb -o graph_compressed.pb -t methane_param.json ``` -------------------------------- ### Cython Module Compilation (dps) Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/CMakeLists.txt Defines a custom command to compile a Cython file (dps.pyx) into a C++ source file and then adds it as a Python library module. This is used for performance-critical Python extensions. ```cmake # dps add_custom_command( OUTPUT dps.cpp COMMENT "Making ${CMAKE_CURRENT_BINARY_DIR}/dps.cpp from ${CMAKE_CURRENT_SOURCE_DIR}/reacnetgenerator/dps.pyx" COMMAND Python::Interpreter -m cython "${CMAKE_CURRENT_SOURCE_DIR}/reacnetgenerator/dps.pyx" --output-file dps.cpp DEPENDS reacnetgenerator/dps.pyx VERBATIM) python_add_library( dps MODULE USE_SABI 3.7 ${CMAKE_CURRENT_BINARY_DIR}/dps.cpp ${CMAKE_CURRENT_SOURCE_DIR}/reacnetgenerator/c_stack.cpp WITH_SOABI) target_include_directories(dps PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/reacnetgenerator) target_compile_definitions(dps PRIVATE CYTHON_LIMITED_API=1) if(CMAKE_BUILD_TYPE STREQUAL "Debug") target_compile_definitions(dps PRIVATE CYTHON_TRACE=1 CYTHON_TRACE_NOGIL=1) endif() install(TARGETS dps DESTINATION reacnetgenerator/) ``` -------------------------------- ### ReacNetGenerator CLI Basic Structure Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/cli.md This is the fundamental structure of the ReacNetGenerator CLI command. It requires input files and atom names, with several optional flags for customization. ```bash reacnetgenerator -i INPUT... -a ATOMNAME... [options] ``` -------------------------------- ### Interactive Data File Selection Workflow Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/examples.md This command allows interactive selection of the data file during a LAMMPS dump workflow. It is TTY only. ```bash uvx --refresh --from reacnet-md-tools rng-pipeline \ --input /path/to/trajectory.lammpstrj \ --type dump \ --outroot out \ --pick-data ``` -------------------------------- ### Display Reaction Network - Python Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/analysis.ipynb This code snippet is part of the analysis process and is likely used internally by the ReacNetGenerator tool to draw the reaction network. It is not directly executable by the user but indicates a step in the analysis. ```python 2022-11-05 08:51:48,855 - ReacNetGenerator 1.6.6.dev24+g068dac4 - INFO: Step 6: Done! Time consumed (s): 0.204 (Draw reaction network) ``` -------------------------------- ### Run LAMMPS Simulation with DP Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/methane.md Invoke LAMMPS to perform reactive MD simulations using the trained Deep Potential model. The simulation is controlled by the `input.lammps` file. ```sh $deepmd_root/bin/lmp -i input.lammps ``` -------------------------------- ### Generate Analysis Report - Python Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/analysis.ipynb This log entry indicates the completion of the analysis report generation step. The report is typically saved as an HTML file for detailed viewing. ```python 2022-11-05 08:51:48,942 - ReacNetGenerator 1.6.6.dev24+g068dac4 - INFO: Step 7: Done! Time consumed (s): 0.087 (Generate analysis report) ``` -------------------------------- ### Analyze Trajectory with ReacNetGenerator Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/analysis.ipynb Run ReacNetGenerator to analyze the downloaded trajectory. Ensure the element order matches the trajectory's atom types. The --nohmm flag disables Hidden Markov Model filtering. ```bash %%bash reacnetgenerator -i cl20.lammpstrj -a H C N O --type dump --nohmm ``` -------------------------------- ### Run Standard LAMMPS Dump Workflow Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/SKILL.md Execute a typical LAMMPS dump trajectory analysis using the reacnet-md-tools wrapper. This command ensures the latest version is used and displays help information for the rng-pipeline subcommand. ```bash uvx --refresh --from reacnet-md-tools rng-pipeline --help ``` -------------------------------- ### Configure LAMMPS for DeepMD Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/methane.md Specify the DeepMD pair style and coefficients in the LAMMPS input script. Ensure the `graph_compressed.pb` file is accessible. ```lammps pair_style deepmd graph_compressed.pb pair_coeff * * ``` -------------------------------- ### Analyze Existing ReacNetGenerator Outputs Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/SKILL.md Query and analyze pre-existing ReacNetGenerator outputs without rerunning the main analysis. This command uses the reacnet-md-tools wrapper to access query functionalities. ```bash uvx --refresh --from reacnet-md-tools rng-query --help ``` -------------------------------- ### Analyze Dump Trajectory File Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/run.md Use this command to process a dump trajectory file. Specify the input file, atomic elements, and disable HMM filtering. ```bash reacnetgenerator --type dump -i dump.reaxc -a C H O --nohmm ``` -------------------------------- ### Bond Trajectory Analysis Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/cli.md Use this command to analyze bond information from a ReacNetGenerator bond trajectory file. It disables the Hidden Markov Model (HMM) for analysis. ```bash uvx --refresh --from reacnetgenerator reacnetgenerator \ --type bond \ -i bonds.reaxc \ -a C H O \ --nohmm ``` -------------------------------- ### Analyze CL-20 Trajectory with ReacNetGenerator Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/cl20.md Use ReacNetGenerator to analyze reactive simulation trajectories. Specify the input trajectory file, elements, trajectory type, and disable HMM analysis. ```bash reacnetgenerator -i cl20.lammpstrj -a H C N O --type dump --nohmm ``` -------------------------------- ### Analyze LAMMPS Bond File Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/run.md Use this command to process a LAMMPS bond trajectory file. Specify the input file, atomic elements, and disable HMM filtering. ```bash reacnetgenerator --type bond -i bonds.reaxc -a C H O --nohmm ``` -------------------------------- ### Dump Trajectory Analysis Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/skills/reacnetgenerator/references/cli.md This command is used for analyzing dump trajectories. It specifies the output type as 'dump' and disables the HMM. ```bash uvx --refresh --from reacnetgenerator reacnetgenerator \ --type dump \ -i dump.reaxc \ -a C H O \ --nohmm ``` -------------------------------- ### Generate LAMMPS ReaxFF Bonds File Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/format.md This command generates a LAMMPS ReaxFF bonds file when ReaxFF is used as the pair style. The atomic names must map to types in the bond file. ```lammps fix 1 all reaxff/bonds 100 bonds.reaxff ``` -------------------------------- ### Run ReacNetGenerator on Methane Trajectory Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/tutorial/methane.md Execute ReacNetGenerator to analyze a LAMMPS trajectory file for methane combustion. This command extracts reaction networks and species, dumping them for further analysis. ```sh reacnetgenerator -i methane.lammpstrj -a C H O --dump ``` -------------------------------- ### Conditional Cython Module Compilation (utils_np) Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/CMakeLists.txt Conditionally compiles another Cython module (utils_np.pyx) if the build type is not Debug. It links against NumPy and sets specific compile definitions for Cython. This section is currently disabled by 'if(FALSE)'. ```cmake # utils_np temporary disable until limited api is supported if(FALSE) add_custom_command( OUTPUT utils_np.c COMMENT "Making ${CMAKE_CURRENT_BINARY_DIR}/utils_np.cpp from ${CMAKE_CURRENT_SOURCE_DIR}/reacnetgenerator/utils_np.pyx" COMMAND Python::Interpreter -m cython "${CMAKE_CURRENT_SOURCE_DIR}/reacnetgenerator/utils_np.pyx" --output-file utils_np.c DEPENDS reacnetgenerator/utils_np.pyx VERBATIM) python_add_library(utils_np MODULE USE_SABI 3.11 ${CMAKE_CURRENT_BINARY_DIR}/utils_np.c WITH_SOABI) target_link_libraries(utils_np PRIVATE Python::NumPy) target_compile_definitions(utils_np PRIVATE CYTHON_LIMITED_API=1) if(CMAKE_BUILD_TYPE STREQUAL "Debug") target_compile_definitions(utils_np PRIVATE CYTHON_TRACE=1 CYTHON_TRACE_NOGIL=1) endif() install(TARGETS utils_np DESTINATION reacnetgenerator/) endif() ``` -------------------------------- ### Generate LAMMPS Dump File Source: https://github.com/deepmodeling/reacnetgenerator/blob/master/docs/guide/format.md This command generates a LAMMPS dump file for ReacNetGenerator. Ensure the file contains 'id', 'type', 'x', 'y', and 'z' keys. ```lammps dump 1 all custom 100 dump.reaxc id type x y z ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.