Skip to main content
Scientific Reports logoLink to Scientific Reports
. 2024 Oct 18;14:24510. doi: 10.1038/s41598-024-75515-w

Molecule discovery and optimization via evolutionary swarm intelligence

Hsin-Ping Liu 1, Frederick Kin Hing Phoa 2,, Saykat Dutta 2
PMCID: PMC11489669  PMID: 39424862

Abstract

Since the advent of computational analysis and visualization of chemical compounds, Computer-Aided Drug Design has made significant contributions to drug discovery. Recently, de novo drug design and molecular optimization have garnered considerable attention. Traditional optimization methods often struggle with the discrete nature of molecular space, but evolutionary computations have demonstrated their versatility across various optimization problems, regardless of the nature of the objective functions. This paper introduces a novel evolutionary algorithm, the Swarm Intelligence-Based Method for Single-Objective Molecular Optimization. Several experiments were conducted to showcase the efficiency of the proposed method, which identifies near-optimal solutions in a remarkably short time. The results were then compared with those of other state-of-the-art methods in the field.

Keywords: Molecular optimization, Drug discovery, De novo drug design, Evolutionary algorithm, QED

Subject terms: Computational science, Computational methods

Introduction

Molecule discovery is a crucial objective in chemical research, aiming to identify molecules with specific features for targeted applications. However, the molecular space is highly complex and nearly infinite. For instance, with just 17 heavy atoms (C, N, O, S, and Halogens), there are estimated to be over 165 billion chemical combinations1. Traditionally, drug discovery involved searching through natural and synthetic chemicals, a process that is both costly and time-consuming, often taking decades and exceeding one billion dollars2. As technology advances, it becomes imperative to develop methods that accelerate this process and effectively explore the complex chemical domain. In recent years, Computer-Aided Drug Design (CADD) has led to the commercialization of numerous drugs, such as Captopril and Oseltamivir3. By facilitating the identification of novel drugs with minimal toxicity and suitable for oral administration, CADD reduces the number of compounds that need to be synthesized and evaluated to identify biologically active molecules.

De novo drug design is a CADD technique that creates molecular compounds from scratch, allowing for a more thorough exploration of chemical space and aiding in the discovery of novel chemical structures for drug development without relying on existing chemical databases4. Optimizing desired molecular properties, also known as the Molecular Optimization (MO) problem, is essential in this process. While the complexity of molecular space increases the difficulty of this task, approaches to MO can be categorized into Evolutionary Computation (EC) methods and Deep Learning (DL) methods. EC encompasses heuristic optimization methods that mimic biological evolution, including Genetic Algorithms (GA)5, Particle Swarm Optimization (PSO)6, and the Swarm Intelligence-Based (SIB) method7,8. Oduguwa et al.9 provide an overview of several EC methods applied to the MO problem, such as EvoMol10. DL, a subset of machine learning, utilizes multi-layer neural networks to simulate human decision-making. Some DL methods for the MO problem will be discussed in section “Literature review”.

Although these machine learning techniques are powerful tools for molecule discovery, they often rely on analyzing large chemical databases. Even if the database is of high quality and computationally feasible to search, the results are still limited by the scope of the database. In contrast, this work introduces a new evolutionary algorithm, the Swarm Intelligence-Based Method for Single-Objective Molecular Optimization (SIB-SOMO), to address MO problems using the general framework of the SIB method. The SIB algorithm is a metaheuristic method capable of finding approximate optimal solutions in complex solution spaces within a relatively short time. We have redesigned several components of the canonical SIB to adapt the method to MO domains and introduced two additional operations to enhance the exploration capability of SIB-SOMO. Compared to existing metaheuristic optimization approaches, SIB-SOMO is relatively fast, easy to implement, and computationally efficient for most molecule discovery problems. Furthermore, SIB-SOMO is free of any chemical knowledge, though incorporating such knowledge could potentially reduce the search space. Our decision aligns with the goal of proposing a general framework for various objective functions in MO, rather than addressing specific MO problems through complex chemical rules in SIB-SOMO.

