This tutorial explains how to log quantities computed during the simulation.
While logging is a general topic, this tutorial uses MD and HPMC simulations to demonstrate. The tutorials Introducing HOOMD blue and Introducing Molecular Dynamics teach these concepts.
This tutorial is written with jupyter. You can download the source from the hoomd-examples repository.