Skip to main content

Probe-Based Identification of Metal-Binding Sites Using Deep Learning Representations

Shijie Xu, Akira Onoda

BioRxiv GitHub License

PyPI PyPI downloads Bioconda Bioconda downloads

🛠️ Installation

With pip or conda

pip install prime-metal
# or
conda install -c conda-forge -c bioconda prime-metal

This installs the prime command and the prime Python package. Model checkpoints (~6.5 GB) are not part of the package: they are downloaded from the Hugging Face Hub the first time a metal is predicted, and cached afterwards. Use prime download ZN CA to fetch them in advance, or set PRIME_HOME to a directory that already contains weights/ and checkpoints/ (e.g. a clone of this repository).

PRIME requires a CUDA GPU. Make sure PyTorch is installed with CUDA support (conda install -c conda-forge 'pytorch=*=*cuda*', or follow pytorch.org for pip).

For installation, we recommend using Docker. You also need to install NVIDIA Container Toolkit to enable GPU support in Docker.

git clone https://github.com/xu-shi-jie/prime.git
cd prime
docker build -t prime .
docker run --rm -it -d -m 50g --runtime=nvidia --gpus all --shm-size=8g -v $(pwd):/workspace --name prime-dev prime bash

You can type docker exec -it prime-dev bash to enter the container.

Here is the directory structure of this repository. The model checkpoints are very large, please be patient when downloading.

├── .dockerignore [0.00 MB]
├── .git [7.15 GB]
├── .gitattributes [0.00 MB]
├── .gitignore [0.00 MB]
├── Dockerfile [0.00 MB]
├── LICENSE [0.02 MB]
├── README.md [0.00 MB]
├── benchmark [4.44 GB]
├── checkpoints [2.08 GB] (* Sequence / pre-trained model checkpoints)
├── configs [0.00 MB]
├── data [524.93 MB]
├── examples [332.23 MB]
├── generate_mates.py [0.00 MB]
├── metal3d_remove_occ.py [0.00 MB]
├── notebooks [49.43 MB]
├── predict.py [0.00 MB] (* wrapper around prime/predict.py)
├── predict_all.py [0.00 MB]
├── predict_probe.py [0.02 MB]
├── prime [0.36 MB] (* the installable package: models, CLI and configs)
├── requirements.txt [0.00 MB]
├── scripts [0.06 MB]
├── train.py [0.00 MB]
└── weights [6.14 GB] (* Structure model checkpoints)

🚀 Usage

Use the prime command to predict the metal-binding sites of proteins. For example:

curl -o 12ca.cif https://files.rcsb.org/download/12CA.cif
prime predict --pdb 12ca.cif:A --metal ZN --outdir .

Inside a clone of this repository (or in the Docker container) you can equivalently run the script and choose the checkpoint yourself:

python predict.py --pdb 12ca.cif:A --outdir . --ckpt weights/probe_ZN_resnet152_pretrained\=True_hard_mining_epoch\=26_val_auc\=0.9910.ckpt

where A indicates the chain ID of the protein. This will generate PDB files in the output directory, which contain only the predicted metal ions, with naming format as <file_name>-prime-<metal_type>.pdb. You can also pass multiple PDB/CIF files at once, as --pdb file1.cif:A file2.cif:B ....

For more details, you can check the help message.

prime predict --help

We recommend using GPU with enough RAM for the prediction. PRIME was currently tested with NVIDIA GeForce RTX 3090Ti/4090. The default batch size 32 is set for inference of probes. Program running on GPUs with less RAM may reduce the batch size to avoid OOM error.

We also provde script for the prediction of all 14 metal ions:

prime predict-all -i 12ca.cif:A -o <outdir>

🧬 ResNet3D representations

We provide pre-trained ResNet3D models for extracting structure representations of proteins. You can use the following code to extract the features.

import torch
from prime.models.resnet import generate_model

# [10, 18, 34, 50, 101, 152, 200]
model = generate_model(10)
model.load_state_dict(torch.load('checkpoints/pretrained/pretrain_epoch=999_cnn_layers=10_val_acc=0.6510.ckpt'))

You may need to change the architecture of resnet in prime/models/resnet.py to adapt to different tasks.

🎓 Citation

@article{xu2025probe,
  title={Probe-Based Identification of Metal-Binding Sites Using Deep Learning Representations},
  author={Xu, Shijie and Onoda, Akira},
  journal={bioRxiv},
  pages={2025--10},
  year={2025},
  publisher={Cold Spring Harbor Laboratory}
}

🌐 Freely available server

Our PRIME server is now available at PRIME Server.

🔍 FAQ

I cannot access your PRIME server. ~~Our server has been updated. If you continue to encounter this issue, please contact us.~~ ~~Unfortunately, our server is currently updating its certificate, which means you may encounter security warnings when trying to access it. Some browsers may block access to the site due to these warnings (e.g., Safari). We recommend using browsers like Chrome or Firefox -> Advanced -> Proceed to the site (unsafe). We apologize for any inconvenience this may cause and appreciate your understanding.~~

✉️ Help

If you have any questions, please feel free to contact me at shijie.xu@ees.hokudai.ac.jp.

Metadata

Release files for prime-metal 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prime-metal 1.0.2
File Size Uploaded Provenance Actions
prime_metal-1.0.2.tar.gz 59.4 kB With provenance Details for prime_metal-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for prime-metal 1.0.2
File Interpreter ABI Platform Actions
prime_metal-1.0.2-py3-none-any.whl Python 3 none any Details for prime_metal-1.0.2-py3-none-any.whl

Total release size: 123.5 kB

Release files / prime_metal-1.0.2.tar.gz

Download URL prime_metal-1.0.2.tar.gz
Size 59.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d82306b540cc2dbcd1d370fbb01a0ab778e7badc07fd7aaff6659cde1caa715f
BLAKE2b-256 checksum
How to use checksums
84c2d7a6f0e393ef95455f3b58af22561abd5d9eaf213be653c8dfd14d61a3c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / prime_metal-1.0.2-py3-none-any.whl

Download URL prime_metal-1.0.2-py3-none-any.whl
Size 64.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65cae83062e2437a1d6c8bcfc019ab20495b9e821d3080336b7e7f04fb58eb67
BLAKE2b-256 checksum
How to use checksums
c8b442cb6ce4612d1d279f3637967eaa4730c6b5b709c0a52fc1f292d60e0890
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for prime-metal 1.0.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for prime_metal-1.0.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page