molecular_formula_from_symbols

qcelemental.molutil.molecular_formula_from_symbols(symbols, order='alphabetical')[source]

Returns the molecular formula for a list of symbols.

Parameters:
  • symbols (List[str]) – List of chemical symbols

  • order (str) – Sorting order of the formula. Valid choices are “alphabetical” and “hill”.

Returns:

The molecular formula.

Return type:

str