- openfe.setup.ligand_network_planning.generate_lomap_network(ligands: list[SmallMoleculeComponent], mappers: AtomMapper | list[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
- Parameters:
ligands (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) – edges with a score < 1 - distance_cutoff will be rejected. Default is 0.4.
max_path_length (int) – maximum distance between any two molecules in the resulting network. Default is 6.
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 be within this this number of edges (e.g. distance) from an active molecule. Default is 2.
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