private void ProcessBondAtomIDs(int pos, NewBondInfo newBondInfo) { var line = input.ReadLine(); int bondIndex = 0; while (line != null) { if (line.IndexOf('}') != -1) { // done return; } else { var id = GetValue(line); var atom = (IAtom)atomIDs[id]; if (atom == null) { throw new CDKException($"File is corrupt: atom ID does not exist {id}"); } newBondInfo.Set(bondIndex, pos, atom); bondIndex++; } line = input.ReadLine(); } }