$\frac{\mathrm{d}p}{\mathrm{d}z}=-\frac{\partial\mathrm{H}}{\partial q},$