code: private void setActiveCenters(IAtomContainer reactant) throws CDKException {
          Iterator<IAtom> atoms = reactant.atoms().iterator();
          while (atoms.hasNext()) {
              IAtom atom = atoms.next();
              if (reactant.getConnectedLonePairsCount(atom) > 0 && reactant.getConnectedSingleElectronsCount(atom) == 0)
                  atom.setFlag(CDKConstants.REACTIVE_CENTER, true);
  
          }
      }
docs: set the active center for this molecule. The active center
  will be heteroatoms which contain at least one group of
  lone pair electrons.
  
  @param reactant The molecule to set the activity
  @throws CDKException