Generalized Energy-Conserving Dissipative Particle Dynamics with Reactions.