Skip to content

h757062840/RNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReactionNet-generator

Construct intermediates and reaction networks containing C, H, O elements (up to C6 products), and genegate adsorption configurations of these intermediates on metal surface.

Table of Contents

0. Prerequisites

  • RNet.py
    • Python 3 (version > 3.10)
    • NetworkX (A Python package for the creation of reaction networks.)
  • MakeSlab.py
    • ASE (Atomic Simulation Environment, version > 3.22)
    • Pymatgen (Python Materials Genomics, version > 2023.3.23)
    • mp-api (The Materials Project API, version > 0.41.2)

1.1 File Structure

.
├── RNet.py # Genarate  reaction network diagram
├── MakeSlab.py # Construct all possible structures for intermediats adsorption on metal surfaces
├── utils
│ ├── molecule_db.py # Complete molecular library containing up to C6 products
│ ├── reaction_db.txt # Potential elementary reactions between molecules cataloged in the `molecule_db.py` file, where the first molecule acts as the reactant, and the second and third (if exist) molecules represent the products.
│ ├── id2chem.txt # The correspondence between molecular ID number and chemical formula
└ └── material_db.py # Metal database for cleaveving surfaces and adsorbing intermediates

2. RNet.py

RNet.py constructs a reaction network diagram containing all possible intermediate and elementary reactions based on the specified maximum number of C and O atoms. Reaction network with maxium C of 2 and O atoms of 1

2.1 RNet.py Usage

  1. Ensure all prerequisites are installed and configured correctly.
  2. Run the script with the desired parameters.

2.1.1 Command-Line Arguments

This script supports the following command-line arguments:

  • noc(type=int): The maximum number of carbon atoms.
  • noo(type=int): The maximum number of oxygen atoms.
  • --layout (type: str, default: spring): The layout for the network graph, choose from "spring", "circular", "shell", "kamada_kawai", "spectral" or "random".

2.1.2 Example Command

To run the script, use the following command:

python script.py noc noo [--layout str]
python script.py 1 2 --layout spring

2.2 Outputs for RNet.py

  1. id2chem.txt # The correspondence between molecular ID number and chemical formula
  2. molecule_db.py # Selected molecular library
  3. reaction_db.txt # Potential elementary reactions between molecules cataloged in the molecule_db.py file, where the first molecule acts as the reactant, and the second and third (if exist) molecules represent the products.
  4. material_db.py # Metal database for cleaveving surfaces and adsorbing intermediates
  5. Reaction_Net.png # Reaction network diaram.

3. MakeSlab.py

The MakeSlab.py script generates the configurations of molecules adsorbed on metal surfaces (POSCAR format of VASP) based on the molecular and elementary reaction database generated by RNet.py.

3.1 MakeSlab.py Usage

  1. Ensure all prerequisites are installed and configured correctly.
  2. Ensure id2chem.txt,molecule_db.py,reaction_db.txt and material_db.py have been successfully generated by RNet.py.
  3. Run the script with the desired parameters.

3.1.1 Command-Line Arguments

This script supports the following command-line arguments:

  • --plot (type: bool, default: False): Enable plotting of top view of slabs and its adsorption sites
  • --api-key (type: str): Materials Project API key.
  • --max-index (type: int, default: 1): Maximum Miller index to consider for slab generation.
  • --min-slab-size (type: float, default: 8.0): Minimum size of the slab.
  • --min-vacuum-size (type: float, default: 15.0): Minimum size of the vacuum layer.
  • --min-lw (type: float, default: 10.0): Minimum slab model a and b vector.
  • --distance (type: float, default: 10.0): Distance between adsorbate and slab.
  • --element (type: str, default: "Au"): Chemical formula of the materials to process.
  • --max-slabs (type: int, default: None): Maximum number of slabs to process per material.

3.1.2 Example Command

To run the script, use the following command:

python script_name.py  [--plot BOOL] [--api-key STR] [--max-index INT] [--min-slab-size FLOAT] [--min-vacuum-size FLOAT] [--min-lw FLOAT] [--distance FLOAT] [--element STR] [--max-slabs INT]
python MakeSlab.py --element Pt --max-index 1

3.2 Outputs for MakeSlab.py

[element][surface_index]_[molecule_ID]-[molecule_chemical_fomula].vasp e.g. Pt100_0-H2.vasp

4. License

This project is licensed under the LGPL-3.0 License.

5. Acknowledgements

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages