We study graph weights which naturally occur in Mayer’s theory and Ree-Hoover’s theory for the virial expansion in the context of an imperfect gas. We pay particular attention to the Mayer weight and Ree-Hoover weight of a 2-connected graph in the case of the hard-core continuum gas in one dimension. These weights are calculated from signed volumes of convex polytopes associated with the graph. In the present paper, we use the method of graph homomorphisms, to develop other explicit formulas of Mayer weights and Ree-Hoover weights for infinite families of 2-connected graphs.