A processing method and device of a photoelectric molecular generation model
By constructing a voxel tensor initialization module and a photoelectric molecule generation model, and utilizing underdamped Langevin MCMC algorithm and high-dimensional tensor mapper models, the problems of long generation cycle and limited structural types of photoelectric molecules were solved, and the rapid generation of various photoelectric molecule structures was realized.
Patent Information
- Application Number
- CN202510283219.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-03-11
AI Technical Summary
Existing methods for generating photoelectric molecules suffer from long generation cycles and limited structural types, making it difficult to meet the demand for rapid generation of a variety of photoelectric molecules.
A voxel tensor initialization module and a photoelectric molecule generation model are constructed. Sampling is performed using the underdamped Langevin MCMC algorithm. Combined with a high-dimensional tensor mapper, a 3D U-Net model, and a pre-trained Uni-Mol model, rich photoelectric molecule structures are generated.
It enables the rapid generation of various photoelectric molecular structures without being limited by human experience, shortening the generation cycle and enriching the types of molecular structures.
Smart Images

Figure CN120183559B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a photovoltaic molecule generation model processing method and device. BACKGROUND
[0002] Photovoltaic molecules have unique electronic structure and photoelectric performance, and play an important role in photoelectric conversion, light detection, optical storage and the like. At present, the conventional generation method of photovoltaic molecules is mostly realized based on experimental methods, such as synthesis method, gas phase method, solution method and the like, and all the experimental methods have problems of long experimental cycle, limited structure type and the like.
[0003] With the popularization and application of artificial intelligence (AI) technology in the field of new drug discovery, we find that a series of customized models for new drug molecule generation based on AI technology can achieve the purpose of shortening the generation cycle and enriching the structure type. Therefore, if AI technology is introduced into the field of photovoltaic molecule generation and a corresponding customized model is designed, similar improvement effects can also be achieved. Therefore, the technical problem to be solved by the present application is to design a photovoltaic molecule generation model capable of generating photovoltaic molecules with rich structures, and to train and apply the same. SUMMARY
[0004] The purpose of the present application is to provide a photovoltaic molecule generation model processing method and device, electronic equipment and computer readable storage medium, which can solve the defects of the prior art. The present application pre-constructs a voxel tensor initialization module capable of creating a voxel tensor V according to the original molecular structure M0 input by the module, a photovoltaic molecule generation model capable of generating a molecular structure and outputting a predicted molecular structure M according to the voxel tensor V input by the model, and a model training framework composed of the voxel tensor initialization module and the photovoltaic molecule generation model; then a corresponding model data set is constructed by collecting data of known photovoltaic molecular structures, and the photovoltaic molecule generation model is trained based on the model data set and the model training framework; then after the model training is completed, the step threshold s max and the sampling interval △s input by the user are received, an initial voxel tensor is initialized based on a random noise adding method, and the underdamped Langevin Markov Chain Monte Carlo (MCMC) algorithm is used to start with the initial voxel tensor to generate s maxThe step continuous sampling is performed, and a sampling voxel tensor corresponding to a current step number is extracted as a corresponding first voxel tensor every △s steps in the sampling process, and each first voxel tensor is input as a corresponding voxel tensor V into the optoelectronic molecular generation model to obtain a corresponding predicted molecular structure M, and all the predicted molecular structures M obtained are combined to form a new structure set to feed back to the current user.
[0005] To achieve the above object, an embodiment of the present application provides a processing method of an optoelectronic molecular generation model, which comprises:
[0006] A voxel tensor initialization module and an optoelectronic molecular generation model are constructed, and a model training framework is formed by the voxel tensor initialization module and the optoelectronic molecular generation model; the voxel tensor initialization module is used to create a corresponding voxel tensor V according to an original molecular structure M0 input by the module; and the optoelectronic molecular generation model is used to perform molecular structure generation processing according to the voxel tensor V input by the model and output a corresponding predicted molecular structure M;
[0007] A model data set is constructed by collecting data of known optoelectronic molecular structures, and the optoelectronic molecular generation model is trained based on the model data set and the model training framework;
[0008] After the model training is completed, a step threshold s max and a sampling interval △s input by a user are received, an initial voxel tensor is obtained through voxel tensor initialization processing, and s max step continuous sampling is performed based on the underdamped Langevin MCMC algorithm with the initial voxel tensor as a starting quantity to obtain s max sampling voxel tensors, and the sampling voxel tensor corresponding to a current step number is extracted as a first voxel tensor every △s steps in the sampling process; each first voxel tensor is input as a corresponding voxel tensor V into the optoelectronic molecular generation model to obtain a corresponding predicted molecular structure M; and all the predicted molecular structures M obtained are combined to form a corresponding new structure set to feed back to the current user.
[0009] Preferably, the voxel tensor V is a probability distribution tensor with a shape of N×L 3 , which is composed of L 3 voxel vectors v i,j,k with a length of N; and the voxel vector v i,j,kconsists of N probability values between 0 and 1; L is a preset edge length of a three-dimensional voxel grid space and L is an even number, the volume of the three-dimensional voxel grid space is L 3 greater than the maximum molecular volume in all known photoelectric molecules; the three-dimensional voxel grid space consists of L 3 voxel grids, the voxel grids are one-to-one corresponding to the voxel vectors v i,j,k , i, j, k are three-dimensional coordinates of the voxel grid, 0≤i≤L, 0≤j≤L, 0≤k≤L; the center voxel grid coordinate of the three-dimensional voxel grid space is (i=L / 2, j=L / 2, k=L / 2); N is the total number of atomic types of a preset first atomic type set, the first atomic type set is a total set of atomic types available for photoelectric molecules; the N probability values in the voxel vector v i,j,k correspond one-to-one to N types of atoms in the first atomic type set, each probability value in the voxel vector v i,j,k is used to represent the probability that the current voxel grid is occupied by an atom of a corresponding atomic type;
[0010] The predicted molecular structure M includes a plurality of atoms a p , 1≤atomic index p≤A M , A M is the total number of atoms of the predicted molecular structure M; the atomic parameters of each atom a p include atomic type t p and three-dimensional atomic coordinates c p (x, y, z); all the atomic types t p satisfy the first atomic type set;
[0011] The original molecular structure M0 includes a plurality of atoms a q , 1≤atomic index q≤A0, A0 is the total number of atoms of the original molecular structure M0; the atomic parameters of each atom a q include atomic type t q and three-dimensional atomic coordinates c q (x, y, z); all the atomic types t q satisfy the first atomic type set;
[0012] The model data set includes a plurality of collected molecular structures M S ; each of the collected molecular structures M S consists of a plurality of atoms a w , the atomic parameters of each atom a w include atomic type t w and three-dimensional atomic coordinates c w (x, y, z), 1≤atomic index w≤AS , A S The molecular structure M is collected for the current S The total number of atoms; all the molecular structures M S All of the atomic types t w All satisfy the first set of atom types.
[0013] Preferably, the voxel tensor initialization module is used to create a voxel tensor according to the original molecular structure M0 input by the module to obtain a corresponding voxel tensor V, specifically including:
[0014] The voxel tensor initialization module sets a shape of N×L 3 The all-zero tensor is used as the initial tensor V init ; The initial tensor V init By L 3 A voxel vector v of length N init,(i,j,k) Composition; the voxel vector v init,(i,j,k) It consists of N preset initialization probability values, 0<initialization probability value<1;
[0015] And for all the atoms a of the original molecular structure M0 q Perform a round of traversal; and in this round of traversal, the atom a currently traversed q As the corresponding current atom; and the three-dimensional atomic coordinate c of the current atom q (x, y, z) and the Euclidean distance between each voxel grid coordinate (i, j, k) in the three-dimensional voxel grid space to obtain a corresponding first distance, and the voxel grid corresponding to the smallest first distance is used as the corresponding current matching grid; and the voxel vector v corresponding to the current matching grid is used as the voxel vector v init,(i,j,k) As the corresponding current matching vector; and the N probability values of the current matching vector and the atom type t of the current atom q The corresponding probability value is reset to 1;
[0016] And for all the atoms a in the original molecular structure M0 q After this round of traversal, create an isotropic Gaussian distribution with a mean of 0, a standard deviation σ of the preset first standard deviation, and a shape of N×L 3 The random noise tensor NS is given by V noise =V init +NS method to obtain a corresponding noise tensor V noise ; and add noise to the current tensor V noise Identify whether all probability values in are not negative, if not, create a new random noise tensor NS for the initial tensor Vinit performing noise adding until all probability values in the latest noise added tensor V noise are not negative, if so, taking the current noise added tensor V noise as the corresponding voxel tensor V.
[0017] Preferably, the photoelectric molecule generation model comprises a high-dimensional tensor mapper, a 3D U-Net model, a molecular structure conversion module and a pre-trained Uni-Mol model.
[0018] The input end of the high-dimensional tensor mapper is connected with the input end of the photoelectric molecule generation model, and the output end is connected with the input end of the 3D U-Net model; the output end of the 3D U-Net model is connected with the input end of the molecular structure conversion module; the output end of the molecular structure conversion module is connected with the input end of the pre-trained Uni-Mol model; and the output end of the pre-trained Uni-Mol model is connected with the output end of the photoelectric molecule generation model.
[0019] The high-dimensional tensor mapper is used to map the input tensor shape N ’ ×L 3 of the 3D U-Net model from an initial dimension to a target dimension, wherein N ’ in the tensor shape N×L of the voxel tensor V inputted by the model is recorded as the initial dimension, and N 3 in the tensor shape N ’ ×L 3 of the high-dimensional encoded tensor E obtained through the high-dimensional tensor mapping of the voxel tensor V from the initial dimension to the target dimension is recorded as the target dimension; and the 3D U-Net model sends the high-dimensional encoded tensor E to the 3D U-Net model; N ’ ×L 3 in the default input tensor shape N ’ of the 3D U-Net model is 2 raised to the power of m and greater than N;
[0020] The structure of the high-dimensional tensor mapper is sequentially connected by a first residual block and a second residual block; each of the first and second residual blocks is sequentially connected by a 1×1×1 convolution layer, two 3×3×3 convolution layers and a connection unit ⊕; in the first or second residual block, the 1×1×1 convolution layer is used to increase the dimension of the input tensor of the convolution layer, each 3×3×3 convolution layer is used to encode the input tensor of the convolution layer to obtain a corresponding encoded tensor, and process the current encoded tensor based on a SiLU activation function, and the connection unit ⊕ is used to add the output tensor of the 1×1×1 convolution layer and the output tensor of the second 3×3×3 convolution layer in the residual module.
[0021] The 3D U-Net model is used to regard the high-dimensional encoding tensor E as a high-dimensional voxel tensor with noise and perform denoising voxel tensor segmentation to obtain a denoised voxel tensor V clean The denoised voxel tensor V clean has a shape of N x L 3 , which is composed of L 3 voxel vectors v clean,(i,j,k) with a length of N; and each voxel vector v clean,(i,j,k) is composed of N probability values between 0 and 1.
[0022] The molecular structure conversion module is used to perform a round of traversal on all voxel vectors v clean of the denoised voxel tensor V clean,(i,j,k) , and in the current round of traversal, the voxel vector v clean,(i,j,k) being traversed is taken as a corresponding current vector, and it is identified whether all N probability values of the current vector are lower than a preset first probability threshold value; if all N probability values of the current vector are lower than the first probability threshold value, a corresponding first voxel feature is set to 0; if at least one of the N probability values of the current vector is not lower than the first probability threshold value, the maximum value of the N probability values of the current vector is taken as a corresponding current maximum probability value, and it is identified whether the current maximum probability value is higher than a preset second probability threshold value; if yes, the corresponding first voxel feature is set to 1, and if no, the corresponding first voxel feature is set to 0; and when the obtained first voxel feature is 1, the voxel grid coordinates corresponding to the current vector are converted from voxel grid coordinates to atomic coordinate system coordinates with the center voxel grid coordinates of the three-dimensional voxel grid space as the coordinate origin (x = 0, y = 0, z = 0) of the atomic coordinate system to obtain a corresponding first atomic coordinate, and the atomic type corresponding to the current maximum probability value of the current first voxel feature is taken as a corresponding first atomic type, and a corresponding first atom is composed of the first atomic type and the first atomic coordinate obtained this time; and when the current round of traversal ends, all the first atoms obtained are composed of a corresponding first molecular structure, which is sent to the pre-trained Uni-Mol model.
[0023] The pre-training Uni-Mol model is realized based on a pre-training framework of the Uni-Mol model, and is composed of the Uni-Mol model, an atomic type prediction head, and an atomic coordinate prediction head; the Uni-Mol model is an atomic-level encoder realized by an Encoder module based on a Transformer model, the atomic type prediction head is a prediction network connected by a linear layer and a Softmax layer, and the atomic coordinate prediction head is an SE(3) equivariant prediction head and a position updating process realized based on an EGNN model; an input end of the Uni-Mol model is connected with an input end of the pre-training Uni-Mol model, a first output end is connected with an input end of the atomic type prediction head, and a second output end is connected with an input end of the atomic coordinate prediction head; the pre-training Uni-Mol model has been pre-trained in the pre-training manner of the pre-training framework of the Uni-Mol model.
[0024] The pre-training Uni-Mol model is used for structure optimization processing of the first molecular structure and outputs the corresponding predicted molecular structure M, specifically: the Uni-Mol model performs atomic-level feature coding to obtain an atomic type coding vector and an atomic pair feature matrix according to the input first molecular structure, and sends the atomic type coding vector to the atomic type prediction head and the atomic pair feature matrix to the atomic coordinate prediction head; the atomic type prediction head performs atomic type prediction to obtain a plurality of predicted atomic types according to the atomic type coding vector; the atomic coordinate prediction head performs atomic coordinate prediction to obtain a plurality of predicted atomic coordinates according to the atomic pair feature matrix, the predicted atomic coordinates correspond one-to-one to the predicted atomic types; each predicted atomic type is taken as a corresponding atomic type t p , and each predicted atomic coordinate corresponding to the predicted atomic type is taken as a corresponding three-dimensional atomic coordinate c p (x, y, z), and each atomic type t p and the corresponding three-dimensional atomic coordinate c p (x, y, z) form a corresponding atom a p ; and all the atoms a p obtained form a corresponding predicted molecular structure M.
[0025] Preferably, the photoelectric molecular generation model is trained based on the model data set and the model training framework, specifically including:
[0026] In step 501, the voxel tensor initialization module and the photoelectric molecular generation model of the model training framework are taken as corresponding current initialization modules and current generation models;
[0027] Step 502, based on a preset first split ratio, splitting the model dataset into two sub-datasets, denoted as a corresponding first training set and a first evaluation set;
[0028] Wherein, the first training set and the first evaluation set are both composed of a plurality of the collected molecular structures M S The total number ratio of molecular structures of the first training set and the first evaluation set meets the first split ratio;
[0029] Step 503, taking the first collected molecular structure M S of the first training set as a corresponding current training structure;
[0030] Step 504, taking the current training structure as a corresponding original molecular structure M0input into the current initialization module for processing to obtain a corresponding voxel tensor V; and taking the initial tensor V init generated by adding noise to the current voxel tensor V as a corresponding first label tensor;
[0031] Step 505, inputting the current voxel tensor V into the high-dimensional tensor mapper of the current generation model for processing to obtain a corresponding high-dimensional encoding tensor E; and inputting the current high-dimensional encoding tensor E into the 3D U-Net model of the current generation model for processing to obtain a corresponding denoised voxel tensor V clean ; and taking the current denoised voxel tensor V clean as a corresponding first prediction tensor;
[0032] Step 506, taking the first prediction tensor and the first label tensor corresponding to the current training structure into a preset first model loss function L M1 to obtain a corresponding first loss value;
[0033] Wherein, the first model loss function L M1 is realized based on an L1 loss function, an L2 loss function or a cross-entropy loss function;
[0034] Step 507, identifying whether the first loss value meets a preset first loss value range; if the first loss value meets the first loss value range, identifying whether the current training structure is the last collected molecular structure M S of the first training set, if yes, turning to step 508, and if no, taking the next collected molecular structure M SStep 504, if the first loss value meets the first loss value range, the current training structure is updated as a new current training structure and returns to step 504; if the first loss value does not meet the first loss value range, the first model optimizer is used to adjust the model parameters of the high-dimensional tensor mapper and the 3D U-Net model in a direction in which the first model loss function L M1 Step 505, a round of modulation is performed on the model parameters of the high-dimensional tensor mapper and the 3D U-Net model, and returns to step 505 at the end of the round of modulation;
[0035] The first model optimizer includes at least an Adam optimizer and an SGD optimizer.
[0036] Step 508, a round of traversal is performed on all the acquisition molecular structures M S in the first evaluation set; and during the round of traversal, the acquisition molecular structure M S being currently traversed is taken as a corresponding current evaluation structure; the current evaluation structure is taken as a corresponding original molecular structure M0 and input into the current initialization module to obtain a corresponding voxel tensor V; the initial tensor V init generated by adding noise in the process of processing is taken as a corresponding second label tensor; the current voxel tensor V is input into the high-dimensional tensor mapper to obtain a corresponding high-dimensional encoding tensor E; the current high-dimensional encoding tensor E is input into the 3D U-Net model to obtain a corresponding denoised voxel tensor V clean ; the current denoised voxel tensor V clean is taken as a corresponding second prediction tensor; a corresponding first prediction-label pair is formed by the second prediction tensor and the second label tensor corresponding to the current evaluation structure; and at the end of the round of traversal, all the first prediction-label pairs obtained are taken into a preset first model evaluation function to obtain a corresponding first evaluation value.
[0037] The first model evaluation function is implemented based on a MAE function, a MSE function or a RMSE function.
[0038] Step 509, whether the first evaluation value meets a preset first evaluation value range is identified; if yes, step 510 is turned to; if no, step 503 is returned to continue training.
[0039] Step 510, the model dataset is divided into two sub-datasets based on a preset second segmentation ratio, which are taken as a corresponding second training set and a second evaluation set.
[0040] The second training set and the second evaluation set are both composed of a plurality of acquisition molecular structures M Scompositions; a ratio of a total number of molecular structures of the second training set and the second evaluation set satisfies the first split ratio;
[0041] Step 511, taking a first of the collection molecular structures M S as a corresponding current training structure;
[0042] Step 512, taking the current training structure as a corresponding first label structure; and inputting the current training structure as a corresponding original molecular structure M0 into the current initialization module to obtain a corresponding voxel tensor V; and inputting the current voxel tensor V into the high-dimensional tensor mapper to obtain a corresponding high-dimensional encoding tensor E; and inputting the current high-dimensional encoding tensor E into the 3D U-Net model to obtain a corresponding denoised voxel tensor V clean ; and inputting the current denoised voxel tensor V clean into the molecular structure conversion module of the current generation model to obtain a corresponding first molecular structure;
[0043] Step 513, inputting the current first molecular structure into the pre-trained Uni-Mol model of the current generation model to obtain a corresponding predicted molecular structure M; and taking the current predicted molecular structure M as a corresponding first predicted structure;
[0044] Step 514, taking the first predicted structure corresponding to the current training structure and the first label structure into a preset second model loss function L M2 to obtain a corresponding second loss value;
[0045] Wherein, the second model loss function L M2 is realized based on an L1 loss function, an L2 loss function or a cross-entropy loss function;
[0046] Step 515, identifying whether the second loss value satisfies a preset second loss value range; if the second loss value satisfies the second loss value range, identifying whether the current training structure is a last of the collection molecular structures M S of the second training set, if yes, turning to step 516, if no, taking a next of the collection molecular structures M S of the second training set as a new current training structure and returning to step 512; if the second loss value does not satisfy the second loss value range, performing a round of fine-tuning on model parameters of the pre-trained Uni-Mol model in a direction of making the second model loss function L M2 reach a minimum value based on a preset second model optimizer, and returning to step 513 when the round of fine-tuning ends.
[0047] wherein, the second model optimizer comprises at least an Adam optimizer, an SGD optimizer;
[0048] Step 516, for all the collection molecular structures M S in the second evaluation set, a round of iteration is performed; and in the current round of iteration, the collection molecular structure M S being iterated is taken as a corresponding current evaluation structure; the current evaluation structure is taken as a corresponding second label structure; the current evaluation structure is taken as a corresponding original molecular structure M0 and input into the current initialization module for processing to obtain a corresponding voxel tensor V; the current voxel tensor V is input into the high-dimensional tensor mapper for processing to obtain a corresponding high-dimensional encoding tensor E; the current high-dimensional encoding tensor E is input into the 3D U-Net model for processing to obtain a corresponding denoised voxel tensor V clean ; the current denoised voxel tensor V clean is input into the molecular structure conversion module for processing to obtain a corresponding first molecular structure; the current first molecular structure is input into the pre-trained Uni-Mol model for processing to obtain a corresponding predicted molecular structure M; the current predicted molecular structure M is taken as a corresponding second predicted structure; the second predicted structure corresponding to the current evaluation structure and the second label structure form a corresponding second prediction-label pair; and when the current round of iteration ends, all the second prediction-label pairs obtained are taken into a pre-set second model evaluation function for calculation to obtain a corresponding second evaluation value;
[0049] wherein, the second model evaluation function is realized based on an MAE function, an MSE function or an RMSE function;
[0050] Step 517, whether the second evaluation value meets a pre-set second evaluation value range is identified; if not, the step 511 is returned to continue training; if yes, the training is stopped and it is confirmed that the model training is ended.
[0051] Preferably, the voxel tensor initialization processing obtains a corresponding initial voxel tensor, and specifically comprises:
[0052] a full zero tensor with a shape of N x L 3 is set as a corresponding first tensor V1; the first tensor V1 is composed of L 3 body voxel vectors v 1,(i,j,k) with a length of N; the body voxel vector v 1,(i,j,k) is composed of N preset initialization probability values, 0 < initialization probability value < 1;
[0053] and create a random noise tensor NA satisfying an isotropic Gaussian distribution with a mean of 0 and a standard deviation σ of a preset first standard deviation and a shape of N×L 3 ; obtain a corresponding second tensor V2 in a manner of V2=V1+NA; and identify whether all probability values in the current second tensor V2 are not negative, if not, create a new random noise tensor NA to add noise to the first tensor V1 again until all probability values in the latest second tensor V2 are not negative, if yes, take the current second tensor V2 as the corresponding initial voxel tensor.
[0054] Preferably, the underdamped Langevin MCMC algorithm starts from the initial voxel tensor to obtain s max sampled voxel tensors in s max steps, and in the sampling process, the sampled voxel tensor corresponding to the current step is extracted as a corresponding first voxel tensor every △s steps, specifically including:
[0055] a first variable y s=0 is set as the corresponding initial voxel tensor, and a second variable v s=0 is set as 0; and y s=0 , v s=0 are brought into the underdamped Langevin MCMC algorithm formula to obtain s max first variables y max and second variables v 1≤s in s 1≤s steps; the s max first variables y 1≤s are taken as the s max sampled voxel tensors; and in the sampling process, the first variable y 1≤s corresponding to the sampled voxel tensor with a sampling step s being a non-zero integer multiple of △s is taken as a corresponding first voxel tensor.
[0056] wherein, 0≤sampling step s≤s max ;
[0057] The underdamped Langevin MCMC algorithm formula is:
[0058]
[0059] δ is a preset step parameter, u is a preset inverse mass parameter, γ is a preset friction parameter; ε is a random noise tensor satisfying an isotropic Gaussian distribution with a mean of 0 and a standard deviation σ of a preset first standard deviation and a shape of N×L 3 ; y s , y s+1respectively the first variable of the s, s+1 step; v s , v s+1 respectively the second variable of the s, s+1 step; g θ () is a score function, and θ is an inbuilt parameter of the score function.
[0060] The second aspect of the embodiment of the application provides a device for implementing the processing method of the photoelectric molecular generation model in the first aspect, and the device comprises a model construction module, a model training module and a model application module.
[0061] The model construction module is used for constructing a voxel tensor initialization module and a photoelectric molecular generation model, and a model training framework is composed of the voxel tensor initialization module and the photoelectric molecular generation model; the voxel tensor initialization module is used for creating a voxel tensor V corresponding to an original molecular structure M0 input by the module according to the original molecular structure M0; and the photoelectric molecular generation model is used for performing molecular structure generation processing according to the voxel tensor V input by the model and outputting a corresponding predicted molecular structure M.
[0062] The model training module is used for constructing a corresponding model data set by collecting data of known photoelectric molecular structures, and training the photoelectric molecular generation model based on the model data set and the model training framework.
[0063] The model application module is used for receiving a step threshold s max and a sampling interval Δs input by a user after the model training ends, performing voxel tensor initialization processing to obtain a corresponding initial voxel tensor, and performing s max step continuous sampling based on the initial voxel tensor as a starting quantity to obtain s max sampled voxel tensors, and extracting the sampled voxel tensor corresponding to the current step as a corresponding first voxel tensor every Δs steps in the sampling process; and inputting each first voxel tensor as a corresponding voxel tensor V into the photoelectric molecular generation model to obtain a corresponding predicted molecular structure M, and feeding back a new structure set composed of all the predicted molecular structures M obtained this time to the user.
[0064] The third aspect of the embodiment of the application provides an electronic device, comprising a memory, a processor and a transceiver.
[0065] The processor is used for coupling with the memory, reading and executing instructions in the memory to realize the method steps in the first aspect.
[0066] The transceiver is coupled with the processor, and the transceiver is controlled by the processor to perform message transceiving.
[0067] The fourth aspect of the embodiment of the present application provides a computer readable storage medium, which stores computer instructions, and the computer instructions make the computer execute the method of the first aspect when executed by the computer.
[0068] The embodiment of the present application provides a photoelectric molecular generation model processing method and device, electronic equipment and computer readable storage medium. From the above content, it can be known that the embodiment of the present application pre-constructs a voxel tensor initialization module capable of creating a voxel tensor V according to the original molecular structure M0 input by a module, a photoelectric molecular generation model capable of generating a molecular structure according to the voxel tensor V input by a model and outputting a predicted molecular structure M, and a model training framework composed of the voxel tensor initialization module and the photoelectric molecular generation model; then, a corresponding model data set is constructed by collecting data of known photoelectric molecular structures, and the photoelectric molecular generation model is trained based on the model data set and the model training framework; then, after the model training is completed, the step threshold s max and the sampling interval △s are received, an initial voxel tensor is initialized based on a random noise adding mode, and the s max step continuous sampling is performed based on the underdamped Langevin MCMC algorithm with the initial voxel tensor as a starting quantity, and in the sampling process, the sampling voxel tensor corresponding to the current step is extracted as a corresponding first voxel tensor every △s steps, each first voxel tensor is input into the photoelectric molecular generation model as a corresponding voxel tensor V, a corresponding predicted molecular structure M is obtained by processing, and all the obtained predicted molecular structures M form a new structure set to feed back to the current user. The photoelectric molecular generation model based on the embodiment of the present application can generate a plurality of molecular structures at one time without being limited by artificial experience, and the embodiment of the present application shortens the generation period and enriches the types of molecular structures. BRIEF DESCRIPTION OF DRAWINGS
[0069] Figure 1 A photoelectric molecular generation model processing method provided for the first embodiment of the present application is shown in the figure;
[0070] Figure 2 A module structure diagram of a photoelectric molecular generation model and a model training framework provided for the first embodiment of the present application is shown in the figure;
[0071] Figure 3 A module structure diagram of a photoelectric molecular generation model processing device provided for the second embodiment of the present application is shown in the figure;
[0072] Figure 4A structural schematic diagram of an electronic device provided for the third embodiment of the present application. DETAILED DESCRIPTION
[0073] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0074] The present application provides a processing method of a photoelectric molecular generation model, as shown in Figure 1 The present application provides a processing method of a photoelectric molecular generation model, as shown in
[0075] Step 1, constructing a voxel tensor initialization module and a photoelectric molecular generation model; and a model training framework is composed of the voxel tensor initialization module and the photoelectric molecular generation model.
[0076] Here, the voxel tensor initialization module of the present application is used to create a corresponding voxel tensor V according to the original molecular structure M0 input by the module; and the photoelectric molecular generation model of the present application is used to perform molecular structure generation processing according to the voxel tensor V input by the model and output a corresponding predicted molecular structure M.
[0077] The voxel tensor V of the present application is a probability distribution tensor with a shape of N x L 3 , which is composed of L 3 body voxel vectors v i,j,k with a length of N; each body voxel vector v i,j,k is composed of N probability values between 0 and 1. Wherein:
[0078] 1) L is a preset edge length of a three-dimensional voxel grid space and L is an even number, the volume of the three-dimensional voxel grid space is L 3 greater than the maximum molecular volume in all known photoelectric molecules; the three-dimensional voxel grid space is composed of L 3 voxel grids, and each voxel grid corresponds to a body voxel vector v i,j,k ; the subscripts i, j and k are three-dimensional coordinates of the voxel grid, 0≤i≤L, 0≤j≤L, 0≤k≤L; the center voxel grid coordinate of the three-dimensional voxel grid space is (i=L / 2, j=L / 2, k=L / 2);
[0079] 2) N is a preset total number of atomic types of a first atomic type set, and the first atomic type set is a total set of atomic types that can be used for photoelectric molecules;
[0080] 3) the N probability values in the voxel vector v i,j,k correspond one-to-one to the N types of atomic types in the first set of atomic types, the voxel vector v i,j,k Each probability value in the voxel vector v
[0081] The predicted molecular structure M of the embodiment of the present application comprises a plurality of atoms a p ; wherein, 1≤atomic index p≤A M , A M is the total number of atoms of the predicted molecular structure M; the atomic parameters of each atom a p include the atomic type t p and the three-dimensional atomic coordinates c p (x, y, z); all atomic types t p satisfy the first set of atomic types.
[0082] The original molecular structure M0 of the embodiment of the present application comprises a plurality of atoms a q ; wherein, 1≤atomic index q≤A0, A0 is the total number of atoms of the original molecular structure M0; the atomic parameters of each atom a q include the atomic type t q and the three-dimensional atomic coordinates c q (x, y, z); all atomic types t q satisfy the first set of atomic types.
[0083] It should be noted that the voxel tensor initialization module is used to create a corresponding voxel tensor V according to the original molecular structure M0 input by the module, which specifically includes:
[0084] Step A1, the voxel tensor initialization module sets a full zero tensor with a shape of N×L 3 as an initial tensor V init ;
[0085] Here, the initial tensor V init is composed of L 3 vectors v init,(i,j,k) with a length of N; the voxel vector v init,(i,j,k) is composed of N preset initialization probability values, 0
[0086] Step A2, all atoms a q of the original molecular structure M0 are traversed once; and in the current traversal process, the atom a q being traversed is taken as the corresponding current atom; and the three-dimensional atomic coordinates c qThe Euclidean distance between (x, y, z) and each voxel grid coordinate (i, j, k) in the three-dimensional voxel grid space is calculated to obtain the corresponding first distance, and the voxel grid corresponding to the smallest first distance is used as the corresponding current matching grid; and the voxel vector v corresponding to the current matching grid is calculated. init,(i,j,k) As the corresponding current matching vector; and the N probability values of the current matching vector are compared with the atom type t of the current atom q The corresponding probability value is reset to 1;
[0087] Step A3, and in the original molecular structure M0 all atoms a q After this round of traversal, create an isotropic Gaussian distribution with a mean of 0, a standard deviation σ of the preset first standard deviation, and a shape of N×L 3 The random noise tensor NS is obtained by V noise =V init +NS method to obtain a corresponding noise tensor V noise ; and add noise to the current tensor V noise Identify whether all probability values in are not negative, if not, create a new random noise tensor NS for the initial tensor V init Noise until the latest noise tensor V noise Until all probability values in are not negative, if so, the current noise tensor V noise as the corresponding voxel tensor V.
[0088] Here, the first standard deviation is a preset standard deviation value.
[0089] It should also be noted that if Figure 2 As shown in the module structure diagram of the photoelectric molecular generation model and model training framework provided in Example 1 of the present invention, the photoelectric molecular generation model of the embodiment of the present invention includes a high-dimensional tensor mapper, a 3D U-Net model, a molecular structure conversion module and a pre-trained Uni-Mol model.
[0090] The connection relationship between the components of the photoelectric molecular generation model is as follows: the input end of the high-dimensional tensor mapper is connected to the input end of the photoelectric molecular generation model, and the output end is connected to the input end of the 3D U-Net model; the output end of the 3D U-Net model is connected to the input end of the molecular structure conversion module; the output end of the molecular structure conversion module is connected to the input end of the pre-trained Uni-Mol model; and the output end of the pre-trained Uni-Mol model is connected to the output end of the photoelectric molecular generation model.
[0091] The functions of each component of the optoelectronic molecule generation model are shown below.
[0092] 1) High-dimensional tensor mapper:
[0093] The high-dimensional tensor mapper of the embodiment of the present application is used to map the input tensor shape N ’ ×L 3 of the 3D U-Net model to a target dimension, record N ’ in the tensor shape N×L 3 of the voxel tensor V input by the model as an initial dimension, and perform high-dimensional tensor mapping processing on the voxel tensor V from the initial dimension to the target dimension to obtain a high-dimensional encoding tensor E with a shape of N ’ ×L 3 and send it to the 3D U-Net model. Here, N ’ ×L 3 in the default input tensor shape N ’ of the 3D U-Net model is 2 raised to the power of N and greater than N.
[0094] As shown in Figure 2 , the structure of the high-dimensional tensor mapper is sequentially connected by the first and second residual blocks; wherein the first and second residual blocks are each sequentially connected by a 1×1×1 convolution layer, two 3×3×3 convolution layers, and a connection unit ⊕; and in the first or second residual block: a) the 1×1×1 convolution layer is used to upgrade the dimension of the input tensor of the convolution layer, b) each 3×3×3 convolution layer is used to encode the input tensor of the convolution layer to obtain a corresponding encoding tensor, and process the current encoding tensor based on a SiLU activation function, c) the connection unit ⊕ is used to add the output tensor of the 1×1×1 convolution layer and the output tensor of the second 3×3×3 convolution layer in the residual module.
[0095] 2) 3D U-Net model:
[0096] The 3D U-Net model of the embodiment of the present application is used to regard the high-dimensional encoding tensor E as a high-dimensional voxel tensor with noise and perform denoising voxel tensor segmentation to obtain a denoised voxel tensor V clean with a shape consistent with the shape of the voxel tensor V input by the model and send it to the molecular structure conversion module. Here, the shape of the denoised voxel tensor V clean is N×L 3 , which is composed of L 3 voxel vectors v clean,(i,j,k) with a length of N; and the voxel vector v clean,(i,j,k) is composed of N probability values with values between 0 and 1.
[0097] It should be noted that the detailed model structure of the 3D U-Net model used in the embodiments of the present application can be understood through the public technical document A 3D U-Net: Learning Dense Volumetric Segmentation from Sparse Annotation, and will not be further described here.
[0098] 3) molecular structure conversion module:
[0099] The molecular structure conversion module of the embodiments of the present application is used to perform a round of traversal on all voxel vectors v clean of the denoised voxel tensor V clean,(i,j,k) ; and in the round of traversal, the current traversed voxel vector v clean,(i,j,k) is taken as the corresponding current vector, and it is identified whether all N probability values of the current vector are lower than a preset first probability threshold value; if all N probability values of the current vector are lower than the first probability threshold value, a corresponding first voxel feature is set to 0; if at least one of the N probability values of the current vector is not lower than the first probability threshold value, the maximum value of the N probability values of the current vector is taken as a corresponding current maximum probability value, and it is identified whether the current maximum probability value is higher than a preset second probability threshold value; if yes, the corresponding first voxel feature is set to 1, and if no, the corresponding first voxel feature is set to 0; and when the obtained first voxel feature is 1, the voxel grid coordinates (i, j, k) corresponding to the current vector are converted from voxel grid coordinates to atomic coordinate system coordinates with the center voxel grid coordinates of the three-dimensional voxel grid space as the coordinate origin (x = 0, y = 0, z = 0) of the atomic coordinate system to obtain a corresponding first atomic coordinate, and the atomic type corresponding to the current maximum probability value of the current first voxel feature is taken as a corresponding first atomic type, and then a corresponding first atom is composed of the obtained first atomic type and first atomic coordinate; and when the round of traversal ends, all the obtained first atoms are taken to form a corresponding first molecular structure, which is sent to the pre-trained Uni-Mol model. Here, the first and second probability threshold values are two preset probability parameters.
[0100] 4) pre-trained Uni-Mol model:
[0101] The pre-training Uni-Mol model of the embodiment of the application is implemented based on a pre-training framework structure of the Uni-Mol model, and is composed of a Uni-Mol model, an atomic type prediction head and an atomic coordinate prediction head; wherein the Uni-Mol model is an atomic-level encoder implemented by an Encoder module based on a Transformer model, the atomic type prediction head is a prediction network connected by a linear layer and a Softmax layer, and the atomic coordinate prediction head is an SE(3) equivariant prediction head and a position updating process implemented based on an EGNN model. The input end of the Uni-Mol model is connected with the input end of the pre-training Uni-Mol model, the first output end is connected with the input end of the atomic type prediction head, and the second output end is connected with the input end of the atomic coordinate prediction head. It should be noted that the pre-training framework of the Uni-Mol model and the specific model structure implementation manner of the Uni-Mol model, the atomic type prediction head and the atomic coordinate prediction head mentioned in the above content can be further understood by the public technical document B <Uni-Mol: A Universal 3D Molecular Representation Learning Framework>, and will not be further described here. It should be further noted that the pre-training Uni-Mol model of the embodiment of the application has been pre-trained in the pre-training manner of the pre-training framework of the Uni-Mol model, that is, it has been pre-trained according to the data sets and training methods mentioned in the public technical document B.
[0102] The pre-training Uni-Mol model of the embodiment of the application is used for structure optimization processing of the first molecular structure and outputs a corresponding predicted molecular structure M, specifically: the Uni-Mol model performs atomic-level feature coding according to the input first molecular structure to obtain a corresponding atomic type coding vector and an atomic pair feature matrix, and sends the atomic type coding vector to the atomic type prediction head and sends the atomic pair feature matrix to the atomic coordinate prediction head; and the atomic type prediction head performs atomic type prediction according to the atomic type coding vector to obtain a plurality of predicted atomic types; and the atomic coordinate prediction head performs atomic coordinate prediction according to the atomic pair feature matrix to obtain a plurality of predicted atomic coordinates, the predicted atomic coordinates correspond one-to-one to the predicted atomic types; and each predicted atomic type is taken as a corresponding atomic type t p , the predicted atomic coordinates corresponding to each predicted atomic type are taken as a corresponding three-dimensional atomic coordinate c p (x, y, z), and each atomic type t p and the corresponding three-dimensional atomic coordinate c p (x, y, z) of each atomic type t p composes a corresponding atom a p , and all the atoms a p compose a corresponding predicted molecular structure M.
[0103] It should be noted that, as shown in Figure 2 The model training framework of the embodiment of the present application is sequentially connected by a voxel tensor initialization module and a photoelectric molecule generation model.
[0104] Step 2, constructing a corresponding model data set by data acquisition on known photoelectric molecule structures; and training the photoelectric molecule generation model based on the model data set and the model training framework;
[0105] Specifically, step 21, constructing a corresponding model data set by data acquisition on known photoelectric molecule structures;
[0106] Here, the model data set of the embodiment of the present application includes a plurality of acquisition molecule structures M S ; Each acquisition molecule structure M S is composed of a plurality of atoms a w , and the atomic parameters of each atom a w include atomic type t w and three-dimensional atomic coordinates c w (x, y, z), 1≤atomic index w≤A S , A S is the total number of atoms of the current acquisition molecule structure M S ; All atomic types t S of all acquisition molecule structures M w satisfy the first atomic type set;
[0107] Step 22, and training the photoelectric molecule generation model based on the model data set and the model training framework;
[0108] Specifically, step 22-1, the voxel tensor initialization module and the photoelectric molecule generation model of the model training framework are taken as the corresponding current initialization module and the current generation model;
[0109] Step 22-2, based on the first segmentation ratio, the model data set is segmented into two sub-data sets, denoted as the corresponding first training set and the first evaluation set;
[0110] Here, the first segmentation ratio is a pre-set ratio parameter, for example, 8:2; The first training set and the first evaluation set are composed of a plurality of acquisition molecule structures M S ; The total number of molecule structures of the first training set and the first evaluation set satisfies the first segmentation ratio;
[0111] Step 22-3, taking the first acquisition molecule structure M S of the first training set as the corresponding current training structure;
[0112] Step 22-4, inputting the current training structure as a corresponding original molecular structure M0 into the current initialization module to obtain a corresponding voxel tensor V; and obtaining an initial tensor V for generating the current voxel tensor V by adding noise in the processing process init as a corresponding first label tensor;
[0113] Step 22-5, inputting the current voxel tensor V into a high-dimensional tensor mapper of the current generation model to obtain a corresponding high-dimensional encoding tensor E; and inputting the current high-dimensional encoding tensor E into a 3D U-Net model of the current generation model to obtain a corresponding denoised voxel tensor V clean ; and inputting the current denoised voxel tensor V clean as a corresponding first prediction tensor;
[0114] Step 22-6, inputting the first prediction tensor and the first label tensor corresponding to the current training structure into a preset first model loss function L M1 to obtain a corresponding first loss value;
[0115] Here, the first model loss function L M1 of the embodiment of the application is realized based on an L1 loss function, an L2 loss function or a cross-entropy loss function;
[0116] Step 22-7, identifying whether the first loss value meets a preset first loss value range; if the first loss value meets the first loss value range, identifying whether the current training structure is the last collected molecular structure M S of the first training set; if yes, turning to step 22-8; if no, taking the next collected molecular structure M S of the first training set as a new current training structure and returning to step 22-4; if the first loss value does not meet the first loss value range, performing one round of modulation on model parameters of the high-dimensional tensor mapper and the 3D U-Net model in a direction of making the first model loss function L M1 reach a minimum value based on a preset first model optimizer, and returning to step 22-5 at the end of the round of modulation;
[0117] Here, the first loss value range of the embodiment of the application is a pre-set numerical range; and the first model optimizer at least includes an Adam optimizer and an SGD optimizer;
[0118] Step 22-8, performing one round of traversal on all collected molecular structures M S of the first evaluation set; and in the round of traversal, taking the currently traversed collected molecular structure M Sas a corresponding current evaluation structure; and inputting the current evaluation structure as a corresponding original molecular structure M0 into the current initialization module to obtain a corresponding voxel tensor V, and generating an initial tensor V of the current voxel tensor V by adding noise in the processing process init as a corresponding second label tensor; and inputting the current voxel tensor V into the high-dimensional tensor mapper to obtain a corresponding high-dimensional encoding tensor E; and inputting the current high-dimensional encoding tensor E into the 3D U-Net model to obtain a corresponding denoised voxel tensor V clean ; and inputting the current denoised voxel tensor V clean as a corresponding second prediction tensor; and forming a corresponding first prediction-label pair by the second prediction tensor corresponding to the current evaluation structure and the second label tensor; and when the current iteration ends, bringing all the obtained first prediction-label pairs into a preset first model evaluation function to obtain a corresponding first evaluation value;
[0119] Here, the first model evaluation function of the embodiment of the application is implemented based on the MAE function, the MSE function or the RMSE function;
[0120] Step 22-9, identifying whether the first evaluation value satisfies a preset first evaluation value range; if yes, going to step 22-10; if no, returning to step 22-3 to continue training;
[0121] Here, the first evaluation value range of the embodiment of the application is a pre-set numerical range;
[0122] Step 22-10, dividing the model data set into two sub-data sets based on a preset second segmentation ratio, denoted as a corresponding second training set and a second evaluation set;
[0123] Here, the second segmentation ratio is a pre-set ratio parameter, for example, 7:3; the second training set and the second evaluation set both consist of a plurality of collected molecular structures M S ; the total number ratio of the molecular structures of the second training set and the second evaluation set satisfies the first segmentation ratio;
[0124] Step 22-11, taking the first collected molecular structure M S as a corresponding current training structure;
[0125] Step 22-12, taking the current training structure as a corresponding first label structure; and inputting the current training structure as a corresponding original molecular structure M0 into the current initialization module to obtain a corresponding voxel tensor V; and inputting the current voxel tensor V into the high-dimensional tensor mapper to obtain a corresponding high-dimensional encoding tensor E; and inputting the current high-dimensional encoding tensor E into the 3D U-Net model to obtain a corresponding denoised voxel tensor Vclean ; and the current denoised voxel tensor V clean Input the molecular structure conversion module of the current generation model for processing to obtain the corresponding first molecular structure;
[0126] Step 22-13, input the current first molecular structure into the pre-trained Uni-Mol model of the current generation model for processing to obtain the corresponding predicted molecular structure M; and use the current predicted molecular structure M as a corresponding first predicted structure;
[0127] Step 22-14: bring the first prediction structure and the first label structure corresponding to the current training structure into the preset second model loss function L M2 Calculate and obtain the corresponding second loss value;
[0128] Here, the second model loss function L in the embodiment of the present invention is M2 Implemented based on L1 loss function, L2 loss function or cross entropy loss function;
[0129] Step 22-15, identifying whether the second loss value meets the preset second loss value range; if the second loss value meets the second loss value range, then determining whether the current training structure is the last collected molecular structure M of the second training set. S Identify, if yes, go to step 22-16, if not, the next collected molecular structure M of the second training set S As the new current training structure and return to step 22-12; if the second loss value does not meet the second loss value range, then based on the preset second model optimizer towards making the second model loss function L M2 Fine-tune the model parameters of the pre-trained Uni-Mol model in the direction of reaching the minimum value, and return to steps 22-13 at the end of this round of fine-tuning;
[0130] Here, the second loss value range of the embodiment of the present invention is a preset numerical range; the second model optimizer includes at least an Adam optimizer and an SGD optimizer;
[0131] Step 22-16, all collected molecular structures M of the second evaluation set S Perform a round of traversal; and in this round of traversal, the currently traversed collected molecular structure M S As the corresponding current evaluation structure; and the current evaluation structure as a corresponding second label structure; and the current evaluation structure as a corresponding original molecular structure M0 input into the current initialization module for processing to obtain the corresponding voxel tensor V; and the current voxel tensor V is input into the high-dimensional tensor mapper for processing to obtain the corresponding high-dimensional encoding tensor E; and the current high-dimensional encoding tensor E is input into the 3D U-Net model for processing to obtain the corresponding denoised voxel tensor Vclean ; and inputting the current de-noised voxel tensor V clean ; and inputting the current first molecular structure into a pre-trained Uni-Mol model to obtain a corresponding predicted molecular structure M; and taking the current predicted molecular structure M as a corresponding second predicted structure; and taking the second predicted structure and the second label structure corresponding to the current evaluation structure as a corresponding second predicted-label pair; and when the current iteration is completed, taking all the obtained second predicted-label pairs into a pre-set second model evaluation function to obtain a corresponding second evaluation value;
[0132] Here, the second model evaluation function of the embodiment of the present application is implemented based on the MAE function, the MSE function or the RMSE function.
[0133] Step 22-17, whether the second evaluation value satisfies a pre-set second evaluation value range is identified; if not, return to step 22-11 to continue training; if yes, stop training and confirm that the model training is completed.
[0134] Here, the second evaluation value range of the embodiment of the present application is a pre-set numerical range.
[0135] Step 3, after the model training is completed, a step threshold s max and a sampling interval △s input by a user are received; and voxel tensor initialization processing is performed to obtain a corresponding initial voxel tensor; and the underdamped Langevin MCMC algorithm is used to take the initial voxel tensor as a starting quantity to perform s max step sampling to obtain a corresponding s max sampled voxel tensor, and in the sampling process, every △s steps, the sampled voxel tensor corresponding to the current step is extracted as a corresponding first voxel tensor; and each first voxel tensor is taken as a corresponding voxel tensor V to input the photoelectric molecular generation model to obtain a corresponding predicted molecular structure M; and all the predicted molecular structures M obtained this time are taken to form a corresponding new structure set to feed back to the current user;
[0136] Specifically, step 31, after the model training is completed, a step threshold s max and a sampling interval △s input by a user are received;
[0137] Step 32, voxel tensor initialization processing is performed to obtain a corresponding initial voxel tensor;
[0138] Specifically, step 321, a full zero tensor with a shape of N×L 3 is set as a corresponding first tensor V1;
[0139] Here, the first tensor V1 is obtained by L3 A voxel vector v of length N 1,(i,j,k) Composition; voxel vector v 1,(i,j,k) It consists of N preset initialization probability values, 0<initialization probability value<1;
[0140] Step 322, and create an isotropic Gaussian distribution with a mean of 0, a standard deviation σ being the preset first standard deviation and a shape of N×L 3 A random noise tensor NA is generated; and a corresponding second tensor V2 is obtained by V2=V1+NA. It is then determined whether all probability values in the current second tensor V2 are non-negative. If not, a new random noise tensor NA is created to add noise to the first tensor V1 until all probability values in the latest second tensor V2 are non-negative. If so, the current second tensor V2 is used as the corresponding initial voxel tensor.
[0141] Step 33, and perform s based on the underdamped Langevin MCMC algorithm with the initial voxel tensor as the starting quantity max Step continuous sampling to get the corresponding s max A sampling voxel tensor is generated, and during the sampling process, the sampling voxel tensor corresponding to the current step number is extracted as a corresponding first voxel tensor every △s steps;
[0142] Specifically include: the first variable y s=0 Set it to the corresponding initial voxel tensor and set the second variable v s=0 Set to 0; and set y s=0 、v s=0 Substitute the underdamped Langevin MCMC algorithm formula for s max Step 1 continuous derivation to obtain s max The first variable y 1≤s and the second variable v 1≤s ; and the obtained s max The first variable y 1≤s As the corresponding s max sampling voxel tensors; and in the sampling process, each sampling step s is a non-zero integer multiple of the first variable y 1≤s The corresponding sampled voxel tensor is used as a corresponding first voxel tensor;
[0143] Among them, 0≤sampling steps s≤s max ;
[0144] The formula of underdamped Langevin MCMC algorithm is:
[0145]
[0146] In the above formula: delta is a preset step size parameter, u is a preset inverse mass parameter, gamma is a preset friction parameter; epsilon is a random noise tensor satisfying isotropic Gaussian distribution and having a mean value of 0, a standard deviation sigma is a preset first standard deviation and has a shape of N*L 3 , y s , y s+1 are the first variables of the s-th and s+1-th steps respectively; v s , v s+1 are the second variables of the s-th and s+1-th steps respectively; g θ () is a score function, and theta is an in-built parameter of the score function;
[0147] Step 34, and each first voxel tensor is input into the photoelectric molecular generation model as a corresponding voxel tensor V to obtain a corresponding predicted molecular structure M; and all predicted molecular structures M obtained this time form a corresponding new structure set, which is fed back to the current user.
[0148] It should be noted that the predicted molecular structure M obtained by the photoelectric molecular generation model of the embodiment of the present application does not contain chemical bond information between atom pairs, and the embodiment of the present application can also set the corresponding chemical bond for the atom pairs that can have a connection relationship in the current predicted molecular structure M by calling some conventional chemical information tools, such as OpenBabel, on the premise that the atom type t p and the three-dimensional atomic coordinates c p (x, y, z) of all atoms a p in each predicted molecular structure M are known, and a corresponding chemical bond set is obtained therefrom, and all atoms a p in each predicted molecular structure M form a corresponding atom set, and the corresponding atom set and the chemical bond set of each predicted molecular structure M form a corresponding molecular structure information set, and all molecular structure information sets obtained are fed back to the current user.
[0149] Figure 3 A module structure diagram of a processing device of a photoelectric molecular generation model provided by the second embodiment of the present application, the device is a terminal device or a server for realizing the method embodiment, or can be a device capable of enabling the terminal device or the server to realize the method embodiment, for example, the device can be a device or a chip system of the terminal device or the server. As shown in the figure, the device includes a model construction module 201, a model training module 202 and a model application module 203. Figure 3
[0150] The model construction module 201 is used for constructing a voxel tensor initialization module and a photoelectric molecule generation model; and a model training framework is composed of the voxel tensor initialization module and the photoelectric molecule generation model; the voxel tensor initialization module is used for creating a corresponding voxel tensor V according to an original molecular structure M0 input by the module; and the photoelectric molecule generation model is used for performing molecular structure generation processing according to a voxel tensor V input by the model and outputting a corresponding predicted molecular structure M.
[0151] The model training module 202 is used for constructing a corresponding model data set by collecting data of known photoelectric molecular structures; and training the photoelectric molecule generation model based on the model data set and the model training framework.
[0152] The model application module 203 is used for receiving a step threshold s max and a sampling interval △s input by a user after the model training is completed; performing voxel tensor initialization processing to obtain a corresponding initial voxel tensor; and performing s max step continuous sampling based on the underdamped Langevin MCMC algorithm and taking the initial voxel tensor as a starting quantity to obtain s max sampling voxel tensors, and extracting a sampling voxel tensor corresponding to a current step as a corresponding first voxel tensor every △s steps in the sampling process; inputting each first voxel tensor as a corresponding voxel tensor V into the photoelectric molecule generation model to obtain a corresponding predicted molecular structure M; and feeding back a corresponding new structure set composed of all the predicted molecular structures M obtained this time to the user.
[0153] The processing device of the photoelectric molecule generation model provided in the embodiment of the application can execute the method steps in the method embodiment, and has similar implementation principles and technical effects, which will not be described herein again.
[0154] It should be noted that the division of the various modules of the above apparatus is only a logical functional division, and all or part of them can be integrated into one physical entity or physically separated in actual implementation. These modules can all be implemented in the form of software invoked by a processing element; all in the form of hardware; or some modules are implemented in the form of software invoked by a processing element, and some modules are implemented in the form of hardware. For example, the model construction module can be a separately established processing element, or can be integrated in a chip of the above apparatus, in addition, it can also be stored in the form of program code in the memory of the above apparatus, and the function of the above determination module is invoked and executed by a processing element of the above apparatus. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together or independently implemented. The processing element described herein can be an integrated circuit with signal processing capability. In the implementation process, each step of the above method or each module can be completed by the integrated logic circuit of the hardware in the processor element or the instructions in the form of software.
[0155] For example, the above modules can be one or more integrated circuits configured to implement the above method, such as one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs), etc. For another example, when a certain module above is implemented in the form of program code invoked by a processing element, the processing element can be a general purpose processor, such as a central processing unit (CPU) or other processor that can invoke program code. For another example, these modules can be integrated together to implement in the form of system on a chip (SOC).
[0156] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the above method embodiments are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The above-mentioned computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the above-mentioned computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, Bluetooth, microwave, etc.) means. The above-mentioned computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The above-mentioned available medium can be a magnetic medium (such as a floppy disk, hard disk, tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0157] Figure 4 This is a schematic diagram of the structure of an electronic device provided in the third embodiment of the present invention. The electronic device can be a terminal device or server that implements the method of the aforementioned embodiment, or it can be a terminal device or server that implements the method of the aforementioned embodiment connected to the aforementioned terminal device or server. Figure 4 As shown, the electronic device may include: a processor 301 (such as a CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transceiver 303's transceiver actions. Various instructions may be stored in the memory 302 for completing various processing functions and implementing the processing steps described in the aforementioned embodiment method. Preferably, the electronic device involved in the embodiment of the present invention further includes: a power supply 304, a system bus 305, and a communication port 306. The system bus 305 is used to realize communication connections between components. The above-mentioned communication port 306 is used for connecting and communicating between the electronic device and other peripherals.
[0158] exist Figure 4The system bus 305 mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used to realize the communication between the database access device and other devices (such as the client, the read-write library and the read-only library). The memory can include a Random Access Memory (RAM), and can also include a Non-Volatile Memory, such as at least one disk memory.
[0159] The processor mentioned above can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), a Graphics Processing Unit (GPU), etc.; can also be a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0160] It should be noted that the embodiment of the application also provides a computer readable storage medium, which stores instructions, and when the instructions are run on a computer, the computer executes the method and process provided in the above embodiment.
[0161] The embodiment of the application provides a kind of photoelectric molecular generation model processing method, device, electronic equipment and computer readable storage medium. From the above content, the embodiment of the application constructs a voxel tensor initialization module that can create voxel tensor V according to the original molecular structure M0 input by module, a photoelectric molecular generation model that can generate molecular structure and output predicted molecular structure M according to the voxel tensor V input by model, and a model training framework is formed by voxel tensor initialization module and photoelectric molecular generation model;Again, known photoelectric molecular structure is collected to construct corresponding model data set, and photoelectric molecular generation model is trained based on model data set and model training framework;Then after model training ends, the step threshold s max And sampling interval △s input by user are received, and an initial voxel tensor is initialized based on random noise adding mode, and s maxThe step is continuously sampled, and every △s steps in the sampling process, the sampling voxel tensor corresponding to the current step number is extracted as a corresponding first voxel tensor, and each first voxel tensor is input as a corresponding voxel tensor V into the optoelectronic molecular generation model for processing to obtain a corresponding predicted molecular structure M, and all the obtained predicted molecular structures M form a new structure set to feed back to the current user. The optoelectronic molecular generation model based on the embodiment of the application can generate a plurality of molecular structures at one time without being limited by artificial experience, and the embodiment of the application not only shortens the generation period, but also enriches the types of molecular structures.
[0162] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in random access memory (RAM), memory, flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0163] The above specific embodiments further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A processing method of a photoelectric molecular generation model, characterized by, The method comprises: A voxel tensor initialization module and a photoelectric molecule generation model are constructed, and a model training framework is formed by the voxel tensor initialization module and the photoelectric molecule generation model; the voxel tensor initialization module is used to create a corresponding voxel tensor V according to an original molecular structure M0 input by the module; and the photoelectric molecule generation model is used to perform molecular structure generation processing according to the voxel tensor V input by the model and output a corresponding predicted molecular structure M; A corresponding model data set is constructed by collecting data of known photoelectric molecular structures; and the photoelectric molecule generation model is trained based on the model data set and the model training framework; After the model training is completed, a step threshold s input by a user is received max and a sampling interval Δs; and a voxel tensor initialization process is performed to obtain a corresponding initial voxel tensor; and based on the underdamped Langevin MCMC algorithm, the initial voxel tensor is taken as a starting quantity to perform s max step continuous sampling to obtain a corresponding s max sampled voxel tensor, and in the sampling process, every Δs steps, the sampled voxel tensor corresponding to the current step is extracted as a corresponding first voxel tensor; and each first voxel tensor is taken as a corresponding voxel tensor V and input to the photovoltaic molecule generation model for processing to obtain a corresponding predicted molecular structure M; and all the predicted molecular structures M obtained this time form a corresponding new structure set to feed back to the current user.
2. The processing method of the photoelectric molecule generation model according to claim 1, characterized in that The voxel tensor V has a shape of N×L 3 The probability distribution tensor of L 3 A voxel vector v of length N i,j,k Composition; the voxel vector v i,j,k It consists of N probability values between 0 and 1; L is the side length of a preset three-dimensional voxel grid space and L is an even number, and the volume of the three-dimensional voxel grid space is L 3 is larger than the maximum molecular volume of all known photoelectric molecules; the three-dimensional voxel grid space is composed of L 3 The voxel grid is composed of the voxel vector v i,j,k One-to-one correspondence, i, j, k are the three-dimensional coordinates of the voxel grid, 0≤i≤L, 0≤j≤L, 0≤k≤L; the central voxel grid coordinates of the three-dimensional voxel grid space are (i=L / 2, j=L / 2, k=L / 2); N is the total number of atomic types in a preset first atomic type set, and the first atomic type set is a total set of atomic types that can be used for photoelectric molecules; the voxel vector v i,j,k The N probability values in the first atom type set correspond one-to-one to the N types of atoms in the first atom type set, and the voxel vector v i,j,k Each probability value in represents the probability that the current voxel grid is occupied by an atom of the corresponding atomic type; The predicted molecular structure M comprises a plurality of atoms a p , 1 ≤ atom index p ≤ A M , A M is the total number of atoms of the predicted molecular structure M; each atom a p has an atom parameter comprising an atom type t p and three-dimensional atom coordinates c p (x, y, z); all atom types t p satisfy the first set of atom types; The original molecular structure M0 includes a plurality of atoms a q , 1 ≤ atom index q ≤ A0, A0 is the total number of atoms of the original molecular structure M0; each of the atoms a q The atomic parameters of the atom include the atomic type t q And the three-dimensional atomic coordinates c q (x, y, z); all the atomic types t q Satisfy the first set of atomic types; The model dataset comprises a plurality of acquisition molecular structures M S ; each of the acquisition molecular structures M S is composed of a plurality of atoms a w , and each of the atoms a w has an atomic parameter comprising an atomic type t w and three-dimensional atomic coordinates c w (x, y, z), 1≤atomic index w≤A S , A S is the total number of atoms of the current acquisition molecular structure M S ; all of the atomic types t S of all of the acquisition molecular structures M w satisfy the first atomic type set.
3. The processing method of a photovoltaic molecular generation model according to claim 2, characterized in that, The voxel tensor initialization module is used to create a corresponding voxel tensor V according to an original molecular structure M0 input by the module, and specifically comprises: The voxel tensor initialization module sets a shape of N×L 3 The all-zero tensor is used as the initial tensor V init ; The initial tensor V init By L 3 A voxel vector v of length N init,(i,j,k) Composition; the voxel vector v init,(i,j,k) It consists of N preset initialization probability values, 0<initialization probability value<1; And for all the atoms a of the original molecular structure M0 q Perform a round of traversal; and in this round of traversal, the atom a currently traversed q As the corresponding current atom; and the three-dimensional atomic coordinate c of the current atom q (x, y, z) and the Euclidean distance between each voxel grid coordinate (i, j, k) in the three-dimensional voxel grid space to obtain a corresponding first distance, and the voxel grid corresponding to the smallest first distance is used as the corresponding current matching grid; and the voxel vector v corresponding to the current matching grid is used as the voxel vector v init,(i,j,k) As the corresponding current matching vector; and the N probability values of the current matching vector and the atom type t of the current atom q The corresponding probability value is reset to 1; And for all the atoms a in the original molecular structure M0 q After this round of traversal, create an isotropic Gaussian distribution with a mean of 0, a standard deviation σ of the preset first standard deviation, and a shape of N×L 3 The random noise tensor NS is obtained by V noise =V init +NS method to obtain a corresponding noise tensor V noise ; and add noise to the current tensor V noise Identify whether all probability values in are not negative, if not, create a new random noise tensor NS for the initial tensor V init Noise is added until the latest noise tensor V noise Until all probability values in are not negative, if so, the current noise tensor V noise As the corresponding voxel tensor V.
4. The processing method of the photoelectric molecule generation model according to claim 2, characterized in that The photoelectric molecule generation model comprises a high-dimensional tensor mapper, a 3D U-Net model, a molecular structure conversion module and a pre-trained Uni-Mol model; The input end of the high-dimensional tensor mapper is connected with the input end of the photoelectric molecule generation model, and the output end is connected with the input end of the 3D U-Net model; the output end of the 3D U-Net model is connected with the input end of the molecular structure conversion module; the output end of the molecular structure conversion module is connected with the input end of the pre-trained Uni-Mol model; and the output end of the pre-trained Uni-Mol model is connected with the output end of the photoelectric molecule generation model; The high-dimensional tensor mapper is used to map the input tensor shape N ’ ×L 3 of the 3D U-Net model by default to N ’ , and the tensor shape N 3 of the voxel tensor V of the model input is recorded as the initial dimension; and the high-dimensional tensor mapping processing from the initial dimension to the target dimension is performed on the voxel tensor V to obtain a high-dimensional encoding tensor E with a shape of N ’ ×L 3 , which is sent to the 3D U-Net model; and N ’ ×L 3 of the input tensor shape N ’ of the 3D U-Net model by default is 2 raised to the power of N and greater than N; The structure of the high-dimensional tensor mapper is sequentially connected by a first residual block and a second residual block; each of the first residual block and the second residual block is sequentially connected by a 1×1×1 convolution layer, two 3×3×3 convolution layers and a connection unit ⊕; in the first or second residual block, the 1×1×1 convolution layer is used to increase the dimension of the input tensor of the convolution layer, each 3×3×3 convolution layer is used to encode the input tensor of the convolution layer to obtain a corresponding encoded tensor, and a Si LU activation function is used to process the current encoded tensor; and the connection unit ⊕ is used to add the output tensor of the 1×1×1 convolution layer and the output tensor of the second 3×3×3 convolution layer in the residual module; The 3D U-Net model is used to regard the high-dimensional encoding tensor E as a high-dimensional voxel tensor with noise and to obtain a denoised voxel tensor V after denoised voxel tensor segmentation, wherein the shape of the denoised voxel tensor V is consistent with the shape of the voxel tensor V input to the model clean The denoised voxel tensor V is sent to the molecular structure conversion module clean The shape of the denoised voxel tensor V is N*L 3 , wherein L 3 denoised voxel vectors v clean,(i,j,k) of length N clean,(i,j,k) , wherein each voxel vector v consists of N probability values between 0 and 1 The molecular structure conversion module is used to convert the denoised voxel tensor V clean All the voxel vectors v clean,(i,j,k) Perform a round of traversal; and in this round of traversal, the voxel vector v currently traversed is clean,(i,j,k) as the corresponding current vector; and identifying whether the N probability values of the current vector are all lower than a preset first probability threshold; If the N probability values of the current vector are all lower than the first probability threshold, a corresponding first voxel feature is set to 0; If at least one of the N probability values of the current vector is not lower than the first probability threshold, the maximum value of the N probability values of the current vector is taken as the corresponding current maximum probability value, and it is identified whether the current maximum probability value is higher than a preset second probability threshold, if yes, the corresponding first voxel feature is set to 1, if not, the corresponding first voxel feature is set to 0; and when the obtained first voxel feature is 1, the voxel grid coordinates (i, j, k) corresponding to the current vector are converted from voxel grid coordinates to atomic coordinate system coordinates with the center voxel grid coordinates of the three-dimensional voxel grid space as the coordinate origin (x = 0, y = 0, z = 0) of the atomic coordinate system to obtain a corresponding first atomic coordinate, and the atomic type corresponding to the current maximum probability value of the current first voxel feature is taken as a corresponding first atomic type, and then a corresponding first atom is formed by the first atomic type and the first atomic coordinate obtained this time; and when the current round of iteration is completed, a corresponding first molecular structure is formed by all the first atoms obtained, and the pre-trained Uni-Mol model is sent to the pre-trained Uni-Mol model; The pre-trained Uni-Mol model is realized based on a pre-training framework of a Uni-Mol model, and is composed of the Uni-Mol model, an atomic type prediction head and an atomic coordinate prediction head; the Uni-Mol model is an atomic-level encoder realized by an Encoder module based on a Transformer model, the atomic type prediction head is a prediction network connected by a linear layer and a Softmax layer, and the atomic coordinate prediction head is an SE(3) equivariant prediction head realized based on a position updating process of an EGNN model; an input end of the Uni-Mol model is connected with an input end of the pre-trained Uni-Mol model, a first output end is connected with an input end of the atomic type prediction head, and a second output end is connected with an input end of the atomic coordinate prediction head; the pre-trained Uni-Mol model has been pre-trained in a pre-training manner of the pre-training framework of the Uni-Mol model; The pre-trained Uni-Mol model is used for structure optimization processing of the first molecular structure and outputs the corresponding predicted molecular structure M, specifically: the Uni-Mol model obtains the corresponding atom type coding vector and atom pair feature matrix by performing atomic level feature coding according to the input first molecular structure, and sends the atom type coding vector to the atom type prediction head and sends the atom pair feature matrix to the atom coordinate prediction head; and the atom type prediction head obtains a plurality of predicted atom types by performing atom type prediction according to the atom type coding vector; and the atom coordinate prediction head obtains a plurality of predicted atom coordinates by performing atom coordinate prediction according to the atom pair feature matrix, the predicted atom coordinates correspond one-to-one to the predicted atom types; and each predicted atom type is taken as a corresponding atom type t p , the predicted atom coordinates corresponding to each predicted atom type are taken as a corresponding three-dimensional atomic coordinate c p (x, y, z), and each atom type t p and its corresponding three-dimensional atomic coordinate c p (x, y, z) form a corresponding atom a p ; and all the atoms a p obtained form a corresponding predicted molecular structure M.
5. The processing method of a photovoltaic molecular generation model according to claim 4, characterized in that, The photoelectric molecule generation model is trained based on the model data set and the model training framework, and specifically includes: Step 501, the voxel tensor initialization module and the photoelectric molecule generation model of the model training framework are taken as a corresponding current initialization module and a current generation model; Step 502, the model data set is divided into two sub-data sets based on a preset first segmentation ratio, which are denoted as a corresponding first training set and a first evaluation set; Wherein, the first training set and the first evaluation set are both composed of a plurality of the collected molecular structures M S ; the total number ratio of the molecular structures of the first training set and the first evaluation set meets the first split ratio; Step 503, a first of the acquisition molecular structures M of the first training set is selected S as a corresponding current training structure; Step 504, input the current training structure as a corresponding original molecular structure M0 into the current initialization module for processing to obtain a corresponding voxel tensor V; and generate an initial tensor V of the current voxel tensor V by adding noise in the processing process init as a corresponding first label tensor; Step 505, input the current voxel tensor V into the high-dimensional tensor mapper of the current generation model to obtain the corresponding high-dimensional encoding tensor E; and input the current high-dimensional encoding tensor E into the 3D U-Net model of the current generation model to obtain the corresponding denoised voxel tensor V clean ; and the current denoised voxel tensor V clean as the corresponding first prediction tensor; Step 506, inputting the first prediction tensor corresponding to the current training structure and the first label tensor into a preset first model loss function L M1 to obtain a corresponding first loss value; The first model loss function L M1 implemented based on an L1 loss function, an L2 loss function, or a cross-entropy loss function. Step 507, identifying whether the first loss value meets a preset first loss value range; if the first loss value meets the first loss value range, identifying whether the current training structure is the last acquisition molecular structure M S of the first training set; if yes, going to step 508; if no, taking the next acquisition molecular structure M S of the first training set as a new current training structure and returning to step 504; if the first loss value does not meet the first loss value range, performing a round of modulation on model parameters of the high-dimensional tensor mapper and the 3D U-Net model based on a preset first model optimizer towards a direction of making the first model loss function L M1 reach a minimum value, and returning to step 505 at the end of the round of modulation; The first model optimizer at least includes an Adam optimizer and an SGD optimizer; Step 508, for all the acquisition molecular structures M of the first evaluation set S perform a round of traversal; and during the current round of traversal, the acquisition molecular structure M currently traversed S as a corresponding current evaluation structure; and input the current evaluation structure as a corresponding original molecular structure M0 into the current initialization module for processing to obtain a corresponding voxel tensor V, and the initial tensor V generated by adding noise in the processing process init as a corresponding second label tensor; and input the current voxel tensor V into the high-dimensional tensor mapper for processing to obtain a corresponding high-dimensional encoding tensor E; and input the current high-dimensional encoding tensor E into the 3D U-Net model for processing to obtain a corresponding denoised voxel tensor V clean ; and input the current denoised voxel tensor V clean as a corresponding second prediction tensor; and a corresponding first prediction-label pair is composed of the second prediction tensor and the second label tensor corresponding to the current evaluation structure; and at the end of the current round of traversal, all the first prediction-label pairs obtained are brought into a pre-set first model evaluation function for calculation to obtain a corresponding first evaluation value; The first model evaluation function is realized based on an MAE function, an MSE function or an RMSE function; Step 509, it is identified whether the first evaluation value meets a preset first evaluation value range; if yes, go to step 510; if not, return to step 503 for training. At step 510, the model dataset is divided into two sub-datasets based on a preset second segmentation ratio, denoted as a corresponding second training set and a second evaluation set; Wherein, the second training set and the second evaluation set are both composed of a plurality of the collected molecular structures M S ; the total number ratio of the molecular structures of the second training set and the second evaluation set satisfies the first split ratio; Step 511, the first said collection of molecular structures M of the second training set S as a corresponding current training structure; Step 512, take the current training structure as a corresponding first label structure; and input the current training structure as a corresponding original molecular structure M0 into the current initialization module for processing to obtain a corresponding voxel tensor V; and input the current voxel tensor V into the high-dimensional tensor mapper for processing to obtain a corresponding high-dimensional encoding tensor E; and input the current high-dimensional encoding tensor E into the 3D U-Net model for processing to obtain a corresponding denoised voxel tensor V clean ; and input the current denoised voxel tensor V clean into the molecular structure conversion module of the current generation model for processing to obtain a corresponding first molecular structure; At step 513, the current first molecular structure is input into the pre-trained Uni-Mol model of the current generation model for processing to obtain a corresponding predicted molecular structure M; and the current predicted molecular structure M is taken as a corresponding first predicted structure; Step 514, the first prediction structure corresponding to the current training structure and the first label structure are brought into a preset second model loss function L M2 The corresponding second loss value is obtained by calculation; The second model loss function L M2 implemented based on an L1 loss function, an L2 loss function, or a cross-entropy loss function. Step 515, identifying whether the second loss value meets a preset second loss value range; if the second loss value meets the second loss value range, identifying whether the current training structure is the last acquisition molecular structure M S of the second training set; if yes, going to step 516; if no, taking the next acquisition molecular structure M S of the second training set as a new current training structure and returning to step 512; if the second loss value does not meet the second loss value range, performing one round of fine-tuning on the model parameters of the pre-trained Uni-Mol model based on a preset second model optimizer towards a direction of making the second model loss function L M2 reach a minimum value, and returning to step 513 when the round of fine-tuning ends; The second model optimizer at least includes an Adam optimizer and an SGD optimizer. Step 516, for all the collection molecular structures M of the second evaluation set S perform a round of traversal; and in the current round of traversal, the current traversed collection molecular structure M S as a corresponding current evaluation structure; and the current evaluation structure as a corresponding second label structure; and the current evaluation structure as a corresponding original molecular structure M0 input the current initialization module for processing to obtain a corresponding voxel tensor V; and the current voxel tensor V input the high-dimensional tensor mapper for processing to obtain a corresponding high-dimensional encoding tensor E; and the current high-dimensional encoding tensor E input the 3D U-Net model for processing to obtain a corresponding denoised voxel tensor V clean ; and the current denoised voxel tensor V clean input the molecular structure conversion module for processing to obtain a corresponding first molecular structure; and the current first molecular structure input the pre-trained Uni-Mol model for processing to obtain a corresponding predicted molecular structure M; and the current predicted molecular structure M as a corresponding second predicted structure; and the second predicted structure corresponding to the current evaluation structure and the second label structure form a corresponding second prediction-label pair; and at the end of the current round of traversal, all the obtained second prediction-label pairs are brought into a pre-set second model evaluation function for calculation to obtain a corresponding second evaluation value; The second model evaluation function is implemented based on an MAE function, an MSE function, or an RMSE function. At step 517, whether the second evaluation value satisfies a preset second evaluation value range is identified; if not, the training is continued at step 511; if yes, the training is stopped and it is confirmed that the model training is completed.
6. The processing method of a photovoltaic molecular generation model according to claim 2, wherein, The voxel tensor initialization processing obtains a corresponding initial voxel tensor, and specifically includes: setting a full zero tensor with a shape of N x L 3 as a corresponding first tensor V1; the first tensor V1 is composed of L 3 vectors v 1,(i,j,k) with a length of N; the vector v 1,(i,j,k) is composed of N preset initialized probability values, 0 < the initialized probability value < 1; And create an isotropic Gaussian distribution with a mean of 0, a standard deviation σ of the preset first standard deviation and a shape of N×L 3 A random noise tensor NA is obtained; and a corresponding second tensor V2 is obtained by V2=V1+NA; and it is identified whether all probability values in the current second tensor V2 are not negative. If not, a new random noise tensor NA is created again to add noise to the first tensor V1 until all probability values in the latest second tensor V2 are not negative. If so, the current second tensor V2 is used as the corresponding initial voxel tensor.
7. The processing method of a photovoltaic molecular generation model according to claim 2, wherein, The under-damped Langevin MCMC algorithm is based on the initial voxel tensor as a starting quantity s max Step continuous sampling to obtain a corresponding s max sampled voxel tensors, and every △s steps in the sampling process, the sampled voxel tensor corresponding to the current step is extracted as a corresponding first voxel tensor, specifically including: Let the first variable y s=0 be the corresponding initial voxel tensor, and let the second variable v s=0 be 0; and let y s=0 , v s=0 be substituted into the under-damped Langevin MCMC algorithm formula to obtain s max successive derivations to obtain s max first variables y 1≤s and second variables v 1≤s ; and let the obtained s max first variables y 1≤s be the corresponding s max sampled voxel tensors; and in the sampling process, let the first variable y 1≤s corresponding to the sampled voxel tensor be a corresponding first voxel tensor; wherein 0≤ sampling step number s≤s max ; The underdamped Langevin MCMC algorithm formula is: δ is a preset step length parameter, u is a preset inverse mass parameter, γ is a preset friction force parameter; ε is a random noise tensor satisfying an isotropic Gaussian distribution and having a mean value of 0 and a standard deviation σ being a preset first standard deviation and having a shape of N×L 3 y s y s+1 y s y s+1 y θ g() is a score function, and θ is an inbuilt parameter of the score function.
8. An apparatus for performing the processing method of the optoelectronic molecular generation model of any one of claims 1-7, characterized in that, The device includes a model construction module, a model training module, and a model application module. The model construction module is used to construct a voxel tensor initialization module and a photoelectric molecule generation model; and a model training framework is composed of the voxel tensor initialization module and the photoelectric molecule generation model; the voxel tensor initialization module is used to create a corresponding voxel tensor V according to an original molecular structure M0 input by the module; and the photoelectric molecule generation model is used to perform molecular structure generation processing according to the voxel tensor V input by the model and output a corresponding predicted molecular structure M. The model training module is used to construct a corresponding model dataset by data collection on known photoelectric molecular structures; and the photoelectric molecule generation model is trained based on the model dataset and the model training framework. The model application module is configured to receive a step threshold s input by a user after the model training is completed max and a sampling interval Δs; and perform voxel tensor initialization processing to obtain a corresponding initial voxel tensor; and perform s max step continuous sampling based on the underdamped Langevin MCMC algorithm and using the initial voxel tensor as a starting quantity to obtain a corresponding s max sampled voxel tensor, and in the sampling process, every Δs steps, the sampled voxel tensor corresponding to the current step is extracted as a corresponding first voxel tensor; each first voxel tensor is input as a corresponding voxel tensor V to the photovoltaic molecule generation model to obtain a corresponding predicted molecule structure M; and all the predicted molecule structures M obtained this time form a corresponding new structure set to feed back to the current user.
9. An electronic device, comprising: It includes: a memory, a processor, and a transceiver; The processor is used to couple with the memory, read and execute instructions in the memory, so as to realize the method in any one of claims 1-7; The transceiver is coupled with the processor, and the transceiver is controlled by the processor to perform message transceiving.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, when the computer instructions are executed by a computer, the computer executes the method in any one of claims 1-7. The computer readable storage medium stores computer instructions, when the computer instructions are executed by a computer, the computer executes the method in any one of claims 1-7.
Citation Information
Patent Citations
Molecular design using local exploration
CN117529782A
System and method for generating a novel molecular structure using a protein structure
US20220406403A1