A method for generating molecular fingerprints
Patent Information
- Application Number
- CN201911172854.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-26
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2039-11-26
AI Technical Summary
[0040] (1) Existing molecular fingerprint generation methods rely on manual feature extraction by developers, which places high demands on developers, who need to have a deep understanding of domain knowledge; while the present invention solves the problem of traditional molecular fingerprints The technology requires developers to have a deep understanding of domain knowledge, and the technical threshold is high;
Smart Images

Figure CN112951337B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computer-aided molecular description, relates to a molecular fingerprint generation method, and in particular to a method for generating molecular fingerprints by digitally processing data in a molecular smiles format. Background Art
[0002] Molecular fingerprint represents chemical molecules as "bit strings" to characterize the structural or functional similarities of chemical molecules. Due to its ease of use and high efficiency in substructure and similarity searches, it has been widely used in drug discovery and virtual screening.
[0003] At present, many molecular fingerprint generation methods have been proposed, and different methods reflect different aspects of molecular information. The current molecular fingerprint generation methods mainly include: molecular fingerprint generation methods based on key substructures, molecular fingerprint generation methods based on paths, ring fingerprint generation methods, pharmacophore fingerprint generation methods, and mixed fingerprint generation methods.
[0004] The molecular fingerprint generation method based on key substructures represents chemical molecules as bit strings according to whether there are substructures in a given list, such as MACCS, Pubchem, etc. The molecular fingerprint generation method based on paths generates substructures along different paths of molecular chemical bonds according to the topological structure of the molecule, and hashes to generate molecular bit strings with variable length, which can be used for fast substructure search, such as Daylight fingerprint and Openeye tree fingerprint.
[0005] The circular fingerprint generation method uses the topological structure of the molecule and considers the information of the surrounding atoms and bonds of each atom to generate a bit string. It has been widely used in the overall structural similarity search of molecules, such as Molprint2D, ECFP, FCFP, etc.
[0006] The pharmacophore fingerprint generation method is similar to the fingerprint based on key substructures, but in addition to considering the key substructures related to the pharmacological effect, it also considers the distance factors between these substructures. The hybrid fingerprint generation method combines the above multiple molecular fingerprint information at the same time, such as UNITY2G, which considers both the key substructure and the substructure connection path information.
[0007] In addition to the above molecular fingerprint generation methods, many new methods have emerged recently. For example, LINGO is a text-based molecular fingerprint tool, the PLIF molecular fingerprint generation method mainly considers protein-ligand interaction information, including hydrogen bonds, ionic bonds, etc., and the SIFt molecular fingerprint generation method mainly considers the interaction information between molecular structures. Summary of the invention
[0008] The purpose of the present invention is to provide a molecular fingerprint generation method, which can realize an "end-to-end" molecular fingerprint generation framework without manual feature extraction, thereby solving the problem that the molecular fingerprint generation method requires developers to have a deep understanding of domain knowledge.
[0009] In order to achieve the above object, the solution of the present invention is:
[0010] A method for generating a molecular fingerprint comprises the following steps:
[0011] Step 1, establish a training set, which is the smiles representation of molecules;
[0012] Step 2: Segment each smile representation in the training set in step 1 according to groups and characters. Assuming that the training set contains N smiles, a total of 2*N data are obtained after segmentation; then use the TFIDF algorithm to train the obtained 2*N data;
[0013] Step 3, synthesize the smiles processed by the TFIDF algorithm into a vector, and then calculate the atomic position information therein;
[0014] Step 4, superimpose the molecular vector representation calculated by groups and characters in the molecule, and superimpose the position information calculated by atoms to represent the molecular smiles.
[0015] In step 1 above, 25 million real smiles data are used as the training set.
[0016] In the above step 2, the Viterbi algorithm is used to segment smiles according to groups, and the group-based smile segmentation results are as follows:
[0017] Smiles->radical_group_1,radical_group_2,radical_group_3……char_1,char_2,char_3……Smiles->radical_group_1,char_1,……radical_group_2,char_2……radical_group_3……
[0018] Among them, radical_group_i and char_i are the character groups and single characters generated after smiles is split.
[0019] In step 2 above, the method to segment smiles by characters is:
[0020] For the same smiles, TFIDF calculation is performed on an atom basis. The split smiles are demonstrated as follows:
[0021] Smiles->char_1,char_2,char_3…char_N
[0022] In step 2 above, the TF-IDF algorithm consists of two parts: the TF algorithm and the IDF algorithm:
[0023] The TF algorithm counts the frequency of a string appearing in a sequence, that is, the more times a string appears in a sequence, the stronger its ability to express the sequence:
[0024]
[0025] In the above formula, n ij Indicates the number of times a group or an atom appears in a smile, ∑ k n kj It represents the sum of the number of times all groups or atoms appear in the smiles;
[0026] The IDF algorithm counts how many sequences a string appears in. That is, if a string appears in fewer sequences, its ability to distinguish sequences is stronger:
[0027]
[0028] In the above formula, |D| represents the number of smiles after all calculations in the smile sequence set, |{j:t i ∈d j} indicates the number of sequences containing the current group or atom; After taking the logarithm, the value obtained is the IDF value of the current group or atom.
[0029] In the above step 3, the synthesis process is as follows:
[0030] (1) Determine the basis vector based on the smile vector reconstructed after character segmentation;
[0031] (2) Calculate the number of characters contained in a specific group;
[0032] (3) Repeatedly superimpose the single-row vectors of a single group according to the number of characters to form a vector matrix with the same length as the character;
[0033] The calculation formula is as follows:
[0034]
[0035]
[0036] Where pos is the position of a specific atom, i is the length of smiles, and d model is the dimension of the vector.
[0037] In step 3 above, before synthesis, the types with different lengths after segmentation are first completed:
[0038] The overall vector of the group is re-counted according to the number of atomic symbols in the group, and then the re-counted vector is added to the vector calculated on an atom basis.
[0039] After adopting the above scheme, the beneficial effects of the present invention are:
[0040] (1) Existing molecular fingerprint generation methods rely on manual feature extraction by developers, which places high demands on developers and requires them to have a deep understanding of domain knowledge. The present invention solves the problem that traditional molecular fingerprint technology requires developers to have a deep understanding of domain knowledge and has a high technical threshold.
[0041] (2) The present invention can split the molecular smiles by computer without human interference, and then automatically and continuously use TFIDF or TextRank algorithm to automatically learn the molecular fingerprint;
[0042] (3) The present invention designs the first “end-to-end” molecular fingerprint generation framework from a completely new perspective. Developers do not need to manually design features, and the model will automatically generate molecular fingerprints. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a schematic diagram of character splitting and group splitting and alignment completion;
[0044] Figure 2 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0045] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is described in detail below in conjunction with the accompanying drawings and embodiments. It should be noted that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0046] like Figure 2 As shown, the present invention provides a method for generating a molecular fingerprint, comprising the following steps:
[0047] Step 1, establish a training set, which is the smiles representation of molecules;
[0048] The size, quality and diversity of the training set directly affect the molecular fingerprints calculated and described based on the present invention. Therefore, it is crucial to collect a large number of diverse complex structures, so that the interaction characteristics of various complex structures can be more comprehensively reflected, so that the molecular fingerprints obtained by the present invention can characterize the molecules to the greatest extent and reduce the lack of description caused by the lack of specific types of molecules. In the present invention, 25 million common real smiles data are used as the training set, which fully considers the diversity of training samples.
[0049] Step 2: Segment each smile in the training set in step 1 according to groups and characters. Assuming that the training set contains N smiles, after segmenting each smile according to groups and characters, a total of 2*N data are obtained. Then, TFIDF is used to train the obtained 2*N data.
[0050] Group is a general term for atomic groups and radicals in chemistry. A stable atomic group that is a molecular component of some compounds. For example: hydrogen group; amino group; azo group; free radical group usually refers to an atomic group, which includes all the "functional groups" in the structure of organic matter, generally refers to the atomic group that makes up a molecule, including various functional groups and free radicals (or free radicals) that exist in a free state.
[0051] The groups used in the embodiments of the present invention include but are not limited to the following groups:
[0052] Hydrogen-H
[0053] methyl methyl-CH3
[0054] ethyl ethyl-C2H5
[0055] (n-)propyl n-propyl-CH2CH2CH3
[0056] isopropyl isopropyl-CH(CH3)2
[0057] isobutyl isobutyl -CH2CH(CH3)2 or -C(CH3)3
[0058] allyl Allyl-CH2-CH=CH2
[0059] 2-propynyl 2-propynyl-CH2C≡CH
[0060] Benzyl=-tolyl benzyl (benzyl)-CH2-Ph
[0061] Isopropyl=sec-propyl isopropyl-CH(CH3)2
[0062] vinyl vinyl-CH=CH2
[0063] Sec-butyl
[0064] cyclohexyl
[0065] propenyl -CH=CH-CH3
[0066] Tert-butyl tert-butyl-C(CH3)3
[0067] isopropenyl H2C=C(CH3)C-
[0068] Acetenyl=ethynyl Ethynyl-C≡CH
[0069] benzol phenyl
[0070] p-methylphenyl
[0071] m-methylphenyl
[0072] o-methylphenyl
[0073] o-nitrophenyl o-nitrophenyl
[0074] formyl COH
[0075] acetyl acetyl-COCH3
[0076] benzoyl benzoyl-COPh
[0077] carboxy carboxyl-COOH
[0078] benzyloxycarbonyl benzyloxycarbonyl
[0079] Tert-butoxycarbonyl tert-butyloxycarbonyl-COOC(CH3)3
[0080] …
[0081] …
[0082] …
[0083] …
[0084] amino amino (primary amino) - NH2
[0085] Methylamino-NHCH3
[0086] dimethylamino dimethylamino-N(CH3)2
[0087] diethylamino diethylamino-N(C2H5)2
[0088] acetamido acetylamino-NHCOCH3
[0089] benzyloxycarbonylamino benzyloxycarbonylamino-NHCOOCH2Ph
[0090] nitro nitro-NO2
[0091] hydroxy hydroxyl—OH
[0092] methoxy methoxy-OCH3
[0093] benzyloxy benzyloxy-OCH2Pd
[0094] phenoxy phenoxy-OPd
[0095] formyloxy formyloxy-OCOH
[0096] acetoxy acetoxy-OCOCH3
[0097] benzoyloxy benzoyloxy-OCOPd
[0098] fluoro fluorine-F
[0099] Thiohydroxy=mercapto=sulfhydryl thiol-SH
[0100] Methylsulfonyl=mesyl Methylsulfonyl-SO2CH3
[0101] sulfo sulfonic acid-SO3H
[0102] chloro chlorine - Cl
[0103] bromo bromine - Br
[0104] iodo iodine-I
[0105] In this embodiment, the division of smiles by groups and characters is to perform the same operation on "each" smile, that is, the 20 million smiles are split into two pieces of data, one divided by character and the other divided by group, so the total data set is doubled to 40 million.
[0106] Then let the computer use the established rules, namely the TFIDF algorithm, to calculate the 20 million smiles composed of groups and the 20 million smiles composed of characters in the data set. After the calculation, a certain character sequence can be obtained as the representation method of the corresponding groups and characters.
[0107] This calculation process is to calculate the 2000+2000=40 million data connected in series one by one, so it can be seen as a data set containing 40 million records. Of course, more learning samples can be added as the process goes deeper.
[0108] In this embodiment, the method of segmenting smiles according to groups is:
[0109] The smiles are segmented according to groups using the Viterbi algorithm, which is defined as follows:
[0110] Given an observation sequence O = {O1, O2, ..., O T} and model μ=(A,B,pi), quickly and effectively select the "optimal" state sequence Q=q1,q2,…,qt in a certain sense, so that the state sequence can best explain the observation sequence. The Viterbi algorithm is an effective method to solve this problem. The Viterbi variable δt(i) is when Hmm reaches state si along a certain path at time t, and outputs the algorithm path sequence {O'1,O'2,…,O' t} and calculate the implicit semantic sequence δ1,δ2,…δ t The maximum probability of:
[0111] δ t (i)=max((δ1,δ2,…δ t ), (O'1, O'2, …, O' t )|μ)
[0112] For smiles segmented using the Viterbi algorithm, the result format includes but is not limited to:
[0113] smiles->radical_group_1,radical_group_2,radical_group_3……char_1,char_2,char_3……
[0114] smiles->radical_group_1,char_1,…radical_group_2,char_2…radical_group_3…
[0115] Among them, radical_group_i and char_i are the character groups and single characters generated after smiles is split, respectively. Because smiles is composed of a series of different characters, it is first split by group characters, and the source of the group comes from the definition and calculation part of the rule, which cannot exhaust all character combinations. Even if all possible character combinations are exhausted, for different smiles, separate characters will still be generated. Therefore, the smile sequence after splitting exists in a mode where character groups and characters coexist. However, this situation will not occur in the following character splitting.
[0116] In this embodiment, the method for segmenting smiles according to characters is:
[0117] For the same smiles, TFIDF calculation is performed in character units. The demo split smiles are as follows:
[0118] Smiles->char_1,char_2,char_3…char_N
[0119] Relatively speaking, it is relatively simple to split smiles based on characters, that is, split them according to all existing characters in turn.
[0120] After the smiles are segmented by groups and characters, they are processed using the TFIDF algorithm. The TFIDF algorithm is a method for sequence segmentation calculation and a statistical method that is often used to evaluate the importance of a character or string in a sequence.
[0121] The TFIDF algorithm consists of two parts: the TF algorithm and the IDF algorithm:
[0122] The TF algorithm counts the frequency of a string appearing in a sequence, that is, the more times a string appears in a sequence, the stronger its ability to express the sequence:
[0123]
[0124] In the above formula, n ij Indicates the number of times a group or a character appears in a smile, ∑ k n kj Indicates the sum of the number of occurrences of all groups or characters in the smiles.
[0125] The IDF algorithm counts the probability of a string appearing in the text of a data set. If a string appears in many texts in the same data set, its IDF value will be very low. Conversely, if a string appears in fewer texts in the same data set, the corresponding IDF value will be very high.
[0126]
[0127] In the above formula, |D| represents the number of smiles after all calculations in the smile sequence set, |{j:t i ∈d j}| indicates the number of sequences containing the current group or character; After taking the logarithm, the value obtained is the IDF value of the current group or character.
[0128] Step 3, synthesize the smiles processed by the TFIDF algorithm into a vector, and then calculate the atomic position information therein;
[0129] In the present invention, since the splitting of the smiles vector is composed of two different methods, the representation of the vector needs further synthesis, and the synthesis method is as follows:
[0130] For different vectors after TFIDF calculation, since there are different forms of group splitting and character splitting, it is necessary to perform a completion operation on the types with different lengths and then superimpose them.
[0131] In this embodiment, the completion operation is as follows:
[0132] The overall vector of the group is re-counted according to the number of characters in the group, and then the re-counted vector is added to the vector calculated on a character basis.
[0133] radical_group_1->radical_group_vector_1
[0134] radical_group_1->radical_group_vector_1
[0135] …
[0136] radical_group_1->radical_group_vector_1
[0137] radical_group_1->radical_group_vector_1
[0138] It should be noted here that the present invention creatively uses the combination of groups and characters to perform interactive embedding calculations on smiles, that is, the segmented smiles contain representations of groups and single atomic characters. Due to the incomplete understanding of group segmentation and smiles, the current results show that both group representations and character representations exist in the segmented smiles sequence. The TFIDF algorithm can be used to calculate the values that different groups or atoms can represent using vectors in a specific set.
[0139] The combination method is as follows:
[0140] (1) Determine the basis vector based on the smile vector reconstructed after character segmentation;
[0141] (2) Calculate the number of characters contained in a specific group;
[0142] (3) Repeatedly superimpose the single-row vectors of a single group according to the number of characters. Figure 1 , that is, a single group vector is repeatedly copied according to the number of characters, thus forming a vector matrix equal to the length of the characters for re-superposition.
[0143] The present invention proposes the concept of atomic position information in smiles for the first time. The existing molecular descriptors often do not take into account the position of specific molecules. In fact, even if the same atom is in the same smile, its expression and characteristics are different due to different positions. A major feature of the calculation of smiles descriptors in the present invention is that the position of atoms is taken into account and the concept of position encoding is proposed.
[0144] The conceptual formula of atomic position is as follows:
[0145]
[0146]
[0147] where pos is the position of a particular atom, i is the length of smiles, and d model is the dimension of the vector. Through this calculation, it can be easily concluded that for different atoms, the position information vectors they carry are different due to their different positions.
[0148] Step 4, superimpose the molecular vector representation calculated by groups and characters in the molecule, and superimpose the position information calculated by atoms to represent the molecular smiles;
[0149] According to the present invention, the calculation formula of smiles vector is as follows:
[0150] Smiles_vec=radical_group_vector(padded)+char_vector+position_vector
[0151] radical_group_vector(padded): vector result of the repeatedly generated radical combination sequence after TFIDF calculation;
[0152] char_vector: the vector result of a single character sequence after TFIDF calculation;
[0153] position_vector: the position vector result calculated by the atomic position concept formula proposed by the present invention.
[0154] It should be noted that the present invention relates to a method for digital processing of data in the molecular smiles format, and in particular to a method for digital processing of smiles data using TFIDF or TextRank, including but not limited to these two processing methods. The improvements of the present invention are embodied in:
[0155] (1) The present invention realizes the first "end-to-end" molecular fingerprint generation framework, which does not require manual feature extraction, and solves the problem that the molecular fingerprint generation method requires developers to have a deep understanding of domain knowledge. The present invention provides a general framework for molecular fingerprint generation from a new perspective, which is an important supplement to the existing molecular fingerprint generation method and will promote the wider application of molecular fingerprints in drug screening.
[0156] (2) The purpose of the present invention is to provide a new molecular descriptor calculation scheme, which is completely based on the characteristics and relationships of the molecular descriptors themselves and the structural position of the molecular descriptors in the overall molecule. This method is the first to propose the influence of the positions of atoms and different groups in the molecule on the overall molecular properties. It is a molecular descriptor calculated based on an overall interaction.
[0157] (3) This method overcomes the problem that existing molecular descriptors lack consideration of the overall molecule, are overly dependent on the existence of a single group, and lack consideration of the positions of the overall groups in the molecule. That is, the same group may have different positions between different molecules, which may also lead to changes in properties and thus change different molecular properties.
[0158] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the principles and spirit of the present invention are included in the protection scope of the present invention.
Claims
1. A method for generating a molecular fingerprint, characterized in that The steps include: Step 1, establish a training set, which is the smiles representation of molecules; Step 2: Segment each smile representation in the training set in step 1 according to groups and characters. Assuming that the training set contains N smiles, a total of 2*N data are obtained after segmentation; then use the TFIDF algorithm to train the obtained 2*N data; Step 3, synthesize the smiles processed by the TFIDF algorithm into a vector, and then calculate the atomic position information therein; Step 4, superimpose the molecular vector representation calculated by groups and characters in the molecule, and superimpose the position information calculated by atoms to represent the molecular smiles.
2. A molecular fingerprint generation method as claimed in claim 1, characterized in that: In step 1, 25 million pieces of real smiles data are used as a training set.
3. A molecular fingerprint generation method as claimed in claim 1, characterized in that: In step 2, the Viterbi algorithm is used to segment smiles according to groups, and the group-based smile segmentation result is as follows: Smi les->radical_group_1,radical_group_2,radical_group_3……char_1,char_2,char_3…… Smiles->radical_group_1,char_1,…radical_group_2,char_2…radical_group_3… Among them, radical_group_i and char_i are the character groups and single characters generated after smiles is split.
4. A method for generating a molecular fingerprint according to claim 1, characterized in that: In step 2, the method for segmenting smiles according to characters is: For the same smiles, TFIDF calculation is performed on an atom basis. The split smiles are demonstrated as follows: Smiles->char_1,char_2,char_3…char_N.
5. A molecular fingerprint generation method as claimed in claim 1, characterized in that: In step 2, the TF-IDF algorithm consists of two parts: the TF algorithm and the IDF algorithm. composition: The TF algorithm counts the frequency of a string appearing in a sequence, that is, the more times a string appears in a sequence, the stronger its ability to express the sequence: In the above formula, n ij Indicates the number of times a group or an atom appears in a smile, Σ k n kj It represents the sum of the number of times all groups or atoms appear in the smiles; The IDF algorithm counts how many sequences a string appears in. That is, if a string appears in fewer sequences, its ability to distinguish sequences is stronger: In the above formula, |D| represents the number of smiles after all calculations in the smile sequence set, |{j:t i ∈d j }| indicates the number of sequences containing the current group or atom; After taking the logarithm, the value obtained is the IDF value of the current group or atom.
6. A method for generating a molecular fingerprint according to claim 1, characterized in that: In the step 3, the synthesis process is as follows: (1) Determine the basis vector based on the smile vector reconstructed after character segmentation; (2) Calculate the number of characters contained in a specific group; (3) Repeatedly superimpose the single-row vectors of a single group according to the number of characters to form a vector matrix with the same length as the character; The calculation formula is as follows: Where pos is the position of a specific atom, i is the length of smiles, and d model is the dimension of the vector.
7. A method for generating a molecular fingerprint according to claim 1, characterized in that: In step 3, before synthesis, the types with different lengths after segmentation are firstly completed: The overall vector of the group is re-counted according to the number of atomic symbols in the group, and then the re-counted vector is added to the vector calculated on an atom basis.
