Skip to main content

protein-mosaic-q

protein-mosaic-q is a Python library for computing structural parameters (Q and Q_alt) that quantify the spatial clustering of amino acids in protein three-dimensional structures.

The library operates directly on PDB and mmCIF structure files and is built on top of Biopython.


Overview

Given a protein structure file (PDB or mmCIF), the library computes:

  • Q — quantifies the degree of spatial clustering among amino acids of the same chemical type (acidic, basic, polar, hydrophobic)
  • Q_alt — an extension of Q that also includes amino acids classified as “special”

In essence, higher values indicate stronger clustering of residues with similar physicochemical properties, whereas lower values correspond to a more homogeneous spatial distribution.


Scientific context

These parameters are motivated by the observation that amino acids in protein structures tend to organize into clusters according to their chemical families, forming a mosaic-like spatial arrangement.

This organization can be:

  • quantified mathematically through parameters such as Q and Q_alt
  • visually inspected in protein structural representations

Empirical analyses have shown that:

  • the value of Q is strongly dependent on the number of residues (n)
  • an analogous relationship exists for Q_alt

This suggests the existence of a highly conserved structural property across a wide range of proteins.


Proteins Mosaic Q Project

This library is associated with the Proteins Mosaic Q Project, a citizen-science initiative aimed at gathering evidence for this structural clustering pattern.

The project combines:

  • computational analysis (such as the calculations implemented in this library)
  • visual validation by independent observers that contribute to a collaborative repository of protein images.


Installation

pip install protein-mosaic-q

Usage

from mosaicq import calculate_q, calculate_q_alt

q = calculate_q("protein.pdb")
q_alt = calculate_q_alt("protein.cif")

print(q, q_alt)

Command-line interface

mosaicq protein.pdb
mosaicq protein.cif --metric Q_alt

Interpretation of results

  • Higher values indicate stronger clustering of amino acids of the same chemical type
  • Lower values indicate a more uniform spatial distribution

These parameters provide a quantitative framework for analyzing protein structural organization.


Contributing

Contributions are welcome. Potential areas include:

  • performance improvements
  • additional structural descriptors
  • expanded compatibility with other structural formats or tools

License

MIT License

Metadata

Release files for protein-mosaic-q 0.3.3

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

Source distribution (sdist)

Source distribution for protein-mosaic-q 0.3.3
File Size Uploaded Provenance
protein_mosaic_q-0.3.3.tar.gz 6.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for protein-mosaic-q 0.3.3
File Interpreter ABI Platform
protein_mosaic_q-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 12.4 kB

Release files / protein_mosaic_q-0.3.3.tar.gz

Download URL protein_mosaic_q-0.3.3.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2c98b6448e04d9d54d56584021ef8ca0e962e5bbe8d05e08cc42488ba9e3ba85
BLAKE2b-256 checksum
How to use checksums
1a6e94449918278e016517adfcf406aec17fd866178766573a06322dadb9636a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / protein_mosaic_q-0.3.3-py3-none-any.whl

Download URL protein_mosaic_q-0.3.3-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c78aa0bd097f03b9e7fa9e6bb5728c90cab8e339a69aeb22d2d7b731e22fd96
BLAKE2b-256 checksum
How to use checksums
1662540f5dd711892284454bf13f5715100dd54055d19ab9c82be31cf5e1ca6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for protein-mosaic-q 0.3.3

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

0.3.3 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