This work proposes a coarse grained description of molecular systems based on mesoparticles representing several molecules, where interactions between mesoparticles are modelled by an interparticle potential of molecular type. Since strong non-equilibrium situations over a wide range of pressure and density are targeted, the internal compressibility of the mesoparticles has to be considered. This is done by introducing a dependence of the potential on the local environment of the mesoparticles. To define local densities, we resort to a three-dimensional Voronoi tessellation instead of standard local, spherical averages. As an example, a local density dependent potential is fitted to reproduce the Hugoniot curve of a model of nitromethane over a large range of pressures and densities.