MLXMolCluster
Leverage Apple Silicon to cluster molecules using MLX.
At the time of writing, the project contains two clustering methods:
- Butina
- KMeans
Additional clustering methods will be added over time.
Examples have been written and can be found here.
Installation
Install from PyPI:
pip install mlx-mol-cluster
Or install directly from the GitHub repository:
pip install git+https://github.com/tlint101/MLXMolCluster.git
Example
The following is an example of clustering molecules using Butina on MLX.
# generate molecular fingerprints
fp_gen = rdFingerprintGenerator.GetRDKitFPGenerator(fpSize=1024)
rdkit_fps = [fp_gen.GetFingerprint(mol) for mol in mol_list]
# convert to mlx arrays
mlx_fp = fp_to_mlx(rdkit_fps)
# Butina cluster
butina_mlx = butina(mlx_fp)
A speed comparison can be seen at the tutorial section. The runs were performed on a M2 Pro chip
(10 CPU, 16 GPU)
NOTE: The figure can be misleading. The figure shows the clustering speed of already generated molecular fingerprints. The main bottleneck of clustering remains on the generation of molecular fingerprints. This is done on the CPU before being converted to the GPU. Depending on the number of molecules, this can be time intensive.
Additional
Collaborations are welcome!
Metadata
Release files for mlx-mol-cluster 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mlx_mol_cluster-0.2.0.tar.gz | 8.4 kB | Without provenance | Details for mlx_mol_cluster-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mlx_mol_cluster-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for mlx_mol_cluster-0.2.0-py3-none-any.whl |
Total release size: 17.8 kB
Release files / mlx_mol_cluster-0.2.0.tar.gz
| Download URL | mlx_mol_cluster-0.2.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ef1168fb9be65c79daaa5d1709124bcc9d1f33e2bc91fca8bd40ade8da3a125
|
|
BLAKE2b-256 checksum How to use checksums |
9bd3dc4f25b6615aaf7e7f9b0085d20ba4fb420168668ef03d67488c0d66dfe2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.14.2 Darwin/25.4.0
|
Release files / mlx_mol_cluster-0.2.0-py3-none-any.whl
| Download URL | mlx_mol_cluster-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d385bdb4d8495979d94bd594af21dc5011e69ec352903e4dcd43b0842af06b3
|
|
BLAKE2b-256 checksum How to use checksums |
4c271493ebd2a20646f44bd8c373675818d51f3f4435eddaad6a20c6f147849b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.14.2 Darwin/25.4.0
|
Security for mlx-mol-cluster 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.