def run(self):
<EOL>exclude = set(self._args.exclude)<EOL>count = <NUM_LIT:0><EOL>unbalanced = <NUM_LIT:0><EOL>unchecked = <NUM_LIT:0><EOL>for reaction, result in formula_balance(self._model):<EOL><INDENT>count += <NUM_LIT:1><EOL>if reaction.id in exclude or reaction.equation is None:<EOL><INDENT>continue<EOL><DEDENT>if result is None:<EOL><INDENT>unchecked += <NUM_LIT:1><EOL>continue<EOL><DEDENT>left_form, right_form = result<EOL>if right_form != left_form:<EOL><INDENT>unbalanced += <NUM_LIT:1><EOL>right_missing, left_missing = Formula.balance(<EOL>right_form, left_form)<EOL>print('<STR_LIT>'.format(<EOL>reaction.id, left_form, right_form,<EOL>left_missing, right_missing))<EOL><DEDENT><DEDENT>logger.info('<STR_LIT>'.format(unbalanced, count))<EOL>logger.info('<STR_LIT>'.format(<EOL>unchecked, count))<EOL>logger.info('<STR_LIT>'.format(<EOL>len(exclude), count))<EOL>
Run formula balance command