The following files are provided: hard_rods_MC.f90: fortran code for MC simulation of confined hard rods. hard_rods_MC.py: python code for MC simulation of confined hard rods. hard_rods_MC.par: input file with parameters: number of particles number of equilibrium MC steps number of equilibration MC steps free length between rods (units of rod length) amplitude of MC moves hard_rods_MC.out: output file with rod coordinates in final configuration hard_rods_MC.dat: output file with summary and some results hard_rods_MC.prof: output file with density profile