- openfe.setup.ligand_network_planning.generate_minimal_redundant_network(ligands: Iterable[SmallMoleculeComponent], mappers: AtomMapper | Iterable[AtomMapper], scorer: Callable[[LigandAtomMapping], float], progress: bool = True, mst_num: int = 2, n_processes: int = 1) LigandNetwork#
Plan a network with a specified amount of redundancy for each node
Creates a network with as few edges as possible with maximum total score, ensuring that every node is connected to two edges to introduce statistical redundancy.
- Parameters:
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 (bool) – If True, show a tqdm progress bar. (default=True)
mst_num (int) – Minimum Spanning Tree number: the number of minimum spanning trees to generate. If two, the second-best edges are included in the returned network. If three, the third-best edges are also included, etc.
n_processes (int) – number of threads to use if parallelizing network generation