Molecular design model training method and device for functional dyes

CN122337412BActive Publication Date: 2026-09-22SHENZHEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610805548.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-05
Publication Date
2026-09-22
Estimated Expiration
2046-06-05

AI Technical Summary

Technical Problem

[0004]有鉴于此,本申请提供了一种针对功能性染料的分子设计模型训练方法及装置,以解决分子设计模型训练不稳定的问题

Benefits of technology

[0010]本申请实施例提供的针对功能性染料的分子设计模型训练方法,将分子设计模型划分为图编码器、潜空间扩散模型主干、条件网络,采用两阶段分步训练的方式,先利用第一数据集完成图编码器与潜空间扩散模型主干的训练,再对图编码器和潜空间扩散模型主干进行参数冻结,仅利用第二数据集对条件网络进行专项训练,一方面,将条件网络的训练独立在图编码器和潜空间扩散模型主干之外,有利于减少训练过程中各个参数之间的相互干扰、梯度冲突等,有利于提高分子设计模型训练的稳定性与收敛速度;另一方面,条件网络通过性能标签能够专注学习以对潜空间扩散模型主干进行更加精确可靠的调整,有利于提高分子设计模型在后续使用阶段的可靠性,进而提高了分子设计的精确性和可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122337412B_ABST
    Figure CN122337412B_ABST
Patent Text Reader

Abstract

The application discloses a molecular design model training method and device for functional dyes, relates to the technical field of computer processing, and the molecular design model comprises a graph encoder, a latent space diffusion model backbone and a conditional network. The conditional network is used for adjusting the latent space diffusion model backbone in the use stage of the molecular design model. The method comprises the following steps: acquiring a first data set and a second data set; training the graph encoder and the latent space diffusion model backbone based on first molecular data; and training the conditional network based on second molecular data and corresponding performance labels, in combination with the graph encoder after parameter freezing and the latent space diffusion model backbone after parameter freezing. The conditional network is trained independently, which is beneficial to reducing mutual interference and gradient conflicts between parameters in the training process, and is beneficial to improving the stability and convergence speed of the molecular design model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer processing technology, specifically to a method and apparatus for training molecular design models for functional dyes. Background Technology

[0002] Super-resolution fluorescence imaging technology has been widely used in biomedicine, materials micro-analysis, and other fields, serving as a key means for conducting high-precision microscopic observations. Functional dyes used in super-resolution imaging, as core functional materials, directly determine imaging resolution, stability, and application range through their photophysical properties. Traditional dye development relies on experimental trial and error, artificial synthesis, and performance screening, which suffers from long development cycles, high costs, and difficulties in synergistically optimizing multiple properties.

[0003] With the development of artificial intelligence technology, molecular design methods based on deep learning and diffusion models are gradually being applied to the development of functional dyes. Existing technologies typically employ an end-to-end joint training mode, training molecular structure, performance conditions, and diffusion models simultaneously. This can easily lead to mutual interference between model parameters, resulting in training instability. Summary of the Invention

[0004] In view of this, this application provides a method and apparatus for training molecular design models for functional dyes to solve the problem of unstable training of molecular design models.

[0005] In a first aspect, this application provides a method for training a molecular design model for functional dyes, wherein the molecular design model includes a graph encoder, a latent space diffusion model backbone, and a conditional network; wherein the conditional network is used to adjust the latent space diffusion model backbone during the usage phase of the molecular design model; the method includes: Obtain a first dataset and a second dataset; wherein the first dataset includes multiple first molecular data, and the second dataset includes multiple second molecular data and performance labels corresponding to each second molecular data; The graph encoder and the latent space diffusion model backbone are trained based on the first molecular data in the first dataset, and the parameters of the graph encoder and the latent space diffusion model backbone after training convergence are frozen. Based on the second molecular data and the corresponding performance labels in the second dataset, the conditional network is trained by combining the graph encoder with frozen parameters and the latent space diffusion model backbone with frozen parameters.

