Molecular generation and optimization method and system based on three-dimensional geometric perception
By using molecular graph generation and reinforcement learning optimization methods, the problem that molecular generation in existing technologies cannot accurately characterize three-dimensional geometric conformations has been solved, achieving more efficient and accurate drug molecule generation and improving the effectiveness of drug design.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN TECH UNIV
- Filing Date
- 2026-04-13
- Publication Date
- 2026-05-12
AI Technical Summary
Existing molecular generation techniques rely on two-dimensional representations, which make it difficult to accurately characterize the three-dimensional geometric conformation of molecules and the spatial distribution of pharmacophores, resulting in insufficient applicability and accuracy of generated molecules in real drug design tasks.
By obtaining the original SMILES sequence, a three-dimensional dominant conformation is generated, and a molecular map containing atom type, chemical bond type, and atom three-dimensional coordinates is constructed. Then, by using a latent space generation model and an actor and critic policy network optimized by reinforcement learning, the output is updated latent vector, and finally decoded into the SMILES sequence.
It improves the accuracy and applicability of molecule generation, making the molecular features learned by the model more consistent with the binding rules between molecules and target proteins in actual drug development, and enhances the chemical effectiveness and stability of the generated molecules.
Smart Images

Figure CN122024914A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of drug molecule generation technology, and in particular to a method and system for molecule generation and optimization based on three-dimensional geometry perception. Background Technology
[0002] Molecular generation is a key technology in the field of AI-assisted drug design. It automatically constructs small molecule compounds with specific structures or properties through computational models. Compared with the traditional drug development process that relies on human experience and experimental screening, molecular generation methods can analyze existing molecular data to establish a mapping relationship between molecular structure and chemical properties, thereby efficiently generating potential candidate molecules in a vast chemical space.
[0003] Current molecular generation technology mainly relies on the two-dimensional representation of molecules and achieves automated molecular design through various deep learning models. These methods establish a mapping relationship between molecular structure and chemical properties by learning from existing molecular data, thereby generating new molecular structures in computers. They can also be combined with reinforcement learning or gradient optimization strategies to achieve targeted optimization of specific molecular properties. Theoretically, they can explore a wide range of chemical spaces and, to some extent, replace traditional experimental screening, improving the efficiency of drug lead compound discovery.
[0004] However, the two-dimensional representations that existing molecular generation techniques rely on are insufficient to accurately depict the three-dimensional geometric conformation of molecules and the spatial distribution of pharmacophores. The three-dimensional structure of a molecule directly determines its binding mode with target proteins and its biological activity. Ignoring spatial information limits the applicability and accuracy of generated molecules in real drug design tasks.
[0005] Molecules represented by discrete symbols lack continuous differentiable structures during the generation process, which can easily lead to problems such as large gradient variance, unstable training, and slow convergence during reinforcement learning optimization. Furthermore, invalid molecules with syntax errors or that do not conform to the rules of chemical valence bonds often appear during the generation stage. This not only reduces the efficiency of molecule generation but also prevents subsequent processes such as molecule docking, property prediction, and virtual screening from proceeding normally, thus affecting the overall system's engineering usability and stability. The latent variable generation model based on variational autoencoder has strong randomness in the sampling and decoding process. The same latent representation may yield different molecular structures after multiple decodings. The generation results lack consistency and repeatability, making it difficult to achieve a stable and controllable molecular generation process, which in turn affects the reliability of the model in practical applications. When reinforcement learning searches in a latent space lacking effective constraints, the model parameters tend to gradually deviate from the pre-training distribution, leading to distortion or even failure of generated samples, and a significant decrease in overall generation quality and reliability. Furthermore, existing methods generally lack constraints on the stability of the latent space and the consistency of generation, further amplifying the random fluctuations in the generation results, making it difficult for existing technologies to achieve stable, controllable, and chemically reasonable optimization of molecular properties.
[0006] Therefore, existing technologies still need improvement and development. Summary of the Invention
[0007] The technical problem to be solved by the present invention is to provide a molecular generation and optimization method and system based on three-dimensional geometry perception, which addresses the above-mentioned defects of the prior art. The aim is to solve the problem that the two-dimensional representation form relied upon by the existing molecular generation technology is difficult to accurately characterize the three-dimensional geometric conformation of molecules and the spatial distribution of pharmacophores, resulting in low applicability and accuracy of generated molecules in real drug design tasks.
[0008] The technical solution adopted by this invention to solve the problem is as follows: In a first aspect, embodiments of the present invention provide a molecular generation and optimization method based on three-dimensional geometry perception, the method comprising: Obtain the original SMILES sequence, and generate a molecular map based on the three-dimensional dominant conformation corresponding to the original SMILES sequence; the node features of the molecular map are used to reflect the atom type, the edge attributes are used to reflect the chemical bond type, and the node coordinates are used to reflect the three-dimensional coordinates of the atom. The spatial relationships between atoms are modeled based on the composite tensor corresponding to the molecular diagram using a pre-trained latent space generation model, and the latent vector is obtained after latent space reparameterization. The actor and critic policy network, optimized through reinforcement learning, is used to update the latent points by outputting actions based on the latent vectors, thus obtaining the updated latent vectors. The SMILES sequence is obtained by decoding the updated latent vector.
[0009] In one embodiment, the step of generating a molecular map based on the three-dimensional dominant conformation corresponding to the original SMILES sequence includes: The original SMILES sequence is standardized and discrete symbol encoded to obtain a fixed-length discretized tensor; The three-dimensional dominant conformation is determined based on the fixed-length discretized tensor, and molecular point cloud data is constructed based on the three-dimensional dominant conformation. The molecular map is constructed based on the molecular point cloud data.
[0010] In one implementation, the step of determining a three-dimensional dominant conformation based on the fixed-length discretized tensor and constructing molecular point cloud data based on the three-dimensional dominant conformation includes: A three-dimensional initial configuration is generated based on the fixed-length discretized tensor using a distance geometry algorithm; The initial three-dimensional conformation is geometrically optimized and its energy minimized using the MMFF94 force field, and the conformation with the lowest energy is selected as the dominant three-dimensional conformation. Based on the aforementioned three-dimensional dominant conformation, the three-dimensional Cartesian coordinates and atom type information of atoms are extracted to construct the molecular point cloud data.
[0011] In one implementation, the latent space generation model includes: A geometry-aware graph encoder is used to model the spatial relationships between atoms based on the composite tensor corresponding to the molecular graph, and obtain a global latent representation. The reparameterization module is used to predict the mean and variance of the latent distribution based on the global latent representation using several linear layers, and to obtain the latent vector by sampling through reparameterization technology. A sequence generator decoder is used to decode the input latent vector into the corresponding SMILES sequence; An auxiliary attribute predictor is used to predict molecular properties from an input latent vector, thus obtaining the predicted molecular properties.
[0012] In one implementation, the pre-training step of the latent space generation model includes: Use the original SMILES sequence for training as the original training SMILES sequence; A training molecule map is generated based on the three-dimensional dominant conformation corresponding to the original training SMILES sequence; The geometric perception graph encoder models the spatial relationships between atoms based on the composite tensor corresponding to the training molecular graph, thereby obtaining the training global latent representation. The reparameterization module uses several linear layers to predict the mean and variance of the latent distribution based on the trained global latent representation, and obtains the first training latent vector by sampling through reparameterization technology. The sequence generation decoder is used to decode the first training latent vector into the corresponding SMILES sequence; An auxiliary attribute predictor is used to predict the molecular properties of the first training latent vector to obtain the corresponding predicted molecular properties. The reconstruction loss is calculated based on the original training SMILES sequence and the SMILES sequence, and the attribute loss is calculated based on the predicted molecular properties and standard molecular properties corresponding to the first training latent vector. The latent space generation model is pre-trained based on the reconstruction loss and the attribute loss to obtain the pre-trained latent space generation model.
[0013] In one implementation, the reinforcement learning optimization steps of the actor and critic policy network include: The original SMILES sequence used for training is used as the original training SMILES sequence, and the latent vector output by the pre-trained latent space generation model based on the original training SMILES sequence is used as the second training latent vector. By using the policy branches in the actor and critic policy network, the action update latent point is output according to the second training latent vector to obtain the training update latent vector; The effect of the action is evaluated by updating the latent vectors based on the training through the value branches in the actor and critic policy network, and the policy branches are optimized. The latent vectors corresponding to the training and update latent vectors are decoded into SMILES sequences and rewards are calculated. Empirical data consisting of latent vector states, actions, and rewards are collected through multi-step interactions between latent vector states and actions. The actor and critic policy network is then optimized based on the empirical data using a proximal policy optimization algorithm.
[0014] In one implementation, when optimizing the actor and critic policy network based on the empirical data using a proximal policy optimization algorithm, the probability ratio of the new policy to the old policy is subject to pruning restrictions. The composite reward function used to calculate rewards includes a weighted fusion property reward term, a self-consistent reward term, and a latent space constraint penalty term.
[0015] In one implementation, after the step of decoding based on the updated latent vector to obtain the SMILES sequence, the method further includes: The molecular structure of the SMILES sequence is validated, standardized, and deduplicated to obtain the target SMILES sequence. Several evaluation indicators are used to score and screen target SMILES sequences obtained based on multiple original SMILES sequences; the evaluation indicators include at least one of the following: chemical efficacy, uniqueness, structural diversity, drug similarity, and synthetic feasibility. Target candidates were determined based on the scoring and screening results.
[0016] Secondly, embodiments of the present invention also provide a molecular generation and optimization system based on three-dimensional geometry perception, the system comprising: The molecular characterization and preprocessing module is used to obtain the original SMILES sequence and generate a molecular map based on the three-dimensional dominant conformation corresponding to the original SMILES sequence. The node features of the molecular map are used to reflect the atom type, the edge attributes are used to reflect the chemical bond type, and the node coordinates are used to reflect the three-dimensional coordinates of the atom. The latent space module is used to model the spatial relationships between atoms based on the composite tensor corresponding to the molecular diagram using a pre-trained latent space generation model, and obtain the latent vector after latent space reparameterization. The reinforcement learning optimization module is used to update the latent points by outputting actions based on the latent vectors through the actor and critic policy network optimized by reinforcement learning, thereby obtaining the updated latent vectors. The sequence generation decoder, located in the latent space generation model, is used to decode based on the updated latent vector to obtain the SMILES sequence.
[0017] Thirdly, embodiments of the present invention also provide a computer-readable storage medium storing a plurality of instructions adapted to be loaded and executed by a processor to implement the steps of the molecular generation and optimization method based on three-dimensional geometry perception as described above.
[0018] The beneficial effects of this invention are as follows: Based on the original SMILES sequences, this invention generates their corresponding three-dimensional dominant conformations and constructs a molecular diagram containing atom types, chemical bond types, and atomic three-dimensional coordinates, which is then encapsulated as a composite tensor as model input. This overcomes the limitation of two-dimensional representations in accurately depicting the three-dimensional structure of molecules, and solves the problem of insufficient applicability and accuracy of generated molecules in real drug design due to the neglect of spatial information. This allows the molecular features learned by the model to better align with the binding patterns of molecules and target proteins in actual drug development. Attached Figure Description
[0019] 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, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic flowchart of the molecular generation and optimization method based on three-dimensional geometry perception provided in the embodiments of the present invention.
[0021] Figure 2 This is a schematic diagram of the principle of the geometric sensing map encoder provided in the embodiment of the present invention.
[0022] Figure 3 This is a schematic diagram of the near-end strategy optimization process provided in an embodiment of the present invention.
[0023] Figure 4 This is a schematic diagram of the structural self-consistency verification and multi-objective reward process provided in the embodiments of the present invention.
[0024] Figure 5This is a schematic diagram of the technical framework of the molecular generation and optimization method based on three-dimensional geometry perception provided in the embodiments of the present invention.
[0025] Figure 6 This is a schematic diagram of the module of the molecular generation and optimization system based on three-dimensional geometry perception provided in the embodiments of the present invention.
[0026] Figure 7 This is a schematic diagram of the terminal provided in the embodiment of the present invention. Detailed Implementation
[0027] This invention discloses a method and system for molecular generation and optimization based on three-dimensional geometry perception. To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention.
[0028] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0029] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0030] To address the aforementioned shortcomings of existing technologies, this invention provides a molecular generation and optimization method based on three-dimensional geometry perception. The method acquires the original SMILES sequence and generates a molecular graph based on the corresponding three-dimensional dominant conformation. The node features of the molecular graph reflect the atom type, edge attributes reflect the chemical bond type, and node coordinates reflect the three-dimensional coordinates of the atoms. A pre-trained latent space generation model models the spatial relationships between atoms based on the composite tensor corresponding to the molecular graph, and obtains latent vectors after latent space reparameterization. An actor-critic policy network optimized through reinforcement learning updates latent points by outputting actions based on the latent vectors, resulting in updated latent vectors. The updated latent vectors are then decoded to obtain the SMILES sequence. This invention uses the original SMILES sequence as a foundation to generate its corresponding three-dimensional dominant conformation and constructs a molecular graph containing atom type, chemical bond type, and atomic three-dimensional coordinates, which is then encapsulated as a composite tensor as model input. This overcomes the limitation of two-dimensional representation in accurately depicting the three-dimensional structure of molecules, solves the problem of insufficient applicability and accuracy of generated molecules in real drug design due to the neglect of spatial information, and makes the molecular features learned by the model more consistent with the binding rules between molecules and target proteins in actual drug development.
[0031] like Figure 1 As shown, the method specifically includes the following steps: Step S100: Obtain the original SMILES sequence and generate a molecular map based on the three-dimensional dominant conformation corresponding to the original SMILES sequence; the node features of the molecular map are used to reflect the atom type, the edge attributes are used to reflect the chemical bond type, and the node coordinates are used to reflect the three-dimensional coordinates of the atom.
[0032] Specifically, the first step is to select a data source for model training and validation. For example, the QM9 small molecule dataset can be chosen. This dataset contains quantum chemical properties and three-dimensional geometric structure information of approximately 134,000 stable organic small molecules, covering multi-dimensional data such as molecular spatial conformation, energy, and electronic characteristics, providing reliable basic data for three-dimensional geometry-aware molecular generation models. Since the original data in this dataset is stored as SMILES strings, and given that SMILES only provides one-dimensional topological connections, it is difficult to reflect the three-dimensional spatial conformation information of molecules and cannot meet the requirements of geometry-aware modeling. Therefore, the original SMILES sequences are obtained from this dataset. Then, based on the molecular three-dimensional geometric structure information contained in the dataset itself, three-dimensional dominant conformations are extracted and generated for the molecules corresponding to the original SMILES sequences. A molecular map integrating molecular topological features and three-dimensional geometric features is constructed through these three-dimensional dominant conformations to compensate for the deficiency that the original SMILES sequences can only reflect one-dimensional molecular topological connections.
[0033] In one implementation, the step of generating a molecular map based on the three-dimensional preferred conformation corresponding to the original SMILES sequence includes: The original SMILES sequence is standardized and discrete symbol encoded to obtain a fixed-length discretized tensor; The three-dimensional dominant conformation is determined based on the fixed-length discretized tensor, and molecular point cloud data is constructed based on the three-dimensional dominant conformation. The molecular map is constructed based on the molecular point cloud data.
[0034] Specifically, in the data preprocessing stage, the original SMILES sequences are first standardized (also known as normalization) to eliminate multiple writing forms of isomers and remove illegal or redundant structures, thus ensuring the consistency of the input representation. Then, based on chemical syntax rules, the standardized SMILES sequences are segmented, converting atomic symbols, bond types, and ring markers into independent tokens. A vocabulary is built, and the tokens are mapped to integer index sequences. Start and end symbols are added to these integer index sequences, and the length of all sequences is unified through padding or truncation operations, forming a fixed-length discretized tensor. This fixed-length discretized tensor, as the standardized sequence representation, becomes the supervision target of the subsequent decoder, ensuring the grammatical validity and chemical validity of the generated molecules. After obtaining the fixed-length discretized tensor, the three-dimensional dominant conformation corresponding to the original SMILES sequences is determined, and molecular point cloud data that accurately reflects the three-dimensional geometric features of the molecules is constructed. Finally, a molecular graph (also known as a molecular graph structure representation) is constructed based on the molecular point cloud data. This molecular graph, as a three-dimensional spatial representation, together with the aforementioned fixed-length discretized tensor, constitutes a bimodal input form. It provides reliable basic data for subsequent potential spatial generation models to model the spatial relationships between atoms based on the molecular graph, and can effectively make up for the characterization defects of the original SMILES sequence.
[0035] In one implementation, the step of determining a three-dimensional dominant conformation based on the fixed-length discretized tensor and constructing molecular point cloud data based on the three-dimensional dominant conformation includes: A three-dimensional initial configuration is generated based on the fixed-length discretized tensor using a distance geometry algorithm; The initial three-dimensional conformation is geometrically optimized and its energy minimized using the MMFF94 force field, and the conformation with the lowest energy is selected as the dominant three-dimensional conformation. Based on the aforementioned three-dimensional dominant conformation, the three-dimensional Cartesian coordinates and atom type information of atoms are extracted to construct the molecular point cloud data.
[0036] Specifically, the molecular graph can be viewed as a standardized molecular topology. To enhance the model's ability to perceive the three-dimensional structure of molecules, this embodiment uses the molecular graph to generate an initial three-dimensional conformation through a distance geometry algorithm. Then, it utilizes the MMFF94 force field for geometric optimization and energy minimization, selecting the lowest-energy dominant conformation as the representative structure, thus obtaining the dominant three-dimensional conformation. The three-dimensional Cartesian coordinates and atom type information of all atoms are extracted from this, constructing molecular point cloud data containing precise spatial geometric relationships. Subsequently, node features are constructed based on atom types, and edge features are constructed based on chemical bond types, which, together with the three-dimensional coordinates, form the molecular graph. In practical applications, a masking mechanism can also be introduced to adapt to the batch training requirements of molecules of different sizes. Finally, the molecular graph containing node features, three-dimensional coordinates, and edge attributes is uniformly encapsulated into a composite tensor for use in subsequent data processing stages.
[0037] Step S200: Using the pre-trained latent space generation model, model the spatial relationship between atoms based on the composite tensor corresponding to the molecular diagram, and obtain the latent vector after latent space reparameterization.
[0038] Specifically, the pre-trained latent space generation model transforms the 3D structure and topological information of molecules into optimizable and differentiable continuous latent vectors. Taking the composite tensor corresponding to the molecular graph as input, the pre-trained latent space generation model extracts features and models spatial relationships within this tensor. It explicitly models the spatial interactions between atoms using the relative coordinate differences between atoms, achieving a preliminary mapping from the 3D molecular structure to a continuous latent space. Subsequently, a reparameterization technique is used to sample the latent distribution, ensuring the entire latent space follows a Gaussian prior distribution, ultimately yielding continuous and differentiable latent vectors.
[0039] In one implementation, the latent space generation model includes: A geometry-aware graph encoder is used to model the spatial relationships between atoms based on the composite tensor corresponding to the molecular graph, and obtain a global latent representation. The reparameterization module is used to predict the mean and variance of the latent distribution based on the global latent representation using several linear layers, and to obtain the latent vector by sampling through reparameterization technology. A sequence generator decoder is used to decode the input latent vector into the corresponding SMILES sequence; An auxiliary attribute predictor is used to predict molecular properties from an input latent vector, thus obtaining the predicted molecular properties.
[0040] Furthermore, the pre-training steps of the latent space generation model include: Use the original SMILES sequence for training as the original training SMILES sequence; A training molecule map is generated based on the three-dimensional dominant conformation corresponding to the original training SMILES sequence; The geometric perception graph encoder models the spatial relationships between atoms based on the composite tensor corresponding to the training molecular graph, thereby obtaining the training global latent representation. The reparameterization module uses several linear layers to predict the mean and variance of the latent distribution based on the trained global latent representation, and obtains the first training latent vector by sampling through reparameterization technology. The sequence generation decoder is used to decode the first training latent vector into the corresponding SMILES sequence; An auxiliary attribute predictor is used to predict the molecular properties of the first training latent vector to obtain the corresponding predicted molecular properties. The reconstruction loss is calculated based on the original training SMILES sequence and the SMILES sequence, and the attribute loss is calculated based on the predicted molecular properties and standard molecular properties corresponding to the first training latent vector. The latent space generation model is pre-trained based on the reconstruction loss and the attribute loss to obtain the pre-trained latent space generation model.
[0041] like Figure 2 As shown, to address the problem that traditional models neglect molecular 3D spatial information and struggle to characterize key conformational features, this embodiment introduces Equivariant Graph Neural Networks (EGNNs) to jointly encode atomic properties and 3D coordinates. By using relative coordinate differences to achieve equivariant modeling of rotation and translation, it enhances the feature extraction capabilities of the molecular local geometric environment and pharmacophore spatial distribution. Specifically, the latent space generation model consists of a geometrically perceptual graph encoder, a reparameterization module, a sequence generation decoder, and an auxiliary attribute predictor. The geometrically perceptual graph encoder (also known as a geometrically equivariant graph neural network) is constructed using stacked equivariant graph convolutional layers. Its function is to receive the composite tensor corresponding to the molecular graph as input, extract node features, 3D coordinates, and edge features from this composite tensor, and process them synchronously. During information transmission, it explicitly models the spatial relationships between atoms using relative coordinate differences while maintaining rotational and translational equivariance, thereby stably extracting the 3D geometric features and topological information of the molecule. Finally, it obtains a fixed-dimensional global latent representation through a readout function, realizing the mapping from the molecular 3D structure to a continuous latent space.
[0042] The reparameterization module is used to construct the probabilistic latent space. To build a continuous, smooth, and optimizable latent space (also called the latent space), this module uses two linear layers to predict the mean and variance of the latent distribution based on the global latent representation, and employs reparameterization techniques to sample latent vectors z (also called latent variables, latent vectors, or latent variables) to make the latent space follow a Gaussian prior distribution. The continuous representation of the latent vectors allows adjacent latent points to correspond to structurally similar molecules, providing a foundation for stable search and optimization in the latent space during subsequent reinforcement learning.
[0043] The sequence generation decoder employs a Transformer decoding architecture based on a self-attention mechanism. Its function is to decode the latent vectors input into corresponding SMILES sequences. This decoder progressively outputs molecular symbols in an autoregressive manner and constrains the generation process through SMILES grammar rules, naturally ensuring that molecules satisfy chemical bond connection rules. This asymmetric generation structure of three-dimensional geometric encoding and one-dimensional sequence decoding, while fully utilizing the three-dimensional conformational information of molecules, can effectively improve the chemical validity and stability of the generated results, enabling the generation of a high proportion of effective molecules.
[0044] The auxiliary property predictor is constructed by connecting a lightweight multilayer perceptron in parallel in the latent space. Its function is to predict the molecular properties of its own input latent vector and obtain the predicted molecular properties.
[0045] In the training scenario, the latent space generation model can be jointly trained (i.e., pre-trained) by using attribute loss and reconstruction loss, allowing the latent space to simultaneously organize structural information and property distribution, thereby providing a more interpretable and optimizable search direction for subsequent reinforcement learning. Specifically, the pre-training process uses the original SMILES sequence for training as the original training SMILES sequence. First, a training molecular map is generated based on the three-dimensional dominant conformation corresponding to the original training SMILES sequence. Then, the processing steps are executed sequentially according to the model's inference logic: the composite tensor corresponding to the training molecular map is processed by the geometric perception map encoder to model the spatial relationships between atoms and obtain the training global latent representation. The mean and variance of the latent distribution are predicted based on the training global latent representation using several linear layers through the reparameterization module. The first training latent vector is obtained by sampling through the reparameterization technique. The first training latent vector is decoded into the corresponding SMILES sequence by the sequence generation decoder. At the same time, the molecular property is predicted by the first training latent vector through the auxiliary attribute predictor to obtain the corresponding predicted molecular properties. Subsequently, the loss is calculated based on the model's output and the benchmark data. That is, the reconstruction loss is calculated based on the original training SMILES sequence and the decoded SMILES sequence. The attribute loss is calculated based on the predicted molecular properties corresponding to the first training latent vector and the standard molecular properties. Finally, the joint parameters of all modules of the latent space generation model are optimized and trained based on the reconstruction loss and the attribute loss. Once the latent space generation model has completed all pre-training processes, it can be used in subsequent molecular generation and optimization stages to ensure that it can stably and accurately perform functions such as molecular three-dimensional structure encoding, latent vector sampling, SMILES sequence decoding, and molecular property prediction in practical applications.
[0046] It should be noted that the geometric perception molecular representation and the 3D-to-1D generation process in this embodiment are as follows: An equivariant graph neural network is used to model the 3D conformational information of the molecule, encoding atomic property features and spatial coordinates together into a continuous latent space. Then, a sequence generation decoder maps the latent representation to a 1D molecular representation, thus forming a 3D-to-1D molecular generation framework. However, the overall structure of geometric perception encoding and sequence decoding in this embodiment has strong scalability. Its specific implementation is not limited to the specific network form used in this invention. In practical applications, the encoding and decoding stages of the latent generation model can be reasonably improved or replaced. In the encoding stage of 3D geometric perception of the molecule, other 3D molecular representation models with rotational, translational, or invariant properties can be selected to replace the equivariant graph neural network used in this invention. Examples include the SE3 equivariant network, a 3D message-passing neural network, and a geometric graph network based on distance or angle features; a multimodal fusion mechanism can also be introduced to jointly encode the 2D topological information and 3D coordinate information of the molecule. In the decoding stage of the one-dimensional molecular representation, autoregressive generative models, graph generative models, or grammatically constrained structured decoders can be used to replace the sequence generation decoder used in this embodiment to achieve molecular structure reconstruction. In short, any technical solution that can achieve a stable mapping from three-dimensional geometric information to a continuous latent space and then to a one-dimensional molecular representation can be used as an equivalent variation of this embodiment.
[0047] Step S300: Through the actor and critic policy network optimized by reinforcement learning, the latent points are updated by outputting actions based on the latent vectors, and the updated latent vectors are obtained.
[0048] Furthermore, the reinforcement learning optimization steps for the actor and critic strategy network include: The original SMILES sequence used for training is used as the original training SMILES sequence, and the latent vector output by the pre-trained latent space generation model based on the original training SMILES sequence is used as the second training latent vector. By using the policy branches in the actor and critic policy network, the action update latent point is output according to the second training latent vector to obtain the training update latent vector; The effect of the action is evaluated by updating the latent vectors based on the training through the value branches in the actor and critic policy network, and the policy branches are optimized. The latent vectors corresponding to the training and update latent vectors are decoded into SMILES sequences and rewards are calculated. Empirical data consisting of latent vector states, actions, and rewards are collected through multi-step interactions between latent vector states and actions. The actor and critic policy network is then optimized based on the empirical data using a proximal policy optimization algorithm.
[0049] like Figure 3 As shown, to address the difficulties in gradient estimation and unstable generation in discrete molecular space reinforcement learning, this embodiment designs a proximal policy optimization framework (PPO algorithm framework) based on a continuous latent space. An actor and critic policy network is constructed at the latent variable level. This network continuously perturbs the latent vectors, achieving smooth and controllable molecular property orientation optimization. Specifically, the actor and critic policy network enables the orientation optimization of molecular latent vectors in a continuous latent space. By transforming the molecular property optimization process from discrete SMILES editing to continuous latent space search, it effectively improves training stability and reduces the generation of invalid molecules. The actor and critic policy network is a deep network containing a shared feature layer, policy branches, and value branches. This network uses latent vectors as state input, and the policy branches output continuous incremental actions to update latent points, i.e., adjust the latent space position, ultimately obtaining the updated latent vector. The value branch simultaneously evaluates the value of the updated latent vector state, thereby reducing variance during training and ensuring the stability of the optimization process. The actor and critic policy network requires targeted reinforcement learning optimization steps to achieve the aforementioned latent point update and state optimization. The specific reinforcement learning optimization steps utilize a pre-trained latent space generation model (also known as a pre-trained generative model): First, the original SMILES sequence used for training is taken as the original training SMILES sequence. The latent vector output by the pre-trained latent space generation model after processing this original training SMILES sequence is taken as the second training latent vector. This second training latent vector is the initial latent vector state for the policy network optimization training. Then, through the policy branch in the actor and critic policy network, the latent point is updated by outputting an action based on the second training latent vector, resulting in the updated latent vector state. Simultaneously, through the value branch in the network, the effectiveness of the action output by the policy branch is evaluated based on this updated latent vector state, and the policy branch is initially optimized based on the evaluation result to reduce training variance. Next, the updated latent vector is input into the decoder to decode into a SMILES sequence, and the corresponding reward is calculated. Through multi-step interactions between states and actions, trajectory experience data consisting of states, actions, and rewards is collected, providing basic data for the overall optimization of the policy network. Finally, the Proximal Policy Optimization (PPO) algorithm is used to perform overall stable updates and optimizations of the actor and critic policy networks based on the collected empirical data. After completing all optimization steps, the actor and critic policy networks optimized by reinforcement learning can be obtained, realizing iterative optimization oriented towards molecular target properties.
[0050] It should be noted that this embodiment employs a proximal policy optimization algorithm within a continuous latent space to perform targeted search and adjustment of the molecular latent representation, thereby achieving stable optimization of the properties of the generated molecules. However, this optimization framework is not limited to a single reinforcement learning algorithm. Any technical solution that satisfies the conditions of smooth modification of continuous latent vectors and decoupling from the discrete molecule generation process can replace this embodiment. For example, the actor-critic structure algorithm, the policy gradient method based on the value function, or other optimization methods suitable for continuous action spaces can be used to update the latent variables; alternatively, gradient-guided search, Bayesian optimization, or evolutionary strategies can be combined to achieve targeted exploration within the continuous latent space. In short, any technical solution that can achieve goal-oriented optimization while maintaining generation stability and structural legitimacy can be used as an alternative implementation of this embodiment.
[0051] In one implementation, when optimizing the actor and critic policy network based on the empirical data using a proximal policy optimization algorithm, the probability ratio of the new policy to the old policy is subject to pruning restrictions. The composite reward function used to calculate rewards includes a weighted fusion property reward term, a self-consistent reward term, and a latent space constraint penalty term.
[0052] like Figure 4As shown, to address the issues of high sampling randomness and poor result consistency in latent space generation models (i.e., variational generation models), this embodiment introduces a structural self-consistency verification and reward mechanism. By repeatedly decoding and comparing the structural similarity constraints on the latent representation, the stability and robustness of the generated molecules are improved. Specifically, when using a proximal policy optimization algorithm to stably update the actor and critic policy networks, an advantage function estimation method can be used to evaluate the action effect. Furthermore, the probability ratio between the new and old policies can be pruned to prevent excessive update amplitude from causing performance oscillations. Entropy regularization can also be introduced to enhance exploration capabilities and ensure smooth convergence during training. When calculating the reward, a weighted fusion composite reward function can be used. This composite reward function is specifically designed to improve the stability and chemical rationality of molecule generation. It comprises three parts: first, a property reward term, which encourages the generation of molecules with high drug similarity scores (QED) and low synthetic feasibility scores (SA), indicating high-quality drug-related characteristics; second, a self-consistency reward term, which sets reward rules by decoding and sampling the same latent vector multiple times and calculating structural similarity, with higher molecular structural consistency resulting in larger rewards, thereby enhancing the robustness and reproducibility of generated molecules; and third, a latent space constraint penalty term, which applies gradient penalties to latent vectors that deviate from the Gaussian prior distribution, thereby limiting the policy network's search within the effective chemical space and preventing the generation of invalid molecules with abnormal structures or that do not conform to chemical rules. The composite reward function provides a scientific and reasonable reward basis for the optimization of the policy network by weightedly fusing the property reward term, the self-consistency reward term, and the latent space constraint penalty term, ensuring that the optimization direction of the policy network matches the actual needs of molecule generation, ultimately achieving both policy network optimization and improved molecule generation quality.
[0053] It should be noted that in this embodiment, during the reinforcement learning optimization process, structural validity constraints, self-consistency verification, and diversity adjustment mechanisms are introduced to ensure that the generated molecules always satisfy the chemical valence bond rules and reduce duplicate samples, thereby achieving a high proportion of effective molecule output. However, this validity constraint mechanism and the design of the multi-objective reward function are highly flexible, allowing for adaptive adjustments to the composition, specific calculation method, and weight allocation of reward items according to actual application needs. For example, molecular legitimacy detection, grammatical constraints, rule filtering, or latent space distribution regularization can be introduced to further enhance the stability of the molecule generation process; alternatively, different physicochemical property indicators (such as drug similarity scores, synthetic feasibility scores, oil-water partition coefficient (LogP), diversity measures, etc.) can be combined to construct multi-objective reward functions or staged reward functions to adapt to different molecule generation optimization needs. Any design method that can maintain high efficiency in molecule generation and ensure the stability of molecule generation characteristics during the reinforcement learning optimization process can be considered an equivalent improvement scheme of this embodiment.
[0054] Step S400: Decode the updated latent vector to obtain the SMILES sequence.
[0055] Specifically, updating the latent vector refers to the process by which the actor and critic policy network, based on the initial latent vector output by the pre-trained latent space generation model, updates the latent points in the continuous latent space through output actions to obtain the optimized latent vector. This latent vector is directionally adjusted and can therefore be considered a representation of the molecular structure and chemical characteristics that meet the requirements of the drug-related target properties. In the molecular generation and evaluation stage, this embodiment utilizes a latent space generation model optimized through reinforcement learning with fixed parameters to sample and decode latent vectors from the latent space. The decoding operation can be performed by calling the sequence generation decoder built into the latent space generation model, ultimately obtaining the decoded SMILES sequence. Figure 5 The overall architecture of the method in this embodiment is shown. Through the coordinated process of three-dimensional encoding, latent space constraint optimization, and one-dimensional sequence decoding, highly efficient and multi-objective property optimization of molecular generation can be achieved.
[0056] In one implementation, after decoding based on the updated latent vector to obtain the SMILES sequence, the method further includes: The molecular structure of the SMILES sequence is validated, standardized, and deduplicated to obtain the target SMILES sequence. Several evaluation indicators are used to score and screen target SMILES sequences obtained based on multiple original SMILES sequences; the evaluation indicators include at least one of the following: chemical efficacy, uniqueness, structural diversity, drug similarity, and synthetic feasibility. Target candidates were determined based on the scoring and screening results.
[0057] Specifically, after decoding the updated latent vector to obtain the SMILES sequences, the molecular structure of these SMILES sequences undergoes validity verification, standardization, and deduplication to obtain the target SMILES sequences. Validation verifies whether the molecular structure satisfies chemical valence rules and grammatical validity. Since the decoding stage uses a grammatically constrained sequence generation method, all generated molecules satisfy chemical valence rules, achieving extremely high efficiency. This ensures that the generated results can be directly used in subsequent virtual screening, molecular docking, and drug discovery processes, improving the overall engineering practicality and reliability. Standardization unifies the representation of molecular structures, and deduplication removes duplicate molecular structures. Subsequently, for all target SMILES sequences obtained after processing multiple original SMILES sequences through the entire process, one or more evaluation metrics are used for comprehensive scoring and screening. Evaluation metrics may include, but are not limited to: validity (the proportion of generated molecules satisfying chemical valence rules and grammatical validity), uniqueness (the proportion of different molecules after deduplication), diversity (the degree of structural difference between generated molecules), and drug-related property indicators. These evaluation indicators enable the scientific screening of target SMILES sequences, ultimately selecting molecular structures that meet the practical application needs of drug development and other fields, and identifying target candidate molecules.
[0058] It should be noted that the technical framework of this embodiment can also be extended to other molecular generation and molecular design applications. This framework possesses good versatility; its implementation does not depend on specific datasets or molecule categories, and can be widely applied to various molecular generation and optimization tasks. For example, this framework can be directly applied to molecular generation and design scenarios such as de novo generation of small molecules of different sizes, property-oriented screening, structural modification optimization, and batch sampling of candidate molecules. Furthermore, the input feature format, optimization objectives, and evaluation metrics of the framework can be adaptively adjusted according to the specific requirements of the molecular generation and design task. In short, any application that adopts a combined overall technical approach of three-dimensional geometric encoding, continuous latent representation, and constrained optimization falls within the application extension scope of this embodiment.
[0059] To demonstrate the technical effectiveness of this invention, it was trained, validated, and tested on the publicly available small molecule dataset QM9, and the model was systematically evaluated. Evaluation metrics commonly used in the field of molecular generation, such as chemical efficiency, uniqueness, structural diversity, drug similarity score, and synthetic feasibility score, were employed to comprehensively measure the chemical legitimacy, structural diversity, and drug development potential of the generated molecules. Under experimental conditions of generating 1000 candidate molecules, the model achieved a chemical efficiency of 100.00%, meaning all generated molecules satisfied the chemical valence rules and had no invalid structures. Simultaneously, uniqueness reached 90.90%, and structural diversity reached 0.8588, indicating low repetition rate, wide structural distribution, and good chemical spatial coverage. The average drug similarity score was 0.5517, and the standardized synthetic feasibility score was 0.7357, demonstrating that the generated molecules possess both good drug similarity and synthetic feasibility. Compared to traditional generative methods based on two-dimensional representation or discrete reinforcement learning, this invention adopts a technical approach of 3D geometric encoding + continuous latent space generation + constrained reinforcement learning optimization, which effectively avoids the problems of illegal structure generation and training instability, and achieves stable, reliable and highly efficient small molecule generation results, significantly improving the engineering practicality of the generative model and its adaptability to downstream drug screening.
[0060] The advantages of this invention include, but are not limited to: 1. To address the problem that existing molecular generation models rely solely on SMILES sequences and two-dimensional molecular graph representations, lacking three-dimensional spatial geometric constraints and prone to generating molecules with illegal chemical structures and distorted physical conformations, this invention constructs a three-dimensional to one-dimensional geometrically perceptive variational autoencoder generation architecture. It utilizes an equivariant graph neural network (EGNN) to jointly model molecular atom type features, chemical bond connections, and three-dimensional spatial coordinates. By incorporating rotation and translational constraints during graph convolution, it can stably extract interatomic spatial interactions and local conformational features, overcoming the shortcomings of existing technologies in terms of insufficient three-dimensional representation capabilities. Simultaneously, a Transformer-based sequence decoding module maps SMILES strings, implementing hard control at the generation end based on SMILES syntax rules and valence bond constraints. Combined with a self-consistency verification mechanism, this inherently ensures the legality and resolvability of molecular structures from the generation mechanism, significantly reducing the probability of generating invalid molecules.
[0061] 2. To address the problems of large gradient variance, unstable training, low search efficiency, and frequent illegal structures caused by traditional reinforcement learning's direct editing and optimization in discrete character and molecular graph spaces, this invention migrates the entire goal-oriented property optimization process to a continuous latent space, constructing a decoupled reinforcement learning framework. While freezing the parameters of the pre-trained generated model, independent actor and critic policy networks are built. A proximal policy optimization algorithm is used to continuously and smoothly update the latent vectors incrementally. Directed search in the latent space replaces direct editing of discrete structures, eliminating problems such as valence bond destruction and syntax errors from the optimization path. This optimization strategy not only effectively solves the problems of training oscillation and slow convergence in traditional reinforcement learning, significantly improving policy convergence speed and property optimization efficiency, but also enables precise targeted guidance of drug-related properties such as drug similarity (QED) and synthetic feasibility (SA). While optimizing molecular physicochemical properties, the legality of the molecular structure is maintained throughout the process, achieving synergistic control of molecular property optimization and structural compliance, completely avoiding the problems of abnormal molecules and sample distortion that easily arise in reinforcement learning optimization in existing technologies.
[0062] Thirdly, to address the problems of unstable sampling and poor repeatability in existing variational generation models, as well as the issues of pattern collapse and repeated generation in reinforcement learning, this invention designs a composite generation and reward mechanism that integrates structural validity constraints, self-consistency verification, latent space regularization penalties, and diversity adjustment. Self-consistency verification rewards the model by determining the structural similarity of the same latent vector across multiple decodings, improving the repeatability and reliability of the generation results. Latent space prior regularization and boundary penalties constrain the distribution range of latent vectors, preventing the model from deviating from the original chemical distribution. Entropy regularization and diversity rewards encourage the model to explore diverse student spaces, avoiding pattern collapse and repeated generation.
[0063] Based on the above embodiments, the present invention also provides a molecular generation and optimization system based on three-dimensional geometry perception, such as... Figure 6 As shown, the system includes: The molecular characterization and preprocessing module is used to obtain the original SMILES sequence and generate a molecular map based on the three-dimensional dominant conformation corresponding to the original SMILES sequence. The node features of the molecular map are used to reflect the atom type, the edge attributes are used to reflect the chemical bond type, and the node coordinates are used to reflect the three-dimensional coordinates of the atom. The latent space module is used to model the spatial relationships between atoms based on the composite tensor corresponding to the molecular diagram using a pre-trained latent space generation model, and obtain the latent vector after latent space reparameterization. The reinforcement learning optimization module is used to update the latent points by outputting actions based on the latent vectors through the actor and critic policy network optimized by reinforcement learning, thereby obtaining the updated latent vectors. The sequence generation decoder, located in the latent space generation model, is used to decode based on the updated latent vector to obtain the SMILES sequence.
[0064] Based on the above embodiments, the present invention also provides a terminal, the principle block diagram of which can be as follows: Figure 7 As shown, the terminal includes a processor, memory, network interface, and display screen connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a molecular generation and optimization method based on three-dimensional geometry perception. The display screen can be a liquid crystal display (LCD) or an e-ink display.
[0065] Those skilled in the art will understand that Figure 7 The block diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the terminal to which the present invention is applied. A specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0066] In one implementation, the terminal's memory stores one or more programs, and these programs are configured to be executed by one or more processors, and the programs contain instructions for performing a molecular generation and optimization method based on three-dimensional geometry perception.
[0067] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0068] In summary, this invention discloses a method and system for molecular generation and optimization based on three-dimensional geometry perception, relating to the field of drug molecule generation technology. The method obtains the original SMILES sequence and generates a molecular graph based on the corresponding three-dimensional dominant conformation. The node features of the molecular graph reflect the atom type, edge attributes reflect the chemical bond type, and node coordinates reflect the three-dimensional coordinates of the atoms. A pre-trained latent space generation model models the spatial relationships between atoms based on the composite tensor corresponding to the molecular graph, and obtains latent vectors after latent space reparameterization. An actor-commentator policy network optimized through reinforcement learning updates latent points by outputting actions based on the latent vectors, resulting in updated latent vectors. The updated latent vectors are then decoded to obtain the SMILES sequence. This invention uses the original SMILES sequence as a basis to generate its corresponding three-dimensional dominant conformation and constructs a molecular graph containing atom type, chemical bond type, and atomic three-dimensional coordinates, which is then encapsulated as a composite tensor as model input. This overcomes the limitation of two-dimensional representation in accurately depicting the three-dimensional structure of molecules, solves the problem of insufficient applicability and accuracy of generated molecules in real drug design due to the neglect of spatial information, and makes the molecular features learned by the model more consistent with the binding rules between molecules and target proteins in actual drug development.
[0069] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A molecular generation and optimization method based on three-dimensional geometry perception, characterized in that, The method includes: Obtain the original SMILES sequence, and generate a molecular map based on the three-dimensional dominant conformation corresponding to the original SMILES sequence; the node features of the molecular map are used to reflect the atom type, the edge attributes are used to reflect the chemical bond type, and the node coordinates are used to reflect the three-dimensional coordinates of the atom. The spatial relationships between atoms are modeled based on the composite tensor corresponding to the molecular diagram using a pre-trained latent space generation model, and the latent vector is obtained after latent space reparameterization. The actor and critic policy network, optimized through reinforcement learning, is used to update the latent points by outputting actions based on the latent vectors, thus obtaining the updated latent vectors. The SMILES sequence is obtained by decoding the updated latent vector.
2. The molecular generation and optimization method based on three-dimensional geometry perception according to claim 1, characterized in that, The steps for generating a molecular map based on the three-dimensional dominant conformation corresponding to the original SMILES sequence include: The original SMILES sequence is standardized and discrete symbol encoded to obtain a fixed-length discretized tensor; The three-dimensional dominant conformation is determined based on the fixed-length discretized tensor, and molecular point cloud data is constructed based on the three-dimensional dominant conformation. The molecular map is constructed based on the molecular point cloud data.
3. The molecular generation and optimization method based on three-dimensional geometry perception according to claim 2, characterized in that, The steps of determining the three-dimensional dominant conformation based on the fixed-length discretized tensor and constructing molecular point cloud data based on the three-dimensional dominant conformation include: A three-dimensional initial configuration is generated based on the fixed-length discretized tensor using a distance geometry algorithm; The initial three-dimensional conformation is geometrically optimized and its energy minimized using the MMFF94 force field, and the conformation with the lowest energy is selected as the dominant three-dimensional conformation. Based on the aforementioned three-dimensional dominant conformation, the three-dimensional Cartesian coordinates and atom type information of atoms are extracted to construct the molecular point cloud data.
4. The molecular generation and optimization method based on three-dimensional geometry perception according to claim 1, characterized in that, Latent space generation models include: A geometry-aware graph encoder is used to model the spatial relationships between atoms based on the composite tensor corresponding to the molecular graph, and obtain a global latent representation. The reparameterization module is used to predict the mean and variance of the latent distribution based on the global latent representation using several linear layers, and to obtain the latent vector by sampling through reparameterization technology. A sequence generator decoder is used to decode the input latent vector into the corresponding SMILES sequence; An auxiliary attribute predictor is used to predict molecular properties from an input latent vector, thus obtaining the predicted molecular properties.
5. The molecular generation and optimization method based on three-dimensional geometry perception according to claim 4, characterized in that, The pre-training steps of the latent space generation model include: Use the original SMILES sequence for training as the original training SMILES sequence; A training molecule map is generated based on the three-dimensional dominant conformation corresponding to the original training SMILES sequence; The geometric perception graph encoder models the spatial relationships between atoms based on the composite tensor corresponding to the training molecular graph, thereby obtaining the training global latent representation. The reparameterization module uses several linear layers to predict the mean and variance of the latent distribution based on the trained global latent representation, and obtains the first training latent vector by sampling through reparameterization technology. The sequence generation decoder is used to decode the first training latent vector into the corresponding SMILES sequence; An auxiliary attribute predictor is used to predict the molecular properties of the first training latent vector to obtain the corresponding predicted molecular properties. The reconstruction loss is calculated based on the original training SMILES sequence and the SMILES sequence, and the attribute loss is calculated based on the predicted molecular properties and standard molecular properties corresponding to the first training latent vector. The latent space generation model is pre-trained based on the reconstruction loss and the attribute loss to obtain the pre-trained latent space generation model.
6. The molecular generation and optimization method based on three-dimensional geometry perception according to claim 1, characterized in that, The reinforcement learning optimization steps for the actor and critic strategy network include: The original SMILES sequence used for training is used as the original training SMILES sequence, and the latent vector output by the pre-trained latent space generation model based on the original training SMILES sequence is used as the second training latent vector. By using the policy branches in the actor and critic policy network, the action update latent point is output according to the second training latent vector to obtain the training update latent vector; The effect of the action is evaluated by updating the latent vectors based on the training through the value branches in the actor and critic policy network, and the policy branches are optimized. The latent vectors corresponding to the training and update latent vectors are decoded into SMILES sequences and rewards are calculated. Empirical data consisting of latent vector states, actions, and rewards are collected through multi-step interactions between latent vector states and actions. The actor and critic policy network is then optimized based on the empirical data using a proximal policy optimization algorithm.
7. The molecular generation and optimization method based on three-dimensional geometry perception according to claim 6, characterized in that, When optimizing the actor and critic policy network using the proximal policy optimization algorithm based on the empirical data, the probability ratio of the new policy to the old policy is subject to pruning restrictions. The composite reward function used to calculate rewards includes a weighted fusion property reward term, a self-consistent reward term, and a latent space constraint penalty term.
8. The molecular generation and optimization method based on three-dimensional geometry perception according to claim 1, characterized in that, After decoding based on the updated latent vector to obtain the SMILES sequence, the process further includes: The molecular structure of the SMILES sequence is validated, standardized, and deduplicated to obtain the target SMILES sequence. Several evaluation indicators are used to score and screen target SMILES sequences obtained based on multiple original SMILES sequences; the evaluation indicators include at least one of the following: chemical efficacy, uniqueness, structural diversity, drug similarity, and synthetic feasibility. Target candidates were determined based on the scoring and screening results.
9. A molecular generation and optimization system based on three-dimensional geometry perception, characterized in that, The system includes: The molecular characterization and preprocessing module is used to obtain the original SMILES sequence and generate a molecular map based on the three-dimensional dominant conformation corresponding to the original SMILES sequence. The node features of the molecular map are used to reflect the atom type, the edge attributes are used to reflect the chemical bond type, and the node coordinates are used to reflect the three-dimensional coordinates of the atom. The latent space module is used to model the spatial relationships between atoms based on the composite tensor corresponding to the molecular diagram using a pre-trained latent space generation model, and obtain the latent vector after latent space reparameterization. The reinforcement learning optimization module is used to update the latent points by outputting actions based on the latent vectors through the actor and critic policy network optimized by reinforcement learning, thereby obtaining the updated latent vectors. The sequence generation decoder, located in the latent space generation model, is used to decode based on the updated latent vector to obtain the SMILES sequence.
10. A computer-readable storage medium storing a plurality of instructions thereon, characterized in that, The instructions are applicable to be loaded and executed by a processor to implement the steps of the molecular generation and optimization method based on three-dimensional geometry awareness as described in any one of claims 1 to 8.