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

Plan a network with all possible proposed mappings.

This will attempt to create (and optionally score) all possible mappings (up to \(N(N-1)/2\) for each mapper given). There may be fewer actual mappings that this because, when a mapper cannot return a mapping for a given pair, there is simply no suggested mapping for that pair. This network is typically used as the starting point for other network generators (which then optimize based on the scores) or to debug atom mappers (to see which mappings the mapper fails to generate).

  • 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.

  • 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.