Polyhydroxybutyrate (PHB) is a sustainable and compostable polyester, which has great potential for use as food packaging film, having similar barrier properties to conventional plastics. PHB is semi-crystalline and is often copolymerised with polyhydroxyvalerate (PHV) to form poly(3-hydroxybutyrate-co-3-hydroxyvalerate) (PHBV). Molecular dynamics (MD) simulations provide valuable insight into the polymer structure and gas diffusion, but the accuracy of MD simulations depends on the force field. This work presents a modified all-atom General Amber Force Field that enables PHB, PHV and PHVB copolymers to be modelled. The structural properties of crystal and amorphous phases of PHB and PHV were in good agreement with experiment. The diffusion coefficients of water and oxygen in amorphous PHB were also in good agreement with experimental values. The diffusion coefficient of oxygen in PHV was larger than in PHB, mainly due to the lower density of PHV. The diffusion coefficient of water in PHV was similar to PHB as its diffusion is hindered by the interaction of water with the polar ester groups on the polymer chains. This force field can be used to investigate the diffusion of water and oxygen in PHB, PHV and PHBV copolymers, and to optimise the barrier properties of PHBV-based plastic film.