Skip to main content

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

Shijie Xu, Akira Onoda

BioRxiv GitHub License

🛠️ 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.0

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.0
File Size Uploaded
prime_metal-1.0.0.tar.gz 58.7 kB Details

Built distribution (wheel)

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

Total release size: 122.3 kB

Release files / prime_metal-1.0.0.tar.gz

Download URL prime_metal-1.0.0.tar.gz
Size 58.7 kB
Tags Source
SHA-256 checksum
How to use checksums
efcd74aa79523d1ca9148c420fb13a57f154a402c5b01cf91878a750bdc7c934
BLAKE2b-256 checksum
How to use checksums
b87d4b869a564b89854ccc641284bfe13160391d13e36b97af4fc34e2671ff93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 4, 2026.

Transparency log

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

Download URL prime_metal-1.0.0-py3-none-any.whl
Size 63.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0abaf481ff0349318576ef0faa643cff3cbe7fc5420ad1f89d0ad158b96e9283
BLAKE2b-256 checksum
How to use checksums
deb7a38945adf851d874985dbc46a19f39aea610300335673debc853f80582ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 4, 2026.

Transparency log

Release history Release notifications | RSS feed

1.0.1

2 release files

This release

1.0.0 This release

2 release files

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