code: @Override
      public DescriptorValue calculate(IAtom atom, IAtomContainer container) {
          int atomValence = AtomValenceTool.getValence(atom);
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new IntegerResult(
                  atomValence), getDescriptorNames());
      }
docs: This method calculates the valence of an atom.
  
  @param atom          The IAtom for which the DescriptorValue is requested
  @param container      Parameter is the atom container.
  @return The valence of an atom