openfe.setup.ligand_network_planning.generate_lomap_network(molecules: list[gufe.components.smallmoleculecomponent.SmallMoleculeComponent], mappers: AtomMapper | list[gufe.mapping.atom_mapper.AtomMapper], scorer: Callable, distance_cutoff: float = 0.4, max_path_length=6, actives: list[bool] | None = None, max_dist_from_active=2, require_cycle_covering: bool = True, radial: bool = False, fast: bool = False, hub: SmallMoleculeComponent | None = None) LigandNetwork#

Generate a LigandNetwork according to Lomap’s network creation rules

  • molecules (list[SmallMoleculeComponent]) – molecules to map

  • mappers (list[AtomMapper] or AtomMapper) – one or more Mapper functions to use to propose edges

  • scorer (function) – scoring function for edges. Should be a function which takes an AtomMapping and returns a value from 1.0 (best) to 0.0 (worst). These values are use as the “distance” between two molecules, and compared against the ‘distance_cutoff’ parameter

  • distance_cutoff (float) – the maximum distance/dissimilarity between two molecules for an edge to be accepted

  • max_path_length (int) – maximum distance between any two molecules in the resulting network

  • actives (list[bool]) – for each molecule, if it is tagged as an active molecule

  • max_dist_from_active – when ‘actives’ is given, constrains the resulting map to

  • require_cycle_covering (bool) – add cycles into the network

  • radial (bool) – construct a radial/starmap network. Note that this the map will not necessarily be a true radial map; edges will still obey the distance_cutoff and if ‘require_cycle_covering’ is true, this radial map will still feature cycles, default False

  • fast (bool) – hmmm…

  • hub (SmallMoleculeComponent, optional) – if radial, force this ligand to be the centre/hub of the radial graph