[0006] Secondly, this application provides a molecular design model training device for functional dyes, wherein the molecular design model includes a graph encoder, a latent space diffusion model backbone, and a conditional network; wherein the conditional network is used to adjust the latent space diffusion model backbone during the usage phase of the molecular design model; the device includes: The data acquisition module is used to acquire a first dataset and a second dataset; wherein the first dataset includes multiple first molecular data, and the second dataset includes multiple second molecular data and performance labels corresponding to each second molecular data; The first training module is used to train the graph encoder and the latent space diffusion model backbone based on the first molecular data in the first dataset, and to freeze the parameters of the graph encoder and the latent space diffusion model backbone after training convergence. The second training module is used to train the conditional network based on the second molecular data and the corresponding performance labels in the second dataset, combined with the graph encoder with frozen parameters and the latent space diffusion model backbone with frozen parameters.

[0007] Thirdly, this application provides an electronic device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the molecular design model training method for functional dyes described in the first aspect or any corresponding embodiment.

[0008] Fourthly, this application provides a computer-readable storage medium storing computer instructions for causing a computer to execute the molecular design model training method for functional dyes described in the first aspect or any of its corresponding embodiments.

[0009] Fifthly, this application provides a computer program product, including computer instructions for causing a computer to execute the molecular design model training method for functional dyes described in the first aspect or any corresponding embodiment.

[0010] The molecular design model training method for functional dyes provided in this application divides the molecular design model into a graph encoder, a latent space diffusion model backbone, and a conditional network. A two-stage, step-by-step training approach is adopted. First, the graph encoder and latent space diffusion model backbone are trained using a first dataset. Then, the parameters of the graph encoder and latent space diffusion model backbone are frozen, and the conditional network is trained specifically using only a second dataset. On the one hand, keeping the training of the conditional network separate from the graph encoder and latent space diffusion model backbone helps reduce mutual interference and gradient conflicts between parameters during training, thus improving the stability and convergence speed of the molecular design model training. On the other hand, the conditional network, through performance labels, can focus on learning to make more accurate and reliable adjustments to the latent space diffusion model backbone, which helps improve the reliability of the molecular design model in subsequent use stages, thereby improving the accuracy and reliability of molecular design. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of this application, the drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0012] Figure 1 This is a flowchart illustrating a molecular design model training method for functional dyes according to an embodiment of this application. Figure 2 An exemplary schematic diagram of a molecular design method for functional dyes is shown; Figure 3 This is a structural block diagram of a molecular design model training device for functional dyes according to an embodiment of this application; Figure 4 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. 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.

[0014] It should be noted that the information (including but not limited to user input information, such as information entered by the user into input boxes), data (including but not limited to data used for analysis, stored data, and displayed data, such as context code, all code of the current project, the service pressure corresponding to operations performed on all code of the current project, and the code development status of the current project), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with relevant laws, regulations, and standards. For example, the context code, operations performed on all code of the current project, the corresponding service pressure, and the code development status involved in this application were all obtained with full authorization.

[0015] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0016] According to an embodiment of this application, an embodiment of a method for training molecular design models for functional dyes is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0017] This embodiment provides a method for training molecular design models for functional dyes, which can be used on mobile terminals and / or servers (hereinafter referred to as electronic devices). Figure 1 This is a flowchart of a molecular design model training method for functional dyes according to an embodiment of this application, such as... Figure 1 As shown, the process includes the following steps: Step S101: Obtain the first dataset and the second dataset.

[0018] The first dataset includes multiple first-molecule data, and the second dataset includes multiple second-molecule data and the performance labels corresponding to each second-molecule data.

[0019] In this embodiment, the model is a molecular design model for functional dyes, which includes a graph encoder, a latent space diffusion model backbone, and a conditional network. The conditional network is used to adjust the latent space diffusion model backbone during the application phase of the molecular design model.

[0020] For example, the first dataset is used to train the graph encoder and the latent space diffusion model backbone, while the second dataset is used to train the conditional network. Since the conditional network is used to adjust the latent space diffusion model backbone during the molecular design model usage phase, and its training is performed after the graph encoder and latent space diffusion model backbone have been trained, and the training process of the conditional network does not affect the model parameters of the trained graph encoder and latent space diffusion model backbone, the conditional network can be understood as a fine-tuning of the model parameters of the latent space diffusion model backbone. Based on this, the first dataset can be called the large-sample dataset, and the second dataset used for fine-tuning can be called the small-sample dataset. The large-sample dataset contains more samples than the small-sample dataset; that is, the first dataset contains more first-molecule data than the second dataset contains more second-molecule data.

