Molecular mass/weight

MolecularGraph.exactmassMethod
exactmass(atomsymbol::Symbol) -> Tuple{Float64,Float64}
exactmass(atomsymbol::Symbol, number::Int) -> Tuple{Float64,Float64}
exactmass(atom::Atom) -> Tuple{Float64,Float64}
exactmass(mol::GraphMol) -> Tuple{Float64,Float64}

Return a tuple of calculated exact mass and its uncertainty.

If number is not given or Atom.mass is not specified, monoisotopic mass will be used instead.

source
MolecularGraph.exactmassMethod
exactmass(::Type{Float64}, atomsymbol::Symbol) -> Float64
exactmass(::Type{Float64}, atomsymbol::Symbol, number::Int) -> Float64
exactmass(::Type{Float64}, atom::Atom) -> Float64
exactmass(::Type{Float64}, mol::GraphMol) -> Float64

Return calculated exact mass rounded to digit=6.

source
MolecularGraph.isotopiccompositionMethod
isotopiccomposition(atomsymbol::Symbol, number::Int; threshold=0.001
    ) -> Vector{Tuple{Float64,Float64}}
isotopiccomposition(mol::GraphMol; threshold=0.001
    ) -> Vector{Tuple{Float64,Float64}}

Return isotopic composition of the atoms/molecule as a vector of tuples of mass and composition.

Records that have lower abundance than the given threshold will be filtered out (default 0.001 = 0.1%)

source
MolecularGraph.massspecpeaksMethod
massspecpeaks(mol::GraphMol; threshold=0.001) -> Matrix{Float64}

Return a vector of tuples of each isotopic masses and their relative intensity in the simulated mass spectrum (base peak intensity = 100).

Records that have lower abundance (not peak intensity) than the given threshold will be filtered out (default 0.001 = 0.1%)

source
MolecularGraph.monoisotopicmassMethod
monoisotopicmass(atomsymbol::Symbol) -> Tuple{Float64,Float64}
monoisotopicmass(atom::Atom) -> Tuple{Float64,Float64}
monoisotopicmass(mol::GraphMol) -> Tuple{Float64,Float64}

Return a tuple of monoisotopic mass of the atom/molecule and its uncertainty.

Monoisotopic mass is the relative atomic mass of the most abundant isotope. Even if there is specific Atom.mass value, it will be ignored.

source
MolecularGraph.monoisotopicmassMethod
monoisotopicmass(::Type{Float64}, atomsymbol::Symbol) -> Float64
monoisotopicmass(::Type{Float64}, atom::Atom) -> Float64
monoisotopicmass(::Type{Float64}, mol::GraphMol) -> Float64

Return monoisotopic mass of the atom/molecule rounded to digits=6.

source
MolecularGraph.monoisotopicmassMethod
monoisotopicmass(::Type{T}, atomsymbol::Symbol) where {T<:Integer} -> T
monoisotopicmass(::Type{T}, atom::Atom) where {T<:Integer} -> T
monoisotopicmass(::Type{T}, mol::GraphMol) where {T<:Integer} -> T
nominalmass(atomsymbol::Symbol) -> Int
nominalmass(atom::Atom) -> Int
nominalmass(mol::GraphMol) -> Int

Return nominal mass of the atom/molecule.

source
MolecularGraph.simulatemassspecMethod
simulatemassspec(peaks::Vector{Tuple{Float64,Float64}};
    resolution=10000, rate=0.01) -> Matrix{Float64}
simulatemassspec(mol::GraphMol;
    threshold=0.001, resolution=10000, rate=0.01) -> Matrix{Float64}

Return a matrix of simulate mass spectrum (dim 1: datapoints, dim 2: mass and intensity).

Usage (with Plot.jl)

using MolecularGraph
using Plots
gr()
Plots.GRBackend()

mol = smilestomol("CCO")
data = simulatemassspec(mol)
plot(
    data[:, 1], data[:, 2],
    leg=false, xlabel = "Mass", ylabel = "Intensity"
)
source
MolecularGraph.standardweightMethod
standardweight(atomsymbol::Symbol) -> Tuple{Float64,Float64}
standardweight(atom::Atom) -> Tuple{Float64,Float64}
standardweight(mol::GraphMol) -> Tuple{Float64,Float64}

Return a tuple of standard atomic weight (or molecular weight) and its uncertainty.

If Atom.mass is specified, calculated exact mass of the atom will be used instead.

source
MolecularGraph.standardweightMethod
standardweight(::Type{Float64}, atomsymbol::Symbol) -> Float64
standardweight(::Type{Float64}, atom::Atom) -> Float64
standardweight(::Type{Float64}, mol::GraphMol) -> Float64

Return standard atomic weight (or molecular weight) rounded to digit=2.

source