Molecular generation method and device based on multi-attribute constraint
By introducing a multi-attribute-constrained SrIOP strategy and reward mechanism into the molecular generation model, the problem of the lack of innovation and diversity in the generation results of existing models is solved, a high-quality virtual compound library is constructed, and the practicality of molecular generation and chemical space coverage are improved.
Patent Information
- Application Number
- CN202511089001.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-11-18
Smart Images

Figure CN120977413A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of molecular design and generation technology, specifically relating to a molecular generation method and apparatus based on multi-attribute constraints. Background Technology
[0002] Molecular generation technology, as a core method for exploring chemical space and designing novel functional molecules, is gradually becoming an important supporting tool in fields such as drug development, materials design, and molecular synthesis. With the advancements in computational modeling and deep learning, researchers can theoretically expand the structural space of compounds to be screened infinitely through algorithm-driven methods, thereby breaking through the bottleneck of traditional molecular screening that relies on experiments or limited databases. These methods learn structural patterns from data to achieve targeted molecular design for specific properties or functional targets, making it possible to efficiently identify lead compounds.
[0003] In recent years, sequence-based generative models, especially generative strategies using SMILES as the representation, have been widely used for de novo molecular structure generation. These methods, after training, can automatically generate molecules that conform to basic grammatical rules and optimize them to meet set property indices, such as hydrophilicity, molecular weight, and synthetic feasibility. While achieving some success in generation efficiency and initial goal-oriented approach, they still have significant limitations in terms of molecular structure novelty, generation diversity, and coverage of potential chemical spaces.
[0004] On the one hand, existing models are often constrained by the distribution of training data and the guidance of reward functions during the generation process, easily leading to generated results that focus on fine-tuning and recombination of existing molecules, lacking genuine structural innovation. This "local optimum" phenomenon makes the models lack the ability to expand when faced with unknown or complex requirements, thus making it difficult to discover groundbreaking candidate molecular structures in the vast chemical space. On the other hand, current molecular generation mechanisms pay little attention to the active control of the generation space, mostly relying on static optimization objectives, making it difficult to dynamically identify and compensate for low-coverage regions in the chemical space, resulting in limited structural diversity of generated molecules.
[0005] Furthermore, in goal-driven molecular generation tasks, ensuring the achievement of target properties while simultaneously considering the synthetic feasibility and novelty of fragment combinations remains a critical challenge. Most existing methods perform coarse-grained control of the overall molecular structure, lacking in-depth modeling and utilization of fragment-level or potential spatial densities. This often leads to the generation results, while satisfying local optimization objectives, neglecting the overall distribution balance and the potential developmental value of the molecule.
[0006] Therefore, further technological improvements are needed to address the above shortcomings and construct molecular generation mechanisms with stronger structural exploration and property control capabilities. This would enable models to identify candidate molecules with novel structures, excellent properties, and reasonable fragment combinations in a broad chemical space, thereby improving the foresight, practicality, and innovation of molecular design. Summary of the Invention
[0007] In view of the shortcomings of the prior art, the purpose of this invention is to provide a molecular generation method and apparatus based on multi-attribute constraints, which solves the problems in the prior art.
[0008] The objective of this invention can be achieved through the following technical solutions:
[0009] A molecular generation method based on multi-attribute constraints includes the following steps:
[0010] REINVENT4 was used as the molecular generation framework to build a pre-trained model;
[0011] The SrIOP strategy is adopted to divide the entire reinforcement learning training process of the pre-trained model into multiple stages, and to train M steps in each stage.
[0012] During the reinforcement learning training process, key indicators of drug-likeness are set as basic optimization objectives, and fragment reward mechanisms and potential vector density reward mechanisms are introduced respectively to guide the model to generate molecules with novel structures.
[0013] Molecules were generated using a model trained by reinforcement learning, and the Lipinski rule, topological polar surface area, and synthetic feasibility score were used to screen the molecules.
[0014] A virtual compound database is constructed by removing duplicate molecules using a Bloom filter.
[0015] Furthermore, the key indicators of drug-likeness include: molecular weight, octanol-water partition coefficient, number of hydrogen bond donors, and number of hydrogen bond acceptors.
[0016] Furthermore, the fragment reward mechanism combines ECFP fragment novelty, Murcko backbone structure reward, and whole-molecule similarity penalty to guide the diversity of generated molecules at multiple structural levels.
[0017] Furthermore, the latent vector density reward mechanism includes: using the kNN method to evaluate the density of the latent vectors of molecules generated by the model, identifying sparse regions in the latent space, and guiding the model to prioritize exploring regions in the latent space that have not yet been covered by assigning higher rewards to molecules in sparse regions.
[0018] Furthermore, the process of screening molecules includes:
[0019] 1) Calculate the molecular weight, octanol-water partition coefficient, number of hydrogen bond donors, number of hydrogen bond acceptors, and number of rotatable bonds of the molecules, and screen molecules that meet the requirements for drug development according to Lipinski's rules;
[0020] 2) Calculate the topological polar surface area to assess membrane permeability;
[0021] 3) Calculate the synthesis feasibility score to assess the feasibility of synthesis;
[0022] 4) Molecules that simultaneously satisfy conditions 1)-3) are retained as candidates for inclusion in the library.
[0023] Furthermore, the process of removing duplicate molecules using a Bloom Filter includes: inputting the screened molecular SMILES structures into a Bloom Filter for hash deduplication; discarding duplicate molecules if they are duplicates, and writing new molecules into a virtual compound database if they are new.
[0024] A molecular generation device based on multi-attribute constraints, comprising:
[0025] Model building module: Using REINVENT4 as the molecular generation infrastructure, a pre-trained model is built;
[0026] Stage division module: The SrIOP strategy is adopted to divide the entire reinforcement learning training process of the pre-trained model into multiple stages, and M training steps are fixed in each stage;
[0027] Reinforcement training module: During the reinforcement learning training process, key indicators of drug-likeness are set as basic optimization objectives, and fragment reward mechanism and potential vector density reward mechanism are introduced respectively to guide the model to generate molecules with novel structures;
[0028] Molecular screening module: Generates molecules using a model trained by reinforcement learning, and screens molecules using Lipinski rules, topological polar surface area, and synthetic feasibility scores;
[0029] Molecular deduplication module: Removes duplicate molecules using a Bloom filter to build a virtual compound database.
[0030] A computer storage medium storing a readable program that, when executed, instructs a computing device to perform a molecular generation method based on multi-attribute constraints as described above.
[0031] An electronic device includes: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus.
[0032] The memory is used to store at least one executable instruction, which causes the processor to perform an operation corresponding to the above-described molecular generation method based on multi-attribute constraints.
[0033] A computer program product includes computer instructions that instruct a computing device to perform operations corresponding to the above-described molecular generation method based on multi-attribute constraints.
[0034] The beneficial effects of this invention are:
[0035] 1. This invention first loads the REINVENT4 pre-trained model, initializes the molecule generation environment and scoring interface, and constructs the basic framework for molecule generation. Then, the SrIOP strategy is used to divide the training process into N stages, with M training steps fixed in each stage, so that the model gradually focuses on different optimization target ranges during the learning process. Next, multi-attribute constraints are introduced in the reinforcement learning process, including four key indicators of druggability: molecular weight, LogP, number of hydrogen bond donors, and number of hydrogen bond acceptors. The reward function guides the model to generate molecules that simultaneously meet the requirements of structural rationality and druggability. Furthermore, a fragment reward mechanism based on structural diversity is introduced, combining ECFP fragment novelty, Murcko backbone structure reward, and full molecule similarity penalty to improve molecular diversity. At the same time, by extracting the latent vector of molecules and performing k-nearest neighbor density evaluation, molecules located in sparse regions are given higher rewards to encourage the model to expand the latent space. Subsequently, the generated molecules are screened using Lipinski's five rules, TPSA, and SA scoring to remove invalid molecules that do not meet the requirements of drug properties. Finally, a Bloom filter is used for repetitive filtering to construct a virtual compound library with diverse structures and controllable quality.
[0036] 2. The method of this invention, through multi-attribute constraint design within a reinforcement learning framework, organically integrates molecular structure generation, property control, and diversity optimization, effectively improving the druggability and chemical space coverage of the generated molecules. The introduced fragment reward mechanism and latent space reward mechanism enhance the model's ability to identify and generate novel molecules, reduce molecular redundancy, and optimize the quality of molecule generation. Simultaneously, the fixed-step phased training strategy ensures the stability of model convergence and the orderly switching of tasks. Ultimately, the virtual compound library constructed by this invention exhibits novel structures, good druggability, and wide distribution, and can be widely applied in multi-target, multi-task virtual screening processes. This not only reduces the computational cost of molecule generation but also provides high-quality candidate molecules for subsequent drug screening and experimental validation. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart of the molecular generation method based on multi-attribute constraints of the present invention;
[0039] Figure 2 This is a flowchart of the reinforcement learning phase of this invention. Detailed Implementation
[0040] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0041] Example 1
[0042] like Figure 1 As shown, a molecular generation method based on multi-attribute constraints includes the following steps:
[0043] Step S100: Use REINVENT4 as the molecular generation framework to build a pre-trained model;
[0044] REINVENT4 was selected as the basic generation framework, and the pre-trained model file was loaded. Molecular generation parameters and environment variables were set, a decoder module for molecular generation was built, and its corresponding vocabulary and SMILES encoder were loaded. The generator and scoring interface were built to complete the model initialization preparation.
[0045] Pre-trained models include:
[0046] The encoder module is responsible for converting the input SMILES molecular expression into a vector representation in the latent space and extracting the structural features of the molecule.
[0047] Decoder module: Receives the latent vector output by the encoder and generates the SMILES string step by step through an autoregressive mechanism to achieve the synthesis of molecular structures.
[0048] Vocabulary module: Used to define the characters and combinations allowed in SMILES expressions. It must remain fixed during both model training and inference phases to ensure that the generation process conforms to chemical rules.
[0049] Prior Model: Trained on a large-scale molecular database using an unsupervised learning teacher-forced strategy, it learns the grammar and structural distribution of SMILES and serves as the foundational model before reinforcement learning.
[0050] The Generator module is used to sample latent vectors from the latent space and generate new molecules. It supports strategies such as multinomial sampling and beam search, taking into account both molecular diversity and structural rationality.
[0051] Scoring Interface Module: Connects to external scoring functions to evaluate generated molecules in dimensions such as activity, drug-likeness, and physicochemical properties, providing reward feedback for reinforcement learning.
[0052] The modules mentioned above exchange information through SMILES expressions and latent vectors to jointly complete the tasks of molecular characterization and generation.
[0053] The inputs to a pre-trained model include: The training and operation of a pre-trained model depends on various input data and parameter configurations, specifically including the following:
[0054] The SMILES expression dataset serves as the core input for training models to learn molecular structural rules. It typically originates from large, publicly available molecular databases such as ZINC and ChEMBL. The obtained SMILES expressions undergo preprocessing operations such as standardization, removal of illegal characters, and cleaning of duplicates to ensure grammatical validity and structural effectiveness. This dataset not only provides structural samples for the model but also serves to build the vocabulary module.
[0055] Vocabulary: Automatically generated from the SMILES expressions in the training set during the preprocessing stage, it contains all atomic symbols, bond types, and combinations that the model can recognize. The vocabulary remains fixed during the training and inference stages, serving as a reference standard for the generation of the decoder module.
[0056] Model structure and parameter configuration: including structural parameters such as the hidden layer dimension, embedding layer size, and latent space dimension of the encoder and decoder, which are used to define the basic computational graph structure of the model.
[0057] Training hyperparameter configurations include: Batch Size: the number of training samples used in each iteration, affecting the model's learning speed and stability; Learning Rate: controls the magnitude of parameter updates; Epochs: defines the number of times the training set is fully traversed during training.
[0058] Loss function configuration: Negative log-likelihood (NLL) is used as the main loss term, and KL divergence can be added as a regularization term to restrict the distribution shape of the latent space.
[0059] SMILES randomization setting: Enabling SMILES randomization enhances the model's ability to learn different representations of the same molecule, which helps improve the model's generalization performance.
[0060] Initialization data (Inception Memory): Used to initialize the memory mechanism during the reinforcement learning phase. A set of representative high-resolution molecule SMILES expressions can be input in advance to guide the model to prioritize the exploration of high-quality structural regions.
[0061] The above-mentioned inputs are usually centrally managed through configuration files (such as TOML or JSON format), and parsing and import operations are completed by predefined data loaders and preprocessing scripts, providing a unified and standard data interface for model training and inference.
[0062] Step S200: Using the SrIOP (Single-model Recurrent Iterative Optimization Procedure) strategy, the entire reinforcement learning training process of the pre-trained model is divided into multiple stages, and M training steps are fixed in each stage.
[0063] Based on the complexity of the optimization objective, the reinforcement learning process is divided into N stages, each with different property constraints. In each stage, M training steps are fixed to control the uniqueness and distribution balance of molecule sampling. After the stage ends, the performance of molecules in terms of druggability and diversity is evaluated, and the optimization objectives of subsequent stages are dynamically adjusted.
[0064] Step S300: During the reinforcement learning training process, key indicators of drug-likeness are set as basic optimization objectives, and fragment reward mechanism and potential vector density reward mechanism are introduced respectively to guide the model to generate molecules with novel structures.
[0065] like Figure 2 As shown, the specific process of step S300 includes:
[0066] Step S301: During the reinforcement learning process, set four key indicators of drug development: molecular weight, octanol-water partition coefficient (LogP), number of hydrogen bond donors (HBD), and number of hydrogen bond acceptors (HBA) as basic optimization targets to guide the model to generate molecules with good drug development potential and reasonable structure.
[0067] The specific explanations of the four key indicators of drug efficacy mentioned above are as follows:
[0068] Molecular weight: Molecular weight refers to the sum of the total atomic masses of a molecule and is an important indicator for assessing the size and transport capacity of drug molecules.
[0069] Octyl alcohol-water partition coefficient (LogP): LogP represents the logarithm of the partition coefficient between octanol and water, and is used to measure the hydrophobicity of a molecule.
[0070] Hydrogen bond donor number (HBD): Hydrogen bond donors refer to functional groups in a molecule that can form hydrogen bonds with acceptors through hydrogen atoms;
[0071] Hydrogen bond acceptor number (HBA): A hydrogen bond acceptor is a highly electronegative atom that can form a hydrogen bond with a donor.
[0072] Step S302: Introduce a fragment reward mechanism based on structural diversity, combining ECFP (Extended-Connectivity Fingerprint) fragment novelty, Murcko backbone structure reward and whole-molecule similarity penalty to guide the diversity of generated molecules from multiple structural levels, thereby improving the structural novelty and chemical spatial coverage of molecules.
[0073] Step S303: The kNN method is used to evaluate the density of the latent vectors of the molecules generated by the model, identify sparse regions in the latent space, and give higher rewards to molecules in sparse regions to guide the model to explore the uncovered regions in the latent space first, thereby improving the diversity and structural innovation of the generated molecules.
[0074] Step S400: Generate molecules using the model trained by reinforcement learning, and screen the molecules using Lipinski rules, TPSA and SA scores to retain molecules with development potential;
[0075] Molecular sampling is performed using the trained model, and the sampled molecules are then evaluated and screened based on their properties. The screening process includes:
[0076] Basic physicochemical properties were calculated, including molecular weight, octanol-water partition coefficient (LogP), number of hydrogen bond donors (HBD), number of hydrogen bond acceptors (HBA), and number of rotatable bonds. Molecules meeting the drug-likeness requirements were screened according to Lipinski's rules. At the same time, the topological polar surface area (TPSA) value was calculated to assess membrane permeability, and the synthetic feasibility score (SA Score) was calculated to assess synthetic feasibility. Molecules that simultaneously met the above conditions were retained as candidates for inclusion in the library.
[0077] The specific explanations of the number of rotatable keys, TPSA value, and SA Score mentioned above are as follows:
[0078] Rotatable Bonds: Rotatable bonds refer to the number of single bonds in a molecule that can rotate freely, usually excluding intracyclic bonds, terminal groups, or double bonds connected to heavy atoms.
[0079] Topological polar surface area (TPSA): Polar surface area refers to the total surface area of all polar atoms (mainly oxygen and nitrogen) and their connected hydrogen atoms in a molecule. It is an important indicator for measuring the ability of a molecule to pass through biological membranes.
[0080] Synthesis Feasibility Score (SA Score): The SA Score is used to assess the difficulty of synthesizing a molecule. The score ranges from 1 to 10, with a lower score indicating that it is easier to synthesize.
[0081] Step S500: Remove duplicate molecules using a Bloom filter to construct a virtual compound database;
[0082] The structures of the selected molecules (SMILES) are fed into a Bloom filter for hash deduplication. Duplicate molecules are discarded, while new molecules are written to the virtual compound database.
[0083] Based on a similar inventive concept, embodiments of the present invention also provide a computer storage medium storing a readable program that, when run by a processor, can execute the aforementioned molecular generation method based on multi-attribute constraints.
[0084] Based on a similar inventive concept, this invention provides an electronic device, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus.
[0085] The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the above-described molecular generation method based on multi-attribute constraints.
[0086] Based on a similar inventive concept, embodiments of the present invention also provide a computer program product, including computer instructions, which instruct a computing device to perform the operations corresponding to the above-described molecular generation method based on multi-attribute constraints.
[0087] Example 2
[0088] In this embodiment, the method of the present invention will be described in detail through specific examples;
[0089] A molecular generation method based on multi-attribute constraints specifically includes the following steps:
[0090] Step S100: Load the REINVENT4 pre-trained model to prepare the molecular generation infrastructure.
[0091] Step S100 includes the following specific steps:
[0092] Select REINVENT4 as the basic generation framework, load the pre-trained model file; set the molecular generation parameters and environment variables, initialize the SMILES representation; build the generator and scoring interface, and complete the model initialization preparation.
[0093] Step S200: Using the SrIOP strategy, the entire training process is divided into multiple stages, and 1000 training steps are fixed in each stage.
[0094] Step S200 includes the following specific steps:
[0095] Based on the complexity of the optimization objective, the reinforcement learning process is divided into three stages, each with different property constraints. In each stage, 1000 training steps are fixed to control the uniqueness and distribution balance of molecule sampling. After the stage ends, the performance of molecules in terms of druggability and diversity is evaluated, and the optimization objectives of subsequent stages are dynamically adjusted.
[0096] Step S300: In the reinforcement learning phase, optimization goals are set to enhance molecular diversity and drug-likeness.
[0097] Combination Figure 2 Step S300 includes the following specific steps:
[0098] Step S301: During the reinforcement learning training process, four key indicators of druggability—Molecular Weight, LogP, HBD, and HBA—are set as basic optimization objectives to guide the model in generating molecules with good drug development potential and reasonable structures. This includes the following specific content:
[0099] First, following the phased optimization process in step S200, the SrIOP strategy is adopted to divide the entire reinforcement learning training process into three phases, with a fixed training duration of 1000 steps in each phase. This strategy effectively controls the uniqueness and distribution balance of molecule sampling, ensuring that the generated molecules are representative and structurally diverse across different training phases. Next, based on the complexity of the optimization objective, different property constraint ranges are set for each of the three phases to expand chemical space coverage in the early stages and improve structural convergence and druggability in the later stages.
[0100] The three-stage attribute constraint range settings are shown in Table 1 below:
[0101] Table 1. Specific parameters in each stage of reinforcement learning.
[0102] stage molecular weight fat soluble hydrogen bond donor hydrogen bond acceptor Phase 1 [250,600] [0,6] [0,8] [0,15] Phase Two [300,550] [0,5.5] [0,6] [0,12] Phase Three [350,500] [0,5] [0,5] [0,10]
[0103] Finally, after each stage, the generated molecules are evaluated to comprehensively assess their compliance rate with druggability indicators and their structural diversity distribution. Based on the evaluation results, the system dynamically adjusts the optimization objectives for subsequent stages to enhance the adaptability of the training process and the stability of molecule generation, ensuring that the final compound library possesses both development potential and structural innovation.
[0104] Step S302: Introduce a fragment reward mechanism based on structural diversity. This mechanism combines ECFP fragment novelty, Murcko backbone structure rewards, and whole-molecule similarity penalties to guide the diversity of generated molecules at multiple structural levels, thereby enhancing the structural novelty and chemical spatial coverage of the molecules. This includes the following specific components:
[0105] First, the Morgan fingerprint is extracted from the generated molecular structure using the RDKit tool, represented as a fragment set {f1, f2, ..., f...}. n These fragments encode local structural information of the molecule, helping to measure the structural novelty of the molecule. Subsequently, based on the frequency of occurrence of each fragment statistically within a historical sliding window, freq(f) is used to... i ), calculate the average fragment novelty score of the current molecule:
[0106]
[0107] Where n is the number of fragments in the current molecule, α frag To regulate the hyperparameter of the fragment reward's influence, this score encourages the model to generate relatively novel molecules in the fragment space.
[0108] Next, the Murcko skeleton structure S of the molecule is extracted, and it is determined whether it belongs to the previously generated skeleton set H. scaffold If it is a new skeletal structure, that is... An additional reward will be given:
[0109]
[0110] Where, α scf Hyperparameters that reward the skeleton are used to drive the model to discover new molecular structures.
[0111] To prevent excessive concentration of generated structures, a molecular-level structural novelty penalty mechanism is introduced. This involves using the ECFP fingerprint of the current molecule. fingerprint set of historically generated molecules Perform Tanimoto similarity comparison and calculate the average similarity:
[0112]
[0113] And based on this, the penalty factor is defined as follows:
[0114] s penalty =1-sim avg
[0115] In other words, the higher the average similarity, the stronger the penalty, to prevent the model from oscillating around historical structures. Finally, considering the above factors, the structural diversity reward score is defined as follows:
[0116] score final =(s frag +s scf )·s penalty
[0117] The scoring mechanism dynamically updates the fragment frequency table, skeleton set, and fingerprint cache during the generation process to adapt to changes in the model generation state.
[0118] Ultimately, through this multi-scale fragment reward mechanism, the model can achieve diverse regulation at the fragment, backbone, and whole molecular structure levels, thereby effectively improving the structural innovation of molecules and the breadth of chemical space exploration, reducing the risk of structural redundancy, and enhancing the practical application value of virtual molecular libraries.
[0119] Step S303: The kNN method is used to evaluate the density of the latent vectors of the molecules generated by the model, identify sparse regions in the latent space, and assign higher rewards to molecules in sparse regions to guide the model to prioritize exploring uncovered areas in the latent space, thereby improving the diversity and structural innovation of the generated molecules. This includes the following specific content:
[0120] First, a pre-trained REINVENT generative model is loaded as a prior network, and its encoder module is used to convert the input molecular SMILES expressions into fixed-dimensional latent vectors. These vectors represent the implicit semantic features of the molecules, capturing the intrinsic differences in molecular structure for subsequent density analysis. Next, a density evaluation model based on k-Nearest Neighbors (kNN) is established. This model uses the latent vectors of historically generated molecules as a reference set and calculates the average distance between the currently generated molecule and these vectors in the latent space. Molecules with larger distances are located in sparse regions, representing novel or unexplored chemical spaces, while those with smaller distances belong to known or high-density regions.
[0121] The potential density is then calculated using the following method:
[0122]
[0123] Where d i This represents the Euclidean distance between the current molecule and its k nearest neighbor latent vectors. The log operation is used to scale the density values, enhancing the diversity of distribution. Then, the calculated density values are standardized to the minimum and maximum density range recorded in the dynamic sliding window, and mapped to reward scores using linear interpolation. Sparse regions (low density) correspond to higher rewards, and dense regions (high density) correspond to lower rewards.
[0124]
[0125] Where r min and r max These are the lower and upper limits of the reward for molecules in dense and sparse regions, respectively (default values are 0.1 and 1.0).
[0126] In the early stages of the model or before a reference vector library is established, all molecules are treated as new molecules in the latent space and given a high initial reward to encourage exploration. During training, as molecules are generated and the reference library is gradually enriched, the kNN model is dynamically updated, and the density estimation results become more representative.
[0127] Finally, this reward mechanism guides the generative model to actively explore uncovered regions by assigning higher scores to molecules in potentially sparse regions, thereby enhancing structural innovation and chemical spatial coverage, and avoiding getting trapped in local optima of known structures.
[0128] Step S400: Use the Lipinski five rules, TPSA and SA scores to screen molecules and retain those with development potential.
[0129] Execution step S400 includes the following specific steps:
[0130] Molecular sampling was performed using the reinforcement learning model trained in step S300. The sampled molecules were then evaluated for their properties, and their basic physicochemical indices were calculated, including molecular weight, octanol-water partition coefficient (LogP), number of hydrogen bond donors (HBD), number of hydrogen bond acceptors (HBA), and number of rotatable bonds. Molecules meeting the druggability requirements were screened according to the Lipinski rule. At the same time, the topological polar surface area (TPSA) value was calculated to assess membrane permeability, and the synthetic feasibility score (SA Score) was calculated to assess synthetic feasibility. Molecules that simultaneously met the above conditions were retained as candidates for inclusion in the library.
[0131] The molecular screening conditions and constraints are shown in Table 2 below:
[0132] Table 2 Molecular screening conditions and constraints
[0133]
[0134] Step S500: Remove duplicate molecules using a Bloom filter to construct a virtual compound database.
[0135] The structures of the selected molecules (SMILES) are fed into a Bloom Filter for hash deduplication. Duplicate molecules are discarded, while new molecules are written to the virtual compound database.
[0136] Example 3
[0137] Based on the molecular generation method based on multi-attribute constraints proposed in Example 1, this example proposes a molecular generation device based on multi-attribute constraints, specifically including:
[0138] Model building module: Using REINVENT4 as the molecular generation infrastructure, a pre-trained model is built;
[0139] Stage division module: The SrIOP strategy is adopted to divide the entire reinforcement learning training process of the pre-trained model into multiple stages, and M training steps are fixed in each stage;
[0140] Reinforcement training module: During the reinforcement learning training process, key indicators of drug-likeness are set as basic optimization objectives, and fragment reward mechanism and potential vector density reward mechanism are introduced respectively to guide the model to generate molecules with novel structures;
[0141] Molecular screening module: Generates molecules using a model trained by reinforcement learning, and screens molecules using Lipinski rules, TPSA and SA scores;
[0142] Molecular deduplication module: Removes duplicate molecules using a Bloom filter to build a virtual compound database.
[0143] The methods of the present invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored on a remote recording medium or a non-transitory machine-readable medium and subsequently stored on a local recording medium, downloaded via a network. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses the code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for performing the methods shown herein.
[0144] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.
Claims
1. A method for molecule generation based on multi-attribute constraints, characterized in that, The method comprises the following steps: a pre-training model is constructed by taking REINVENT4 as a molecular generation infrastructure; an SrIOP strategy is adopted to divide the whole reinforcement learning training process of the pre-training model into multiple stages, and M steps are fixed in each stage; in the reinforcement learning training process, key indicators of drugability are set as basic optimization targets, and a fragment reward mechanism and a latent vector density reward mechanism are introduced respectively to guide the model to generate novel molecules; molecules are generated by using the model trained by reinforcement learning, and the molecules are screened by using Lipinski rules, topological polar surface area, and synthetic feasibility score; repeated molecules are removed by Bloom Filter to construct a virtual compound database.
2. The method of claim 1, wherein, The key indicators of drugability include molecular weight, octanol-water partition coefficient, number of hydrogen bond donors, and number of hydrogen bond acceptors.
3. The method of claim 1, wherein, The fragment reward mechanism combines ECFP fragment novelty, Murcko skeleton structure reward, and whole molecule similarity penalty to guide the diversity of the generated molecules from multiple structural levels.
4. The method of claim 1, wherein, The content of the latent vector density reward mechanism includes: using a kNN method to evaluate the density of the latent vector of the molecule generated by the model, identifying the sparse area in the latent space, giving higher rewards to the molecules in the sparse area, and guiding the model to preferentially explore the uncovered areas in the latent space.
5. The method of claim 1, wherein, The process of screening the molecules comprises: 1) calculating the molecular weight, octanol-water partition coefficient, number of hydrogen bond donors, number of hydrogen bond acceptors, and number of rotatable bonds of the molecule, and screening the molecules meeting the drugability requirements according to Lipinski rules; 2) calculating the topological polar surface area to evaluate the membrane permeability; 3) calculating the synthetic feasibility score to evaluate the synthetic feasibility; 4) retaining the molecules meeting the conditions of 1)-3) as in-database candidates.
6. The method of claim 1, wherein, The process of removing repeated molecules by Bloom Filter comprises: inputting the SMILES structure of the screened molecules into Bloom Filter for hash judgment, discarding the repeated molecules, and writing the new molecules into the virtual compound database.
7. A device for generating molecules based on multi-attribute constraints, characterized in that, It comprises: a model construction module: a pre-training model is constructed by taking REINVENT4 as a molecular generation infrastructure; a stage division module: an SrIOP strategy is adopted to divide the whole reinforcement learning training process of the pre-training model into multiple stages, and M steps are fixed in each stage; a reinforcement training module: in the reinforcement learning training process, key indicators of drugability are set as basic optimization targets, and a fragment reward mechanism and a latent vector density reward mechanism are introduced respectively to guide the model to generate novel molecules; a molecule screening module: molecules are generated by using the model trained by reinforcement learning, and the molecules are screened by using Lipinski rules, topological polar surface area, and synthetic feasibility score; a molecule deduplication module: repeated molecules are removed by Bloom Filter to construct a virtual compound database.
8. A computer storage medium storing a readable program, characterized in that, When the program runs, the program can instruct a computing device to perform a molecular generation method based on multiple attribute constraints as claimed in any one of claims 1-6.
9. An electronic device, comprising: It comprises: The processor, the memory and the communication interface complete communication with each other through the communication bus. The memory is used for storing at least one executable instruction, and the executable instruction makes the processor execute the operation corresponding to the method for generating molecules based on multiple attribute constraints according to any one of claims 1-6.
10. A computer program product comprising computer instructions, characterized in that, The computer instruction instructs the computing device to execute the operation corresponding to the method for generating molecules based on multiple attribute constraints according to any one of claims 1-6.