1use std::collections::HashMap;
2
3pub fn modification_atomic_composition() -> HashMap<String, HashMap<&'static str, i32>> {
23 let mut composition: HashMap<String, HashMap<&'static str, i32>> = HashMap::new();
24 composition.insert("[UNIMOD:1]".to_string(), HashMap::from([("C", 2), ("H", 2), ("O", 1)])); composition.insert("[UNIMOD:3]".to_string(), HashMap::from([("N", 2), ("C", 10), ("H", 14), ("O", 2), ("S", 1)])); composition.insert("[UNIMOD:4]".to_string(), HashMap::from([("C", 2), ("H", 3), ("O", 1), ("N", 1)]));
27 composition.insert("[UNIMOD:7]".to_string(), HashMap::from([("H", -1), ("N", -1), ("O", 1)])); composition.insert("[UNIMOD:21]".to_string(), HashMap::from([("H", 1),("O", 3), ("P", 1)])); composition.insert("[UNIMOD:34]".to_string(), HashMap::from([("H", 2), ("C", 1)])); composition.insert("[UNIMOD:35]".to_string(), HashMap::from([("O", 1)])); composition.insert("[UNIMOD:58]".to_string(), HashMap::from([("C", 3), ("H", 4), ("O", 1)])); composition.insert("[UNIMOD:121]".to_string(), HashMap::from([("C", 4), ("H", 6), ("O", 2), ("N", 2)])); composition.insert("[UNIMOD:122]".to_string(), HashMap::from([("C", 1), ("O", 1)])); composition.insert("[UNIMOD:312]".to_string(), HashMap::from([("C", 3), ("H", 5), ("O", 2), ("N", 1), ("S", 1)])); composition.insert("[UNIMOD:354]".to_string(), HashMap::from([("H", -1), ("O", 2), ("N", 1)])); composition.insert("[UNIMOD:747]".to_string(), HashMap::from([("C", 3), ("H", 2), ("O", 3)])); composition.insert("[UNIMOD:1289]".to_string(), HashMap::from([("C", 4), ("H", 6), ("O", 1)])); composition.insert("[UNIMOD:1363]".to_string(), HashMap::from([("C", 4), ("H", 4), ("O", 1)])); composition
43}
44
45pub fn unimod_modifications_mass() -> HashMap<&'static str, f64> {
64 let mut map = HashMap::new();
65 map.insert("[UNIMOD:58]", 56.026215);
66 map.insert("[UNIMOD:408]", 148.037173);
67 map.insert("[UNIMOD:43]", 203.079373);
68 map.insert("[UNIMOD:7]", 0.984016);
69 map.insert("[UNIMOD:1]", 42.010565);
70 map.insert("[UNIMOD:35]", 15.994915);
71 map.insert("[UNIMOD:1289]", 70.041865);
72 map.insert("[UNIMOD:3]", 226.077598);
73 map.insert("[UNIMOD:1363]", 68.026215);
74 map.insert("[UNIMOD:36]", 28.031300);
75 map.insert("[UNIMOD:122]", 27.994915);
76 map.insert("[UNIMOD:1848]", 114.031694);
77 map.insert("[UNIMOD:1849]", 86.036779);
78 map.insert("[UNIMOD:64]", 100.016044);
79 map.insert("[UNIMOD:37]", 42.046950);
80 map.insert("[UNIMOD:121]", 114.042927);
81 map.insert("[UNIMOD:747]", 86.000394);
82 map.insert("[UNIMOD:34]", 14.015650);
83 map.insert("[UNIMOD:354]", 44.985078);
84 map.insert("[UNIMOD:4]", 57.021464);
85 map.insert("[UNIMOD:21]", 79.966331);
86 map.insert("[UNIMOD:312]", 119.004099);
87 map
88}
89
90pub fn unimod_modifications_mass_numerical() -> HashMap<u32, f64> {
109 let mut map = HashMap::new();
110 map.insert(58, 56.026215);
111 map.insert(408, 148.037173);
112 map.insert(43, 203.079373);
113 map.insert(7, 0.984016);
114 map.insert(1, 42.010565);
115 map.insert(35, 15.994915);
116 map.insert(1289, 70.041865);
117 map.insert(3, 226.077598);
118 map.insert(1363, 68.026215);
119 map.insert(36, 28.031300);
120 map.insert(122, 27.994915);
121 map.insert(1848, 114.031694);
122 map.insert(1849, 86.036779);
123 map.insert(64, 100.016044);
124 map.insert(37, 42.046950);
125 map.insert(121, 114.042927);
126 map.insert(747, 86.000394);
127 map.insert(34, 14.015650);
128 map.insert(354, 44.985078);
129 map.insert(4, 57.021464);
130 map.insert(21, 79.966331);
131 map.insert(312, 119.004099);
132 map
133}