Deep generative model that performs end-to-end bioisosteric replacement on a small molecule: it selects which fragment to remove, which library fragment to insert, and how to attach it, conditioned on desired changes in logP, molecular weight, QED and synthetic accessibility.