A multi-threaded collaborative GPU acceleration method for drug virtual screening

By implementing multi-threaded collaborative Monte Carlo iterative optimization algorithm and heterogeneous parallel structure on the GPU, the problem of long calculation time in the blind docking process is solved, the efficiency of virtual drug screening is significantly improved, and the screening needs of large compound databases are met. .

CN114860441BActive Publication Date: 2024-10-29NANJING UNIV OF POSTS & TELECOMM
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210479528.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-05
Publication Date
2024-10-29
Estimated Expiration
2042-05-05

AI Technical Summary

Technical Problem

Existing molecular docking software cannot meet the demand for a large search space in the blind docking process, especially when the target area is unknown, resulting in long calculation times and low efficiency, and cannot effectively accelerate virtual drug screening.

Method used

It adopts a multi-threaded collaborative Monte Carlo iterative optimization algorithm and takes advantage of the high parallel computing capabilities of the GPU to realize the heterogeneous parallel structure of the CPU and GPU through OpenCL, increase the number of initial random structures, reduce the number of iterative search steps, and use the global The memory structure solves the recursion and dynamic memory allocation problems of octree and realizes large-scale parallel computing.

Benefits of technology

It significantly speeds up molecular docking and virtual screening, reduces the cost and time of drug development, meets the screening needs of large compound databases, and improves drug discovery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860441B_ABST
    Figure CN114860441B_ABST
Patent Text Reader

Abstract

The present invention relates to a multi-threaded collaborative GPU acceleration method and implementation for drug virtual screening. The method reduces the number of search steps in the Monte Carlo iterative local search method by increasing the number of initial random ligand conformations. OpenCL is used to implement a CPU and GPU heterogeneous parallel structure to achieve a higher level of parallel and acceleration capabilities. The method also solves the problem that the octree cannot be implemented in OpenCL by constructing the structure of the global memory in the GPU. Modern drug screening needs to face a large amount of compound data. In the actual molecular docking process, it is possible that the target area is not known in advance before docking. At this time, the ligand is docked to the entire surface of the protein target to find the best binding mode of the ligand and the receptor. This process is called blind docking, and commonly used docking software is difficult to meet the requirements of blind docking. By adopting the method of the present invention, the speed of molecular docking and virtual screening can be greatly accelerated while ensuring that the docking accuracy is not lost in the case of blind docking, so as to meet the actual needs of molecular docking of large compound databases.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of hardware accelerated drug design, and in particular relates to a multi-threaded collaborative GPU acceleration method for drug virtual screening. Background Art

[0002] Virtual screening (VS) refers to the process of drug development, before screening for biological activity values, to simulate pre-screening of compound molecules on a computer according to preset conditions, to find small molecules that are most likely to bind to drug targets, thereby reducing the number of compounds tested in experiments and improving the efficiency of lead compound discovery. In this process, when the three-dimensional structure of the target is known, the molecular docking method is used to dock the molecules (ligands) in the compound database to the binding pocket (target area) of the protein target (receptor), and then the score of the scoring function is comprehensively analyzed based on the geometric shape and chemical property matching degree between the ligand and the receptor target area.

[0003] From the above analysis, it can be seen that molecular docking is an important process in the early stage of drug development. It uses molecular docking software to perform molecular docking operations on molecular compounds and drug targets, and then screen active compounds. In actual work, molecular docking needs to select active compounds with potential drug development from tens to millions of molecules, thereby greatly reducing the number of actual screening compounds, shortening the research cycle, and reducing the cost of drug development. Therefore, the acceleration of molecular docking software is crucial and directly determines the efficiency and cost of drug development.

[0004] In the actual molecular docking process, it is possible that the target area is not known in advance before docking. In this case, the ligand needs to be docked to the entire surface of the protein target to find the best binding mode between the ligand and the receptor. This process is called blind docking. It is difficult for commonly used docking software to meet the requirements of blind docking. This is because the optimization algorithm for searching the best binding mode of the receptor and the ligand at a specific position is too complicated, and it is difficult to sample the entire protein target surface sufficiently to find all important binding modes. Therefore, how to use multi-threading to solve the problem of molecular docking in a large search space has become the key to docking software to solve the blind docking problem.

[0005] QuickVina-W is a new docking tool improved on the basis of AutoDock Vina. The tool adopts a multi-threaded collaborative Monte Carlo iterative optimization algorithm, which is suitable for blind docking. There is no need to run the docking tool multiple times or split the docking box and then merge the search results. It uses inter-thread communication to improve the accuracy and speed of the decision-making process, allowing researchers to virtually screen huge ligand libraries with high precision without having to determine the target pocket in advance. However, when facing large-scale ligand blind docking, the running time and efficiency of QuickVina-W are difficult to meet actual needs. Therefore, the present invention proposes to use the advantages of high parallel computing of GPU (Graphics Processing Unit) to optimize the multi-threaded collaborative Monte Carlo iterative algorithm on GPU to achieve fast blind docking to meet the requirements of actual drug development.

