computations

pdbeccdutils.computations.parity_method

Lightweight implementation of the parity method provided by Jon Tyzack.

pdbeccdutils.computations.parity_method.compare_molecules(template, query, thresh=0.01, exact_match=False, timeout=40)

Given the two molecules calculates their similarity score. If expected similarity score is lower than the threshold nothing is calculated.

Parameters:
  • template (rdkit.Chem.rdchem.Mol) – Template molecule

  • query (rdkit.Chem.rdchem.Mol) – Query molecule

  • thresh (float, optional) – Threshold score for the match to be considered. Defaults to 0.01.

  • exact_match (bool, optional) – Controls whether atom type and bond order should be checked too. Defaults to False.

  • timeout (int, optional) – Value of timeout in seconds to stop the

  • calcualtion (maximum common substructure)

Returns:

Result of the PARITY comparison.

Return type:

ParityResult