schrodinger.application.scaffold_enumeration.common module¶
- schrodinger.application.scaffold_enumeration.common.get_atom_id(atom)[source]¶
Returns atom ID obtained either from the CML ID property or derived from the atom index in case the ID property is not available.
- Parameters
atom (rdkit.Chem.Atom) – Atom.
- Returns
Atom ID.
- Return type
str
- schrodinger.application.scaffold_enumeration.common.get_atom_id_map(mol)[source]¶
Returns a dictionary that maps “atom IDs” (obtained via
get_atom_id()
) onto atom indices.- Parameters
mol (rdkit.Chem.Mol) – Molecule.
- Returns
Map between atom IDs and their indices in
mol
.- Return type
dict(str, int)
- schrodinger.application.scaffold_enumeration.common.get_bond_id(bond)[source]¶
Returns bond ID obtained either from the CML ID property or derived from the bond index in case the ID property is not available.
- Parameters
bond (rdkit.Chem.Bond) – Bond.
- Returns
Bond ID.
- Return type
str
- schrodinger.application.scaffold_enumeration.common.get_sgroups(mol)[source]¶
Returns list of dictionaries that represent “S-groups” from CML input. CML reader stores this data as a molecule-level property in JSON format.
- Parameters
mol (rdkit.Chem.Mol) – Molecule.
- Returns
List of dictionaries that contain “S-groups” as captured from CML input (XML attributes stored as key/value pairs).
- Return type
list(dict(str, str))
- schrodinger.application.scaffold_enumeration.common.set_sgroups(mol, sgroups)[source]¶
Serializes list of dictionaries
sgroups
as JSON and stores the outcome as a molecular-level property (CML_SGROUPS_PROP).- Parameters
mol (rdkit.Chem.Mol) – Molecule.
sgroups (list(dict(str, str))) – List of dictionaries that meant to represent “S-groups”.
- schrodinger.application.scaffold_enumeration.common.product_of_ranges(extents)[source]¶
Returns iterator over Cartesian product of ranges.
- Parameters
extents (iterable over positive int) – Iterable over the range extents. For example, if extents is (3, 8), iterator domain is going to be [0, 3) x [0, 8).
- Returns
Iterator over tuples of integers.