The rest of the paper is organized as follows: section “Literature review” briefly reviews the SIB framework, the definition of QED, and other methods used for comparison in the experiments. Section “Methods and implementation” describes the implementation details of SIB-SOMO. Experimental results are presented and analyzed in section “Experiment and result”. Finally, conclusions are drawn in the last section.

Literature review

Before introducing SIB-SOMO, this section presents the framework of the canonical SIB algorithm and the definition of the Quantitative Estimate of Druglikeness (QED). Additionally, other methods for molecular optimization are briefly reviewed, including two main categories: Evolutionary Computation (EC) methods and Deep Learning (DL) methods. All these methods will be compared with SIB-SOMO in the experimental section.

SIB algorithm

The Swarm Intelligence-Based (SIB) method8, which was originally used for optimizing a class of experimental designs7, combines the discrete domain capabilities of Genetic Algorithms (GA)5 with the convergence efficiency of Particle Swarm Optimization (PSO)6. Leveraging the general framework of PSO, which involves Local Best (LB) and Global Best (GB) solutions and information exchange among particles, SIB replaces the velocity-based update procedure with a MIX operation, similar to crossover and mutation in GA.

The SIB algorithm begins by initializing a swarm of particles and enters an iterative loop comprising MIX and MOVE operations.

In the MIX operation, each particle is combined with its LB and GB to generate two modified particles, mixwLB and mixwGB, respectively. A proportion of entries in each particle is modified based on the values from the best particles. This proportion is typically smaller for entries modified by the GB compared to those modified by the LB to prevent premature convergence. Next, the MOVE operation selects the particle’s next position based on the objective function from the original particle and the two modified particles. If either modified particle performs better than the original, it becomes the new position. If the original particle remains the best, a Random Jump operation is applied to it. This operation randomly alters a portion of the particle’s entries to avoid getting trapped in a local optimum. The iterative process continues until a stopping criterion is met, such as a maximum number of iterations, maximum computation time, or convergence threshold.

Although PSO with a complete graph-based topology is known for frequently getting stuck in local optima11 explored the impact of communication topologies on PSO performance. They found that decentralized architectures with high connectivity and an average path length of approximately 3 perform better. Despite using a complete graph in the canonical SIB, the Random Jump operation helps prevent premature convergence by allowing agents to escape local optima. However, as with most metaheuristic optimization methods, SIB does not guarantee finding the global optimum unless the optimal value of the objective function is theoretically derived and achieved by the algorithm. Instead, SIB aims to find a highly satisfactory solution within a short time frame.

QED

The theoretical framework of druglikeness provides essential guidelines for the initial phase of drug research12. This study employs the Quantitative Estimate of Druglikeness (QED)13, which integrates eight commonly used molecular properties into a single value, allowing for the ranking of compounds based on their relative significance. The QED is defined by Equation 1, where di(x) represents the desirability function for the molecular descriptor x. The range of QED extends from one (indicating that all characteristics are favorable) to zero (indicating that all characteristics are unfavorable).

QED=exp18i=18lndi(x) 1
di(x)=a+b1+exp-x-c+d2e×1-11+exp-x-c-d2f 2

The parameters a, b, c, d, e, and f for each desirability function di, including those for dMW, dALOGP, dHBD, dHBA, dPSA, dROTB, dAROM and dALERTS are provided in14. The eight properties considered are molecular weight (MW), octanol-water partition coefficient (ALOGP), number of hydrogen bond donors (HBD), number of hydrogen bond acceptors (HBA), molecular polar surface area (PSA), number of rotatable bonds (ROTB), and number of aromatic rings (AROM).

Other methods for molecule optimization

Approaches for MO can be categorized into EC methods and DL methods. As an EC method, EvoMol10 is a representative EC approach that offers a generic and straightforward method for molecular generation. It builds molecular graphs sequentially using a hill-climbing algorithm combined with seven chemically meaningful mutations. While EvoMol has demonstrated effective performance across various MO objectives, its optimization efficiency is limited by the inherent inefficiency of hill-climbing algorithms, especially in expansive domains.

