public void TestInitializeData() { var calc = new EmassCalculator(@"../../../data/ISOTOPE.DAT"); var fm = "C6H10"; var result = calc.Calculate(fm, 0, 0); //result.ForEach(m => Console.WriteLine("{0:0.000000}\t{1:0.000000}", m.Mz, m.Intensity)); Assert.AreEqual(82.078250, result[0].Mz, 0.00001); Assert.AreEqual(0.93641, result[0].Intensity, 0.00001); Assert.AreEqual(83.08166, result[1].Mz, 0.00001); Assert.AreEqual(0.06185, result[1].Intensity, 0.00001); Assert.AreEqual(84.08508, result[2].Mz, 0.00001); Assert.AreEqual(0.00171, result[2].Intensity, 0.00001); Assert.AreEqual(85.08854, result[3].Mz, 0.00001); Assert.AreEqual(0.00003, result[3].Intensity, 0.00001); }
public void TestInitializeData() { var calc = new EmassCalculator(@TestContext.CurrentContext.TestDirectory + "/../../../data//ISOTOPE.DAT"); var fm = "C6H10"; var result = calc.Calculate(fm, 0, 0); //result.ForEach(m => Console.WriteLine("{0:0.000000}\t{1:0.000000}", m.Mz, m.Intensity)); Assert.AreEqual(82.078250, result[0].Mz, 0.00001); Assert.AreEqual(0.93641, result[0].Intensity, 0.00001); Assert.AreEqual(83.08166, result[1].Mz, 0.00001); Assert.AreEqual(0.06185, result[1].Intensity, 0.00001); Assert.AreEqual(84.08508, result[2].Mz, 0.00001); Assert.AreEqual(0.00171, result[2].Intensity, 0.00001); Assert.AreEqual(85.08854, result[3].Mz, 0.00001); Assert.AreEqual(0.00003, result[3].Intensity, 0.00001); }
public void Calculate() { var calc = new EmassCalculator(@"../../../data/ISOTOPE.DAT"); EmassProfileBuilder builder = new EmassProfileBuilder(); AtomComposition light = new AtomComposition("C45H73N13O13"); var res = builder.GetProfile(light, 2, 4); Console.WriteLine("light"); foreach (var r in res) { Console.WriteLine("{0:0.0000}\t{1:0.000000}", r.Mz, r.Intensity); } AtomComposition heavy = new AtomComposition("(C13)6(N15)4C39H73N9O13"); var resH = builder.GetProfile(heavy, 2, 4); Console.WriteLine("heavy"); foreach (var r in resH) { Console.WriteLine("{0:0.0000}\t{1:0.000000}", r.Mz, r.Intensity); } }
public void Calculate() { var calc = new EmassCalculator(@TestContext.CurrentContext.TestDirectory + "/../../../data//ISOTOPE.DAT"); EmassProfileBuilder builder = new EmassProfileBuilder(); AtomComposition light = new AtomComposition("C45H73N13O13"); var res = builder.GetProfile(light, 2, 4); Console.WriteLine("light"); foreach (var r in res) { Console.WriteLine("{0:0.0000}\t{1:0.000000}", r.Mz, r.Intensity); } AtomComposition heavy = new AtomComposition("(C13)6(N15)4C39H73N9O13"); var resH = builder.GetProfile(heavy, 2, 4); Console.WriteLine("heavy"); foreach (var r in resH) { Console.WriteLine("{0:0.0000}\t{1:0.000000}", r.Mz, r.Intensity); } }
public EmassProfileBuilder(string isotopeDat) { this.calculator = new EmassCalculator(isotopeDat); }