Model Checking

This chapter describes additional functionality to check models. Some of this functionality is used within the modelling pipeline.

Detecting Ring Punches

promod3.modelling.GetRings(ent)

Get rings for a protein structure. A ring is only added if all ring-atoms exist or if it is a proline and three of the atoms exist (center and radii are estimated then).

Parameters:

ent (EntityHandle or EntityView) – Structure for which to detect rings.

Returns:

list of rings to perform ring checks. Each ring is a named tuple with: center (Vec3), plane (Plane), radius (float), residue (ResidueHandle).

promod3.modelling.GetRingPunches(rings, ent)

Get list of residues with rings that are punched by the given structure.

Parameters:
Returns:

list of residues (ResidueHandle) which have a punched ring.

promod3.modelling.HasRingPunches(rings, ent)

Check if any ring is punched by the given structure. This check is faster than using GetRingPunches().

Parameters:
Returns:

True, iff any ring is punched

Return type:

bool

promod3.modelling.FilterCandidates(candidates, model, gap, orig_indices=[])

Remove loop candidates if they cause ring punches.

Parameters:
  • candidates (LoopCandidates) – Loop candidates meant to fill gap within model. Offending candidates are removed from this list.

  • model (EntityHandle) – Model for which loop is to be filled.

  • gap (StructuralGap.) – Gap for which loop is to be filled.

  • orig_indices (list) – Mapping to old indexing of candidates. If given, it must have as many elements as candidates.

promod3.modelling.FilterCandidatesWithSC(candidates, model, gap, orig_indices=[])

Remove loop candidates if they (with sidechain) cause ring punches. See FilterCandidates().

Detecting Non-Planar Rings

promod3.modelling.GetNonPlanarRings(ent, max_dist_thresh=0.1)

Get list of residues with rings that non-planar in the given structure.

Only residues with res.one_letter_code in [‘Y’, ‘F’, ‘W’, ‘H’] that contain all expected ring atoms are considered.

Planarity is defined by the maximum distance of any ring atom to the optimal plane describing the ring. This plane is constructed by defining a point on the plane, here the geometric center of the ring atoms and a normal. We construct an orthogonal basis [e1, e2, e3]. e1 points in direction with lowest variance of ring atoms and e3 in direction with highest variance. e1 is thus the plane normal. Internally this is done using a singular value decomposition algorithm.

To put the default threshold of 0.1 in perspective: if you calculate these distances on the same non-redundant set of experimental structures as ProMod3 used to derive its rotamer libraries, 99.9 % of the residues are within 0.065 (HIS), 0.075 (TRP), 0.057 (TYR), 0.060 (PHE).

Parameters:
  • ent (EntityHandle or EntityView) – Structure for which to detect non-planar rings.

  • max_dist_thresh (float) – A residue that contains a ring is considered non-planar if the max distance of any ring-atom to the optimal ring plane is above this threshold.

Returns:

list of residues (ResidueHandle/ ResidueView) which have a non-planar ring.

promod3.modelling.HasNonPlanarRings(ent, max_dist_thresh=0.1)

Check if any ring is non-planar in the given structure.

Calls GetNonPlanarRings() with given parameters and returns if any residue is considered non-planar.

Parameters:
  • ent (EntityHandle or EntityView) – Structure for which to detect non-planar rings

  • max_dist_thresh (float) – A residue that contains a ring is considered non-planar if the max distance of any ring-atom to the optimal ring plane is above this threshold.

Returns:

True, if any ring is non-planar

Return type:

bool

Model Checking With MolProbity

promod3.modelling.RunMolProbity(target_pdb, molprobity_bin=None)

Run MolProbity from Phenix on a given PDB file.

MolProbity score computation: (formula from molprobity source code)

clashscore = result["Clashscore"]
rota_out = result["Rotamer outliers"]
rama_iffy = 100. - result["Ramachandran favored"]
mpscore = (( 0.426 * math.log(1 + clashscore) ) +
         ( 0.33 * math.log(1 + max(0, rota_out - 1)) ) +
         ( 0.25 * math.log(1 + max(0, rama_iffy - 2)) )) + 0.5
Parameters:
  • target_pdb (str) – Path to PDB file on which to do analysis.

  • molprobity_bin (str) – Path to phenix.molprobity executable. If None, it searches for it in the PATH or (if set) in the env. variable MOLPROBITY_EXECUTABLE. The function was tested with Phenix 1.9-1692 and with MolProbity 4.2 which also includes it.

Returns:

Dictionary with scores produced by MolProbity. Entries:

  • ”Ramachandran outliers” (percentage [0,100] as float)

  • ”Ramachandran favored” (percentage [0,100] as float)

  • ”Rotamer outliers” (percentage [0,100] as float)

  • ”C-beta deviations” (int)

  • ”Clashscore” (float)

  • ”MolProbity score” (float)

  • ”RMS(bonds)” (float)

  • ”RMS(angles)” (float)

Return type:

dict

Raises:

FileNotFound if the “phenix.molprobity” executable is not found.

promod3.modelling.RunMolProbityEntity(ost_ent, molprobity_bin=None)

Run molprobity from phenix on given OST entity.

See RunMolProbity() for details.

Parameters:

ost_ent (Entity) – OST entity on which to do analysis.

promod3.modelling.ReportMolProbityScores(scores)

Print MolProbity score and its components to LogInfo.

Parameters:

scores (dict) – MolProbity scores as generated by RunMolProbity().

Search

Enter search terms or a module, class or function name.

Contents