Calculate Q and Q_alt structural descriptors for protein structures in PDB or mmCIF format.
Project description
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.
Project links
-
EU-Citizen.Science
https://citizenscience.eu/project/686 -
Observatorio de Ciencia Ciudadana https://ciencia-ciudadana.es/project/392
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file protein_mosaic_q-0.3.3.tar.gz.
File metadata
- Download URL: protein_mosaic_q-0.3.3.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c98b6448e04d9d54d56584021ef8ca0e962e5bbe8d05e08cc42488ba9e3ba85
|
|
| MD5 |
285ef540f64625914fa7bf0ced61bbab
|
|
| BLAKE2b-256 |
1a6e94449918278e016517adfcf406aec17fd866178766573a06322dadb9636a
|
File details
Details for the file protein_mosaic_q-0.3.3-py3-none-any.whl.
File metadata
- Download URL: protein_mosaic_q-0.3.3-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c78aa0bd097f03b9e7fa9e6bb5728c90cab8e339a69aeb22d2d7b731e22fd96
|
|
| MD5 |
45139c6c1801154398042f26d67cf322
|
|
| BLAKE2b-256 |
1662540f5dd711892284454bf13f5715100dd54055d19ab9c82be31cf5e1ca6e
|