An optimization method for high-throughput screening of molecular similarity recognition of compounds
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 南京金宁汇科技有限公司
- Filing Date
- 2025-10-29
- Publication Date
- 2026-08-07
AI Technical Summary
[0006]本发明所要解决的问题是:提供一种高通量筛选化合物分子相似度识别的优化方法,可以按需调整一阶段的目标范围,平稳控制相似度比对的计算量,较好地解决现有技术中响应时长随目标数据量线性增长的问题
[0023]1、本发明优化方法以空间换时间:Morgan指纹2048位,存成二进制占用256字节,将指纹预存在数据库中,在对比相似度时可直接读取,节省Morgan指纹计算时间。
Smart Images

Figure CN121687283B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer-aided molecular design technology, and in particular to an optimized method for high-throughput screening of compound molecular similarity recognition. Background Technology
[0002] In modern drug development and new material development, molecular structure similarity-based screening technology is one of the core technologies. Its core principle is that compounds with similar structural features often possess similar chemical properties, biological activities, or functional characteristics. Therefore, by identifying molecules with structures similar to a given seed molecule (i.e., the target reference molecule), the candidate pool can be rapidly narrowed, significantly improving research and development efficiency.
[0003] Currently, a common method for identifying molecules with similar structural features to a given molecule through rapid screening is to first calculate a molecular fingerprint (e.g., Morgan fingerprint, 2048 bits) to convert the molecule's structural features (such as atom type, chemical bonds, functional groups, topology, etc.) into a fixed-length binary vector, where each bit is 0 or 1 to represent the absence or presence of a specific structural feature; then, a similarity score (e.g., Tanimoto similarity) is calculated for screening, using a specific algorithm to calculate the similarity value between the target molecule and each molecule in the molecular library, and filtering out similar molecules that meet the criteria based on a preset threshold.
[0004] The aforementioned traditional methods can typically achieve a response time of 3-5 seconds when processing small-scale molecular libraries (such as those with tens of thousands or hundreds of thousands of molecular fingerprint entries), which meets the needs of routine R&D scenarios. However, with the rapid development of high-throughput experimental technologies (such as high-throughput synthesis and high-throughput screening), the size of compound molecular libraries is growing exponentially. Currently, the molecular libraries encountered in practical applications have generally reached the millions, and in some fields (such as the compound reserves of large pharmaceutical companies and public molecular databases), they have even exceeded the tens of millions or even hundreds of millions. When facing such large-scale molecular libraries, the performance defects of traditional methods are significantly amplified. Traditional methods perform equivalence scanning on all molecular fingerprints, and a large number of molecular fingerprints that do not meet the criteria are also included in the similarity calculation, resulting in a waste of computational resources and an increase in time costs.
[0005] Therefore, there is an urgent need for an optimization method that can significantly reduce computational load and shorten response time while ensuring recognition accuracy, and can be flexibly adapted to molecular libraries of different sizes. Summary of the Invention
[0006] The problem to be solved by this invention is to provide an optimized method for high-throughput screening of compound molecular similarity identification, which can adjust the target range of a stage as needed, smoothly control the computational load of similarity comparison, and better solve the problem that the response time increases linearly with the amount of target data in the prior art.
[0007] This invention adopts the following technical solution: an optimized method for high-throughput screening of compound molecule similarity recognition, comprising the following two stages:
[0008] The first phase, fingerprint pre-computation and index creation, includes: Step 1.1, Pre-calculation: Calculate the Morgan fingerprint of the target molecule based on the SMILES encoding of the target molecule, and at the same time calculate the Popcount of the target molecule in the Morgan fingerprint; Step 1.2, Data Storage: Build the target database. Select any relational database and create the morgan_fingerprints table to store the pre-calculated results. The table contains the columns: molregno, fingerprint, popcount, and smiles. Step 1.3, Index Creation: Create a single index on the popcount column to speed up record filtering;
[0009] The second phase, accelerated molecular screening, includes: Step 2.1: Input the SMILES code of the query molecule and calculate the Morgan fingerprint and Popcount of the query molecule; Step 2.2: Filter targets from the target database by the Popcount of the queried molecule and return the result set fingerprint; Step 2.3: Calculate the Tanimoto similarity between the result set fingerprint and the query molecular fingerprint; Step 2.4: Sort the calculation results in descending order of similarity, and take the top N results as the similarity recognition results.
[0010] Preferably, in the pre-calculation, Morgan's fingerprint is 2048 bits and is stored in binary format, occupying 256 bytes.
[0011] Preferably, in step 1.1, the Popcount of the target molecule is calculated, and the number of bits set to 1 in the Morgan fingerprint is quickly calculated using the GetNumOnBits method.
[0012] Preferably, in the morgan_fingerprints table, the molregno field stores the unique identifier ID of the molecule, the fingerprint field stores the binary string BLOB object of the morgan fingerprint, the popcount field stores the number of bits with a value of 1 in the 2048-bit morgan fingerprint, and the smiles field stores the standard SMILES code of the molecule.
[0013] Preferably, in step 1.3, a single index is created on the popcount column, and the popcount column is stored as INTEGER to represent the number of digits set to 1. The SQL query condition is a comparison of the single index of INTEGER, which achieves fast filtering by setting the number of digits to 1.
[0014] Preferably, in step 2.2, the filtering targets satisfy the following conditions: query data from the morgan_fingerprints table and filter out those that simultaneously meet the conditions. and Data based on conditions, excluding data where the Popcount of the target molecule and the query molecule are significantly different, where b min b max The maximum and minimum values of the conditional filtering parameters are used to narrow down the range of pre-selected targets; the query returned fields include: molregno, fingerprint, and smiles.
[0015] Preferably, Values or b is a preset filtering parameter, which can be adjusted as needed.
[0016] Preferably, in step 2.3, when calculating the Tanimoto similarity, molecules with a similarity greater than or equal to a preset similarity ratio are first filtered out, and then the first N results are extracted.
[0017] Preferably, the preset similarity ratio is 0.7.
[0018] Preferably, the optimized method for high-throughput screening of compound molecule similarity identification of the present invention further includes data caching, multi-threaded processing, and batch calculation of BulkTanimotoSimilarity based on C language, and the specific implementation means are as follows:
[0019] Data caching: The data filtered by Popcount is cached in a temporary file, and a memory mapping (mmap) mechanism is enabled to facilitate file block searching.
[0020] Multi-threaded processing: First, the data to be processed is evenly divided into buckets. Then, multi-threading is enabled, with the number of threads equal to the number of buckets. Each thread processes the data in one bucket. Finally, the results of multi-threaded filtering are merged.
[0021] BulkTanimotoSimilarity Batch Calculation: This is a built-in C language function of the TanimotoSimilarity calculation program, used to batch pass the molecular SMILES codes to be calculated to the BulkTanimotoSimilarity calculation function to complete memory calculation optimization.
[0022] Compared with the prior art, the present invention, employing the above technical solution, has the following technical effects:
[0023] 1. The optimization method of this invention trades space for time: Morgan's fingerprint is 2048 bits, which occupies 256 bytes when stored in binary. The fingerprint is pre-stored in the database and can be directly read when comparing similarity, saving the calculation time of Morgan's fingerprint.
[0024] 2. The optimization method of this invention achieves fast screening by setting 1 bits: The number of 1 bits in the Morgan fingerprint is quickly calculated using the GetNumOnBits method (Popcount). When screening, if the Popcount of the target molecule is significantly different from that of the query molecule (the number of 1 bits differs too much), the molecular structure is definitely significantly dissimilar. Using this principle, the target range can be quickly determined.
[0025] 3. This invention significantly improves query efficiency through standard indexes: the Popcount column is stored as INTEGER (with 1 digit for the number of items), and the SQL query conditions are essentially a single index comparison of INTEGER. This has extremely high execution efficiency in relational databases and high effectiveness of similarity calculations. By eliminating unnecessary screening calculations, limited resources can be used on the filtered effective target range.
[0026] 4. The method mechanism of this invention supports further optimization, including data caching, multi-threaded processing, and batch calculation of BulkTanimotoSimilarity based on C language. Attached Figure Description
[0027] Figure 1 This is a flowchart of the optimized method for high-throughput screening of compound molecular similarity recognition according to the present invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the application will be further described in detail below with reference to the accompanying drawings. The described embodiments are only a part of the embodiments involved in this invention. All non-innovative embodiments based on these embodiments by other researchers in the art are within the protection scope of this invention. Furthermore, the step numbers in the embodiments of this invention are only set for ease of explanation and do not limit the order of the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0029] In one embodiment of the present invention, an optimized method for high-throughput screening of compound molecule similarity identification is provided, such as... Figure 1 As shown, it includes two stages: fingerprint pre-computation and index creation, and molecular screening acceleration.
[0030] Specifically, the first stage, fingerprint pre-computation and index creation, includes the following sub-steps:
[0031] 1. Pre-calculation (one-time): Calculate the Morgan fingerprint of the target molecule based on the SMILES code of the target molecule, and at the same time calculate the Popcount of the fingerprint (i.e., set to 1 bit).
[0032] Morgan's fingerprint is 2048 bits, which occupies 256 bytes when stored in binary. The fingerprint is pre-stored in the database and can be directly read when comparing similarity, saving Morgan's fingerprint calculation time.
[0033] 2. Data storage: Select any relational database, create a table named morgan_fingerprints containing the columns: molregno, fingerprint, popcount, and smiles, and store the pre-calculated results in the table.
[0034] The fingerprint field stores a binary string BLOB object of the fingerprint, the molregno field stores the unique identifier ID of the molecule, the popcount field stores the number of bits with a value of 1 in the Morgan fingerprint (2048 bits), and the smiles field stores the standard SMILES code of the molecule.
[0035] 3. Index creation: Create a single index on the popcount column in the morgan_fingerprints table to speed up record filtering.
[0036] In this embodiment, the popcount column is stored as INTEGER (with a 1-digit count). The SQL query condition is essentially a single index comparison of INTEGER, which can significantly improve query efficiency.
[0037] Specifically, the second phase, accelerated molecular screening, includes the following sub-steps:
[0038] 1. Input the SMILES of the queried molecule: Calculate the Morgan fingerprint and Popcount of the queried molecule.
[0039] 2. Filter targets from the database by the Popcount of the queried molecule:
[0040] Retrieve data from the morgan_fingerprints table, where Popcount >= b min And Popcount <= b maxConditions. This filtering condition will remove data where the Popcount of the target molecule and the query molecule are significantly different (exceeding the threshold range). In other words, if the Popcount values of two molecules differ greatly, the similarity between the two molecules will also be low.
[0041] Where b min b max The maximum and minimum values of the conditional filtering parameters are used to narrow down the range of pre-selected targets; the query returns fields including molregno, fingerprint, and smiles, which are used for further similarity calculation.
[0042] It is particularly important to note the parameters of the Popcount conditional filter. Adjustments can be made as needed, for example: In essence, it narrows down the range of potential targets.
[0043] Then, data caching is performed. The data filtered by Popcount is cached in a temporary file, and a memory mapping (mmap) mechanism is enabled to facilitate file block searching.
[0044] Specifically, this embodiment employs multi-threaded processing. First, the data to be processed is evenly divided into buckets. Then, multi-threading is enabled, with the number of threads equal to the number of buckets. Each thread processes the data from one bucket, and finally, the filtering results from the multi-threading are merged.
[0045] 3. Calculate the Tanimoto similarity between the returned result set fingerprint and the query fingerprint.
[0046] When comparing Tanimoto similarity, based on the given preset similarity ratio (0.7 by default in this embodiment), the final filtering results will first filter out molecules with similarity >= 0.7, and then extract the top N results.
[0047] In this embodiment, the number of 1 bits (Popcount) in the Morgan fingerprint is quickly calculated using the GetNumOnBits method. During the screening process, if the Popcount of the target molecule is significantly different from that of the query molecule (the number of 1 bits differs greatly), then the molecular structures are definitely significantly dissimilar. Using this principle, the target range can be quickly determined.
[0048] 4. Sort the calculation results in descending order of similarity and take the top N results.
[0049] In this embodiment, the SMILES code of the queried molecule is: The Popcount for this fingerprint is 18.
[0050] Specifically, this embodiment uses BulkTanimotoSimilarity batch calculation, which is a C language function that comes with the TanimotoSimilarity calculation program. Specifically, the molecular SMILES codes to be calculated are passed in batches to the BulkTanimotoSimilarity calculation function to complete memory calculation optimization.
[0051] In this embodiment, through the first-stage fingerprint pre-calculation and index creation, the target database contains 2,474,574 data items. During the screening process, the target range of 47,729 items is quickly determined. After sorting by similarity in descending order, the top 10 items are taken as the similarity identification results of this invention. These results can be used for the study of similar molecular structures and properties, providing strong support for the design and optimization of new molecules.
[0052] As can be seen, the optimized method for high-throughput screening of compound molecular similarity identification of the present invention has stable screening efficiency, the computational load does not increase significantly with the increase of the target screening data, and the similarity calculation is highly effective. By eliminating unnecessary screening calculations, limited resources can be used on the filtered effective target range.
[0053] In this embodiment of the invention, an electronic device is also provided, comprising: one or more processors; a storage device storing one or more programs thereon; when the one or more programs are executed by the one or more processors, the one or more processors implement the optimized method for high-throughput screening of compound molecule similarity identification described in any of the above embodiments.
[0054] In this embodiment of the invention, a computer-readable storage medium is also provided, on which a computer program is stored. When the program is executed by a processor, it implements the steps in any of the optimized methods for high-throughput screening of compound molecule similarity identification in the above embodiments.
[0055] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. An optimized method for high-throughput screening of compound molecular similarity identification, characterized in that, It includes the following two stages: The first phase, fingerprint pre-computation and index creation, includes: Step 1.1, Pre-calculation: Calculate the Morgan fingerprint of the target molecule based on the SMILES encoding of the target molecule, and at the same time calculate the Popcount of the target molecule in the Morgan fingerprint; Step 1.2, Data Storage: Build the target database. Select any relational database and create the morgan_fingerprints table to store the pre-calculated results. The table contains the columns: molregno, fingerprint, popcount, and smiles. In the morgan_fingerprints table, the molregno field stores the unique identifier ID of the molecule, the fingerprint field stores the binary string BLOB object of the Morgan fingerprint, the popcount field stores the number of bits with a value of 1 in the 2048-bit Morgan fingerprint, and the smiles field stores the standard SMILES code of the molecule. Step 1.3, Index Creation: Create a single index on the popcount column to speed up record filtering; The second phase, accelerated molecular screening, includes: Step 2.1: Input the SMILES code of the query molecule and calculate the Morgan fingerprint and Popcount of the query molecule; Step 2.2: Filter targets from the target database by the Popcount of the queried molecule and return the result set fingerprint; Step 2.3: Calculate the Tanimoto similarity between the result set fingerprint and the query molecular fingerprint; Step 2.4: Sort the calculation results in descending order of similarity, and take the top N results as the similarity recognition results.
2. The optimized method for high-throughput screening of compound molecule similarity identification according to claim 1, characterized in that, In the pre-calculation, Morgan's fingerprint is 2048 bits and is stored in binary format, occupying 256 bytes.
3. The optimized method for high-throughput screening of compound molecule similarity identification according to claim 1, characterized in that, In step 1.1, the Popcount of the target molecule is calculated, and the number of bits set to 1 in the Morgan fingerprint is quickly calculated using the GetNumOnBits method.
4. The optimized method for high-throughput screening of compound molecule similarity identification according to claim 1, characterized in that, In step 1.3, a single index is created on the popcount column, and the popcount column is stored as INTEGER to represent the number of digits set to 1. The SQL query condition is a comparison of the single index of INTEGER, which achieves fast filtering by setting the number of digits to 1.
5. The optimized method for high-throughput screening of compound molecule similarity identification according to claim 1, characterized in that, In step 2.2, the selected targets must meet the following conditions: Query data from the morgan_fingerprints table and filter for those that simultaneously meet the criteria. and Data based on conditions, excluding data where the Popcount of the target molecule and the query molecule are significantly different, where b min b max The maximum and minimum values of the conditional filtering parameters are used to narrow down the range of pre-selected targets; The query returned the following fields: molregno, fingerprint, and smiles.
6. The optimized method for high-throughput screening of compound molecule similarity identification according to claim 5, characterized in that, Values or b is a preset filtering parameter, which can be adjusted as needed.
7. The optimized method for high-throughput screening of compound molecule similarity identification according to claim 5, characterized in that, In step 2.3, when calculating the Tanimoto similarity, molecules with a similarity greater than or equal to a preset similarity ratio are first filtered out, and then the first N results are extracted.
8. The optimized method for high-throughput screening of compound molecule similarity identification according to claim 7, characterized in that, The preset similarity ratio is 0.
7.
9. The optimized method for high-throughput screening of compound molecule similarity identification according to claim 1, characterized in that, It also includes data caching, multi-threaded processing, and batch calculation of BulkTanimotoSimilarity based on the C language, with the specific implementation methods as follows: The data caching method caches the data filtered by Popcount in a temporary file and enables a memory mapping mechanism for file block searching. The multi-threaded processing first divides the data to be processed into evenly distributed buckets, then enables multi-threading with the number of threads equal to the number of buckets. Each thread processes the data of one bucket, and finally the filtering results of the multi-threaded processing are merged. The BulkTanimotoSimilarity batch calculation is a C language function built into the TanimotoSimilarity calculation program. It is used to pass the molecular SMILES codes to be calculated in batches to the BulkTanimotoSimilarity calculation function to complete memory calculation optimization.
Citation Information
Patent Citations
Method for creating molecular structure databases and method for searching same
CN104750761A
Estimation model generation method / generation device for estimating reaction conditions, reaction condition provision method / provision device, and program
CN119317966A