A method and device for analyzing inorganic crystal condition generation

Through the diffusion model and graph neural network of the SDE paradigm, combined with spectral decomposition technology, the problems of inorganic crystal generation and physical property control in the existing technology are solved, the precise generation and property control of the crystal structure are achieved, and the generation speed and quality are improved.

CN118248248BActive Publication Date: 2024-08-23烟台国工智能科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410666162.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-08-23
Estimated Expiration
2044-05-28

AI Technical Summary

Technical Problem

In the existing technology, diffusion models are rarely used in the generation and control of physical properties of inorganic crystals, and it is difficult to generate controllable crystal structures.

Method used

The diffusion model of the SDE paradigm is combined with the graph neural network to predict the physical properties of the crystal through the pre-trained model, and uses spectral decomposition to accelerate the generation process to achieve conditional control of the crystal structure.

Benefits of technology

It achieves the precise generation of inorganic crystal structures and effective control of physical properties, improves the generation speed and quality, and is suitable for scenarios including crystals, chemical molecules, and proteins.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118248248B
    Figure CN118248248B
Patent Text Reader

Abstract

An inorganic crystal conditional generation analysis method and device, the method selects an open source crystal structure data set as a crystal structure generation data set, constructs a conditional generation SDE paradigm diffusion model; inputs the structure data of the target crystal into the conditional generation SDE paradigm diffusion model to obtain the atomic information data of the target crystal; inputs the structure data of the target crystal into a CGCNN pre-training model to predict the physical properties of the target crystal; inputs the atomic information data of the target crystal into a first graph neural network to obtain the lattice parameters of the target crystal; and inputs the lattice parameters of the target crystal into a second graph neural network to generate a unit cell of the target crystal. The present invention has a wide range of applications and can effectively control the physical properties of the generated crystal structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of inorganic crystal structure conditional generation control, and in particular relates to an inorganic crystal conditional generation analysis method and device. Background Art

[0002] In recent years, generative AI (AIGC) has led the development of artificial intelligence. The large-scale model development paradigm based on computing power has successfully applied AIGC to many fields in academia, industry, and life.

[0003] The diffusion model is the mainstream model of AIGC today. It has replaced VAEs, GANs, and Normalizing flowmodels to become the optimal model of the generative model family. Sora and StabilityAI are large models trained based on the diffusion model. There are three frameworks of the diffusion model: DDPM (Denoising Diffusion Probabilistic Model), NCSN (Noise Conditional Score-Based Model) and SDE (Stochastic Differential Equation). The DDPM method approximates the probability density of the original data by optimizing the lower limit, while NCSN and SDE can accurately calculate the probability density of the original data by predicting the first-order gradient of the probability density. Unlike DDPM and NCSN, which add discrete step noise in the forward diffusion process, SDE makes the noise addition and elimination process continuous, which not only achieves the best performance in image generation, but also has more complete mathematical theoretical support.

[0004] Thanks to the great success of diffusion models in the field of AI, their molecular generation and crystal generation in the field of chemistry have gradually gained favor among researchers. As an important functional material, inorganic crystal materials have unique physical and chemical properties and broad application prospects. They can be used in luminescent materials, electronic devices, ceramic materials, gas-phase reaction catalysts, and new energy materials. At present, there are few studies on the application of diffusion models to crystal generation, let alone the generation of crystal structures with controllable physical properties.

[0005] Therefore, inventing a crystal growth method based on a diffusion model has become an urgent problem to be solved. Summary of the invention

[0006] To this end, the present invention provides an inorganic crystal conditional generation analysis method and device, which uses a diffusion model of the SDE paradigm for crystal atomic coordinate generation, then uses a graph neural network to predict the lattice parameters to generate a complete unit cell, uses a pre-trained model to predict the crystal physical properties as conditions to control the crystal structure generation process, and uses spectral decomposition to accelerate the crystal structure generation process. It has a wide range of applications and can effectively control the physical properties of the generated crystal structure.

[0007] In order to achieve the above object, the present invention provides the following technical solution: an inorganic crystal conditional generation analysis method, comprising:

[0008] Construct an SDE paradigm diffusion model, wherein the diffusion process of the SDE paradigm diffusion model includes forward denoising and reverse denoising processes; forward denoising the SDE paradigm diffusion model through a set diffusion coefficient function; reverse denoising the SDE paradigm diffusion model through an SDE reverse solution process; input the data of the training data set into the SDE paradigm diffusion model in batches, and train and verify the SDE paradigm diffusion model; add weights to the trained SDE paradigm diffusion model, and jointly train the trained SDE paradigm diffusion model with a conditional generation model and an unconditional generation model to obtain a conditional generation SDE paradigm diffusion model;

[0009] Selecting the structural data of the target crystal from the crystal structure generation data set, inputting the structural data of the target crystal into the conditional generation SDE paradigm diffusion model, and obtaining the atomic information data of the target crystal;

[0010] Inputting the structural data of the target crystal into a CGCNN pre-trained model, and predicting the physical properties of the target crystal by using the CGCNN pre-trained model;