Several notable DL models have been developed for MO:

  1. MolGAN15 is an implicit generative model that operates directly on molecular graphs. It combines Generative Adversarial Networks (GANs) with a reinforcement learning objective to produce small molecular graphs with desired properties. Compared to SMILES-based sequential GAN models, MolGAN achieves higher chemical property scores and faster training times. However, it is susceptible to mode collapse, which can limit output variability and hinder comprehensive domain exploration.

  2. Junction Tree Variational Autoencoder (JT-VAE)14 is a deep generative model that maps molecules to a high-dimensional latent space. It uses sampling or optimization techniques to generate new molecules.

  3. Objective-Reinforced Generative Adversarial Networks (ORGAN)16 leverage reinforcement learning to generate molecules from SMILES strings. While this adversarial approach helps in producing diverse samples, it does not guarantee the validity of the generated molecules. The authors also observed that GAN models tend to generate sequences with an average length similar to that of the training set, which can limit diversity.

  4. (MolDQN)17 integrates domain knowledge with reinforcement learning. It frames molecule modification as a Markov Decision Process (MDP) and solves it using Deep Q-Networks (DQN). Importantly, MolDQN is trained from scratch, making its training independent of any pre-existing dataset.

These methods represent different strategies for tackling the molecular optimization problem, each with its strengths and limitations.

Methods and implementation

Based on the canonical framework of SIB, we propose the Swarm Intelligence-Based Method for Single-Objective Molecular Optimization (SIB-SOMO) to address molecular optimization problems. Algorithm 1 illustrates the SIB-SOMO process. In this algorithm, each particle represents a molecule within the swarm, initially configured as a carbon chain with a maximum length of 12 atoms. During each iteration, every particle undergoes two MUTATION and two MIX operations, generating a total of four modified particles. Among these candidates, the best particle-determined by the objective function-is selected as the particle’s new position during the MOVE operation. In addition, under specific conditions, Random Jump or Vary operations may be executed to further enhance exploration. The iterative process continues until a predefined stopping criterion is satisfied, such as reaching a maximum number of iterations or meeting a convergence threshold.

Algorithm 1.

Algorithm 1

The SIB-SOMO algorithm.

Mutation

This subsection describes two distinct designs for MUTATION operations: Mutate_atom and Mutate_bond. Two illustrative examples are provided in Fig. 1.

Fig. 1.

Fig. 1

Illustrative examples of mutation operations.

For the Mutate_atom, assume there are K atoms in a molecule. Using a predefined ratio (qA), qA×K atoms are selected for replacement. First, 0.5qB×K atoms are randomly chosen from the total atoms in the molecule. For each selected atom, a replacement atom is chosen from a valid atom list. Only atoms with higher valence than the replaced atom are considered as candidates. The probability of each candidate atom is derived from an existing molecular database, such as the ZINC dataset18, as indicated by atomprob, see Table 1 for details. For diversity, the probability of carbon (C) is reduced from 0.7 to 0.5. This operation aims to enhance atom diversity within the swarm.

Table 1.

Valid atom probability.

Atom type C O N P S F Cl Br
Valence 4 2 3 3 6 1 1 1
Probability 0.5 0.12 0.13 0.01 0.01 0.01 0.01 0.01

For the Mutate_bond operation, assume there are K atoms in a molecule. With a predefined ratio (qB), M=qB×K bonds are either created or deleted during this operation. The pairs of atoms are divided into two groups: connected and disconnected. M/2 pairs are selected from each group. For each selected pair, a new bond type is assigned based on predefined probabilities derived from chemical knowledge and experience (see Table 2). The probability of ‘No bond’ is set to zero if the connected pair serves as a bridge in the molecular graph. Additionally, the availability of bond types for each pair is determined by the number of free electrons on the atoms involved. If a bond type is not feasible due to electron configuration, its probability is set to zero. This operation can generate complex structures, such as aromatic rings, thereby increasing the diversity of molecular structures within the swarm. Note that these probabilities can be adjusted based on user preferences or specific problem requirements.

Table 2.

Bond-type probability.

Different groups No bond Single bond Double bond Triple bond
Connected group 0.1 0.5 0.35 0.05
Disconnected group 0.5 0.4 0.07 0.03

MIX

