6 public static class IonCalculator
8 static double massH_MonoMass = ChemicalUtils.Chemicals[
"H"].MonoMass;
9 static double massProton_MonoMass = ChemicalUtils.Chemicals[
"p"].MonoMass;
10 static double massO_MonoMass = ChemicalUtils.Chemicals[
"O"].MonoMass;
11 static double massC_MonoMass = ChemicalUtils.Chemicals[
"C"].MonoMass;
12 static double massN_MonoMass = ChemicalUtils.Chemicals[
"N"].MonoMass;
14 static double massH_AvgMass = ChemicalUtils.Chemicals[
"H"].AvgMass;
15 static double massProton_AvgMass = ChemicalUtils.Chemicals[
"p"].AvgMass;
16 static double massO_AvgMass = ChemicalUtils.Chemicals[
"O"].AvgMass;
17 static double massC_AvgMass = ChemicalUtils.Chemicals[
"C"].AvgMass;
18 static double massN_AvgMass = ChemicalUtils.Chemicals[
"N"].AvgMass;
20 public static bool CalculateIons(out
double[] outIonsNoNL,
26 int maxNumberNeutralLoss,
27 int maxNumberNeutralLossModifications,
31 string maxAllowedChargeState)
35 var AminoAcids =
new AminoAcid[
byte.MaxValue];
36 foreach (
AminoAcid aa
in ChemicalUtils.AminoAcids.Values)
41 var MaxNrWaterLosses = 0;
42 var MaxNrAmmoniaLosses = 0;
47 int numIonsExpected = sequence.Length;
49 int numExpectedFactor = 0;
50 if (setting.UseAIon) ++numExpectedFactor;
51 if (setting.UseBIon) ++numExpectedFactor;
52 if (setting.UseCIon) ++numExpectedFactor;
53 if (setting.UseXIon) ++numExpectedFactor;
54 if (setting.UseYIon) ++numExpectedFactor;
55 if (setting.UseZIon) ++numExpectedFactor;
56 if (setting.UseZPlusHIon) ++numExpectedFactor;
57 if (setting.UseZPlusTwoHIon) ++numExpectedFactor;
59 if (setting.UseAPlusHIon) ++numExpectedFactor;
60 if (setting.UseBPlusHIon) ++numExpectedFactor;
61 if (setting.UseCPlusHIon) ++numExpectedFactor;
62 if (setting.UseXPlusHIon) ++numExpectedFactor;
63 if (setting.UseYPlusHIon) ++numExpectedFactor;
64 if (setting.UseAMinusHIon) ++numExpectedFactor;
65 if (setting.UseBMinusHIon) ++numExpectedFactor;
66 if (setting.UseCMinusHIon) ++numExpectedFactor;
67 if (setting.UseXMinusHIon) ++numExpectedFactor;
68 if (setting.UseYMinusHIon) ++numExpectedFactor;
69 if (setting.UseZMinusHIon) ++numExpectedFactor;
70 if (numExpectedFactor < 2)
71 numExpectedFactor = 2;
73 numIonsExpected *= numExpectedFactor;
76 List<double> ionsNoNL =
new List<double>(numIonsExpected);
77 List<IonWithNL> ionsWithNL = (setting.UseWaterLosses || setting.UseAmmoniaLosses) ?
new List<IonWithNL>(numIonsExpected) :
null;
79 double massH = massH_MonoMass;
80 double massProton = massProton_MonoMass;
81 double massO = massO_MonoMass;
82 double massC = massC_MonoMass;
83 double massN = massN_MonoMass;
86 massH = massH_AvgMass;
87 massProton = massProton_AvgMass;
88 massO = massO_AvgMass;
89 massC = massC_AvgMass;
90 massN = massN_AvgMass;
97 int possibleAmoniaLosses = 0;
98 int possibleWaterLosses = 0;
99 int possibleAmoniaLossesRev = 0;
100 int possibleWaterLossesRev = 0;
102 double lastMassFwd = massH + massProton;
103 double lastMassInternalFwd = mass - massH - massO - massH + massProton;
104 double lastMassInternalRev = mass - massH - massO - massH + massProton;
109 lastMassFwd += mods[0].
Mass(mono);
112 double lastMassRev = massH + massO + massProton;
114 if (mods[mods.Length - 1] !=
null)
116 lastMassRev += mods[mods.Length - 1].
Mass(mono);
119 List<double> fwdLosses =
new List<double>();
120 List<double> revLosses =
new List<double>();
123 #region ion calculation
124 int j = sequence.Length - 1;
125 for (
int i = 0; i < sequence.Length - 1; ++i, --j)
127 byte aaFwd = sequence[i];
128 if (
null == AminoAcids[aaFwd])
130 byte aaRev = sequence[j];
131 if (
null == AminoAcids[aaRev])
133 AminoAcid currentAAFwd = AminoAcids[aaFwd];
134 lastMassFwd += currentAAFwd.
Mass(mono);
137 if (mods[i + 1] !=
null)
138 lastMassFwd += mods[i + 1].
Mass(mono);
141 if (mods[i + 1] !=
null && mods[i + 1].NeutralLosses.Length > 0)
153 while (newLoss > 0 && fwdLosses.Contains(newLoss) && count < maxNumberNeutralLossModifications)
158 if (count < maxNumberNeutralLossModifications)
160 if (!fwdLosses.Contains(newLoss))
161 fwdLosses.Add(newLoss);
167 AminoAcid currentAARev = AminoAcids[aaRev];
168 lastMassRev += currentAARev.
Mass(mono);
170 if (mods[j + 1] !=
null)
172 lastMassRev += mods[j + 1].
Mass(mono);
174 if (mods[j + 1] !=
null && mods[j + 1].NeutralLosses.Length > 0)
180 while (newLoss > 0 && revLosses.Contains(newLoss) && count < maxNumberNeutralLossModifications)
185 if (count < maxNumberNeutralLossModifications)
187 if (!revLosses.Contains(newLoss))
188 revLosses.Add(newLoss);
195 if ((aaFwd ==
'S' || aaFwd ==
'T' || aaFwd ==
'E' || aaFwd ==
'D'))
197 if (possibleWaterLosses < maxNumberNeutralLoss)
199 ++possibleWaterLosses;
204 if ((aaFwd ==
'N' || aaFwd ==
'Q' || aaFwd ==
'R' || aaFwd ==
'K'))
206 if (possibleAmoniaLosses < maxNumberNeutralLoss)
208 ++possibleAmoniaLosses;
210 ++MaxNrAmmoniaLosses;
212 if (setting.UseImmoniumIons)
217 if (mods[i + 1] !=
null)
219 massImmo += mods[i + 1].
Mass(mono);
221 if (InRange(massImmo, lowerBound, upperBound))
223 ionsNoNL.Add(massImmo);
226 if (j == sequence.Length - 1)
229 if (mods[j + 1] !=
null)
231 massImmoRev += mods[j + 1].
Mass(mono);
233 if (InRange(massImmoRev, lowerBound, upperBound))
235 ionsNoNL.Add(massImmoRev);
239 if ((aaRev ==
'S' || aaRev ==
'T' || aaRev ==
'E' || aaRev ==
'D') && possibleWaterLossesRev < maxNumberNeutralLoss)
241 ++possibleWaterLossesRev;
243 if ((aaRev ==
'N' || aaRev ==
'Q' || aaRev ==
'R' || aaRev ==
'K') && possibleAmoniaLossesRev < maxNumberNeutralLoss)
244 ++possibleAmoniaLossesRev;
246 if (setting.UseInternalFragments)
250 lastMassInternalFwd -= lastMassFwd - lastMassRev;
251 if (mods[i + 1] !=
null)
253 lastMassInternalFwd -= mods[i + 1].
Mass(mono);
255 if (mods[j + 1] !=
null)
257 lastMassInternalFwd -= mods[j + 1].
Mass(mono);
259 if (InRange(lastMassInternalFwd, lowerBound, upperBound))
261 ionsNoNL.Add(lastMassInternalFwd);
263 CalculateAllInternalCombinations(lastMassInternalFwd, i, ionsNoNL, sequence, mods, lowerBound, upperBound, mono, AminoAcids);
265 else if (i > 0 && i < sequence.Length - 1)
267 lastMassInternalFwd -= currentAAFwd.
Mass(mono);
268 if (mods[i + 1] !=
null)
270 lastMassInternalFwd -= mods[i + 1].
Mass(mono);
272 if (InRange(lastMassInternalFwd, lowerBound, upperBound))
274 ionsNoNL.Add(lastMassInternalFwd);
276 CalculateAllInternalCombinations(lastMassInternalFwd, i, ionsNoNL, sequence, mods, lowerBound, upperBound, mono, AminoAcids);
283 double aIon = lastMassFwd - massC - massH - massO;
284 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLosses, possibleWaterLosses, massO, massH, massC,
285 massN, massProton, fwdLosses, setting, aIon, lowerBound, upperBound, maxAllowedChargeState);
293 double bIon = lastMassFwd - massH;
294 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLosses, possibleWaterLosses, massO, massH, massC,
295 massN, massProton, fwdLosses, setting, bIon, lowerBound, upperBound, maxAllowedChargeState);
302 double cIon = lastMassFwd + massN + massH * 2;
303 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLosses, possibleWaterLosses, massO, massH, massC,
304 massN, massProton, fwdLosses, setting, cIon, lowerBound, upperBound, maxAllowedChargeState);
310 double xIon = lastMassRev + massC + massO - massH;
311 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLossesRev, possibleWaterLossesRev, massO, massH, massC,
312 massN, massProton, revLosses, setting, xIon, lowerBound, upperBound, maxAllowedChargeState);
318 double yIon = lastMassRev + massH;
319 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLossesRev, possibleWaterLossesRev, massO, massH, massC,
320 massN, massProton, revLosses, setting, yIon, lowerBound, upperBound, maxAllowedChargeState);
326 double zIon = lastMassRev - massN - massH * 2;
327 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLossesRev, possibleWaterLossesRev, massO, massH, massC,
328 massN, massProton, revLosses, setting, zIon, lowerBound, upperBound, maxAllowedChargeState);
330 if (setting.UseZPlusHIon)
333 double zPlusHIon = lastMassRev - massN - massH;
334 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLossesRev, possibleWaterLossesRev, massO, massH, massC,
335 massN, massProton, revLosses, setting, zPlusHIon, lowerBound, upperBound, maxAllowedChargeState);
337 if (setting.UseZPlusTwoHIon)
340 double zPlusTwoHIon = lastMassRev - massN;
341 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLossesRev, possibleWaterLossesRev, massO, massH, massC,
342 massN, massProton, revLosses, setting, zPlusTwoHIon, lowerBound, upperBound, maxAllowedChargeState);
345 if (setting.UseAPlusHIon)
348 double aIon = lastMassFwd - massC - massO;
349 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLosses, possibleWaterLosses, massO,
351 massN, massProton, fwdLosses, setting, aIon, lowerBound, upperBound, maxAllowedChargeState);
353 if (setting.UseAMinusHIon)
356 double aIon = lastMassFwd - massC - massO - 2 * massH;
357 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLosses, possibleWaterLosses, massO,
359 massN, massProton, fwdLosses, setting, aIon, lowerBound, upperBound, maxAllowedChargeState);
361 if (setting.UseBPlusHIon)
366 double bIon = lastMassFwd;
367 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLosses, possibleWaterLosses, massO,
369 massN, massProton, fwdLosses, setting, bIon, lowerBound, upperBound, maxAllowedChargeState);
372 if (setting.UseBMinusHIon)
377 double bIon = lastMassFwd - 2 * massH;
378 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLosses, possibleWaterLosses, massO,
380 massN, massProton, fwdLosses, setting, bIon, lowerBound, upperBound, maxAllowedChargeState);
383 if (setting.UseCPlusHIon)
386 double cIon = lastMassFwd + massN + 3 * massH;
387 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLosses, possibleWaterLosses, massO,
389 massN, massProton, fwdLosses, setting, cIon, lowerBound, upperBound, maxAllowedChargeState);
391 if (setting.UseCMinusHIon)
394 double cIon = lastMassFwd + massN + massH;
395 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLosses, possibleWaterLosses, massO,
397 massN, massProton, fwdLosses, setting, cIon, lowerBound, upperBound, maxAllowedChargeState);
399 if (setting.UseXPlusHIon)
402 double xIon = lastMassRev + massC + massO;
403 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLossesRev, possibleWaterLossesRev,
405 massN, massProton, revLosses, setting, xIon, lowerBound, upperBound, maxAllowedChargeState);
407 if (setting.UseXMinusHIon)
410 double xIon = lastMassRev + massC + massO - 2 * massH;
411 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLossesRev, possibleWaterLossesRev,
413 massN, massProton, revLosses, setting, xIon, lowerBound, upperBound, maxAllowedChargeState);
416 if (setting.UseYPlusHIon)
419 double yIon = lastMassRev + 2 * massH;
420 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLossesRev, possibleWaterLossesRev,
422 massN, massProton, revLosses, setting, yIon, lowerBound, upperBound, maxAllowedChargeState);
424 if (setting.UseYMinusHIon)
427 double yIon = lastMassRev;
428 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLossesRev, possibleWaterLossesRev,
430 massN, massProton, revLosses, setting, yIon, lowerBound, upperBound, maxAllowedChargeState);
433 if (setting.UseZMinusHIon)
436 double zIon = lastMassRev - massN - massH * 3;
437 CalculateIon(charge, ionsNoNL, ionsWithNL, possibleAmoniaLossesRev, possibleWaterLossesRev,
439 massN, massProton, revLosses, setting, zIon, lowerBound, upperBound, maxAllowedChargeState);
445 char lastAA = (char)sequence[sequence.Length - 1];
446 if ((lastAA ==
'S' || lastAA ==
'T' || lastAA ==
'E' || lastAA ==
'D'))
450 if ((lastAA ==
'N' || lastAA ==
'Q' || lastAA ==
'R' || lastAA ==
'K'))
451 ++MaxNrAmmoniaLosses;
453 return GetUniqueIonsSorted(out outIonsNoNL, out outIonsWithNL, ionsNoNL, ionsWithNL);
458 throw new Exception(
"Error in calculating ions for peptide " + Encoding.ASCII.GetString(sequence));
464 static bool InRange(
double v,
double min,
double max)
466 return ((v >= min) && (v <= max));
469 static bool GetUniqueIonsSorted(out
double[] outIonsNoNL, out
IonWithNL[] outIonsWithNL, List<double> ionsNoNL, List<IonWithNL> ionsWithNL)
472 outIonsWithNL =
null;
474 if (ionsNoNL.Count > 0)
476 double[] aIonsNoNL =
new double[ionsNoNL.Count];
477 for (
int i = 0; i < aIonsNoNL.Length; ++i)
479 aIonsNoNL[i] = IonMassStabilizer.Stabilize(ionsNoNL[i]);
481 Array.Sort(aIonsNoNL);
484 for (; k2 < aIonsNoNL.Length; ++k2)
486 if (aIonsNoNL[k1] < aIonsNoNL[k2])
497 for (; k2 < aIonsNoNL.Length; ++k2)
499 if (aIonsNoNL[k1] < aIonsNoNL[k2])
502 aIonsNoNL[k1] = aIonsNoNL[k2];
506 Array.Resize(ref aIonsNoNL, ++k1);
507 outIonsNoNL = aIonsNoNL;
510 if (
null != ionsWithNL && ionsWithNL.Count > 0)
512 IonWithNL[] aIonsWithNL = ionsWithNL.ToArray();
513 FastSort(aIonsWithNL);
517 for (; k2 < aIonsWithNL.Length; ++k2)
519 if (aIonsWithNL[k1].Mz < aIonsWithNL[k2].Mz)
525 aIonsWithNL[k1].AddRange(aIonsWithNL[k2]);
531 for (; k2 < aIonsWithNL.Length; ++k2)
533 if (aIonsWithNL[k1].Mz < aIonsWithNL[k2].Mz)
536 aIonsWithNL[k1] = aIonsWithNL[k2];
540 aIonsWithNL[k1].AddRange(aIonsWithNL[k2]);
544 Array.Resize(ref aIonsWithNL, ++k1);
545 outIonsWithNL = aIonsWithNL;
549 if (
null != outIonsNoNL ||
null != outIonsWithNL)
551 if (
null == outIonsNoNL)
553 outIonsNoNL = Array.Empty<
double>();
560 private static void doQuicksort(
IonWithNL[] elements,
int left,
int right)
562 int i = left, j = right;
564 IonWithNL pivot = elements[left + (right - left) / 2];
568 while (elements[i].Mz < pivot.
Mz)
573 while (elements[j].Mz > pivot.
Mz)
585 (elements[i], elements[j]) = (elements[j], elements[i]);
595 doQuicksort(elements, left, j);
600 doQuicksort(elements, i, right);
604 public static void FastSort(
IonWithNL[] ions)
608 doQuicksort(ions, 0, ions.Length - 1);
612 public static void CalculateAllInternalCombinations(
double lastMassInternal,
614 List<double> ionsNoNL,
622 double currentMass = lastMassInternal;
623 for (
int k = seq.Length - 2; k > i + 2; --k)
625 currentMass -= aminoAcids[(char) seq[k]].Mass(mono);
627 if (mods[k + 1] !=
null)
629 currentMass -= mods[k + 1].
Mass(mono);
631 if (InRange(currentMass, lowerBound, upperBound))
633 ionsNoNL.Add(currentMass);
638 public static void CalculateIon(
int charge, List<double> ionsNoNL, List<IonWithNL> ionsWithNL,
int possibleAmoniaLosses,
639 int possibleWaterLosses,
double massO,
double massH,
double massC,
double massN,
double massProton,
641 double lowerBound,
double upperBound,
string maxAllowedChargeState)
644 for (
int i = 0; i < losses.Count; ++i)
646 double newMass = ion - losses[i];
647 if (InRange(newMass, lowerBound, upperBound))
653 ionsWithNL.Add(ionWithNL);
654 CalculatePossibleNeutralLosses(newMass, possibleWaterLosses, possibleAmoniaLosses,
656 massN, ionWithNL, lowerBound, upperBound);
660 ionsNoNL.Add(newMass);
665 CalculateHigherChargedIons(charge, ionsNoNL, ionsWithNL, possibleAmoniaLosses, possibleWaterLosses, massO, massH, massC, massN, massProton, setting, newMass, lowerBound, upperBound, maxAllowedChargeState);
669 if (losses.Count == 0)
671 if (InRange(ion, lowerBound, upperBound))
677 ionsWithNL.Add(ionWithNL);
678 CalculatePossibleNeutralLosses(ion, possibleWaterLosses, possibleAmoniaLosses,
680 massN, ionWithNL, lowerBound, upperBound);
689 CalculateHigherChargedIons(charge, ionsNoNL, ionsWithNL, possibleAmoniaLosses, possibleWaterLosses, massO, massH, massC, massN, massProton, setting, ion, lowerBound, upperBound, maxAllowedChargeState);
694 public static void CalculateHigherChargedIons(
int charge, List<double> ionsNoNL, List<IonWithNL> ionsWithNL,
int possibleAmoniaLosses,
695 int possibleWaterLosses,
double massO,
double massH,
double massC,
double massN,
double massProton,
696 InstrumentSetting setting,
double newMass,
double lowerBound,
double upperBound,
string maxAllowedChargeState)
698 string allowedChargeStates =
"+2";
699 switch (maxAllowedChargeState)
702 AddHigherChargedIons(ionsNoNL, ionsWithNL, possibleAmoniaLosses, possibleWaterLosses,
704 newMass, 1, lowerBound, upperBound);
707 for (
int i = 1; i < charge - 1 && i < 3; ++i)
709 AddHigherChargedIons(ionsNoNL, ionsWithNL, possibleAmoniaLosses, possibleWaterLosses,
711 newMass, i, lowerBound, upperBound);
715 for (
int i = 1; i < charge - 1 && i < 4; ++i)
717 AddHigherChargedIons(ionsNoNL, ionsWithNL, possibleAmoniaLosses, possibleWaterLosses,
719 newMass, i, lowerBound, upperBound);
722 case "Precursor - 1":
723 for (
int i = 1; i < charge - 1; ++i)
725 AddHigherChargedIons(ionsNoNL, ionsWithNL, possibleAmoniaLosses, possibleWaterLosses,
727 newMass, i, lowerBound, upperBound);
733 public static void AddHigherChargedIons(List<double> ionsNoNL, List<IonWithNL> ionsWithNL,
int possibleAmoniaLosses,
734 int possibleWaterLosses,
double massO,
double massH,
double massC,
double massN,
735 double massProton,
bool water,
bool ammonia,
double ion,
int currentCharge,
736 double lowerBound,
double upperBound)
738 double chargedIon = ion + currentCharge * massProton;
741 double myMass = chargedIon / currentCharge;
742 if (InRange(myMass, lowerBound, upperBound))
744 if ((water && possibleWaterLosses > 0) || (ammonia && possibleAmoniaLosses > 0))
747 ionsWithNL.Add(ionWithNL);
748 CalculatePossibleNeutralLosses(chargedIon, possibleWaterLosses, possibleAmoniaLosses,
749 currentCharge, water, ammonia, massO, massH,
750 massC, massN, ionWithNL, lowerBound, upperBound);
754 ionsNoNL.Add(myMass);
759 public static void CalculatePossibleNeutralLosses(
double ionMass,
int possibleWaterLosses,
760 int possibleAmoniaLosses,
int charge,
bool water,
bool ammonia,
double massO,
double massH,
761 double massC,
double massN,
IonWithNL ionWithNL,
762 double lowerBound,
double upperBound)
766 double massWaterLoss = massH * 2 + massO;
767 double massAmoniaLoss = massH * 3 + massN;
769 int currentWaterLoss = 0;
770 while (water && currentWaterLoss < possibleWaterLosses)
773 double chargedIon = ionMass - currentWaterLoss * massWaterLoss;
774 double myMass = IonMassStabilizer.Stabilize(chargedIon / charge);
776 ionWithNL.Add(myMass);
779 int currentAmoniaLoss = 0;
780 while (ammonia && currentAmoniaLoss < possibleAmoniaLosses)
783 double chargedIon = ionMass - currentAmoniaLoss * massAmoniaLoss;
784 double myMass = IonMassStabilizer.Stabilize(chargedIon / charge);
786 ionWithNL.Add(myMass);
793 public double Mz {
get;
set; }
799 Mz = IonMassStabilizer.Stabilize(baseMZ);
803 internal static class IonMassStabilizer
805 const int SignificantBitsStabilizer = 47;
807 const ulong RoundingAdditionStabilizer = unchecked(1uL << (52 - SignificantBitsStabilizer - 1));
808 const ulong ClearBitsStabilizerMask = unchecked(0xFFFFFFFFFFFFFFFFuL << (52 - SignificantBitsStabilizer));
818 static internal double Stabilize(
double value)
820 #if !DISABLE_FP_STABILIZER
823 ulong im = (RoundingAdditionStabilizer + (ulong)BitConverter.DoubleToInt64Bits(value)) & ClearBitsStabilizerMask;
824 return BitConverter.Int64BitsToDouble((
long)im);
836 private readonly
double MonoMass;
837 private readonly
double AvgMass;
838 public readonly
char AA;
845 public int ID {
get;
set; }
849 return mono ? MonoMass : AvgMass;
855 public Modification(
string title,
string name,
double mono,
double avg,
char aa,
bool fix,
double[] neutralLosses,
856 bool nTerminal,
bool cTerminal,
int id,
bool protein,
int maxOccurrence,
bool semiFixed =
false)
877 MonoMass = m.MonoMass;
894 MonoMass = m.MonoMass;
909 string name =
Title +
"(";
928 StringBuilder builder =
new StringBuilder();
929 builder.Append(modif.
Title).Append(
"°");
930 builder.Append(modif.
FullName).Append(
"°");
931 builder.Append(modif.MonoMass).Append(
"°");
932 builder.Append(modif.AvgMass).Append(
"°");
933 builder.Append(modif.
AA).Append(
"°");
934 builder.Append(modif.
Fixed).Append(
"°");
935 foreach (
double nl
in modif.NeutralLosses)
937 builder.Append(nl).Append(
":");
940 builder.Append(modif.NTerminal).Append(
"°");
941 builder.Append(modif.CTerminal).Append(
"°");
942 builder.Append(modif.ID).Append(
"°");
943 builder.Append(modif.ProteinTerminus);
944 return builder.ToString();