EmpiricalFormula EmpiricalFormula::operator+(const String & formula) const { EmpiricalFormula ef; SignedSize charge = parseFormula_(ef.formula_, formula); Map<const Element *, SignedSize>::ConstIterator it = formula_.begin(); for (; it != formula_.end(); ++it) { if (ef.formula_.has(it->first)) { ef.formula_[it->first] += it->second; } else { ef.formula_[it->first] = it->second; } } ef.charge_ = charge_ + charge; ef.removeZeroedElements_(); return ef; }