Method and apparatus for molecular docking, device, and medium
By dividing docking queues in computing devices and using parallel processing of CPU and GPU, combined with the producer-consumer model, the molecular docking process is optimized, and the challenge of efficient molecular docking in massive molecular libraries is solved, which improves processing efficiency and reduces resource overhead.
Patent Information
- Application Number
- PCT/CN2024/132759
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-21
- Filing Date
- 2024-11-18
- Publication Date
- 2025-08-28
AI Technical Summary
In the process of molecular docking, the prior art faces the challenge of efficiently processing the docking results of ligand molecules in massive molecular libraries, especially when the number of ligand molecules reaches billions of scales, it is impossible to determine the results of molecular docking within a limited time.
By setting up a docking queue in the computing device and dividing it into multiple subqueues, using the parallel processing capabilities of the CPU and GPU, different tasks are performed by the first computing unit and the multiple second computing units respectively, and combining the management of the producer-consumer model and the storage resource pool, the molecular docking process is optimized.
It improves the overall efficiency of molecular docking, can efficiently process massive ligand molecules, and reduces the hardware overhead and processing time of computing resources.
Smart Images

Figure CN2024132759_28082025_PF_FP_ABST
Abstract
Description
Method, device, apparatus and medium for molecular docking
[0001] This application claims priority to the Chinese invention patent application entitled “Methods, devices, apparatus and media for molecular docking” filed on February 21, 2024, with application number 202410195241.X. The entire contents of that application are incorporated by reference into this application. Technical Field
[0002] Exemplary implementations of the present disclosure relate generally to molecular processing, and more particularly to methods, apparatuses, devices, and computer-readable storage media for molecular docking. Background Art
[0003] Molecular docking is a computational method widely used in the field of medicine. In the process of molecular docking, the potential binding mode of two molecules (for example, a receptor molecule and a ligand molecule) can be predicted based on the molecular structures of two independent molecules. Currently, a variety of technical solutions for molecular docking have been proposed. These technical solutions can determine the ligand molecules that may match the receptor molecule from a molecular library including a large number of molecules and then determine the binding conformation. However, the order of magnitude of the ligand molecules is as high as 10 60 This results in the inability to determine molecular docking results within a limited timeframe. For example, publicly available libraries of drug-like small molecules have grown to billions in number. At this point, it is desirable to perform molecular docking processes with greater efficiency. Summary of the Invention
[0004] In a first aspect of the present disclosure, a method for molecular docking is provided. In this method, a docking queue is established by a first computing unit of a computing device, and the docking queue indicates a first molecule and a plurality of second molecules to be docked to the first molecule. A first subqueue in the docking queue is determined, and the first subqueue indicates the first molecule and at least a portion of the second molecules in the plurality of second molecules. The first subqueue is loaded into a storage resource space allocated from a storage resource pool of the computing device to form a data structure of the first subqueue. A second computing unit among a plurality of second computing units of the computing device reads the data structure to determine a first plurality of conformations associated with the first subqueue, and the conformations in the first plurality of conformations indicate the posture of the second molecule in at least a portion of the second molecules being docked to the first molecule.
[0005] In a second aspect of the present disclosure, a device for molecular docking is provided. The device includes: an establishment module configured to establish a docking queue by a first computing unit of a computing device, the docking queue indicating a first molecule and a plurality of second molecules to be docked to the first molecule; a determination module configured to determine a first subqueue in the docking queue, the first subqueue indicating the first molecule and at least a portion of the second molecules in the plurality of second molecules; a loading module configured to load the first subqueue into a storage resource space allocated from a storage resource pool of the computing device to form a data structure of the first subqueue; and a docking module configured to read the data structure by a second computing unit among a plurality of second computing units of the computing device to determine a first plurality of conformations associated with the first subqueue, the conformations in the first plurality of conformations indicating postures of the second molecules in at least a portion of the second molecules when docked to the first molecule.
[0006] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes: at least one processing unit; and at least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform the method according to the first aspect of the present disclosure.
[0007] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the processor implements the method according to the first aspect of the present disclosure.
[0008] In a fifth aspect of the present disclosure, a computer program product is provided, which is tangibly stored in a computer storage medium and includes computer executable instructions, which, when executed by a device, cause the device to perform the method according to the first aspect of the present disclosure.
[0009] It should be understood that the content described in this summary section is not intended to limit the key features or important features of the implementation of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent hereinafter with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0011] FIG1 shows a block diagram of an application environment according to an exemplary implementation of the present disclosure;
[0012] FIG2 shows a block diagram for molecular docking according to some implementations of the present disclosure;
[0013] FIG3 shows a flow chart of a method for performing a molecular docking process according to some implementations of the present disclosure;
[0014] FIG4 illustrates a block diagram of a docking box according to some implementations of the present disclosure;
[0015] FIG5 shows a flowchart of a method for performing initialization on a second computing unit according to some implementations of the present disclosure;
[0016] FIG6 illustrates a block diagram of dependencies among multiple queues according to some implementations of the present disclosure;
[0017] FIG7 shows a flowchart of a method for performing molecular docking based on a producer-consumer model according to some implementations of the present disclosure;
[0018] 8 shows a flowchart of a method for performing a conformation search by a first computing unit and a second computing unit according to some implementations of the present disclosure;
[0019] FIG9A illustrates a block diagram of allocating storage resources according to some implementations of the present disclosure;
[0020] FIG9B illustrates a block diagram of releasing storage resources according to some implementations of the present disclosure;
[0021] FIG10 illustrates a block diagram of updating a queue by a producer and a consumer according to some implementations of the present disclosure;
[0022] FIG11 shows a flow chart of a method for molecular docking according to some implementations of the present disclosure;
[0023] FIG12 shows a block diagram of an apparatus for molecular docking according to some implementations of the present disclosure; and
[0024] FIG13 illustrates a block diagram of a device capable of implementing various implementations of the present disclosure. DETAILED DESCRIPTION
[0025] The following describes implementations of the present disclosure in more detail with reference to the accompanying drawings. Although certain implementations of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the implementations described herein. Rather, these implementations are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and implementations of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0026] In the description of the implementation of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "an implementation" or "the implementation" should be understood as "at least one implementation". The term "some implementations" should be understood as "at least some implementations". The following may also include other explicit and implicit definitions. As used herein, the term "model" can represent the association relationship between various data. For example, the above-mentioned association relationship can be obtained based on a variety of technical solutions currently known and / or to be developed in the future.
[0027] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0028] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0029] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0030] As an optional but non-limiting implementation, in response to receiving a user's active request, a prompt message may be sent to the user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form. Furthermore, the pop-up window may also include a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0031] It is understandable that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0032] As used herein, the term "in response to" refers to a state in which a corresponding event occurs or a condition is satisfied. It will be understood that the timing of executing a subsequent action executed in response to the event or condition is not necessarily strongly correlated with the time when the event occurs or the condition is satisfied. For example, in some cases, a subsequent action may be executed immediately upon the occurrence of the event or the satisfaction of the condition; in other cases, the subsequent action may be executed some time after the occurrence of the event or the satisfaction of the condition.
[0033] Sample Environment
[0034] In the molecular docking process, the potential binding mode of two molecules can be predicted based on the molecular structures of two molecules (e.g., a receptor molecule and a ligand molecule) that are independent of each other. The molecular docking process is described with reference to FIG1 , which shows a block diagram 100 of an application environment according to an exemplary implementation of the present disclosure. As shown in FIG1 , a first molecule can, for example, represent a receptor molecule (also referred to as a receptor or macromolecule), and a second molecule 120, ..., 122 can, for example, represent a ligand molecule (also referred to as a ligand or small molecule). Molecular docking 130 can be performed to determine a conformation 130 associated with the first molecule 110 and the second molecule 120. Here, a conformation can represent one of countless specific postures in which two molecules are arranged in space.
[0035] Currently, technical solutions for molecular docking have been proposed. These technical solutions can identify ligand molecules that may match receptor molecules from a molecular library containing a large number of molecules and determine the corresponding conformation. However, the public ligand molecule library has grown to billions of scales, and the upper limit of the number of ligand molecules in the chemical space is as high as 10 60 , which makes it impossible to determine the results of molecular docking within a limited time.
[0036] In the face of the molecular docking requirements that require a large amount of computing power, there are mainly two types of ideas. For example, massive computing resources (for example, central processing unit (CPU) computing resources) can be called, and the molecular docking technical solution can be executed in the cluster of computing resources to increase the number of dockings per unit time. However, this technical solution will result in a huge hardware resource overhead. For another example, a dedicated processor (for example, a graphics processing unit (GPU)) can be used to perform the acceleration process. However, the existing technical solution only transplants the docking process between a single receptor molecule and a ligand molecule performed by the CPU to the GPU, and can only cover limited functions. At this point, it is expected that the molecular docking process can be performed with higher efficiency.
[0037] Overview of Molecular Docking
[0038] To at least partially address the deficiencies in the prior art, a method for molecular docking is provided according to an exemplary implementation of the present disclosure. An overview of an exemplary implementation of the present disclosure is described with reference to FIG2 , which illustrates a block diagram 200 for molecular docking according to some implementations of the present disclosure. As shown in FIG2 , a first computing unit 210 of a computing device may establish a docking queue 230 indicating a plurality of second molecules to be docked to a first molecule.
[0039] According to an example implementation of the present disclosure, the first molecule can represent a receptor molecule in the docking process, and the second molecule can represent a ligand molecule. In this case, the docking queue can be referred to as a receptor-ligand queue. It should be understood that a molecular library generally includes a large number of molecules. If a single queue is used to store all molecules, the length of the docking queue may be extremely large, and all the data in the docking queue cannot be processed at one time. According to an example implementation of the present disclosure, an upper limit on the queue length can be set. If the queue is full, the producer's operation of writing molecules to the queue can be blocked, and the consumer can consume the molecules in the queue. The molecules in the queue can be processed dynamically. In this case, the docking queue can be divided into multiple sub-queues so that the multiple sub-queues can be processed separately in multiple batches. For example, a first sub-queue 240 in the docking queue can be determined, and the first sub-queue 240 indicates at least a portion of the second molecules in the multiple second molecules.
[0040] Furthermore, the first computing unit 210 can load the first subqueue 240 into a storage resource space 252 allocated from a storage resource pool 250 of the computing device to form a data structure for the first subqueue. At this point, a second computing unit among the plurality of second computing units 220 of the computing device can read the data structure from the storage resource space 252 to determine a first plurality of conformations 260 associated with the first subqueue. It should be understood that a conformation in this first plurality of conformations can indicate a posture of at least a portion of the second molecules docked to the first molecule.
[0041] Using the exemplary implementation of the present disclosure, during the molecular docking process, different tasks can be performed by the first computing unit and multiple second computing units, respectively. In this way, the advantages of multiple types of computing units can be utilized, thereby improving the overall efficiency of molecular docking through parallel processing.
[0042] Detailed process of molecular docking
[0043] An overview of molecular docking has been described. hereinafter, see FIG3 for a description of more details of performing molecular docking using different computing units in a computing device. According to an example implementation of the present disclosure, the first computing unit is a general processing unit (CPU) in the computing device, and the plurality of second computing units are a plurality of graphics processing units (GPUs) in the computing device. For ease of description, the process of performing molecular docking will be described below using only one CPU and one GPU as an example. Alternatively and / or additionally, molecular docking can be performed using one CPU and multiple GPUs. In this case, the first molecule is a receptor molecule in molecular docking, the second molecule is a ligand molecule in molecular docking, and the storage resource pool includes the video memory resources of the plurality of second computing units. Using the example implementation of the present disclosure, different types of computing resources and storage resources can be fully utilized to complete the molecular docking process.
[0044] Referring to FIG3 , a process of performing molecular docking in parallel using a CPU and a GPU is described. FIG3 shows a flow chart of a method 300 for performing a molecular docking process according to some implementations of the present disclosure. As shown in FIG3 , at box 310 , a user configuration can be read from command line parameters and / or configuration files. The user configuration can specify a variety of configuration information parameters, such as configuration information of the computing device that performs molecular docking, storage paths for receptor molecules and ligand molecules, and the like. At box 320 , the GPU environment can be initialized and the availability of an acceleration device can be confirmed. For example, one or more GPUs in the computing device can be used to perform the acceleration process.
[0045] At box 330, a storage resource pool of a predetermined size (i.e., a memory pool) can be allocated based on the remaining memory of the GPU. According to an example implementation of the present disclosure, the size of the storage resource pool can be predetermined. For example, the computing device can call an application programming interface (API) to obtain the available memory size of the GPU, and can multiply the available memory size by a predetermined empirical coefficient (e.g., 95%, 90% or other values) to determine the size of the storage resource pool. Call the API to allocate the GPU's memory as a fixed-size memory pool. In subsequent processing, corresponding storage resource space can be allocated from the storage resource pool so as to be dedicated to the GPU to perform the molecular docking process.
[0046] At box 340, the receptor file can be read and all atoms that interact with the ligand can be parsed. At box 350, the configuration of the scoring function can be read and a 1D (one-dimensional distance) pre-processing result can be generated. Here, the scoring function can be an energy function that describes the interaction between any two atoms, and the specific parameters include atomic coordinates, atomic charge, atomic type, etc. 1D pre-processing results can be generated in advance to reduce the amount of calculation on the GPU. At box 360, the configuration of the docking box can be read, that is, the configuration parameters of the box used to perform molecular docking, such as the size of the three axes of the box, the coordinates of the geometric center of the box, and the spacing of the grid points placed in the box, etc. The configuration parameters of the box can be used to generate 3D (three-dimensional) pre-processing results for the receptor. Here, the 3D pre-processing result can, for example, represent the energy received by a certain type of atom at any grid point inside the box from all atoms of the receptor.
[0047] According to an exemplary implementation of the present disclosure, the 1D preprocessing results can convert the energy calculation between any two atoms into a table lookup based on their distance, and the 3D preprocessing results can convert the energy calculation between any ligand atom and all receptor atoms into a table lookup based on the coordinates of the former. Using this exemplary implementation, the table lookup process can reduce the computational complexity of the molecular docking process.
[0048] It should be understood that the pre-processing processes at blocks 350 and 360 may be performed in advance, and the 1D and 3D pre-processing results may be sent to the GPU at block 370. According to an exemplary implementation of the present disclosure, at block 370 in FIG3 , the size of the storage resource space required on the GPU may be determined based on the size of the 1D pre-processing result and the 3D pre-processing result, thereby allocating the necessary address space from the storage resource pool.
[0049] In this way, the GPU can directly use the 1D and 3D preprocessing results to more quickly determine docking-related energy information, thereby improving the efficiency of molecular docking. See Figure 4 for more details about preprocessing, which shows a block diagram 400 of a docking box according to some implementations of the present disclosure. As shown in Figure 4, during the molecular docking process, a box 420 can be established, which can include multiple grid points (e.g., 410, 412, etc.) inside the first molecule 110. Each grid point can be evenly distributed within the box and act on the atoms of the nearest ligand molecule.
[0050] At block 380, high-throughput molecular docking can be performed based on a producer-consumer model using the parallel processing capabilities of multiple second computing units. In the context of the present disclosure, high-throughput molecular docking is the docking between receptor molecules and a large number of ligand molecules. After the molecular docking is completed, GPU resources, including pre-allocated video memory resources, can be released at block 390. Using the example implementation of the present disclosure, the computing power of multiple types of computing units can be fully utilized to perform the molecular docking process in a parallel manner.
[0051] It should be understood that due to the huge number of ligand molecules, if these ligand molecules are stored in a single directory, it will cause a huge delay in access and thus affect the speed of molecular docking. According to an example implementation of the present disclosure, data in the ligand molecule library can be stored in multiple directories. It should be understood that the directory here may include a directory local to the computing device, alternatively and / or additionally, it may include a directory located in other remote storage devices (e.g., based on network attached storage (NAS) and / or object storage service (OSS)). Specifically, the user can specify multiple directories and store multiple ligand files (e.g., PDBQT format) under each directory. Further, the search depth search_depth can be specified, that is, the user can specify the depth of the single-path conformation search in the molecular docking process. In the case where the search depth is not set, the depth can be obtained using heuristic rules.
[0052] According to an example implementation of the present disclosure, in the process of establishing a docking queue, a path queue can be established based on a specified storage directory. Here, multiple elements in the path queue can respectively indicate multiple paths of multiple second molecules. Assuming there are N directories, the path queue can include M paths pointing to the N directories respectively. The path queue can be traversed from the queue head to read all ligand files. Specifically, if it is determined that the first path element among multiple path elements indicates a path among multiple paths, a group of second molecules under the first path is added to the docking queue, and the next path element after the first path element is used as the first path element. At this time, the scanning thread can obtain multiple directory paths and scan all ligand files under each directory in sequence, and insert them into the path queue in sequence. At this time, each molecule in the path queue can be represented by a directory identifier and a molecule file identifier, and the elements in the docking queue can include parsed atomic coordinates, bonding information, atom type and other information, etc.
[0053] According to an example implementation of the present disclosure, in order to facilitate determining the last data in the docking queue during subsequent processing, an end marker (e.g., end of queue, eoq) can be added to the end of the path queue. In the process of traversing the path queue, if it is determined that the first path element indicates an end marker, an end marker is added to the docking queue. In other words, if an end marker is found in the path queue, it can be determined that the last path has been processed, and an end marker can be added to the end of the docking queue to indicate the last second molecule. Using the example implementation of the present disclosure, by adding an end marker at the end of each queue, the end of the queue can be indicated to consumers who read data in each queue, and the producers and consumers of the queue are allowed to process the queue in an asynchronous manner.
[0054] 5 , which illustrates a flow chart of a method 500 for performing initialization on a second computing unit according to some implementations of the present disclosure. As shown in FIG5 , the initialization operation performed on the GPU may include the following steps. At box 510 , the GPU driver may be checked to ensure that each GPU can operate normally. At box 520 , the number of visible GPUs may be obtained so that multiple GPUs can subsequently perform the molecular docking process in parallel. At box 530 , the first visible GPU may be set as the active device. At box 540 , capability information of the visible GPUs may be obtained, and at box 550 , specification information of the active GPU may be obtained.
[0055] Specifically, the following specification information can be obtained: multiProcessorCount, which can indicate the number of multiprocessors; maxThreadsPerMultiProcessor, which can indicate the maximum number of threads that can be started per multiprocessor; maxBlocksPerMultiProcessor, which can indicate the maximum number of blocks that can be started per multiprocessor; maxThreadsPerBlock, which can indicate the maximum number of threads that can be started per block; warpSize, which can indicate the number of threads included in a single thread warp.
[0056] Furthermore, a threshold value of a batch size that can be processed by the GPU can be calculated based on the acquired information. Specifically, the threshold value of the batch size can be determined using the formula shown in Table 1 below. In Table 1, exhaustiveness can represent a configuration item indicating the number of circuits for performing a Monte Carlo search for the binding conformation of the receptor-ligand; max_threads represents the maximum number of threads allowed to be launched, and max_batch_size represents the maximum batch size allowed to be processed, that is, the threshold value of the number of second molecules that can be included in a batch.
[0057] Table 1 Process for determining the maximum batch size
[0058] According to an example implementation of the present disclosure, the number of second molecules in the first subqueue does not exceed a threshold number, which is determined based on the specifications of the plurality of second computing units. In other words, when dividing the docking queue into multiple subqueues, this threshold can be taken into account and the length of each subqueue can be ensured to be no greater than the threshold. In this way, the batch size can be ensured to match the processing capabilities of the GPU, thereby avoiding the risk of anomalies caused by excessive GPU workload.
[0059] According to an example implementation of the present disclosure, the molecular docking process shown at block 380 of FIG. 3 can be performed based on a "producer-consumer" model. Here, the "producer" and "consumer" run on independent background threads and exchange "data" securely via multiple threads and queues. Specifically, there may be four queues and five threads. For more information about each queue, see FIG. 6 , which shows a block diagram 600 illustrating the dependencies of multiple queues according to some implementations of the present disclosure.
[0060] As shown in FIG6 , the following four queues may be provided: a path queue 612, a docking queue 230, a conformation candidate queue 632, and a conformation completion queue 642. Here, the path queue 612 may indicate a plurality of directories for storing a plurality of second molecules, the docking queue 230 may indicate a first molecule and a plurality of second molecules, the conformation candidate queue 632 may indicate a plurality of conformations associated with the first molecule and the plurality of second molecules, and the conformation completion queue 642 may indicate a plurality of conformations that are relatively stable in energy after ranking the plurality of conformations in the conformation candidate queue 632 (e.g., a plurality of conformations ranked in the top k positions, or a plurality of conformations that meet other conditions).
[0061] According to an example implementation of the present disclosure, the following five threads may be provided: ligand catalog scanning 610, ligand file parsing 620, conformational search 630, conformational optimization 640, and finalization processing 650. Specifically, the ligand catalog scanning 610 may be performed to establish a path queue 612, the ligand file parsing 620 may be performed to establish a docking queue 230, the conformational search 630 may be performed to establish a conformational candidate queue 632, and the conformational optimization 640 may be performed to establish a conformational completion queue 642. Further, the finalization processing 650 may be performed to complete the molecular docking process. It should be understood that the arrows shown in FIG6 represent data dependencies, with the upstream thread acting as a producer and the downstream thread acting as a consumer.
[0062] During the molecular docking process, each queue can work in parallel, and the data in each queue can be constantly changing. According to an exemplary implementation of the present disclosure, an end marker can be set for each queue to inform downstream consumers that the end of the current queue has been reached and the current queue will no longer include new data.
[0063] According to an example implementation of the present disclosure, high-throughput molecular docking can be performed using the four queues shown in Figure 6 based on a producer-consumer model. For more details, see Figure 7, which shows a flow chart of a method 700 for performing molecular docking based on a producer-consumer model according to some implementations of the present disclosure. As shown in Figure 7, at block 710, a ligand directory scanning thread can be started and a path queue can be created to determine the ligand files in each directory.
[0064] Specifically, each directory can be determined based on configuration parameters, and then a path queue can be created. For example, the ligand_dirs parameter can be used to traverse the ligand files (e.g., with an extension of pdbqt) in each directory and insert the path of each ligand file into the path queue. It should be understood that since enumerating files in a specific directory is fast, only a single directory scanning thread can be started. After all files have been processed, the directory scanning thread can exit.
[0065] At box 720, multiple ligand file parsing threads can be started and a docking queue can be created. At this time, a large number of ligand molecules from each ligand file can be added to the docking queue. It should be understood that since the ligand file parsing process is slow, multiple threads can be started simultaneously to perform ligand file parsing. Each thread can perform the following steps: (1) Read a file path from the path queue and read the ligand file under the file path, parse the file according to the PDBQT format and load the read data into the corresponding memory data structure. At this time, the memory data structure of the receptor molecule can be merged and inserted into the docking queue as a whole. (2) Repeat step (1) and enter step (3) when reaching the end of the path queue. (3) The processing process ends and the thread exits.
[0066] According to an example implementation of the present disclosure, a first conformation candidate queue can be generated, the first conformation candidate queue indicating a first plurality of conformations and a first plurality of energies of the first plurality of conformations. Specifically, at box 730, a conformation search thread can be started, and a conformation candidate queue can be created. At this time, there is only one active GPU, a conformation search thread is started at this time, and the individual conformations in the conformation candidate queue are not sorted by energy. See Figure 8 for more details about the conformation search, which shows a flowchart of a method 800 for performing a conformation search by a first computing unit and a second computing unit according to some implementations of the present disclosure. As shown in Figure 8, box 830 shows a process executed on the CPU (i.e., the first computing unit) side, and box 832 shows a process executed on the GPU (i.e., the second computing unit) side.
[0067] At block 810, method 800 begins. The CPU can partition the docking queue into multiple subqueues, and each subqueue can be processed in a batch. At block 811, the CPU batch can be cleared, i.e., the number of data in the current batch is set to 0. At block 812, one data is retrieved from the docking queue, and each ligand molecule in the docking queue can be traversed. If the ligand molecule is successfully retrieved, the result of block 812 is "yes" and the method proceeds to block 813; otherwise, the result of block 812 is "no" and the method proceeds to block 817.
[0068] According to an exemplary implementation of the present disclosure, during the process of determining the first sub-queue, the size of a base data structure used to dock the first molecule with a second molecule from the plurality of second molecules can be determined. Furthermore, the size of available storage resources in the storage resource pool can be obtained, and based on the size of the available storage resources and the size of the base data structure, the at least a portion of the second molecules in the first sub-queue can be determined. In this manner, the number of second molecules that can be processed in the batch can be determined.
[0069] Specifically, at block 813, the relevant GPU data structures may be enumerated, and the memory size required to dock the ligand molecule to the receptor molecule may be calculated. Specifically, the memory size of the basic data structures required on the GPU side may be determined based on the formula shown in Table 2 below. In Table 2, total_size represents the memory size required by the GPU, and the size of each parameter involved in the conformational search may be determined, and then the final required memory size may be determined by summing the totals.
[0070] Table 2 Process of determining video memory size
[0071] At block 814, it is determined whether the remaining amount in the video memory pool is sufficient. In other words, the amount of video memory allocated to the current batch should be less than the remaining amount in the video memory pool. If the result of the determination at block 814 is "yes," the method proceeds to block 815, where the data associated with the current receptor and ligand molecules is added to the current CPU batch, and the amount of data in the current batch is increased by 1. If the result of the determination at block 814 is "no," the method proceeds to block 817. At block 816, it is determined whether the number of batches has reached a predetermined threshold. Here, the predetermined threshold may be, for example, the max_batch_size determined according to the method described above.
[0072] If the result of the determination at block 816 is "yes," the batch has been successfully created, and the method proceeds to block 817. If the result of the determination at block 816 is "no," indicating that the current batch can accommodate more data, the method returns to block 812 and processes the next data in the docking queue. At block 817, the necessary address space can be allocated from the graphics memory pool based on the data in the CPU batch. At block 818, the data in the CPU batch can be transferred to the allocated address space, and the GPU batch is obtained.
[0073] Then, at block 819, the GPU may execute the kernel function to perform a conformational search for the plurality of ligand molecules. It should be understood that at this point, the 1D and 3D pre-processing results have already been sent to the GPU. Therefore, during the conformational search, the GPU does not need to calculate the distances between each atom and grid point and the corresponding energies one by one. Instead, the GPU can directly determine each conformation and the corresponding energy information by consulting the 1D and 3D pre-processing results.
[0074] At box 820, the CPU can retrieve all ligands and the conformations obtained from each search from the GPU. At box 821, all conformations of the same ligand can be aggregated and inserted into the conformation candidate queue. At this point, the conformation search process of a CPU batch has been completed, and at box 822, the allocated video memory can be returned to the video memory pool. For example, the returned address space can be marked as "available". In this way, it can be ensured that the unused video memory space can be released in time after the batch processing, so that the video memory space can be used to process other batches. At box 823, it can be determined whether there will be other data in the docking queue later. If the judgment result at box 823 is "yes", the method returns to box 811 to process the data in the next subqueue in the next batch. If the judgment result at box 823 is "no", the method proceeds to box 824 and ends.
[0075] According to an example implementation of the present disclosure, a docking queue can be divided into multiple subqueues, and data in the multiple subqueues can be processed in multiple batches. Subsequent subqueues can be processed according to the process described above. Specifically, if it is determined that the first subqueue includes at least one second molecule, a second subqueue is determined from the at least one second molecule; a second computing unit among the plurality of second computing units determines a second plurality of conformations associated with the second subqueue; and a second conformation candidate queue is generated, the second conformation candidate queue indicating a second plurality of conformations and a second plurality of energies of the second plurality of conformations.
[0076] Using the example implementation of the present disclosure, the processing capabilities of the first and second computing units can be called in parallel within each batch, thereby improving the overall performance of molecular docking. It should be understood that although FIG8 depicts a case where a single GPU processes a batch of data, alternatively and / or additionally, multiple GPUs can process multiple batches of data in parallel. In this way, the performance of molecular docking can be further improved.
[0077] According to an example implementation of the present disclosure, one or more optimal conformations can be determined based on the energy of each determined conformation. Specifically, the first plurality of conformations and the second plurality of conformations can be sorted based on the first plurality of energies and the second plurality of energies to generate a conformation completion queue. Returning to Figure 7, at box 740, one or more conformation optimization threads can be started to create a conformation completion queue. Specifically, the conformation optimization thread can perform more detailed optimization, sorting and merging for the numerous candidate conformations of a single ligand molecule. Since the number of ligands that can be processed per unit time is small, multiple conformation optimization threads can be run simultaneously to match the scale of the conformation candidate queue output at box 730. Here, the conformation optimization thread can take out several candidate conformations of a ligand from the conformation candidate queue, where the number is, for example, exhaustiveness.
[0078] Furthermore, the BFGS algorithm can be called one by one to optimize the interaction between the ligand conformation and the receptor until convergence. Subsequently, filtering, merging and sorting can be performed on the optimized conformations according to a variety of technical solutions currently known and / or to be developed in the future. Ultimately, the optimal conformation that meets predetermined conditions can be output, for example, the relevant file path of the optimal conformation can be output to the conformation completion queue. Specifically, it can be specified to output a predetermined number of optimal conformations, and it can be specified to output the optimal conformation to a predetermined directory, etc. Alternatively and / or additionally, if no valid binding conformation is found, an error message can be output to the conformation completion queue, etc. Each data in the conformation candidate queue can be traversed, and when the end of the queue is reached, the conformation optimization process ends and the thread exits.
[0079] At block 750 , a finalization thread may be started to collect errors and / or print progress, etc. Specifically, a process as shown in Table 3 below may be performed.
[0080] Table 3 Closing process
[0081] At this point, the energy of each constellation in the constellation completion queue meets the predetermined condition. At block 760, each of the aforementioned threads can be executed asynchronously based on the data in each queue and wait for the termination of each thread. For example, when a downstream consumer reads the end marker in a queue, it can determine that the queue no longer contains data to be processed and can terminate the consumer's thread.
[0082] Using the exemplary implementations of the present disclosure, the CPU and GPU can execute in parallel, meaning their execution times overlap. Specifically, the CPU can perform catalog scanning and ligand file parsing, while the GPU can perform conformational search. These processes are executed in parallel and overlap in timing. Furthermore, the conformational optimization process on the CPU and the conformational search process on the GPU are executed in parallel and overlap in timing.
[0083] Using the example implementations of this disclosure, GPUs can launch a large number of threads during batch molecular docking, enabling the simultaneous processing of thousands or even more ligand molecules at the same time. In this case, reading ligand files into corresponding memory data structures can be time-consuming, thus reducing processing speed. Therefore, multiple ligand file parsing threads are typically launched.
[0084] According to an example implementation of the present disclosure, a storage resource pool may represent memory space available for performing molecular docking, and corresponding storage resource space may be allocated from the storage resource pool for each batch. In this case, the storage resource space is allocated from the storage resource pool by the first computing unit. This storage resource space may be allocated at the initial stage of batch creation and released to the storage resource pool after all processing of the batch is completed (i.e., after multiple conformations associated with the batch have been determined), thereby achieving reuse of the memory pool.
[0085] During memory pool reuse, GPU memory allocation and release are strictly sequential. In high-throughput molecular docking, it's important to minimize API calls to allocate and release memory before and after each kernel call to reduce overhead. This leads to the proposal to allocate and release memory for the entire batch. Specifically, the memory pool management process includes creation, allocation, release, and destruction.
[0086] In the process of creating a video memory pool, the Malloc function can be called to create the video memory pool. See Figure 9A for more details. Figure 9A shows a block diagram 900A for allocating storage resources according to some implementations of the present disclosure. As shown in Figure 9A, box 910 represents the GPU video memory, and box 912 represents the video memory pool, begin_pt represents the starting point of the allocated address space, and end_pt represents the end point of the address space. At this time, the size of the video memory pool can be expressed as: end_pt-begin_pt. In the video memory pool, the shaded portion shows the allocated area in the video memory pool, and the blank portion shows the free area. The space in the video memory pool can be allocated according to the allocation direction 914.
[0087] According to an example implementation of the present disclosure, once a video memory pool has been determined, "allocation" and "release" operations can be performed on the space in the video memory pool. Specifically, in the allocation operation, a continuous range of addresses can be taken downward starting from the address corresponding to begin_pt+allocated_size. This "allocation" is logical, and only the address space information is updated on the CPU side. The video memory allocation API will not be actually called, thus avoiding the time overhead caused by calling the API. Table 4 below schematically illustrates the process of allocating 64KB of address space from the video memory pool.
[0088] Table 4 Allocation process
[0089] At this point, the boundary of the "allocated area" in Figure 9A shifts downward, meaning the shaded area representing the "allocated area" becomes larger, and the blank area representing the "free area" becomes smaller. At this point, a new allocation record 920 is inserted after the head node. For example, each allocation record can include a starting address (start) and a length (len). All allocation records are stored in a linked list, descending by the start address. In other words, later allocation records are closer to the head node.
[0090] According to an example implementation of the present disclosure, the "release" phase involves finding a node in the allocation record linked list whose start field value is the same as the starting address of the space to be released, and then deleting the node from the linked list. Figure 9B shows a block diagram 900B of releasing storage resources according to some implementations of the present disclosure. As shown in Figure 9B, node 920 will be deleted.
[0091] By utilizing the example implementation method of the present disclosure, during the molecular docking cycle, it can be ensured that the "allocation" and "release" of the memory pool can follow the first-in-last-out rule, thereby avoiding the problem of memory fragmentation. In other words, after completing a batch of molecular docking, several address spaces can be returned to the memory pool together, and the "allocated area" is continuous at this time. Before starting a new batch of molecular docking, one or more address spaces can be "allocated" from the memory pool, and the "free area" is also continuous at this time. In the "destruction" stage, the Free function can be called to release the address space occupied by the memory pool.
[0092] Although the creation and destruction phases call the memory management API and take some time, since only one creation and one destruction are performed at the beginning and end of the memory management process, this does not incur excessive overhead. In contrast, the allocation and deallocation processes, which are repeatedly called during the memory management process, do not call the memory management API and only involve linked list modifications. This reduces the memory management overhead and improves the overall performance of molecular docking.
[0093] In the following, the complete life cycle of video memory management is described. According to an example implementation of the present disclosure, a reusable video memory pool can be created according to 95% of the video memory margin. Further, address space can be allocated for 1D preprocessing results and 3D preprocessing results respectively. Then, the following steps can be performed: (1) Video memory space for storing the following data (as shown in Table 2 above) is allocated in sequence from the video memory pool: config, model, id, random_store, pose_placeholder, ligand, local. (2) Video memory space for storing the following data is released to the video memory pool in sequence: local, ligand, pose_placeholder, random_store, id, model, config.
[0094] According to an exemplary implementation of the present disclosure, the allocated address space is fully released during each batch of processing. Without memory fragmentation, the memory pool is highly compact and all address space is available. This prevents the situation in which memory allocation is interrupted due to memory fragmentation during high-throughput molecular docking.
[0095] According to an example implementation of the present disclosure, closable bounded queues are provided. Specifically, a path queue, a docking queue, a conformation candidate queue, and a conformation completion queue can be created, and these queues can be used to transfer data between the ligand catalog scanning thread, the ligand file parsing thread, the conformation search thread, the conformation optimization thread, and the finalization thread.
[0096] According to an example implementation of the present disclosure, the four queues described above meet the following characteristics: there are one or more producers and one or more consumers; the number of data in the queue is limited to control memory size; when the queue is empty, the consumer blocks to wait for new data; when the queue is full, the producer blocks to wait for an empty slot; when the consumer cannot retrieve data from the queue, it exits; the producer's exit is independent of the consumption. Some threads are both consumers of upstream data and producers of downstream data, forming a chained exit sequence.
[0097] According to an example implementation of this disclosure, it is expected that consumers can distinguish whether a queue will have data in the future. If the producer is still working, the consumer can simply wait; if the producer has exited, the consumer should exit. According to an example implementation of this disclosure, an end operation and an end marker can be introduced on top of a simple queue to distinguish these situations. This approach ensures that each thread can exit safely without deadlock or data loss.
[0098] According to an example implementation of the present disclosure, a simple queue as described below can be used. The simple queue involves two operations: enqueue and dequeue. In subsequent data access: if the queue is empty, dequeue fails; if the queue is full, enqueue fails. See Figure 10 for more details about the queue, which shows a block diagram 1000 of updating the queue by producers and consumers according to some implementations of the present disclosure. As shown in Figure 10, one or more producers 1010 can insert data into the tail of the queue 1030, and one or more consumers 1020 can obtain data from the head of the queue 1030.
[0099] According to an example implementation of this disclosure, thread safety and shutdown notification can be achieved using a simple bounded queue. Specifically, by rewriting the queue and dequeue operations and adding a new close operation, the following goals are achieved: thread safety under multiple producers and consumers, and producers notifying consumers that no new data will be received upstream. The main thread is responsible for queue creation and initializing the necessary state. Table 5 specifically shows the parameters involved in the queue management process.
[0100] Table 5 Parameters involved in the queue
[0101] The enqueue operation can be called independently by all producers. The dequeue operation can be called independently by all consumers. When all data is enqueued, each producer in the queue independently executes the close queue operation. Tables 6, 7, and 8 below show specific examples of the enqueue, dequeue, and close queue operations, respectively.
[0102] Table 6 Example of enqueue operation
[0103] Table 7 Example of dequeue operation
[0104] Table 8 Example of closing a queue operation
[0105] Using the example implementation method of the present disclosure, producers and consumers only need to strictly abide by the following behaviors to ensure normal and efficient data flow. The producer can perform the enqueue operation multiple times, and should perform the queue closing operation once and only once after there is no data. If the queue is full, the producer's enqueue operation will be blocked. The consumer can perform the dequeue operation multiple times, and during each execution, it should check whether the dequeued data is the end marker eoq. If the producer still has data (even if the current queue is empty), the dequeue operation will be blocked until there is data. If each producer performs the queue closing operation, the dequeue operation will always get eoq.
[0106] By using the example implementation of the present disclosure, multiple ligand molecules to be docked can be processed in batches during high-throughput molecular docking. Furthermore, the CPU and GPU can be used to perform different tasks respectively, and the tasks on both sides can be executed overlappingly in time, thereby improving the efficiency of molecular docking in a parallel computing manner. Furthermore, the storage space in the video memory can be reused through allocation and release operations, the frequency of calling the video memory management API can be reduced, and the risk of video memory holes can be avoided. In addition, the closable bounded queue can inform consumers whether there is data to be processed in the future in a simpler and more effective way. In this way, the overall performance of high-throughput molecular docking can be improved.
[0107] Example Process
[0108] Figure 11 shows a flowchart of a method 1100 for molecular docking according to some implementations of the present disclosure. At box 1110, a docking queue is established by a first computing unit of a computing device, and the docking queue indicates a plurality of second molecules to be docked to a first molecule. At box 1120, a first subqueue in the docking queue is determined, and the first subqueue indicates at least a portion of the second molecules in the plurality of second molecules. At box 1130, the first subqueue is loaded into a storage resource space allocated from a storage resource pool of the computing device to form a data structure of the first subqueue. At box 1140, a second computing unit among a plurality of second computing units of the computing device reads the data structure to determine a first plurality of conformations associated with the first subqueue, and the conformations in the first plurality of conformations indicate the postures of the second molecules in at least a portion of the second molecules being docked to the first molecule.
[0109] According to an example implementation of the present disclosure, determining the first subqueue includes: determining the size of a basic data structure used to dock the first molecule and a second molecule among a plurality of second molecules; obtaining the size of available storage resources in a storage resource pool; and determining the number of second molecules in the first subqueue based on the size of the available storage resources and the size of the basic data structure.
[0110] According to an exemplary implementation of the present disclosure, the number of at least a portion of the second molecules is not higher than a threshold number, and the threshold number is determined according to the specifications of the plurality of second computing units.
[0111] According to an example implementation of the present disclosure, the method further includes generating a first constellation candidate queue, the first constellation candidate queue indicating a first plurality of constellations and a first plurality of energies of the first plurality of constellations.
[0112] According to an example implementation of the present disclosure, the method further includes: in response to determining that the first subqueue includes at least one second molecule, determining a second subqueue from the at least one second molecule; determining, by a second computing unit among a plurality of second computing units, a second plurality of conformations associated with the second subqueue; and generating a second conformation candidate queue, the second conformation candidate queue indicating a second plurality of conformations and a second plurality of energies of the second plurality of conformations.
[0113] According to an example implementation of the present disclosure, the method further includes: processing, by a first computing unit, the first plurality of constellations and the second plurality of constellations based on the first plurality of energies and the second plurality of energies to generate a constellation completion queue.
[0114] According to an example implementation of the present disclosure, the method for establishing a docking queue includes: establishing a path queue, wherein a plurality of elements in the path queue respectively indicate a plurality of paths of a plurality of second molecules and an end marker; in response to determining that a first path element among the plurality of path elements indicates a path among the plurality of paths, adding a group of second molecules under the first path to the docking queue; and using the next path element after the first path element as the first path element.
[0115] According to an example implementation of the present disclosure, the method further includes: in response to determining that the first path element indicates an end marker, adding an end marker to the docking queue.
[0116] According to an example implementation of the present disclosure, a storage resource pool is created using idle video memory resources in a computing device, storage resource space is allocated from the storage resource pool by a first computing unit, and the method further includes: releasing storage resource space to the storage resource pool in response to a first plurality of conformations having been determined.
[0117] According to an example implementation of the present disclosure, the first computing unit is a general processing unit in a computing device, the multiple second computing units are multiple graphics processing units in the computing device, the first molecule is a receptor molecule in molecular docking, and the second molecule is a ligand molecule in molecular docking.
[0118] Example devices and equipment
[0119] FIG12 shows a block diagram of an apparatus 1200 for molecular docking according to some implementations of the present disclosure. The apparatus includes: an establishment module 1210 configured to establish a docking queue by a first computing unit of a computing device, the docking queue indicating a first molecule and a plurality of second molecules to be docked to the first molecule; a determination module 1220 configured to determine a first subqueue in the docking queue, the first subqueue indicating the first molecule and at least a portion of the second molecules in the plurality of second molecules; a loading module 1230 configured to load the first subqueue into a storage resource space allocated from a storage resource pool of the computing device to form a data structure of the first subqueue; and a docking module 1240 configured to read the data structure by a second computing unit among a plurality of second computing units of the computing device to determine a first plurality of conformations associated with the first subqueue, the conformations in the first plurality of conformations indicating postures of at least a portion of the second molecules when docked to the first molecule.
[0120] According to an example implementation of the present disclosure, a determination module includes: a size determination module configured to determine the size of a basic data structure used to dock a first molecule and a second molecule among a plurality of second molecules; an available resource determination module configured to obtain the size of available storage resources in a storage resource pool; and a quantity determination module configured to determine the number of second molecules in the first sub-queue based on the size of the available storage resources and the size of the basic data structure.
[0121] According to an exemplary implementation of the present disclosure, the number of at least a portion of the second molecules is not higher than a threshold number, and the threshold number is determined according to the specifications of the plurality of second computing units.
[0122] According to an exemplary implementation of the present disclosure, the apparatus further includes: a generating module configured to generate a first constellation candidate queue, where the first constellation candidate queue indicates a first plurality of constellations and a first plurality of energies of the first plurality of constellations.
[0123] According to an example implementation of the present disclosure, the determination module is further configured to: in response to determining that the first subqueue includes at least one second molecule, determine a second subqueue from the at least one second molecule; the docking module is further configured to determine, by a second computing unit among the plurality of second computing units, a second plurality of conformations associated with the second subqueue; and the generation module is further configured to generate a second conformation candidate queue, the second conformation candidate queue indicating a second plurality of conformations and a second plurality of energies of the second plurality of conformations.
[0124] According to an example implementation of the present disclosure, the apparatus further includes: a processing module configured to process the first plurality of constellations and the second plurality of constellations by the first computing unit based on the first plurality of energies and the second plurality of energies to generate a constellation completion queue.
[0125] According to an example implementation of the present disclosure, an establishment module includes: a path queue establishment module, configured to establish a path queue, wherein a plurality of elements in the path queue respectively indicate a plurality of paths of a plurality of second molecules and an end marker; a first adding module, configured to add a group of second molecules under the first path to a docking queue in response to determining that a first path element among the plurality of path elements indicates a path among the plurality of paths; and an identification module, configured to use the next path element after the first path element as the first path element.
[0126] According to an example implementation of the present disclosure, the apparatus further includes: a second boundary module configured to add an end marker to the docking queue in response to determining that the first path element indicates an end marker.
[0127] According to an example implementation of the present disclosure, a storage resource pool is created using idle video memory resources in a computing device, storage resource space is allocated from the storage resource pool by a first computing unit, and the apparatus further includes: a release module configured to release storage resource space to the storage resource pool in response to a first plurality of conformations having been determined.
[0128] According to an example implementation of the present disclosure, the first computing unit is a general processing unit in a computing device, the multiple second computing units are multiple graphics processing units in the computing device, the first molecule is a receptor molecule in molecular docking, and the second molecule is a ligand molecule in molecular docking.
[0129] FIG13 shows a block diagram of a device 1300 capable of implementing various implementations of the present disclosure. It should be understood that the computing device 1300 shown in FIG13 is merely exemplary and should not be construed as limiting the functionality and scope of the implementations described herein. The computing device 1300 shown in FIG13 can be used to implement the methods described above.
[0130] As shown in Figure 13, computing device 1300 is in the form of a general-purpose computing device. Components of computing device 1300 may include, but are not limited to, one or more processors or processing units 1310, memory 1320, storage device 1330, one or more communication units 1340, one or more input devices 1350, and one or more output devices 1360. Processing unit 1310 may be a real or virtual processor and is capable of performing various processes according to a program stored in memory 1320. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to increase the parallel processing capabilities of computing device 1300.
[0131] The computing device 1300 typically includes a plurality of computer storage media. Such media can be any available media accessible to the computing device 1300, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 1320 can be a volatile memory (e.g., registers, cache, random access memory (RAM)), a non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 1330 can be a removable or non-removable medium and can include a machine-readable medium such as a flash drive, a disk, or any other medium that can be used to store information and / or data (e.g., training data for training) and can be accessed within the computing device 1300.
[0132] The computing device 1300 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG. 13 , a disk drive for reading from or writing to a removable, non-volatile disk (e.g., a “floppy disk”) and an optical drive for reading from or writing to a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data media interfaces. The memory 1320 may include a computer program product 1325 having one or more program modules configured to perform various methods or actions of various implementations of the present disclosure.
[0133] The communication unit 1340 enables communication with other computing devices via a communication medium. Additionally, the functionality of the components of the computing device 1300 can be implemented as a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the computing device 1300 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or other network nodes.
[0134] Input device 1350 may be one or more input devices, such as a mouse, keyboard, or trackball. Output device 1360 may be one or more output devices, such as a display, speaker, or printer. Computing device 1300 may also communicate with one or more external devices (not shown) via communication unit 1340, as needed, such as storage devices, display devices, or the like, with one or more devices that allow a user to interact with computing device 1300, or with any device that allows computing device 1300 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0135] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is provided, on which a computer program is stored, and when the program is executed by a processor, the method described above is implemented.
[0136] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0137] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0138] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0139] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple implementations of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and a part for a module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0140] While various implementations of the present disclosure have been described above, the foregoing description is intended to be illustrative, not exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is selected to best explain the principles of the implementations, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the various implementations disclosed herein.
Claims
1. A method for molecular docking, comprising: establishing, by a first computing unit of a computing device, a docking queue indicating a plurality of second molecules to be docked to the first molecule; determining a first subqueue in the docking queue, the first subqueue indicating at least a portion of the plurality of second molecules; Loading the first subqueue into a storage resource space allocated from a storage resource pool of the computing device to form a data structure of the first subqueue; as well as The data structure is read by a second computing unit of a plurality of second computing units of the computing device to determine a first plurality of conformations associated with the first subqueue, wherein a conformation in the first plurality of conformations indicates a posture in which a second molecule in the at least a portion of the second molecules is docked to the first molecule.
2. The method according to claim 1, wherein determining the first sub-queue comprises: determining a size of a base data structure for docking the first molecule and a second molecule of the plurality of second molecules; Obtaining the size of available storage resources in the storage resource pool; as well as The number of second molecules in the first sub-queue is determined based on the size of the available storage resource and the size of the basic data structure. 3 . The method according to claim 1 , wherein the amount of the at least a portion of the second molecules is not higher than a threshold amount, the threshold amount being determined according to specifications of the plurality of second computing units.
4. The method according to claim 1, further comprising: A first constellation candidate queue is generated, the first constellation candidate queue indicating the first plurality of constellations and a first plurality of energies of the first plurality of constellations.
5. The method according to claim 4, further comprising: In response to determining that the first subqueue subsequently includes at least one second molecule, determining a second subqueue from the at least one second molecule; determining, by a second computing unit of the plurality of second computing units, a second plurality of constellations associated with the second subqueue; as well as A second constellation candidate queue is generated, the second constellation candidate queue indicating the second plurality of constellations and a second plurality of energies of the second plurality of constellations.
6. The method according to claim 5, further comprising: The first plurality of constellations and the second plurality of constellations are processed by the first computation unit based on the first plurality of energies and the second plurality of energies to generate a constellation completion queue.
7. The method according to claim 1, wherein establishing the docking queue comprises: Establishing a path queue, wherein a plurality of elements in the path queue respectively indicate a plurality of paths and end markers of the plurality of second molecules; In response to determining that a first pathway element of the plurality of pathway elements indicates a pathway in the plurality of pathways, adding a set of second molecules under the first pathway to the docking queue; as well as The next path element after the first path element is used as the first path element.
8. The method according to claim 7, further comprising: In response to determining that the first path element indicates the end marker, an end marker is added to the docking queue.
9. The method according to claim 1, wherein the storage resource pool is created by utilizing idle video memory resources in the computing device, the storage resource space is allocated from the storage resource pool by the first computing unit, and the method further comprises: In response to the first plurality of constellations having been determined, the storage resource space is released to the storage resource pool.
10. The method according to claim 1, wherein the first computing unit is a general processing unit in the computing device, the multiple second computing units are multiple graphics processing units in the computing device, the first molecule is a receptor molecule in molecular docking, and the second molecule is a ligand molecule in molecular docking.
11. A device for molecular docking, comprising: an establishing module configured to establish, by a first computing unit of a computing device, a docking queue indicating a plurality of second molecules to be docked to the first molecule; a determining module configured to determine a first subqueue in the docking queue, wherein the first subqueue indicates at least a portion of the second molecules in the plurality of second molecules; a loading module configured to load the first subqueue into a storage resource space allocated from a storage resource pool of the computing device to form a data structure of the first subqueue; as well as A docking module is configured to read the data structure by a second computing unit among a plurality of second computing units of the computing device to determine a first plurality of conformations associated with the first subqueue, wherein a conformation in the first plurality of conformations indicates a posture in which a second molecule in the at least a portion of the second molecules is docked to the first molecule.
12. An electronic device comprising: at least one processing unit; as well as At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 10 when executed by the at least one processing unit.
13. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to implement the method according to any one of claims 1 to 10.
14. A computer program product tangibly stored in a computer storage medium and comprising computer executable instructions which, when executed by a device, cause the device to perform the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Method and tool suite device for identifying modular structure in complex network
CN102667710A
Task execution method and device, electronic equipment and readable storage medium
CN114217947A
Multi-thread cooperative GPU acceleration method for virtual drug screening
CN114860441A
Method, device, apparatus and medium for molecular docking
CN118072858A
Systems and methods for sampling and analysis of polymer conformational dynamics
US20150220681A1