schrodinger.application.matsci.smartsutils module¶
-
class
schrodinger.application.matsci.smartsutils.SMARTSGroupData(number, name, pattern, indexes)¶ Bases:
tuple-
indexes¶ Alias for field number 3
-
name¶ Alias for field number 1
-
number¶ Alias for field number 0
-
pattern¶ Alias for field number 2
-
-
exception
schrodinger.application.matsci.smartsutils.SMARTSGroupError¶ Bases:
exceptions.ExceptionClass for exceptions related to SMARTS group finding
-
schrodinger.application.matsci.smartsutils.delete_group_properties(struct)¶ Delete all SMARTS group properties (structure and atom) from the structure
Parameters: struct ( schrodinger.structure.Structure) – The structure to delete properties from
-
schrodinger.application.matsci.smartsutils.find_group_data(struct)¶ Find an SMARTS group data on the structure
Parameters: struct ( schrodinger.structure.Structure) – The structure to find groups onReturn type: dict Returns: A dictionary. Keys are smarts group numbers, values are SMARTSGroupDatanamed tuples for the SMARTS group with that numberRaises: SMARTSGroupError – If something in the data is not consistent
-
schrodinger.application.matsci.smartsutils.get_rdkit_atoms(smarts)¶ Return a collection of rdkit atoms for the given SMARTS. The return value has the length of a potential match group, for example for ‘cc’ this length is 2, for ‘[$([NH]([CH2])[CH2])]C’ it is 2, for [n-0X2].[n-0X2] it is 2, etc., even though there might be any number of matches if the pattern was matched.
Parameters: smarts (str) – the SMARTS pattern Raises: RuntimeError – if rdkit has a problem with the SMARTS Return type: rdkit.Chem.rdchem._ROAtomSeq Returns: the rdkit atoms