[0011] Construct a first graph neural network, input the atomic information data of the target crystal into the first graph neural network, and obtain the lattice parameters of the target crystal that meet the physical properties of the target crystal; construct a second graph neural network, input the lattice parameters of the target crystal into the second graph neural network to predict the lattice of the target crystal and generate a unit cell of the target crystal.

[0012] As a preferred scheme of an inorganic crystal conditional generation analysis method, it also includes: selecting an open source crystal structure data set as a crystal structure generation data set, converting the data format in the open source crystal structure data set, and using the open source crystal structure data set after the data format conversion as a training data set for the SDE paradigm diffusion model; dividing the training data set into a training set, a validation set, and a test set in proportion.

[0013] As a preferred solution of an inorganic crystal condition generation analysis method, a spectrum decomposition method is used to increase the unit cell generation rate of the target crystal;

[0014] The atomic information data of the target crystal includes: atomic type, atomic coordinates, and atomic adjacency matrix;

[0015] The physical properties of the target crystal include: generation energy, absolute energy, bandwidth, Fermi level, bulk modulus, and Poisson's ratio.

[0016] As a preferred solution of an inorganic crystal condition generation analysis method, the forward noise addition process formula is:

[0017] ;

[0018] In the formula, is an infinitesimal sample variable; is the designed diffusion coefficient; is infinitesimal white noise;

[0019] The inverse denoising process formula is:

[0020] ;

[0021] In the formula, is an infinitesimal sample variable; is the drift coefficient; is the diffusion coefficient; is infinitesimal white noise; is the designed diffusion coefficient; is the square of the diffusion coefficient; is the sample gradient; is the logarithm of the probability density function; is an infinitesimal time variable.

[0022] As a preferred solution of the inorganic crystal conditional generation analysis method, in the SDE paradigm diffusion model, the first-order gradient expression of the conditional probability for the sample is:

[0023] ;

[0024] After adding weights to the SDE paradigm diffusion model, the expression is:

[0025] ;

[0026] In the formula, is the weight; is the sample gradient of the conditional probability density function; is the sample gradient of the probability density function.

[0027] The present invention also provides an inorganic crystal condition generation analysis processing device, which adopts the above-mentioned inorganic crystal condition generation analysis method, comprising:

[0028] A conditional generation SDE paradigm diffusion model construction module is used to construct an SDE paradigm diffusion model, wherein the diffusion process of the SDE paradigm diffusion model includes forward denoising and reverse denoising processes; forward denoising is performed on the SDE paradigm diffusion model through a set diffusion coefficient function; reverse denoising is performed on the SDE paradigm diffusion model through an SDE reverse solution process; data of a training data set are input into the SDE paradigm diffusion model in batches, and the SDE paradigm diffusion model is trained and verified; weights are added to the trained SDE paradigm diffusion model, and the trained SDE paradigm diffusion model is jointly trained with a conditional generation model and an unconditional generation model to obtain a conditional generation SDE paradigm diffusion model;

[0029] A crystal atomic information data acquisition module is used to select the structural data of the target crystal from the crystal structure generation data set, input the structural data of the target crystal into the conditional generation SDE paradigm diffusion model, and obtain the atomic information data of the target crystal;

[0030] A crystal physical property prediction module, used to input the structural data of the target crystal into the CGCNN pre-trained model, and predict the physical properties of the target crystal through the CGCNN pre-trained model;

[0031] A unit cell generation module is used to construct a first graph neural network, input the atomic information data of the target crystal into the first graph neural network, and obtain the lattice parameters of the target crystal that meet the physical properties of the target crystal; construct a second graph neural network, input the lattice parameters of the target crystal into the second graph neural network to predict the lattice of the target crystal, and generate a unit cell of the target crystal.

[0032] As a preferred solution of an inorganic crystal condition generation analysis and processing device, it also includes:

[0033] The data set processing module is used to select an open source crystal structure data set as a crystal structure generation data set, convert the data format in the open source crystal structure data set, and use the open source crystal structure data set after the data format conversion as a training data set for the SDE paradigm diffusion model; and divide the training data set into a training set, a validation set, and a test set in proportion.

[0034] As a preferred solution of the inorganic crystal condition generation analysis processing device, it also includes: a spectrum decomposition acceleration module, which is used to increase the unit cell generation speed of the target crystal by using the spectrum decomposition method;

[0035] In the crystal atomic information data acquisition module, the atomic information data of the target crystal includes: atomic type, atomic coordinates, and atomic adjacency matrix;

[0036] In the crystal physical property prediction module, the physical properties of the target crystal include: generation energy, absolute energy, bandwidth, Fermi level, bulk modulus, and Poisson's ratio.

[0037] As a preferred solution of an inorganic crystal conditional generation analysis and processing device, in the conditional generation SDE paradigm diffusion model construction module, the forward noise addition processing process formula is:

[0038] ;

[0039] In the formula, is an infinitesimal sample variable; is the designed diffusion coefficient; is infinitesimal white noise;

[0040] The inverse denoising process formula is:

[0041] ;

[0042] In the formula, is an infinitesimal sample variable; is the drift coefficient; is the diffusion coefficient; is infinitesimal white noise; is the designed diffusion coefficient; is the square of the diffusion coefficient; is the sample gradient; is the logarithm of the probability density function; is an infinitesimal time variable.

