#!/usr/bin/env python # ch6-4.py from openeye.oechem import * def ShowNeighbors(atom): for nbor in atom.GetAtoms(): print nbor.GetIdx(), print mol = OEGraphMol() OEParseSmiles(mol, "c1ccccc1") for atom in mol.GetAtoms(): print atom.GetIdx(), ShowNeighbors(atom)