[0021] For example, an electronic device acquires a large amount of unlabeled first-molecule data and a small amount of second-molecule data with performance labels from multiple open-source databases, professional literature, and laboratory data, thus obtaining a first dataset and a second dataset. On the one hand, the need for performance labels is small, which helps reduce the sample labeling pressure during training; on the other hand, a large amount of first-molecule data trains the basic model (including the graph encoder and the backbone of the latent space diffusion model), while a small amount of second-molecule data and performance labels train the conditional network to optimize the parameters of the basic model. This allows the molecular design model to complete training even in data-scarce scenarios, improving the model's generalization ability and saving computational resources.

[0022] For example, in this embodiment of the application, in order to improve the practicality of the molecular device model and avoid inaccurate model output results caused by using too wide a range of models, the functional dye is a super-resolution imaging functional dye. The performance labels include, but are not limited to, at least one of the following: photostability, photobleaching, phototoxicity, fluorescence quantum yield, hydrophilicity / hydrophobicity, absorption wavelength, emission wavelength, saturation loss laser power, and scintillation duty cycle. Step S102: Train the graph encoder and the latent space diffusion model backbone based on the first molecule data in the first dataset, and freeze the parameters of the graph encoder and the latent space diffusion model backbone after training convergence.

[0023] In this embodiment of the application, after obtaining the first dataset, the electronic device trains the graph encoder and the latent space diffusion model backbone based on the first molecule data in the first dataset, and freezes the parameters of the graph encoder and the latent space diffusion model backbone after training convergence.

[0024] Step S103: Based on the second molecule data and corresponding performance labels in the second dataset, the conditional network is trained by combining the graph encoder with frozen parameters and the backbone of the latent space diffusion model with frozen parameters.

[0025] In this embodiment of the application, after obtaining the second dataset, the electronic device trains the conditional network based on the second molecular data and corresponding performance labels in the second dataset, combined with the graph encoder with frozen parameters and the backbone of the latent space diffusion model with frozen parameters.

[0026] Specifically, step S103 includes: Step S1031: Input the second molecule data into the graph encoder after parameter freezing, and the graph encoder maps the second molecule data into the corresponding original latent space vector. The original latent space vector is used to characterize the structural features of the second molecule data.

[0027] Step S1032: After standardizing the performance labels, input them into the conditional network to obtain conditional embedding features. For example, after the electronic device performs standardization post-processing on the performance labels, the conditional network encodes the standardized performance labels to obtain conditional embedding features.

[0028] For example, when standardizing performance labels, to eliminate the dominance and interference of performance labels with large data spans on model gradient propagation, the electronic device obtains the global mean and standard deviation of each performance label in the second dataset, and uses the Z-Score standardization strategy to map the global mean and standard deviation to a dimensionless numerical space with a mean of 0 and a variance of 1. For example, the vector of the performance index is y, and the global mean vector is... The standard deviation vector is The vector of performance labels after standardization for: .

[0029] Step S1033: Add Gaussian noise of different degrees to the original latent space vector to obtain a noisy latent space vector.

[0030] For example, the electronic device adds Gaussian noise to the original latent space vector to simulate the structural features of the second molecule data under different noise intensities, which is beneficial to improving the denoising and restoration capabilities of the subsequent molecular design model.

[0031] Step S1034: The conditional embedding features and the time step features of the latent space diffusion model backbone are input into the conditional network. The conditional network generates adjustment parameters that are adapted to the latent space diffusion model backbone, and the adjustment parameters are attached to the latent space diffusion model backbone.

[0032] For example, the electronic device utilizes conditional networks, combining conditional embedding features and time-step features, to dynamically generate adjustment parameters for regulating the backbone of the latent space diffusion model. These parameters are then integrated into the denoising process of the latent space diffusion model via parameter loading, facilitating the precise regulation of the latent space diffusion model based on user-input performance conditions in subsequent molecular design models. For example, performance conditions are used to characterize the performance of the molecules to be designed.