[0043] As a preferred solution of an inorganic crystal conditional generation analysis and processing device, in the conditional generation SDE paradigm diffusion model construction module, in the SDE paradigm diffusion model, the first-order gradient expression of the conditional probability for the sample is:

[0044] ;

[0045] After adding weights to the SDE paradigm diffusion model, the expression is:

[0046] ;

[0047] In the formula, is the weight; is the sample gradient of the conditional probability density function; is the sample gradient of the probability density function.

[0048] The present invention has the following advantages: selecting an open source crystal structure data set as a crystal structure generation data set, converting the data format in the open source crystal structure data set, and using the open source crystal structure data set after the data format conversion as a training data set for an SDE paradigm diffusion model; dividing the training data set into a training set, a validation set, and a test set in proportion; constructing an SDE paradigm diffusion model, wherein the diffusion process of the SDE paradigm diffusion model includes a forward denoising process and a reverse denoising process; forward denoising the SDE paradigm diffusion model through a set diffusion coefficient function; reverse denoising the SDE paradigm diffusion model through an SDE reverse solution process; inputting the data of the training data set into the SDE paradigm diffusion model in batches, and training and verifying the SDE paradigm diffusion model; adding weights to the trained SDE paradigm diffusion model, and performing a reverse denoising process on the trained SDE paradigm diffusion model. The conditional generation model and the unconditional generation model are jointly trained to obtain the conditional generation SDE paradigm diffusion model; the structural data of the target crystal are selected from the crystal structure generation data set, and the structural data of the target crystal are input into the conditional generation SDE paradigm diffusion model to obtain the atomic information data of the target crystal; the structural data of the target crystal are input into the CGCNN pre-training model, and the physical properties of the target crystal are predicted by the CGCNN pre-training model; a first graph neural network is constructed, and the atomic information data of the target crystal is input into the first graph neural network to obtain the lattice parameters of the target crystal that meet the physical properties of the target crystal; a second graph neural network is constructed, and the lattice parameters of the target crystal are input into the second graph neural network to predict the lattice of the target crystal and generate the unit cell of the target crystal; a spectral decomposition method is used to increase the unit cell generation speed of the target crystal. The present invention proposes for the first time to use the SDE diffusion model paradigm for crystal structure generation. Different from the DDPM paradigm, SDE makes the noise increase and noise reduction process continuous, adds infinite Gaussian noises with different variances, has a more complete mathematical theory support, and can accurately calculate the probability density of the original data. At the same time, the joint training of the conditional generation model without a classifier can generate a crystal structure that satisfies multiple physical properties at the same time. The graph neural network method is used to predict the lattice and obtain a complete unit cell. Unlike other studies that simultaneously diffuse information such as the lattice and atomic coordinates, the present invention adopts a divide-and-conquer strategy to obtain a complete unit cell, reducing computing resources and generation time. The present invention also proposes a spectral decomposition method to improve the quality and speed of crystal structure generation, and uses spectral decomposition for the atomic bond adjacency matrix, which solves the problems of rapid decrease in signal-to-noise ratio and slow generation process during diffusion, and can be used in scenarios including but not limited to crystals, chemical molecules and proteins.The present invention still has optimization directions for the diffusion model. In fact, in scenarios such as crystal and chemical molecule generation, adding continuous Gaussian noise will still quickly destroy its graph structure. Currently, there have been studies on adding discrete noise in the process of graph generation using the diffusion model to always maintain the graph structure, which can generate graph information better and faster. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.

[0050] Figure 1 A schematic flow chart of an inorganic crystal condition generation analysis method provided in Example 1 of the present invention;

[0051] Figure 2 This is an architecture diagram of an inorganic crystal condition generation analysis and processing device provided in Example 2 of the present invention. DETAILED DESCRIPTION

[0052] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] Example 1

[0054] See also Figure 1 Embodiment 1 of the present invention provides a synthetic route development method for comprehensive retrosynthesis, conditions, and reaction prediction, comprising the following steps:

[0055] S1. Select an open source crystal structure data set as a crystal structure generation data set, convert the data format in the open source crystal structure data set, and use the open source crystal structure data set after the data format conversion as a training data set for the SDE paradigm diffusion model; divide the training data set into a training set, a validation set, and a test set in proportion;

[0056] S2. Construct an SDE paradigm diffusion model, wherein the diffusion process of the SDE paradigm diffusion model includes forward denoising and reverse denoising processes; forward denoising the SDE paradigm diffusion model through a set diffusion coefficient function; reverse denoising the SDE paradigm diffusion model through an SDE reverse solution process; input the data of the training data set into the SDE paradigm diffusion model in batches, and train and verify the SDE paradigm diffusion model; add weights to the trained SDE paradigm diffusion model, and jointly train the trained SDE paradigm diffusion model with a conditional generation model and an unconditional generation model to obtain a conditional generation SDE paradigm diffusion model;

[0057] S3, selecting the structural data of the target crystal from the crystal structure generation data set, inputting the structural data of the target crystal into the conditional generation SDE paradigm diffusion model, and obtaining the atomic information data of the target crystal;