[0006] GPU (Graphics Processing Unit) is a parallel programmable processor with thousands of computing cores that can provide powerful computing performance. GPU is cost-effective and easy to develop, and has perfect development standards, such as the parallel computing architecture (CUDA) and the open computing language (OpenCL). Currently, there are two major difficulties in accelerating QuickVina-W on GPU. First, the QuickVina-W algorithm is a Monte Carlo iterative optimization search algorithm based on multi-threaded collaboration, which has a strong dependency on iteration and is difficult to parallelize. Second, the octree structure used in the multi-threaded Monte Carlo algorithm to find the nearest neighbor conformation in space uses a recursive and dynamic space allocation method, which cannot be implemented in GPU.

[0007] A method based on GPU acceleration of AutoDock Vina was found. The parallel scale of docking threads in the Monte Carlo iterative local search method was expanded by increasing the number of initial random ligand conformations, and the number of search steps in the Monte Carlo iterative local search method was reduced. The CPU and GPU heterogeneous parallel structure in AutoDock Vina was implemented using OpenCL to achieve a higher level of parallelism and acceleration capabilities. Modern drug screening needs to face a huge amount of compound data. In the actual molecular docking process, it is possible that the target area is not known in advance before docking. At this time, the ligand must be docked to the entire surface of the protein target to find the best binding mode of the ligand and receptor. This process is called blind docking. Commonly used docking software is difficult to meet the requirements of blind docking. The current molecular docking technology cannot meet the actual needs. Summary of the invention

[0008] The purpose of the present invention is to propose a multi-threaded collaborative GPU acceleration method for drug virtual screening in view of the defects of the prior art, which can achieve large-scale parallelism on the QuickVina-W algorithm, improve the molecular docking speed of large search spaces, reduce the cost of virtual screening of large databases, and can be widely used in large-scale drug virtual screening on personal computers, servers or cloud computing, especially in the case of blind docking.

[0009] In order to achieve the above objectives, the present invention provides a multi-threaded collaborative GPU acceleration method for drug virtual screening, comprising the following steps:

[0010] Step 1: The host performs tasks including data preparation and OpenCL configuration;

[0011] Step 2: Run on the device side - On the device side, each thread executes the multi-threaded collaborative Monte Carlo iterative optimization algorithm to output the optimal molecular conformation of each thread; the specific steps of running on the device side are as follows:

[0012] Step 2.1: Assign the random molecular conformations generated by the host to each thread of the device. Each conformation corresponds to one thread, and the total number of threads is set in the config.txt file.

[0013] Step 2.2: Set the search_depth of each thread to 5.

[0014] Step 2.3: Use a multi-threaded collaborative Monte Carlo iterative local algorithm to optimize the molecular conformation; the specific operations are as follows:

[0015] Step 2.3.1: Randomly perturb the molecular conformation;

[0016] Step 2.3.2: Perform G Check and I Check on the disturbed molecular conformation; specifically:

[0017] G Check: Calculate the spatial distance between the perturbed molecular conformation and the conformation in the global memory. The global memory stores the final conformation after all threads perform two quasi-Newton algorithm BFGS (Broyden-Fletcher-Goldfarb-Shanno) optimizations. Then, screen out the conformations whose spatial distance is less than the cutoff radius R. Calculate the N-dimensional Euclidean distance between the conformation to be tested and the conformation within the cutoff radius R, and sort them from near to far according to the Euclidean distance. Find the first N nearest neighbor conformations. If one of the N neighbor conformations meets the heuristic condition, proceed to step 2.3.3, otherwise proceed to I Check.

[0018] I Check: Search the molecular conformations in the local cache of this thread. The local cache stores all conformations obtained during the BFGS optimization process of this thread. Calculate the N-dimensional Euclidean distance between the perturbed molecular conformation and the conformation in the local cache, sort them from near to far according to the N-dimensional Euclidean distance, and find the first 3N nearest neighbor point conformations. If one of the 3N neighbor point conformations meets the heuristic condition, proceed to step 2.3.3; if not, exit the search and start again from step 2.3.1;

[0019] The method for finding the nearest neighbor conformation in G Check is to store the final conformation of each BFGS optimization in the octree structure. The application of the octree in the multi-threaded cooperative Monte Carlo algorithm is to find the neighboring point conformation around it faster. The octree structure is implemented recursively, and OpenCL does not support any recursive method. In addition, the memory space of the octree is dynamically allocated, but the memory size must be fixed in the GPU first, so the octree structure cannot be implemented on the GPU;

[0020] Step 2.3.3: Use the BFGS method to optimize the conformation, and store all the conformations obtained during the BFGS optimization process in a local cache;

