neighbors()
The sorted neighbours of atom i, over every bond (breaking and forming too).
Usage
neighbors(
g,
i,
)>>> neighbors(MolGraph(symbols=["O", "H", "H"], bonds=[(0, 1), (0, 2)]), 0)(1, 2)
Raises
IndexError-
If
iis not an atom of the graph.