openfe.setup.ligand_network_planning.generate_minimal_spanning_network(ligands: Iterable[SmallMoleculeComponent], mappers: AtomMapper | Iterable[AtomMapper], scorer: Callable[[LigandAtomMapping], float], progress: bool | Callable[[Iterable], Iterable] = True) LigandNetwork#

Plan a network with as few edges as possible with maximum total score

  • ligands (Iterable[SmallMoleculeComponent]) – the ligands to include in the LigandNetwork

  • mappers (AtomMapper or Iterable[AtomMapper]) – the AtomMapper(s) to use to propose mappings. At least 1 required, but many can be given, in which case all will be tried to find the highest score edges

  • scorer (Scoring function) – any callable which takes a LigandAtomMapping and returns a float

  • progress (Union[bool, Callable[Iterable], Iterable]) – progress bar: if False, no progress bar will be shown. If True, use a tqdm progress bar that only appears after 1.5 seconds. You can also provide a custom progress bar wrapper as a callable.