Method, device and equipment for testing hydrophobicity of molecules
Through the hydrophobicity prediction model based on machine learning, the molecular structure file is directly used for property prediction, which solves the problem of low efficiency of molecular hydrophobicity evaluation in existing technologies and achieves the effect of rapid screening of suitable molecules.
Patent Information
- Application Number
- CN202411533228.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-10-30
AI Technical Summary
Existing technologies for evaluating and screening the hydrophobicity of molecules are inefficient, making it difficult to quickly process large quantities of molecules and unable to meet the needs of material research and development.
By combining machine learning with a trained hydrophobicity prediction model, molecular structure files are directly used for property prediction, target features are extracted, and hydrophobicity test results are predicted.
It enables rapid evaluation and screening of suitable molecules, improves the efficiency and accuracy of large-scale molecular evaluation, reduces workload and ensures the correctness of molecular structure files.
Smart Images

Figure CN120808965A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of machine learning, and particularly relates to a method, device and equipment for testing hydrophobicity of a molecule. BACKGROUND
[0002] Hydrophobicity of a molecule generally refers to a physical property that a molecule repels water, and can also represent a degree of hydrophobicity of a molecule. For different application scenarios, the requirements for the degree of hydrophobicity of a molecule are usually different. How to evaluate and screen molecules with a certain degree of hydrophobicity is a problem to be solved.
[0003] At present, in the related art, each molecule is usually analyzed separately, and the hydrophobicity thereof is determined through a relatively complex calculation method.
[0004] However, the number of molecules that need to be evaluated and screened by material researchers is usually large, and the efficiency of evaluation and screening through the above method is low. SUMMARY
[0005] In view of the above technical problems, the embodiments of the present application provide a method, device and equipment for testing hydrophobicity of a molecule, which directly uses a trained hydrophobicity prediction model for property prediction by combining machine learning, so that the hydrophobicity test result of the molecule can be quickly obtained, and material researchers can quickly evaluate a large number of molecules and screen out suitable molecules.
[0006] In a first aspect, the embodiments of the present application provide a method for testing hydrophobicity of a molecule, which comprises:
[0007] obtaining a molecular structure file corresponding to a to-be-tested molecule; wherein the molecular structure file is used to represent a structure of the to-be-tested molecule;
[0008] inputting the molecular structure file into a pre-trained hydrophobicity prediction model to obtain a hydrophobicity test result of the to-be-tested molecule output by the hydrophobicity prediction model; wherein the hydrophobicity prediction model is used to extract a target feature of the to-be-tested molecule in the molecular structure file, and predict the hydrophobicity test result corresponding to the to-be-tested molecule according to the target feature, and the hydrophobicity test result is used to represent a degree of hydrophobicity of the to-be-tested molecule.
[0009] In the embodiments of the present application, a molecular structure file representing the structure of a to-be-tested molecule is first obtained, and then the molecular structure file is input into a trained hydrophobicity prediction model to extract target features of the to-be-tested molecule from the molecular structure file by the model, and then the hydrophobicity test result corresponding to the to-be-tested molecule is predicted according to the target features to represent the hydrophobicity of the to-be-tested molecule. Compared with the related art in which each molecule is analyzed separately and the hydrophobicity thereof is calculated by a complex method, the present application combines machine learning and directly uses the trained hydrophobicity prediction model for property prediction, so that the hydrophobicity test result of the molecule can be quickly obtained, and the material researchers can quickly evaluate a large number of molecules and screen out suitable molecules.
[0010] In some embodiments, the obtaining of the molecular structure file corresponding to the to-be-tested molecule comprises:
[0011] According to the pre-input N end groups and M intermediate molecular fragments, a molecular structure file corresponding to the to-be-tested molecule is generated;
[0012] wherein N and M are integers greater than 0.
[0013] In the embodiments of the present application, a large number of molecular structure files can be generated according to the pre-input N end groups and M intermediate molecular fragments, and the molecules corresponding to these molecular structure files are used as to-be-tested molecules for the above hydrophobicity test. Compared with obtaining a large number of molecules from other documents, which requires a large amount of work and cannot guarantee the correctness of the molecular structure files, the present application can directly generate a large number of molecular structure files corresponding to the molecules according to the input end groups and intermediate molecular fragments of the user, effectively reducing the workload of obtaining a large number of molecules, and effectively guaranteeing the correctness of the generated molecular structure files.
[0014] In some embodiments, before the input of the molecular structure file into the pre-trained hydrophobicity prediction model, the method further comprises:
[0015] According to the pre-input end groups and intermediate molecular fragments, a plurality of molecular structure files are generated; wherein the plurality of molecular structure files respectively represent the structures of a plurality of to-be-tested molecules;
[0016] By performing DFT calculation on the plurality of molecular structure files, LogP data corresponding to the plurality of to-be-tested molecules is obtained; wherein the LogP data is used to represent the hydrophobicity of the plurality of to-be-tested molecules respectively;
[0017] For each of the plurality of molecular structure files, the following steps are performed: feature extraction is performed on the molecular structure file, and X candidate features extracted are used as the target features; wherein X is an integer greater than 0.
[0018] Generate a training data set according to the target features and the corresponding LogP data corresponding to the multiple molecular structure files;
[0019] The pre-set candidate model is trained using the training data set, and the trained candidate model is used as the hydrophobicity prediction model.
[0020] In an embodiment of the present application, a specific implementation method for training a hydrophobicity prediction model is provided. First, a training data set is obtained. Specifically, multiple molecular structure files are generated based on pre-input end groups and intermediate molecular fragments, which are used to characterize the structures of multiple molecules to be tested, ensuring the consistency of the data source. Then, DFT calculations are performed on the multiple molecular structure files to obtain LogP data corresponding to the multiple molecules to be tested, so as to characterize the hydrophobicity corresponding to the multiple molecules to be tested. It is also necessary to perform feature extraction on each molecular structure file, and use the extracted X candidate features as target features. Then, based on the target features and corresponding LogP data corresponding to the multiple molecular structure files, a training data set is generated, and then the pre-set candidate model is trained using the training data set. Specifically, the target feature is used as the input quantity, and the LogP data is used as the output target quantity for supervised learning, and the trained candidate model is used as the hydrophobicity prediction model.
[0021] In some embodiments, the performing feature extraction on the molecular structure file and using the extracted X candidate features as the target features includes:
[0022] Performing feature extraction on the molecular structure file to obtain the extracted X candidate features;
[0023] When X is an integer greater than 2, performing an important feature analysis on the X candidate features using the candidate model to determine the contribution of each of the X candidate features to the candidate model;
[0024] At least two features are selected from the X candidate features in descending order of contribution as the target features.
[0025] In an embodiment of the present application, when a large number of candidate features are extracted, a candidate model can be used to perform important feature analysis on multiple candidate features to determine the contribution of each of the X candidate features to the candidate model. Then, at least two features are selected from the X candidate features in descending order of contribution to serve as target features for model training. The present application uses some features with larger contributions as target features for model training, rather than all features, in order to minimize the amount of training data while ensuring the effectiveness of model training.
[0026] In some embodiments, the generating the training data set according to the target features and the corresponding LogP data of the plurality of molecular structure files respectively comprises:
[0027] For each of the plurality of molecular structure files, at least two features in the target features corresponding to the molecular structure file are normalized to obtain at least two normalized features after processing.
[0028] The at least two normalized features and the corresponding LogP data of the plurality of molecular structure files are used as the training data set.
[0029] In the embodiments of the present application, when generating the training data set, for each of the plurality of molecular structure files, the present application first normalizes at least two features in the target features corresponding to the molecular structure file, and uses all the normalized features after processing and the corresponding LogP data as the training data set. The normalized features can eliminate the dimensional influence between different features, so that the different features are comparable, thereby improving the effect of model training and the prediction accuracy of the trained model.
[0030] In some embodiments, the candidate model is obtained by the following steps:
[0031] At least two machine learning models are obtained by pre-setting; wherein the at least two machine learning models use different machine learning methods and / or model parameters;
[0032] The training data set is used to train the at least two machine learning models respectively, and the output results of the trained machine learning models are obtained;
[0033] The output results corresponding to the at least two machine learning models are evaluated by the pre-set model evaluation index, and the machine learning model with the optimal evaluation result is selected as the candidate model.
[0034] In the embodiments of the present application, at least two machine learning models using different machine learning methods and / or model parameters are pre-set, and the generated training data set is used to train these machine learning models respectively, and the output results of the trained machine learning models are obtained. Then, these output results can be evaluated according to the model evaluation index, and the machine learning model with the optimal evaluation result is selected as the candidate model for subsequent training, which helps to improve the prediction accuracy of the trained hydrophobicity prediction model.
[0035] In some embodiments, the obtaining the LogP data corresponding to the plurality of molecules to be tested by performing DFT calculation on the plurality of molecular structure files comprises:
[0036] For each of the plurality of molecular structure files, the following steps are performed:
[0037] obtaining ΔG oct and ΔG w for the molecular structure file;
[0038] According to ΔG oct and ΔG w , the LogP data corresponding to the molecular structure file is calculated using formula (1):
[0039]
[0040] where ΔG oct represents the free energy of the molecule to be tested in n-octanol, ΔG w represents the free energy of the molecule to be tested in water, R represents the standard molar gas constant, and T represents the temperature in Kelvin.
[0041] In an embodiment of the present application, a specific implementation of calculating the LogP data corresponding to the molecule to be tested is provided. The LogP data corresponding to a molecule to be tested can be obtained by formula (1) to represent the hydrophobicity of the molecule.
[0042] In a second aspect, an embodiment of the present application further provides a device for testing the hydrophobicity of a molecule, comprising:
[0043] an obtaining module configured to obtain a molecular structure file corresponding to a molecule to be tested, wherein the molecular structure file is used to represent the structure of the molecule to be tested;
[0044] a prediction module configured to input the molecular structure file into a pre-trained hydrophobicity prediction model to obtain a hydrophobicity test result of the molecule to be tested output by the hydrophobicity prediction model, wherein the hydrophobicity prediction model is used to extract a target feature of the molecule to be tested from the molecular structure file, and predict the hydrophobicity test result corresponding to the molecule to be tested according to the target feature, and the hydrophobicity test result is used to represent the hydrophobicity of the molecule to be tested.
[0045] In a third aspect, an embodiment of the present application further provides a device for testing the hydrophobicity of a molecule, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method for testing the hydrophobicity of a molecule according to the first aspect when executing the computer program.
[0046] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium storing computer instructions, which, when executed on a computer, cause the computer to perform the method for testing the hydrophobicity of a molecule according to the first aspect.
[0047] In a fifth aspect, the embodiments of the present application further provide a computer program product, which comprises a computer program, and when the computer program product is run on a computer, the computer program product realizes the method for testing the hydrophobicity of a molecule according to the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or related description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative labor.
[0049] Figure 1 is one of the flowcharts of the method for testing the hydrophobicity of a molecule according to the embodiments of the present application;
[0050] Figure 2 is another flowchart of the method for testing the hydrophobicity of a molecule according to the embodiments of the present application;
[0051] Figure 3 is a third flowchart of the method for testing the hydrophobicity of a molecule according to the embodiments of the present application;
[0052] Figure 4 is a fourth flowchart of the method for testing the hydrophobicity of a molecule according to the embodiments of the present application;
[0053] Figure 5 is a fifth flowchart of the method for testing the hydrophobicity of a molecule according to the embodiments of the present application;
[0054] Figure 6 is a sixth flowchart of the method for testing the hydrophobicity of a molecule according to the embodiments of the present application;
[0055] Figure 7 is a structural schematic diagram of the system applied to the method for testing the hydrophobicity of a molecule according to the embodiments of the present application;
[0056] Figure 8 is a seventh flowchart of the method for testing the hydrophobicity of a molecule according to the embodiments of the present application;
[0057] Figure 9 is a schematic diagram of the relationship between the feature-feature importance in the method for testing the hydrophobicity of a molecule according to the embodiments of the present application;
[0058] Figure 10 is a schematic diagram of the relationship between the predicted value and the true value of the LogP data in the method for testing the hydrophobicity of a molecule according to the embodiments of the present application;
[0059] Figure 11 is a structural schematic diagram of a hydrophobicity testing device of a molecule. DETAILED DESCRIPTION
[0060] The embodiments of the technical solutions of the present application will be described in detail below with reference to the drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present application, and therefore only serve as examples, and cannot limit the protection scope of the present application.
[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "include" and "have" and any variations thereof in the specification and claims of the present application and the above description of drawings are intended to cover non-exclusive inclusion.
[0062] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "a plurality of" is two and more than two, unless otherwise explicitly and specifically limited.
[0063] In this paper, the phrase "embodiment" means that the specific features, structures or properties described in conjunction with the embodiment can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor is it an independent or alternative embodiment to other embodiments. The skilled person in the art explicitly and implicitly understands that the embodiments described herein can be combined with other embodiments.
[0064] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents a "or" relationship between the associated objects before and after it.
[0065] In the related art, each molecule is usually analyzed separately, and the hydrophobicity is determined by a relatively complex calculation method, for example, the hydrophobicity of each molecule is calculated by the DFT calculation method. However, such evaluation of the hydrophobicity of the molecule is extremely low in efficiency, which is not conducive to material researchers to evaluate and screen a large number of molecules that meet certain hydrophobicity requirements.
[0066] To solve the above problems, the embodiment of the present application provides a molecular hydrophobicity test method, device and equipment. By combining machine learning, the trained hydrophobicity prediction model is directly used for property prediction, and the hydrophobicity test result of the molecule can be quickly obtained, which facilitates the material researchers to quickly evaluate a large number of molecules and screen out suitable molecules.
[0067] The molecular hydrophobicity test method, device and equipment provided by the embodiment of the present application are described in detail below.
[0068] Figure 1 is one of the flowcharts of the molecular hydrophobicity test method provided by the embodiment of the present application, as shown in Figure 1 The molecular hydrophobicity test method includes steps S101-S102.
[0069] In step S101, a molecular structure file corresponding to a to-be-tested molecule is obtained.
[0070] The molecular structure file is used to represent the structure of the to-be-tested molecule.
[0071] It should be noted that the to-be-tested molecule may be, for example, an organic small molecule, which is not limited in the present application.
[0072] In some embodiments, the molecular structure file corresponding to the to-be-tested molecule can be obtained from relevant literature or files, or can be generated by software, which is not limited in the present application.
[0073] In step S102, the molecular structure file is input into a pre-trained hydrophobicity prediction model to obtain a hydrophobicity test result of the to-be-tested molecule output by the hydrophobicity prediction model.
[0074] The hydrophobicity prediction model is used to extract target features of the to-be-tested molecule from the molecular structure file, and predict the hydrophobicity test result of the to-be-tested molecule according to the target features. The hydrophobicity test result is used to represent the hydrophobicity of the to-be-tested molecule.
[0075] It should be noted that the target features extracted by the above hydrophobicity prediction model can include one or more features, which are not limited in the present application. The target features are used to describe the physical, chemical and other information of the to-be-tested molecule, which facilitates the hydrophobicity prediction model to predict the hydrophobicity of the to-be-tested molecule according to the information.
[0076] Specifically, a molecular structure file representing the structure of a to-be-tested molecule is first obtained, and then the molecular structure file is input into the trained hydrophobicity prediction model to extract target features of the to-be-tested molecule from the molecular structure file by the model, and then the hydrophobicity test result corresponding to the to-be-tested molecule is predicted according to the target features to represent the hydrophobicity of the to-be-tested molecule.
[0077] In the method for testing the hydrophobicity of a molecule provided in the embodiments of the present application, compared with the related art in which each molecule is analyzed separately and the hydrophobicity thereof is calculated in a complex manner, the present application directly uses the trained hydrophobicity prediction model for property prediction by combining machine learning, so that the hydrophobicity test result of the molecule can be quickly obtained, and the material researchers can quickly evaluate a large number of molecules and screen out suitable molecules.
[0078] In some embodiments, Figure 2 FIG. 2 is a flowchart of a method for testing the hydrophobicity of a molecule according to an embodiment of the present application, as shown in the figure, Figure 2 Step S101 specifically includes step S1011.
[0079] Step S1011, according to the pre-input N end groups and M intermediate molecular fragments, a molecular structure file corresponding to the to-be-tested molecule is generated;
[0080] Wherein, N and M are integers greater than 0.
[0081] Specifically, the molecular structure file corresponding to the to-be-tested molecule can be generated according to the pre-input N end groups and M intermediate molecular fragments by an automatic script. Specifically, by executing the automatic script, the N end groups and the M intermediate molecular fragments can be combined with each other to form a large number of molecular structure files for representing different to-be-tested molecules. The specific content of the automatic script is not limited in the present application.
[0082] In the embodiments of the present application, a large number of molecular structure files can be generated according to the pre-input N end groups and M intermediate molecular fragments, and the molecules corresponding to these molecular structure files are used as to-be-tested molecules for the above-mentioned hydrophobicity test. Compared with obtaining a large number of molecules from other documents, which will generate a large amount of work and cannot guarantee the correctness of the molecular structure files, the present application can directly generate a large number of molecular structure files corresponding to the molecules according to the input end groups and intermediate molecular fragments by the user, effectively reducing the workload of obtaining a large number of molecules, and effectively guaranteeing the correctness of the generated molecular structure files.
[0083] The embodiments of the present application also provide a specific implementation of training a hydrophobicity prediction model, specifically, Figure 3 FIG. 3 is a flowchart of a method for testing the hydrophobicity of a molecule according to an embodiment of the present application, as shown in the figure,Figure 3 As shown, before using the hydrophobicity prediction model, the method further includes steps S301-S305:
[0084] Step S301, generating a plurality of molecular structure files according to pre-input end groups and intermediate molecular fragments;
[0085] Among them, the plurality of molecular structure files respectively represent the structures of a plurality of test molecules.
[0086] It should be noted that the present application does not limit the number of end groups and intermediate molecular fragments, and users can input according to actual conditions and generate a large number of molecular sample spaces, i.e. a plurality of molecular structure files, respectively representing a plurality of test molecules, by executing pre-set automated scripts.
[0087] Step S302, obtaining LogP data corresponding to the plurality of test molecules respectively by performing DFT calculation on the plurality of molecular structure files;
[0088] Among them, the LogP data is used to represent the hydrophobicity of the plurality of test molecules respectively.
[0089] It should be noted that DFT calculation is used to calculate the LogP data of the molecule, which is used to represent the hydrophobicity of the molecule. Generally, the smaller the LogP, the smaller the hydrophobicity and the greater the hydrophilicity of the molecule; conversely, the greater the LogP, the greater the hydrophobicity and the smaller the hydrophilicity of the molecule.
[0090] Step S303, for each of the plurality of molecular structure files, performing the following steps: performing feature extraction on the molecular structure file, and taking the extracted X candidate features as the target features;
[0091] Among them, X is an integer greater than 0.
[0092] In some embodiments, the molecular structure file can be extracted using the RDKit molecular toolkit, and up to 209 features can be extracted to describe the physical and chemical information of the molecule.
[0093] Step S304, generating a training data set according to the target features and corresponding LogP data corresponding to the plurality of molecular structure files respectively.
[0094] Step S305, training a pre-set candidate model using the training data set, and taking the trained candidate model as the hydrophobicity prediction model.
[0095] Specifically, for each of the plurality of molecular structure files, the target feature can be taken as an input quantity, the corresponding LogP data is taken as an output target quantity, a mapping relationship between the input quantity and the output target quantity is established, and then all the mapping relationships corresponding to the molecular structure files form a set as a training data set, so as to train the candidate model by using the training data set. The training is supervised learning, and finally the trained candidate model is taken as the hydrophobicity prediction model, which is convenient for subsequent rapid prediction of the hydrophobicity of the molecule by using the hydrophobicity prediction model.
[0096] In the embodiments of the present application, a specific implementation of training a hydrophobicity prediction model is provided. First, a training data set is obtained, specifically, a plurality of molecular structure files are generated according to the pre-input end group and intermediate molecular fragments, which are respectively used to represent the structures of a plurality of test molecules, ensuring the consistency of the data source. Then, the DFT calculation is performed on the plurality of molecular structure files to obtain the LogP data corresponding to the plurality of test molecules respectively, so as to represent the hydrophobicity of the plurality of test molecules respectively. Feature extraction is also needed for each molecular structure file, and the extracted X candidate features are taken as target features. Then, the training data set is generated according to the target features and the corresponding LogP data of the plurality of molecular structure files, and the pre-set candidate model is trained by using the training data set. Specifically, the target feature is taken as an input quantity, and the LogP data is taken as an output target quantity for supervised learning, and the trained candidate model is taken as a hydrophobicity prediction model.
[0097] In some embodiments, Figure 4 is a fourth flowchart of a method for testing the hydrophobicity of a molecule according to an embodiment of the present application, as shown in Figure 4 is a fourth flowchart of a method for testing the hydrophobicity of a molecule according to an embodiment of the present application, as shown in Figure 4 is a fourth flowchart of a method for testing the hydrophobicity of a molecule according to an embodiment of the present application, as shown in Figure 3 Based on the corresponding embodiments, step S303 specifically includes steps S3031-S3033:
[0098] Step S3031, feature extraction is performed on the molecular structure file to obtain the extracted X candidate features.
[0099] Step S3032, in the case where X is an integer greater than 2, the candidate model is used to analyze the important features of the X candidate features, and the contribution degrees of the X candidate features to the candidate model are determined.
[0100] In some embodiments, the X candidate features can be input into the candidate model, and the importance of the X candidate features to the candidate model, i.e. the contribution degree, can be analyzed by comparing the correlation between the candidate features and the output target quantity.
[0101] Step S3033 : Screening at least two features from the X candidate features in descending order of contribution as the target features.
[0102] It should be noted that the operation of selecting some features as target features by contribution can also be performed when X is greater than a preset value. Here, the preset value is an integer greater than or equal to 2, and the specific preset value can be set according to actual conditions.
[0103] It should also be noted that the number of features screened from the X candidate features can also be set according to actual conditions, and this application does not impose any restrictions on this.
[0104] For example, if the preset value is set to 16, when the number of extracted candidate features is greater than 16, a feature screening operation needs to be performed. At this time, for example, 15 features with greater contribution can be screened out from the candidate features as target features for subsequent model training.
[0105] In an embodiment of the present application, when the number of extracted candidate features is large, for example, when X is greater than 2, the candidate model can be used to perform important feature analysis on multiple candidate features to determine the contribution of the X candidate features to the candidate model, and then, in descending order of contribution, at least two features are selected from the X candidate features as target features for model training; the present application uses some features with larger contribution as target features for model training, rather than using all features for model training, in order to minimize the amount of training data while ensuring the model training effect.
[0106] In some embodiments, Figure 5 This is a flow chart of a method for testing the hydrophobicity of a molecule proposed in the embodiment of the present application, as shown in FIG. Figure 5 As shown, Figure 5 is Figure 3 Taking the corresponding embodiment as an example, step S304 specifically includes steps S3041-S3042:
[0107] Step S3041 : For each molecular structure file in the plurality of molecular structure files, perform standardization processing on at least two of the target features corresponding to the molecular structure file to obtain at least two processed standardized features.
[0108] Step S3042: using the at least two standardized features and the corresponding LogP data corresponding to the plurality of molecular structure files as the training data set.
[0109] Exemplarily, for a certain molecular structure file, 15 features with the largest contribution to the model are screened as target features for subsequent model training, and the 15 features are denoted as x n (n = 1, 2, 3, …, 15). Before forming the training data set, the features can be preprocessed, and the extracted feature values x n of the molecule are normalized, and the formula is as follows:
[0110]
[0111] wherein x * denotes the normalized feature after normalization, and x n , respectively, μ denotes the mean of the 15 features, and σ denotes the standard deviation of the 15 features.
[0112] Specifically, x n are centered on the mean μ and then scaled by the standard deviation σ, so that the data conforms to the standard normal distribution with a mean of 0 and a variance of 1. The processed data set is: input feature value x * = (x * 1, x * 2, …, x * 15 ), and the output target value is (hydrophobicity) y, that is, the LogP data obtained above.
[0113] In the embodiments of the present application, when generating the training data set, for each of the plurality of molecular structure files, the present application first normalizes at least two features in the target features corresponding to the molecular structure file, and takes all the processed normalized features and the corresponding LogP data as the training data set. Through the normalized features, the dimensional influence between different features can be eliminated, so that different features have comparability, and thus the effect of model training and the prediction accuracy of the trained model can be improved.
[0114] In some embodiments, Figure 6 is a flowchart of a sixth method for testing the hydrophobicity of a molecule according to an embodiment of the present application, as shown in Figure 6 The candidate model is obtained by the following steps:
[0115] Step S601, obtaining at least two machine learning models set in advance;
[0116] The at least two machine learning models use different machine learning methods and / or model parameters.
[0117] It should be noted that the machine learning model can adopt machine learning methods such as random forest (RF), gradient boosting tree (GDBT) and extreme gradient boosting tree (XGBoost), and for a tree-shaped machine learning model, the model parameters are, for example, the number of trees.
[0118] Step S602, training the at least two machine learning models respectively by using the training data set, and obtaining the output results of the trained machine learning models.
[0119] Step S603, evaluating the output results corresponding to the at least two machine learning models by using a pre-set model evaluation index, and selecting a machine learning model with the optimal evaluation result as the candidate model.
[0120] It should be noted that the model evaluation index can be, for example, R2, MAE (Mean Absolute Error) and RMSE (Root Mean Square Error); wherein:
[0121] 1) For R2, R2≤1, the larger R2 represents the better performance of the machine learning model, and in an ideal case, when the prediction model is completely accurate, R2 is equal to the maximum value 1.
[0122] 2) For MAE, it is a non-negative value, and the smaller MAE represents the better performance of the machine learning model.
[0123] 3) For RMSE, the smaller RMSE represents the better performance of the machine learning model.
[0124] Exemplarily, the RF, GDBT and XGBoost machine learning methods can be combined with the training data set (which can include two parts of training set and test set) to perform model training, and the R2, MAE and RMSE model evaluation results of each model can be obtained. Table 1 shows the R2, MAE and RMSE model evaluation results.
[0125] Table 1 R2, MAE and RMSE model evaluation results
[0126]
[0127] It can be seen that when the n_estimators of the XGBoost model is 100, the model effect is optimal, so the model can be selected as the candidate model for subsequent model training.
[0128] It should be noted that for different designed molecules, the machine learning method and model parameters of the optimal model corresponding thereto can be different, and the optimal model needs to be determined as the candidate model by using the above method.
[0129] In the embodiments of the present application, at least two machine learning models using different machine learning methods and / or model parameters are pre-set, and the generated training data set is used to train the machine learning models respectively, the output results of the trained machine learning models are obtained, and then the output results can be evaluated according to the model evaluation index, and the machine learning model with the optimal evaluation result is selected as the candidate model for subsequent training, which helps to improve the prediction accuracy of the trained hydrophobicity prediction model.
[0130] In some embodiments, the above step S302 can also be implemented by the following steps:
[0131] For each of the plurality of molecular structure files, the following steps are performed:
[0132] ΔG oct and ΔG w corresponding to the molecular structure file are obtained.
[0133] According to ΔG oct and ΔG w , the LogP data corresponding to the molecular structure file is calculated by formula (1):
[0134]
[0135] ΔG oct characterizes the free energy of the molecule to be tested in n-octanol, ΔG w characterizes the free energy of the molecule to be tested in water, R represents the standard molar gas constant, and T represents the Kelvin temperature.
[0136] Specifically, an automatic script can be written for the molecular structure file to perform DFT calculation of its hydrophobicity. In this part, Gaussian quantum chemistry calculation software is used, and the accuracy of the model used for DFT calculation and other parameters can also be adjusted by setting calculation parameters, so as to obtain ΔG oct and ΔG w , and then the LogP corresponding to the molecular structure file can be calculated by formula (1) by using the two parameters in combination with R and T.
[0137] In the embodiments of the present application, a specific implementation of calculating the LogP data corresponding to the molecule to be tested is provided, and the LogP data corresponding to a molecule to be tested can be obtained by formula (1) to represent the hydrophobicity of the molecule.
[0138] The following illustrates the method for testing the hydrophobicity of the molecule provided in the present application.
[0139] Figure 7is a structural schematic diagram of a system applied by a method for testing hydrophobicity of a molecule, as shown in Figure 7 The system comprises the following parts:
[0140] 1) Molecule generation module: The function of this module is to automatically generate a batch of molecule sample spaces. Users can automatically generate a large number of molecules by inputting end groups and intermediate molecular fragments. Among them, 20% of the generated molecules are randomly selected as DFT_data (DFT calculation data) for subsequent DFT calculation of hydrophobicity; the other 80% of the data are recorded as predict_data (prediction data) for subsequent machine learning of molecular properties to predict the hydrophobicity of these molecules.
[0141] 2) Hydrophobicity DFT calculation module: An automatic script is written for the above-mentioned generated molecules to perform DFT calculation of their hydrophobicity. This part uses Gaussian quantum chemical calculation software, and the calculation formula is as follows:
[0142]
[0143] Among them, ΔG oct represents the free energy of the molecule to be tested in n-octanol, ΔG w represents the free energy of the molecule to be tested in water, R represents the standard molar gas constant, and T represents the temperature in Kelvin.
[0144] 3) Machine learning module: According to the above-mentioned calculated molecular hydrophobicity data set, a machine learning modeling process is performed, Figure 8 is a seventh schematic diagram of a process of a method for testing hydrophobicity of a molecule according to an embodiment of the present application, as shown in Figure 8 The method comprises the following steps:
[0145] <1> Divide the data set: Divide the above-mentioned calculated hydrophobicity data set into 80% training set and 20% test set;
[0146] <2> Molecule feature extraction and screening: Use the RDKit molecule toolkit to extract features from the molecular structure file, a total of 209 features, which are used to describe the physical and chemical information of the molecule; perform important feature analysis on the 209 features, extract the top 15 features that contribute most to the model for subsequent model training, and the important feature value is represented as x n (n = 1, 2, 3, …, 15), Figure 9 is a schematic diagram of the relationship between features and feature importance in a method for testing hydrophobicity of a molecule according to an embodiment of the present application, as shown in Figure 9 The top 15 features that contribute most to the model are selected and shown.
[0147] <3> Data preprocessing: the feature value x extracted and screened from the molecule n Standardization processing is performed, and the formula is as follows:
[0148]
[0149] After the data x is centralized according to the mean μ and scaled according to the standard deviation σ, the data will conform to the standard normal distribution with a mean of 0 and a variance of 1. The processed data set is: input feature value x * =(x * 1,x * 2,…,x * 15 ), and the output target value is (hydrophobicity) y, that is, the LogP data obtained above.
[0150] <4> Batch model training and verification: use RF, GDBT and XGBoost three machine learning methods to train the data set to obtain the R2, MAE and RMSE model evaluation index results of each model, as shown in Table 1 above.
[0151] <5> Save the optimal model: select the model with the best effect in the instance as the model for predicting new molecules. As shown in Table 1, the XGBoost model has the best model effect when n_estimators is 100. Figure 10 is a schematic diagram of the relationship between the predicted value and the true value of the LogP data in the molecular hydrophobicity test method proposed in the embodiments of the present application, as Figure 10 shown, it can be seen that for the training set and the test set, the predicted value of the LogP data is close to the true value, which verifies the excellent effect of the optimal model.
[0152] 4) Predict new molecular property module: the predict_data generated above uses the best machine learning model saved above to predict the molecular hydrophobicity.
[0153] In the embodiments of the present application, a large amount of molecular hydrophobicity (LogP) data is obtained using quantum chemical density functional theory (DFT) high-throughput calculation to ensure the consistency of the data source. A structure-activity relationship machine learning model of molecular structure and hydrophobicity is constructed, and a variety of machine learning models are used for model training to obtain a model with the best prediction ability. Secondly, a large number of molecular sample spaces are generated using automatic scripts, and the trained machine learning model is used for property prediction to quickly obtain the hydrophobicity data of the molecule, which facilitates material research and development engineers to quickly evaluate and select suitable molecules.
[0154] The molecular hydrophobicity test method proposed in the embodiments of the present application is described above, and the related device and electronic equipment are described below.
[0155] Figure 11 is a structural schematic diagram of a molecular hydrophobicity testing device proposed by an embodiment of the present application, as shown in the figure, Figure 11 The molecular hydrophobicity testing device 1100 includes:
[0156] An acquisition module 1101 is configured to acquire a molecular structure file corresponding to a to-be-tested molecule; wherein the molecular structure file is used to represent the structure of the to-be-tested molecule.
[0157] A prediction module 1102 is configured to input the molecular structure file into a pre-trained hydrophobicity prediction model to obtain a hydrophobicity test result of the to-be-tested molecule output by the hydrophobicity prediction model; wherein the hydrophobicity prediction model is used to extract target features of the to-be-tested molecule from the molecular structure file, and predict the hydrophobicity test result corresponding to the to-be-tested molecule according to the target features, and the hydrophobicity test result is used to represent the hydrophobicity of the to-be-tested molecule.
[0158] In some embodiments, the acquisition module 1101 is specifically configured to generate the molecular structure file corresponding to the to-be-tested molecule according to pre-input N end groups and M intermediate molecular fragments; wherein N and M are both integers greater than 0.
[0159] In some embodiments, the molecular hydrophobicity testing device 1100 further includes a training module configured to:
[0160] generate a plurality of molecular structure files according to pre-input end groups and intermediate molecular fragments; wherein the plurality of molecular structure files represent the structures of a plurality of to-be-tested molecules respectively;
[0161] perform DFT calculation on the plurality of molecular structure files to obtain LogP data corresponding to the plurality of to-be-tested molecules respectively; wherein the LogP data is used to represent the hydrophobicity of the plurality of to-be-tested molecules respectively.
[0162] For each of the plurality of molecular structure files, the following steps are performed: feature extraction is performed on the molecular structure file, and X candidate features extracted are used as the target features; wherein X is an integer greater than 0.
[0163] generate a training data set according to the target features and the corresponding LogP data of the plurality of molecular structure files respectively;
[0164] train a pre-set candidate model using the training data set, and use the trained candidate model as the hydrophobicity prediction model.
[0165] In some embodiments, the training module is specifically configured to:
[0166] perform feature extraction on the molecular structure file to obtain the X extracted candidate features;
[0167] In the case where X is an integer greater than 2, the X candidate features are analyzed for important features using the candidate model to determine the contribution of the X candidate features to the candidate model, respectively;
[0168] According to the contribution degree from large to small, at least two features are selected from the X candidate features as the target features.
[0169] In some embodiments, the training module is further specifically configured to:
[0170] For each of the plurality of molecular structure files, at least two features in the target features corresponding to the molecular structure file are standardized to obtain at least two standardized features after processing;
[0171] The at least two standardized features corresponding to the plurality of molecular structure files and the corresponding LogP data are used as the training data set.
[0172] In some embodiments, the candidate model is obtained by the following steps:
[0173] At least two machine learning models are obtained by pre-setting; wherein the at least two machine learning models use different machine learning methods and / or model parameters;
[0174] The at least two machine learning models are trained respectively using the training data set to obtain the output results of the trained machine learning models;
[0175] The output results corresponding to the at least two machine learning models are evaluated by a pre-set model evaluation index, and the machine learning model with the optimal evaluation result is selected as the candidate model.
[0176] In some embodiments, the training module is further specifically configured to:
[0177] For each of the plurality of molecular structure files, the following steps are performed:
[0178] The ΔG oct and ΔG w corresponding to the molecular structure file are obtained;
[0179] According to ΔG oct and ΔG w , the LogP data corresponding to the molecular structure file is calculated using formula (1):
[0180]
[0181] wherein, AG oct characterizing the free energy of the molecule to be tested in n-octanol, AG w characterizing the free energy of the molecule to be tested in water, R characterizing the standard molar gas constant, T characterizing the temperature in Kelvin.
[0182] It should be understood that the molecular hydrophobicity testing device 1100 of the embodiments of the present application can be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), which can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The foregoing method can also be implemented by software, and the molecular hydrophobicity testing device 1100 and each module thereof can also be a software module.
[0183] The embodiments of the present application also provide a molecular hydrophobicity testing device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the foregoing molecular hydrophobicity testing method when executing the computer program.
[0184] The above-described embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, the above-described embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are wholly or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available medium sets. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid state drive (SSD).
[0185] The present application provides a computer-readable storage medium having stored thereon computer-readable program instructions (i.e., computer programs) for performing the hydrophobicity test method of the molecules in the above-described embodiments.
[0186] The computer readable storage medium provided in the application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared system, system or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiment, the computer readable storage medium can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, system or device. The program code contained on the computer readable storage medium can be transmitted by any appropriate medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), etc., or any suitable combination of the above.
[0187] The above computer readable storage medium can be included in the molecular hydrophobicity test device, or can exist separately without being assembled into the molecular hydrophobicity test device.
[0188] The above computer readable storage medium carries one or more programs, which, when executed by the molecular hydrophobicity test device, cause the molecular hydrophobicity test device to perform the following steps:
[0189] Obtaining a molecular structure file corresponding to a to-be-tested molecule; wherein the molecular structure file is used to represent the structure of the to-be-tested molecule;
[0190] Inputting the molecular structure file into a pre-trained hydrophobicity prediction model to obtain a hydrophobicity test result of the to-be-tested molecule output by the hydrophobicity prediction model; wherein the hydrophobicity prediction model is used to extract target features of the to-be-tested molecule in the molecular structure file, and predict the hydrophobicity test result corresponding to the to-be-tested molecule according to the target features, the hydrophobicity test result being used to represent the hydrophobicity of the to-be-tested molecule.
[0191] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0192] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of apparatuses, methods, and computer program products according to various embodiments disclosed in this application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or in the reverse order, depending on the functionality involved. It is also noted that each block in the block diagrams and / or flow diagrams and combinations of blocks in the block diagrams and / or flow diagrams can be implemented by special-purpose hardware-based systems that perform the specified functions or operations, or combinations of hardware and computer instructions.
[0193] The modules involved in the embodiments of the present application can be implemented in software or hardware. In some cases, the names of the modules do not constitute a limitation on the modules themselves.
[0194] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e., a computer program) for executing the above-mentioned hydrophobicity test method of the molecule, and can solve the technical problem of low efficiency of the molecule hydrophobicity evaluation and screening. Compared with the related art, the computer readable storage medium provided by the present application has the same beneficial effects as the above-mentioned hydrophobicity test method of the molecule provided by the embodiments, which will not be repeated here.
[0195] The application further provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method for testing the hydrophobicity of a molecule as described above.
[0196] The computer program product provided by the application can solve the technical problem of low efficiency of hydrophobicity evaluation and screening of molecules. Compared with the related art, the beneficial effects of the computer program product provided by the application are the same as those of the method for testing the hydrophobicity of a molecule provided in the above-described embodiments, and are not described herein.
[0197] The above-described embodiments are only used to illustrate the technical solutions of the application, rather than limit them; although the application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in the protection scope of the application.
Claims
1. A method for testing the hydrophobicity of a molecule, characterized in that: The method comprises: Obtaining a molecular structure file corresponding to the molecule to be tested; wherein the molecular structure file is used to characterize the structure of the molecule to be tested; The molecular structure file is input into a pre-trained hydrophobicity prediction model to obtain a hydrophobicity test result corresponding to the molecule to be tested output by the hydrophobicity prediction model; wherein the hydrophobicity prediction model is used to extract the target features of the molecule to be tested from the molecular structure file, and predict the hydrophobicity test result corresponding to the molecule to be tested based on the target features, and the hydrophobicity test result is used to characterize the hydrophobicity degree of the molecule to be tested.
2. The method according to claim 1, characterized in that The step of obtaining the molecular structure file corresponding to the molecule to be tested includes: Generate a molecular structure file corresponding to the molecule to be tested based on the pre-input N terminal groups and M intermediate molecular fragments; Wherein, N and M are both integers greater than 0.
3. The method according to claim 1 or 2, characterized in that Before inputting the molecular structure file into a pre-trained hydrophobicity prediction model, the method further comprises: Generate multiple molecular structure files based on pre-input terminal groups and intermediate molecular fragments; wherein the multiple molecular structure files respectively represent the structures of multiple molecules to be tested; Obtaining LogP data corresponding to each of the plurality of molecules to be tested by performing DFT calculations on the plurality of molecular structure files; wherein the LogP data is used to characterize the hydrophobicity corresponding to each of the plurality of molecules to be tested; For each of the plurality of molecular structure files, performing the following steps: performing feature extraction on the molecular structure file, and using the extracted X candidate features as the target features; wherein X is an integer greater than 0; Generate a training data set according to the target features and the corresponding LogP data corresponding to the multiple molecular structure files; The pre-set candidate model is trained using the training data set, and the trained candidate model is used as the hydrophobicity prediction model.
4. The method according to claim 3, characterized in that The step of extracting features from the molecular structure file and using the extracted X candidate features as the target features includes: Performing feature extraction on the molecular structure file to obtain the extracted X candidate features; When X is an integer greater than 2, performing an important feature analysis on the X candidate features using the candidate model to determine the contribution of each of the X candidate features to the candidate model; At least two features are selected from the X candidate features in descending order of contribution as the target features.
5. The method according to claim 3, characterized in that Generating a training data set according to the target features and the corresponding LogP data corresponding to the plurality of molecular structure files includes: For each molecular structure file in the plurality of molecular structure files, performing standardization processing on at least two of the target features corresponding to the molecular structure file to obtain at least two processed standardized features; The at least two standardized features and the corresponding LogP data corresponding to the multiple molecular structure files are used as the training data set.
6. The method according to claim 3, characterized in that The candidate model is obtained by the following steps: Obtain at least two preset machine learning models; wherein the at least two machine learning models use different machine learning methods and / or model parameters; Using the training data set to train the at least two machine learning models respectively, and obtain output results of the trained machine learning models; The output results corresponding to the at least two machine learning models are evaluated using a preset model evaluation index, and the machine learning model with the best evaluation result is selected as the candidate model.
7. The method according to claim 3, characterized in that The method of performing DFT calculation on the plurality of molecular structure files to obtain LogP data corresponding to the plurality of molecules to be tested includes: For each of the plurality of molecular structure files, perform the following steps: Get the ΔG corresponding to the molecular structure file oct and ΔG w ; According to ΔG oct and ΔG w , use formula (1) to calculate the LogP data corresponding to the molecular structure file: Among them, ΔG oct Characterizes the free energy of the test molecule in n-octanol, ΔG w R represents the standard molar gas constant, and T represents the Kelvin temperature.
8. A molecular hydrophobicity testing device, characterized in that: include: An acquisition module is used to acquire a molecular structure file corresponding to the molecule to be tested; wherein the molecular structure file is used to characterize the structure of the molecule to be tested; A prediction module is used to input the molecular structure file into a pre-trained hydrophobicity prediction model to obtain a hydrophobicity test result corresponding to the molecule to be tested output by the hydrophobicity prediction model; wherein the hydrophobicity prediction model is used to extract the target features of the molecule to be tested from the molecular structure file, and predict the hydrophobicity test result corresponding to the molecule to be tested based on the target features, and the hydrophobicity test result is used to characterize the hydrophobicity degree of the molecule to be tested.
9. A molecular hydrophobicity testing device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method for testing the hydrophobicity of a molecule according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, which, when executed on a computer, enable the computer to perform the method for testing the hydrophobicity of a molecule according to any one of claims 1 to 7 .
Citation Information
Patent Citations
Method and system for predicting hydrophilicity and hydrophobicity of nanoparticles based on face recognition
CN113140265A
Method and system for predicting emission wavelength of phosphorescent material
CN115394383A
Method for researching protection effect of antioxidant on vegetable oil with different water contents based on quantum chemistry and reaction molecular dynamics
CN119446297A
Discovery systems for identifying entities that have a target property
US20170091637A1
Risk prediction method and apparatus, and device and storage medium
WO2023065545A1