code: private static int checkAtom(IAtomContainer ac, IAtom currentAtom) {
          int check = -1;
          List<IAtom> atoms = ac.getConnectedAtomsList(currentAtom);
          List<IBond> bonds = ac.getConnectedBondsList(currentAtom);
          if (currentAtom.getFlag(CDKConstants.ISAROMATIC)) {
              check = 0;
          } else if (currentAtom.getFormalCharge() == 1 /*
                                                         * &&
                                                         * currentAtom.getSymbol
                                                         * ().equals("C")
                                                         */) {
              check = 0;
          } else if (currentAtom.getFormalCharge() == -1) {
              //// NEGATIVE CHARGES WITH A NEIGHBOOR PI BOND //////////////
              int counterOfPi = 0;
              for (IAtom atom : atoms) {
                  if (ac.getMaximumBondOrder(atom) != IBond.Order.SINGLE) {
                      counterOfPi++;
                  }
              }
              if (counterOfPi > 0) check = 0;
          } else {
              int se = ac.getConnectedSingleElectronsCount(currentAtom);
              if (se == 1) {
                  check = 0; //// DETECTION of radicals
              } else if (ac.getConnectedLonePairsCount(currentAtom) > 0
              /* && (currentAtom.getSymbol().equals("N") */) {
                  check = 0; //// DETECTION of  lone pair
              } else {
                  int highOrderBondCount = 0;
                  for (int j = 0; j < atoms.size(); j++) {
                      IBond bond = bonds.get(j);
                      if (bond == null || bond.getOrder() != IBond.Order.SINGLE) {
                          highOrderBondCount++;
                      } else {
                      }
                  }
                  if (highOrderBondCount == 1) {
                      check = 0;
                  } else if (highOrderBondCount > 1) {
                      check = 1;
                  }
              }
          }
          return check;
      }
docs: Check an Atom whether it may be conjugated or not.
  
  @param  ac           The AtomContainer containing currentAtom
  @param  currentAtom  The Atom to check
  @return              -1 if isolated, 0 if conjugated, 1 if cumulative db