[0021] Step 2.3.4: Compare the energy of the conformations before and after perturbation to determine whether to accept the optimized conformation; if the optimized conformation is accepted, proceed to steps 2.3.2 and 2.3.3, and store the final conformation obtained by BFGS optimization in the global memory; if the optimized conformation is not accepted, proceed to step 2.3.5;

[0022] Step 2.3.5: Determine whether the number of search steps reaches the set value. If the number of search steps does not reach the set value, proceed to step 2.3.1. If the number of search steps reaches the set value, output the best molecular conformation in the thread.

[0023] Step 3: The results of the device operation are sent back to the host, and the conformations are sorted according to their scores. The BFGS method is used to optimize the conformations more finely, and the top-ranked conformations are output.

[0024] The present invention utilizes the high parallel computing advantage of GPU, and reduces the number of search steps in the iterative local search method of Monte Carlo with multi-threaded collaboration by increasing the number of initial random conformations, thereby achieving acceleration. The heterogeneous parallel structure of CPU and GPU is realized by using the open computing language OpenCL, so as to achieve a higher level of parallel and acceleration capabilities. The heterogeneous parallel structure consists of a host side and a device side, which run in the CPU and GPU respectively; the host side runs first, and the data generated by its operation is transmitted to the device side, and then the final conformation of each thread is obtained after the device side runs, and these conformations are transmitted back to the host side for screening, and the final result is output. The method of the present invention also solves the problem that the octree cannot be realized in OpenCL by constructing the structure of the global memory Global Memory in the GPU. By adopting the method of the present invention, the speed of molecular docking and virtual screening can be greatly accelerated while ensuring that the docking accuracy is not lost in the case of blind docking, so as to meet the actual needs of molecular docking of large compound databases.

[0025] The present invention further adopts the following technical solution:

[0026] In step 1, the stage before the host runs on the device includes the following specific steps:

[0027] Step 1.1: Read the file. The host terminal reads the .pdbqt file of the ligand molecule and the receptor molecule, as well as the config.txt file of the docking parameters;

[0028] Step 1.2: Configure the OpenCL environment, including identifying and selecting the platform and device, creating an OpenCL context, creating a command queue, creating a memory object, creating a program object, creating a kernel object, and setting kernel parameters;

[0029] Step 1.3: Generate a grid cache for calculating the intermolecular energy between the molecular conformation and the receptor by trilinear interpolation;

[0030] Step 1.4: Generate an intramolecular energy table for calculating the intramolecular energy of the conformation;

[0031] Step 1.5: Generate a random number table to generate random values;

[0032] Step 1.6: Generate a random molecular conformation, which is used as the initial conformation of the multi-threaded Monte Carlo algorithm on the device side;

[0033] Step 1.7: The data generated in the previous steps is transmitted to the device.

[0034] In step 2.3.1, one of the position, orientation, and torsion of the molecular conformation is randomly perturbed, which is expressed as:

[0035] The three-dimensional coordinate position of the molecular conformation in the search space is perturbed based on uniformly distributed random numbers;

[0036] The quaternion of the molecular conformation orientation is perturbed based on the random number generated by normal distribution;

[0037] Replace a specific dimension value of the torsion angle of the rotatable bond in the molecular conformation with a random number that conforms to a uniform distribution.

[0038] In step 2.3.2, the structure of the global memory in the GPU is constructed, wherein the global memory is accessible to each thread, and the specific operations are as follows:

[0039] First, allocate a certain amount of memory to the GPU based on the number of threads and the number of search steps;

[0040] Then, a binary code is determined for each conformation according to the three-dimensional position information of the molecular conformation, indicating the three-dimensional spatial position stored therein;

[0041] Finally, the binary code is stored in the corresponding global memory. In this way, the molecular conformation in the global memory corresponding to the binary code is the molecular conformation of the nearest neighbor.

[0042] In QuickVina-W, there are multiple recursions in the function of inserting molecular conformations into the octree, and the memory space of the octree is dynamically allocated. These are difficult to implement in OpenCL, because the OpenCL standard does not support any recursion in the kernel. Before running the kernel function, the GPU has allocated register resources (this is a static allocation of resources). The kernel program in OpenCL can only statically open up space. If the space is dynamically allocated in the kernel program of OpenCL, an error will be reported. In the step 2.3.2 of the present invention, the octree is used to find the neighboring points around it faster, and the structure of the global memory in the GPU is constructed to achieve rapid finding of the nearest neighbor. The specific implementation steps are as follows:

[0043] Step 2.3.2.1: Allocate fixed memory and determine the number of encoding bits

[0044] First, according to the number of threads and the number of search steps search_depth, (thread*search_depth)<2 n Allocate 2 to global memory n *sizeof(data type) memory size; the number of bits of encoding is based on (thread*search_depth)<2 n , to determine the size of n, where n must be a multiple of 3, then the number of bits of code is n-3;