[0033] Step S1035: Denoise the noisy latent space vector by mounting the latent space diffusion model backbone with adjusted parameters, and output the denoised latent space vector.

[0034] For example, the electronic device uses the backbone of the latent space diffusion model with adjusted parameters to perform inverse denoising on the noisy latent space vector to obtain the denoised latent space vector.

[0035] Step S1036: The conditional network is trained based on the matching degree between the denoised latent space vector and the original latent space vector as the basis for loss calculation.

[0036] For example, the electronic device uses the matching degree between the denoised latent space vector and the original latent space vector as the basis for loss calculation. During the training process, the loss gradient is backpropagated to the conditional network, thereby realizing the individual optimization of the conditional network, enabling the conditional network to generate appropriate adjustment parameters more accurately according to different performance labels.

[0037] The molecular design model training method for functional dyes provided in this embodiment divides the molecular design model into a graph encoder, a latent space diffusion model backbone, and a conditional network. A two-stage, step-by-step training approach is adopted. First, the graph encoder and latent space diffusion model backbone are trained using the first dataset. Then, the parameters of the graph encoder and latent space diffusion model backbone are frozen, and the conditional network is trained specifically using only the second dataset. On the one hand, keeping the training of the conditional network separate from the graph encoder and latent space diffusion model backbone helps reduce mutual interference and gradient conflicts between parameters during training, thus improving the stability and convergence speed of the molecular design model training. On the other hand, the conditional network, through performance labels, can focus on learning to make more accurate and reliable adjustments to the latent space diffusion model backbone, which helps improve the reliability of the molecular design model in subsequent use stages, thereby improving the accuracy and reliability of molecular design.

[0038] In an exemplary embodiment, step S102 includes: Step S1021: Construct first molecular graph data based on first molecular data, with atoms as nodes and chemical bonds as edges.

[0039] Each node corresponds to an atomic node feature vector, and each edge corresponds to a chemical bond edge feature vector.

[0040] Specifically, step S1021 includes: Step S1021a: Obtain the planarity index of the fluorescent chromophore and the topological length of the conjugated system from the first molecule data.

[0041] The planarity index characterizes the rigidity of the molecular skeleton, while the topological length characterizes the atomic chain length of the conjugated skeleton electron delocalization. For example, the rigidity of the molecular skeleton is directly related to the fluorescence quantum yield of the molecule.

[0042] For example, a fluorescent chromophore refers to the structure in a molecule of a functional dye (i.e., the first molecular data) that is responsible for absorbing photons, generating electronic transitions, and emitting fluorescence.

[0043] Optionally, in this embodiment, the electronic device acquires a string of first molecule data, which is used to characterize the three-dimensional structure of the first molecule data; further, based on the three-dimensional structure, a fitting plane of the first molecule data is acquired; further, a flatness index is generated based on the distance between each atom in the fluorescent chromophore and the fitting plane; further, a topological length is generated based on the conjugated system in the three-dimensional structure. Exemplarily, the topological length is used to characterize the structure within the fluorescent chromophore. The length of an atom chain where electrons can be delocalized.

[0044] For example, the electronic device uses a first cheminformatics tool (such as ChemDraw chemical drawing software, RDKit open-source cheminformatics toolkit, UNICON compound library conversion tool, schemist molecular processing library, etc.) to obtain a string of first molecule data.

[0045] For example, after obtaining the string, the electronic device parses the string to obtain the three-dimensional coordinates of each atom in the fluorescent chromophore, and based on the three-dimensional coordinates of each atom, fits each atom to a plane using the least squares method. This plane is called the fitting plane, which is used to characterize the overall spatial orientation of the fluorescent chromophore.

[0046] For example, the formula for calculating the flatness index P is: ; Where, d i Let be the distance from the i-th atom in the first molecule data to the fitted plane. This represents the average distance.

[0047] Step S1021b: Using atoms in the first molecule data as nodes, generate atomic node feature vectors based on the flatness index.

