diff --git a/.github/workflows/pylint.yaml b/.github/workflows/pylint.yaml new file mode 100644 index 0000000..987a65b --- /dev/null +++ b/.github/workflows/pylint.yaml @@ -0,0 +1,19 @@ +name: PyLint + +on: push + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + - name: Run pylint + run: pylint src/aidsorb/ diff --git a/.github/workflows/unittest.yaml b/.github/workflows/unittest.yaml new file mode 100644 index 0000000..7b4287c --- /dev/null +++ b/.github/workflows/unittest.yaml @@ -0,0 +1,15 @@ +name: Unittest + +on: push + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Run unit tests + run: python -m unittest diff --git a/README.md b/README.md index 3e875ef..0372cdc 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,67 @@ -AIdsorb is a Python package for processing molecular point clouds. +
+ +
## ⚙️ Installation -> Currently not available in PyPI. +> [!IMPORTANT] +> It is strongly recommended to **perform the installation inside a virtual environment**. -**It is strongly recommended to perform the installation inside a virtual environment**. +Assuming an activated virtual environment: ```bash -git clone https://github.com/adosar/aidsorb && cd aidsorb -(venvir) pip install -e . +pip install aidsorb ``` -## 📖 Usage -You can create molecular point clouds form a directory containing molecular -files and save them in a `.npz` file. +## 🚀 Usage +> [!NOTE] +> Refer to the 📚 Documentation for more information. -```python -from aidsorb.utils import pcd_from_dir -pcd_from_dir('/path/to/dir', file='point_clouds.npz') -``` +Here is a summary of what you can do from the command line: -## 📇 TODO -* Add atoms featurization -* Add more architectures +1. Visualize a molecular point cloud: + ```bash + aidsorb visualize path/to/structure + ``` + +2. Create and prepare point clouds: + ```bash + aidsorb create path/to/inp path/to/out # Create point clouds + aidsorb prepare path/to/out # Split point clouds to train, val and test + ``` + where `path/to/inp` is a directory containing molecular structures. + +3. Train and test a model: + ```bash + aidsorb-lit fit --config=path/to/config.yaml + aidsorb-lit test --config=path/to/config.yaml --ckpt_path=path/to/ckpt + ``` + Currently, only [PointNet](https://arxiv.org/abs/1612.00593) is supported. ## 📰 Citing AIdsorb -> Currently N/A. +If you use AIdsorb in your research, please consider citing the following work: + + Currently, not available. ## 📑 License -MOXελ is released under the [GNU General Public License v3.0 only](https://spdx.org/licenses/GPL-3.0-only.html). - -[^1]: R. Q. Charles, H. Su, M. Kaichun and L. J. Guibas, "PointNet: Deep -Learning on Point Sets for 3D Classification and Segmentation," 2017 IEEE -Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI,USA, -2017, pp. 77-85, doi: 10.1109/CVPR.2017.16. +AIdosrb is released under the [GNU General Public License v3.0 only](https://spdx.org/licenses/GPL-3.0-only.html). diff --git a/docs/source/auto_examples/resume_codeobj.pickle b/docs/source/auto_examples/resume_codeobj.pickle index 9355e9e..55e6258 100644 Binary files a/docs/source/auto_examples/resume_codeobj.pickle and b/docs/source/auto_examples/resume_codeobj.pickle differ diff --git a/docs/source/conf.py b/docs/source/conf.py index 752554a..2b55352 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -6,7 +6,6 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -from urllib.parse import quote import sys, os import subprocess from plotly.io._sg_scraper import plotly_sg_scraper diff --git a/docs/source/images/pcd.gif b/docs/source/images/pcd.gif new file mode 100644 index 0000000..4b72dad Binary files /dev/null and b/docs/source/images/pcd.gif differ diff --git a/docs/source/index.rst b/docs/source/index.rst index 33e4b2b..1b16d5c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -12,7 +12,7 @@ About ===== -**AIdsorb** is a :fa:`python; fa-fade` Python package for **Deep Learning on +**AIdsorb** is a :fa:`python; fa-fade` Python package for **deep learning on molecular point clouds**. .. grid:: 4 diff --git a/docs/source/tutorial.rst b/docs/source/tutorial.rst index e50c98d..535cab2 100644 --- a/docs/source/tutorial.rst +++ b/docs/source/tutorial.rst @@ -58,6 +58,14 @@ Introduction 4:]`` any **additional features**. If ``C == 0``, then the only features are the atomic numbers. + +.. tip:: + You can visualize a molecular point cloud with: + + .. code-block:: console + + $ aidsorb visualize path/to/structure + Deep learning on molecular point clouds --------------------------------------- @@ -66,7 +74,7 @@ AIdsorb, the following components are needed: * A directory containing files of **molecular structures**. * A ``.csv`` file containing the **labels of the molecular structures**. -* A ``.yaml`` **configuration file** for orchestrating the ML part. +* A ``.yaml`` **configuration file** for orchestrating the DL part. .. note:: You are solely responsible for these 3 components. diff --git a/pyproject.toml b/pyproject.toml index 63a79f8..7ee7bab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,11 @@ where = ["src"] [tool.setuptools_scm] +[tool.pylint.main] +jobs = 0 +disable = ["C"] +fail-under = 8 + [project] name = "aidsorb" dynamic = ["version"] diff --git a/src/aidsorb/__init__.py b/src/aidsorb/__init__.py index fe31a5d..535c1ac 100644 --- a/src/aidsorb/__init__.py +++ b/src/aidsorb/__init__.py @@ -15,7 +15,7 @@ # along with this program. If not, see