code: @Override
      public DescriptorValue calculate(IAtomContainer container) {
          try {
              IAtomContainer clone = (IAtomContainer) container.clone();
              AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(clone);
              int nsp2 = 0;
              int nsp3 = 0;
              for (IAtom atom : clone.atoms()) {
                  if (!atom.getSymbol().equals("C")) continue;
                  if (atom.getHybridization() == Hybridization.SP2)
                      nsp2++;
                  else if (atom.getHybridization() == Hybridization.SP3) nsp3++;
              }
              double ratio = nsp3 / (double) (nsp2 + nsp3);
              return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(),
                      new DoubleResult(ratio), getDescriptorNames());
          } catch (CloneNotSupportedException e) {
              return getDummyDescriptorValue(e);
          } catch (CDKException e) {
              return getDummyDescriptorValue(e);
          }
      }
docs: Calculate sp3/sp2 hybridization ratio in the supplied {@link IAtomContainer}.
  
  @param container The AtomContainer for which this descriptor is to be calculated.
  @return The ratio of sp3 to sp2 carbons