In each iteration, every particle is mixed with its LB and GB particles, producing two modified particles, x1 and x2. This operation aims to enhance the particle by incorporating beneficial features from the best particles. Substructures are copied from the best particles and integrated into the target particle. Assume the target particle contains K atoms with free electrons, and the best particle has B bridges. With a predefined mix ratio q (q=qLBqGB, depending on which best particle is used), M=min(q×K,B) substructures are duplicated during this operation. M atoms are randomly selected from the target particle, and M bridges are chosen from the best particle. A bridge can divide a particle into two substructures. If both substructures are valid and the number of atoms in each is within the predefined maximum limit, the substructure with more atoms is selected. Additionally, the target atom must have sufficient free electrons to support the bond type of the bridge. If either the substructures are not feasible to add, or the target atom cannot accommodate the bridge, that particular atom-bridge pair is skipped. Figure 2 illustrates this operation.

Fig. 2.

Fig. 2

An illustration for MIX operation. In this example, ‘C:1’ is selected from the current molecule, and the pair of ‘C:2’ and ‘N:3’ is selected from the best molecule. According to the number of atoms, the branch in the orange box is connected to the selected atom ‘C:1.’ Notice that some order of the atoms in the result molecule is not the same as that in current molecule.

MOVE

The MOVE operation determines the new position of a particle by evaluating the performance of the modified particles produced from two MUTATION and two MIX operations. If either of the modified particles performs better than the original particle, it becomes the particle’s new position. If neither modified particle surpasses the original, a VARY operation is applied to the original particle.

The VARY operation aims to increase length diversity by adding a new carbon atom to the longest carbon chain within the molecule. This chain must adhere to three conditions: (1) The chain starts and ends with carbon atoms. (2) Both terminal carbon atoms must have free electrons to accommodate the new carbon atom. (3) The chain does not need to span from the molecule’s endpoints. Two new molecules are generated by adding a carbon atom to the beginning and end of the longest chain, respectively. Figure 3 illustrates this operation.

Fig. 3.

Fig. 3

An illustration for Vary operation. In this example, the sequence from ‘C:11’ to ‘C:0,’ which is in the blue box, is the longest sequence in the molecule. As the results, carbon atoms are added to the head (‘C’ in red box) and the tail (‘C’ in orange box) of the sequence respectively.

If the VARY operation does not improve the particle, a Random Jump operation is performed on the particle selected from the VARY step. The Random Jump combines Mutate_atom and Mutate_bond operations. Given a random jump ratio (qRJ), the particle is first modified by Mutate_atom with qA=qRJ/2, followed by Mutate_bond with qB=qRJ/2. This dual modification enhances exploration of the solution space and helps prevent the algorithm from getting trapped in local optima.

Experiment and result

To evaluate the effectiveness and efficiency of SIB-SOMO, we conducted a series of experiments and compared the results with five state-of-the-art methods: MolGAN15, JT-VAE14, ORGAN16, MolDQN17, and EvoMol10. The objective function used in these experiments is the Quantitative Estimate of Druglikeness (QED), as defined in Equations 1-2.

The experimental settings adhere to those described in10, including (1) Valid atoms: carbon (C), oxygen (O), nitrogen (N), phosphorus (P), sulfur (S), fluorine (F), chlorine (Cl), and bromine (Br), and (2) Maximum number of heavy atoms in a molecule is 38. For SIB-SOMO, the algorithm was executed for 50 iterations with a swarm size of 100. The parameters were set as follows: qA=0.1, qB=0.1, qLB=0.4, qGB=0.2, and qRJ=0.6.

The optimization results are summarized in Table 3. For comparison, the performance values for MolGAN are sourced from15, while values for JT-VAE, ORGAN, and MolDQN are taken from19. The results indicate that SIB-SOMO achieved a significantly higher mean QED value compared to MolGAN and a higher best QED value than JT-VAE and ORGAN. SIB-SOMO’s best score was comparable to that of MolDQN and EvoMol, with all three methods generating unique and valid solutions.

Table 3.

Optimized result.

Method Mean QED Best QED Unique % Valid %
MolGAN (QM9) 0.62 2 100
JT-AVE 0.925 91.5 100
ORGAN 0.896 89.3 2.2
MolDQN 0.948 100 100
EvoMol 0.948 0.948 100 100
SIB-SOMO 0.831 0.946 100 100

