The modelcif.qa_metric Python module¶
Classes to annotate models with quality scores.
To use, first declare a class for the desired score by deriving
from both a subclass of MetricMode (which defines the part
of the system the metric applies to) and a subclass of MetricType
(which describes the meaning of the score value). Set the software
attribute to point to the software used to calculate the metric
(as a modelcif.SoftwareGroup or modelcif.Software object).
For example to declare a global distance score:
class MyScore(modelcif.qa_metric.Global, modelcif.qa_metric.Distance):
"My distance-based quality score"
software = modelcif.Software(...)
The name and description of the score in the mmCIF file will be taken from
the name and docstring of the Python class, unless the
MetricMode.name or MetricMode.description attributes are
overridden in the subclass.
QA metric objects should be added to
modelcif.model.Model.qa_metrics.
- class modelcif.qa_metric.MetricMode[source]¶
Base class for the mode of a quality metric. Use a derived class such as
Global,Local,LocalPairwise,Feature,FeaturePairwise, orDihedralfor declaring a new score.- property description¶
Longer text description of this score. By default it is the first line of the docstring.
- property name¶
Short name of this score. By default it is just the class name, but this can be overridden in subclasses (for example to create names containing spaces).
- class modelcif.qa_metric.Global(value)[source]¶
A score that is calculated per-model.
- Parameters:
value (float) – The score value (see
MetricType).
- class modelcif.qa_metric.Local(residue, value)[source]¶
A score that is calculated on a single residue.
- Parameters:
residue (
modelcif.Residue) – The residue that is scored.value (float) – The score value (see
MetricType).
- class modelcif.qa_metric.LocalPairwise(residue1, residue2, value)[source]¶
A score that is calculated between two residues.
- Parameters:
residue1 (
modelcif.Residue) – The first residue that is scored.residue2 (
modelcif.Residue) – The second residue that is scored.value (float) – The score value (see
MetricType).
- class modelcif.qa_metric.Feature(feature, value)[source]¶
A score that is calculated on a single feature.
- Parameters:
feature (
modelcif.Feature) – The feature that is scored.value (float) – The score value (see
MetricType).
- class modelcif.qa_metric.FeaturePairwise(feature1, feature2, value)[source]¶
A score that is calculated between two features.
- Parameters:
feature1 (
modelcif.Feature) – The first feature that is scored.feature2 (
modelcif.Feature) – The second feature that is scored.value (float) – The score value (see
MetricType).
- class modelcif.qa_metric.Dihedral(atom_id_1, atom_id_2, atom_id_3, atom_id_4, value, quality, smarts_pattern=None)[source]¶
A score that is calculated on a dihedral.
- Parameters:
atom_id_1 (int) – The first atom ID in the dihedral.
atom_id_2 (int) – The second atom ID in the dihedral.
atom_id_3 (int) – The third atom ID in the dihedral.
atom_id_4 (int) – The fourth atom ID in the dihedral.
value (float) – The score value (see
MetricType).quality (str) – Outcome or result of the analysis.
smarts_pattern (str) – Optional SMARTS pattern that specifies the dihedral angle in its chemical environment; or that defines the fragment used for dihedral scanning.
- property quality¶
Outcome or result of the analysis.
- class modelcif.qa_metric.MetricType[source]¶
Base class for the type of a quality metric. Generally a derived class such as
ZScoreorDistanceis used to declare a new score, but a custom type can also be declared by deriving from this class and providing a docstring to describe the metric type:class MPQSMetricType(modelcif.qa_metric.MetricType): "composite score, values >1.1 are reliable"- property other_details¶
More information about this metric type. By default it is the first line of the MetricType subclass docstring.
- class modelcif.qa_metric.ZScore[source]¶
Score that is the number of standard deviations from optimal/best. See
MetricTypefor more information.
- class modelcif.qa_metric.Energy[source]¶
Energy score (the lower the energy, the better the quality). See
MetricTypefor more information.
- class modelcif.qa_metric.Distance[source]¶
Distance score (the lower the distance, the better the quality). See
MetricTypefor more information.
- class modelcif.qa_metric.NormalizedScore[source]¶
Normalized score ranging from 0 to 1. See
MetricTypefor more information.
- class modelcif.qa_metric.PAE[source]¶
Score that is a predicted aligned error. See
MetricTypefor more information.
- class modelcif.qa_metric.ContactProbability[source]¶
Score that is a contact probability of a pairwise interaction. See
MetricTypefor more information.
- class modelcif.qa_metric.PLDDT[source]¶
Predicted lDDT-CA score in [0,100] (higher score, means better accuracy). See
MetricTypefor more information.
- class modelcif.qa_metric.PLDDT01[source]¶
Predicted lDDT-CA score in [0,1] (higher score, means better accuracy). See
MetricTypefor more information.
- class modelcif.qa_metric.PLDDTAllAtom[source]¶
Predicted lDDT all atom score in [0,100] (higher score, means better accuracy). See
MetricTypefor more information.
- class modelcif.qa_metric.PLDDTAllAtom01[source]¶
Predicted lDDT all atom score in [0,1] (higher score, means better accuracy). See
MetricTypefor more information.
- class modelcif.qa_metric.PLDDTToPolymer[source]¶
Predicted lDDT with distances from each atom to CA or C1’ of nearby polymer residues [0,100] (higher score, means better accuracy). See
MetricTypefor more information.
- class modelcif.qa_metric.PTM[source]¶
Predicted TM-score in [0,1] (higher value means higher confidence). See
MetricTypefor more information.
- class modelcif.qa_metric.IpTM[source]¶
Protein-protein interface score, based on TM-score in [0,1]. See
MetricTypefor more information.
- class modelcif.qa_metric.Boolean[source]¶
0 or 1 depending on whether a check passed. See
MetricTypefor more information.