By combining our encoder-decoder framework, computational models to predict properties and/or biological activities of compounds, and an optimization algorithm, we optimize a query molecule with respect to the objective function resulting in a set of compounds with more desirable (predicted) properties. In the first part we show the optimization of molecules with regard to a single objective. Then, we further restrict the optimization by adding substructure constraints. Finally, we demonstrate that our framework can be utilized to perform multi-objective optimization of compounds.