parse

Parse a mf to an array of kind / value

parse(mf: String)
Parameters
mf (String)

parseCharge

Parse a string to extract the charge. The charge may be in the form --, +++, +3, -2, 4+, 2-

parseCharge(charge: any)
Parameters
charge (any)

toDisplay

Converts an array of mf elements to an array of formatting information

toDisplay(lines: Array<object>)
Parameters
lines (Array<object>) of the parse method

Kind

Define static variable corresponding to the various Kinds of a molecular formula part.

Kind

Format

Defines static variables corresponding to the various formatting possibilities

Format

ensureCase

Ensure that the mf has been entered with capital letters and not only lowercase If there is only lowercase we try to capitalize the mf

ensureCase(mf: string)
Parameters
mf (string)

MF

new MF(mf: any, options: any)
Parameters
mf (any)
options (any = {})
Instance Members
getInfo(options)
getEA(options)
getElements()
getIsotopesInfo(options)
toMF()
toNeutralMF()

MF

new MF(mf: any, options: any)
Parameters
mf (any)
options (any = {})
Instance Members
getInfo(options)
getEA(options)
getElements()
getIsotopesInfo(options)
toMF()
toNeutralMF()

MF

new MF(mf: any, options: any)
Parameters
mf (any)
options (any = {})
Instance Members
getInfo(options)
getEA(options)
getElements()
getIsotopesInfo(options)
toMF()
toNeutralMF()

MF

Class allowing to deal with molecular formula and derived information

new MF(mf: any, options: any)
Parameters
mf (any)
options (any = {})
Instance Members
getInfo(options)
getEA(options)
getElements()
getIsotopesInfo(options)
toMF()
toNeutralMF()

optimizeRanges

If we have many times the same mf we can combine them This should only be applied if there are acutally some ranges

optimizeRanges(parts: any)
Parameters
parts (any)

getEA

getEA(parts: any, options: any)
Parameters
parts (any)
options (any = {})

getElements

getElements(parts: any, options: any)
Parameters
parts (any)
options (any = {})

getInfo

getInfo(parts: any, options: any)
Parameters
parts (any)
options (any = {})

getInfo

getInfo(parts: any, options: any)
Parameters
parts (any)
options (any = {})

getInfo

getInfo(parts: any, options: any): (object | PartInfo | PartInfoWithParts)
Parameters
parts (any)
options (any = {})
Returns
(object | PartInfo | PartInfoWithParts):

currentPart

currentPart

Type: PartInfo

AtomsMap

AtomsMap

Type: Record<string, number>

partToAtoms

Convert a MF part to a map of atoms This procedure will suppress the isotopes ! This is mainly used to make queries

partToAtoms(part: any): AtomsMap
Parameters
part (any)
Returns
AtomsMap:

atoms

atoms

Type: AtomsMap

getIsotopesInfo

getIsotopesInfo(parts: any): ([] | IsotopesInfo)
Parameters
parts (any)
Returns
([] | IsotopesInfo):

getProcessedPart

getProcessedPart(part: any): IsotopesInfo
Parameters
part (any)
Returns
IsotopesInfo:

result

result

Type: IsotopesInfo

partsToDisplay

Converts an array of mf elements to an array of formatting information

partsToDisplay(parts: any, result: Array<Object>)
Parameters
parts (any)
result (Array<Object>) of the parse method

toParts

toParts(lines: any, options: object)
Parameters
lines (any)
options (object = {})
Name Description
options.expand boolean (default true) Should we expand the groupsObject

parseToHtml

Parse a molecular formula and converts it to an HTML code

parseToHtml(mf: String)
Parameters
mf (String) String containing the molecular formula