Training methods for molecular prediction models and processing methods for protein pockets
By gradually training the molecular prediction model and using the training subset of multiple application scenarios, the problem that existing models cannot be applied to multiple scenarios is solved, and the multi-scene adaptability of the model and the quality improvement of the generated molecules is achieved.
Patent Information
- Application Number
- CN202411312390.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-09-20
AI Technical Summary
Existing deep neural network models cannot be applied to molecular generation and prediction tasks in multiple scenarios, especially when dealing with different data characteristics and task types.
By obtaining the training subsets corresponding to multiple application scenarios, the molecular prediction model is gradually trained, so that the model can adapt to multiple scenarios. The specific steps include obtaining the training data set, including multiple application scenarios and their corresponding training subsets, and sequentially using each training subset to train the model.
The multi-scene adaptability of the deep neural network model is realized, so that the same parameter can handle problems in multiple scenarios, and the generalization ability of the model and the quality of the generated molecules are improved.
Smart Images

Figure CN118824355B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of molecular prediction, and in particular to a molecular prediction model training method and a protein pocket processing method. Background Art
[0002] A protein pocket is a depression or deep pit on the surface of a protein molecule, usually formed by the arrangement of amino acid residues. These pockets have key functions in the three-dimensional structure of proteins, especially when proteins interact with other molecules (such as substrates, ligands or other proteins). In drug design, pharmaceutical chemists combine their expert experience to design molecules that fit into the pocket.
[0003] Since a very important step in the early stages of drug design is to discover molecules that are suitable for given conditions, many research institutions and pharmaceutical companies have invested a lot of resources in this regard. When there are pockets, research institutions and pharmaceutical companies are committed to finding molecules that fit specific pockets, which requires a lot of research and experiments to discover suitable molecular structures.
[0004] In the field of molecular generation, deep neural networks are widely used, mainly because they can learn complex data representations and perform efficient prediction and generation. However, existing molecular generation models still face some challenges: (1) Data diversity, that is, the data characteristics in different scenarios may be very different. For example, the pocket NCI (non-covalent interactions) prediction model requires data on pockets and NCI sites, while the pocket-based molecular generation model requires data on the pockets and the corresponding small molecules. Existing models cannot adapt to data inputs in different scenarios. (2) Task diversity: Not only is the data diverse, but the task types may also vary greatly. Some tasks may focus on the prediction of NCI sites on pockets, while other tasks may focus more on the generation of molecules. Therefore, deep neural network models need to be flexible enough to adapt to these different task requirements. Summary of the invention
[0005] In view of this, the present invention provides a training method for a molecular prediction model and a method for processing a protein pocket to solve the problem that the existing deep neural network model cannot be applied to a variety of scenarios.
[0006] In a first aspect, the present invention provides a method for training a molecular prediction model, the method comprising the following steps: obtaining a training data set, wherein the training data set includes multiple application scenarios and a training subset corresponding to each application scenario; and training the molecular prediction model using each training subset in turn.
[0007] The training method of the molecular prediction model provided in an embodiment of the present invention obtains a training data set, wherein the training data set includes multiple application scenarios and a training subset corresponding to each application scenario; the molecular prediction model is trained using each training subset in turn; and the trained molecular prediction model can be applied to multiple scenarios.
[0008] In an optional embodiment, the training data set includes a first application scenario, a second application scenario and a third application scenario: the first training subset corresponding to the first application scenario includes a pocket data set, an anchor condition set, a small molecule structure data set, and a small molecule attribute information set; the second training subset corresponding to the second application scenario includes a pocket data set and an anchor condition set; the third training subset corresponding to the third application scenario includes a pocket data set, a small molecule structure data set, and a small molecule attribute information set.
[0009] In this way, the trained molecular prediction model can be applicable to the reasoning scenario where the user has a pocket PDB (Protein Data Bank) file, is clear about the NCI and anchor information on the pocket, and is clear about the desired molecular properties, and hopes to generate a 3D molecule suitable for the pocket; it can also be applicable to the reasoning scenario where the user only has a pocket PDB file and desired molecular properties, and hopes to generate a 3D molecule suitable for the pocket; it can also be applicable to the reasoning scenario where the user only has a pocket PDB file and hopes to generate anchor information.
[0010] In some optional embodiments, training the molecular prediction model using each training subset in turn includes: training the molecular prediction model using the first training subset; after training the molecular prediction model using the first training subset, training the molecular prediction model using the second training subset; after training the molecular prediction model using the second training subset, training the molecular prediction model using the third training subset.
[0011] This can enhance the generalization ability of the model, that is, by using different training subsets, the model can learn more diverse data features, which helps improve the model's predictive ability on unseen data. Each training subset may represent different aspects of the data or different statistical distributions, and such diversified training can reduce the risk of overfitting.
[0012] In some optional embodiments, training the molecular prediction model using the first training subset includes: inputting the pocket data set and the anchor condition set into the encoder of the molecular prediction model to obtain a first output vector; inputting the small molecule attribute information set into the attribute controller of the molecular prediction model to obtain an attribute representation; inputting the first output vector, the attribute representation and the small molecule structure data set into the decoder of the molecular prediction model to train the molecular prediction model; and / or, training the molecular prediction model using the second training subset includes: inputting the pocket data set and the anchor condition set into the encoder of the molecular prediction model to train the molecular prediction model; and / or, training the molecular prediction model using the third training subset includes: inputting the pocket data set into the encoder of the molecular prediction model to obtain a second output vector; inputting the small molecule attribute information set into the attribute controller of the molecular prediction model to obtain an attribute representation; inputting the second output vector, the attribute representation and the small molecule structure data set into the decoder of the molecular prediction model to train the molecular prediction model.
[0013] This enables the model to adapt to a variety of scenarios, so that the same model and the same parameters can handle problems in multiple scenarios.
[0014] In some optional embodiments, the pocket data set includes an atomic type sequence of the pocket, an atomic coordinate sequence of the pocket, and an atomic-level feature sequence of the pocket. The pocket data set and the anchor condition set are input into the encoder of the molecular prediction model to obtain a first output vector, including: embedding the atomic type sequence of the pocket to obtain an atomic type representation with a feature dimension of the first dimension; embedding the atomic coordinate sequence of the pocket to obtain an atomic coordinate representation with a feature dimension of the second dimension; splicing the atomic type representation of the first dimension and the atomic coordinate representation of the second dimension to obtain an atomic type / coordinate table with a feature dimension of H. feature; embed the atomic-level feature sequence of the pocket to obtain an atomic-level feature representation with a feature dimension of the third dimension; embed the anchor condition set to obtain an NCI / anchor representation with a feature dimension of the fourth dimension; concatenate the atomic-level feature representation of the third dimension and the NCI / anchor representation of the fourth dimension to obtain other pocket representations with a feature dimension of H; perform bitwise addition on the atomic type / coordinate representation with a feature dimension of H and the other pocket representation with a feature dimension of H to obtain a pocket representation with a feature dimension of H, and input the pocket representation with a feature dimension of H into the encoder to obtain a first output vector.
[0015] The first output vector thus obtained can be used to train a molecular prediction model in the first application scenario and the second application scenario, and the trained model has better performance.
[0016] In some optional embodiments, the pocket data set includes the pocket's atomic type sequence, the pocket's atomic coordinate sequence, and the pocket's atomic-level feature sequence. The pocket data set is input into the encoder of the molecular prediction model to obtain a second output vector, including: embedding the pocket's atomic type sequence to obtain an atomic type representation with a feature dimension of the fifth dimension; embedding the pocket's atomic coordinate sequence to obtain an atomic coordinate representation with a feature dimension of the sixth dimension; concatenating the atomic type representation of the fifth dimension and the atomic coordinate representation of the sixth dimension to obtain an atomic type / coordinate representation with a feature dimension of H; embedding the pocket's atomic-level feature sequence to obtain an atomic-level feature representation with a feature dimension of the seventh dimension, feature-projecting the atomic-level feature representation of the seventh dimension to obtain other pocket representations with a feature dimension of H; performing positional addition on the atomic type / coordinate representation with a feature dimension of H and the pocket's other representations with a feature dimension of H to obtain a pocket representation with a feature dimension of H, and inputting the pocket representation with a feature dimension of H into the encoder to obtain a second output vector.
[0017] The second output vector thus obtained can be used to train a molecular prediction model in the third application scenario, and the trained model has good performance.
[0018] In some optional embodiments, the small molecule structure data set includes the FSMILES type sequence of the molecule and the FSMILES coordinate sequence of the molecule; inputting the first output vector, the attribute representation and the small molecule structure data set into the decoder of the molecular prediction model includes: embedding the FSMILES type sequence of the molecule to obtain the FSMILES type representation with a feature dimension of the eighth dimension; embedding the FSMILES coordinate sequence of the molecule to obtain the FSMILES coordinate representation with a feature dimension of the ninth dimension; splicing the FSMILES type representation with the feature dimension of the eighth dimension and the FSMILES coordinate representation with the feature dimension of the ninth dimension to obtain the FSMILES type / coordinate representation with a feature dimension of H; splicing the FSMILES type / coordinate representation with a feature dimension of H and the attribute representation in the dimension of the sequence to obtain the ligand representation; The output vector and ligand annotation are input into the decoder of the molecular prediction model; and / or; the second output vector, attribute representation and small molecule structure data set are input into the decoder of the molecular prediction model, including: embedding the FSMILES type sequence of the molecule to obtain the FSMILES type representation with a feature dimension of the tenth dimension; embedding the FSMILES coordinate sequence of the molecule to obtain the FSMILES coordinate representation with a feature dimension of the eleventh dimension; splicing the FSMILES type representation with the tenth dimension and the FSMILES coordinate representation with the eleventh dimension to obtain the FSMILES type / coordinate representation with a feature dimension of H; splicing the FSMILES type / coordinate representation with a feature dimension of H and the attribute representation in the dimension of the sequence to obtain the ligand representation; the second output vector and the ligand annotation are input into the decoder of the molecular prediction model.
[0019] This can be used to train molecular prediction models in the first application scenario and the third application scenario.
[0020] In some optional embodiments, before the first output vector, attribute representation and small molecule structure data set are input into the decoder of the molecular prediction model and the molecular prediction model is trained, or before the first output vector, attribute representation and small molecule structure data set are input into the decoder of the molecular prediction model and the molecular prediction model is trained, it also includes: obtaining small molecules; dividing the small molecules into multiple fragments according to preset cutting rules; calculating the ring information of each atom in each fragment, and determining the element type of each atom in each fragment and whether it has aromaticity, to obtain the FSMILES sequence of the small molecule; obtaining the small molecule structure data set according to multiple FSMILES sequences of multiple small molecules.
[0021] In this way, the ring system in which each atom in the small molecule is located can be determined, thereby improving the quality of the generated 3D molecules to a certain extent, reducing the difficulty of model learning, and improving the ability to generate molecules.
[0022] In some optional embodiments, dividing a small molecule into multiple fragments according to a preset cutting rule includes: selecting all single bonds in the small molecule that meet the conditions of not being part of a ring, not being connected to a hydrogen atom, and having at least one end connected to the ring; dividing the small molecule into multiple fragments at the selected single bonds.
[0023] This is because molecules are composed of multiple fragments generated by molecular prediction models, which are more interpretable, thereby improving the molecule generation capability of molecular prediction models.
[0024] In some optional embodiments, the training data set includes a force field accuracy training data set and an experimental accuracy training data set; wherein the force field accuracy training data set and the experimental accuracy training data set include multiple application scenarios and a training subset of force field accuracy corresponding to each application scenario; the experimental accuracy training data set includes multiple application scenarios and a training subset of experimental accuracy corresponding to each application scenario.
[0025] That is, a multi-stage training method is adopted. In stage 1, the present invention uses a training data set with a force field accuracy of one million to train the comprehensive model shown in FIG7 ; in stage 2, the present invention uses a training data set with an experimental accuracy of 10,000 to fine-tune the comprehensive model obtained in stage 1. This can solve the problem that a deep learning model requires a large amount of training data.
[0026] In a second aspect, the present invention also provides a method for processing a protein pocket, the method comprising the following steps: obtaining protein pocket data to be matched; inputting the protein pocket data to be matched into a molecular prediction model trained using the method of the first aspect or any corresponding embodiment thereof to obtain small molecule structure information and / or anchor point information.
[0027] The protein pocket processing method provided in the embodiment of the present invention obtains the protein pocket data to be matched, inputs the protein pocket data to be matched into the molecular prediction model, obtains small molecule structure information and / or anchor point information, so that the molecular prediction model can be applied to a variety of scenarios.
[0028] In some optional embodiments, the protein pocket data to be matched is input into a molecular prediction model trained using the method of the first aspect or any corresponding embodiment thereof, and obtaining the small molecule structure information includes: inputting the protein pocket data to be matched into the encoder of the molecular prediction model to obtain a third output vector; obtaining the small molecule attribute information to be matched; inputting the small molecule attribute information to be matched into the attribute controller of the molecular prediction model to obtain a third attribute representation; inputting the third output vector and the third attribute representation into the decoder of the attribute controller of the molecular prediction model to obtain the small molecule structure information.
[0029] This makes the molecular prediction model suitable for inference scenarios where the user only has a pocket PDB file and the desired molecular properties and hopes to generate a 3D molecule that fits the pocket.
[0030] In some optional embodiments, the step of inputting the protein pocket data to be matched into a molecular prediction model trained using the method of the first aspect or any corresponding embodiment thereof to obtain the small molecule structure information includes: obtaining anchor point information corresponding to the pocket data to be matched; inputting the pocket data to be matched and the anchor point information corresponding to the pocket data to be matched into the encoder of the molecular prediction model to obtain the third output vector; obtaining the small molecule attribute information to be matched; inputting the small molecule attribute information to be matched into the attribute controller of the molecular prediction model to obtain the third attribute representation; inputting the third output vector and the third attribute representation into the decoder of the attribute controller of the molecular prediction model to obtain the small molecule structure information.
[0031] This makes the molecular prediction model suitable for users who have pocket PDB files, are clear about the NCI and anchor information on the pocket, and are clear about the expected molecular properties, and hope to generate reasoning scenarios for 3D molecules suitable for the pocket.
[0032] In some optional embodiments, the protein pocket data to be matched is input into a molecular prediction model trained using the method of the above-mentioned first aspect or any corresponding embodiment, and obtaining the anchor point information includes: inputting the protein pocket data to be matched into the encoder of the molecular prediction model to obtain the anchor point information.
[0033] This makes the molecular prediction model suitable for inference scenarios where users only have pocket PDB files and want to generate anchor information.
[0034] In a third aspect, an embodiment of the present invention further provides a training device for a molecular prediction model, the device comprising a first acquisition module and a training module; the first acquisition module is used to acquire a training data set, wherein the training data set comprises a plurality of application scenarios, and a training subset corresponding to each of the application scenarios; the training module is used to train the molecular prediction model using each of the training subsets in turn.
[0035] In a fourth aspect, an embodiment of the present invention further provides a protein pocket processing device, characterized in that the device comprises a second acquisition module and a prediction module; the second acquisition module is used to acquire the protein pocket data to be matched; the prediction module is used to input the protein pocket data to be matched into a molecular prediction model trained using the method of the above-mentioned first aspect or any corresponding embodiment thereof, to obtain small molecule structure information and / or anchor point information.
[0036] In a fifth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the training method of the molecular prediction model of the above aspect or any corresponding embodiment thereof, and / or the processing method of the protein pocket of the above aspect or any corresponding embodiment thereof by executing the computer instructions.
[0037] In a sixth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the molecular prediction model training method of the above aspect or any corresponding embodiment thereof, and / or the protein pocket processing method of the above aspect or any corresponding embodiment thereof.
[0038] In a seventh aspect, the present invention provides a computer program product comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the method for training a molecular prediction model of the above aspect or any corresponding embodiment thereof, and / or the method for processing a protein pocket of the above aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 is a flow chart of a method for training a molecular prediction model according to an embodiment of the present invention;
[0041] Figure 2 is a flowchart of another method for training a molecular prediction model according to an embodiment of the present invention;
[0042] Figure 3 is a flowchart of an example of a molecular prediction model training method according to an embodiment of the present invention;
[0043] Figure 4 is a flowchart of another method for training a molecular prediction model according to an embodiment of the present invention;
[0044] Figure 5 is a schematic diagram of FSMILES encoding according to an embodiment of the present invention;
[0045] Figure 6 is a flowchart of a training method for a further molecular prediction model according to an embodiment of the present invention;
[0046] Figure 7 is a schematic diagram of a two-stage training process according to an embodiment of the present invention;
[0047] Figure 8 is a flow chart of a method for processing a protein pocket according to an embodiment of the present invention;
[0048] Fig. 9 is a structural block diagram of a training device for a molecular prediction model according to an embodiment of the present invention;
[0049] Fig.10 is a flow chart of a protein pocket processing device according to an embodiment of the present invention;
[0050] Fig.11 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments 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 those skilled in the art without creative work are within the scope of protection of the present invention.
[0052] According to an embodiment of the present invention, an embodiment of a method for training a molecular prediction model is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0053] In this embodiment, a molecular prediction model training method is provided, which can be used in a computer device. Figure 1 is a flow chart of a method for training a molecular prediction model according to an embodiment of the present invention, such as Figure 1 As shown, the process includes the following steps:
[0054] Step S101: Acquire a training data set, wherein the training data set includes multiple application scenarios and a training subset corresponding to each application scenario.
[0055] In an optional embodiment, the training data set includes a first application scenario, a second application scenario, and a third application scenario. The first training subset corresponding to the first application scenario includes a pocket data set, an anchor condition set, a small molecule structure data set, and a small molecule attribute information set; the second training subset corresponding to the second application scenario includes a pocket data set and an anchor condition set; and the third training subset corresponding to the third application scenario includes a pocket data set, a small molecule structure data set, and a small molecule attribute information set.
[0056] Specifically, the first application scenario can be understood as follows: the user has a pocket PDB file, is clear about the NCI and anchor information on the pocket, and is clear about the desired molecular properties, and hopes to generate an inference scenario of a 3D molecule suitable for the pocket.
[0057] The second application scenario can be understood as follows: the user only has a pocket PDB file and the desired molecular properties. The model is first used to predict the NCI / anchor point, and then an inference scenario of a 3D molecule suitable for the pocket is generated in the same way as in scenario 1.
[0058] The third application scenario can be understood as follows: the user only has a pocket PDB file and desired molecular properties, and hopes to generate an inference scenario of a 3D molecule suitable for the pocket.
[0059] Step S102: using each training subset in turn to train the molecular prediction model.
[0060] The training method of the molecular prediction model provided in an embodiment of the present invention obtains a training data set, wherein the training data set includes multiple application scenarios and a training subset corresponding to each application scenario; the molecular prediction model is trained using each training subset in turn; and the trained molecular prediction model can be applied to multiple scenarios.
[0061] In this embodiment, a molecular prediction model training method is provided, which can be used in a computer device. Figure 2 is a flowchart of another molecular prediction model training method according to an embodiment of the present invention, Figure 3 1 is a flow chart of an example of a molecular prediction model training method according to an embodiment of the present invention. Figure 2and Figure 3 As shown, the process includes the following steps:
[0062] Step S201: Obtain a training data set, wherein the training data set includes multiple application scenarios and a training subset corresponding to each application scenario. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0063] Step S202: using the first training subset to train the molecular prediction model.
[0064] Specifically, the molecular prediction model includes an encoder, a decoder, and a property controller. The encoder is used to capture the characteristics of the pocket; the decoder outputs the topological structure of the molecule and the corresponding 3D conformation; the property controller is used to control the desired properties of the generated molecule. In this way, the properties of small molecules can be controlled.
[0065] As mentioned above, the first training subset corresponding to the first application scenario includes a pocket data set, an anchor condition set, a small molecule structure data set, and a small molecule attribute information set.
[0066] In an optional implementation, training the molecular prediction model using the first training subset includes steps S2011 to S2013.
[0067] Step S2021: input the pocket data set and the anchor condition set into the encoder of the molecular prediction model to obtain a first output vector.
[0068] In an optional embodiment, the pocket data set includes the pocket's atomic type sequence; the pocket's atomic coordinate sequence; the pocket's atomic level feature sequence. That is to say, based on the input pocket PDB file, after specific processing, three sequences can be obtained: the pocket's atomic type sequence; the pocket's atomic coordinate sequence; the pocket's atomic level feature sequence. If the number of atoms in the pocket is less than 500, the above three sequences are padded to a length of 500 by filling in zeros; if the number of atoms in the pocket exceeds 500, only the first 500 are taken to truncate the above three sequences to a length of 500.
[0069] Specifically, the atomic type sequence of the pocket is read in sequence according to the heavy atom order in the PDB file and stored in the form of a sequence. The atomic coordinate sequence of the pocket is read in sequence according to the heavy atom order in the PDB file, and its corresponding 3D spatial coordinates (x, y, z) are stored in the form of a sequence. The atomic-level characteristic sequence of the pocket is read in sequence according to the heavy atom order in the PDB file using the RDKIT software to read its corresponding hydrogen bond donor and acceptor states, formal charge and other states, and stored in the form of a sequence.
[0070] In an optional implementation, the NCI / anchor information on the pocket is specially processed to obtain the NCI / anchor sequence of the pocket. The anchor condition set includes the NCI / anchor sequences of multiple pockets.
[0071] Specifically, the NCI / anchor sequence of the pocket is based on the order of heavy atoms in the PDB file. Based on the input NCI and anchor information, the NCI / anchor sequence of the pocket can be obtained according to the rule that the position corresponding to the heavy atom that is both NCI and anchor is 3, the position corresponding to the heavy atom that is only NCI is 1, the position corresponding to the heavy atom that is only anchor is 2, and the remaining positions are 0.
[0072] Specifically, the pocket data set and the anchor condition set are input into the encoder of the molecular prediction model to obtain the first output vector, including: embedding the atomic type sequence of the pocket to obtain an atomic type representation with a feature dimension of the first dimension (for example, 0.25H); embedding the atomic coordinate sequence of the pocket to obtain an atomic coordinate representation with a feature dimension of the second dimension (for example, 0.75H); concatenating the atomic type representation of the first dimension and the atomic coordinate representation of the second dimension to obtain an atomic type / coordinate representation with a feature dimension of H; embedding the atomic-level feature sequence of the pocket to obtain To the atomic-level feature representation with the feature dimension of the third dimension (for example, 0.75H); perform embedded encoding on the anchor condition set to obtain the NCI / anchor representation with the feature dimension of the fourth dimension (for example, 0.25H); concatenate the atomic-level feature representation of the third dimension and the NCI / anchor representation of the fourth dimension to obtain the pocket other representation with the feature dimension of H; perform bitwise addition on the atomic type / coordinate representation with the feature dimension of H and the pocket other representation with the feature dimension of H to obtain the pocket representation with the feature dimension of H, and input the pocket representation with the feature dimension of H into the encoder to obtain the first output vector.
[0073] Here, H represents the dimension of the feature. Assuming H is 512, 0.25H is 128.
[0074] In an optional implementation, the encoder uses a Transformer-like multi-layer multi-head self-attention mechanism to reprocess the input vector to obtain the encoder's output vector. At this time, since the input contains the NCI / anchor information of the pocket, there is no need to predict the NCI / anchor.
[0075] Step S2022: input the small molecule attribute information set into the attribute controller of the molecular prediction model to obtain the attribute representation.
[0076] Step S2023: input the first output vector, the attribute representation and the small molecule structure data set into the decoder of the molecular prediction model to train the molecular prediction model.
[0077] In an optional embodiment, the small molecule structure data set includes the FSMILES type sequence of the molecule and the FSMILES coordinate sequence of the molecule.
[0078] Specifically, the FSMILES type sequence of a molecule is obtained by dividing the small molecule according to the FSMILES rule. The FSMILES coordinate sequence of a molecule is obtained by dividing the small molecule according to the FSMILES rule, obtaining the 3D spatial coordinates (x, y, z) corresponding to each FSMILES code, and storing them in the form of a sequence.
[0079] Specifically, inputting the first output vector, the attribute representation and the small molecule structure data set into the decoder of the molecular prediction model includes: embedding the FSMILES type sequence of the molecule to obtain the FSMILES type representation with the feature dimension of the eighth dimension (for example, 0.25H); embedding the FSMILES coordinate sequence of the molecule to obtain the FSMILES coordinate representation with the feature dimension of the ninth dimension (for example, 0.75H); splicing the FSMILES type representation with the feature dimension of the eighth dimension and the FSMILES coordinate representation with the feature dimension of the ninth dimension to obtain the FSMILES type / coordinate representation with the feature dimension of H; splicing the FSMILES type / coordinate representation with the feature dimension of H and the attribute representation in the dimension of the sequence to obtain the ligand representation; inputting the first output vector and the ligand annotation into the decoder of the molecular prediction model.
[0080] Step S203: After the molecular prediction model is trained using the first training subset, the molecular prediction model is trained using the second training subset.
[0081] As above, the second training subset corresponding to the second application scenario includes the pocket data set and the anchor condition set. In an optional embodiment, using the second training subset to train the molecular prediction model includes: inputting the pocket data set and the anchor condition set into the encoder of the molecular prediction model to train the molecular prediction model.
[0082] Step S204: After the molecular prediction model is trained using the second training subset, the molecular prediction model is trained using the third training subset.
[0083] As mentioned above, the third training subset corresponding to the third application scenario includes a pocket data set, a small molecule structure data set, and a small molecule attribute information set.
[0084] In an optional embodiment, training the molecular prediction model using the third training subset includes steps S2041 to S2043.
[0085] Step S2041: input the pocket data set into the encoder of the molecular prediction model to obtain a second output vector.
[0086] In an optional embodiment, the pocket data set includes the pocket's atomic type sequence; the pocket's atomic coordinate sequence; the pocket's atomic level feature sequence. That is to say, based on the input pocket PDB file, after specific processing, three sequences can be obtained: the pocket's atomic type sequence; the pocket's atomic coordinate sequence; the pocket's atomic level feature sequence. If the number of atoms in the pocket is less than 500, the above three sequences are padded to a length of 500 by filling in zeros; if the number of atoms in the pocket exceeds 500, only the first 500 are taken to truncate the above three sequences to a length of 500.
[0087] Specifically, the pocket data set is input into the encoder of the molecular prediction model to obtain the second output vector, including: embedding the atomic type sequence of the pocket to obtain an atomic type representation with a feature dimension of the fifth dimension (for example, 0.25H); embedding the atomic coordinate sequence of the pocket to obtain an atomic coordinate representation with a feature dimension of the sixth dimension (for example, 0.75H); concatenating the atomic type representation of the fifth dimension and the atomic coordinate representation of the sixth dimension to obtain an atomic type / coordinate representation with a feature dimension of H; embedding the atomic-level feature sequence of the pocket to obtain an atomic-level feature representation with a feature dimension of the seventh dimension (for example, 0.75H), feature-projecting the atomic-level feature representation of the seventh dimension to obtain other pocket representations with a feature dimension of H; performing positional addition of the atomic type / coordinate representation with a feature dimension of H and the other pocket representation with a feature dimension of H to obtain a pocket representation with a feature dimension of H, and inputting the pocket representation with a feature dimension of H into the encoder to obtain the second output vector.
[0088] As mentioned above, the encoder uses a Transformer-like multi-layer multi-head self-attention mechanism to reprocess the input vector to obtain the encoder's output vector. At this time, based on the encoder's output, it is possible to predict which site on the current input pocket sequence is the NCI site and which site is the anchor site.
[0089] Step S2042: input the small molecule attribute information set into the attribute controller of the molecular prediction model to obtain the attribute representation.
[0090] The input of the property controller is the properties that the generated 3D molecules are expected to have, such as activity, QED (Quantitative Estimate of Drug-likeness), SAS (Synthetic Accessibility score), etc.
[0091] The rule for activity discretization is to divide the activity of small molecules into four levels: (1) activity less than 100 nm: high activity; (2) activity greater than 100 nm but less than 1000 nm: medium activity; (3) activity greater than 1000 nm: low activity; and (4) unmeasured activity value: unknown activity.
[0092] The rule for QED discretization is to divide the small molecule QED into two levels: (1) QED is greater than 0.3, and the attribute value is 1; (2) QED is less than or equal to 0.3, and the attribute value is 0.
[0093] The rule for SAS discretization is to divide the small molecule SAS into two levels: (1) SAS is greater than or equal to 5, and the attribute value is 0; (2) SAS is less than 5, and the attribute value is 1.
[0094] The discretized attribute values are extracted as attribute representations in the form of a multi-layer perceptron, and then used as the starting conditions for decoding by the decoder.
[0095] Step S2043: input the second output vector, the attribute representation and the small molecule structure data set into the decoder of the molecular prediction model to train the molecular prediction model.
[0096] In an optional embodiment, the small molecule structure data set includes the FSMILES type sequence of the molecule and the FSMILES coordinate sequence of the molecule. If the FSMILES Token of the small molecule is less than 100, the above two sequences are padded to a length of 100 by filling in 0; if the FSMILES Token of the small molecule exceeds 100, only the first 100 are taken to truncate the above two sequences to a length of 100.
[0097] Specifically, inputting the second output vector, the attribute representation and the small molecule structure data set into the decoder of the molecular prediction model includes: embedding the FSMILES type sequence of the molecule to obtain the FSMILES type representation with the feature dimension of the tenth dimension (for example, 0.25H); embedding the FSMILES coordinate sequence of the molecule to obtain the FSMILES coordinate representation with the feature dimension of the eleventh dimension (for example, 0.75H); concatenating the FSMILES type representation with the feature dimension of the tenth dimension and the FSMILES coordinate representation with the feature dimension of the eleventh dimension to obtain the FSMILES type / coordinate representation with the feature dimension of H; concatenating the FSMILES type / coordinate representation with the feature dimension of H and the attribute representation in the dimension of the sequence to obtain the ligand representation; inputting the second output vector and the ligand annotation into the decoder of the molecular prediction model.
[0098] In an optional embodiment, the decoder uses a Transformer-like multi-layer multi-head masked self-attention mechanism and a cross-modal attention mechanism to reprocess the ligand representation to obtain the output of the decoder.
[0099] The embodiment of the present invention proposes a comprehensive model including an encoder, a decoder, and a property controller, which can effectively guide the properties of generated molecules; and proposes a training method suitable for multiple scenarios, in which three training tasks are performed alternately, and the molecular prediction model obtained by training can adaptively generate molecules according to different scenarios.
[0100] In this embodiment, a molecular prediction model training method is provided, which can be used in a computer device. Figure 4 FIG. 4 is a flowchart of a method for training a molecular prediction model according to another embodiment of the present invention. Figure 4 As shown, the process includes the following steps:
[0101] Step S401: determining a small molecule structure data set corresponding to a first application scenario.
[0102] In an optional implementation, determining the small molecule structure data set corresponding to the first application scenario includes the following steps S4011 to S4014.
[0103] Step S4011: Acquire small molecules corresponding to the first application scenario.
[0104] Step S4012: Divide the small molecule corresponding to the first application scenario into multiple fragments according to a preset cutting rule.
[0105] Step S4013: Calculate the ring information of each atom in each fragment, and determine the element type of each atom in each fragment and whether it has aromaticity, to obtain the FSMILES sequence of the small molecule corresponding to the first application scenario.
[0106] Step S4014: obtaining a small molecule structure data set corresponding to the first application scenario according to multiple FSMILES sequences of multiple small molecules corresponding to the first application scenario.
[0107] For example, Figure 5 As shown, the FSMILES sequence of a small molecule can be obtained by FSMILES encoding, which includes the following steps.
[0108] The small molecule fragment cutting process in FSMILES requires selecting single bonds that meet specific criteria, that is, all single bonds that meet the conditions of not being part of a ring, not connected to a hydrogen atom, and at least one end connected to a ring, and then breaking the molecule from these single bonds. This cutting process helps to divide small molecules into multiple fragments. After the small molecule is divided into multiple fragments according to the cutting rules, the ring information of each atom in the fragment is calculated, that is, first calculate how many rings the atom is on, then calculate the size of each ring and sort them from small to large according to the ring size, and finally splice the number of rings with the symbol "+" to obtain the ring information of each atom. The element type of each atom in the fragment is case-sensitive based on whether it is aromatic. Aromatic ones are lowercase, and non-aromatic (aliphatic) ones are uppercase. The element type of each atom is spliced with the ring information calculated in step b with the symbol "_", so as to obtain the FSMILES code of each atom. An example of FSMILES code is shown in 5. 'c_5+6' means that the aromatic carbon atom is at the connection point of the 5-membered ring and the 6-membered ring. 'C_0' means that the aliphatic carbon atom is not on the ring. Through the FSMILES encoding rules, any small molecule can be expressed in the form of a FSMILES sequence.
[0109] This embodiment proposes a set of molecular encoding rules called FSMILES, which focuses on describing the ring system of each atom in the small molecule, thereby improving the quality of the generated 3D molecules to a certain extent, reducing the difficulty of model learning, and improving the ability to generate molecules.
[0110] Step S402: Determine a small molecule structure data set corresponding to the third application scenario.
[0111] In an optional implementation, determining the small molecule structure data set corresponding to the third application scenario includes the following steps S4021 to S4024.
[0112] Step S4021: Acquire small molecules corresponding to the third application scenario.
[0113] Step S4022: Divide the small molecule corresponding to the third application scenario into multiple fragments according to a preset cutting rule.
[0114] Step S4023: Calculate the ring information of each atom in each fragment, and determine the element type of each atom in each fragment and whether it has aromaticity, to obtain the FSMILES sequence of the small molecule corresponding to the third application scenario.
[0115] Step S4024: Obtain a small molecule structure data set corresponding to the third application scenario according to multiple FSMILES sequences of multiple small molecules corresponding to the third application scenario.
[0116] Step S403: Acquire a training data set, wherein the training data set includes multiple application scenarios and a training subset corresponding to each application scenario.
[0117] In an optional embodiment, the training data set includes a first application scenario, a second application scenario, and a third application scenario. The first training subset corresponding to the first application scenario includes a pocket data set, an anchor condition set, a small molecule structure data set, and a small molecule attribute information set; the second training subset corresponding to the second application scenario includes a pocket data set and an anchor condition set; and the third training subset corresponding to the third application scenario includes a pocket data set, a small molecule structure data set, and a small molecule attribute information set.
[0118] Step S404: using the first training subset to train the molecular prediction model.
[0119] As described above, the first training subset corresponding to the first application scenario includes a pocket data set, an anchor condition set, a small molecule structure data set, and a small molecule attribute information set. In an optional embodiment, training the molecular prediction model using the first training subset includes steps S4041 to S4043.
[0120] Step S4041: Input the pocket data set and the anchor condition set into the encoder of the molecular prediction model to obtain the first output vector. Figure 2 Step S2021 of the illustrated embodiment will not be described in detail here.
[0121] Step S4042: input the small molecule attribute information set into the attribute controller of the molecular prediction model to obtain the attribute representation.
[0122] Step S4043: Input the first output vector, the attribute representation, and the small molecule structure data set corresponding to the first application scenario into the decoder of the molecular prediction model to train the molecular prediction model. Figure 2 Step S2023 of the illustrated embodiment will not be described in detail here.
[0123] Step S405: After the molecular prediction model is trained using the first training subset, the molecular prediction model is trained using the second training subset.
[0124] As above, the second training subset corresponding to the second application scenario includes the pocket data set and the anchor condition set. In an optional embodiment, using the second training subset to train the molecular prediction model includes: inputting the pocket data set and the anchor condition set into the encoder of the molecular prediction model to train the molecular prediction model.
[0125] Step S406: After the molecular prediction model is trained using the second training subset, the molecular prediction model is trained using the third training subset.
[0126] As described above, the third training subset corresponding to the third application scenario includes a pocket data set, a small molecule structure data set, and a small molecule attribute information set. In an optional embodiment, training the molecular prediction model using the third training subset includes steps S4061 to S4063.
[0127] Step S4061: Input the pocket data set into the encoder of the molecular prediction model to obtain a second output vector. Figure 2 Step S2031 of the illustrated embodiment will not be described in detail here.
[0128] Step S4062: Input the small molecule attribute information set into the attribute controller of the molecular prediction model to obtain the attribute representation.
[0129] Step S4063: Input the second output vector, the attribute representation and the small molecule structure data set corresponding to the third application scenario into the decoder of the molecular prediction model to train the molecular prediction model. Figure 2 Step S2033 of the illustrated embodiment will not be described in detail here.
[0130] The use of deep learning models requires a large amount of training data, but the experimental data that can be collected through public channels is currently limited. Based on this, this embodiment provides a method for training a molecular prediction model that can be used in computer equipment. Figure 6 is a flowchart of another method for training a molecular prediction model according to an embodiment of the present invention, Figure 7 is a schematic diagram of a two-stage training process according to an embodiment of the present invention; Figure 6 and Figure 7 As shown, the process includes the following steps:
[0131] Step S601: Obtain a training subset of force field accuracy, wherein the force field accuracy training data set and the experimental accuracy training data set include multiple application scenarios and a training subset of force field accuracy corresponding to each application scenario.
[0132] In an optional embodiment, the force field accuracy training data set is obtained by the following method: the present invention collects millions of small molecules with activity records from the ChemBL database, and then constructs the data by using existing computational chemistry methods such as molecular docking, and calculates the activity, QED, SAS and other attribute values corresponding to the small molecules. In other words, the force field accuracy training data set is obtained by computational chemistry methods.
[0133] In an optional embodiment, the experimental accuracy training data set is obtained by the following method: more than 10,000 pocket-small molecule experimental accuracy data are collected from the public PDBind data set, and the corresponding small molecule attribute data are collected at the same time.
[0134] Step S602: using the training subsets of each force field accuracy in turn to train the molecular prediction model.
[0135] Step S603: Acquire a training subset of experimental accuracy, wherein a training subset of force field accuracy corresponds to each application scenario; the experimental accuracy training data set includes multiple application scenarios and a training subset of experimental accuracy corresponding to each application scenario.
[0136] Step S604: using the training subsets of each force field accuracy in turn to train the molecular prediction model.
[0137] That is to say, the embodiment of the present invention adopts a multi-stage training method. In stage 1, the present invention uses a training data set with a force field accuracy of one million scale to train the comprehensive model shown in Figure 7; in stage 2, the present invention uses a training data set with an experimental accuracy of ten thousand scale to fine-tune the comprehensive model obtained in stage 1.
[0138] It can be seen that the embodiment of the present invention adopts a deep neural network solution based on supervised training, constructs a model based on the attention mechanism, and uses a training data set collected by computational chemistry and other means for learning, in which each small molecule has but is not limited to properties such as activity, QED, SAS, and molecular weight. In order to build a model that can generate 3D molecules under a given pocket and can artificially control the properties of the generated molecules, and adapt to the needs of multi-scenario 3D molecule generation, after a lot of analysis and experiments, we proposed a comprehensive model including an encoder, a decoder, and a property controller.
[0139] In order to better characterize small molecules, the present invention proposes a set of molecular encoding rules called FSMILES, which focuses on characterizing the ring system in which each atom in the small molecule is located, thereby improving the quality of the generated 3D molecules to a certain extent.
[0140] In order to overcome the problem of insufficient high-quality experimental precision data, an embodiment of the present invention adopts a multi-stage training method. In stage 1, the present invention uses a training data set with a force field precision of a million scale to train the comprehensive model shown in Figure 7; in stage 2, the present invention uses a training data set with an experimental precision of a ten thousand scale to fine-tune the comprehensive model obtained in stage 1.
[0141] In this embodiment, a method for processing a protein pocket is provided, which can be used in a computer device. Figure 8 is a flow chart of a protein pocket processing method according to an embodiment of the present invention, such as Figure 8 As shown, the process includes the following steps:
[0142] Step S801: Obtaining protein pocket data to be matched.
[0143] Step S802: inputting the to-be-matched protein pocket data into the molecular prediction model to obtain small molecule structure information and / or anchor point information.
[0144] In an optional embodiment, the protein pocket data to be matched is input into the molecular prediction model, and obtaining the small molecule structure information includes the following steps: inputting the protein pocket data to be matched into the encoder of the molecular prediction model to obtain a third output vector; obtaining the small molecule attribute information to be matched; inputting the small molecule attribute information to be matched into the attribute controller of the molecular prediction model to obtain a third attribute representation; inputting the third output vector and the third attribute representation into the decoder of the attribute controller of the molecular prediction model to obtain the small molecule structure information. In other words, the decoder outputs the predicted Token type of the next FSMILES, as well as the bond length, bond angle, and dihedral angle corresponding to the Token in the form of autoregression based on these two inputs. The decoder will repeat this process until the molecule is generated.
[0145] In another optional embodiment, the protein pocket data to be matched is input into the molecular prediction model, and the small molecule structure information is obtained by the following steps: obtaining the anchor point information corresponding to the pocket data to be matched; inputting the pocket data to be matched and the anchor point information corresponding to the pocket data to be matched into the encoder of the molecular prediction model to obtain the third output vector; obtaining the small molecule attribute information to be matched; inputting the small molecule attribute information to be matched into the attribute controller of the molecular prediction model to obtain the third attribute representation; inputting the third output vector and the third attribute representation into the decoder of the attribute controller of the molecular prediction model to obtain the small molecule structure information. That is, the decoder outputs the predicted Token type of the next FSMILES, as well as the bond length, bond angle, and dihedral angle corresponding to the Token in the form of autoregression based on these two inputs. The decoder will repeat this process until the molecule is generated.
[0146] In another optional embodiment, the protein pocket data to be matched is input into a molecular prediction model to obtain anchor point information, which includes the following steps: inputting the protein pocket data to be matched into an encoder of the molecular prediction model to obtain the anchor point information.
[0147] In the present embodiment, a training device for a molecular prediction model is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and the descriptions thereof will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and contemplated.
[0148] This embodiment provides a training device for a molecular prediction model, such as Fig. 9 As shown, including:
[0149] An acquisition module 901 is used to acquire a training data set, wherein the training data set includes multiple application scenarios and a training subset corresponding to each application scenario;
[0150] The training module 902 is used to train the molecular prediction model using each training subset in turn.
[0151] In some optional embodiments, the training data set includes a first application scenario, a second application scenario, and a third application scenario. The first training subset corresponding to the first application scenario includes a pocket data set, an anchor condition set, a small molecule structure data set, and a small molecule property information set; the second training subset corresponding to the second application scenario includes a pocket data set and an anchor condition set; and the third training subset corresponding to the third application scenario includes a pocket data set, a small molecule structure data set, and a small molecule property information set.
[0152] In some optional embodiments, the training module 902 includes a first training unit, a second training unit, and a third training unit. The first training unit is used to train the molecular prediction model using the first training subset; the second training unit is used to train the molecular prediction model using the second training subset after the molecular prediction model is trained using the first training subset; the third training unit is used to train the molecular prediction model using the third training subset after the molecular prediction model is trained using the second training subset.
[0153] In some optional embodiments, the first training unit includes a first encoder subunit, a first attribute controller subunit, and a first decoder subunit. The first encoder subunit is used to input the pocket data set and the anchor condition set into the encoder of the molecular prediction model to obtain a first output vector; the first attribute controller subunit is used to input the small molecule attribute information set into the attribute controller of the molecular prediction model to obtain an attribute representation; the first decoder subunit is used to input the first output vector, the attribute representation, and the small molecule structure data set into the decoder of the molecular prediction model to train the molecular prediction model.
[0154] In some optional embodiments, the second training unit is specifically used to input the pocket data set and the anchor condition set into the encoder of the molecular prediction model to train the molecular prediction model.
[0155] In some optional embodiments, the third training unit includes a second encoder subunit, a second attribute controller subunit, and a second decoder subunit. The second encoder subunit is used to input the pocket data set into the encoder of the molecular prediction model to obtain a second output vector; the second attribute controller subunit is used to input the small molecule attribute information set into the attribute controller of the molecular prediction model to obtain an attribute representation; the second decoder subunit is used to input the second output vector, the attribute representation, and the small molecule structure data set into the decoder of the molecular prediction model to train the molecular prediction model.
[0156] In some optional embodiments, the first encoder subunit is specifically used to: embed the atomic type sequence of the pocket to obtain an atomic type representation with a feature dimension of the first dimension; embed the atomic coordinate sequence of the pocket to obtain an atomic coordinate representation with a feature dimension of the second dimension; concatenate the atomic type representation of the first dimension and the atomic coordinate representation of the second dimension to obtain an atomic type / coordinate representation with a feature dimension of H; embed the atomic-level feature sequence of the pocket to obtain an atomic-level feature representation with a feature dimension of the third dimension; embed the anchor condition set to obtain an NCI / anchor representation with a feature dimension of the fourth dimension; concatenate the atomic-level feature representation of the third dimension and the NCI / anchor representation of the fourth dimension to obtain other representations of the pocket with a feature dimension of H; perform bitwise addition of the atomic type / coordinate representation with a feature dimension of H and the other representations of the pocket with a feature dimension of H to obtain a pocket representation with a feature dimension of H, and input the pocket representation with a feature dimension of H into the encoder to obtain a first output vector.
[0157] In some optional embodiments, the second encoder subunit is specifically used to: embed the atomic type sequence of the pocket to obtain an atomic type representation with a feature dimension of the fifth dimension; embed the atomic coordinate sequence of the pocket to obtain an atomic coordinate representation with a feature dimension of the sixth dimension; concatenate the atomic type representation of the fifth dimension and the atomic coordinate representation of the sixth dimension to obtain an atomic type / coordinate representation with a feature dimension of H; embed the atomic-level feature sequence of the pocket to obtain an atomic-level feature representation with a feature dimension of the seventh dimension, perform feature projection on the atomic-level feature representation of the seventh dimension to obtain other representations of the pocket with a feature dimension of H; perform positional addition on the atomic type / coordinate representation with a feature dimension of H and the other representations of the pocket with a feature dimension of H to obtain a pocket representation with a feature dimension of H, and input the pocket representation with a feature dimension of H into the encoder to obtain a second output vector.
[0158] In some optional embodiments, the first decoder subunit is specifically used to: embed-code the FSMILES type sequence of the molecule to obtain a FSMILES type representation with a feature dimension of the eighth dimension; embed-code the FSMILES coordinate sequence of the molecule to obtain a FSMILES coordinate representation with a feature dimension of the ninth dimension; concatenate the FSMILES type representation with the feature dimension of the eighth dimension and the FSMILES coordinate representation with the feature dimension of the ninth dimension to obtain a FSMILES type / coordinate representation with a feature dimension of H; concatenate the FSMILES type / coordinate representation with the feature dimension of H and the attribute representation in the dimension of the sequence to obtain a ligand representation; and input the first output vector and the ligand annotation into the decoder of the molecular prediction model.
[0159] In some optional embodiments, the second decoder subunit is specifically used to: embed-code the FSMILES type sequence of the molecule to obtain an FSMILES type representation with a feature dimension of the tenth dimension; embed-code the FSMILES coordinate sequence of the molecule to obtain an FSMILES coordinate representation with a feature dimension of the eleventh dimension; concatenate the FSMILES type representation with the tenth dimension and the FSMILES coordinate representation with the eleventh dimension to obtain an FSMILES type / coordinate representation with a feature dimension of H; concatenate the FSMILES type / coordinate representation with the feature dimension of H and the attribute representation in the dimension of the sequence to obtain a ligand representation; and input the second output vector and the ligand annotation into the decoder of the molecular prediction model.
[0160] In some optional embodiments, the training device of the molecular prediction model also includes a small molecule prediction module. Before the first output vector, the attribute representation and the small molecule structure data set are input into the decoder of the molecular prediction model and the molecular prediction model is trained, or before the first output vector, the attribute representation and the small molecule structure data set are input into the decoder of the molecular prediction model and the molecular prediction model is trained, the small molecule prediction module is used to: obtain small molecules; divide the small molecules into multiple fragments according to a preset cutting rule; calculate the ring information of each atom in each fragment, and determine the element type of each atom in each fragment and whether it has aromaticity, and obtain the FSMILES sequence of the small molecule; obtain the small molecule structure data set according to multiple FSMILES sequences of multiple small molecules.
[0161] In some optional embodiments, the small molecule prediction module includes a small molecule acquisition unit, a fragment division unit, and a processing unit. The small molecule acquisition unit is used to acquire small molecules; the fragment division unit is used to divide the small molecule into multiple fragments according to a preset cutting rule; the processing unit is used to: calculate the ring information of each atom in each fragment, and determine the element type of each atom in each fragment and whether it has aromaticity, and obtain the FSMILES sequence of the small molecule; obtain a small molecule structure data set according to multiple FSMILES sequences of multiple small molecules.
[0162] In some optional embodiments, the fragment division unit is specifically used to: select all single bonds in the small molecule that meet the conditions of not being part of a ring, not being connected to a hydrogen atom, and having at least one end connected to the ring; and divide the small molecule into multiple fragments at the selected single bonds.
[0163] In some optional embodiments, the training data set includes a force field accuracy training data set and an experimental accuracy training data set; wherein the force field accuracy training data set and the experimental accuracy training data set include multiple application scenarios and a training subset of force field accuracy corresponding to each application scenario; the experimental accuracy training data set includes multiple application scenarios and a training subset of experimental accuracy corresponding to each application scenario.
[0164] In this embodiment, a protein pocket processing device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0165] This embodiment provides a protein pocket processing device, such as Fig.10 As shown, including:
[0166] The second acquisition module 1001 is used to acquire the protein pocket data to be matched;
[0167] The prediction module 1002 is used to input the protein pocket data to be matched into the molecular prediction model trained by the above method to obtain small molecule structure information and / or anchor point information.
[0168] In some optional embodiments, the prediction module 1002 includes a first prediction unit, wherein the first prediction unit is specifically used to: input the protein pocket data to be matched into the encoder of the molecular prediction model to obtain a third output vector; obtain the small molecule property information to be matched; input the small molecule property information to be matched into the property controller of the molecular prediction model to obtain a third property representation; input the third output vector and the third property representation into the decoder of the property controller of the molecular prediction model to obtain the small molecule structure information.
[0169] In some optional embodiments, the prediction module 1002 includes a second prediction unit, wherein the second prediction unit is specifically used to: obtain anchor point information corresponding to the pocket data to be matched; input the pocket data to be matched and the anchor point information corresponding to the pocket data to be matched into the encoder of the molecular prediction model to obtain the third output vector; obtain small molecule attribute information to be matched; input the small molecule attribute information to be matched into the attribute controller of the molecular prediction model to obtain the third attribute representation; input the third output vector and the third attribute representation into the decoder of the attribute controller of the molecular prediction model to obtain the small molecule structure information.
[0170] In some optional embodiments, the prediction module 1002 includes a third prediction unit, wherein the third prediction unit is specifically used to: input the to-be-matched protein pocket data into the encoder of the molecular prediction model to obtain the anchor point information.
[0171] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0172] The training device of the molecular prediction model and / or the processing device of the protein pocket in this embodiment are presented in the form of functional units, where the units refer to ASIC (Application Specific Integrated Circuit) circuits, processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0173] The embodiment of the present invention also provides a computer device having the above Fig. 9 The training device of the molecular prediction model shown, and / or Fig.10 The processing apparatus of the protein pocket is shown.
[0174] See also Fig.11 , Fig.11 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.11As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.11 A processor 10 is taken as an example.
[0175] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0176] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0177] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0178] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0179] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Fig.11 The example of connecting through bus is taken in the following.
[0180] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device may be a touch screen.
[0181] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0182] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0183] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for training a molecular prediction model, characterized in that: The method comprises: Acquire a training data set, wherein the training data set includes a plurality of application scenarios and a training subset corresponding to each of the application scenarios; Using each of the training subsets in turn to train the molecular prediction model; The training data set includes: A first application scenario, wherein a first training subset corresponding to the first application scenario includes a pocket data set, an anchor condition set, a small molecule structure data set, and a small molecule attribute information set; A second application scenario, wherein a second training subset corresponding to the second application scenario includes the pocket data set and the anchor condition set; A third application scenario, wherein a third training subset corresponding to the third application scenario includes the pocket data set, the small molecule structure data set, and the small molecule attribute information set; The sequentially using each of the training subsets to train the molecular prediction model comprises: Training the molecular prediction model using the first training subset; After training the molecular prediction model using the first training subset, training the molecular prediction model using the second training subset; After the molecular prediction model is trained using the second training subset, the molecular prediction model is trained using the third training subset.
2. The method according to claim 1, characterized in that Training the molecular prediction model using the first training subset includes: Inputting the pocket data set and the anchor condition set into an encoder of the molecular prediction model to obtain a first output vector; Inputting the small molecule property information set into the property controller of the molecular prediction model to obtain property representation; Inputting the first output vector, the property representation and the small molecule structure data set into a decoder of the molecular prediction model to train the molecular prediction model; And / or, using the second training subset to train the molecular prediction model includes: Inputting the pocket data set and the anchor condition set into an encoder of the molecular prediction model to train the molecular prediction model; And / or, training the molecular prediction model using the third training subset includes: Inputting the pocket data set into an encoder of the molecular prediction model to obtain a second output vector; Inputting the small molecule property information set into the property controller of the molecular prediction model to obtain property representation; The second output vector, the property representation and the small molecule structure data set are input into a decoder of the molecular prediction model to train the molecular prediction model.
3. The method according to claim 2, characterized in that The pocket data set includes a pocket atom type sequence, a pocket atom coordinate sequence, and a pocket atomic-level feature sequence. The pocket data set and the anchor condition set are input into the encoder of the molecular prediction model to obtain a first output vector, including: Embedding the atomic type sequence of the pocket to obtain an atomic type representation with a characteristic dimension of the first dimension; embedding the atomic coordinate sequence of the pocket to obtain an atomic coordinate representation with a characteristic dimension of the second dimension; splicing the atomic type representation of the first dimension and the atomic coordinate representation of the second dimension to obtain an atomic type / coordinate representation with a characteristic dimension of H; Embedding the atomic-level feature sequence of the pocket to obtain an atomic-level feature representation with a feature dimension of the third dimension; embedding the anchor condition set to obtain an NCI / anchor representation with a feature dimension of the fourth dimension; splicing the atomic-level feature representation of the third dimension and the NCI / anchor representation of the fourth dimension to obtain other representations of the pocket with a feature dimension of H; The atomic type / coordinate representation with the feature dimension of H and the other pocket representations with the feature dimension of H are added in a positional manner to obtain the pocket representation with the feature dimension of H, and the pocket representation with the feature dimension of H is input into the encoder to obtain the first output vector.
4. The method according to claim 2, characterized in that: The pocket data set includes a pocket atom type sequence, a pocket atom coordinate sequence, and a pocket atom-level feature sequence, and the pocket data set is input into the encoder of the molecular prediction model to obtain a second output vector including: Embedding the atomic type sequence of the pocket to obtain an atomic type representation with a characteristic dimension of the fifth dimension; embedding the atomic coordinate sequence of the pocket to obtain an atomic coordinate representation with a characteristic dimension of the sixth dimension; splicing the atomic type representation of the fifth dimension and the atomic coordinate representation of the sixth dimension to obtain an atomic type / coordinate representation with a characteristic dimension of H; Embedding the atomic-level feature sequence of the pocket to obtain an atomic-level feature representation with a feature dimension of the seventh dimension, and performing feature projection on the atomic-level feature representation of the seventh dimension to obtain other representations of the pocket with a feature dimension of H; The atomic type / coordinate representation with the feature dimension of H and the other pocket representations with the feature dimension of H are added in a positional manner to obtain the pocket representation with the feature dimension of H, and the pocket representation with the feature dimension of H is input into the encoder to obtain the second output vector.
5. The method according to claim 2, characterized in that: The small molecule structure data set includes a FSMILES type sequence of molecules and a FSMILES coordinate sequence of molecules; the step of inputting the first output vector, the attribute representation and the small molecule structure data set into the decoder of the molecule prediction model includes: Embedding the FSMILES type sequence of the molecule to obtain a FSMILES type representation with a characteristic dimension of the eighth dimension; embedding the FSMILES coordinate sequence of the molecule to obtain a FSMILES coordinate representation with a characteristic dimension of the ninth dimension; splicing the FSMILES type representation with the characteristic dimension of the eighth dimension and the FSMILES coordinate representation with the characteristic dimension of the ninth dimension to obtain a FSMILES type / coordinate representation with a characteristic dimension of H; The FSMILES type / coordinate representation with the feature dimension H and the attribute representation are spliced on the dimension of the sequence to obtain the ligand representation; inputting the first output vector and the ligand annotation into a decoder of the molecular prediction model; and / or; Inputting the second output vector, the property representation and the small molecule structure data set into a decoder of the molecular prediction model comprises: Embedding the FSMILES type sequence of the molecule to obtain an FSMILES type representation with a characteristic dimension of the tenth dimension; embedding the FSMILES coordinate sequence of the molecule to obtain an FSMILES coordinate representation with a characteristic dimension of the eleventh dimension; splicing the FSMILES type representation with the characteristic dimension of the tenth dimension and the FSMILES coordinate representation with the characteristic dimension of the eleventh dimension to obtain an FSMILES type / coordinate representation with a characteristic dimension of H; The FSMILES type / coordinate representation with the feature dimension H and the attribute representation are spliced on the dimension of the sequence to obtain the ligand representation; inputting the second output vector and the ligand annotation into a decoder of the molecular prediction model; Before inputting the first output vector, the property representation and the small molecule structure data set into the decoder of the molecule prediction model to train the molecule prediction model, or before inputting the first output vector, the property representation and the small molecule structure data set into the decoder of the molecule prediction model to train the molecule prediction model, the method further includes: Access to small molecules; Dividing the small molecule into multiple fragments according to a preset cutting rule; Calculate the ring information of each atom in each of the fragments, and determine the element type of each atom in each of the fragments and whether it has aromaticity, to obtain the FSMILES sequence of the small molecule; Obtaining the small molecule structure data set according to the multiple FSMILES sequences of the multiple small molecules; The step of dividing the small molecule into a plurality of fragments according to a preset cutting rule comprises: Selecting all single bonds in the small molecule that meet the conditions of not being part of a ring, not being connected to a hydrogen atom, and being connected to a ring at least at one end; The small molecule is divided into a plurality of fragments at the selected single bonds.
6. The method according to claim 1, characterized in that The training data set includes a force field accuracy training data set and an experimental accuracy training data set; wherein the force field accuracy training data set and the experimental accuracy training data set include multiple application scenarios and a training subset of force field accuracy corresponding to each application scenario; the experimental accuracy training data set includes multiple application scenarios and a training subset of experimental accuracy corresponding to each application scenario.
7. A method for processing a protein pocket, characterized in that: The method comprises: Obtain the protein pocket data to be matched; The protein pocket data to be matched is input into a molecular prediction model trained by the method according to any one of claims 1 to 6 to obtain small molecule structure information and / or anchor point information.
8. The method according to claim 7, characterized in that Inputting the protein pocket data to be matched into a molecular prediction model trained by the method according to any one of claims 1 to 6 to obtain small molecule structure information comprises: Inputting the to-be-matched protein pocket data into the encoder of the molecular prediction model to obtain a third output vector; Obtain the property information of the small molecule to be matched; Inputting the to-be-matched small molecule property information into the property controller of the molecule prediction model to obtain a third property representation; The third output vector and the third attribute representation are input into the decoder of the attribute controller of the molecular prediction model to obtain the small molecule structure information.
9. The method according to claim 7, characterized in that: Inputting the protein pocket data to be matched into a molecular prediction model trained by the method according to any one of claims 1 to 6 to obtain small molecule structure information comprises: Acquire anchor point information corresponding to the pocket data to be matched; Inputting the to-be-matched pocket data and the anchor point information corresponding to the to-be-matched pocket data into the encoder of the molecular prediction model to obtain a third output vector; Obtain the property information of the small molecule to be matched; Inputting the to-be-matched small molecule property information into the property controller of the molecule prediction model to obtain a third property representation; The third output vector and the third attribute representation are input into the decoder of the attribute controller of the molecular prediction model to obtain the small molecule structure information.
10. The method according to claim 7, characterized in that Inputting the to-be-matched protein pocket data into a molecular prediction model trained by the method according to any one of claims 1 to 6 to obtain anchor point information comprises: The protein pocket data to be matched is input into the encoder of the molecular prediction model to obtain the anchor point information.
11. A training device for a molecular prediction model, characterized in that: The device comprises: A first acquisition module is used to acquire a training data set, wherein the training data set includes multiple application scenarios and a training subset corresponding to each application scenario; A training module, used to train the molecular prediction model using each of the training subsets in turn; The training data set includes: A first application scenario, wherein a first training subset corresponding to the first application scenario includes a pocket data set, an anchor condition set, a small molecule structure data set, and a small molecule attribute information set; A second application scenario, wherein a second training subset corresponding to the second application scenario includes the pocket data set and the anchor condition set; A third application scenario, wherein a third training subset corresponding to the third application scenario includes the pocket data set, the small molecule structure data set, and the small molecule attribute information set; The training module is specifically used to: train the molecular prediction model using the first training subset; after training the molecular prediction model using the first training subset, train the molecular prediction model using the second training subset; after training the molecular prediction model using the second training subset, train the molecular prediction model using the third training subset.
12. A protein pocket processing device, characterized in that: The device comprises: The first acquisition module is used to acquire the protein pocket data to be matched; A prediction module is used to input the protein pocket data to be matched into a molecular prediction model trained by the method described in any one of claims 1 to 6 to obtain small molecule structure information and / or anchor point information.
13. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for training a molecular prediction model according to any one of claims 1 to 6, and / or the method for processing a protein pocket according to any one of claims 7 to 10 by executing the computer instructions.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which are used to enable a computer to execute the molecular prediction model training method described in any one of claims 1 to 6, and / or the protein pocket processing method described in any one of claims 7 to 10.
15. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method for training a molecular prediction model according to any one of claims 1 to 6, and / or the method for processing a protein pocket according to any one of claims 7 to 10.
Citation Information
Patent Citations
Information prediction method and device, information prediction model training method and device, equipment and medium
CN113409883A
Method and device for generating small molecule compound based on conditional diffusion model
CN118230853A