Simulation of phase equilibria for chain molecules