An iterative transfer perturbation method and its application to the interaction between a polymer and a small molecule