Package schrodinger :: Package application :: Package matsci :: Module smartsutils
[hide private]
[frames] | no frames]

Module smartsutils

Classes [hide private]
  SMARTSGroupData
SMARTSGroupData(number, name, pattern, indexes)
  SMARTSGroupError
Class for exceptions related to SMARTS group finding
Functions [hide private]
bool
validate_name(name)
Make sure name has the correct set of characters
 
delete_group_properties(struct)
Delete all SMARTS group properties (structure and atom) from the structure
dict
find_group_data(struct)
Find an SMARTS group data on the structure
Variables [hide private]
  _doc__ = '\nUtilities for working with SMARTS patterns\n\nCopy...
  GROUP_STRUCT_PROP_BASE = 's_matsci_smarts_group_%s'
  GROUP_STRUCT_COUNT = 'i_matsci_smarts_group_matches_%s'
  GROUP_NAME_PROP = 's_matsci_smarts_group_name'
  GROUP_ATOM_INDEX_PROP = 'i_matsci_smarts_group_atom_index'
  GROUP_NUMBER_PROP = 'i_matsci_smarts_group_number'
  VALID_NAME_PUNCTUATION = '_-()[]'
  VALID_NAME_CHARS = set(['(', ')', '-', '0', '1', '2', '3', '4'...
  VALID_NAME_DESC_TEXT = 'letters, numbers and the special chara...
  __package__ = 'schrodinger.application.matsci'
Function Details [hide private]

validate_name(name)

 

Make sure name has the correct set of characters

Parameters:
  • name (str) - The string to check
Returns: bool
True if name has no invalid characters, False if any characters are invalid

delete_group_properties(struct)

 

Delete all SMARTS group properties (structure and atom) from the structure

Parameters:

find_group_data(struct)

 

Find an SMARTS group data on the structure

Parameters:
Returns: dict
A dictionary. Keys are smarts group numbers, values are SMARTSGroupData named tuples for the SMARTS group with that number

@raise SMARTSGroupError: If something in the data is not consistent


Variables Details [hide private]

_doc__

Value:
'''
Utilities for working with SMARTS patterns

Copyright Schrodinger, LLC. All rights reserved.
'''

VALID_NAME_CHARS

Value:
set(['(',
     ')',
     '-',
     '0',
     '1',
     '2',
     '3',
     '4',
...

VALID_NAME_DESC_TEXT

Value:
'letters, numbers and the special characters _-()[]'