[0058] S4, inputting the structural data of the target crystal into the CGCNN pre-training model, and predicting the physical properties of the target crystal by the CGCNN pre-training model;

[0059] S5. Construct a first graph neural network, input the atomic information data of the target crystal into the first graph neural network, and obtain the lattice parameters of the target crystal that meet the physical properties of the target crystal; construct a second graph neural network, input the lattice parameters of the target crystal into the second graph neural network to predict the lattice of the target crystal and generate a unit cell of the target crystal.

[0060] In this embodiment, it also includes: S6, using a spectral decomposition method to increase the unit cell generation rate of the target crystal; the spectral decomposition method is applicable to crystals, chemical molecules and proteins.

[0061] In this embodiment, in step S1, an open source crystal structure data set is selected as a crystal structure generation data set.

[0062] Specifically, the open source crystal structure dataset MP20 is used as the training dataset. The dataset consists of a cif type file containing information such as the number of crystal atoms, three-dimensional coordinates, and unit cell parameters of 89 elements.

[0063] The data format of the open source crystal structure data set is converted, and the open source crystal structure data set after the data format conversion is used as a training data set for the diffusion model.

[0064] Specifically, the chemical information file type conversion package zeo++ is used to convert the cif file type batches into the sdf file type required for training. The sdf file type includes the number of atoms in the unit cell, the atomic bonding adjacency matrix, and the three-dimensional coordinates of each atom.

[0065] The training data set is divided into a training set, a validation set, and a test set in proportion.

[0066] Specifically, the data set is divided into training set: validation set: test set in a ratio of 8:1:1.

[0067] In this embodiment, in step S2, an SDE paradigm diffusion model is constructed, and the diffusion process of the SDE paradigm diffusion model includes forward denoising and reverse denoising processes; the SDE paradigm diffusion model is forward denoised by a set diffusion coefficient function; the SDE paradigm diffusion model is reversely denoised by an SDE reverse solution process; the training data set data is input into the SDE paradigm diffusion model in batches, and the SDE paradigm diffusion model is trained and verified;

[0068] Specifically, the diffusion model selects the SDE paradigm, and the diffusion process is divided into a continuous process of forward noise addition and backward noise reduction, so as to add noise of infinite scales and represent it as a random process on a continuous time scale.

[0069] ;

[0070] In the formula, is a vector-valued function as the drift coefficient, is the truth function as the diffusion coefficient, represents the standard Brownian motion, represents infinitesimal white noise, The solution of the stochastic differential equation is a set of continuous values ​​of the random variable , these random variables track a random path from time 0 to T.

[0071] make Indicates that the sample is at time t ( ), and the distribution at different times indicates that noise of different scales has been added. Represents the probability density distribution of the original data. After a sufficiently long period of noise perturbation, an easy-to-handle prior noise distribution is obtained at time T , is a Gaussian distribution. The diffusion process of SDE can be designed. In the present invention, the forward noise addition process is designed as:

[0072] ;

[0073] In the formula, is an infinitesimal sample variable; is the designed diffusion coefficient; is infinitesimal white noise;

[0074] This process gradually adds Gaussian noise with a mean of 0 and a gradually increasing variance to the original data.

[0075] SDE has a very clear solution process, which is the inverse denoising process:

[0076] ;

[0077] In the formula, is an infinitesimal sample variable; is the drift coefficient; is the diffusion coefficient; is infinitesimal white noise; is the designed diffusion coefficient; is the square of the diffusion coefficient; is the sample gradient; is the logarithm of the probability density function; is an infinitesimal time variable.

[0078] Therefore, the optimization goal of SDE is to use a neural network to approximate the first-order gradient (defined as a score) of the probability density distribution of the data at each time t. The gradient value predicted by the neural network is recorded as , the final loss function is:

[0079] ;

[0080] In the formula, Indicates time interval The uniform distribution on is the gradient value predicted by the neural network, As a positive weight function, the present invention selects Balance the differences in losses at different times. represents the expectation of a random variable that follows this distribution.

[0081] When the trained model can predict the score of each sample at different times, random sampling from the prior distribution can continuously reduce noise to obtain a clean sample, thereby achieving the generation purpose.

[0082] For a crystal M with N atoms, it can be expressed as Represent the atomic type, atomic coordinates and adjacency matrix value respectively, 0 and 1 represent the atom without bond and bond respectively. The atomic type is uniquely encoded and connected with the coordinate value and recorded as , the noise enhancement process is as follows:

[0083] ;

[0084] ;

[0085] In the formula, Moment Matrix and They are all high-dimensional uncorrelated Gaussian noises.

[0086] The noise reduction process is as follows:

[0087] ;

[0088] , the overline indicates the reverse process, .

[0089] The final loss function is:

[0090] ;

[0091] In the formula, is the expectation over a uniform time distribution; For sample expectations; is the weight coefficient; is the gradient of the probability density function for sample x at time t; Predict values ​​for the neural network; For sample expect; is the gradient of the probability density function for sample B; Predict values ​​for the neural network;

[0092] Weights are added to the trained SDE paradigm diffusion model, and the trained SDE paradigm diffusion model is jointly trained with a conditional generation model and an unconditional generation model to obtain a conditional generation SDE paradigm diffusion model.

