schrodinger.application.desmond.smarts module

SMARTS matching utility using MMPATTY. This utility is used in Desmond setup and should not be modified to use canvaslib due to the lack of support for zeor-order-bond patterns.

schrodinger.application.desmond.smarts.evaluate_matched_list(matched_list)[source]

Function to flatten and de-duplicate atoms matched in multiple SMARTS pattern. Atom indices are sorted in ascending values.

Parameters

matched_list (list) – List of atom sets each matches a SMARTS pattern

Return type

list

Returns

A list of non-duplicate atom indices representing the union of multiple SMARTS pattern.

schrodinger.application.desmond.smarts.evaluate_net_smarts(structure, smarts_list, excl_smarts_list, verbose=False)[source]

Search for substructures in Structure structure matching the SMARTS pattern smarts_expression.

Returns a list of lists of ints. Each list of ints is a list of atom indices matching the SMARTS pattern while not in the exclusion SMARTS pattern

Parameters
  • structure (Structure) – Structure to search for matching substructures.

  • smarts_list (list) – List of SMARTS strinsg used to match substructures.

  • excl_smarts_list (list) – List of SMARTS strings whose matched atoms will be excluded from the returned match.

  • verbose (bool) – If True, print additional progress reports from the C implementation.

Return type

list

Returns

A list of atom indices matching the SMARTS pattern and not in the exclusion SMARTS pattern.