| 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:
>>> m = Chem.MolFromSmiles('C1CC1Oc1ccccc1-c1ncc(OC)cc1')
>>> res = Recap.RecapDecompose(m)
>>> res
<Chem.Recap.RecapHierarchyNode object at 0x00CDB5D0>
>>> res.children.keys()
['[*]C1CC1', '[*]c1ccccc1-c1ncc(OC)cc1', '[*]c1ccc(OC)cn1', '[*]c1ccccc1OC1CC1']
>>> res.GetAllChildren().keys()
['[*]c1ccccc1[*]', '[*]C1CC1', '[*]c1ccccc1-c1ncc(OC)cc1', '[*]c1ccc(OC)cn1', '[*]c1ccccc1OC1CC1']
To get the standard set of RECAP results, use GetLeaves():
>>> leaves=res.GetLeaves()
>>> leaves.keys()
['[*]c1ccccc1[*]', '[*]c1ccc(OC)cn1', '[*]C1CC1']
>>> leaf = leaves['[*]C1CC1']
>>> leaf.mol
<Chem.rdchem.Mol object at 0x00CBE0F0>
|
|||
|
RecapHierarchyNode This class is used to hold the Recap hiearchy... |
|||
|
|||
|
|||
|
|||
reactionDefs = "[#7;+0;D2,D3:1]!@C(!@=O)!@[#7;+0;D2,D3:2]>>[*]
|
|||
reactions = tuple([Reactions.ReactionFromSmarts(x) for x in re
|
|||
Imports: sys, weakref, Chem, Reactions, iterkeys, iteritems, next
|
|||
reactionDefs
|
reactions
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu Feb 1 16:13:01 2018 | http://epydoc.sourceforge.net |