- openfe.setup.ligand_network_planning.generate_network_from_names(ligands: list[gufe.components.smallmoleculecomponent.SmallMoleculeComponent], mapper: AtomMapper, names: list[tuple[str, str]]) LigandNetwork #
Generate a
LigandNetwork
by specifying edges as tuples of names.- Parameters:
ligands (list of SmallMoleculeComponent) – the small molecules to place into the network
mapper (AtomMapper) – the atom mapper to use to construct edges
names (list of tuples of names) – the edges to form where the values refer to names of the small molecules, eg [(‘benzene’, ‘toluene’), …] will create an edge between the molecule with names ‘benzene’ and ‘toluene’
- Return type:
- Raises:
KeyError – if an invalid name is requested
ValueError – if multiple molecules have the same name (this would otherwise be problematic)