[0093] Specifically, most of the current research on crystal structure generation is unconditional generation, which has limited effect on replacing artificial synthesis of crystals that meet certain conditions. Unlike the empirical nature of the DDPM paradigm in the process of controlling conditional generation, the SDE paradigm has a better mathematical foundation. The properties that the crystal should satisfy are recorded as conditions , then the first-order gradient of conditional probability for the sample can be expressed as:

[0094] .

[0095] Therefore, the trained unconditional generative model can be used directly, and a classification model needs to be trained. However, for continuous value conditions (crystal properties), it is unreasonable to train a classification model. The above formula can be rewritten as:

[0096] ;

[0097] In the formula, is the weight; is the sample gradient of the conditional probability density function; is the sample gradient of the probability density function; by introducing the weight The conditional generation model and the unconditional generation model are jointly trained, and the probability By randomly setting the condition to 0, we can get the final conditional generation SDE diffusion model.

[0098] Among them, the physical properties of the crystal are predicted using the open source CGCNN model, and the prediction effect is consistent with that of the actual DFT calculation. Of course, multiple conditions (properties) can also be used to train the model to obtain a crystal structure that meets multiple physical properties.

[0099] In this embodiment, in step S3, the atomic information data of the target crystal includes: atomic type, atomic coordinates, and atomic adjacency matrix; in step S4, the physical properties of the target crystal include: generation energy, absolute energy, bandwidth, Fermi level, bulk modulus, and Poisson's ratio; in step S5, a first graph neural network is constructed, and the atomic information data of the target crystal is input into the first graph neural network to obtain the lattice parameters of the target crystal that meet the physical properties of the target crystal.

[0100] Specifically, the crystal structure is different from the molecule and has a strict spatial arrangement. The concept of lattice is used in inorganic chemistry to describe the spatial arrangement of atoms in the unit cell. Atomic coordinates and lattice together constitute the smallest unit of the crystal structure - the unit cell. After using the SDE diffusion model to obtain the qualified crystal atom type, coordinates and adjacency matrix, it is used as input to train the first graph neural network to predict the lattice parameters (three side lengths and their three angles). This task belongs to the multi-node regression task.

[0101] After the first neural network is trained, a series of crystal physical properties are set first, and a Gaussian noise is sampled to generate the atomic type, coordinates and adjacency matrix that meet the physical properties through the SDE conditional diffusion model.

[0102] Then, a second graph neural network is constructed, and the lattice parameters of the target crystal are input into the second graph neural network to predict the lattice of the target crystal and generate a unit cell of the target crystal.

[0103] In this embodiment, in step S6, a spectral decomposition method is used to increase the unit cell generation rate of the target crystal; the spectral decomposition method is applicable to crystals, chemical molecules and proteins.

[0104] Specifically, it is carried out in two steps:

[0105] Step 1: spectral decomposition (SD);

[0106] For an n-order square matrix , which can be decomposed spectrally , in yes of The diagonal matrix of eigenvalues, yes of is an orthogonal matrix consisting of eigenvectors.

[0107] Step 2: Spectral decomposition of the bond adjacency matrix;

[0108] For the key adjacency matrix , using its characteristic matrix for noise enhancement, and the noise is only added to the diagonal eigenvalues, which avoids the problem of rapid decrease in signal-to-noise ratio caused by injecting noise into the entire adjacency matrix. becomes , which accelerates the crystal structure generation process and saves computing resources and time.

[0109] In a possible embodiment, a crystal generation example is provided as follows:

[0110] S100, using the open source crystal structure dataset MP20 as a crystal structure generation dataset, the dataset is composed of a cif file format representing the unit cell parameters and atomic three-dimensional coordinates of each crystal structure.

[0111] S200. Convert the original data set file format to obtain a data format that can be read by the diffusion model. First, use the zeo++ software to reduce the crystal symmetry of the cif file to P1. Due to the multiple symmetries of the crystal structure, the complete unit cell can use the smallest asymmetric unit to represent its basic structure. This results in the atoms not being fully connected, and the diffusion model uses a fully connected graph to represent the crystal structure, which is not conducive to model training and requires the elimination of symmetry operations. Then convert the cif file format to the sdf file format that represents the number of atoms, three-dimensional coordinates, and bond adjacency matrix of each crystal structure. The data set is divided into training set, validation set, and test set in a ratio of 8:1:1.

[0112] S300. Apply spectral decomposition to the bond adjacency matrix, keeping the atom type and coordinate matrix unchanged.

[0113] S400, the diffusion model is divided into a forward denoising process and a reverse denoising process. The SDE denoising process and denoising process have clear mathematical formulas. The designed diffusion coefficient function is used for denoising, and the SDE reverse solution process is used for denoising.

[0114] S500, set weight , using the CGCNN pre-trained model to predict a series of physical properties of the crystal structure as conditions.

[0115] S600, use the training set to train the model. The MP20 data set is 35,000 examples. Unconditional generation and conditional generation diffusion models are jointly trained. The loss function is the first-order gradient of probability density to samples. The training batch and epoch are 256 and 3000 respectively, the learning rate is 10-4, and the number of test epochs is 20. During the training process, the model training effect is cross-validated and the model generalization ability is tested on the test set every 20 epochs.