[0045] Step 2.3.2.2: Encode according to spatial coordinate position

[0046] The config.txt file contains the following parameters: center_x, center_y, center_z, size_x, size_y, size_z. Center_x, center_y, center_z represent the center position of the docking box, and size_x, size_y, size_z represent the length, width, and height of the search box.

[0047] According to the number of coded bits, every 3 bits are divided into a group, a total of ((n-3) / 3) groups can be divided, and every 3 bits are encoded;

[0048] Compare the position (x, y, z) of the molecular conformation with center_x, center_y, center_z. The results are as follows: "1" indicates that the comparison result is larger, and "0" indicates that the result is smaller.

[0049]

[0050] In this way, a 3-bit code can be obtained according to the position of the conformation, indicating which small cube the conformation is in.

[0051] When it continues to divide, calculate the center point of each box, the calculation method is: (center_x±size_x / 4 a , center_y±size_y / 4 a , center_z±size_z / 4 a )

[0052] Among them, the range of a is [1, (n-3) / 3], and the sign of "±" is determined by the 3-bit code calculated previously, "0" corresponds to "-", and "1" corresponds to "+";

[0053] Then, depending on which small cube the conformation is in, the position (x, y, z) of the conformation is compared with the center point of the small cube to obtain a 3-bit code, and so on;

[0054] Finally, these ((n-3) / 3) groups of 3-bit codes are combined to form an (n-3)-bit code.

[0055] Step 3: Store the molecular conformation in the corresponding encoded global memory

[0056] On the GPU side, the binary code of the molecular conformation is obtained, and then the molecular conformation in the memory area corresponding to the binary code is its nearest neighbor.

[0057] In step 2.3.3, the specific steps of optimizing the conformation using the BFGS method are as follows:

[0058] Step Ⅰ: Initialize the Hessian matrix and initialize the Hessian matrix to the identity matrix;

[0059] Step II: Evaluate the free energy of the molecular conformation after binding to the receptor through a scoring function, including:

[0060] Intermolecular energy: Based on the spatial coordinates of each atom in the conformation, the energy of each atomic pair between the ligand and the receptor is obtained by searching the grid cache using the trilinear interpolation method;

[0061] Intramolecular energy: The energy of the ligand itself is obtained by looking up the intramolecular energy table;

[0062] Add the intermolecular energy to the intramolecular energy to get the total energy;

[0063] Step III: Calculate the derivative of the spatial coordinates of each atom in the molecular conformation;

[0064] Step IV: Use the Armijo-Goldstein criterion for inexact search. If ||derivative||<1e -5 , then BFGS ends and all conformations traversed during the search are stored in the local cache.

[0065] In step 3, the stage after the host runs on the device, the specific steps are:

[0066] Step 3.1: All the optimal conformations obtained by each thread on the device are transmitted to the host, and the molecular conformations obtained on the host are sorted according to the scores. The lower the score, the higher the ranking, indicating a better scoring result.

[0067] Step 3.2: Retain multiple conformations with higher rankings and optimize the conformations more accurately; that is, use BFGS to optimize the retained conformations, use the scoring function to calculate the scores of the optimized molecular conformations, and finally output the final top-ranked conformations.

[0068] In step 2.3, the molecular conformation consists of position, orientation, and torsion, and the dimension N is 7+N. rot ,in:

[0069] position = (x, y, z), which represents the three-dimensional coordinates of the molecular conformation in the search space;

[0070] orientation=(a,b,c,d), which indicates the direction of the molecular conformation, expressed as a quaternion;

[0071] N rot The torsion of the rotatable bonds. The number of torsions will be given in the .pdbqt file of the ligand molecule.

[0072] The above method can greatly speed up the molecular docking and virtual screening while ensuring no loss of docking accuracy, thus meeting the actual needs of molecular docking of large compound databases.

[0073] Compared with the prior art, the beneficial effects of the present invention are: when screening a large compound database and the binding pocket (target area) of the protein target is unknown, if the QuickVina-W molecular docking software is used, the computer's CPU performance must be extremely high, the number of CPUs must reach 64, and the hardware requirements are high. In addition, QuickVina-W takes a long time, which will greatly increase the cost of drug research and development and cause unnecessary expenses.

[0074] After using the method of the present invention, when faced with large-scale ligand blind docking, the time required for large-scale compound data screening can be greatly reduced, the research cycle can be shortened, and lead compounds can be obtained more quickly. The GPU used in the method of the present invention has the characteristics of high cost performance, good computing performance and easy development, so that the method of the present invention can be widely used in large-scale drug virtual screening on personal computers, servers or cloud computing. The method of the present invention reduces the cost and time of drug research and development, as well as the user's usage threshold.

