File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ def collect(origin_atom):
343343 return ring_attachments
344344
345345
346- def get_scaffold_frags (frag ):
346+ def get_scaffold_frags (frag , hash_func = None ):
347347 """Get fragments from a disconnected structure.
348348
349349 This function is used primarily used during molecular fragmentation.
@@ -352,6 +352,8 @@ def get_scaffold_frags(frag):
352352 ----------
353353 frag : rdkit.Chem.rdchem.Mol
354354 An rdkit Mol containing disconeccted structures.
355+ hash_func : callable, optional
356+ Scaffold hash function, the default is the canonical smiles.
355357
356358 Returns
357359 -------
@@ -383,7 +385,7 @@ def get_scaffold_frags(frag):
383385 # equivalent to the behavior of SNG (I believe...)
384386 logger .debug (e )
385387 return set ()
386- frags = {Scaffold (f ) for f in GetMolFrags (frag , True , False )}
388+ frags = {Scaffold (f , hash_func ) for f in GetMolFrags (frag , True , False )}
387389 return frags
388390
389391
You can’t perform that action at this time.
0 commit comments