calculate_mcs

calculate_mcs(mols: list, threshold: float | None = None, ring_matches_ring_only: bool = False, timeout: int | None = None) MCSResult[source]

Calculate Maximum Common Substructure (MCS) for a list of molecules.

Uses RDKit’s FindMCS algorithm with flexible atom and bond matching.

Parameters:
  • mols – List of RDKit Mol objects.

  • threshold – Fraction of molecules that must contain the substructure. Uses config default if None.

  • ring_matches_ring_only – If True, ring atoms only match ring atoms.

  • timeout – Maximum time in seconds for MCS calculation. Uses config default if None.

Returns:

MCS result object containing the common substructure.