[0075] In summary, the present invention designs a Monte Carlo algorithm that can realize multi-threaded collaboration. The acceleration of this algorithm on GPU has very important application value, can greatly reduce investment and expenditure, is simple and convenient to develop, and is expected to solve the problem of molecular docking speed in large search space. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] The present invention will be further described below in conjunction with the accompanying drawings.

[0077] Figure 1 It is the overall flow chart of the present invention.

[0078] Figure 2 FIG. 1 is a flow chart of step 102 in the present invention.

[0079] Figure 3 This is a flow chart of step 103 in the present invention.

[0080] Figure 4 It is a schematic diagram of the structure of the cube in the present invention.

[0081] Figure 5 A schematic diagram of a global memory for storing corresponding codes for molecular conformations in the present invention. DETAILED DESCRIPTION

[0082] In order to better understand the technical content of the present invention, specific embodiments are given and described as follows in conjunction with the accompanying drawings.

[0083] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0084] It should be noted that the GPU model used in the following embodiments is NVIDIA GeForce RTX309032GB, which is not limited to the present invention.

[0085] Embodiment 1

[0086] like Figure 1 As shown, the multi-threaded collaborative GPU acceleration method for drug virtual screening includes the following steps:

[0087] Step 1: Run on the host side to prepare data, configure OpenCL, etc.

[0088] Before the device runs, the host side works as follows: Figure 2 As shown, specifically including:

[0089] Step 101, read the .pdbqt files of the ligand and receptor. Taking the 5tim ligand molecule as an example, the content of the 5tim ligand file is shown in Table 1.

[0090] Table 1

[0091]

[0092] Wherein, active torsions represents the number of rotatable bonds. The number of rotatable bonds in Table 1 is 0.

[0093] The receptor file of 5tim is shown in Table 2.

[0094] Table 2

[0095]

[0096] Only a part of the 5tim receptor file is extracted in Table 2, and columns 6-8 represent the spatial coordinates of the atoms.

[0097] The file of docking box parameters is shown in Table 3.

[0098] Table 3

[0099]

[0100] The parameters in Table 3 include:

[0101] receptor: the path where the receptor file of 5tim is located;

[0102] ligand: the path where the ligand file of 5tim is located;

[0103] center_x, center_y, center_z: the center position of the docking box;

[0104] size_x, size_y, size_z: the size of the docking box;

[0105] thread: number of threads;

[0106] search_depth: The number of search steps for each thread.

[0107] The number of threads used in the following embodiments is 8000 and the number of search steps is 5.

[0108] Step 102: Set the OpenCL environment.

[0109] The OpenCL platform used in the following embodiments is the NVIDIA platform.

[0110] Step 103: Data preparation.

[0111] Generate grid caches, intramolecular energy tables, and random molecular conformations.

[0112] Expression of molecular conformation: C is the molecular conformation.

[0113] x, y, z: the three-dimensional coordinate position of the molecular conformation in the search space,

[0114] a, b, c, d: quaternions of molecular conformations,

[0115] The torsion angle of the rotatable bond,

[0116] N rot : The number of rotatable bonds.

[0117] Step 104: Transmit the data to the device.

[0118] Step 2: Run on the device.

[0119] Figure 3 This is the specific work of a thread on the device side. Multiple threads in step 2 complete the work simultaneously. Figure 3 The specific work of a thread in step 2 includes:

[0120] Step 201: Randomly perturb the molecular conformation.

[0121] Random perturbations represent one of three sets of values ​​for the molecular conformation:

[0122] The three-dimensional coordinates of the molecular conformation in the search space: x, y, z, and the perturbation of this set of values ​​based on uniformly distributed random numbers;

[0123] Quaternions of molecular conformation: a, b, c, d, perturbations are performed on this set of values ​​based on random numbers generated by normal distribution;

[0124] Torsion angles of all rotatable bonds in the molecular conformation: Replace a specific dimension value in the group of values ​​with a random number that conforms to the uniform distribution.

[0125] Step 202: Perform G Check and I Check on the disturbed molecular conformation.

[0126] The specific manifestations are:

[0127] G Check: Calculate the spatial distance between the perturbed molecular conformation and the conformation in the global memory. The global memory stores the final conformation after two BFGS optimizations of all threads. Then select the conformations whose spatial distance is less than the cutoff radius R, calculate the N-dimensional Euclidean distance between the conformation to be detected and the conformation within the cutoff radius R, and sort them from near to far according to the Euclidean distance to find the first N nearest neighboring point conformations. If one of the N neighboring point conformations meets the heuristic condition, proceed to step 203, otherwise proceed to I Check.

[0128] The method of finding the nearest neighbor conformation in G Check is to store the final conformation of each BFGS optimization in an octree structure. The octree structure is implemented recursively and the memory space is dynamically allocated. The specific implementation steps are as follows:

[0129] (1) Allocate fixed memory and determine the number of bits for encoding

