  We formulate a nonequilibrium thermodynamic description for open chemical
reaction networks (CRN) described by a chemical master equation. The
topological properties of the CRN and its conservation laws are shown to play a
crucial role. They are used to decompose the entropy production into a
potential change and two work contributions, the first due to time dependent
changes in the externally controlled chemostats concentrations and the second
due to flows maintained across the system by nonconservative forces. These two
works jointly satisfy a Jarzynski and Crooks fluctuation theorem. In absence of
work, the potential is minimized by the dynamics as the system relaxes to
equilibrium and its equilibrium value coincides with the maximum entropy
principle. A generalized Landauer's principle also holds: the minimal work
needed to create a nonequilibrium state is the relative entropy of that state
to its equilibrium value reached in absence of any work.
