openfe.setup.ligand_network_planning.generate_network_from_indices(ligands: list[gufe.components.smallmoleculecomponent.SmallMoleculeComponent], mapper: AtomMapper, indices: list[tuple[int, int]]) LigandNetwork#

Generate a LigandNetwork by specifying edges as tuples of indices.

Parameters:
  • ligands (list of SmallMoleculeComponent) – the small molecules to place into the network

  • mapper (AtomMapper) – the atom mapper to use to construct edges

  • indices (list of tuples of indices) – the edges to form where the values refer to names of the small molecules, eg [(3, 4), …] will create an edge between the 3rd and 4th molecules remembering that Python uses 0-based indexing

Return type:

LigandNetwork

Raises:

IndexError – if an invalid ligand index is requested