[0048] Optionally, in this embodiment, to ensure the richness of the atomic node feature vectors and improve the accuracy of the molecular design model, the electronic device uses the flatness index as the first specific physical feature; further, the first specific physical feature and the basic atomic feature are concatenated to obtain the atomic node features; further, the atomic node features are vectorized to obtain the atomic node feature vectors. The basic atomic features include, but are not limited to, at least one of the following: atom type, atomic number, atomic charge, hybridization type, number of bonds, number of connected hydrogen atoms, aromaticity, atomic degree, number of valence electrons, and ring properties.

[0049] For example, the electronic device uses a second cheminformatics tool (such as the RDKit open-source cheminformatics toolkit, DeepChem open-source molecular machine learning library, etc.) to extract features from the first molecular data to obtain basic atomic features.

[0050] Step S1021c: Using the chemical bonds in the first molecule data as edges, generate chemical bond edge feature vectors based on topological length.

[0051] Optionally, in this embodiment, to ensure the richness of the chemical bond edge feature vector and improve the accuracy of the molecular design model, the electronic device uses topological length as a second specific physical feature; further, the second specific physical feature and the basic chemical bond feature are concatenated to obtain the chemical bond edge feature; further, the chemical bond edge feature is vectorized to obtain the chemical bond edge feature vector. The basic chemical bond feature includes, but is not limited to, at least one of the following: chemical bond type, bond order, conjugation property, aromatic bond property, intracyclic bond property, connecting atom property, and bond polarity property.

[0052] For example, electronic devices use third-party cheminformatics tools (such as the RDKit open-source cheminformatics toolkit, DeepChem open-source molecular machine learning library, etc.) to extract features from the first molecule data to obtain basic chemical bond features.

[0053] Step S1021d: Based on the feature vectors of atoms and atomic nodes, and combined with the feature vectors of chemical bonds and chemical bond edges, construct the first molecular graph data.

[0054] For example, the electronic device constructs a first molecular graph data with atoms as nodes and chemical bonds as edges. In the first molecular graph data, each node corresponds to an atomic node feature vector, and each edge corresponds to a chemical bond edge feature vector.

[0055] Step S1022: Train the graph encoder and the backbone of the latent space diffusion model based on the first molecular graph data.

[0056] For example, the electronic device trains the graph encoder using a large amount of unlabeled first molecule data; further, after the graph encoder converges, the parameters of the converged graph encoder are frozen; further, the first molecule data is input into the graph encoder with frozen parameters to obtain the first latent space vector; further, the first latent space vector is used as a training sample to train the backbone of the latent space diffusion model.

[0057] For example, the graph encoder uses a multi-layer graph attention network for message passing and outputs the mean vector of the first data molecule in the latent space. With the logarithmic variance vector log(σ) 2 The first latent space vector Z is obtained through reparameterized sampling: ; in, It is random noise independently sampled from a standard normal distribution.

[0058] For example, the loss function L of the graph encoder VAE It consists of topology reconstruction loss and KL divergence regularization term, specifically: ; Where G is the first dataset; Used to calculate the posterior probability distribution of Z given G; Used to calculate the likelihood probability of reconstructing G given Z; Used to calculate topology reconstruction loss. Used to calculate KL divergence, (0,1) is a standard normal distribution.

[0059] The molecular design model training method for functional dyes provided in this embodiment constructs first molecular graph data with atoms as nodes and chemical bonds as edges. Based on the first molecular graph data, the graph encoder and the backbone of the latent space diffusion model are trained. The first molecular graph data can better preserve the complete structural information of molecules, such as topological connections, spatial configuration, and interatomic interactions. Training based on molecular graph data is beneficial to improving the accuracy of the graph encoder and latent space diffusion model in subsequent model use, and further improves the accuracy of molecular design models.

[0060] In addition, when constructing the first molecular map data, based on the characteristics of the fluorescent chromophores contained in the functional dyes, two specific physical features, the planarity index and the topological length of the conjugated system, were introduced. The planarity index is used to characterize the rigidity of the molecular skeleton, and the topological length is used to characterize the length of the atomic chain in which the electrons of the conjugated skeleton are delocalized. This allows the encoder and the backbone of the latent space diffusion model to accurately learn the structural features closely related to fluorescence performance. Furthermore, this enables the molecular structures designed based on the molecular design model to better meet the structural requirements of the functional dyes, thereby improving the performance compliance rate of the designed molecules.

