Skip to main content

Backbone Rigid Invariant

Introduction

Backbone Rigid Invariant (BRI) is a Python package for describing the 3D shape of a protein backbone with numbers that do not depend on how the protein is oriented in space. Because the descriptors are rotation- and translation-invariant, two structures can be compared directly — no superposition required.

This package enables:

  1. Cleaning a PDB/mmCIF dataset (from RCSB) with a defined set of rules to obtain qualified protein chains.
  2. Computing Backbone Rigid Invariants (BRI, coordinate-based) and Length Angle Invariants (LAI, bond lengths / bond angles / torsion angles) for a given chain.
  3. Comparing chains quickly — computing distances between invariants to find near-duplicate protein structures.

Getting started

Prerequisites

Python >= 3.10.

Installation

Install from PyPI:

pip install backbone-rigid-invariant

Install from a built distribution in this repository:

pip install backbone_rigid_invariant-<version>.tar.gz
# or
pip install backbone_rigid_invariant-<version>-py3-none-any.whl

Then import the package with import bri.

A quick example

Load a structure, compute its invariants, and visualise them:

from bri import ProteinEntry, ProteinChain

# Load an entry by PDB ID (fetched from RCSB) or from a local file path / URL.
entry = ProteinEntry.from_cif("1hho")

# Compute the Backbone Rigid Invariant for every chain in the entry.
invariants = entry.get_entry_invariant()

# Or work with a single chain directly.
chain = ProteinChain.from_cif("1hho", model_id=1, chain_id="A")
bri = chain.get_invariant()                 # -> pandas.DataFrame, one row per residue
lai = chain.get_invariant(invariant_type="lai")  # add bond/torsion-angle columns

For a complete, step-by-step introduction, see the tutorial notebooks in examples/.

Documentation

Full API documentation is hosted at https://backbone-rigid-invariant.readthedocs.io.

Note on the commit history.

The Git history was reset when preparing the public release, so the log starts from the initial public commit.

Citation

If you use this package in your research, please cite:

Olga Anosova, Alexey Gorelov, William Jeffcott, Ziqiu Jiang, and Vitaliy Kurlin. A Complete and Bi-Continuous Invariant of Protein Backbones under Rigid Motion. MATCH Communications in Mathematical and in Computer Chemistry, 94(1):97–134, 2025. DOI: 10.46793/match.94-1.097A

BibTeX:

@article{anosova2025complete,
  title   = {A Complete and Bi-Continuous Invariant of Protein Backbones under Rigid Motion},
  author  = {Anosova, Olga and Gorelov, Alexey and Jeffcott, William and Jiang, Ziqiu and Kurlin, Vitaliy},
  journal = {MATCH Communications in Mathematical and in Computer Chemistry},
  volume  = {94},
  number  = {1},
  pages   = {97--134},
  year    = {2025},
  doi     = {10.46793/match.94-1.097A}
}

Metadata

Release files for backbone-rigid-invariant 1.3.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 backbone-rigid-invariant 1.3.2
File Size Uploaded Provenance
backbone_rigid_invariant-1.3.2.tar.gz 162.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for backbone-rigid-invariant 1.3.2
File Interpreter ABI Platform
backbone_rigid_invariant-1.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 325.6 kB

Release files / backbone_rigid_invariant-1.3.2.tar.gz

Download URL backbone_rigid_invariant-1.3.2.tar.gz
Size 162.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1e739083aa6741d69bd58b75bae7596f2372fa51be4bd02e5551fe8d9669c829
BLAKE2b-256 checksum
How to use checksums
10c37c65639041aab0b6bbe48f182d10447eb15b6c47065b87974c2eb0e64501
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.19

Release files / backbone_rigid_invariant-1.3.2-py3-none-any.whl

Download URL backbone_rigid_invariant-1.3.2-py3-none-any.whl
Size 163.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
173b5f9bc121260d3f20580e13802d9ab4c2c1d300d195f0e5e8bc68889e3d65
BLAKE2b-256 checksum
How to use checksums
a998882f39e98bf4b26bf7a1b13d4d52aae404505887ed6e7caa0791b788b0d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.19

Security for backbone-rigid-invariant 1.3.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.

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.

Release history Release notifications | RSS feed

This release

1.3.2 This release

2 release files No provenance

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