ZMPY Tensorflow version
Project description
ZMPY_TF
ZMPY: accelerating protein structure volume analysis through vectorized 3D Zernike Moments and Python-based GPU Integration
This repository is a Tensorflow implementation.
For GPU support with CuPy, please refer to the other repository:
ZMPY_CP
supports CuPy
(https://github.com/tawssie/ZMPY_CP)
For CPU support only, please refer to the other repository:
ZMPY
supports NumPy
(https://github.com/tawssie/ZMPY)
Here presents a Python-based software package, ZMPY, to accelerate the moments computation by vectorizing the mathematical formulae, enabling their computation in graphical processing units (GPUs). The package offers popular GPU-supported libraries such as CuPy and TensorFlow along with NumPy implementations, aiming to improve computational efficiency, adaptability, and flexibility in future algorithmic development.
Installation
Prerequisites:
- ZMPY : Python >=3.9.16, NumPy >=1.23.5
- ZMPY_CP: Python >=3.9.16, NumPy, CuPy >=12.2.0
- ZMPY_TF: Python >=3.9.16, NumPy >=1.23.5, Tensorflow >=2.12.0, Tensorflow-Probability >=0.20.1
- Open the terminal
- Using pip to install the package through PyPI
- Run
pip install ZMPY_TF
for the installation
Usage (Google Colab notebooks)
- 3D Zernike moments: [access Colab notebook demo here]
- Shape similarity: [access Colab notebook demo here]
- Structure superposition: [access Colab notebook demo here]
Performances
A voxel cube with dimensions of 100x100x100 was applied to perform 10,000 3D Zernike moment calculations, using 2 different maximum orders 20 and 40. Execution times for different hardware configurations using TensorFlow, CuPy, and NumPy libraries:
NumPy
Order | CPU1 | CPU2 |
---|---|---|
20 | 33m20s | 14m1s |
40 | 951m40s | 338m20s |
TensorFlow
Order | T4 | RX3070Ti | V100 | L4 |
---|---|---|---|---|
20 | 1m1s | 0m36s | 0m31s | 0m39s |
40 | 24m40s | 9m3s | 10m54s | 11m13s |
CuPy
Order | T4 | RX3070Ti | V100 | L4 |
---|---|---|---|---|
20 | 4m45s | 2m30s | 1m42s | 2m50s |
40 | 35m20s | 19m19s | 14m45s | 18m40s |
Note: m = minutes, s = seconds.
Cache data for order 40
Due to GitHub's file size limitations, follow these steps to download the cache data for order 40 (1.3G) in the ZMPY_TF package:
1. Locate Package Folder
- Open your terminal and execute the following command to find the folder of the ZMPY_TF package:
python -c "import ZMPY_TF; print(ZMPY_TF.__file__)"
- Note the path, which ends with
/User/path/ptyhon/site-packages/ZMPY_TF/__init__.py
.
2. Navigate to Cache Data Folder
- Go to the
cache_data
folder at the same level as__init__.py
file, i.e.,/User/path/ptyhon/site-packages/ZMPY_TF/cache_data
.
3. Download the Cache File:
- Download the 1.3 GB max order 40
.pkl
file to thecache_data
folder from the link below. https://drive.google.com/uc?id=1RR1rF_5YJqaxNC5AK0Ie_8MswGb0Tttw
Contributing
Feel free to submit pull requests for improvements or bug fixes.
Citation
Lai, J. S., Burley, S. K., & Duarte, J. M. (2024). ZMPY: Accelerating protein structure volume analysis through vectorized 3D Zernike moments and Python-based GPU integration. (Submitted)
License
This project is licensed under the GNU General Public License v3.0. You can view the full license here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ZMPY3D_TF-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48ce4a9e22d543c4f77cd19cd6c96f323992148e7060b542e31f157e520fa001 |
|
MD5 | 46798bc85c3325942b1e414f9798fc9c |
|
BLAKE2b-256 | 00c0398a7af72241f215413903ea32acb48288fdba934d9f1eb24ddd82e9057c |