Use ArrayList instead of HashSet for precomputed reactions.