renamed count_subunits -> num_subunits
generate_with_contexts is a special case of generate in ReactionRule