code: public static List<IChemObject> getAllChemObjects(IChemSequence sequence) {
          List<IChemObject> list = new ArrayList<IChemObject>();
          // list.add(sequence);
          for (int i = 0; i < sequence.getChemModelCount(); i++) {
              list.add(sequence.getChemModel(i));
              List<IChemObject> current = ChemModelManipulator.getAllChemObjects(sequence.getChemModel(i));
              for (IChemObject chemObject : current) {
                  if (!list.contains(chemObject)) list.add(chemObject);
              }
  
          }
          return list;
      }
docs: Returns a List of all IChemObject inside a ChemSequence.
  
  @return  A List of all ChemObjects.