  We present an exact derivation of the isobaric partition function of lattice
hard rods with arbitrary nearest neighbor interactions. Free energy and all
thermodynamics functions are derived accordingly and they written in a form
that is a suitable for numerical implementation. As an application, we have
considered lattice rods with pure hard core interactions, rods with long range
gravitational attraction and finally a charged hard rods with charged
boundaries (Bose gas), a model that is relevant for studying several phenomena
such as charge regulation, ionic liquids near charged interfaces, and an array
of charged smectic layers or lipid multilayers. In all cases, thermodynamic
analysis have been done numerically using the Broyden algorithm.
