| Trees | Indices | Help |
|
|---|
|
|
Implementation of the RECAP algorithm from Lewell et al. JCICS *38* 511-522 (1998)
The published algorithm is implemented more or less without
modification. The results are returned as a hierarchy of nodes instead
of just as a set of fragments. The hope is that this will allow a bit
more flexibility in working with the results.
For example:
>>> from rdkit import Chem
>>> from rdkit.Chem import Recap
>>> m = Chem.MolFromSmiles('C1CC1Oc1ccccc1-c1ncc(OC)cc1')
>>> res = Recap.RecapDecompose(m)
>>> res
<...Chem.Recap.RecapHierarchyNode object at ...>
>>> sorted(res.children.keys())
['[*]C1CC1', '[*]c1ccc(OC)cn1', '[*]c1ccccc1-c1...cc(OC)c...1', '[*]c1ccccc1OC1CC1']
>>> sorted(res.GetAllChildren().keys())
['[*]C1CC1', '[*]c1ccc(OC)cn1', '[*]c1ccccc1-c1...cc(OC)c...1', '[*]c1ccccc1OC1CC1', '[*]c1ccccc1[*]']
To get the standard set of RECAP results, use GetLeaves():
>>> leaves=res.GetLeaves()
>>> sorted(leaves.keys())
['[*]C1CC1', '[*]c1ccc(OC)cn1', '[*]c1ccccc1[*]']
>>> leaf = leaves['[*]C1CC1']
>>> leaf.mol
<...Chem.rdchem.Mol object at ...>
|
|||
|
RecapHierarchyNode This class is used to hold the Recap hiearchy... |
|||
|
|||
|
|||
|
|||
reactionDefs =
|
|||
reactions = tuple([Reactions.ReactionFromSmarts(x) for x in re
|
|||
__package__ =
|
|||
x =
|
|||
Imports: sys, weakref, Chem, Reactions, iterkeys, iteritems, next
|
|||
reactionDefs
|
reactions
|
x
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sun Oct 8 11:32:00 2017 | http://epydoc.sourceforge.net |