Mean QED is the mean value over the last generation of molecules. “Unique %” represents the proportion of unique solutions. “Valid %” represents the proportion of the valid solutions that follow chemical rules.

To assess the computational efficiency of SIB-SOMO, we compared its performance with EvoMol in terms of computation time. It is important to note that comparing computation times between deep learning-based methods and evolutionary computation methods is not directly applicable; thus, the timing comparison is limited to EvoMol and SIB-SOMO. In this comparison, SIB-SOMO was executed for 50 iterations, while EvoMol was run for 1500 iterations. Both algorithms used a population size of 1000 for fairness.

The results, presented in Table 4, show that SIB-SOMO achieved a best QED score of 0.943, compared to EvoMol’s best QED score of 0.948. Notably, SIB-SOMO required only half the computation time of EvoMol. This demonstrates that SIB-SOMO not only converges rapidly but also achieves a significant QED value efficiently.

Table 4.

Computation time.

Method Pop. size Iterations Best QED Time (s)
EvoMol 1000 1500 0.948 39,675.10
SIB-SOMO 1000 50 0.943 19,862.51

Conclusion

This study introduced the Swarm Intelligence-Based Method for Single-Objective Molecular Optimization (SIB-SOMO) to address molecular optimization (MO) challenges. The experimental results, particularly for Quantitative Estimate of Druglikeness (QED) optimization, demonstrate that SIB-SOMO significantly outperforms several state-of-the-art methods. Moreover, it achieves results comparable to EvoMol while requiring a fraction of the computation time.

Looking ahead, future research will focus on several key areas:

  1. Benchmarking on Diverse Functions: We plan to test SIB-SOMO on a wider range of optimization functions to assess its robustness and versatility across different molecular optimization scenarios.

  2. Extension to Multi-Objective Optimization: Expanding SIB-SOMO to handle multi-objective problems will be explored to address more complex optimization scenarios where multiple criteria need to be simultaneously optimized.

  3. Theoretical and Structural Analysis: Gaining a deeper theoretical understanding of the MO problem and analyzing the structural properties of the optimized molecules could provide valuable insights. This would aid in refining the algorithm further and improving its performance.

These future directions aim to enhance the effectiveness of SIB-SOMO and broaden its applicability in the field of molecular optimization.

Acknowledgements

The authors would like to thank the editor, the associate editor, and two reviewers for their excellent comments and suggestions that greatly improve the quality of this paper. This work was supported by Academia Sinica (Taiwan) Thematic Project grant numbers AS-TP-109-M07, AS-IA-112-M03, and AS-PD-11302-M08, the National Science and Technology Council of Taiwan grant numbers 111-2118-M-001-007-MY2 and 113-2628-M-001-010-MY3, and the Tukey Project by the Institute of Statistical Science, Academia Sinica. Hsin-Ping Liu is supported by the doctoral student scholarship provided by the Institute of Statistical Science, Academia Sinica, and the Data Science Degree Program, National Taiwan University. Part of this work will be included as a chapter of the Ph.D. dissertation of Ms. Hsin-Ping Liu.

Author contributions

HPL is responsible for design of the work, analysis and interpretation of data, programming, and the draft of the manuscript. FKHP is responsible for the conception, design of the work, analysis and interpretation of data, programming, and draft of the manuscript. SD is responsible for the programming. All authors reviewed the manuscript. All authors conducted the revision of the manuscript.

Data availability

The datasets used and/or analysed during the current study available from the corresponding author on reasonable request.

