schrodinger.structutils.markush_enumerate module¶
Support for “R-group” enumeration as in ENUM-108.
-
class
schrodinger.structutils.markush_enumerate.PlaceHolder(group_id, atom, bonds)¶ Bases:
tuple-
atom¶ Alias for field number 1
-
bonds¶ Alias for field number 2
-
group_id¶ Alias for field number 0
-
-
schrodinger.structutils.markush_enumerate.get_placeholders(st, groups=None)¶ Gathers placeholders metadata.
Parameters: - st (
schrodinger.structure.Structure) – Structure. - groups – Dictionary that maps placeholder atom indices onto
their group IDs. If
None, regard atoms that carry the “GROUP_ID_PROP” property as “placeholders”.
Returns: List of the placeholders records.
Return type: list(PlaceHolder)
Raises: ValueError if something about
stlooks not right.- st (
-
schrodinger.structutils.markush_enumerate.get_attachment_points(st)¶ Returns ordered list of attachment points in
st. The order is either based upon atom labels (“ATTACHMENT_PROP”, if available) or decided by the bond order and the peer atom atomic number.Returns: List of atoms. Return type: list(int)
-
class
schrodinger.structutils.markush_enumerate.Scaffold(st, groups=None)¶ Bases:
objectHolds reference to the “scaffold” structure. Knows how to join R-groups to the core.
-
fragmentIDs¶ Returns set of fragment IDs.
-
populate(fragments)¶ Replaces placeholders with fragments.
Parameters: fragments (dict(int, schrodinger.structure.Structure)) – Indexable that maps fragment IDs onto structures.
-
-
schrodinger.structutils.markush_enumerate.validate_fragment(st)¶ Parameters: st ( schrodinger.structure.Structure) – Structure.Raises: ValueError if there is no attachment points.
-
schrodinger.structutils.markush_enumerate.validate_scaffold(st)¶ Parameters: st ( schrodinger.structure.Structure) – Structure.Raises: ValueError if there is no placeholders.
-
schrodinger.structutils.markush_enumerate.convert_fragment_from_v3000(st)¶ Converts fragment metadata from MDL V3000 conventions to the ones expected by this module.
Parameters: st ( schrodinger.structure.Structure) – Structure.Raises: ValueError if something goes wrong.
-
schrodinger.structutils.markush_enumerate.convert_scaffold_from_v3000(st)¶ Converts scaffold metadata from MDL V3000 conventions to the ones expected by this module.
Parameters: st ( schrodinger.structure.Structure) – Structure.
-
class
schrodinger.structutils.markush_enumerate.FragmentReader(filename, logger=None)¶ Bases:
objectReads structures from file, skips “invalid” (in context of ENUM-108) fragments.
-
schrodinger.structutils.markush_enumerate.read_scaffold(filename)¶ Reads scaffold from file.
Parameters: filename (str) – File name. Returns: Scaffold instance. Return type: ScaffoldRaises: ValueError on errors.
-
class
schrodinger.structutils.markush_enumerate.FragmentsIterator(sources, random=None)¶ Bases:
objectIterator over Cartesian product of fragment collections.
-
class
schrodinger.structutils.markush_enumerate.VirtualLibrary(scaffold, sources, random=None, logger=None, max_failures=123)¶ Bases:
objectUtility class that implements common intended use case logic.