[0116] S700, build a graph neural network with crystal atom type, coordinates and bond adjacency matrix as input, lattice parameters as output, and train node regression tasks. The training batch and epoch are 32 and 100 respectively, the learning rate is 10-4, and the number of test epochs is 10. During the training process, the model training effect is cross-validated and the model generalization ability is tested on the test set every 10 epochs.

[0117] S700, set scientific crystal physical property values, randomly collect noise values ​​from multi-dimensional standard Gaussian noise distribution and As the starting value, the reverse noise reduction process is realized. When sampling, the distribution of samples of different sizes should be consistent with the distribution of the original data set, so as to ensure that the generated crystal is closer to the distribution of the original data set.

[0118] S800, after step-by-step denoising, obtains the atomic types, coordinates and bond adjacency matrices of the crystal.

[0119] S900, using the obtained atomic type, coordinates and bond adjacency matrix as input to predict the lattice using a graph neural network to obtain a complete unit cell.

[0120] In the above example process, the generated crystal structure will appear in the original data set. This is because when there are too many training examples in the data set, the noise of random sampling will inevitably overlap with the standard Gaussian noise obtained by adding noise. The crystal structure that does not appear in the data set is a new type of crystal, thus replacing mechanical artificial synthesis attempts. At the same time, the continuous use of this method can generate an infinite number of crystal structures, and the generated crystal structure can also be used to expand the original data set, making the generated crystal structure more accurate through iteration. At the same time, this method can be used for but not limited to the MP20 crystal structure data set.

[0121] In summary, an open source crystal structure dataset is selected as a crystal structure generation dataset, the data format in the open source crystal structure dataset is converted, and the open source crystal structure dataset after the data format conversion is used as a training dataset for the SDE paradigm diffusion model; the training dataset is divided into a training set, a validation set and a test set in proportion; an SDE paradigm diffusion model is constructed, and the diffusion process of the SDE paradigm diffusion model includes a forward denoising process and a reverse denoising process; the SDE paradigm diffusion model is forward denoised by a set diffusion coefficient function; the SDE paradigm diffusion model is reverse denoised by an SDE reverse solution process; the data of the training dataset is input into the SDE paradigm diffusion model in batches, and the SDE paradigm diffusion model is trained and verified; weights are added to the trained SDE paradigm diffusion model, and the trained SDE paradigm diffusion model is validated. The conditional generation model and the unconditional generation model are jointly trained to obtain the conditional generation SDE paradigm diffusion model; the structural data of the target crystal is selected from the crystal structure generation data set, and the structural data of the target crystal is input into the conditional generation SDE paradigm diffusion model to obtain the atomic information data of the target crystal; the structural data of the target crystal is input into the CGCNN pre-training model, and the physical properties of the target crystal are predicted by the CGCNN pre-training model; a first graph neural network is constructed, and the atomic information data of the target crystal is input into the first graph neural network to obtain the lattice parameters of the target crystal that meet the physical properties of the target crystal; a second graph neural network is constructed, and the lattice parameters of the target crystal are input into the second graph neural network to predict the lattice of the target crystal and generate the unit cell of the target crystal; a spectral decomposition method is used to increase the unit cell generation speed of the target crystal. The present invention proposes for the first time to use the SDE diffusion model paradigm for crystal structure generation. Different from the DDPM paradigm, SDE makes the noise increase and noise reduction process continuous, adds infinite Gaussian noises of different variances, has a more complete mathematical theory support, and can accurately calculate the probability density of the original data. At the same time, the joint training of the conditional generation model without a classifier can generate a crystal structure that satisfies multiple physical properties at the same time. The graph neural network method is used to predict the lattice and obtain a complete unit cell. Unlike other studies that simultaneously diffuse information such as the lattice and atomic coordinates, the present invention adopts a divide-and-conquer strategy to obtain a complete unit cell, reducing computing resources and generation time. The present invention also proposes a spectral decomposition method to improve the quality and speed of crystal structure generation, and uses spectral decomposition for the atomic bond adjacency matrix, which solves the problems of rapid decrease in signal-to-noise ratio and slow generation process during diffusion, and can be used in scenarios including but not limited to crystals, chemical molecules and proteins.The present invention still has optimization directions for the diffusion model. In fact, in scenarios such as crystal and chemical molecule generation, adding continuous Gaussian noise will still quickly destroy its graph structure. Currently, there have been studies on adding discrete noise in the process of graph generation using the diffusion model to always maintain the graph structure, which can generate graph information better and faster.

[0122] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.

[0123] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0124] Example 2

[0125] See also Figure 2 Embodiment 2 of the present invention further provides an inorganic crystal condition generation analysis processing device, which adopts an inorganic crystal condition generation analysis method of the above embodiment 1, including:

[0126] The data set processing module 001 is used to select an open source crystal structure data set as a crystal structure generation data set, convert the data format in the open source crystal structure data set, and use the open source crystal structure data set after the data format conversion as a training data set for the SDE paradigm diffusion model; and divide the training data set into a training set, a validation set, and a test set in proportion;

