schrodinger.test.structurecheck module

Custom assertions for “checking” structures. Uses the Protein Report to determine whether a structure has (for instance) bad steric clashes, or unreasonable bond angles.

See test_structurecheck.py for examples. It is also used extensively in psp.

copyright (c) Schrodinger, LLC. All rights reserved.

class schrodinger.test.structurecheck.ProteinReportCheck(ct, steric_delta=None, steric_distance=None, bond_length_deviation=0.1, bond_angle_deviation=10.0, peptide_planarity_deviation=15.0, sidechain_planarity_deviation=0.02, improper_torsion_deviation=5.0)[source]

Bases: object

This is a wrapper for ProteinReport which is used for unittesting and scientific testing.

__init__(ct, steric_delta=None, steric_distance=None, bond_length_deviation=0.1, bond_angle_deviation=10.0, peptide_planarity_deviation=15.0, sidechain_planarity_deviation=0.02, improper_torsion_deviation=5.0)[source]
Parameters
  • ct – Structure to operate on.

  • steric_delta – Provide a buffer of this size(A) between the sum of VdW radii of the two atoms and their distance (non-bonded atoms only) to determine what is a clash.

  • steric_distance – Atoms closer than this distance will be counted as a clash atoms only) to determine what is a clash.

  • bond_length_deviation – Bond length deviation of more than this will be counted as a bond length problem.

  • bond_angle_deviation – Bond angle deviation of more than this (def) will be counted as a bond angle problem.

  • peptide_planarity_deviation – Residues where the atoms that make up the peptide plane deviate from planarity more than this (deg) will be considered a problem.

  • sidechain_planarity_deviation – Any aromatic residue where the atoms that make up the aromatic unit deviate more than this amount (A) from the plane will be considered a problem.

  • improper_torsion_deviation – Any improper torsion which deviates from the canonical amount by more than this (rad) will be considered a problem.

assertProteinHealth(name, test_values)[source]

Raise an assertion error if criteria are not met.

Parameters
  • name (str) – Title that is used in output(string)

  • test_values (dict) – Key is the name of the test to perform and the value is the maximum number of exceptions allowed.

Raises

AssertionError – If the number of exceptions to the criterion exceeds the maximum allowed.

reportSet(measurement)[source]

Return a tuple containing name of the desired measurement of data (string), the a header providing the column titles (list of strings), and the values for that measurement (list of strings). The values will be subset that is worse than the cutoffs provided in the initialized. Any property calculated by protein reports can be selected.

Parameters

measurement (str) – Measurement to check

schrodinger.test.structurecheck.assert_no_major_problems(ct)[source]
Raises

AssertionError – If the connection table contains a SEVERE steric clash, bond length or angle deviation.