D4CMPP


NameD4CMPP JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/spark8ku/DeepMPP
SummaryMolecular property prediction based on Graph Convolution Network published by Deep4Chem
upload_time2024-10-04 15:58:34
maintainerNone
docs_urlNone
authorPark Jinyong
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # D4C molecular property prediction
![License](https://img.shields.io/badge/license-MIT-red.svg)
![Version](https://img.shields.io/badge/version-0.3.0-brightgreen.svg)

## Introduction
This project is a deep learning application designed to predict molecular properties. The models implemented in this project feature interpretable and hierarchical architectures, including conventional graph convolutional models. D4CMPP is designed to be user-friendly and extremely convenient for deep learning applications.      

---
## Installation
```sh
$ pip install D4CMPP
```
It is recommended to install dgl and torch first with the appropriate versions for your system.   
Note that this package was developed with dgl\==2.3.0 and torch\==2.1.2.  

---
## How to start training
### Using module
1. Place the CSV file in your working directory
    - The SMILES of molecules should be in the "compound" column.
    - The SMILES of corresponding solvent should be in the "solvent" column. (optional)
    - There needs to be at least one molecular property for each corresponding molecule.
    - There are some inherent datasets such as 'Aqsoldb' and 'lipophilicity'. Use the 'test' dataset for test execution.
2. Import the train module of the D4CMPP package
```sh
> from D4CMPP import train
```
3. Check and choose the ID of the deep learning model in 'network_refer.yaml'. Or, give any invalid ID as the 'network' argument. This will show you the list of IDs of implemented networks.
    - Note that the networks incorporating the effect of solvents have the postfix 'wS', which indicates 'with solvent' (e.g. GCNwS).
```sh
> train(network="invalidID", data="test")
```
4. Write the network ID for the argument 'network', the CSV file name for the argument 'data', and the column name in the file with the target property for the argument 'target'.
```sh
> train(network="GCN", data="test", target=["Abs","Emi"])
```
5. Then, the graph will be generated, training will start, and the result of the training will be saved under the './_Models/' directory.
   
### Using source code
You can directly execute training with the source code as below, which is equal to an above example.
```sh
$ python main.py -n GCN -d test -t Abs,Emi
```
   
   
### Continue to training
You can load the saved model and continue training by

```sh
> train(LOAD_PATH="GCN_model_test_Abs,Emi_20240101_000000")
```
or
```sh
$ python main.py -l GCN_model_test_Abs,Emi_20240101_000000
```
   
### Transfer learning
You can try transfer learning from the pretrained model by
```sh
> train(TRANSFER_PATH="GCN_model_test_Abs,Emi_20240101_000000", data="Aqsoldb", target=["Solbility"] )
```
or
```sh
$ python main.py --transfer GCN_model_test_Abs,Emi_20240101_000000 -d Aqsoldb -t Solubility
```

---
## Analyzer
For additional tasks or analysis, the trained model can be loaded through the Analyzer module.
You should import an appropriate analyzer for your trained model. In general, MolAnalyzer supports every model.
```sh
from D4CMPP.Analyzer import MolAnalyzer
ma = MolAnalyzer("_Model/GCN_model_test_Abs,Emi_20240101_000000")
```
In general, Analyzer supports predicting external data.
```sh
ma.predict("CCC")
```

---

## Acknowledgements
This project includes code from the GC-GNN by Adem Rosenkvist Nielsen Aouichaoui (arnaou@kt.dtu.dk), licensed under the MIT License. 
- URL: [GC-GNN](https://github.com/gsi-lab/GC-GNN/tree/main )
- files: [AttentiveFP.py](https://github.com/gsi-lab/GC-GNN/blob/main/networks/AttentiveFP.py),  [DMPNN.py](https://github.com/gsi-lab/GC-GNN/blob/main/networks/DMPNN.py)
- Description: The source codes were adopted from this project.   
Additionally, we acknowledge that various other codes and workflows in this project are based on or inspired by these projects. While many of the original codes were modified, we recognize that the coding style and some workflows were influenced by the corresponding projects.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/spark8ku/DeepMPP",
    "name": "D4CMPP",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Park Jinyong",
    "author_email": "phillip1998@korea.ac.kr",
    "download_url": "https://files.pythonhosted.org/packages/92/72/b3d1e3a71c8bea8f5a9c146af4eed25c62d7dc8ac9b6ecf411ddda242605/D4CMPP-1.0.1.tar.gz",
    "platform": null,
    "description": "# D4C molecular property prediction\n![License](https://img.shields.io/badge/license-MIT-red.svg)\n![Version](https://img.shields.io/badge/version-0.3.0-brightgreen.svg)\n\n## Introduction\nThis project is a deep learning application designed to predict molecular properties. The models implemented in this project feature interpretable and hierarchical architectures, including conventional graph convolutional models. D4CMPP is designed to be user-friendly and extremely convenient for deep learning applications.      \n\n---\n## Installation\n```sh\n$ pip install D4CMPP\n```\nIt is recommended to install dgl and torch first with the appropriate versions for your system.   \nNote that this package was developed with dgl\\==2.3.0 and torch\\==2.1.2.  \n\n---\n## How to start training\n### Using module\n1. Place the CSV file in your working directory\n    - The SMILES of molecules should be in the \"compound\" column.\n    - The SMILES of corresponding solvent should be in the \"solvent\" column. (optional)\n    - There needs to be at least one molecular property for each corresponding molecule.\n    - There are some inherent datasets such as 'Aqsoldb' and 'lipophilicity'. Use the 'test' dataset for test execution.\n2. Import the train module of the D4CMPP package\n```sh\n> from D4CMPP import train\n```\n3. Check and choose the ID of the deep learning model in 'network_refer.yaml'. Or, give any invalid ID as the 'network' argument. This will show you the list of IDs of implemented networks.\n    - Note that the networks incorporating the effect of solvents have the postfix 'wS', which indicates 'with solvent' (e.g. GCNwS).\n```sh\n> train(network=\"invalidID\", data=\"test\")\n```\n4. Write the network ID for the argument 'network', the CSV file name for the argument 'data', and the column name in the file with the target property for the argument 'target'.\n```sh\n> train(network=\"GCN\", data=\"test\", target=[\"Abs\",\"Emi\"])\n```\n5. Then, the graph will be generated, training will start, and the result of the training will be saved under the './_Models/' directory.\n   \n### Using source code\nYou can directly execute training with the source code as below, which is equal to an above example.\n```sh\n$ python main.py -n GCN -d test -t Abs,Emi\n```\n   \n   \n### Continue to training\nYou can load the saved model and continue training by\n\n```sh\n> train(LOAD_PATH=\"GCN_model_test_Abs,Emi_20240101_000000\")\n```\nor\n```sh\n$ python main.py -l GCN_model_test_Abs,Emi_20240101_000000\n```\n   \n### Transfer learning\nYou can try transfer learning from the pretrained model by\n```sh\n> train(TRANSFER_PATH=\"GCN_model_test_Abs,Emi_20240101_000000\", data=\"Aqsoldb\", target=[\"Solbility\"] )\n```\nor\n```sh\n$ python main.py --transfer GCN_model_test_Abs,Emi_20240101_000000 -d Aqsoldb -t Solubility\n```\n\n---\n## Analyzer\nFor additional tasks or analysis, the trained model can be loaded through the Analyzer module.\nYou should import an appropriate analyzer for your trained model. In general, MolAnalyzer supports every model.\n```sh\nfrom D4CMPP.Analyzer import MolAnalyzer\nma = MolAnalyzer(\"_Model/GCN_model_test_Abs,Emi_20240101_000000\")\n```\nIn general, Analyzer supports predicting external data.\n```sh\nma.predict(\"CCC\")\n```\n\n---\n\n## Acknowledgements\nThis project includes code from the GC-GNN by Adem Rosenkvist Nielsen Aouichaoui (arnaou@kt.dtu.dk), licensed under the MIT License. \n- URL: [GC-GNN](https://github.com/gsi-lab/GC-GNN/tree/main )\n- files: [AttentiveFP.py](https://github.com/gsi-lab/GC-GNN/blob/main/networks/AttentiveFP.py),  [DMPNN.py](https://github.com/gsi-lab/GC-GNN/blob/main/networks/DMPNN.py)\n- Description: The source codes were adopted from this project.   \nAdditionally, we acknowledge that various other codes and workflows in this project are based on or inspired by these projects. While many of the original codes were modified, we recognize that the coding style and some workflows were influenced by the corresponding projects.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Molecular property prediction based on Graph Convolution Network published by Deep4Chem",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/spark8ku/DeepMPP"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5d5dcd245301e5a9a8295fa0cd82e7250bd98ce7cf396c119491292635f09464",
                "md5": "65ec71487ca8786d88e83c5428809f8f",
                "sha256": "86c8ba80cecbddf9a80d7d11bda253302a02f7cb62624e20028b8ebb8de5d35f"
            },
            "downloads": -1,
            "filename": "D4CMPP-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "65ec71487ca8786d88e83c5428809f8f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 1832250,
            "upload_time": "2024-10-04T15:58:30",
            "upload_time_iso_8601": "2024-10-04T15:58:30.506435Z",
            "url": "https://files.pythonhosted.org/packages/5d/5d/cd245301e5a9a8295fa0cd82e7250bd98ce7cf396c119491292635f09464/D4CMPP-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9272b3d1e3a71c8bea8f5a9c146af4eed25c62d7dc8ac9b6ecf411ddda242605",
                "md5": "3f5adb77bd6a0c0e2bab1d758e847553",
                "sha256": "e9378f7d555ca945f8496e24da2fcf5b46dd40e4e1288d0dfbcc9354b5985055"
            },
            "downloads": -1,
            "filename": "D4CMPP-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "3f5adb77bd6a0c0e2bab1d758e847553",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 1775168,
            "upload_time": "2024-10-04T15:58:34",
            "upload_time_iso_8601": "2024-10-04T15:58:34.074240Z",
            "url": "https://files.pythonhosted.org/packages/92/72/b3d1e3a71c8bea8f5a9c146af4eed25c62d7dc8ac9b6ecf411ddda242605/D4CMPP-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-04 15:58:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "spark8ku",
    "github_project": "DeepMPP",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "d4cmpp"
}
        
Elapsed time: 0.55363s