The automated optimisation of a coarse-grained force field using free energy data