Declarations

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  • 1.Keller, T. H., Pichota, A. & Yin, Z. A practical view of ‘druggability’. Curr. Opin. Chem. Biol. 10(4), 357–361. 10.1016/j.cbpa.2006.06.014 (2006) (Next-generation therapeutics). [DOI] [PubMed] [Google Scholar]
  • 2.Shekhar, C. In silico pharmacology: Computer-aided methods could transform drug development. Chem. Biol. 15, 413–4. 10.1016/j.chembiol.2008.05.001 (2008). [DOI] [PubMed] [Google Scholar]
  • 3.Talele, T., Khedkar, S. & Rigby, A. Successful applications of computer aided drug discovery: Moving drugs from concept to the clinic. Curr. Top. Med. Chem. 10, 127–41. 10.2174/156802610790232251 (2009). [DOI] [PubMed] [Google Scholar]
  • 4.Loving, K., Alberts, I. & Sherman, W. Computational approaches for fragment-based and de novo design. Curr. Top. Med. Chem. 10, 14–32. 10.2174/156802610790232305 (2009). [DOI] [PubMed] [Google Scholar]
  • 5.Holland, J. H. Adaptation in Natural and Artificial System (MIT Press, 1975). [Google Scholar]
  • 6.Kennedy, J. & Eberhart, R. Particle swarm optimization. Proc. IEEE Int. Conf. Neural Netw. 4, 1942–1948 (1995). [Google Scholar]
  • 7.Phoa, F. K. H., Chen, R. B., Wang, W .C. & Wong, W. K. Optimizing two-level supersaturated designs via swarm intelligence techniques. Technometrics 58, 43–49. 10.1080/00401706.2014.981346 (2016). [DOI] [PMC free article] [PubMed]
  • 8.Phoa, F. K. H. A Swarm Intelligence Based (SIB) method for optimization in designs of experiments. Nat. Comput. 16(4), 597–605. 10.1007/s11047-016-9555-4 (2017) (Accessed 2023-03-03). [Google Scholar]
  • 9.Oduguwa, A., Tiwari, A., Roy, R. & Bessant, C. An overview of soft computing techniques used in the drug discovery process. In Online World Conference on Soft Computing in Industrial Applications. https://api.semanticscholar.org/CorpusID:206615290 (2004).
  • 10.Leguy, J., Cauchy, T., Glavatskikh, M., Duval, B. & Da Mota, B. EvoMol: a flexible and interpretable evolutionary algorithm for unbiased de novo molecular generation. J. Cheminform. 12(1), 55. 10.1186/s13321-020-00458-z (2020) (Accessed 2023-09-12). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Mann, V., Sivaram, A., Das, L. & Venkatasubramanian, V. Robust and efficient swarm communication topologies for hostile environments. Swarm Evol. Comput. 62, 100848 (2020). [Google Scholar]
  • 12.Keller, T. H., Pichota, A. & Yin, Z. A practical view of ‘druggability’. Curr. Opin. Chem. Biol. 10(4), 357–361. 10.1016/j.cbpa.2006.06.014 (2006). [DOI] [PubMed] [Google Scholar]
  • 13.Bickerton, G. R., Paolini, G. V., Besnard, J., Muresan, S. & Hopkins, A. L. Quantifying the chemical beauty of drugs. Nat. Chem. 4(2), 90–98. 10.1038/nchem.1243 (2012) (Accessed 2023-08-21). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Jin, W., Barzilay, R. & Jaakkola, T. Junction Tree Variational Autoencoder for Molecular Graph Generation (2019).
  • 15.Cao, N. D. & Kipf, T. MolGAN: An implicit generative model for small molecular graphs (2022).
  • 16.Guimaraes, G. L., Sanchez-Lengeling, B., Outeiral, C., Farias, P. L. C. & Aspuru-Guzik, A. Objective-Reinforced Generative Adversarial Networks (ORGAN) for Sequence Generation Models (2018).
  • 17.Zhou, Z., Kearnes, S., Li, L., Zare, R. N. & Riley, P. Optimization of molecules via deep reinforcement learning. Sci. Rep. 9(1), 10752. 10.1038/s41598-019-47148-x (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Irwin, J. J. & Shoichet, B. K. Zinc—a free database of commercially available compounds for virtual screening. J. Chem. Inf. Model. 45(1), 177–182. 10.1021/ci049714+ (2005) (Publisher: American Chemical Society). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Zhang, C., Lyu, X., Huang, Y., Tang, Z. & Liu, Z. Molecular graph generation with deep reinforced multitask network and adversarial imitation learning. 10.1109/BIBM47256.2019.8983277 (2019).

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

The datasets used and/or analysed during the current study available from the corresponding author on reasonable request.


Articles from Scientific Reports are provided here courtesy of Nature Publishing Group

RESOURCES