[0061] Below, in conjunction with references Figure 2 This paper introduces how to use the trained molecular design model. Specifically, it describes a molecular design method for functional dyes, including: Step S201: Obtain at least one performance condition. Exemplarily, this performance condition is information input by the user to characterize molecular design requirements.

[0062] Step S202: Input at least one performance condition into the conditional network to obtain the target parameters.

[0063] Step S203: The target parameters are attached to the backbone of the latent space diffusion model to adjust the parameters of the backbone.

[0064] Step S204: Using the latent space diffusion model backbone with adjusted parameters, reverse diffusion denoising is performed starting from the initial Gaussian noise to generate the target latent space vector.

[0065] Step S205: Input the target latent space vector into the graph encoder to reconstruct the target latent space vector and obtain the target molecular graph dataset. This target molecular graph dataset includes at least one target molecular graph.

[0066] Step S206: Verify the rationality of the target molecular map data based on preset chemical rules to obtain functional dye molecules that meet the design requirements.

[0067] This embodiment also provides a molecular design model training device for functional dyes, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0068] This embodiment provides a molecular design model training device for functional dyes. The molecular design model includes a graph encoder, a latent space diffusion model backbone, and a conditional network. The conditional network is used to adjust the latent space diffusion model backbone during the usage phase of the molecular design model. Figure 3 As shown, it includes: The data acquisition module 301 is used to acquire a first dataset and a second dataset; wherein the first dataset includes multiple first molecular data and the second dataset includes multiple second molecular data and the performance label corresponding to each second molecular data. The first training module 302 is used to train the graph encoder and the latent space diffusion model backbone based on the first molecule data in the first dataset, and to freeze the parameters of the graph encoder and the latent space diffusion model backbone after training convergence. The second training module 303 is used to train the conditional network based on the second molecular data and corresponding performance labels in the second dataset, combined with the graph encoder with frozen parameters and the backbone of the latent space diffusion model with frozen parameters.

[0069] In some alternative implementations, the second training module 303 is used for: The second molecule data is input into the graph encoder after the parameters are frozen, and the graph encoder maps the second molecule data into the corresponding original latent space vector. After standardizing the performance labels, they are input into the conditional network to obtain conditional embedding features; Adding Gaussian noise of varying degrees to the original latent space vector yields a noisy latent space vector; The conditional embedding features and the time step features of the latent space diffusion model backbone are input into the conditional network. The conditional network generates adjustment parameters that are adapted to the latent space diffusion model backbone, and the adjustment parameters are then attached to the latent space diffusion model backbone. The noisy latent space vector is denoised by mounting the latent space diffusion model backbone with adjusted parameters, and the denoised latent space vector is output. The conditional network is trained based on the matching degree between the denoised latent space vector and the original latent space vector.

[0070] In some alternative implementations, the first training module 302 is used for: Using atoms as nodes and chemical bonds as edges, a first molecular graph is constructed based on the first molecular data; where each node corresponds to an atomic node feature vector and each edge corresponds to a chemical bond edge feature vector. The graph encoder and the backbone of the latent space diffusion model are trained based on the first molecular graph data.

[0071] In some alternative implementations, the first training module 302 is further configured to: Obtain the planarity index of the fluorescent chromophore and the topological length of the conjugated system from the first molecule data; whereby the planarity index is used to characterize the rigidity of the molecular skeleton, and the topological length is used to characterize the atomic chain length of the conjugated skeleton electron delocalization. Using atoms in the first molecule data as nodes, generate atomic node feature vectors based on the flatness index; Using the chemical bonds in the first molecule data as edges, generate chemical bond edge feature vectors based on topological length; Based on the feature vectors of atoms and atomic nodes, and combined with the feature vectors of chemical bonds and chemical bond edges, the first molecular graph data is constructed.

[0072] In some alternative implementations, the first training module 302 is further configured to: Obtain the string representing the three-dimensional structure of the first molecule data; Based on the three-dimensional structure, obtain the fitting plane of the first molecule data; The flatness index is generated based on the distance between each atom in the fluorescent chromophore and the fitted plane; Topological length is generated based on the conjugate system in the three-dimensional structure.

