if valid and contains no aminopyrimidine For this experiment, we performed optimization in the latent space of the MolMIM model. The RL agent was trained for 100 epochs with a batch size of 100. We evaluated the performance of the method for this experiment by extracting the following metrics on the top-1000 scored molecules: i) uniqueness, defined as the percent of distinct canonical SMILES, ii) diversity, measured as the average pairwise similarity among the top-1000, and iii) success, measured as the percentage of molecules containing the 2-aminopyrimidine substructure. The results are reported in Table . We add the two following baselines random sampling on the prior, and CMA-ES, a gradient free greedy search algorithm . We configured CMA-ES to run with a population size of 20, 5 random initial molecules, 10 iterations and 10 restarts and σ = 1, as implemented in the BioNemo framework.