# dGbyG **Repository Path**: f-wc/dGbyG ## Basic Information - **Project Name**: dGbyG - **Description**: dGbyG Fan Wenchao - From Dai Ziwei Lab - **Primary Language**: Python - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 1 - **Created**: 2023-06-17 - **Last Updated**: 2025-08-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # dGbyG: a GNN-based tool for predicting standard Gibbs energy changes of metabolic reactions ## Description This repository is the official implementation of dGbyG, which is model proposed in a paper: Unraveling principles of thermodynamics for genome-scale metabolic networks using graph neural networks ## Software Architecture dGbyG ├── dGbyG │   ├── api   # API of dGbyG │   ├── Chemistry   # custom classes for chemical objects │   ├── data   # databases, training data, and cross-validation results │   │   ├── experimental_dG_from_eQ   # raw data │   │   ├── HMDB   # HMDB database │   │   ├── Human1   # Human1 model and relative data │   │   ├── KEGG   # kegg database │   │   ├── libChEBI   # libChEBI database │   │   ├── LIPID_MAPS   # LIPID MAPS database │   │   ├── MetaNetX   # metanetx database │   │   ├── Recon3D   # Recon3D model and relative data │   │   ├── results_data   # cross-validation results, not necessary for running dGbyG │   │   ├── chemaxon_pKa.csv   # pKa predicted by chemaxon │   │   ├── formation_dg_smiles.csv   # │   │   └── TrainingData.csv   # training data of GNN model │   ├── network   # Networks and models │   │   ├── best_model_params   # the trained models (100 models in) │   │   ├── Dataset.py   # │   │   ├── GNNetwork.py   # construction of graph neural network │   │   └── trainer.py   # custom class of trainer │   ├── utils   # basic functions │   └── config.py   # enviroment variables ├── RunAnalysis   # code for running analysis │   ├── dGbyG_CrossValidation_EC.ipynb   # code for leave-one-group-out cross validation classfied by EC classes │   ├── dGbyG_CrossValidation_K_fold.ipynb   # code for k-fold cross-validation │   ├── Figures.ipynb   # code for plotting figures │   ├── OtherMethods_CrossValidation.ipynb   # code for running other methods │   ├── Predicting_GibbsEnergy_by_dGbyG.ipynb   # code for predicting Gibbs energy by dGbyG for Recon3D and Human1 │   ├── Predicting_GibbsEnergy_by_dGPredictor.ipynb   # code for predicting Gibbs energy by dGPredictor for Recon3D and Human1 │   ├── Predicting_GibbsEnergy_by_eQuilibrator.ipynb   # code for predicting Gibbs energy by eQuilibrator for Recon3D and Human1 │   ├── Preprocessing_RawData.ipynb   # code for pre-processing raw data to training data │   ├── SupplementaryFigures.ipynb   # code for plotting supplementary figures │   └── Training.ipynb   # code for training the GNN model ├── demo.ipynb   # tutorial of dGbyG ├── Document.ipynb   # document of dGbyG └── requirements.txt   # requirements ## Guidelines ### Prerequisites - Git - Conda (Anaconda or Miniconda) ### Step 1: Clone the Repository Clone the repository to your local machine using the following command: ```bash git clone https://gitee.com/f-wc/dGbyG.git ``` ### Step 2: Create a New Conda Environment and Install Dependencies (Highly Recommended) #### Install the required dependencies: ```bash cd /path/to/dGbyG conda env create -f environment.yaml -n dGbyG ``` #### Install `chemaxon.marvin.calculations.pKaPlugin`(optional) The `chemaxon.marvin.calculations.pKaPlugin` is used for pKa calculation. It is not necessary for the basic usage of dGbyG, but it is recommended for users who want to calculate transformed standard Gibbs energy change between different pH. Note that this plugin is not free, and you can find more information from the ChemAxon website (https://docs.chemaxon.com/display/docs/calculators_index.md). ### Step 3: Install dGbyG #### Install dGbyG ```bash cd /path/to/dGbyG pip install -e . ``` ### Step 4: Run the Code Run the demo code using Jupyter Notebook: `demo.ipynb` ## References If you use or extend our work, please cite the paper as follows: - doi: https://doi.org/10.1101/2024.01.15.575679 ## Note To utilize dGbyG for predicting the Gibbs free energy of metabolic reactions, you must download the data files that map metabolite IDs from various databases to their corresponding chemical structures. Detailed instructions are provided in the README file located in the data folder. This project will undergo continuous maintenance and enhancement. If you have any questions or suggestions for improvements, please do not hesitate to open an issue or contact me via email at <12133024@mail.sustech.edu.cn>.