lib/ms/mass.rb in mspire-0.6.2 vs lib/ms/mass.rb in mspire-0.6.6
- old
+ new
@@ -1,9 +1,9 @@
module MS
module Mass
- # takes a chemical formula in this format: C2BrH12O
+ # takes a molecular formula in this format: C2BrH12O
def self.formula_to_exact_mass(formula)
# TODO: add other input methods
pairs = formula.scan(/([A-Z][a-z]?)(\d*)/).map do |match|
if match.last == ''
match[-1] = 1