[0130] First, according to the number of threads and the number of search steps search_depth, (thread*search_depth)<2 n Allocate 2 to global memory n *sizeof(data type) is the memory size. The number of bits of code is based on (thread*search_depth)<2 n , to determine the size of n, where n must be a multiple of 3, and the number of encoding bits is n-3.

[0131] (2) Encoding according to spatial coordinate position

[0132] The config.txt file contains the following parameters: center_x, center_y, center_z, size_x, size_y, size_z. Center_x, center_y, center_z represent the center position of the docking box, and size_x, size_y, size_z represent the length, width, and height of the search box.

[0133] According to the number of coding bits, every 3 bits are divided into a group, a total of ((n-3) / 3) groups can be divided, and every 3 bits are encoded.

[0134] Compare the position (x, y, z) of the molecular conformation with center_x, center_y, center_z. "1" indicates that the comparison result is larger, and "0" indicates that the result is smaller.

[0135]

[0136] In this way, a 3-bit code can be obtained according to the position of the conformation, indicating which small cube the conformation is in, such as Figure 4 shown.

[0137] As it continues to divide, the center point of each box is calculated.

[0138] The calculation method is: (center_x±size_x / 4 a , center_y±size_y / 4 a , center_z±size_z / 4 a )

[0139] Among them, the range of a is [1, (n-3) / 3], and the sign of "±" is determined according to the 3-bit code calculated previously, "0" corresponds to "-" and "1" corresponds to "+".

[0140] Then, depending on which small cube the conformation is in, the position (x, y, z) of the conformation is compared with the center point of the small cube to obtain a 3-bit code, and so on.

[0141] Finally, these ((n-3) / 3) groups of 3-bit codes are combined to form an (n-3)-bit code.

[0142] Step 3: Store the molecular conformation in the corresponding encoded global memory

[0143] On the GPU side, the binary code of the molecular conformation is obtained, and then the molecular conformation in the memory area corresponding to the binary code is its nearest neighbor point, such as Figure 5 shown.

[0144] I Check: Search the molecular conformations in the local cache of this thread. The local cache stores all conformations traversed during the BFGS optimization process of this thread. Calculate the N-dimensional Euclidean distance between the perturbed molecular conformation and the conformation in the local cache, sort them from near to far according to the N-dimensional Euclidean distance, and find the first 3N nearest neighbor point conformations. If one of the 3N neighbor point conformations meets the heuristic condition, proceed to step 203. If not, exit the search and start again from step 201.

[0145] Step 203: Optimize the conformation using the BFGS method. Specifically,

[0146] Initialize the Hessian matrix and initialize it to the identity matrix; evaluate the free energy of the molecular conformation after binding to the receptor through the scoring function; calculate the derivative of the spatial coordinates of each atom in the conformation; use the Armijo-Goldstein criterion for inexact search, if ||derivative||<1e -5 , then BFGS ends and all conformations traversed during the search are stored in the local cache.

[0147] Step 204: Determine whether the optimized conformation meets the Metropolis acceptance criteria.

[0148] Metropolis Acceptance Guidelines:

[0149] P: probability of accepting the optimized conformation,

[0150] e0: free energy after the molecular conformation before disturbance binds to its receptor,

[0151] e opt : The free energy of binding to its receptor after molecular conformation optimization.

[0152] When the optimized molecular conformation does not meet the acceptance criteria, proceed to step 205; when the optimized molecular conformation meets the acceptance criteria, update the molecular conformation, proceed to steps 202 and 203, and store the final conformation obtained by BFGS optimization in the global memory according to its three-dimensional position information. Record the molecular conformation with lower free energy, and continue to step 205.

[0153] Step 205: Determine whether the search step requirement is met.

[0154] When the number of search steps does not meet the requirement, continue to step 201; when the number of search steps meets the requirement, proceed to step 206.

[0155] Step 206: Output the optimal molecular conformation of the thread.

[0156] Step 3: The results after the device-side operation are transmitted to the host-side for processing. The conformations are sorted according to their scores, the conformations are optimized more accurately, and the top 9 conformations are output. The results after the operation of this embodiment are shown in Table 4.

[0157] Table 4

[0158]

[0159] Among them, mode is the model of molecular conformation, and 9 better molecular conformations are finally output in Table 4; affinity is the affinity after the molecular conformation binds to the receptor; dist from rmsd lb is the lower limit of the root mean square error calculated relative to the best molecular conformation model; best mode rmsd ub is the upper limit of the root mean square error calculated relative to the best molecular conformation model; GPU monte Carlo runtime is the time for Monte Carlo running on the device side; QVina-W-GPUtotal runtime is the total time for running on the device side + host side.

[0160] Table 5 shows the best molecular conformation data output by 5tim. The following data are from 5tim_ligand_out.pdbqt in Table 4.

[0161] Table 5

[0162]

[0163] REMARK VINA RESULT: -3.8 0.000 0.000, where -3.8 is the score result of the molecular conformation.

