schrodinger.application.scaffold_enumeration.layered module¶
-
schrodinger.application.scaffold_enumeration.layered.
flat_enumerator
(mol, prng=None, linknodes=None, pvbonds=None)¶ Returns iterator over realizations obtained via not nestable flavors of enumeration:
- repeating units,
- position variant bonds, and
- atom lists
(in that order: “repeating units” must be expanded prior to “position variant bonds” because enumeration of the latter involves atom deletions).
Parameters: - mol (rdkit.Chem.Mol) – Unadulterated molecule.
- prng (
numpy.random.RandomState
or NoneType) – MT19937 pseudorandom number generator from numpy or None. - linknodes (list(linknode.LinknodeSgroup)) – Link nodes (repeating units).
- pvbonds (list(posvarbond.MulticenterSgroup)) – Position variant bonds.
Returns: Iterator over molecules.
Return type: iterator over rdkit.Chem.Mol
-
schrodinger.application.scaffold_enumeration.layered.
flat_list_enumerator
(molecules, prng=None)¶ Returns iterator over structures obtained by applying “flat” enumeration to the
molecules
.Parameters: - molecules (list(rdkit.Chem.Mol)) – List of (kinky) molecules.
- prng (
numpy.random.RandomState
or NoneType) – MT19937 pseudorandom number generator from numpy or None.
Returns: Iterator over molecules.
Return type: iterator over rdkit.Chem.Mol
-
schrodinger.application.scaffold_enumeration.layered.
place_rgroups
(mol, todo, rgroups, prng, homo)¶ Generator that yields realizations of
mol
with (some) atoms replaced by R-groups fromtodo
(and, potentially,rgroups
).Parameters: - mol (rdkit.Chem.Mol) – Scaffold molecule.
- todo (list(list(int), rdkit.Chem.Mol)) – List of lists of atom indices (in
mol
) paired with corresponding R-groups. - rgroups – Dictionary that maps R-group numbers (positive
integers) onto list of molecules. Assumed to contain “original”
R-groups that may be necessary if some of the R-groups in
todo
include R-group references. - prng (
numpy.random.RandomState
or NoneType) – MT19937 pseudorandom number generator from numpy or None. - homo (set(int) or NoneType) – IDs (positive integers) of the homo R-groups.
-
schrodinger.application.scaffold_enumeration.layered.
enumerate_rgroups
(mol, rgroups, prng=None, homo=None)¶ Enumerates R-groups in
mol
using R-groups fromrgroups
.Parameters: - mol (rdkit.Chem.Mol) – Scaffold molecule.
- rgroups – Dictionary that maps R-group numbers (positive integers) onto list of molecules.
- prng (
numpy.random.RandomState
or NoneType) – MT19937 pseudorandom number generator from numpy or None. - homo (set(int) or NoneType) – IDs (positive integers) of the homo R-groups.
-
schrodinger.application.scaffold_enumeration.layered.
collection
(mol, rgroups=None, prng=None, homo=None)¶ Top-level API: generator that yields molecules obtained from
mol
.Parameters: - mol (rdkit.Chem.Mol) – Scaffold molecule.
- rgroups – Dictionary that maps R-group numbers (positive integers) onto list of molecules.
- prng (
numpy.random.RandomState
or NoneType) – MT19937 pseudorandom number generator from numpy or None. - homo (set(int) or NoneType) – IDs (positive integers) of the “homo” R-groups. Regular R-groups that share the same label get enumerated independently (e.g., four outcomes are expected for R1-CO-R1 with R1 = [*Cl, *F]). OTOH, homo R-groups with the same label end up with the same realization (within a nesting level), so that only two outcomes would be obtained in the example above.