#include "oechem.h" #include using namespace OESystem; using namespace OEChem; using namespace std; void ShowNeighbors(OEAtomBase *atm) { OEIter nbor; cerr << "Neighbors: "; for (nbor = atm->GetAtoms(); nbor; ++nbor) { cerr << nbor->GetIdx() << " "; } cerr << endl; } int main() { OEMol mol; OEParseSmiles(mol, "c1ccccc1"); OEIter atom; for (atom=mol.GetAtoms();atom;++atom) { cerr << "Atom: " << atom->GetIdx() << " "; ShowNeighbors(atom); } return 0; }