[0164] The above specifically introduces a multi-threaded collaborative GPU acceleration method and implementation for drug virtual screening provided by the present application. This article uses specific examples to elaborate on the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the method of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A multi-threaded collaborative GPU acceleration method for drug virtual screening, characterized in that: The following steps are involved: Step 1: The host performs tasks including data preparation and OpenCL configuration; Step 2: Run on the device side - On the device side, each thread executes the multi-threaded collaborative Monte Carlo iterative optimization algorithm to output the optimal molecular conformation of each thread; the specific steps of running on the device side are as follows: Step 2.1: Assign the random molecular conformations generated by the host to each thread of the device. Each conformation corresponds to one thread, and the total number of threads is set in the config.txt file. Step 2.2: Set the search_depth of each thread to 5. Step 2.3: Use a multi-threaded collaborative Monte Carlo iterative local algorithm to optimize the molecular conformation; the specific operations are as follows: Step 2.3.1: Randomly perturb the molecular conformation; Step 2.3.2: Perform G Check and I Check on the disturbed molecular conformation; specifically: G Check: Calculate the spatial distance between the perturbed molecular conformation and the conformation in the global memory. The global memory stores the final conformation after all threads perform two quasi-Newton algorithm BFGS optimizations. Then, screen out the conformations whose spatial distance is less than the cutoff radius R. Calculate the N-dimensional Euclidean distance between the conformation to be tested and the conformation within the cutoff radius R, and sort them from near to far according to the Euclidean distance. Find the first N nearest neighbor conformations. If one of the N neighbor conformations meets the heuristic condition, proceed to step 2.3.3, otherwise proceed to I Check. I Check: Search the molecular conformations in the local cache of this thread. The local cache stores all conformations obtained during the BFGS optimization process of this thread. Calculate the N-dimensional Euclidean distance between the perturbed molecular conformation and the conformation in the local cache, sort them from near to far according to the N-dimensional Euclidean distance, and find the first 3N nearest neighbor point conformations. If one of the 3N neighbor point conformations meets the heuristic condition, proceed to step 2.3.3; if not, exit the search and start again from step 2.3.1; The method of finding the nearest neighbor conformation in G Check is: the final conformation of each BFGS optimization is stored in an octree structure. The octree structure is implemented recursively, and the memory space of the octree is dynamically allocated; Step 2.3.3: Use the BFGS method to optimize the conformation, and store all the conformations obtained during the BFGS optimization process in a local cache; Step 2.3.4: Compare the energy of the conformations before and after perturbation to determine whether to accept the optimized conformation; if the optimized conformation is accepted, proceed to steps 2.3.2 and 2.3.3, and store the final conformation obtained by BFGS optimization in the global memory; if the optimized conformation is not accepted, proceed to step 2.3.5; Step 2.3.5: Determine whether the number of search steps reaches the set value. If the number of search steps does not reach the set value, proceed to step 2.3.

1. If the number of search steps reaches the set value, output the best molecular conformation in the thread. Step 3: The results of the device operation are sent back to the host, and the conformations are sorted according to their scores. The BFGS method is used to optimize the conformations more finely, and the top-ranked conformations are output.

2. According to claim 1, a multi-threaded collaborative GPU acceleration method for drug virtual screening is characterized in that: In step 1, the stage before the host runs on the device includes the following specific steps: Step 1.1: Read the file. The host terminal reads the .pdbqt file of the ligand molecule and the receptor molecule, as well as the config.txt file of the docking parameters; Step 1.2: Configure the OpenCL environment, including identifying and selecting the platform and device, creating an OpenCL context, creating a command queue, creating a memory object, creating a program object, creating a kernel object, and setting kernel parameters; Step 1.3: Generate a grid cache for calculating the intermolecular energy between the molecular conformation and the receptor by trilinear interpolation; Step 1.4: Generate an intramolecular energy table for calculating the intramolecular energy of the conformation; Step 1.5: Generate a random number table to generate random values; Step 1.6: Generate a random molecular conformation, which is used as the initial conformation of the multi-threaded Monte Carlo algorithm on the device side; Step 1.7: The data generated in the previous steps is transmitted to the device.

3. According to claim 2, a multi-threaded collaborative GPU acceleration method for drug virtual screening is characterized in that: In step 2.3.1, one of the position, orientation, and torsion of the molecular conformation is randomly perturbed, which is expressed as: The three-dimensional coordinate position of the molecular conformation in the search space is perturbed based on uniformly distributed random numbers; The quaternion of the molecular conformation orientation is perturbed based on the random number generated by normal distribution; A specific dimension value of the torsion angle of a rotatable bond in the molecular conformation is replaced by a random number that conforms to a uniform distribution.