[0073] In some alternative implementations, the first training module 302 is further configured to: Flatness index is used as the first specific physical characteristic; The first specific physical feature and the basic atomic feature are spliced ​​together to obtain the atomic node feature; The atomic node features are vectorized to obtain the atomic node feature vectors. The basic atomic characteristics include at least one of the following: atomic type, atomic number, atomic charge, hybridization type, number of bonds, number of connected hydrogen atoms, aromaticity, atomic degree, number of valence electrons, and ring properties.

[0074] In some alternative implementations, the first training module 302 is further configured to: Topological length is used as a second specific physical feature; By splicing together the second specific physical feature and the basic chemical bond feature, the chemical bond edge feature is obtained; The chemical bond edge features are vectorized to obtain the chemical bond edge feature vector. The basic chemical bond characteristics include at least one of the following: chemical bond type, bond order, conjugation property, aromatic bond property, intracyclic bond property, connecting atom property, and bond polarity property.

[0075] In some alternative implementations, the functional dye is a super-resolution imaging functional dye; the performance label includes at least one of the following: photostability, photobleaching, phototoxicity, fluorescence quantum yield, hydrophilicity / hydrophobicity, absorption wavelength, emission wavelength, saturation loss laser power, and scintillation duty cycle.

[0076] The molecular design model training device for functional dyes provided in this application can execute the molecular design model training method for functional dyes provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the above modules and units are the same as in the corresponding embodiments described above, and will not be repeated here.

[0077] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0078] The following is a detailed reference. Figure 4 The diagram illustrates a structural schematic suitable for implementing the electronic device described in the embodiments of this application. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 401, which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 402 or a program loaded from memory 408 into random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of the electronic device. The processor 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output interface 405 is also connected to the bus 404.

[0079] Typically, the following devices can be connected to the input / output interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays, speakers, vibrators, etc.; memory devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication devices 409 allow electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0080] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from memory 408, or installed from ROM 402. When the computer program is executed by processor 401, it performs the functions defined in the molecular design model training method for functional dyes according to embodiments of this application.

[0081] Figure 4 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0082] This application also provides a computer-readable storage medium. The methods described above according to this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the molecular design model training method for functional dyes shown in the above embodiments is implemented.

[0083] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0084] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.

Claims

1. A method for training molecular design models for functional dyes, characterized in that, The molecular design model includes a graph encoder, a latent space diffusion model backbone, and a conditional network; wherein, the conditional network is used to adjust the latent space diffusion model backbone during the usage phase of the molecular design model. The method includes: Obtain a first dataset and a second dataset; wherein the first dataset includes multiple first molecular data, and the second dataset includes multiple second molecular data and performance labels corresponding to each second molecular data; The graph encoder and the latent space diffusion model backbone are trained based on the first molecular data in the first dataset, and the parameters of the graph encoder and the latent space diffusion model backbone after training convergence are frozen. Based on the second molecule data and the corresponding performance labels in the second dataset, the conditional network is trained by combining the graph encoder with frozen parameters and the latent space diffusion model backbone with frozen parameters. The step of training the conditional network based on the second molecule data and the corresponding performance labels in the second dataset, combined with the graph encoder and the latent space diffusion model backbone after parameter freezing, includes: The second molecular data is input into the graph encoder after the parameters are frozen, and the graph encoder maps the second molecular data into the corresponding original latent space vector. The performance labels are standardized and then input into the conditional network to obtain conditional embedding features; Adding Gaussian noise of varying degrees to the original latent space vector yields a noisy latent space vector. The conditional embedding features and the time step features of the latent space diffusion model backbone are input into the conditional network. The conditional network generates adjustment parameters that are adapted to the latent space diffusion model backbone, and the adjustment parameters are attached to the latent space diffusion model backbone. The noisy latent space vector is denoised by attaching the latent space diffusion model backbone with the adjusted parameters, and the denoised latent space vector is output. The conditional network is trained based on the matching degree between the denoised latent space vector and the original latent space vector as the basis for loss calculation. The step of training the graph encoder and the latent space diffusion model backbone based on the first molecular data in the first dataset includes: Using atoms as nodes and chemical bonds as edges, a first molecular graph is constructed based on the first molecular data; wherein, each node corresponds to an atomic node feature vector, and each edge corresponds to a chemical bond edge feature vector; The graph encoder and the latent space diffusion model backbone are trained based on the first molecular graph data.