[0127] The conditional generation SDE paradigm diffusion model construction module 002 is used to construct an SDE paradigm diffusion model, wherein the diffusion process of the SDE paradigm diffusion model includes forward denoising and reverse denoising processes; forward denoising is performed on the SDE paradigm diffusion model through a set diffusion coefficient function; reverse denoising is performed on the SDE paradigm diffusion model through an SDE reverse solution process; the data of the training data set are input into the SDE paradigm diffusion model in batches, and the SDE paradigm diffusion model is trained and verified; weights are added to the trained SDE paradigm diffusion model, and the trained SDE paradigm diffusion model is jointly trained with a conditional generation model and an unconditional generation model to obtain a conditional generation SDE paradigm diffusion model;

[0128] A crystal atomic information data acquisition module 003 is used to select the structural data of the target crystal from the crystal structure generation data set, input the structural data of the target crystal into the conditional generation SDE paradigm diffusion model, and obtain the atomic information data of the target crystal;

[0129] The crystal physical property prediction module 004 is used to input the structural data of the target crystal into the CGCNN pre-training model, and predict the physical properties of the target crystal through the CGCNN pre-training model;

[0130] The unit cell generation module 005 is used to construct a first graph neural network, input the atomic information data of the target crystal into the first graph neural network, and obtain the lattice parameters of the target crystal that meet the physical properties of the target crystal; construct a second graph neural network, input the lattice parameters of the target crystal into the second graph neural network to predict the lattice of the target crystal, and generate the unit cell of the target crystal.

[0131] In this embodiment, it also includes: a spectrum decomposition acceleration module 006, which is used to increase the unit cell generation speed of the target crystal by using the spectrum decomposition method;

[0132] In the crystal atomic information data acquisition module 003, the atomic information data of the target crystal includes: atomic type, atomic coordinates, and atomic adjacency matrix;

[0133] In the crystal physical property prediction module 004, the physical properties of the target crystal include: generation energy, absolute energy, bandwidth, Fermi level, bulk modulus, and Poisson's ratio.

[0134] In this embodiment, in the conditional generation SDE paradigm diffusion model construction module 002, the forward noise addition processing process formula is:

[0135] ;

[0136] In the formula, is an infinitesimal sample variable; is the designed diffusion coefficient; is infinitesimal white noise;

[0137] The inverse denoising process formula is:

[0138] ;

[0139] In the formula, is an infinitesimal sample variable; is the drift coefficient; is the diffusion coefficient; is infinitesimal white noise; is the designed diffusion coefficient; is the square of the diffusion coefficient; is the sample gradient; is the logarithm of the probability density function; is an infinitesimal time variable.

[0140] In this embodiment, in the conditional generation SDE paradigm diffusion model construction module 002, in the SDE paradigm diffusion model, the first-order gradient expression of the conditional probability for the sample is:

[0141] ;

[0142] After adding weights to the SDE paradigm diffusion model, the expression is:

[0143] ;

[0144] In the formula, is the weight; is the sample gradient of the conditional probability density function; is the sample gradient of the probability density function.

[0145] It should be noted that the information interaction, execution process and other contents between the modules of the above-mentioned device are based on the same concept as the method embodiment in Example 1 of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown in the previous part of the present application, and will not be repeated here.

[0146] Example 3

[0147] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, in which a program code of an inorganic crystal conditional generation and analysis method is stored, and the program code includes instructions for executing an inorganic crystal conditional generation and analysis method of embodiment 1 or any possible implementation thereof.

[0148] Computer-readable storage media 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 available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0149] Example 4

[0150] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;

[0151] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute an inorganic crystal conditional generation analysis method of embodiment 1 or any possible implementation thereof.

[0152] Specifically, the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor implemented by reading software codes stored in a memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.

[0153] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part 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 process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The 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 computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.

[0154] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0155] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.

Claims

1. A method for analyzing inorganic crystal conditional generation, characterized in that: include: Construct an SDE paradigm diffusion model, wherein the diffusion process of the SDE paradigm diffusion model includes forward denoising and reverse denoising processes; forward denoising the SDE paradigm diffusion model through a set diffusion coefficient function; reverse denoising the SDE paradigm diffusion model through an SDE reverse solution process; input the data of the training data set into the SDE paradigm diffusion model in batches, and train and verify the SDE paradigm diffusion model; add weights to the trained SDE paradigm diffusion model, and jointly train the trained SDE paradigm diffusion model with a conditional generation model and an unconditional generation model to obtain a conditional generation SDE paradigm diffusion model; Selecting the structural data of the target crystal from the crystal structure generation data set, inputting the structural data of the target crystal into the conditional generation SDE paradigm diffusion model, and obtaining the atomic information data of the target crystal; The atomic information data of the target crystal includes: atomic type, atomic coordinates, and atomic adjacency matrix; Inputting the structural data of the target crystal into a CGCNN pre-trained model, and predicting the physical properties of the target crystal by using the CGCNN pre-trained model; Constructing a first graph neural network, inputting the atomic information data of the target crystal into the first graph neural network, and obtaining the lattice parameters of the target crystal that meet the physical properties of the target crystal; constructing a second graph neural network, inputting the lattice parameters of the target crystal into the second graph neural network to predict the lattice of the target crystal, and generating a unit cell of the target crystal; The forward noise addition process formula is: dx=e t dw In the formula, dx is an infinitesimal sample variable; e t is the designed diffusion coefficient; dw is infinitesimal white noise; The inverse denoising process formula is: Where dx is an infinitesimal sample variable; f(x,t) is the drift coefficient; g(t) is the diffusion coefficient; dw is an infinitesimal white noise; e t is the designed diffusion coefficient; e 2t is the square of the diffusion coefficient; is the sample gradient; logp t (x) is the logarithmic value of the probability density function; dt is the infinitesimal time variable; In the SDE paradigm diffusion model, the first-order gradient expression of the conditional probability for the sample is: After adding weights to the SDE paradigm diffusion model, the expression is: In the formula, the property that the crystal should satisfy is recorded as condition y, and γ is the weight; is the sample gradient of the conditional probability density function; is the sample gradient of the probability density function.

