Molecular mass/weight
MolecularGraph.exactmass
— Methodexactmass(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.
MolecularGraph.exactmass
— Methodexactmass(::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
.
MolecularGraph.isotopiccomposition
— Methodisotopiccomposition(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%)
MolecularGraph.massspecpeaks
— Methodmassspecpeaks(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%)
MolecularGraph.monoisotopicmass
— Methodmonoisotopicmass(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.
MolecularGraph.monoisotopicmass
— Methodmonoisotopicmass(::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
.
MolecularGraph.monoisotopicmass
— Methodmonoisotopicmass(::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.
MolecularGraph.simulatemassspec
— Methodsimulatemassspec(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"
)
MolecularGraph.standardweight
— Methodstandardweight(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.
MolecularGraph.standardweight
— Methodstandardweight(::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
.