- 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: int = 6, actives: list[bool] | None = None, max_dist_from_active: int = 2, require_cycle_covering: bool = True, radial: bool = False, fast: bool = False, hub: SmallMoleculeComponent | None = None, allow_disconnected: bool = False) LigandNetwork#
Generate a LigandNetwork according to Lomap’s network creation rules
- Parameters:
ligands (list[SmallMoleculeComponent]) – Molecules to include in the network.
mappers (list[AtomMapper] or AtomMapper) – One or more Mapper functions to use to propose edge mappings.
scorer (Callable) – Scoring function for edges. Should be a function which takes an AtomMapping and returns a value from 0.0 (worst) to 1.0 (best), inclusive. These values are used as the “distance” between two molecules, and compared against the
distance_cutoffparameter.distance_cutoff (float, default 0.4) – Edges with a score < 1 - distance_cutoff will be rejected.
max_path_length (int, default 6) – Maximum edge distance between any two molecules in the resulting network.
actives (list[bool] | None, default None) – If defined, a tag for each ligand which defines if it is an active molecule.
max_dist_from_active (int, default 2) – When ‘actives’ is given, constrains the resulting map to be within this number of edges (e.g. distance) from an active molecule.
require_cycle_covering (bool, default True) – If
True, attempt to ensure that every ligand has redundant paths to its neighbors, giving the network robustness against individual perturbation failures. This is achieved by rejecting edge removals that would leave a node outside a cycle or create a new bridge (an edge whose removal disconnects the graph). IfFalse, this constraint is relaxed and the resulting network may have no cycles.radial (bool, default False) – Construct a radial (star) network. Note that the map will not necessarily be a true radial map; edges will still obey the
distance_cutoffand ifrequire_cycle_coveringisTrue, this radial map will still feature cycles.fast (bool, default False) – When both
fastandradialareTrue, switch the initial graph construction to only consider hub-spoke edges (every ligand connected to the hub/lead) rather than all pairwise edges. This makes network construction faster, at the potential cost of a less optimal network.hub (SmallMoleculeComponent | None, default None) – If radial is
True, force this ligand to be the center/hub of the radial graph.allow_disconnected (bool, default False) – If
True, allow the creation of a disconnected network.