Quantum Molecular Similarity Measures (QMSM) implicitly require the maximization of the electron density overlap of the molecules involved in the comparison process. This contribution introduces an optimization algorithm for QMSM, which is global if electron densities are deformed to Dirac density functions. A derivation of the algorithm to nondeformed molecular electron densities is proposed and its efficiency tested.