Esempio n. 1
0
        public void TestMassConversions(double dblMH, int chargeState, double expectedMonoMass, double expectedMz)
        {
            var computedMonoMass = mPeptideMassCalculator.MHToMonoisotopicMass(dblMH);

            var computedMz = mPeptideMassCalculator.MonoisotopicMassToMZ(computedMonoMass, chargeState);

            Console.WriteLine("{0} MH converts to {1:F5} Da and {2:F5} m/z at charge {3}", dblMH, computedMonoMass, computedMz, chargeState);

            Assert.AreEqual(expectedMonoMass, computedMonoMass, 0.0001, "Monoisotopic mass mismatch");
            Assert.AreEqual(expectedMz, computedMz, 0.0001, "M/Z mismatch");
        }