Using primarily the python library RDKit 30 ( 2020.09.5), R-groups were extracted through manipulation of SMARTS-patterns generated from per-pair maximum common substructure (MCS) analyses. The 'anchor' atom for each R-group (i.e. the first atom in the MCS that a given R-group is attached to) was stored. Then, for each member ligand of all 3794 perturbations in the dataset, the R-groups were grafted onto benzene molecules while using the anchor atom as a linker, except for cases where the anchor atom was an aromatic carbon atom in which case no anchor atom linker was used. The main ideas for the code of this protocol were inspired by blogposts by Landrum and Schmidtke. Whereas grafting a simple (e.g. chlorine addition) perturbation is straightforward, more complex perturbations involving for example multiple fused rings or more than six R groups were excluded for simplicity as grafting these becomes exceedingly complex and does not add significant knowledge to the training domain. Additionally, perturbations that involved a benzene ring without other constituents were excluded as these would cause issues when generating an MCS for the RBFE protocol, since this code largely depended on enforcing the benzene scaffold based on its topology. After removing duplicates and the grafting step the complete RBFE-Space dataset consisted of 3964 perturbations saved as dual SMILES entries.