Derivation of Liouville-like equations for the n-state probability density of an open system with thermalized particle reservoirs and its link to molecular simulation