2. The inorganic crystal condition generation analysis method according to claim 1, characterized in that: Also includes: An open source crystal structure dataset is selected as a crystal structure generation dataset, the data format in the open source crystal structure dataset is converted, and the open source crystal structure dataset after the data format conversion is used as a training dataset for the SDE paradigm diffusion model; the training dataset is divided into a training set, a validation set and a test set in proportion.

3. The inorganic crystal condition generation analysis method according to claim 2, characterized in that: Also includes: Using a spectral decomposition method, increasing the unit cell generation rate of the target crystal; The physical properties of the target crystal include: generation energy, absolute energy, bandwidth, Fermi level, bulk modulus, and Poisson's ratio.

4. An inorganic crystal condition generation analysis processing device, using an inorganic crystal condition generation analysis method according to any one of claims 1 to 3, characterized in that: include: A conditional generation SDE paradigm diffusion model construction module is used to construct an SDE paradigm diffusion model, wherein the diffusion process of the SDE paradigm diffusion model includes forward denoising and reverse denoising processes; forward denoising is performed on the SDE paradigm diffusion model through a set diffusion coefficient function; reverse denoising is performed on the SDE paradigm diffusion model through an SDE reverse solution process; data of a training data set are input into the SDE paradigm diffusion model in batches, and the SDE paradigm diffusion model is trained and verified; weights are added to the trained SDE paradigm diffusion model, and the trained SDE paradigm diffusion model is jointly trained with a conditional generation model and an unconditional generation model to obtain a conditional generation SDE paradigm diffusion model; A crystal atomic information data acquisition module is used to select the structural data of the target crystal from the crystal structure generation data set, input the structural data of the target crystal into the conditional generation SDE paradigm diffusion model, and obtain the atomic information data of the target crystal; In the crystal atomic information data acquisition module, the atomic information data of the target crystal includes: atomic type, atomic coordinates, and atomic adjacency matrix; A crystal physical property prediction module, used to input the structural data of the target crystal into the CGCNN pre-trained model, and predict the physical properties of the target crystal through the CGCNN pre-trained model; A unit cell generation module is used to construct a first graph neural network, input the atomic information data of the target crystal into the first graph neural network, and obtain the lattice parameters of the target crystal that meet the physical properties of the target crystal; construct a second graph neural network, input the lattice parameters of the target crystal into the second graph neural network to predict the lattice of the target crystal, and generate a unit cell of the target crystal; In the conditional generation SDE paradigm diffusion model construction module, the forward noise processing process formula is: dx=e t dw In the formula, dx is an infinitesimal sample variable; e t is the designed diffusion coefficient; dw is infinitesimal white noise; The inverse denoising process formula is: Where dx is an infinitesimal sample variable; f(x,t) is the drift coefficient; g(t) is the diffusion coefficient; dw is an infinitesimal white noise; e t is the designed diffusion coefficient; e 2t is the square of the diffusion coefficient; is the sample gradient; logp t (x) is the logarithmic value of the probability density function; dt is the infinitesimal time variable; In the conditional generation SDE paradigm diffusion model construction module, in the SDE paradigm diffusion model, the first-order gradient expression of the conditional probability to the sample is: After adding weights to the SDE paradigm diffusion model, the expression is: In the formula, the property that the crystal should satisfy is recorded as condition y, and γ is the weight; is the sample gradient of the conditional probability density function; is the sample gradient of the probability density function.

5. The inorganic crystal condition generation analysis processing device according to claim 4, characterized in that: Also includes: The data set processing module is used to select an open source crystal structure data set as a crystal structure generation data set, convert the data format in the open source crystal structure data set, and use the open source crystal structure data set after the data format conversion as a training data set for the SDE paradigm diffusion model; and divide the training data set into a training set, a validation set, and a test set in proportion.

6. The inorganic crystal condition generation analysis processing device according to claim 4, characterized in that: It also includes: a spectrum decomposition acceleration module, which is used to increase the unit cell generation speed of the target crystal by using a spectrum decomposition method; In the crystal physical property prediction module, the physical properties of the target crystal include: generation energy, absolute energy, bandwidth, Fermi level, bulk modulus, and Poisson's ratio.