2. The method according to claim 1, characterized in that, The construction of the first molecular graph data based on the first molecular data, with atoms as nodes and chemical bonds as edges, includes: Obtain the planarity index of the fluorescent chromophore and the topological length of the conjugated system in the first molecule data; wherein, the planarity index is used to characterize the rigidity of the molecular skeleton, and the topological length is used to characterize the atomic chain length of the conjugated skeleton electron delocalization; Using atoms in the first molecule data as nodes, generate the atomic node feature vector based on the flatness index; Using the chemical bonds in the first molecule data as edges, generate the chemical bond edge feature vector based on the topological length; Based on the atoms and the feature vectors of the atomic nodes, and combined with the chemical bonds and the feature vectors of the chemical bond edges, the first molecular graph data is constructed.

3. The method according to claim 2, characterized in that, The step of obtaining the planarity index of the fluorescent chromophore and the topological length of the conjugated system in the first molecule data includes: Obtain a string representing the three-dimensional structure of the first molecule data; Based on the three-dimensional structure, obtain the fitting plane of the first molecule data; The flatness index is generated based on the distance between each atom in the fluorescent chromophore and the fitted plane; The topological length is generated based on the conjugate system in the three-dimensional structure.

4. The method according to claim 2, characterized in that, The process of generating the atomic node feature vector based on the flatness index includes: The flatness index is used as the first specific physical feature; The first specific physical feature and the basic atomic feature are spliced ​​together to obtain the atomic node feature; The atomic node features are vectorized to obtain atomic node feature vectors; The basic atomic characteristics include at least one of the following: atomic type, atomic number, atomic charge, hybridization type, number of bonds, number of connected hydrogen atoms, aromaticity, atomic degree, number of valence electrons, and ring properties.

5. The method according to claim 2, characterized in that, The process of generating the chemical bond edge feature vector based on the topological length includes: The topological length is used as a second specific physical feature; By splicing the second specific physical feature and the basic chemical bond feature, the chemical bond edge feature is obtained; The chemical bond edge features are vectorized to obtain chemical bond edge feature vectors; The basic chemical bond characteristics include at least one of the following: chemical bond type, bond order, conjugation property, aromatic bond property, intracyclic bond property, connecting atom property, and bond polarity property.

6. The method according to any one of claims 1 to 5, characterized in that, The functional dye is a super-resolution imaging functional dye; The performance labels include at least one of the following: photostability, phototoxicity, fluorescence quantum yield, hydrophilicity / hydrophobicity, absorption wavelength, emission wavelength, saturation loss laser power, and scintillation duty cycle.

7. A molecular design model training device for functional dyes, characterized in that, The apparatus is used to implement the molecular design model training method for functional dyes according to any one of claims 1 to 6, wherein the molecular design model includes a graph encoder, a latent space diffusion model backbone, and a conditional network; wherein the conditional network is used to adjust the latent space diffusion model backbone during the usage phase of the molecular design model; the apparatus includes: The data acquisition module is used to acquire a first dataset and a second dataset; wherein the first dataset includes multiple first molecular data, and the second dataset includes multiple second molecular data and performance labels corresponding to each second molecular data; The first training module is used to train the graph encoder and the latent space diffusion model backbone based on the first molecular data in the first dataset, and to freeze the parameters of the graph encoder and the latent space diffusion model backbone after training convergence. The second training module is used to train the conditional network based on the second molecular data and the corresponding performance labels in the second dataset, combined with the graph encoder with frozen parameters and the latent space diffusion model backbone with frozen parameters.

8. An electronic device, characterized in that, include: A memory and a processor are interconnected, the memory storing computer instructions, and the processor executing the computer instructions to perform the molecular design model training method for functional dyes as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • AI model parameter initialization method based on model parameter and structure multi-modal fusion

    CN121835755A

  • Adversarial autoencoder architecture for methods of graph to sequence models

    WO2021165887A1