  Optimizing a target function over the space of organic molecules is an
important problem appearing in many fields of applied science, but also a very
difficult one due to the vast number of possible molecular systems. We propose
an Evolutionary Monte Carlo algorithm for solving such problems which is
capable of straightforwardly tuning both exploration and exploitation
characteristics of an optimization procedure while retaining favourable
properties of genetic algorithms. The method, dubbed MOSAiCS (Metropolis
Optimization by Sampling Adaptively in Chemical Space), is tested on problems
related to optimizing components of battery electrolytes, namely minimizing
solvation energy in water or maximizing dipole moment while enforcing a lower
bound on the HOMO-LUMO gap; optimization was done over sets of molecular graphs
inspired by QM9 and Electrolyte Genome Project (EGP) datasets. MOSAiCS reliably
generated molecular candidates with good target quantity values, which were in
most cases better than the ones found in QM9 or EGP. While the optimization
results presented in this work sometimes required up to $10^{6}$ QM
calculations and were thus only feasible thanks to computationally efficient ab
initio approximations of properties of interest, we discuss possible strategies
for accelerating MOSAiCS using machine learning approaches.
