IMSAlphabet#

class pyopenms.IMSAlphabet#

Bases: object

Indexed container of bio-chemical elements for mass decomposition

__init__() → None#
__init__(arg: pyopenms.IMSAlphabet, /) → None

Methods

__init__()

clear()

Clears the alphabet data

erase(name)

Removes the element with the given name

getAverageMasses()

Gets average masses of elements

getElement(index)

Returns a copy of the element at index

getMass(index)

Gets mass of the element with an 'index' in alphabet

getMasses([isotope_index])

Gets masses of elements isotopes given by isotope_index

getName(index)

Gets the symbol of the element with an 'index' in alphabet

hasName(name)

Returns true if there is an element with symbol 'name' in the alphabet, false - otherwise

load(fname)

Loads the alphabet data from the file

push_back(name, mass)

Adds a new element with 'name' and mass 'value'

setElement(name, mass[, forced])

Overwrites an element in the alphabet

size()

sortByNames()

Sorts the alphabet by names

sortByValues()

Sorts the alphabet by mass values

clear() → None#

Clears the alphabet data

erase(name: str) → bool#

Removes the element with the given name

getAverageMasses() → list[float]#

Gets average masses of elements

getElement(index: int) → pyopenms.IMSElement#

Returns a copy of the element at index

getMass(index: int) → float#

Gets mass of the element with an ‘index’ in alphabet

getMasses(isotope_index: int = 0) → list[float]#

Gets masses of elements isotopes given by isotope_index

getName(index: int) → str#

Gets the symbol of the element with an ‘index’ in alphabet

hasName(name: str) → bool#

Returns true if there is an element with symbol ‘name’ in the alphabet, false - otherwise

load(fname: str) → None#

Loads the alphabet data from the file

push_back(name: str, mass: float) → None#

Adds a new element with ‘name’ and mass ‘value’

setElement(name: str, mass: float, forced: bool = False) → None#

Overwrites an element in the alphabet

size() → int#
sortByNames() → None#

Sorts the alphabet by names

sortByValues() → None#

Sorts the alphabet by mass values