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, or LocalPairwise for 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:
class modelcif.qa_metric.LocalPairwise(residue1, residue2, value)[source]

A score that is calculated between two residues.

Parameters:
class modelcif.qa_metric.MetricType[source]

Base class for the type of a quality metric. Generally a derived class such as ZScore or Distance is 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 MetricType for more information.

class modelcif.qa_metric.Energy[source]

Energy score (the lower the energy, the better the quality). See MetricType for more information.

class modelcif.qa_metric.Distance[source]

Distance score (the lower the distance, the better the quality). See MetricType for more information.

class modelcif.qa_metric.NormalizedScore[source]

Normalized score ranging from 0 to 1. See MetricType for more information.

class modelcif.qa_metric.PAE[source]

Score that is a predicted aligned error. See MetricType for more information.

class modelcif.qa_metric.ContactProbability[source]

Score that is a contact probability of a pairwise interaction. See MetricType for more information.

class modelcif.qa_metric.PLDDT[source]

Predicted lDDT-CA score in [0,100] (higher score, means better accuracy). See MetricType for more information.

class modelcif.qa_metric.PTM[source]

Predicted TM-score in [0,1] (higher value means higher confidence). See MetricType for more information.

class modelcif.qa_metric.IpTM[source]

Protein-protein interface score, based on TM-score in [0,1]. See MetricType for more information.