A molecular generation method and device based on a hierarchical consistency diffusion model
By constructing the topological features of protein pockets and using a hierarchical consistency diffusion model for iterative back diffusion, combined with feature extraction of atoms and template branches and adaptive gating units, the problems of low structural effectiveness and difficulty in multi-view collaboration in molecular generation in existing technologies are solved, achieving higher accuracy and diversity in molecular generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONG KONG UNIV OF SCI & TECH (GUANGZHOU)
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-19
AI Technical Summary
Existing molecular generation methods suffer from problems such as incorrect valence, abnormal bond lengths and angles, limited generation capabilities due to pre-constructed templates, and inconsistent learning difficulty between atomic views and template views, resulting in low effectiveness of generated molecular structures and difficulties in multi-view coordination.
By constructing a protein map of the target protein pocket, extracting the pocket topological features, and using a hierarchical consistency diffusion model for iterative back diffusion, combined with feature extraction of atomic branches and template branches and adaptive gating units, noise prediction and type decoding are performed. Finally, geometric consistency correction is performed to generate ligand molecules.
It improves the accuracy and structural rationality of molecule generation, enhances the fit and diversity of generated molecules, and solves the problems of limited generation capacity and low structural effectiveness in existing technologies.
Smart Images

Figure CN122245506A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of drug discovery, and more particularly to a molecular generation method and apparatus based on a hierarchical consistent diffusion model. Background Technology
[0002] With the application of artificial intelligence in drug discovery, structure-based drug design (SBDD) has become a key approach to accelerate the discovery and optimization of lead compounds. Its core objective is to generate ligand molecules that can bind tightly to the target protein de novo, based on the binding pocket structure of the target protein.
[0003] In this process, generating three-dimensional molecular structures through deep learning models has become a research hotspot. Current generation methods are mainly based on generative AI technologies such as diffusion models, aiming to explore a vast chemical space and generate molecules with high binding affinity, quantitative estimate of drug-likeness (QED), and synthetic accessibility (SA).
[0004] However, existing molecular generation methods have the following drawbacks: First, due to the lack of strong chemical rules, the generated molecules often exhibit structures that violate basic chemical principles, such as incorrect valence or abnormal bond lengths and angles, resulting in low overall efficiency. Second, the generation capability is strictly limited by a pre-constructed template "vocabulary," making it difficult to discover lead compounds with novel skeletons outside the vocabulary. Third, the learning difficulty, feature dimensions, and convergence speed of atomic views (fine-grained) and template views (coarse-grained) are different, making the model prone to getting trapped in local optima and leading to disordered molecular structures. Summary of the Invention
[0005] This invention provides a molecular generation method and apparatus based on a hierarchical consistent diffusion model, which can improve the accuracy of molecular generation.
[0006] This invention provides a molecular generation method based on a hierarchical consistent diffusion model, comprising: Obtain a protein map of the target protein pocket; The normalized persistent entropy vector corresponding to the protein map is input into a pre-trained topology proxy network, so that the topology proxy network performs feature mapping based on the normalized persistent entropy vector and outputs pocket topology features. Initial noise coordinates are sampled from a standard normal distribution, and initial discrete states are sampled from a uniform distribution. Based on the initial noise coordinates and initial discrete states, a noise atom diagram and a noise template diagram are generated. The protein map, the pocket topology features, the noise atom map, and the noise template map are input into a pre-trained hierarchical consistent diffusion model. The hierarchical consistent diffusion model iteratively executes the back diffusion process from the maximum time step to the initial time step, using the protein map and the pocket topology features as constraints, and outputs the ligand atom map and the ligand template map. In each iteration, features are extracted from the noise atom map and the noise template map of the current time step through the atom branch and the template branch, respectively. The fusion weights are dynamically adjusted through an adaptive gating unit to update the extracted features. Based on the updated features, noise prediction and type decoding are performed to generate the atom noise, template noise, atom type distribution, and template ID distribution of the previous time step. Based on the ligand template diagram, the geometric consistency of the ligand atomic diagram is corrected, and the ligand molecule is constructed based on the corrected ligand atomic diagram.
[0007] This invention, through constructing a protein map of the target protein pocket and extracting its topological features, transforms the three-dimensional structural information of the protein pocket into constraints that can be embedded in a hierarchical consistency diffusion model. By initializing the ligand atom map and ligand template map from noise, an initial state is provided for the subsequent back-diffusion process. Iterative back-diffusion using the hierarchical consistency diffusion model, and feature extraction and fusion utilizing atomic branches, template branches, and adaptive gating units, ensures consistency between atomic details and template structure during generation. Furthermore, by correcting the geometric consistency of the ligand atom map, the structural rationality of the generated molecule is further improved. Compared to existing technologies that suffer from low structural effectiveness and difficulties in multi-view coordination, this application improves the accuracy of molecule generation.
[0008] Further, before inputting the normalized persistent entropy vector corresponding to the protein map into the pre-trained topology proxy network, so that the topology proxy network performs feature mapping based on the normalized persistent entropy vector and outputs pocket topology features, the method further includes: Point cloud data is extracted from the protein map to obtain pocket point cloud; wherein, the protein map contains the three-dimensional spatial coordinates and chemical feature vectors of each node of the target protein pocket; Based on the pocket point cloud, continuous cohomology calculation is performed to obtain a pocket persistent graph; Calculate the lifetime of each topological feature in the pocket persistence graph, and calculate the persistence entropy based on each lifetime; The persistent entropy is normalized to obtain a normalized persistent entropy vector.
[0009] The embodiments of the present invention extract point cloud data from protein maps and perform continuous cohomology calculation and continuous entropy normalization, thereby quantizing the geometric topological features of protein pockets into an input-friendly normalized continuous entropy vector.
[0010] Further, the step of sampling initial noise coordinates from a standard normal distribution and sampling initial discrete states from a uniform distribution, and generating a noise atom graph and a noise template graph based on the initial noise coordinates and initial discrete states, includes: The noise coordinates and noise center coordinates are obtained by sampling from a standard normal distribution; The noise type and noise template ID are obtained by sampling from a uniform distribution; Based on the noise coordinates and the noise type, a noise atom diagram is generated; A noise template image is generated based on the noise center coordinates and the noise template ID.
[0011] The embodiments of the present invention sample noise coordinates and discrete states from standard normal distribution and uniform distribution respectively, and generate noise atom diagrams and noise template diagrams based on the sampling results, which can provide an initial noise state that meets the distribution requirements for the reverse diffusion process.
[0012] Further, the step of inputting the protein map, the pocket topology features, the noise atom map, and the noise template map into a pre-trained hierarchical consistent diffusion model, so that the hierarchical consistent diffusion model, with the protein map and the pocket topology features as constraints, iteratively executes the back diffusion process from the maximum time step to the initial time step, and outputs the ligand atom map and the ligand template map, includes: Starting from the maximum time step, the backdiffusion process is iteratively executed until the initial time step. The noise atom map and noise template map generated in the initial time step are used as ligand atom maps and ligand template maps and output. In each iteration, the hierarchical consistent diffusion model performs conditional noise prediction and unconditional noise prediction respectively, and synthesizes the prediction results into a denoising gradient based on a classifier-independent guidance strategy. According to the denoising gradient, the noise atom map and noise template map of the previous time step are generated using the backdiffusion formula.
[0013] The embodiments of the present invention perform a back diffusion process iteratively starting from the maximum time step, and perform conditional noise prediction and unconditional noise prediction in each iteration. Based on a classifier-independent guidance strategy, a denoising gradient is synthesized, which can effectively balance the fit of the generated molecule to the protein pocket and the diversity of the molecular structure.
[0014] Further, the step involves extracting features from the noise atomic graph and noise template graph at the current time step through atomic branches and template branches, respectively, and dynamically adjusting the fusion weights using an adaptive gating unit to update the extracted features. Based on the updated features, noise prediction and type decoding are performed to generate the atomic noise, template noise, atomic type distribution, and template ID distribution of the previous time step, including: The atomic node features are obtained by extracting features from the noisy atomic graph at the current time step through atomic branches; The template node features are obtained by extracting features from the noisy template graph at the current time step through the template branch; The adaptive gating unit calculates the fusion weight based on the current time step, and performs cross-view information fusion on the atomic node features and the template node features based on the fusion weight to obtain updated atomic node features and template node features. Noise prediction and type decoding are performed based on the updated atomic node features to obtain the atomic noise and atomic type distribution at the current time step; Noise prediction and type decoding are performed based on the updated template node features to obtain the template noise and template ID distribution at the current time step.
[0015] In this embodiment of the invention, features are extracted by atomic branches and template branches respectively, and cross-view information fusion is performed by dynamically adjusting the fusion weights according to the current time step using an adaptive gating unit, which can suppress the interference of early diffusion noise on feature extraction.
[0016] Further, the step of performing geometric consistency correction on the ligand atomic diagram based on the ligand template diagram, and constructing the ligand molecule based on the corrected ligand atomic diagram, includes: Obtain the center coordinates of each template node in the ligand template diagram, and the set of atomic coordinates belonging to each template node in the ligand atom diagram; For any template node, calculate the geometric centroid of the set of atomic coordinates corresponding to the template node, and calculate the deviation between the geometric centroid and the center coordinates of the template node; If the deviation is greater than a preset threshold, then all atomic coordinates in the atomic coordinate set are translated as a whole so that the geometric centroid is aligned with the center coordinates of the template node; Ligand molecules are constructed based on the corrected atomic coordinates.
[0017] This invention eliminates potential local geometric distortions during atom generation by calculating the deviation between the template node center coordinates and the geometric centroid of the corresponding atom coordinate set, and by performing overall translation correction on atom groups that exceed a threshold.
[0018] Furthermore, before inputting the protein map, the pocket topological features, the noise atom map, and the noise template map into the pre-trained hierarchical consistency diffusion model, the method further includes: Obtain a molecularly generated sample set; Based on the molecularly generated sample set, a training strategy of staged parameter unfreezing is used to iteratively train the initial hierarchical consistent diffusion model until the hierarchical consistent diffusion model reaches the preset convergence condition, thus obtaining the optimal hierarchical consistent diffusion model. The training strategy includes three stages: the first stage, freezing the network parameters of the atomic branches; the second stage, freezing the network parameters of the template branches; and the third stage, unfreezing the network parameters of the atomic branches and the template branches.
[0019] This invention employs a phased parameter unfreezing training strategy to iteratively train a hierarchical consistency diffusion model, enabling the focus on learning template branches and atomic branches at different training stages, thus avoiding gradient competition in multi-task learning.
[0020] Further, the acquisition of the molecularly generated sample set includes: Protein-ligand complex data are obtained from a drug molecule database; wherein, the protein-ligand complex data includes protein pocket structure information and ligand molecule structure information; Based on the ligand molecule structure information, the RECAP rule is used to decompose the substructure, the frequency of each substructure is counted, and the substructures with a frequency higher than a preset threshold are selected to construct a template vocabulary. A protein map is constructed based on the protein pocket structure information, and a ligand atom map is constructed based on the ligand molecule structure information. Based on the template vocabulary and the ligand molecule structure information, atoms belonging to the same template in the ligand molecule are aggregated into template nodes to construct a ligand template graph; The protein map, the ligand atom map, and the ligand template map are used as molecular generation samples corresponding to the protein-ligand complex data, and a molecular generation sample set is formed by multiple molecular generation samples corresponding to the protein-ligand complex data.
[0021] This invention provides training samples containing coarse-grained structural information for hierarchical consistency diffusion models by obtaining protein-ligand complex data from drug molecule databases, constructing a template vocabulary using RECAP rules, and building a ligand template diagram based on the template vocabulary.
[0022] Furthermore, before iteratively training the initial hierarchical consistent diffusion model using a phased thawing parameter training strategy based on the molecularly generated sample set, the method further includes: For any molecule-generated sample, normalized persistent entropy is calculated based on the point cloud data of the protein map and the point cloud data of the ligand atom map, and the calculation results are input into the topology proxy network, so that the topology proxy network performs feature mapping based on the calculation results and outputs pocket topology features and ligand topology features. The pocket topological features and the ligand topological features are concatenated to obtain the topological fingerprint features; Gaussian noise is gradually added to the ligand atom diagram and ligand template diagram to generate a noisy atom diagram and a noisy template diagram; The protein map, the topological fingerprint features, the noise atom map, and the noise template map are used as training input data for the hierarchical consistency diffusion model.
[0023] This invention calculates a normalized persistent entropy vector from point cloud data based on protein maps and ligand atom maps, and inputs it into a topological proxy network for feature mapping to obtain topological fingerprint features. At the same time, the ligand atom maps and ligand template maps are noise-added and used together with the protein maps and topological fingerprint features as training input data, which can provide training samples for the hierarchical consistent diffusion model that simultaneously contain geometric topological constraints and multi-granularity molecular structures.
[0024] Another embodiment of the present invention provides a molecular generation device based on a hierarchical consistent diffusion model, comprising: a protein graph construction module, a topological feature extraction module, a noise graph generation module, a model inference module, and a molecular construction module; The protein map construction module is used to obtain a protein map of the target protein pocket; The topology feature extraction module is used to input the normalized persistent entropy vector corresponding to the protein map into a pre-trained topology proxy network, so that the topology proxy network performs feature mapping based on the normalized persistent entropy vector and outputs pocket topology features. The noise map generation module is used to sample initial noise coordinates from a standard normal distribution and sample initial discrete states from a uniform distribution, and generate a noise atom map and a noise template map based on the initial noise coordinates and initial discrete states. The model inference module is used to input the protein map, the pocket topology features, the noise atom map, and the noise template map into a pre-trained hierarchical consistent diffusion model. This allows the hierarchical consistent diffusion model to iteratively execute a back-diffusion process from the maximum time step to the initial time step, using the protein map and the pocket topology features as constraints, and output the ligand atom map and the ligand template map. In each iteration, features are extracted from the noise atom map and noise template map of the current time step through atomic branches and template branches, respectively. An adaptive gating unit dynamically adjusts the fusion weights to update the extracted features. Based on the updated features, noise prediction and type decoding are performed to generate the atom noise, template noise, atom type distribution, and template ID distribution of the previous time step. The molecular construction module is used to perform geometric consistency correction on the ligand atomic diagram based on the ligand template diagram, and construct ligand molecules based on the corrected ligand atomic diagram.
[0025] Another embodiment of the present invention provides a terminal device, including: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements the steps of a molecular generation method based on a hierarchical consistent diffusion model as described in the present invention.
[0026] Another embodiment of the present invention also provides a computer-readable storage medium item, including: a stored computer program, which, when the computer program is running, controls the device where the computer-readable storage medium is located to perform steps of a molecular generation method based on a hierarchical consistency diffusion model as described in the present invention. Attached Figure Description
[0027] Figure 1 A schematic flowchart of an embodiment of the molecular generation method based on a hierarchical consistency diffusion model provided by the present invention; Figure 2 A schematic flowchart of another embodiment of the molecular generation method based on the hierarchical consistency diffusion model provided by the present invention; Figure 3 This is a schematic diagram of an embodiment of the molecular generation device based on the hierarchical consistency diffusion model provided by the present invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0030] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0031] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0032] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0033] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0034] See Figure 1 To address the problems of low structural effectiveness and difficulty in multi-view collaboration in existing technologies, an embodiment of the present invention provides a molecular generation method based on a hierarchical consistency diffusion model, including steps S101 to S105: Step S101: Obtain the protein map of the target protein pocket.
[0035] It should be noted that obtaining a protein map of a target protein pocket refers to: obtaining the three-dimensional structure file of the target protein from a protein structure database, parsing the atomic information of the pocket region, extracting the three-dimensional spatial coordinates and chemical feature vectors of each atom, and organizing this information into a graph data structure, that is, treating each atom as a node in the graph, and the feature vector of the node containing the three-dimensional spatial coordinates and chemical feature vectors of that atom, thereby constructing a protein map that can characterize the spatial conformation and chemical properties of the protein pocket.
[0036] In one embodiment, protein diagram It can be represented as ;in, Indicates the first [unit] in the target protein binding pocket The three-dimensional spatial coordinates of each node; Indicates the first [unit] in the target protein binding pocket Chemical feature vectors of each node; This indicates the total number of nodes selected within the target protein pocket.
[0037] Step S102: Input the normalized persistent entropy vector corresponding to the protein map into the pre-trained topology proxy network, so that the topology proxy network performs feature mapping based on the normalized persistent entropy vector and outputs pocket topology features.
[0038] It should be noted that inputting the normalized persistent entropy vector corresponding to the protein map into a pre-trained topological proxy network, so that the topological proxy network performs feature mapping based on the normalized persistent entropy vector and outputs pocket topological features, refers to: stripping chemical features from the constructed protein map, retaining only the three-dimensional spatial coordinates of each atom to form a pocket point cloud; performing persistent cohomology analysis on the pocket point cloud to generate a persistent map; calculating the lifetime of each topological feature based on the persistent map, and calculating Shannon entropy based on the lifetime percentage to obtain the persistent entropy of each dimension; normalizing the persistent entropy to obtain a normalized persistent entropy vector; inputting the normalized persistent entropy vector into the pre-trained topological proxy network, through which the topological proxy network maps the normalized persistent entropy vector to a high-dimensional feature space, and outputting pocket topological features that can characterize the geometry of the protein pocket.
[0039] Preferably, before inputting the normalized persistent entropy vector corresponding to the protein map into the pre-trained topology proxy network, so that the topology proxy network performs feature mapping based on the normalized persistent entropy vector and outputs pocket topology features, the method further includes: Point cloud data is extracted from the protein map to obtain pocket point cloud; wherein, the protein map contains the three-dimensional spatial coordinates and chemical feature vectors of each node of the target protein pocket; Based on the pocket point cloud, continuous cohomology calculation is performed to obtain a pocket persistent graph; Calculate the lifetime of each topological feature in the pocket persistence graph, and calculate the persistence entropy based on each lifetime; The persistent entropy is normalized to obtain a normalized persistent entropy vector.
[0040] In one embodiment, chemical features (such as atom types) are stripped from the protein map, retaining only geometric coordinate information, to obtain a pocket point cloud. .
[0041] Furthermore, the Vietoris-Rips filtering function is used. In Pocket Cloud A series of simple complexes are constructed. By continuously increasing the connection radius, the generation and disappearance of topological features (such as connected components, cycles, and cavities) are observed. The computation... Homophonic groups ( The generation time of each topological feature in ) ) and time of extinction ( Generate a persistent graph set Each dimension Each contains a series of point pairs ( ).
[0042] Furthermore, for Each topological feature in Calculate its lifecycle and calculate The sum of the lifetimes of all topological features Calculate Shannon entropy (persistent entropy) based on probability distribution: ; Scaling the entropy value to stabilize the numerical range: ; in, Indicates the first A persistent graph of a dimension, containing a set of points representing all topological features in that dimension; A point in a persistent graph represents a topological feature (such as a cavity or ring). Indicates the duration (lifetime) of this topological feature; This represents the sum of the durations of all topological features in this dimension, used for probability normalization; This represents the persistence entropy of the persistent graph in this dimension; This represents the normalized persistent entropy value. The normalized persistent entropy vectors of all dimensions are then integrated to obtain... .
[0043] Furthermore, utilizing topological proxy networks (Typically a multilayer perceptron MLP), the normalized persistent entropy vector is mapped to a high-dimensional feature space to generate pocket topological features: ; in, This represents a topological proxy network, implemented using a multilayer perceptron (MLP). This represents the set of persistent graphs generated from pocket point clouds; This represents the topological features of the pocket.
[0044] Step S103: Sample initial noise coordinates from a standard normal distribution and sample initial discrete states from a uniform distribution. Based on the initial noise coordinates and initial discrete states, generate a noise atom diagram and a noise template diagram.
[0045] It should be noted that sampling initial noise coordinates from a standard normal distribution and initial discrete states from a uniform distribution, and generating noise atom diagrams and noise template diagrams based on these initial noise coordinates and initial discrete states, means: at the starting time step (maximum time step) of the back diffusion process, initial noise coordinates and noise center coordinates are randomly sampled from a standard normal distribution; simultaneously, initial noise type and noise template ID are randomly sampled from a uniform distribution; the sampled noise coordinates and noise type are combined to construct the initial noise atom diagram; and the sampled noise center coordinates and noise template ID are combined to construct the initial noise template diagram.
[0046] Preferably, the step of sampling initial noise coordinates from a standard normal distribution and sampling initial discrete states from a uniform distribution, and generating a noise atom diagram and a noise template diagram based on the initial noise coordinates and initial discrete states, includes: The noise coordinates and noise center coordinates are obtained by sampling from a standard normal distribution; The noise type and noise template ID are obtained by sampling from a uniform distribution; Based on the noise coordinates and the noise type, a noise atom diagram is generated; A noise template image is generated based on the noise center coordinates and the noise template ID.
[0047] In one embodiment, from the standard normal distribution Mid-sampling yields noise coordinates and noise center coordinates The noise type is obtained by sampling from a uniform distribution. and noise template ID Based on noise coordinates and noise type Generate a noisy atom map Based on noise center coordinates and noise template ID Generate noise template image .
[0048] Step S104: Input the protein map, the pocket topology features, the noise atom map, and the noise template map into the pre-trained hierarchical consistent diffusion model, so that the hierarchical consistent diffusion model, with the protein map and the pocket topology features as constraints, iteratively executes the back diffusion process from the maximum time step to the initial time step, and outputs the ligand atom map and the ligand template map; wherein, in each iteration, the noise atom map and the noise template map of the current time step are extracted through the atom branch and the template branch, respectively, and the fusion weight is dynamically adjusted through the adaptive gating unit to update the extracted features. Based on the updated features, noise prediction and type decoding are performed to generate the atom noise, template noise, atom type distribution, and template ID distribution of the previous time step.
[0049] It should be noted that inputting the protein map, the pocket topology features, the noise atom map, and the noise template map into a pre-trained hierarchical consistent diffusion model, so that the hierarchical consistent diffusion model iteratively executes the back diffusion process from the maximum time step to the initial time step, with the protein map and the pocket topology features as constraints, and outputs the ligand atom map and ligand template map, means that the protein map representing the structure of the protein pocket, the pocket topology features representing the geometry of the pocket, and the noise atom map and noise template map obtained from random sampling are all used as inputs and fed into the pre-trained hierarchical consistent diffusion model; the hierarchical consistent diffusion model uses the protein map and the pocket topology features as constraints to iteratively execute the back diffusion process from the maximum time step to the initial time step, and outputs the ligand atom map and ligand template map. Using the fixed constraint of features, the model iteratively executes the backdiffusion process from the maximum time step to the initial time step. In each iteration, the model extracts features from the noise atom map and noise template map of the current time step through atomic branches and template branches, respectively. The fusion weights are dynamically adjusted by an adaptive gating unit to update the extracted features. Based on the updated features, noise prediction and type decoding are performed to generate the atom noise, template noise, atom type distribution, and template ID distribution of the previous time step, thus obtaining the noise atom map and noise template map of the previous time step. After a complete iteration from the maximum time step to the initial time step, the ligand atom map and ligand template map of the initial time step are output.
[0050] Preferably, the step of inputting the protein map, the pocket topology features, the noise atom map, and the noise template map into a pre-trained hierarchical consistent diffusion model, so that the hierarchical consistent diffusion model, with the protein map and the pocket topology features as constraints, iteratively executes the back diffusion process from the maximum time step to the initial time step, and outputs the ligand atom map and the ligand template map, includes: Starting from the maximum time step, the backdiffusion process is iteratively executed until the initial time step. The noise atom map and noise template map generated in the initial time step are used as ligand atom maps and ligand template maps and output. In each iteration, the hierarchical consistent diffusion model performs conditional noise prediction and unconditional noise prediction respectively, and synthesizes the prediction results into a denoising gradient based on a classifier-independent guidance strategy. According to the denoising gradient, the noise atom map and noise template map of the previous time step are generated using the backdiffusion formula.
[0051] In one embodiment, the hierarchical consistent diffusion model performs conditional noise prediction and outputs prediction results that include protein conditions. The hierarchical consistent diffusion model performs unconditional noise prediction and outputs prediction results that do not include protein conditions. ; Utilizing guiding standards ( Synthesize the final denoised gradient: ; in, This represents the final denoising gradient, used in the denoising step; This represents the prediction results of the stratified consistent diffusion model under the condition of known protein pockets; This represents the prediction result of the hierarchical consistency diffusion model under unconditional conditions (pocket information is masked); The guiding scale is a scalar constant ( The larger the value, the more likely the generated molecules are to rigidly fit the pocket structure, but the diversity decreases. (Based on the denoising gradient) The noise atom map of the previous time step is calculated using the back-diffusion formula (Langevin kinetics or DDPM sampling). Noise template diagram This operation forces the generation direction to converge more towards regions that conform to protein constraints.
[0052] Preferably, the step of extracting features from the noise atom graph and noise template graph of the current time step through atomic branches and template branches respectively, and dynamically adjusting the fusion weights through an adaptive gating unit to update the extracted features, performing noise prediction and type decoding based on the updated features, and generating the atom noise, template noise, atom type distribution, and template ID distribution of the previous time step, includes: The atomic node features are obtained by extracting features from the noisy atomic graph at the current time step through atomic branches; The template node features are obtained by extracting features from the noisy template graph at the current time step through the template branch; The adaptive gating unit calculates the fusion weight based on the current time step, and performs cross-view information fusion on the atomic node features and the template node features based on the fusion weight to obtain updated atomic node features and template node features. Noise prediction and type decoding are performed based on the updated atomic node features to obtain the atomic noise and atomic type distribution at the current time step; Noise prediction and type decoding are performed based on the updated template node features to obtain the template noise and template ID distribution at the current time step.
[0053] In one embodiment, an embedding layer is first used to map discrete noise types and noise template IDs into dense feature vectors, and sinusoidal positional encoding is used to convert scalars... Convert to time vector The topological features and time vectors are concatenated into the initial node features of the atoms and templates, enabling the network to perceive global geometric constraints and noise levels in the initial stage, thus obtaining the initial atom feature vectors. and initial template feature vector .
[0054] Furthermore, the hierarchical consistency diffusion model is derived from... It is made up of layers stacked together, in the first Layer, the model simultaneously updates the feature embeddings of the nodes ( ) and three-dimensional coordinates ( Before each layer of input, based on Euclidean distance... Construct a k-nearest neighbor graph structure (k-NN Graph). The nodes of the k-NN Graph include ligand nodes (atoms or templates) and context nodes (protein pocket atoms); for each ligand node... Select the k nearest neighbor nodes by Euclidean distance. Make connections; edge features contain combined information about node types, used to distinguish between intra-view interactions and inter-view (ligand-protein) interactions.
[0055] Furthermore, based on the k-NN Graph, the ligand nodes are first computed. and neighboring nodes Interaction messages between : ; in, Represents a node Passed to the node The original message vector; and They represent the first Feature vectors of source and target nodes in the layer; Represents the edge feature vector; Represents a node and nodes The relative distance between them; Indicates time step embedding; The message function is represented by a multilayer perceptron.
[0056] Furthermore, before aggregating messages, a gating mechanism is introduced to dynamically adjust the cross-view information flow. Specifically, the gating weights are first calculated. : ; in, This represents the Sigmoid activation function; This indicates a global pooling operation; The fusion coefficient is used in the early stages when noise is high. The initial value tends towards 0, and later tends towards 1. Based on... When performing cross-view message aggregation, the update amount of the atomic branch is... The update frequency of the template branch is .in, Represents a collection of neighboring views of the same type; Represents a cross-view neighbor set; and This represents the cross-view feature transformation MLP.
[0057] Furthermore, based on the update amounts of atomic branches and template branches, the following formula is used for node feature updates: ; in, Indicates the updated number Layer node features; This represents a Feature Update MLP, typically including residual connections. Displacement weights are calculated based on the updated features, and the coordinates are moved along the direction of the node connections. ; ; in, To prevent division by zero of extremely small constants (such as...) ); This represents an MLP that maps high-dimensional messages to scalar weights. Based on the output features of the last layer, atomic noise and template noise to be removed are predicted through a linear layer. ; Secondly, the probability distribution of atom type and template ID is predicted using the Softmax classification head: .
[0058] Preferably, before inputting the protein map, the pocket topological features, the noise atom map, and the noise template map into the pre-trained hierarchical consistency diffusion model, the method further includes: Obtain a molecularly generated sample set; Based on the molecularly generated sample set, a training strategy of staged parameter unfreezing is used to iteratively train the initial hierarchical consistent diffusion model until the hierarchical consistent diffusion model reaches the preset convergence condition, thus obtaining the optimal hierarchical consistent diffusion model. The training strategy includes three stages: the first stage, freezing the network parameters of the atomic branches; the second stage, freezing the network parameters of the template branches; and the third stage, unfreezing the network parameters of the atomic branches and the template branches.
[0059] In one embodiment, the training strategy for phased unfreezing of parameters comprises three phases, with the loss function for the first phase being: ; in, To represent the template position loss, the distance between the predicted noise and the actual noise is calculated using the mean squared error (MSE). ; in, Represents the random time step of the diffusion process, with values ranging from 1 to 2. ; This represents the true Gaussian noise sampled from a standard normal distribution; express The template image data after adding noise at each moment (including the center coordinates of the template); This represents the persistent homology feature vector extracted by the topological agent network; This represents the denoising gradient (i.e., the predicted noise) of the template branch prediction. To represent the template type loss, the difference in discrete distributions is calculated using either cross-entropy loss or KL divergence. ; in, A one-hot encoded vector representing the template ID; This represents the true posterior probability distribution of the discrete diffusion process; This represents the posterior probability distribution of the template branch prediction.
[0060] Furthermore, the loss function for the second stage is: ; in, This represents the loss of atomic positions, specifically: ; in, express Noise-added atomic graph data at each time step (including atomic coordinates); This represents the denoised template image for template branch prediction. The predicted output of the template branch does not participate in gradient calculation; This represents the noise in the atomic branch prediction. For atom-type loss, specifically: ; in, One-hot encoded vectors representing the type of atom (such as C, N, or O, etc.); The weighting coefficients represent the loss of atomic types.
[0061] Furthermore, the loss function for the third stage is: ; ; ; in, The regularization weight coefficients represent the geometric consistency loss; The geometric consistency loss is represented as follows: ; in, This indicates the total number of templates contained in the current molecule; Indicates the first branch prediction of the template The center coordinates of each template; Indicates the first A set of atomic indexes for each template; express The number of atoms contained in each template; The first atomic branch prediction The coordinates of each atom; This indicates a gradient cutoff operation. If Detach is not used, the gradient will be fed back to both the atomic network and the template network, bringing them closer together. If Detach is used, the template will only adapt to the centroid of the atom, or the atom will only adapt to the position of the template (depending on which side is Detached).
[0062] In one embodiment, all weights and biases of the atomic branches are assumed to be... All weights and biases of the atomic branches are The MLP parameters of the Adaptive Gating Unit (AIM) are: The specific implementation method of parameter freezing is as follows: First stage, set , During forward propagation, although data flows through the atomic network (used to build graph adjacency relationships), its output is used... Operations truncate gradient backpropagation; the optimizer only registers template parameters: The second stage involves setting up... , Output characteristics of template branches As a constant tensor input to the atomic network, the computational graph history is not retained; gating parameters are enabled. This allows them to learn how to receive template conditions. The third stage involves setting up... All And pass all parameter sets to the optimizer.
[0063] Preferably, the step of obtaining the molecularly generated sample set includes: Protein-ligand complex data are obtained from a drug molecule database; wherein, the protein-ligand complex data includes protein pocket structure information and ligand molecule structure information; Based on the ligand molecule structure information, the RECAP rule is used to decompose the substructure, the frequency of each substructure is counted, and the substructures with a frequency higher than a preset threshold are selected to construct a template vocabulary. A protein map is constructed based on the protein pocket structure information, and a ligand atom map is constructed based on the ligand molecule structure information. Based on the template vocabulary and the ligand molecule structure information, atoms belonging to the same template in the ligand molecule are aggregated into template nodes to construct a ligand template graph; The protein map, the ligand atom map, and the ligand template map are used as molecular generation samples corresponding to the protein-ligand complex data, and a molecular generation sample set is formed by multiple molecular generation samples corresponding to the protein-ligand complex data.
[0064] In one embodiment, substructures are decomposed from a drug molecule database (such as CrossDocked) using the RECAP rule (cleaving rotatable bonds); the frequency of substructures is statistically analyzed, and the number of occurrences is selected. A template vocabulary is constructed using high-frequency substructures (e.g., 100 times).
[0065] Furthermore, the atomic groups in the ligand molecule are matched with entries in the template vocabulary. If a group of atoms matches a template in the template vocabulary, they are aggregated into a "template node," which is characterized by... This is the index of the template in the template dictionary. If a match cannot be found (such as low-frequency fragments), it can be retained as an atomic node or classified as an "unknown template" node.
[0066] In one embodiment, the ligand atom diagram It can be represented as ;in, Indicates the first in the ligand molecule The three-dimensional spatial coordinates of an atom; Indicates the first in the ligand molecule The type characteristics of each atom; This indicates the total number of atoms contained in a ligand molecule.
[0067] In one embodiment, the ligand template diagram It can be represented as ;in, Indicates the first The geometric center coordinates of each template; Indicates the first Each template has a unique index ID in the template thesaurus; This represents the total number of templates obtained after the ligand molecule is decomposed according to the RECAP rule.
[0068] Preferably, before iteratively training the initial hierarchical consistent diffusion model using a phased thawing parameter training strategy based on the molecularly generated sample set, the method further includes: For any molecule-generated sample, normalized persistent entropy is calculated based on the point cloud data of the protein map and the point cloud data of the ligand atom map, and the calculation results are input into the topology proxy network, so that the topology proxy network performs feature mapping based on the calculation results and outputs pocket topology features and ligand topology features. The pocket topological features and the ligand topological features are concatenated to obtain the topological fingerprint features; Gaussian noise is gradually added to the ligand atom diagram and ligand template diagram to generate a noisy atom diagram and a noisy template diagram; The protein map, the topological fingerprint features, the noise atom map, and the noise template map are used as training input data for the hierarchical consistency diffusion model.
[0069] In one embodiment, the un-noiseed ligand atom diagram is assumed to be... The ligand template image without noise is For atomic coordinates and template coordinates Add noise for time steps : ; in, express Noise coordinates at any given time (atomic coordinates or template coordinates); Represents the actual coordinates at the initial moment; Indicates a Gaussian normal distribution; The single-step retention factor is defined as follows: , The amount of noise added at each step is controlled by predefined variance scheduling parameters; Represents the cumulative noise parameter, indicating the noise level from... arrive The proportion of the original signal that is retained at all times, as Increase, Approaching ; Represents the identity matrix; Indicates the current time step, indicating the diffusion stage.
[0070] Furthermore, regarding the type of atom and template ID Discrete diffusion based on a uniform transfer matrix is employed: ; in, express Noise type at any given moment (atom type or template ID); Represents the true type at the initial moment (One-hot vector); Indicates categorical distribution; Indicates the total number of categories (for atoms, it is the number of element types; for templates, it is the vocabulary size). This represents the cumulative noise parameter; the formula implies that there are types... The probability remains unchanged. The probability of a uniform random jump to any category.
[0071] Step S105: Based on the ligand template diagram, perform geometric consistency correction on the ligand atomic diagram, and construct the ligand molecule based on the corrected ligand atomic diagram.
[0072] It should be noted that, based on the ligand template diagram, performing geometric consistency correction on the ligand atomic diagram, and constructing the ligand molecule based on the corrected ligand atomic diagram, refers to: obtaining the center coordinates of each template node in the ligand template diagram output by the hierarchical consistency diffusion model, and the set of atomic coordinates belonging to each template node in the ligand atomic diagram; for each template node, calculating the geometric centroid of its corresponding atomic coordinate set, and calculating the deviation value between the geometric centroid and the center coordinates of the template node; if the deviation value is greater than a preset threshold, then all atomic coordinates in the atomic coordinate set are translated as a whole, so that the geometric centroid of the atomic coordinate set is aligned with the center coordinates of the template node; after correcting all the atomic coordinate sets with deviations, the final ligand molecule is constructed based on all the corrected atomic coordinates.
[0073] Preferably, the step of performing geometric consistency correction on the ligand atomic diagram based on the ligand template diagram, and constructing the ligand molecule based on the corrected ligand atomic diagram, includes: Obtain the center coordinates of each template node in the ligand template diagram, and the set of atomic coordinates belonging to each template node in the ligand atom diagram; For any template node, calculate the geometric centroid of the set of atomic coordinates corresponding to the template node, and calculate the deviation between the geometric centroid and the center coordinates of the template node; If the deviation is greater than a preset threshold, then all atomic coordinates in the atomic coordinate set are translated as a whole so that the geometric centroid is aligned with the center coordinates of the template node; Ligand molecules are constructed based on the corrected atomic coordinates.
[0074] In one embodiment, let the template-atom membership set be... (i.e., which atoms logically belong to the first...) (template), calculate the first one. The geometric centroid of the atomic group to which each template belongs If the deviation between the generated geometric centroid and the template center exceeds a threshold, then the atom group is forcibly translated. ; in, Indicates belonging to the first The set of coordinates of all atoms in a template; Represents the geometric centroid of the atomic group; This indicates that the template branch independently predicts the first... The center coordinates of each template (as "anchor points"); This indicates an assignment operation, i.e., updating the atomic coordinates.
[0075] In particular, the final molecular structure is entirely based on the types of atoms branched out from the atomic branches. and atomic type The template branching mechanism provides implicit guidance only during the generation process, allowing atomic branches to generate novel structures outside the vocabulary locally.
[0076] This invention, through constructing a protein map of the target protein pocket and extracting its topological features, transforms the three-dimensional structural information of the protein pocket into constraints that can be embedded in a hierarchical consistency diffusion model. By initializing the ligand atom map and ligand template map from noise, an initial state is provided for the subsequent back-diffusion process. Iterative back-diffusion using the hierarchical consistency diffusion model, and feature extraction and fusion utilizing atomic branches, template branches, and adaptive gating units, ensures consistency between atomic details and template structure during generation. Furthermore, by correcting the geometric consistency of the ligand atom map, the structural rationality of the generated molecule is further improved. Compared to existing technologies that suffer from low structural effectiveness and difficulties in multi-view coordination, this application improves the accuracy of molecule generation.
[0077] Optionally, in this embodiment of the invention, before inputting the normalized persistent entropy vector corresponding to the protein map into the pre-trained topology proxy network, so that the topology proxy network performs feature mapping based on the normalized persistent entropy vector and outputs pocket topology features, the method further includes: Point cloud data is extracted from the protein map to obtain pocket point cloud; wherein, the protein map contains the three-dimensional spatial coordinates and chemical feature vectors of each node of the target protein pocket; Based on the pocket point cloud, continuous cohomology calculation is performed to obtain a pocket persistent graph; Calculate the lifetime of each topological feature in the pocket persistence graph, and calculate the persistence entropy based on each lifetime; The persistent entropy is normalized to obtain a normalized persistent entropy vector.
[0078] The embodiments of the present invention extract point cloud data from protein maps and perform continuous cohomology calculation and continuous entropy normalization, thereby quantizing the geometric topological features of protein pockets into an input-friendly normalized continuous entropy vector.
[0079] Optionally, in this embodiment of the invention, the step of sampling initial noise coordinates from a standard normal distribution and sampling initial discrete states from a uniform distribution, and generating a noise atom diagram and a noise template diagram based on the initial noise coordinates and the initial discrete states, includes: The noise coordinates and noise center coordinates are obtained by sampling from a standard normal distribution; The noise type and noise template ID are obtained by sampling from a uniform distribution; Based on the noise coordinates and the noise type, a noise atom diagram is generated; A noise template image is generated based on the noise center coordinates and the noise template ID.
[0080] The embodiments of the present invention sample noise coordinates and discrete states from standard normal distribution and uniform distribution respectively, and generate noise atom diagrams and noise template diagrams based on the sampling results, which can provide an initial noise state that meets the distribution requirements for the reverse diffusion process.
[0081] Optionally, in this embodiment of the invention, the step of inputting the protein map, the pocket topology features, the noise atom map, and the noise template map into a pre-trained hierarchical consistent diffusion model, so that the hierarchical consistent diffusion model, with the protein map and the pocket topology features as constraints, iteratively executes the back diffusion process from the maximum time step to the initial time step, and outputs the ligand atom map and the ligand template map, includes: Starting from the maximum time step, the backdiffusion process is iteratively executed until the initial time step. The noise atom map and noise template map generated in the initial time step are used as ligand atom maps and ligand template maps and output. In each iteration, the hierarchical consistent diffusion model performs conditional noise prediction and unconditional noise prediction respectively, and synthesizes the prediction results into a denoising gradient based on a classifier-independent guidance strategy. According to the denoising gradient, the noise atom map and noise template map of the previous time step are generated using the backdiffusion formula.
[0082] The embodiments of the present invention perform a back diffusion process iteratively starting from the maximum time step, and perform conditional noise prediction and unconditional noise prediction in each iteration. Based on a classifier-independent guidance strategy, a denoising gradient is synthesized, which can effectively balance the fit of the generated molecule to the protein pocket and the diversity of the molecular structure.
[0083] Optionally, in this embodiment of the invention, the step of extracting features from the noise atomic graph and noise template graph of the current time step through atomic branches and template branches respectively, and dynamically adjusting the fusion weights through an adaptive gating unit to update the extracted features, performing noise prediction and type decoding based on the updated features, and generating the atomic noise, template noise, atomic type distribution, and template ID distribution of the previous time step, includes: The atomic node features are obtained by extracting features from the noisy atomic graph at the current time step through atomic branches; The template node features are obtained by extracting features from the noisy template graph at the current time step through the template branch; The adaptive gating unit calculates the fusion weight based on the current time step, and performs cross-view information fusion on the atomic node features and the template node features based on the fusion weight to obtain updated atomic node features and template node features. Noise prediction and type decoding are performed based on the updated atomic node features to obtain the atomic noise and atomic type distribution at the current time step; Noise prediction and type decoding are performed based on the updated template node features to obtain the template noise and template ID distribution at the current time step.
[0084] In this embodiment of the invention, features are extracted by atomic branches and template branches respectively, and cross-view information fusion is performed by dynamically adjusting the fusion weights according to the current time step using an adaptive gating unit, which can suppress the interference of early diffusion noise on feature extraction.
[0085] Optionally, in this embodiment of the invention, the step of performing geometric consistency correction on the ligand atomic diagram based on the ligand template diagram, and constructing the ligand molecule based on the corrected ligand atomic diagram, includes: Obtain the center coordinates of each template node in the ligand template diagram, and the set of atomic coordinates belonging to each template node in the ligand atom diagram; For any template node, calculate the geometric centroid of the set of atomic coordinates corresponding to the template node, and calculate the deviation between the geometric centroid and the center coordinates of the template node; If the deviation is greater than a preset threshold, then all atomic coordinates in the atomic coordinate set are translated as a whole so that the geometric centroid is aligned with the center coordinates of the template node; Ligand molecules are constructed based on the corrected atomic coordinates.
[0086] This invention eliminates potential local geometric distortions during atom generation by calculating the deviation between the template node center coordinates and the geometric centroid of the corresponding atom coordinate set, and by performing overall translation correction on atom groups that exceed a threshold.
[0087] Optionally, in this embodiment of the invention, before inputting the protein map, the pocket topological features, the noise atom map, and the noise template map into the pre-trained hierarchical consistency diffusion model, the method further includes: Obtain a molecularly generated sample set; Based on the molecularly generated sample set, a training strategy of staged parameter unfreezing is used to iteratively train the initial hierarchical consistent diffusion model until the hierarchical consistent diffusion model reaches the preset convergence condition, thus obtaining the optimal hierarchical consistent diffusion model. The training strategy includes three stages: the first stage, freezing the network parameters of the atomic branches; the second stage, freezing the network parameters of the template branches; and the third stage, unfreezing the network parameters of the atomic branches and the template branches.
[0088] This invention employs a phased parameter unfreezing training strategy to iteratively train a hierarchical consistency diffusion model, enabling the focus on learning template branches and atomic branches at different training stages, thus avoiding gradient competition in multi-task learning.
[0089] Optionally, in this embodiment of the invention, obtaining the molecularly generated sample set includes: Protein-ligand complex data are obtained from a drug molecule database; wherein, the protein-ligand complex data includes protein pocket structure information and ligand molecule structure information; Based on the ligand molecule structure information, the RECAP rule is used to decompose the substructure, the frequency of each substructure is counted, and the substructures with a frequency higher than a preset threshold are selected to construct a template vocabulary. A protein map is constructed based on the protein pocket structure information, and a ligand atom map is constructed based on the ligand molecule structure information. Based on the template vocabulary and the ligand molecule structure information, atoms belonging to the same template in the ligand molecule are aggregated into template nodes to construct a ligand template graph; The protein map, the ligand atom map, and the ligand template map are used as molecular generation samples corresponding to the protein-ligand complex data, and a molecular generation sample set is formed by multiple molecular generation samples corresponding to the protein-ligand complex data.
[0090] This invention provides training samples containing coarse-grained structural information for hierarchical consistency diffusion models by obtaining protein-ligand complex data from drug molecule databases, constructing a template vocabulary using RECAP rules, and building a ligand template diagram based on the template vocabulary.
[0091] Optionally, in this embodiment of the invention, before iteratively training the initial hierarchical consistent diffusion model using a phased thawing parameter training strategy based on the molecularly generated sample set, the method further includes: For any molecule-generated sample, normalized persistent entropy is calculated based on the point cloud data of the protein map and the point cloud data of the ligand atom map, and the calculation results are input into the topology proxy network, so that the topology proxy network performs feature mapping based on the calculation results and outputs pocket topology features and ligand topology features. The pocket topological features and the ligand topological features are concatenated to obtain the topological fingerprint features; Gaussian noise is gradually added to the ligand atom diagram and ligand template diagram to generate a noisy atom diagram and a noisy template diagram; The protein map, the topological fingerprint features, the noise atom map, and the noise template map are used as training input data for the hierarchical consistency diffusion model.
[0092] This invention calculates a normalized persistent entropy vector from point cloud data based on protein maps and ligand atom maps, and inputs it into a topological proxy network for feature mapping to obtain topological fingerprint features. At the same time, the ligand atom maps and ligand template maps are noise-added and used together with the protein maps and topological fingerprint features as training input data, which can provide training samples for the hierarchical consistent diffusion model that simultaneously contain geometric topological constraints and multi-granularity molecular structures.
[0093] like Figure 2 As shown, based on the above-described method embodiments, another embodiment of the molecular generation method based on a hierarchical consistent diffusion model is provided, including steps S1 to S3: Step S1: Construct a template vocabulary and extract topological fingerprint features through a topological proxy network; wherein, executing step S1 is equivalent to the action of "obtaining a molecular generation sample set" before executing step S104.
[0094] Step S2 involves training the hierarchical consistency diffusion model based on a three-stage course learning training strategy. The three stages include template warm-up, atomic alignment, and joint fine-tuning. Executing step S1 is equivalent to the action of "iteratively training the initial hierarchical consistency diffusion model using a phased parameter unfreezing training strategy" before executing step S104.
[0095] Step S3: Input the target protein pocket structure, iterate backward diffusion from random noise, check the geometric consistency of the generated molecules, and output the final ligand molecule; wherein, executing step S3 is equivalent to executing the actions of steps S101 to S105.
[0096] This invention employs a training strategy based on a three-stage curriculum learning approach to train the model, which solves the cold start problem in multi-task learning, effectively avoids model collapse, and significantly improves the structural effectiveness of generated molecules. By using an adaptive gating mechanism in the model, it can effectively shield against noise interference in the early stages of diffusion, ensuring that high-precision topological features are not overwhelmed by random noise. By using atom-dominated decoding and soft consistency constraints, it can both utilize templates to ensure a reasonable skeleton and overcome vocabulary limitations to generate novel structures.
[0097] like Figure 3 As shown, based on the above method embodiments, corresponding apparatus embodiments are provided; An embodiment of the present invention provides a molecular generation device based on a hierarchical consistent diffusion model, comprising: a protein graph construction module 301, a topological feature extraction module 302, a noise graph generation module 303, a model inference module 304, and a molecular construction module 305; The protein map construction module 301 is used to obtain a protein map of the target protein pocket; The topology feature extraction module 302 is used to input the normalized persistent entropy vector corresponding to the protein map into the pre-trained topology proxy network, so that the topology proxy network performs feature mapping based on the normalized persistent entropy vector and outputs pocket topology features. The noise graph generation module 303 is used to sample initial noise coordinates from a standard normal distribution and sample initial discrete states from a uniform distribution, and generate a noise atom graph and a noise template graph based on the initial noise coordinates and initial discrete states. The model inference module 304 is used to input the protein map, the pocket topology features, the noise atom map, and the noise template map into a pre-trained hierarchical consistent diffusion model, so that the hierarchical consistent diffusion model, with the protein map and the pocket topology features as constraints, iteratively executes the back diffusion process from the maximum time step to the initial time step, and outputs the ligand atom map and the ligand template map; wherein, in each iteration, features are extracted from the noise atom map and the noise template map of the current time step through the atom branch and the template branch, respectively, and the fusion weights are dynamically adjusted through the adaptive gating unit to update the extracted features. Based on the updated features, noise prediction and type decoding are performed to generate the atom noise, template noise, atom type distribution, and template ID distribution of the previous time step; The molecule construction module 305 is used to perform geometric consistency correction on the ligand atomic diagram based on the ligand template diagram, and construct ligand molecules based on the corrected ligand atomic diagram.
[0098] Optionally, in this embodiment of the invention, before the topological feature extraction module 302, there are further: a point cloud extraction submodule, a continuous homology calculation submodule, a continuous entropy calculation submodule, and a continuous entropy normalization submodule; The point cloud extraction submodule is used to extract point cloud data from the protein map to obtain pocket point cloud; wherein, the protein map contains the three-dimensional spatial coordinates and chemical feature vectors of each node of the target protein pocket; The persistent cohomology calculation submodule is used to perform persistent cohomology calculation based on the pocket point cloud to obtain a pocket persistent graph; The persistence entropy calculation submodule is used to calculate the lifetime of each topological feature in the pocket persistence graph and calculate the persistence entropy based on each lifetime. The persistent entropy normalization submodule is used to normalize the persistent entropy to obtain a normalized persistent entropy vector.
[0099] The embodiments of the present invention extract point cloud data from protein maps and perform continuous cohomology calculation and continuous entropy normalization, thereby quantizing the geometric topological features of protein pockets into an input-friendly normalized continuous entropy vector.
[0100] Optionally, in this embodiment of the invention, the noise map generation module 303 includes: a first noise sampling submodule, a second noise sampling submodule, a noise atom map generation submodule, and a noise template map generation submodule; The first noise sampling submodule is used to sample noise coordinates and noise center coordinates from a standard normal distribution; The second noise sampling submodule is used to sample the noise type and noise template ID from a uniform distribution; The noise atom graph generation submodule is used to generate a noise atom graph based on the noise coordinates and the noise type. The noise template generation submodule is used to generate a noise template based on the noise center coordinates and the noise template ID.
[0101] The embodiments of the present invention sample noise coordinates and discrete states from standard normal distribution and uniform distribution respectively, and generate noise atom diagrams and noise template diagrams based on the sampling results, which can provide an initial noise state that meets the distribution requirements for the reverse diffusion process.
[0102] Optionally, in this embodiment of the invention, the model reasoning module 304 includes: a model reasoning submodule; The model inference submodule is used to iteratively execute the backdiffusion process from the maximum time step to the initial time step, and output the noise atom map and noise template map generated in the initial time step as ligand atom map and ligand template map. In each iteration, the hierarchical consistent diffusion model performs conditional noise prediction and unconditional noise prediction respectively, and synthesizes the prediction results into a denoising gradient based on a classifier-independent guidance strategy. According to the denoising gradient, the noise atom map and noise template map of the previous time step are generated using the backdiffusion formula.
[0103] The embodiments of the present invention perform a back diffusion process iteratively starting from the maximum time step, and perform conditional noise prediction and unconditional noise prediction in each iteration. Based on a classifier-independent guidance strategy, a denoising gradient is synthesized, which can effectively balance the fit of the generated molecule to the protein pocket and the diversity of the molecular structure.
[0104] Optionally, in this embodiment of the invention, the model inference module 304 further includes: a first feature extraction unit, a second feature extraction unit, a feature update unit, a first feature decoding unit, and a second feature decoding unit; The first feature extraction unit is used to extract features from the noisy atomic graph at the current time step through atomic branches to obtain atomic node features; The second feature extraction unit is used to extract features from the noisy template graph at the current time step through the template branch to obtain template node features; The feature update unit is used to calculate the fusion weight based on the current time step through the adaptive gating unit, and perform cross-view information fusion on the atomic node features and the template node features based on the fusion weight to obtain updated atomic node features and template node features. The first feature decoding unit is used to perform noise prediction and type decoding based on the updated atomic node features to obtain the atomic noise and atomic type distribution at the current time step; The second feature decoding unit is used to perform noise prediction and type decoding based on the updated template node features to obtain the template noise and template ID distribution at the current time step.
[0105] In this embodiment of the invention, features are extracted by atomic branches and template branches respectively, and cross-view information fusion is performed by dynamically adjusting the fusion weights according to the current time step using an adaptive gating unit, which can suppress the interference of early diffusion noise on feature extraction.
[0106] Optionally, in this embodiment of the invention, the molecular construction module 305 includes: a coordinate acquisition submodule, a deviation calculation submodule, a coordinate translation submodule, and a molecular construction submodule; The coordinate acquisition submodule is used to acquire the center coordinates of each template node in the ligand template diagram, and the set of atomic coordinates belonging to each template node in the ligand atom diagram. The deviation calculation submodule is used to calculate the geometric centroid of the atomic coordinate set corresponding to any template node, and to calculate the deviation between the geometric centroid and the center coordinates of the template node. The coordinate translation submodule is used to translate all the atomic coordinates in the atomic coordinate set as a whole if the deviation is greater than a preset threshold, so that the geometric centroid is aligned with the center coordinates of the template node. The molecular construction submodule is used to construct ligand molecules based on all corrected atomic coordinates.
[0107] This invention eliminates potential local geometric distortions during atom generation by calculating the deviation between the template node center coordinates and the geometric centroid of the corresponding atom coordinate set, and by performing overall translation correction on atom groups that exceed a threshold.
[0108] Optionally, in this embodiment of the invention, a sample set acquisition submodule and a model training submodule are further included before the model inference module 304; The sample set acquisition submodule is used to acquire the molecular generation sample set; The model training submodule is used to iteratively train the initial hierarchical consistent diffusion model based on the molecularly generated sample set, using a phased parameter unfreezing training strategy, until the hierarchical consistent diffusion model reaches the preset convergence condition, thus obtaining the optimal hierarchical consistent diffusion model. The training strategy comprises three stages: a first stage of freezing the network parameters of the atomic branches; a second stage of freezing the network parameters of the template branches; and a third stage of unfreezing the network parameters of both the atomic branches and the template branches.
[0109] This invention employs a phased parameter unfreezing training strategy to iteratively train a hierarchical consistency diffusion model, enabling the focus on learning template branches and atomic branches at different training stages, thus avoiding gradient competition in multi-task learning.
[0110] Optionally, in this embodiment of the invention, the sample set acquisition submodule includes: a data acquisition unit, a template vocabulary construction unit, a ligand atom diagram construction unit, a ligand template diagram construction unit, and a sample set generation unit; The data acquisition unit is used to acquire protein-ligand complex data from a drug molecule database; wherein the protein-ligand complex data includes protein pocket structure information and ligand molecule structure information. The template vocabulary construction unit is used to decompose substructures based on the ligand molecule structure information using the RECAP rule, count the frequency of occurrence of each substructure, and select substructures with a frequency higher than a preset threshold to construct the template vocabulary. The ligand atom map construction unit is used to construct a protein map based on the protein pocket structure information and to construct a ligand atom map based on the ligand molecule structure information. The ligand template diagram construction unit is used to aggregate atoms belonging to the same template in the ligand molecule into template nodes based on the template vocabulary and the ligand molecule structure information, and construct a ligand template diagram. The sample set generation unit is used to use the protein map, the ligand atom map, and the ligand template map as molecular generated samples corresponding to the protein-ligand complex data, and a molecular generated sample set is composed of multiple molecular generated samples corresponding to the protein-ligand complex data.
[0111] This invention provides training samples containing coarse-grained structural information for hierarchical consistency diffusion models by obtaining protein-ligand complex data from drug molecule databases, constructing a template vocabulary using RECAP rules, and building a ligand template diagram based on the template vocabulary.
[0112] Optionally, in this embodiment of the invention, before the model training submodule, it further includes: a topology feature extraction unit, a topology feature splicing unit, a noise graph generation unit, and a training data generation unit; The topological feature extraction unit is used to calculate the normalized persistent entropy based on the point cloud data of the protein map and the point cloud data of the ligand atom map for any molecule sample, and input the calculation results into the topological proxy network, so that the topological proxy network performs feature mapping based on the calculation results and outputs pocket topological features and ligand topological features. The topological feature splicing unit is used to splice the pocket topological feature and the ligand topological feature to obtain a topological fingerprint feature; The noise map generation unit is used to progressively add Gaussian noise to the ligand atom map and the ligand template map to generate a noise atom map and a noise template map; The training data generation unit is used to use the protein map, the topological fingerprint features, the noise atom map, and the noise template map as training input data for the hierarchical consistency diffusion model.
[0113] This invention calculates a normalized persistent entropy vector from point cloud data based on protein maps and ligand atom maps, and inputs it into a topological proxy network for feature mapping to obtain topological fingerprint features. At the same time, the ligand atom maps and ligand template maps are noise-added and used together with the protein maps and topological fingerprint features as training input data, which can provide training samples for the hierarchical consistent diffusion model that simultaneously contain geometric topological constraints and multi-granularity molecular structures.
[0114] It is understood that the above-described device embodiments correspond to the method embodiments of the present invention, and can implement the molecular generation method based on a hierarchical consistency diffusion model provided by any of the above-described method embodiments of the present invention.
[0115] This invention constructs a protein map of the target protein pocket using a protein map construction module 301 and extracts the pocket's topological features using a topological feature extraction module 302. This transforms the three-dimensional structural information of the protein pocket into constraints that can be embedded in a hierarchical consistency diffusion model. A noise map generation module 303 initializes the ligand atom map and ligand template map from noise, providing an initial state for the subsequent backdiffusion process. A model inference module 304 performs iterative backdiffusion based on the hierarchical consistency diffusion model, utilizing atomic branches, template branches, and adaptive gating units for feature extraction and fusion, ensuring consistency between atomic details and template structure during generation. A molecule construction module 305 corrects the geometric consistency of the ligand atom map, further improving the structural rationality of the generated molecule. Compared to existing technologies that suffer from low structural effectiveness and difficulties in multi-view coordination, this application improves the accuracy of molecule generation.
[0116] It should be noted that the device embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can specifically be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0117] Based on the above embodiment of a molecular generation method based on a hierarchical consistent diffusion model, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a molecular generation method based on a hierarchical consistent diffusion model according to any embodiment of the present invention.
[0118] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.
[0119] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0120] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0121] Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute a molecular generation method based on a hierarchical consistency diffusion model as described in any of the above-described method embodiments of the present invention.
[0122] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0123] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A molecular generation method based on a hierarchical consistent diffusion model, characterized in that, include: Obtain a protein map of the target protein pocket; The normalized persistent entropy vector corresponding to the protein map is input into a pre-trained topology proxy network, so that the topology proxy network performs feature mapping based on the normalized persistent entropy vector and outputs pocket topology features. Initial noise coordinates are sampled from a standard normal distribution, and initial discrete states are sampled from a uniform distribution. Based on the initial noise coordinates and initial discrete states, a noise atom diagram and a noise template diagram are generated. The protein map, the pocket topology features, the noise atom map, and the noise template map are input into a pre-trained hierarchical consistent diffusion model. The hierarchical consistent diffusion model iteratively executes the back diffusion process from the maximum time step to the initial time step, using the protein map and the pocket topology features as constraints, and outputs the ligand atom map and the ligand template map. In each iteration, features are extracted from the noise atom map and the noise template map of the current time step through the atom branch and the template branch, respectively. The fusion weights are dynamically adjusted through an adaptive gating unit to update the extracted features. Based on the updated features, noise prediction and type decoding are performed to generate the atom noise, template noise, atom type distribution, and template ID distribution of the previous time step. Based on the ligand template diagram, the geometric consistency of the ligand atomic diagram is corrected, and the ligand molecule is constructed based on the corrected ligand atomic diagram.
2. The molecular generation method based on a hierarchical consistent diffusion model as described in claim 1, characterized in that, Before inputting the normalized persistent entropy vector corresponding to the protein map into the pre-trained topology proxy network, so that the topology proxy network performs feature mapping based on the normalized persistent entropy vector and outputs pocket topology features, the method further includes: Point cloud data is extracted from the protein map to obtain pocket point cloud; wherein, the protein map contains the three-dimensional spatial coordinates and chemical feature vectors of each node of the target protein pocket; Based on the pocket point cloud, continuous cohomology calculation is performed to obtain a pocket persistent graph; Calculate the lifetime of each topological feature in the pocket persistence graph, and calculate the persistence entropy based on each lifetime; The persistent entropy is normalized to obtain a normalized persistent entropy vector.
3. The molecular generation method based on a hierarchical consistent diffusion model as described in claim 1, characterized in that, The process of sampling initial noise coordinates from a standard normal distribution and initial discrete states from a uniform distribution, and generating a noise atom graph and a noise template graph based on the initial noise coordinates and initial discrete states, includes: The noise coordinates and noise center coordinates are obtained by sampling from a standard normal distribution; The noise type and noise template ID are obtained by sampling from a uniform distribution; Based on the noise coordinates and the noise type, a noise atom diagram is generated; A noise template image is generated based on the noise center coordinates and the noise template ID.
4. The molecular generation method based on a hierarchical consistent diffusion model as described in claim 1, characterized in that, The process of inputting the protein map, the pocket topology features, the noise atom map, and the noise template map into a pre-trained hierarchical consistent diffusion model, so that the hierarchical consistent diffusion model, with the protein map and the pocket topology features as constraints, iteratively executes the back diffusion process from the maximum time step to the initial time step, and outputs the ligand atom map and the ligand template map, includes: Starting from the maximum time step, the backdiffusion process is iteratively executed until the initial time step. The noise atom map and noise template map generated in the initial time step are used as ligand atom maps and ligand template maps and output. In each iteration, the hierarchical consistent diffusion model performs conditional noise prediction and unconditional noise prediction respectively, and synthesizes the prediction results into a denoising gradient based on a classifier-independent guidance strategy. According to the denoising gradient, the noise atom map and noise template map of the previous time step are generated using the backdiffusion formula.
5. The molecular generation method based on a hierarchical consistent diffusion model as described in claim 1, characterized in that, The process involves extracting features from the noise atomic graph and noise template graph at the current time step through atomic branches and template branches, respectively. An adaptive gating unit dynamically adjusts the fusion weights to update the extracted features. Based on the updated features, noise prediction and type decoding are performed to generate the atomic noise, template noise, atomic type distribution, and template ID distribution from the previous time step. This includes: The atomic node features are obtained by extracting features from the noisy atomic graph at the current time step through atomic branches; The template node features are obtained by extracting features from the noisy template graph at the current time step through the template branch; The adaptive gating unit calculates the fusion weight based on the current time step, and performs cross-view information fusion on the atomic node features and the template node features based on the fusion weight to obtain updated atomic node features and template node features. Noise prediction and type decoding are performed based on the updated atomic node features to obtain the atomic noise and atomic type distribution at the current time step; Noise prediction and type decoding are performed based on the updated template node features to obtain the template noise and template ID distribution at the current time step.
6. The molecular generation method based on a hierarchical consistent diffusion model as described in claim 1, characterized in that, The step of performing geometric consistency correction on the ligand atomic diagram based on the ligand template diagram, and constructing a ligand molecule based on the corrected ligand atomic diagram, includes: Obtain the center coordinates of each template node in the ligand template diagram, and the set of atomic coordinates belonging to each template node in the ligand atom diagram; For any template node, calculate the geometric centroid of the set of atomic coordinates corresponding to the template node, and calculate the deviation between the geometric centroid and the center coordinates of the template node; If the deviation is greater than a preset threshold, then all atomic coordinates in the atomic coordinate set are translated as a whole so that the geometric centroid is aligned with the center coordinates of the template node; Ligand molecules are constructed based on the corrected atomic coordinates.
7. The molecular generation method based on a hierarchical consistent diffusion model as described in claim 1, characterized in that, Before inputting the protein map, the pocket topological features, the noise atom map, and the noise template map into the pre-trained hierarchical consistency diffusion model, the method further includes: Obtain a molecularly generated sample set; Based on the molecularly generated sample set, a training strategy of staged parameter unfreezing is used to iteratively train the initial hierarchical consistent diffusion model until the hierarchical consistent diffusion model reaches the preset convergence condition, thus obtaining the optimal hierarchical consistent diffusion model. The training strategy includes three stages: the first stage, freezing the network parameters of the atomic branches; the second stage, freezing the network parameters of the template branches; and the third stage, unfreezing the network parameters of the atomic branches and the template branches.
8. The molecular generation method based on a hierarchical consistent diffusion model as described in claim 7, characterized in that, The acquisition of the molecularly generated sample set includes: Protein-ligand complex data are obtained from a drug molecule database; wherein, the protein-ligand complex data includes protein pocket structure information and ligand molecule structure information; Based on the ligand molecule structure information, the RECAP rule is used to decompose the substructure, the frequency of each substructure is counted, and the substructures with a frequency higher than a preset threshold are selected to construct a template vocabulary. A protein map is constructed based on the protein pocket structure information, and a ligand atom map is constructed based on the ligand molecule structure information. Based on the template vocabulary and the ligand molecule structure information, atoms belonging to the same template in the ligand molecule are aggregated into template nodes to construct a ligand template graph; The protein map, the ligand atom map, and the ligand template map are used as molecular generation samples corresponding to the protein-ligand complex data, and a molecular generation sample set is formed by multiple molecular generation samples corresponding to the protein-ligand complex data.
9. The molecular generation method based on a hierarchical consistent diffusion model as described in claim 7, characterized in that, Before iteratively training the initial hierarchical consistent diffusion model using a phased thawing parameter training strategy based on the molecularly generated sample set, the following steps are also included: For any molecule-generated sample, normalized persistent entropy is calculated based on the point cloud data of the protein map and the point cloud data of the ligand atom map, and the calculation results are input into the topology proxy network, so that the topology proxy network performs feature mapping based on the calculation results and outputs pocket topology features and ligand topology features. The pocket topological features and the ligand topological features are concatenated to obtain the topological fingerprint features; Gaussian noise is gradually added to the ligand atom diagram and ligand template diagram to generate a noisy atom diagram and a noisy template diagram; The protein map, the topological fingerprint features, the noise atom map, and the noise template map are used as training input data for the hierarchical consistency diffusion model.
10. A molecular generation device based on a hierarchical consistent diffusion model, characterized in that, include: The system includes a protein graph construction module, a topological feature extraction module, a noise graph generation module, a model inference module, and a molecular construction module. The protein map construction module is used to obtain a protein map of the target protein pocket; The topology feature extraction module is used to input the normalized persistent entropy vector corresponding to the protein map into a pre-trained topology proxy network, so that the topology proxy network performs feature mapping based on the normalized persistent entropy vector and outputs pocket topology features. The noise map generation module is used to sample initial noise coordinates from a standard normal distribution and sample initial discrete states from a uniform distribution, and generate a noise atom map and a noise template map based on the initial noise coordinates and initial discrete states. The model inference module is used to input the protein map, the pocket topology features, the noise atom map, and the noise template map into a pre-trained hierarchical consistent diffusion model. This allows the hierarchical consistent diffusion model to iteratively execute a back-diffusion process from the maximum time step to the initial time step, using the protein map and the pocket topology features as constraints, and output the ligand atom map and the ligand template map. In each iteration, features are extracted from the noise atom map and noise template map of the current time step through atomic branches and template branches, respectively. An adaptive gating unit dynamically adjusts the fusion weights to update the extracted features. Based on the updated features, noise prediction and type decoding are performed to generate the atom noise, template noise, atom type distribution, and template ID distribution of the previous time step. The molecular construction module is used to perform geometric consistency correction on the ligand atomic diagram based on the ligand template diagram, and construct ligand molecules based on the corrected ligand atomic diagram.