Skip to main content

neighbors()

The sorted neighbours of atom i, over every bond (breaking and forming too).

Usage

Source

neighbors(
    g,
    i,
)
>>> neighbors(MolGraph(symbols=["O", "H", "H"], bonds=[(0, 1), (0, 2)]), 0)

(1, 2)

Raises

IndexError
If i is not an atom of the graph.