Nucleic acid full-atom structure generation method and device, electronic equipment and storage medium
By using deep learning network based on diffusion model to generate nucleic acid full atom structure, the problems of inaccurate design of nucleic acid full atom structure and low experimental success rate in the prior art are solved, and a simpler and more reliable design process and higher Experiment success rate.
Patent Information
- Application Number
- CN202411585043.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, the design results of the nucleic acid full-atom structure are inaccurate and unreasonable, and the experimental success rate is low.
A deep learning network based on diffusion model is used to obtain the initial nucleic acid sequence containing random sequences and the initial all-atom coordinates after noise, and input them into the trained diffusion model to generate the nucleic acid full-atom structure.
The ability to generate and controllable nucleic acid whole-atom coordinates is realized, the design process is simpler, the results are more reliable, and the experiment success rate is improved.
Smart Images

Figure CN119479774A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of biological macromolecules and deep learning technology, and in particular to a method, device, electronic device and storage medium for generating a nucleic acid all-atom structure. Background Art
[0002] Existing methods for de novo design of biomacromolecules (proteins, nucleic acids, etc.) are usually divided into two steps: designing the main chain structure of the macromolecule and generating a matching sequence based on the given main chain structure. The two steps are often designed by two separately trained models, and the final design result cannot match the two models at the same time, resulting in inaccurate and unreasonable design results and low experimental success rate. Summary of the invention
[0003] The present invention provides a method, device, electronic device and storage medium for generating a nucleic acid all-atom structure, which are used to solve the defects of the prior art that the design results of the nucleic acid all-atom structure are inaccurate and unreasonable, and the experimental success rate is low.
[0004] The present invention provides a method for generating a nucleic acid all-atom structure, comprising: Obtaining an initial nucleic acid sequence including a random sequence and initial all-atom coordinates after noise addition; Inputting the initial nucleic acid sequence and the initial all-atom coordinates into a trained diffusion model to obtain a generated nucleic acid sequence and generated all-atom coordinates output by the diffusion model; Wherein, the diffusion model is obtained by training based on the sample nucleic acid structure.
[0005] According to the method for generating a nucleic acid all-atom structure provided by the present invention, the training step of the diffusion model comprises: Extracting information of each nucleotide of the sample nucleic acid structure; Performing noise processing on the all-atom coordinates and the nucleotide sequence in the nucleotide information respectively to obtain noisy all-atom coordinates and noisy sequences; The diffusion model is obtained by training an initial model based on the noisy all-atom coordinates, the noisy sequence and the position code in the nucleotide information.
[0006] According to the method for generating a nucleic acid all-atom structure provided by the present invention, the initial model includes a feature encoding module and a sequence and structure decoding module, and the initial model is trained based on the noisy all-atom coordinates, the noisy sequence, and the position encoding in the nucleotide information to obtain the diffusion model, including: Inputting the noisy all-atom coordinates, the noisy sequence and the position code into the feature coding module to obtain the one-dimensional features and the two-dimensional features output by the feature coding module; Inputting the one-dimensional features, the two-dimensional features and the position code into the sequence and structure decoding module to obtain the predicted sequence, predicted main chain coordinates and predicted torsion angle output by the sequence and structure decoding module; Based on the predicted sequence, predicted main chain coordinates and predicted torsion angles, the initial model is trained to obtain the diffusion model.
[0007] According to the method for generating a nucleic acid all-atom structure provided by the present invention, the initial model further includes an attention module, and the one-dimensional feature, the two-dimensional feature and the position code are input into the sequence and structure decoding module to obtain the predicted sequence, the predicted main chain coordinates and the predicted torsion angle output by the sequence and structure decoding module, including: Inputting the one-dimensional feature and the two-dimensional feature into the attention module to obtain the one-dimensional attention feature and the two-dimensional attention feature output by the attention module; The one-dimensional attention feature, the two-dimensional attention feature and the position code are input into the sequence and structure decoding module to obtain the predicted sequence, predicted main chain coordinates and predicted torsion angle output by the sequence and structure decoding module.
[0008] According to the method for generating a nucleic acid all-atom structure provided by the present invention, the sequence and structure decoding module includes a sequence decoding module and a structure decoding module, and the one-dimensional attention feature, the two-dimensional attention feature and the position code are input into the sequence and structure decoding module to obtain the predicted sequence, the predicted main chain coordinates and the predicted torsion angle output by the sequence and structure decoding module, including: Inputting the attention one-dimensional feature into the sequence decoding module to obtain a prediction sequence output by the sequence decoding module; Inputting the one-dimensional attention feature, the two-dimensional attention feature and the position code into the structure decoding module to obtain the predicted main chain coordinates output by the structure decoding module; The one-dimensional attention feature is input into the structure decoding module to obtain the predicted torsion angle output by the structure decoding module.
[0009] According to the method for generating a nucleic acid all-atom structure provided by the present invention, the initial model is trained based on the predicted sequence, the predicted main chain coordinates and the predicted torsion angle to obtain the diffusion model, including: Determining the main chain coordinate loss based on the difference between each predicted rigid body and the original rigid body under the predicted main chain coordinate; determining a sequence prediction loss based on a difference between the predicted sequence and a native sequence corresponding to the sample nucleic acid structure; Based on the predicted sequence, predicted main chain coordinates and predicted torsion angles, the predicted all-atom coordinates of each nucleotide are calculated, and the all-atom coordinate loss is determined based on the difference between the predicted all-atom coordinates of the nucleotide predicted correctly by the sequence and the natural all-atom coordinates; Determining unreasonable structural losses based on the predicted sequence, predicted main chain coordinates and predicted torsion angles; Based on the main chain coordinate loss, the sequence prediction loss, the all-atom coordinate loss and the unreasonable structure loss, the initial model is trained to obtain the diffusion model.
[0010] According to the method for generating a nucleic acid all-atom structure provided by the present invention, the obtaining of an initial nucleic acid sequence including a random sequence and initial all-atom coordinates after noise addition comprises: Using the initialized random sequence as the initial nucleic acid sequence, and randomly sampling a set of all-atom coordinates from Gaussian noise as the initial all-atom coordinates; or, Based on the known nucleic acid structure, a part of the nucleic acid sequence and a part of the all-atom coordinates are determined, and the other parts are replaced by random sequences and Gaussian noise, respectively, to obtain the initial nucleic acid sequence and initial all-atom coordinates, respectively.
[0011] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-described methods for generating a full-atom structure of nucleic acid is implemented.
[0012] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for generating a nucleic acid all-atom structure.
[0013] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for generating a nucleic acid all-atom structure as described above is implemented.
[0014] The method, device, electronic device and storage medium for generating nucleic acid all-atom structures provided by the present invention can simultaneously diffuse the sequence and all-atom coordinates by applying a diffusion model, and have the ability to generate nucleic acid all-atom coordinates from scratch and in a controllable manner. In addition, a single model is used to complete the work of designing multiple models separately in the past, making the design process more concise and the results more credible. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 It is a schematic diagram of the process of the method for generating the nucleic acid all-atom structure provided by the present invention.
[0017] Figure 2 It is a structural schematic diagram of the initial model provided by the present invention.
[0018] Figure 3 It is a schematic structural diagram of the nucleic acid all-atom structure generating device provided by the present invention.
[0019] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. 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.
[0021] The modeling methods of biomacromolecules include: the traditional method using energy functions and the modeling scheme using deep learning models. The traditional energy function method uses statistical methods to model and fit the molecular force field, and then completes the molecular structure generation including nucleic acids and proteins through steps such as initial structure construction, molecular dynamics optimization of the main chain structure, and sequence design based on energy models.
[0022] The deep learning-based biomolecule generation method is usually divided into two steps. The first step is to generate the main chain structure of protein or nucleic acid molecules using methods including diffusion models, and the second step is to design sequences based on the given main chain structure using methods including graph network models. Since proteins and other molecules have side chain conformations, if the full atomic structure is required, it is also necessary to use energy function-based methods for conformation optimization.
[0023] Traditional methods are based on energy functions. Due to the use of a large number of approximations, there is a problem of insufficient precision in design. At the same time, a lot of time is needed for molecular dynamics sampling generation, and the algorithm sampling efficiency is low. Since the algorithm based on the generative model uses two separately trained networks to generate the main chain structure and sequence respectively, there is usually a mismatch between the two models, and the design error is easily amplified: the main chain generation model cannot take into account the impact of the key side chain conformation on the structure, and the generated main chain structure cavity is difficult to accommodate larger side chains, and the generated structure is biased compared to natural macromolecules. The sequence design model obtains a biased structure as input, and the design result will further enhance the deviation.
[0024] At the same time, in the design of nucleic acid macromolecules, the nucleic acid structure database is sparser than protein structure data, and nucleic acid structures are generally affected by factors such as methylation and phosphorylation. The nucleic acid main chain structure is more sensitive to the nucleic acid side chain structure, and the influence of the side chain base conformation needs to be considered while generating the main chain structure.
[0025] In response to the above problems, an embodiment of the present invention proposes a method for generating a nucleic acid all-atom structure using a deep learning network based on a diffusion model. In this method, an initial nucleic acid sequence containing a random sequence and an initial all-atom coordinate after noise are first obtained; the initial nucleic acid sequence and the initial all-atom coordinates are input into a trained diffusion model to obtain a generated nucleic acid sequence and generated all-atom coordinates output by the diffusion model; wherein the diffusion model is obtained based on sample nucleic acid structure training. This method can use the diffusion model to diffuse the sequence and all-atom coordinates at the same time, and has the ability to generate and controllably generate nucleic acid all-atom coordinates from scratch. In addition, a single model is used to complete the work of designing multiple models separately in the past, and the design process is simpler and the results are more credible.
[0026] The embodiments of the present invention can be applied to scenarios where the generation of nucleic acid all-atom structures is required, such as in the de novo design of nucleic acid drug molecules and ribozymes. The execution subject of the method can be an electronic device such as a terminal device, a computer, a server, a server cluster, or a specially designed nucleic acid all-atom structure generation device, or a nucleic acid all-atom structure generation device set in the electronic device, which can be implemented by software, hardware, or a combination of the two.
[0027] In the description of the embodiments of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0028] Figure 1 Schematic diagram of the process of generating the nucleic acid all-atom structure provided by the present invention, such as Figure 1 As shown, the method comprises the following steps: Step 110, obtaining an initial nucleic acid sequence including a random sequence and initial all-atom coordinates after noise addition.
[0029] Step 120, inputting the initial nucleic acid sequence and the initial all-atom coordinates into the trained diffusion model to obtain the generated nucleic acid sequence and generated all-atom coordinates output by the diffusion model; Among them, the diffusion model is trained based on the sample nucleic acid structure.
[0030] Specifically, the method provided by the embodiment of the present invention has the ability to generate the all-atom structure of nucleic acid from scratch, as well as the ability to controllably generate a given initial structure and initial sequence.
[0031] Initialize a random sequence when generating nucleic acid all-atom structures from scratch , the initialized random sequence As the initial nucleic acid sequence, a set of all-atom coordinates are randomly sampled from Gaussian noise , as the initial all-atom coordinates.
[0032] When generating a given initial structure, a partial nucleic acid sequence and a partial all-atom coordinates are determined based on a given known nucleic acid initial structure, the partial nucleic acid sequence and the full-atom coordinates are fixed, and the other parts are replaced by random sequences and Gaussian noise, respectively, to obtain the initial nucleic acid sequence and the initial all-atom coordinates.
[0033] The initial nucleic acid sequence and the initial all-atom coordinates are then input into the trained diffusion model to obtain the generated nucleic acid sequence and the generated all-atom coordinates output by the diffusion model. The diffusion model here obtains the generated nucleic acid sequence and the generated all-atom coordinates by learning the inverse operation of forward diffusion, that is, starting from pure noise, gradually "denoising" through a series of inverse steps, and finally generating a sample close to the original data distribution.
[0034] Before executing step 120, a diffusion model may be pre-trained, wherein the diffusion model training step includes steps 210-230.
[0035] Step 210: extracting information of each nucleotide of the sample nucleic acid structure.
[0036] Here, the source of the sample nucleic acid structure is the PDB database, and all nucleic acid structures with a resolution of less than 4 angstroms resolved by x-ray diffraction crystals are extracted from the PDB database, namely the sample nucleic acid structures. The information to be extracted includes all atomic coordinates of each nucleotide residue and the sequence of the nucleotides. In the training of the diffusion model, for nucleic acid structures with a total length greater than 128, sequence truncation or spatial truncation is used in proportion to randomly split and generate smaller nucleic acid structures. Sequence truncation refers to the sequential selection of 128 adjacent nucleotides. Spatial truncation refers to the random selection of the 128 nucleotides closest to a certain nucleotide residue.
[0037] Nucleic acids are mainly divided into two categories: DNA and RNA. RNA is composed of four nucleotides: A, G, C, and U; DNA is composed of four nucleotides: A, T, C, and G; they are annotated as DA, DT, DC, and DG in PDB. Each nucleotide residue has three functional groups: pentose-phosphate group-nitrogenous base. In the PDB data set, some nucleotide residues have modifications such as methylation and phosphorylation, or lack side chain atoms, which are non-standard nucleotides. The sequence of non-standard nucleotides can be annotated as unknown nucleic acid type N. The atoms shared by all standard nucleotides are recorded as main chain atoms, namely C4', C1', C2', C3', C5', O2', O3', O4', O5', P, OP1, OP2, a total of 12 main chain atoms.
[0038] The information of each nucleotide refers to the information of each nucleotide in the sample nucleic acid structure, including: 1. The coordinates of all atoms and the name of the atom type. 2. The type of nucleotide. 3. The position code, that is, the position of the nucleotide on the nucleotide chain and the chain number in the PDB. 4. The torsion angle of the base plane relative to the pentose residue coordinate system.
[0039] Step 220 , performing noise processing on the all-atom coordinates and the nucleotide sequence in the nucleotide information respectively to obtain noisy all-atom coordinates and noisy sequences.
[0040] In order to solve the problem that the design error is easily amplified due to the mismatch between the two models when two separately trained networks are used to generate the main chain structure and sequence respectively, this embodiment uses a diffusion model to simultaneously generate the nucleic acid main chain structure and sequence. Therefore, firstly, the all-atom coordinates and the nucleotide sequence in the nucleotide information are noised to obtain the noisy all-atom coordinates and the noisy sequence.
[0041] The diffusion process is divided into T steps. The forward diffusion process builds a set of data from original data to Gaussian noise by gradually adding Gaussian noise from 0 to T. The backward process gradually denoises from T to 0 to complete the estimation of the original data, which is completed by the subsequent model.
[0042] For the full atomic coordinates in the nucleotide information, forward noise processing is performed using the following formula: is standard Gaussian noise, is a series of distributions from 0 to 1. We can use the linear interpolation of the standard DDPM (Denoising Diffusion Probabilistic Models) process, with T set to 1000. It is a linear interpolation from 0 to 1; is an intermediate variable; is the original data, i.e., the full-atom coordinates; is the noisy data input to the subsequent model, i.e., the noisy all-atom coordinates; is a constant, usually the variance of the data, and 10 angstroms is used here as an approximation. For the full atomic coordinates in the nucleotide information, the formula for forward noise processing can be expressed as: For the nucleotide sequence in the nucleotide information, the noise addition process is performed as follows. For each nucleotide residue, the probability , and take it as probability Replaced with any standard nucleotide residues, with probability Replaced with unknown nucleotide N.
[0043] Step 230 , training the initial model based on the noisy all-atom coordinates, the noisy sequence, and the positional encoding in the nucleotide information to obtain a diffusion model.
[0044] Specifically, the initial model can be trained based on the noisy all-atom coordinates, the noisy sequence and the positional encoding in the nucleotide information. Here, the initial model is a neural network model for generating the all-atom structure of nucleic acids. Figure 2 It is a structural schematic diagram of the initial model provided by the present invention, such as Figure 2 As shown, the initial model includes a feature encoding module and a sequence and structure decoding module, and step 230 specifically includes: Step 231, inputting the noisy all-atom coordinates, the noisy sequence and the position code into a feature coding module to obtain a one-dimensional feature and a two-dimensional feature output by the feature coding module; Step 232, inputting the one-dimensional features, the two-dimensional features and the position code into the sequence and structure decoding module, and obtaining the predicted sequence, the predicted main chain coordinates and the predicted torsion angle output by the sequence and structure decoding module; Step 233, based on the predicted sequence, the predicted main chain coordinates and the predicted torsion angle, the initial model is trained to obtain a diffusion model.
[0045] Specifically, the input of the feature encoding module is the noisy all-atom coordinates, the noisy sequence and the position code. The feature encoding module processes the position code information and the diffused nucleic acid position and sequence information, that is, the position information, the noisy all-atom coordinates and the noisy sequence into one-dimensional features and two-dimensional features.
[0046] Here, the one-dimensional features are information features between atoms inside the nucleotide, including: 1. The distance between the main chain atoms. 2. The angle and dihedral angle between the main chain atoms. 3. The distance between the side chain atoms. 4. The distance between the side chain atoms and the main chain atoms. 5. Position code. 6. Residue name. 7. The name of the atom contained in the residue.
[0047] The two-dimensional features are the relative information of the atoms contained in any two different nucleotides A and B, which are: 1. The distance between the main chain atoms of nucleotide A and nucleotide B. 2. The difference between the position code of nucleotide A and the position code of nucleotide B. 3. The residue names of nucleotides A and B. 4. The names and distances of the several side chain atoms closest to nucleotides A and B. In the one-dimensional and two-dimensional features, the name information is encoded in one-hot form; the distance information is encoded in RBF; and the angle information is encoded in sine-cosine.
[0048] The sequence and structure decoding module is used to predict the sequence and main chain structure, and restore the full atomic structure by integrating the sequence and main chain structure. The one-dimensional features, two-dimensional features and position encoding are input into the sequence and structure decoding module to obtain the predicted sequence, predicted main chain coordinates and predicted torsion angle output by the sequence and structure decoding module.
[0049] In some other embodiments, the initial model further includes an attention module, which processes the one-dimensional features and the two-dimensional features by a multi-layer triangular attention mechanism. Step 232 specifically includes: Step 232-1, inputting the one-dimensional feature and the two-dimensional feature into the attention module, and obtaining the attention one-dimensional feature and the attention two-dimensional feature output by the attention module; Step 232-2, input the attention one-dimensional feature, the attention two-dimensional feature and the position code into the sequence and structure decoding module to obtain the predicted sequence, predicted main chain coordinates and predicted torsion angle output by the sequence and structure decoding module.
[0050] Specifically, the attention module is composed of multiple stacks of Evoformer networks. The Evoformer network is proposed by the alphafold2 model and consists of an MSA attention network and a triangular attention network, which is used to fuse and process MSA data and template data. Here, the one-dimensional features and two-dimensional features extracted by the feature encoding module replace the MSA data and template data as the input of the Evoformer module, and the processed one-dimensional information and two-dimensional information are output, namely, the attention one-dimensional features and the attention two-dimensional features.
[0051] Then the attention one-dimensional features, attention two-dimensional features and position encoding are input into the sequence and structure decoding module to obtain the predicted sequence, predicted main chain coordinates and predicted torsion angle output by the sequence and structure decoding module. Specifically including: Step 232-21, input the attention one-dimensional feature into the sequence decoding module to obtain the prediction sequence output by the sequence decoding module; Step 232-22, input the attention one-dimensional feature, the attention two-dimensional feature and the position code into the structure decoding module to obtain the predicted main chain coordinates output by the structure decoding module; Step 232-23, input the attention one-dimensional feature into the structure decoding module to obtain the predicted torsion angle output by the structure decoding module.
[0052] The sequence and structure decoding module includes a sequence decoding module and a structure decoding module, wherein the sequence decoding module is used to predict the nucleotide sequence, and the structure decoding module is used to predict the main chain structure.
[0053] The sequence decoding module uses the projection layer to take the processed one-dimensional features, i.e., the attention one-dimensional features, as input, predicts the residue type, and outputs the predicted sequence of nucleotides.
[0054] The structure decoding module is composed of multiple stacking of IPA networks. The IPA network initializes a set of rigid body coordinates, and updates the rigid body coordinates with one-dimensional features and two-dimensional features as input. The main chain coordinates after noise addition are used as the initial structure of the rigid body coordinates of the IPA network. The input of the structure decoding module is the attention one-dimensional feature, the attention two-dimensional feature and the position encoding, and the output is the predicted main chain coordinates.
[0055] The structural decoding module uses the projection layer to take the one-dimensional feature of attention as input, predicts the torsion angle, and outputs the predicted torsion angle. It also calculates the full atomic coordinates of the nucleic acid by combining the predicted sequence type with the predicted main chain structure.
[0056] Then, based on the predicted sequence, the predicted main chain coordinates and the predicted torsion angle, the initial model is trained to obtain a diffusion model. That is, step 233 specifically includes: Step 233-1, determining the main chain coordinate loss based on the difference between each predicted rigid body and the original rigid body under the predicted main chain coordinate; Step 233-2, determining a sequence prediction loss based on a difference between the predicted sequence and a natural sequence corresponding to the sample nucleic acid structure; Step 233-3, based on the predicted sequence, the predicted main chain coordinates and the predicted torsion angle, the predicted all-atom coordinates of each nucleotide are calculated, and the all-atom coordinate loss is determined based on the difference between the predicted all-atom coordinates of the nucleotide predicted correctly in the sequence and the natural all-atom coordinates; Step 233-4, determining unreasonable structural losses based on the predicted sequence, predicted main chain coordinates and predicted torsion angles; Step 233-5, based on the main chain coordinate loss, sequence prediction loss, all-atom coordinate loss and unreasonable structure loss, the initial model is trained to obtain a diffusion model.
[0057] Specifically, the loss function of the initial model includes main chain coordinate loss, sequence prediction loss, all-atom coordinate loss, and unreasonable structure loss. In some embodiments, the loss function can be expressed as: In the formula, is the loss function of the model, is the main chain coordinate loss, is the sequence prediction loss, is the full-atom coordinate loss, It is unreasonable structural loss.
[0058] The main chain coordinate loss is determined based on the difference between each predicted rigid body and the original rigid body under the predicted main chain coordinates. The main chain coordinate loss is the frame alignment point error (Fape loss) that aligns each rigid body in sequence and calculates the difference between other predicted rigid bodies and the original rigid body.
[0059] The sequence prediction loss is determined based on the difference between the predicted sequence and the natural sequence corresponding to the sample nucleic acid structure. The sequence prediction loss is the cross entropy loss, which calculates the cross entropy between the predicted sequence distribution and the natural sequence.
[0060] The all-atom loss is determined based on the difference between the predicted all-atom coordinates of the nucleotides with correct sequence prediction and the natural all-atom coordinates. The sequence, main chain coordinates and torsion angles can be predicted first, and the predicted all-atom coordinates of each nucleotide can be calculated. Here, only the root mean square error (RMSD) between the all-atom coordinates of the nucleotides with correct sequence prediction and the natural all-atom coordinates is calculated as the all-atom loss.
[0061] The unreasonable structure loss calculation generates unreasonable bond lengths, bond angles, and collision term energies in the structure.
[0062] It should be noted that the data in the dataset will be used for multiple rounds during model training. In each round, the order of the data in the dataset is randomly shuffled and put into the model in sequence. In each round, for each data, an integer t is sampled from the average distribution of [1,1000] as the noise parameter, and the coordinates after noise are calculated. with sequence And input the model to get the predicted full-atom coordinates with sequence ,Right now in Refers to the model. The loss is calculated through the loss function, the loss is back-propagated and the model parameters are updated according to the preset learning rate. After multiple rounds of training until the loss converges, the model training is completed and the trained diffusion model is obtained.
[0063] After the diffusion model is obtained through the training convergence of the above method, the diffusion model can be used to generate the full-atom structure of nucleic acid from scratch, or controllably generate it given the initial structure and initial sequence.
[0064] Initialize a random sequence when generating nucleic acid all-atom structures from scratch , the initialized random sequence As the initial nucleic acid sequence, a set of all-atom coordinates are randomly sampled from Gaussian noise , as the initial all-atom coordinates. As input diffusion model, we get the output of the model ,in Refers to the trained diffusion model.
[0065] According to the formula Update .in, , is a linear interpolation from 0 to 1, is standard Gaussian noise, is a constant, usually the variance of the data, and 10 angstroms is used as an approximation here. , calculate the probability , with probability Replaced with any standard nucleotide residues, with probability Replace it with N to update it to . Consistent with the training process, take T=1000, from Start iterating and updating T times to get the final stable generation result , that is, generating all-atom coordinates and generating nucleic acid sequences.
[0066] When generating with a given initial structure, partial nucleic acid sequence and partial all-atom coordinates are determined based on the given known nucleic acid initial structure, and these partial nucleic acid sequence and all-atom coordinates are fixed, and the other parts are replaced with random sequences and Gaussian noise, respectively, to obtain the initial nucleic acid sequence and initial all-atom coordinates. And in each iteration, the updated structure and sequence are replaced with the initial structure and sequence, so as to achieve the effect of controllable generation.
[0067] The method provided in the embodiment of the present invention uses a diffusion model to generate a nucleic acid all-atom structure. The method has the ability to generate nucleic acid all-atom coordinates from scratch and in a controllable manner. The structure and sequence are diffused at the same time, taking into account the influence of side chain atoms on the overall structure, and a single model is used to complete the work of designing multiple models separately in the past. The design process is simpler and the results are more credible. In addition, the use of neural network sampling has higher efficiency and accuracy in the generation of structures than traditional energy function methods.
[0068] The nucleic acid all-atom structure generating device provided by the present invention is described below. The nucleic acid all-atom structure generating device described below and the nucleic acid all-atom structure generating method described above can be referenced to each other.
[0069] Based on any of the above embodiments, Figure 3 Schematic diagram of the structure of the nucleic acid all-atom structure generating device provided by the present invention, such as Figure 3 As shown, the device comprises: An acquisition unit 310 is used to acquire an initial nucleic acid sequence including a random sequence and initial all-atom coordinates after noise addition; A generating unit 320, configured to input the initial nucleic acid sequence and the initial all-atom coordinates into the trained diffusion model to obtain a generated nucleic acid sequence and generated all-atom coordinates output by the diffusion model; Wherein, the diffusion model is obtained by training based on the sample nucleic acid structure.
[0070] Based on any of the above embodiments, the device further includes a model training unit, which is used to: Extracting information of each nucleotide of the sample nucleic acid structure; Performing noise processing on the all-atom coordinates and the nucleotide sequence in the nucleotide information respectively to obtain noisy all-atom coordinates and noisy sequences; The diffusion model is obtained by training an initial model based on the noisy all-atom coordinates, the noisy sequence and the position code in the nucleotide information.
[0071] Based on any of the above embodiments, the model training unit is specifically used for: Inputting the noisy all-atom coordinates, the noisy sequence and the position code into the feature coding module to obtain the one-dimensional features and the two-dimensional features output by the feature coding module; Inputting the one-dimensional features, the two-dimensional features and the position code into the sequence and structure decoding module to obtain the predicted sequence, predicted main chain coordinates and predicted torsion angle output by the sequence and structure decoding module; Based on the predicted sequence, predicted main chain coordinates and predicted torsion angles, the initial model is trained to obtain the diffusion model.
[0072] Based on any of the above embodiments, the model training unit is specifically used for: Inputting the one-dimensional feature and the two-dimensional feature into the attention module to obtain the one-dimensional attention feature and the two-dimensional attention feature output by the attention module; The one-dimensional attention feature, the two-dimensional attention feature and the position code are input into the sequence and structure decoding module to obtain the predicted sequence, predicted main chain coordinates and predicted torsion angle output by the sequence and structure decoding module.
[0073] Based on any of the above embodiments, the model training unit is specifically used for: Inputting the attention one-dimensional feature into the sequence decoding module to obtain a prediction sequence output by the sequence decoding module; Inputting the one-dimensional attention feature, the two-dimensional attention feature and the position code into the structure decoding module to obtain the predicted main chain coordinates output by the structure decoding module; The one-dimensional attention feature is input into the structure decoding module to obtain the predicted torsion angle output by the structure decoding module.
[0074] Based on any of the above embodiments, the model training unit is specifically used for: Determining the main chain coordinate loss based on the difference between each predicted rigid body and the original rigid body under the predicted main chain coordinate; determining a sequence prediction loss based on a difference between the predicted sequence and a native sequence corresponding to the sample nucleic acid structure; Based on the predicted sequence, predicted main chain coordinates and predicted torsion angles, the predicted all-atom coordinates of each nucleotide are calculated, and the all-atom coordinate loss is determined based on the difference between the predicted all-atom coordinates of the nucleotide predicted correctly by the sequence and the natural all-atom coordinates; Determining unreasonable structural losses based on the predicted sequence, predicted main chain coordinates and predicted torsion angles; Based on the main chain coordinate loss, the sequence prediction loss, the all-atom coordinate loss and the unreasonable structure loss, the initial model is trained to obtain the diffusion model.
[0075] Based on any of the above embodiments, the acquiring unit is specifically used for: Using the initialized random sequence as the initial nucleic acid sequence, and randomly sampling a set of all-atom coordinates from Gaussian noise as the initial all-atom coordinates; or, Based on the known nucleic acid structure, a part of the nucleic acid sequence and a part of the all-atom coordinates are determined, and the other parts are replaced by random sequences and Gaussian noise, respectively, to obtain the initial nucleic acid sequence and initial all-atom coordinates, respectively.
[0076] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communications interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the method for generating a nucleic acid all-atom structure, the method comprising: obtaining an initial nucleic acid sequence containing a random sequence and initial all-atom coordinates after noise addition; inputting the initial nucleic acid sequence and the initial all-atom coordinates into a trained diffusion model to obtain a generated nucleic acid sequence and generated all-atom coordinates output by the diffusion model; wherein the diffusion model is obtained based on sample nucleic acid structure training.
[0077] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0078] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the nucleic acid all-atom structure generation method provided by the above-mentioned methods, and the method includes: obtaining an initial nucleic acid sequence containing a random sequence and an initial all-atom coordinate after noise addition; inputting the initial nucleic acid sequence and the initial all-atom coordinates into a trained diffusion model to obtain a generated nucleic acid sequence and generated all-atom coordinates output by the diffusion model; wherein the diffusion model is obtained based on sample nucleic acid structure training.
[0079] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the nucleic acid all-atom structure generation method provided by the above-mentioned methods, the method comprising: obtaining an initial nucleic acid sequence containing a random sequence and an initial all-atom coordinate after noise addition; inputting the initial nucleic acid sequence and the initial all-atom coordinates into a trained diffusion model to obtain a generated nucleic acid sequence and generated all-atom coordinates output by the diffusion model; wherein the diffusion model is obtained based on sample nucleic acid structure training.
[0080] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0081] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating a nucleic acid all-atom structure, characterized in that: include: Obtaining an initial nucleic acid sequence including a random sequence and initial all-atom coordinates after noise addition; Inputting the initial nucleic acid sequence and the initial all-atom coordinates into a trained diffusion model to obtain a generated nucleic acid sequence and generated all-atom coordinates output by the diffusion model; Wherein, the diffusion model is obtained by training based on the sample nucleic acid structure.
2. The method for generating a nucleic acid all-atom structure according to claim 1, characterized in that: The training steps of the diffusion model include: Extracting information of each nucleotide of the sample nucleic acid structure; Performing noise processing on the all-atom coordinates and the nucleotide sequence in the nucleotide information respectively to obtain noisy all-atom coordinates and noisy sequences; The diffusion model is obtained by training an initial model based on the noisy all-atom coordinates, the noisy sequence and the position code in the nucleotide information.
3. The method for generating a nucleic acid all-atom structure according to claim 2, characterized in that: The initial model includes a feature encoding module and a sequence and structure decoding module. The initial model is trained based on the noisy all-atom coordinates, the noisy sequence and the position encoding in the nucleotide information to obtain the diffusion model, including: Inputting the noisy all-atom coordinates, the noisy sequence and the position code into the feature coding module to obtain the one-dimensional features and the two-dimensional features output by the feature coding module; Inputting the one-dimensional features, the two-dimensional features and the position code into the sequence and structure decoding module to obtain the predicted sequence, predicted main chain coordinates and predicted torsion angle output by the sequence and structure decoding module; Based on the predicted sequence, predicted main chain coordinates and predicted torsion angles, the initial model is trained to obtain the diffusion model.
4. The method for generating a nucleic acid all-atom structure according to claim 3, characterized in that: The initial model further includes an attention module, which inputs the one-dimensional features, the two-dimensional features and the position code into the sequence and structure decoding module to obtain the predicted sequence, the predicted main chain coordinates and the predicted torsion angle output by the sequence and structure decoding module, including: Inputting the one-dimensional feature and the two-dimensional feature into the attention module to obtain the one-dimensional attention feature and the two-dimensional attention feature output by the attention module; The one-dimensional attention feature, the two-dimensional attention feature and the position code are input into the sequence and structure decoding module to obtain the predicted sequence, predicted main chain coordinates and predicted torsion angle output by the sequence and structure decoding module.
5. The method for generating a nucleic acid all-atom structure according to claim 4, characterized in that: The sequence and structure decoding module includes a sequence decoding module and a structure decoding module, and the one-dimensional attention feature, the two-dimensional attention feature and the position code are input into the sequence and structure decoding module to obtain the predicted sequence, the predicted main chain coordinates and the predicted torsion angle output by the sequence and structure decoding module, including: Inputting the attention one-dimensional feature into the sequence decoding module to obtain a prediction sequence output by the sequence decoding module; Inputting the one-dimensional attention feature, the two-dimensional attention feature and the position code into the structure decoding module to obtain the predicted main chain coordinates output by the structure decoding module; The one-dimensional attention feature is input into the structure decoding module to obtain the predicted torsion angle output by the structure decoding module.
6. The method for generating a nucleic acid all-atom structure according to claim 3, characterized in that: The initial model is trained based on the predicted sequence, the predicted main chain coordinates and the predicted torsion angle to obtain the diffusion model, including: Determining the main chain coordinate loss based on the difference between each predicted rigid body and the original rigid body under the predicted main chain coordinate; determining a sequence prediction loss based on a difference between the predicted sequence and a native sequence corresponding to the sample nucleic acid structure; Based on the predicted sequence, predicted main chain coordinates and predicted torsion angles, the predicted all-atom coordinates of each nucleotide are calculated, and the all-atom coordinate loss is determined based on the difference between the predicted all-atom coordinates of the nucleotide predicted correctly by the sequence and the natural all-atom coordinates; Determining unreasonable structural losses based on the predicted sequence, predicted main chain coordinates and predicted torsion angles; Based on the main chain coordinate loss, the sequence prediction loss, the all-atom coordinate loss and the unreasonable structure loss, the initial model is trained to obtain the diffusion model.
7. The method for generating a nucleic acid all-atom structure according to any one of claims 1 to 6, characterized in that: The obtaining of the initial nucleic acid sequence containing the random sequence and the initial all-atom coordinates after noise addition comprises: Using the initialized random sequence as the initial nucleic acid sequence, and randomly sampling a set of all-atom coordinates from Gaussian noise as the initial all-atom coordinates; or, Based on the known nucleic acid structure, a part of the nucleic acid sequence and a part of the all-atom coordinates are determined, and the other parts are replaced by random sequences and Gaussian noise, respectively, to obtain the initial nucleic acid sequence and initial all-atom coordinates, respectively.
8. A nucleic acid all-atom structure generating device, characterized in that: include: An acquisition unit, used for acquiring an initial nucleic acid sequence including a random sequence and initial all-atom coordinates after noise addition; A generating unit, used for inputting the initial nucleic acid sequence and the initial all-atom coordinates into the trained diffusion model to obtain the generated nucleic acid sequence and the generated all-atom coordinates output by the diffusion model; Wherein, the diffusion model is obtained by training based on the sample nucleic acid structure.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for generating a nucleic acid all-atom structure according to any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for generating a nucleic acid all-atom structure according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Sequence diffusion method based on multi-sequence alignment and electronic equipment thereof
CN120220812A
A sequence diffusion method based on multiple sequence alignment and electronic device thereof
CN120220812B