Class: FormulaUtils

FormulaUtils

new FormulaUtils()

Util class to manipulate molecule formulas.
Source:

Methods

(static) formulaToText(formula, showCharge, partialChargeDecimalsLength) → {String}

Returns plain text generated by formula.
Parameters:
Name Type Description
formula Kekule.MolculeFormula
showCharge Bool Whether display formula charge.
partialChargeDecimalsLength Int
Source:
Returns:
Type
String

(static) textToFormula(text, parent, formula) → {Kekule.MoleculeFormula}

Create a formula object from plain text.
Parameters:
Name Type Description
text String
parent Kekule.ChemObject Parent object of formula.
formula Kekule.MoleculeFormula If this param is set, changes will be take on this object. Otherwise a new instance of formula will be created and returned.
Source:
Returns:
Type
Kekule.MoleculeFormula