code: @Override
      public DescriptorValue calculate(IAtom atom, IAtomContainer container) {
          IAtomType atomType;
          try {
              atomType = CDKAtomTypeMatcher.getInstance(atom.getBuilder()).findMatchingAtomType(container, atom);
          } catch (CDKException e) {
              return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new IntegerResult(
                      (int) Double.NaN), // does that work??
                      getDescriptorNames(), new CDKException("Atom type was null"));
          }
          if (atomType == null) {
              return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new IntegerResult(
                      (int) Double.NaN), // does that work??
                      getDescriptorNames(), new CDKException("Atom type was null"));
  
          }
  
          if (atomType.getHybridization() == null) {
              return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new IntegerResult(
                      (int) Double.NaN), // does that work??
                      getDescriptorNames(), new CDKException("Hybridization was null"));
          }
          int hybridizationCDK = atomType.getHybridization().ordinal();
  
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new IntegerResult(
                  hybridizationCDK), getDescriptorNames());
      }
docs: This method calculates the hybridization of an atom.
  
  @param  atom              The IAtom for which the DescriptorValue is requested
  @param  container         Parameter is the atom container.
  @return                   The hybridization