Skip to main content

ZMPY3D CuPy version

Project description

ZMPY3D_CP

ZMPY3D: accelerating protein structure volume analysis through vectorized 3D Zernike Moments and Python-based GPU Integration

For CPU support only, please refer to the repository:

ZMPY3D supports NumPy (https://github.com/tawssie/ZMPY3D)

For GPU support with TensorFlow and CuPy, please refer to the other two repositories:

ZMPY3D_TF supports Tensorflow (https://github.com/tawssie/ZMPY3D_TF)

ZMPY3D_CP supports CuPy (https://github.com/tawssie/ZMPY3D_CP)

Here presents a Python-based software package, ZMPY3D, 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

Noted: ZMPY3D_CP supports cupy-cuda11x (>=12.2.0) or cupy-cuda12x (>=12.2.0). ZMPY3D_CP does not auto-install CuPy to avoid conflicts. Users should verify the installation with pip list | grep cupy-cuda and manually install one version of CuPy.

Prerequisites:

  • ZMPY3D : Python >=3.9.16, NumPy >=1.23.5
  • ZMPY3D_CP: Python >=3.9.16, NumPy, CuPy >=12.2.0
  • ZMPY3D_TF: Python >=3.9.16, NumPy >=1.23.5, Tensorflow >=2.12.0, Tensorflow-Probability >=0.20.1
  1. Open the terminal
  2. Using pip to install the package through PyPI
  3. Run pip install ZMPY3D_CP for the installation

Usage

  • 3D Zernike moments with Tensorflow: Open In Colab
  • Shape similarity with CuPy: Open In Colab
  • Structure superposition with NumPy: Open In Colab
  • Runtime evaluation: Open In Colab

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 ZMPY3D_CP package:

1. Locate Package Folder

  • Open your terminal and execute the following command to find the folder of the ZMPY3D_CP package:
  • python -c "import ZMPY3D_CP; print(ZMPY3D_CP.__file__)"
  • Note the path, which ends with /User/path/ptyhon/site-packages/ZMPY3D_CP/__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/ZMPY3D_CP/cache_data.

3. Download the Cache File:

Contributing

Feel free to submit pull requests for improvements or bug fixes.


Citation

Lai, J. S., Burley, S. K., & Duarte, J. M. (2024). ZMPY3D: 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ZMPY3D_CP-0.0.2.tar.gz (16.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ZMPY3D_CP-0.0.2-py3-none-any.whl (16.3 MB view details)

Uploaded Python 3

File details

Details for the file ZMPY3D_CP-0.0.2.tar.gz.

File metadata

  • Download URL: ZMPY3D_CP-0.0.2.tar.gz
  • Upload date:
  • Size: 16.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.16

File hashes

Hashes for ZMPY3D_CP-0.0.2.tar.gz
Algorithm Hash digest
SHA256 93a77083bcf3d7169e32549efab5ed844f675aee39465e4e12068dd221b57b58
MD5 d7b16dae06da80963ecdb8ae44470a29
BLAKE2b-256 293c0a14bf022e02ac327395645ec872698867820ada8f90599ef756c2d8e962

See more details on using hashes here.

File details

Details for the file ZMPY3D_CP-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: ZMPY3D_CP-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.16

File hashes

Hashes for ZMPY3D_CP-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ed45d6b3735d9b2b03f960322c82800b8545228282db7f8ccf5edaf1e3beab72
MD5 01227662efe38dca51dfff08c83174a4
BLAKE2b-256 2d3c53e22b07dda1809c2103d241ec99ba316687e2016305ce98b9c40405377b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page