ws
Wrappers around PDBe REST API.
Scores
dataclass
PDBe validation summary quality scores
These scores are harmonic means of percentile-based quality metrics for macromolecular structures:
- geometry_quality: from geometric percentiles (Ramachandran, clashscore, sidechains).
- data_quality: from diffraction-data percentiles (R-free, RSRZ).
- overall_quality: combines geometry and data percentiles. If any contributing percentile is 0, the harmonic mean is 0. If all percentiles are unavailable, the score is null.
- experiment_data_available: indicates whether experimental diffraction data were used.
Attributes:
| Name | Type | Description |
|---|---|---|
geometry_quality |
float | None
|
Harmonic mean of all absolute validation percentile metrics related to model geometry. |
data_quality |
float | None
|
Harmonic mean of absolute percentiles related to model geometry. |
overall_quality |
float | None
|
Harmonic mean of absolute percentiles related to experimental data and its fit to the model. |
experiment_data_available |
bool | str
|
Sometimes data quality is absent due to unavailability of experimental data itself. This flag tells whether the data are available. |
fetch_summary_quality_scores_in_batches(pdb_ids, timeout=1800, batch_size=20, sleep_between_batches=0.1)
async
Fetches validation summary quality scores for a set of PDB IDs in batches.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pdb_ids
|
set[str]
|
A set of PDB IDs to fetch quality scores for. |
required |
timeout
|
int
|
Timeout for fetching each batch, in seconds. |
1800
|
batch_size
|
int
|
Number of PDB IDs to include in each batch request. |
20
|
sleep_between_batches
|
float
|
Time to sleep between batch requests, in seconds. |
0.1
|
Returns:
| Type | Description |
|---|---|
dict[str, Scores]
|
A dict mapping PDB IDs to their quality scores. |
Raises:
| Type | Description |
|---|---|
ClientResponseError
|
If any batch request fails with a non-2xx status code. |