code: @Override
      public DescriptorValue calculate(IAtom atom, IAtomContainer container) {
          double value;
          // FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method
          String originalAtomtypeName = atom.getAtomTypeName();
          Integer originalNeighborCount = atom.getFormalNeighbourCount();
          Integer originalValency = atom.getValency();
          Double originalBondOrderSum = atom.getBondOrderSum();
          Order originalMaxBondOrder = atom.getMaxBondOrder();
          IAtomType.Hybridization originalHybridization = atom.getHybridization();
  
          if (!isCachedAtomContainer(container)) {
              try {
                  AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(container);
                  LonePairElectronChecker lpcheck = new LonePairElectronChecker();
                  lpcheck.saturate(container);
              } catch (CDKException e) {
                  return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
                          Double.NaN), NAMES, e);
              }
  
          }
          value = db.extractIP(container, atom);
          // restore original props
          atom.setAtomTypeName(originalAtomtypeName);
          atom.setFormalNeighbourCount(originalNeighborCount);
          atom.setValency(originalValency);
          atom.setHybridization(originalHybridization);
          atom.setMaxBondOrder(originalMaxBondOrder);
          atom.setBondOrderSum(originalBondOrderSum);
  
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(value),
                                     NAMES);
  
      }
docs: This method calculates the ionization potential of an atom.
  
  @param  atom          The IAtom to ionize.
  @param  container         Parameter is the IAtomContainer.
  @return                   The ionization potential. Not possible the ionization.