4. According to claim 3, a multi-threaded collaborative GPU acceleration method for drug virtual screening is characterized in that: In step 2.3.2, the structure of the global memory in the GPU is constructed, wherein the global memory is accessible to each thread, and the specific operations are as follows: First, allocate a certain amount of memory to the GPU based on the number of threads and the number of search steps; Then, a binary code is determined for each conformation according to the three-dimensional position information of the molecular conformation, indicating the three-dimensional spatial position stored therein; Finally, it is stored in the corresponding global memory according to the binary code.

5. A multi-threaded collaborative GPU acceleration method for drug virtual screening according to claim 4, characterized in that: In step 2.3.3, the specific steps of optimizing the conformation using the BFGS method are as follows: Step Ⅰ: Initialize the Hessian matrix and initialize the Hessian matrix to the identity matrix; Step II: Evaluate the free energy of the molecular conformation after binding to the receptor through a scoring function, including: Intermolecular energy: Based on the spatial coordinates of each atom in the conformation, the energy of each atomic pair between the ligand and the receptor is obtained by searching the grid cache using the trilinear interpolation method; Intramolecular energy: The energy of the ligand itself is obtained by looking up the intramolecular energy table; Add the intermolecular energy to the intramolecular energy to get the total energy; Step III: Calculate the derivative of the spatial coordinates of each atom in the molecular conformation; Step IV: Use the Armijo-Goldstein criterion for inexact search. If ||derivative||<1e -5 , then BFGS ends and all conformations traversed during the search are stored in the local cache.

6. According to claim 5, a multi-threaded collaborative GPU acceleration method for drug virtual screening is characterized in that: In step 3, the stage after the host runs on the device, the specific steps are: Step 3.1: All the optimal conformations obtained by each thread on the device are transmitted to the host, and the molecular conformations obtained on the host are sorted according to the scores. The lower the score, the higher the ranking, indicating a better scoring result. Step 3.2: Retain multiple conformations with higher rankings and optimize the conformations more accurately; that is, use BFGS to optimize the retained conformations, use the scoring function to calculate the scores of the optimized molecular conformations, and finally output the final top-ranked conformations.

7. The multi-threaded collaborative GPU acceleration method for drug virtual screening according to claim 1, characterized in that: In step 2.3, the molecular conformation consists of position, orientation, and torsion, and the dimension N is 7+N. rot ,in: position = (x, y, z), which represents the three-dimensional coordinates of the molecular conformation in the search space; orientation=(a,b,c,d), which indicates the direction of the molecular conformation, expressed as a quaternion; torsion=(j1,j2,L,j Nrot ), indicating N rot The torsion of the rotatable bonds. The number of torsions will be given in the .pdbqt file of the ligand molecule.

8. The multi-threaded collaborative GPU acceleration method for drug virtual screening according to claim 4, characterized in that: In step 2.3.2, an octree is used to find neighboring points around it more quickly, and a structure of global memory in the GPU is constructed to quickly find the nearest neighbor. The specific implementation steps are as follows: Step 2.3.2.1: Allocate fixed memory and determine the number of encoding bits First, according to the number of threads and the number of search steps search_depth, (thread*search_depth)<2 n Allocate 2 to global memory n *sizeof(data type) memory size; the number of bits of encoding is based on (thread*search_depth)<2 n , to determine the size of n, where n must be a multiple of 3, and the number of bits of code is n–3; Step 2.3.2.2: Encode according to spatial coordinate position The config.txt file contains the following parameters: center_x, center_y, center_z, size_x, size_y, size_z. Center_x, center_y, center_z represent the center position of the docking box, and size_x, size_y, size_z represent the length, width, and height of the search box. According to the number of coded bits, every 3 bits are divided into a group, a total of ((n-3) / 3) groups can be divided, and every 3 bits are encoded; Compare the position (x, y, z) of the molecular conformation with center_x, center_y, center_z, and get a 3-bit code based on the position of the conformation, indicating which small cube the conformation is in. When it continues to divide, calculate the center point of each box, the calculation method is: (center_x±size_x / 4 a , center_y±size_y / 4 a , center_z±size_z / 4 a ) The range of a is [1, (n-3) / 3], and the sign of "±" is determined by the 3-bit code calculated previously, "0" corresponds to "-", and "1" corresponds to "+". Then, depending on which small cube the conformation is in, the position (x, y, z) of the conformation is compared with the center point of the small cube to obtain a 3-bit code, and so on; Finally, these ((n-3) / 3) groups of 3-bit codes are combined to form an (n-3)-bit code.

Citation Information

Patent Citations

  • CUDA-based quick chemical composition distribution computing method for steady-state multi-component copolymerization

    CN104166784A

  • fluid machinery simulation program heterogeneous acceleration method based on a GPU

    CN109522127A

  • Parallel marine drug screening method based on heterogeneous many-core architecture

    CN111243660A

  • Method for accelerating AutoDock Vina based on GPU

    CN114373509A