These scripts are used to predict and solve mass spectrometery isotope abundancies. There are two scripts, one for calculating and plotting isotope distributions for the mass peak and the second to take a mass and iteratively solve to calculate possible formula for this mass. Both scripts require a dictionary file containing isotope abundances for each element.
This script calculates isotope abundance patterns for a molecul formula. An image file of the isotope pattern and a CSV file containing the masses and relative abundances will be output.
The isotope pattern script should be called without arguments, having edited the file to set the mol variable to the molecule of interest. A dictionary file containing a list of elements (see below) is required to calculate the isotope pattern.
python ms_pattern.py
This script calculates possible formulae from a provided mass. This file requires a dictionary file which contains only the elements that your moecule is likely to contain. Running the script with all elements will be computationally intensive and is likely to return an excessively large number of results, many of which would be chemically implausable.
The mass solver script should be called with an argument of the mass for the molecular ion peak.
python ms_solve.py 720
Both of the above tools require a dictionary file containing data for elements and their abundance in order to use the tools. The scripts above may require editing to point to the appropriate dictionary file.
Two dictionary files are provided. The first contains only C, H, O and N elements. The second includes all elements (H to UUo). The dictionary file needs to contain all elements which are relevant to the molecule.