Package schrodinger :: Package application :: Package desmond :: Module smarts
[hide private]
[frames] | no frames]

Module smarts

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.

Functions [hide private]
list
evaluate_matched_list(matched_list)
Function to flatten and de-duplicate atoms matched in multiple SMARTS pattern.
list
evaluate_net_smarts(structure, smarts_list, excl_smarts_list, verbose=False)
Search for substructures in Structure structure matching the SMARTS pattern smarts_expression.
Function Details [hide private]

evaluate_matched_list(matched_list)

 

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
Returns: list
A list of non-duplicate atom indices representing the union of multiple SMARTS pattern.

evaluate_net_smarts(structure, smarts_list, excl_smarts_list, verbose=False)

 

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.
Returns: list
A list of atom indices matching the SMARTS pattern and not in the exclusion SMARTS pattern.