Returns a set of nodes excluding all the hydrogens.

@param   formula The IMolecularFormula
@return          The heavyElements value into a List

@cdk.keyword    hydrogen, removal
498881
public static List<IElement> getHeavyElements(IMolecularFormula formula) {
        List<IElement> newEle = new ArrayList<IElement>();
        for (IElement element : elements(formula)) {
            if (!element.getSymbol().equals("H")) {
                newEle.add(element);
            }
        }
        return newEle;
    }
65448
public static Backbone computeNegative(final Collection<Formula> formulas) {
        return compute(formulas, allVariablesInFormulas(formulas), BackboneType.ONLY_NEGATIVE);
    }
956897
def chemical_formula(self):
        """"""
        counts = {}
        for number in self.numbers:
            counts[number] = counts.get(number, 0)+1
        items = []
        for number, count in sorted(counts.items(), reverse=True):
            if count == 1:
                items.append(periodic[number].symbol)
            else:
                items.append("%s%i" % (periodic[number].symbol, count))
        return "".join(items)
359797
public static Backbone compute(final Formula formula) {
        return compute(formula, formula.variables(), BackboneType.POSITIVE_AND_NEGATIVE);
    }
1286827
public static int getElementCount(IMolecularFormula formula, String symbol) {
        return getElementCount(formula, formula.getBuilder().newInstance(IElement.class, symbol));
    }
1119708
public NodeList getNodeList(String expression) {
		return (NodeList) evalXPath(expression, null, XPathConstants.NODESET);
	}
704686
private static Map<Literal, Integer> nonCachingLiteralProfile(final Formula formula) {
    final SortedMap<Literal, Integer> map = new TreeMap<>();
    nonCachingRecursion(formula, map);
    return map;
  }
319178
public static int getAtomCount(IMolecularFormula formula) {

        int count = 0;
        for (IIsotope isotope : formula.isotopes()) {
            count += formula.getIsotopeCount(isotope);
        }
        return count;
    }
660643
def formula_sections(self):
        
        if self.dtree is not None:
            return self.dtree.order
        else:
            return [s for s in self.manifest.sections() if s != "config"]
739721
public Formula get(final int i) {
    if (i < 0 || i >= this.formulas.length)
      throw new IllegalArgumentException("Illegal formula index: " + i);
    return this.formulas[i];
  }
1157200
public static IMolecularFormula getMinimalFormula(MolecularFormulaRange mfRange, IChemObjectBuilder builder) {
        IMolecularFormula formula = builder.newInstance(IMolecularFormula.class);

        for (IIsotope isotope : mfRange.isotopes()) {
            formula.addIsotope(isotope, mfRange.getIsotopeCountMin(isotope));
        }

        return formula;
    }
542239
def find_atomics(formula: Formula) -> Set[PLAtomic]:
    """"""
    f = formula
    res = set()
    if isinstance(formula, PLFormula):
        res = formula.find_atomics()
    # elif isinstance(f, PLNot):
    #     res = res.union(find_atomics(f.f))
    # elif isinstance(f, PLBinaryOperator):
    #     for subf in f.formulas:
    #         res = res.union(find_atomics(subf))
    else:
        res.add(f)
    return res
647184
public static BigDecimal calculate(String formula) throws Exception {
        formula = formula.replaceAll("\\s", "");
        if (isFormula(formula)) {
            return doCalculate(formula);
        } else {
            throw new Exception("calculation formula is not valid, please check up on it carefully.");
        }
    }
685417
@Override
    public double validate(IMolecularFormula formula) throws CDKException {
        logger.info("Start validation of ", formula);

        double totalExactMass = MolecularFormulaManipulator.getTotalExactMass(formula);

        if (Math.abs(totalExactMass - mass) > tolerance)
            return 0.0;
        else
            return 1.0;
    }
145837
public Formula formula(final FormulaFactory f) {
    if (this.operator != FType.AND && this.operator != FType.OR)
      throw new IllegalStateException("Illegal operator for formula list formula construction: " + this.operator);
    if (this.formula == null) {
      if (this.operator == FType.AND)
        this.formula = f.and(this.formulas);
      else
        this.formula = f.or(this.formulas);
    }
    return this.formula;
  }
1342934
def formula(self, atom_sequence):
        '''
        
        '''
        labels = {}
        types = []
        y = 0
        for k, atomi in enumerate(atom_sequence):
            lbl = re.sub("[0-9]+", "", atomi).capitalize()
            if lbl not in labels:
                labels[lbl] = y
                types.append([k+1])
                y += 1
            else:
                types[ labels[lbl] ].append(k+1)
        atoms = list(labels.keys())
        atoms = [x for x in self.formula_sequence if x in atoms] + [x for x in atoms if x not in self.formula_sequence] # accordingly
        formula = ''
        for atom in atoms:
            n = len(types[labels[atom]])
            if n==1: n = ''
            else: n = str(n)
            formula += atom + n
        return formula
1041566
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'r'
          @formula_run << MathRun.new(parent: self).parse(node_child)
        when 'box', 'borderBox'
          @formula_run << Box.new(parent: self).parse(node_child)
        when 'func'
          @formula_run << Function.new(parent: self).parse(node_child)
        when 'rad'
          @formula_run << Radical.new(parent: self).parse(node_child)
        when 'e', 'eqArr'
          @formula_run << DocxFormula.new(parent: self).parse(node_child)
        when 'nary'
          @formula_run << Nary.new(parent: self).parse(node_child)
        when 'd'
          @formula_run << Delimiter.new(parent: self).parse(node_child)
        when 'sSubSup', 'sSup', 'sSub'
          @formula_run << Index.new(parent: self).parse(node_child)
        when 'f'
          @formula_run << Fraction.new(parent: self).parse(node_child)
        when 'm'
          @formula_run << Matrix.new(parent: self).parse(node_child)
        when 'bar'
          @formula_run << Bar.new(parent: self).parse(node_child)
        when 'acc'
          @formula_run << Accent.new(parent: self).parse(node_child)
        when 'groupChr'
          @formula_run << GroupChar.new(parent: self).parse(node_child)
        when 'argPr'
          @argument_properties = ArgumentProperties.new(parent: self).parse(node_child)
        when 'sPre'
          @formula_run << PreSubSuperscript.new(parent: self).parse(node_child)
        when 'limUpp', 'limLow'
          @formula_run << Limit.new(parent: self).parse(node_child)
        end
      end
      return nil if @formula_run.empty?

      self
    end