Method and device for determining volume of cavity in protein, computer equipment and medium
Through the parallel processing method of octree allocation atoms, the problem of low computational efficiency of protein cavity volume in the prior art is solved, and more efficient and accurate determination of cavity volume is achieved.
Patent Information
- Application Number
- CN202410034068.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-08
- Publication Date
- 2025-07-08
AI Technical Summary
The prior art is inefficient in calculating hollow cavity volumes in proteins and requires linear search and probe size parameterization, resulting in a time-consuming calculation.
The method of parallel processing of octree allocated atoms is adopted. By creating an octree, the protein space is divided into local space, and atoms are allocated in parallel to the corresponding nodes, and the cavity nodes of unallocated atoms are traversed to determine the cavity volume.
It improves the calculation efficiency and accuracy of the hollow cavity volume in the protein, can query the cavity nodes faster, reduces the calculation time and improves the determination speed of the cavity volume.
Smart Images

Figure CN120280016A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and particularly to a method, apparatus, computer device, and medium for determining the cavity volume of a protein. Background Art
[0002] Proteins are the material basis of life. All important components of the body require the participation of proteins. Proteins play an important role in biomedical aspects such as drug design and vaccine design. The function of proteins is usually closely related to their three-dimensional structure and internal cavity structure. How to calculate the volume of the cavity in a protein has become the focus of research in this field.
[0003] Currently, the commonly used method is to calculate through KVFinder (Key Volume Finder). KVFinder first divides the protein into a discrete grid system, and then uses a large probe to start from the outside of the protein. According to the size of the probe, the coordinates and radius of the atoms in the grid, it gradually tries whether each grid can accommodate the probe until all reachable grid points are filled by the probe. Subsequently, a slightly smaller probe is used to repeat the above steps. After the probe scanning is completed, since the radius of the large probe is relatively large, it cannot enter the interior of the protein and can only move around outside the protein, while the small probe can fill both the inside and outside of the protein. Finally, subtracting the filling area of the large probe from the filling area of the small probe can obtain the cavity volume of the protein.
[0004] However, in the above technical solution, after calculating all the grids, a linear search is required to scan the filling area of the cavity; at the same time, due to the parameterization of the probe size, for proteins of different shapes, it is necessary to try the optimal probe size to obtain a more accurate cavity volume, resulting in low efficiency in calculating the cavity volume of the protein. Summary of the Invention
[0005] The embodiments of this application provide a method, apparatus, computer device, and medium for determining the cavity volume of a protein, which improves the efficiency of determining the cavity volume of a protein. The technical solution is as follows:
[0006] On the one hand, a method for determining the cavity volume of a protein is provided. The method includes:
[0007] Based on the coordinates of multiple atoms on the protein in the coordinate space, determine the space occupied by the protein in the coordinate space;
[0008] Create an octree based on the space occupied by the protein in the coordinate space. The octree includes multiple nodes. The root node of the octree is used to represent the space, and the other nodes in the octree except the root node are used to represent their respective corresponding local spaces in the space;
[0009] Using the processing threads corresponding to the multiple atoms respectively, based on the coordinates of the multiple atoms and the spaces represented by the nodes in the octree, distribute the multiple atoms into the corresponding nodes in the octree in parallel;
[0010] Traverse the octree to which the multiple atoms have been assigned to obtain multiple cavity nodes. No atoms are assigned to the cavity nodes, and the cavity nodes are used to represent the cavities in the protein;
[0011] Determine the volume of the cavity in the protein based on the spaces corresponding to the multiple cavity nodes.
[0012] On the other hand, provided is a device for determining the volume of a cavity in a protein. The device includes:
[0013] A first determination module, configured to determine the space occupied by the protein in the coordinate space based on the coordinates of multiple atoms on the protein in the coordinate space;
[0014] A first processing module, configured to create an octree based on the space occupied by the protein in the coordinate space. The octree includes multiple nodes. The root node of the octree is used to represent the space, and the other nodes in the octree except the root node are used to represent their respective corresponding local spaces in the space;
[0015] An allocation module, configured to use the processing threads corresponding to the multiple atoms respectively, and based on the coordinates of the multiple atoms and the spaces represented by the nodes in the octree, distribute the multiple atoms into the corresponding nodes in the octree in parallel;
[0016] A traversal module, configured to traverse the octree to which the multiple atoms have been assigned to obtain multiple cavity nodes. No atoms are assigned to the cavity nodes, and the cavity nodes are used to represent the cavities in the protein;
[0017] A second determination module, configured to determine the volume of the cavity in the protein based on the spaces corresponding to the multiple cavity nodes.
[0018] In some embodiments, the allocation module includes:
[0019] A traversal unit, configured to, for any one of the multiple atoms, traverse the nodes in the octree during the process of distributing the atom using the processing thread corresponding to the atom;
[0020] A processing unit, configured to, during the process of traversing a current node, if the coordinates of the atom are within the space represented by the current node, and when the current node does not have multiple child nodes, use the current node as the parent node to create multiple child nodes of the current node in the octree, where the current node is any node in the octree;
[0021] An allocation unit, configured to, when the current node has multiple child nodes, based on the coordinates of the atom and the spaces represented by the multiple child nodes, allocate the atom to the child node corresponding to the space where the coordinates of the atom are located.
[0022] In some embodiments, the processing unit is configured to, if the coordinates of the atom are within the space represented by the current node, when the current node does not meet the first preset condition and the second preset condition, and the current node does not have multiple child nodes, use the current node as the parent node to create multiple child nodes of the current node in the octree. The first preset condition is that the depth of the current node in the octree reaches a preset depth, and the second preset condition is that the size of the space represented by the current node is smaller than the size of the atom.
[0023] In some embodiments, the allocation unit is further configured to, if the coordinates of the atom are within the space represented by the current node, when the current node meets the first preset condition or the second preset condition, allocate the atom to the current node.
[0024] In some embodiments, the traversal module is configured to, during the process of traversing the octree to which the multiple atoms have been allocated, for any node in the octree, if there is no atom in the space represented by the node, determine that the node is a cavity node; stop traversing the child nodes of the node; if there is an atom in the space represented by the node, continue to traverse the child nodes of the node.
[0025] In some embodiments, the second determination module includes:
[0026] An acquisition unit, configured to acquire multiple internal cavity nodes from the multiple cavity nodes, where the internal cavity nodes are used to represent the cavities of the protein;
[0027] A first determination unit, configured to determine the sizes of the spaces corresponding to the multiple internal cavity nodes respectively based on the depths of the multiple internal cavity nodes in the octree and the size of the space occupied by the protein;
[0028] A second determination unit, configured to determine the volume of the cavity in the protein based on the dimensions of the spaces corresponding to the multiple internal cavity nodes.
[0029] In some embodiments, the acquisition unit includes:
[0030] A transmitting subunit, configured to emit a ray starting from the central position of the space represented by any one of the multiple cavity nodes for any one of the multiple cavity nodes;
[0031] An acquisition subunit, configured to acquire multiple internal cavity nodes from the multiple cavity nodes based on the intersection points between the ray and the outer contour of the protein.
[0032] In some embodiments, the acquisition subunit is configured to determine that the cavity node is an internal cavity node when the number of intersection points between the ray and the outer contour of the protein is odd; and determine that the cavity node is an external cavity node when the number of intersection points between the ray and the outer contour of the protein is even, where the external cavity node is used to represent the space located outside the protein.
[0033] In some embodiments, the apparatus further includes:
[0034] An acquisition module, configured to acquire multiple surface residues of the protein from the multiple residues based on the solvent-accessible surface areas of the multiple residues in the protein, where the multiple surface residues refer to the residues located on the surface of the protein;
[0035] A second processing module, configured to perform triangulation on the multiple atoms with the multiple atoms among the multiple surface residues as vertices to obtain the topological structure of the protein, where the topological structure is used to represent the outer contour of the protein.
[0036] In some embodiments, multiple rays are emitted from the central position of the space represented by each cavity node;
[0037] The acquisition subunit is configured to, for any one of the multiple rays of any one cavity node, use the ray as a first ray if the number of intersection points between the ray and the outer contour of the protein is odd; use the ray as a second ray if the number of intersection points between the ray and the outer contour of the protein is even; and determine the cavity node as an internal cavity node when the number of first rays is greater than the number of second rays.
[0038] In some embodiments, the apparatus further includes:
[0039] A third processing module is used to traverse starting from the root node of the octree. Taking the first cavity node as the starting node, it creates a connectivity list for the first cavity node and adds the first cavity node to the connectivity list. The first cavity node is the first internal cavity node found during the current traversal process, and the first cavity node has not been added to any connectivity list before. The connectivity list is used to represent the cavity connectivity block where the cavity represented by the first cavity node is located. The cavity connectivity block includes other cavities connected to the cavity represented by the first cavity node. It searches for a second cavity node in the octree and, in the case where the second cavity node has not been added to any connectivity list, adds the second cavity node to the connectivity list of the first cavity node. The second cavity node has the same depth as the first cavity node in the octree and is a child node of the same parent node.
[0040] In some embodiments, the third processing module is further used to search for a third cavity node in the octree. In the case where the third cavity node has not been added to any connectivity list, if the cavity represented by the third cavity node is adjacent to the cavity represented by the second cavity node already added to the connectivity list of the first cavity node, it adds the third cavity node to the connectivity list of the first cavity node. The third cavity node is a child node of the first cavity node.
[0041] On the other hand, a computer device is provided. The computer device includes a processor and a memory. The memory is used to store at least one segment of computer program, and the at least one segment of computer program is loaded and executed by the processor to implement the method for determining the cavity volume in a protein in the embodiments of the present application.
[0042] On the other hand, a computer-readable storage medium is provided. At least one segment of computer program is stored in the computer-readable storage medium, and the at least one segment of computer program is loaded and executed by a processor to implement the method for determining the cavity volume in a protein as in the embodiments of the present application.
[0043] On the other hand, a computer program product is provided, including a computer program. The computer program is stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method for determining the cavity volume in a protein provided in the above various aspects or various optional implementation manners of each aspect.
[0044] The embodiment of the present application provides a method for determining the cavity volume of a protein. By using the coordinates of atoms on the protein in the coordinate space, the space occupied by the protein is determined, so that the space can accurately cover the whole protein. Then, by creating an octree, the space occupied by the protein is divided into multiple local spaces. Then, by allocating a processing thread to each atom on the protein, each atom can be allocated to the corresponding node in the octree in parallel according to the processing thread corresponding to each atom, that is, the local space where each atom on the protein is located is determined in parallel. Since each atom corresponds to a processing thread, the allocation processes of multiple atoms can be carried out without interference and simultaneously, improving the efficiency of determining the space where the atoms are located. Then, by traversing the octree, the nodes that have not been allocated atoms can be queried more quickly, so as to determine the cavities in the protein where there are no atoms, and then determine the volume of the cavities, improving the efficiency of determining the cavity volume of the protein. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0046] Figure 1 is a schematic diagram of the implementation environment of a method for determining the cavity volume of a protein provided by an embodiment of the present application;
[0047] Figure 2 is a flowchart of a method for determining the cavity volume of a protein provided by an embodiment of the present application;
[0048] Figure 3 is a flowchart of another method for determining the cavity volume of a protein provided by an embodiment of the present application;
[0049] Figure 4 is a schematic diagram of the space occupied by a protein provided by an embodiment of the present application;
[0050] Figure 5 is a schematic diagram of a triangulation provided by an embodiment of the present application;
[0051] Figure 6 is a block diagram of a device for determining the cavity volume of a protein provided by an embodiment of the present application;
[0052] Figure 7 is a block diagram of another device for determining the cavity volume of a protein provided by an embodiment of the present application;
[0053] Figure 8It is a structural block diagram of a terminal provided according to an embodiment of the present application;
[0054] Figure 9 It is a schematic structural diagram of a server provided according to an embodiment of the present application. Detailed implementation manners
[0055] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0056] In the present application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and effects. It should be understood that there is no logical or chronological dependency between "first", "second", and "nth", nor are the quantity and execution order limited.
[0057] In the present application, the term "at least one" means one or more, and the meaning of "multiple" means two or more.
[0058] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.), and signals involved in the present application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards of relevant countries and regions. For example, the protein data involved in the present application is obtained under full authorization.
[0059] For the convenience of understanding, the following explains the terms involved in the present application.
[0060] Artificial Intelligence (AI) is a theory, method, technology, and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines to enable the machines to have the functions of perception, reasoning, and decision-making.
[0061] Artificial intelligence technology is a comprehensive discipline that involves a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, pre-trained model technology, operation / interaction systems, mechatronics, etc. Among them, the pre-trained model, also known as the large model or the basic model, can be widely applied to downstream tasks in various directions of artificial intelligence after fine-tuning. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0062] With the research and progress of artificial intelligence technology, artificial intelligence technology has been studied and applied in multiple fields. For example, common ones include smart home, smart wearable devices, virtual assistants, smart speakers, smart marketing, driverless, autonomous driving, drones, digital twins, virtual humans, robots, artificial intelligence-generated content (AIGC), conversational interaction, intelligent healthcare, intelligent customer service, game AI, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role. The method for determining the cavity volume in a protein provided by the embodiments of this application can be applied in intelligent healthcare.
[0063] The method for determining the cavity volume in a protein provided by the embodiments of this application can be executed by a computer device. In some embodiments, the computer device is a terminal or a server. First, taking the computer device as a terminal as an example, the implementation environment of the method for determining the cavity volume in a protein provided by the embodiments of this application will be introduced. Figure 1 is a schematic diagram of the implementation environment of a method for determining the cavity volume in a protein provided by the embodiments of this application. Refer to Figure 1 This implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 can be directly or indirectly connected through wired or wireless communication means, and this application does not limit this.
[0064] In some embodiments, the terminal 101 is a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, etc., but is not limited thereto. The terminal 101 supports an application program for protein detection. This application program can be a medical application program or a detection application program, and the embodiments of this application do not limit this. Schematically, the terminal 101 is the terminal used by the user. The terminal 101 can obtain the structure information of any protein from the server 102. The structure information of the protein includes the positions of the atoms on the protein on the protein. The terminal 101 can determine the cavity in the protein according to the structure information of the protein, and thus calculate the volume of the cavity in the protein. The cavity refers to the blank space on the protein where there are no atoms.
[0065] Those skilled in the art will understand that the number of the above terminals may be more or less. For example, there may be only one of the above terminals, or there may be dozens or hundreds of the above terminals, or even more. The embodiments of the present application do not limit the number and device type of the terminals.
[0066] In some embodiments, the server 102 is an independent physical server, and can also be a server cluster or a distributed system composed of multiple physical servers, and can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), big data, and artificial intelligence platforms. The server 102 is used to provide background services for an application program that supports protein detection. In some embodiments, the server 102 undertakes the main computing work, and the terminal 101 undertakes the secondary computing work; or, the server 102 undertakes the secondary computing work, and the terminal 101 undertakes the main computing work; or, the server 102 and the terminal 101 adopt a distributed computing architecture for collaborative computing.
[0067] Figure 2 is a flowchart of a method for determining the cavity volume in a protein according to an embodiment of the present application. Refer to Figure 2 , and in the embodiments of the present application, taking the execution by the terminal as an example for illustration. The method for determining the cavity volume in a protein includes the following steps:
[0068] 201. The terminal determines the space occupied by the protein in the coordinate space based on the coordinates of multiple atoms on the protein in the coordinate space.
[0069] In the embodiments of the present application, the protein can be artificially synthesized or already exist in nature, and the embodiments of the present application do not limit the structure of the protein. The terminal obtains the coordinates of each atom on the protein in the coordinate space. The coordinate space can be a coordinate space with any atom on the protein as the origin, or a coordinate space with any other position as the origin, and the embodiments of the present application do not limit this. Then, the terminal determines the space occupied by the protein in the coordinate space according to the coordinates of all atoms on the protein. The space occupied by the protein covers all atoms on the protein. This step is equivalent to placing the protein in the coordinate space and using the coordinates of multiple atoms on the protein in the coordinate space to describe the structure of the protein.
[0070] 202. The terminal creates an octree based on the space occupied by the protein in the coordinate space. The octree includes multiple nodes. The root node of the octree is used to represent the space, and the other nodes in the octree except the root node are used to represent the respective local spaces in the space.
[0071] In an embodiment of the present application, the terminal creates a root node of an octree according to the space occupied by a protein in the coordinate space. The root node includes the coordinate range involved by the atoms on the protein. This coordinate range is used to represent the space occupied by the protein in the coordinate space. Then, the terminal uses the root node as the parent node and creates multiple child nodes of the root node. Each child node is used to represent a respective local space in the space occupied by the protein. Each child node may include the coordinate range of the local space corresponding to the child node. The terminal may also create child nodes of the child node on the basis of the child nodes of the root node. That is, the terminal may create child nodes of the node again on the basis of the existing nodes in the octree. By creating the octree, the terminal divides the space occupied by the protein into multiple parts, which is equivalent to dividing the whole protein into multiple parts.
[0072] 203. The terminal uses the processing threads corresponding to multiple atoms respectively, and based on the coordinates of the multiple atoms and the spaces represented by the respective nodes in the octree, distributes the multiple atoms into the corresponding nodes in the octree in parallel.
[0073] In an embodiment of the present application, the terminal assigns a processing thread to each atom on the protein. For any one of the multiple atoms on the protein, the terminal traverses each node in the octree based on the processing thread corresponding to the atom. During the process of traversing any node, the terminal compares the coordinate of the atom with the coordinate range corresponding to the space represented by the node. When the coordinate of the atom is within the coordinate range corresponding to the node, it indicates that the atom is in the space represented by the node. In this case, the terminal distributes the atom into the node. When the coordinate of the atom is outside the coordinate range corresponding to the node, it indicates that the atom is not in the space represented by the node. In this case, the terminal traverses the next node of the node.
[0074] Wherein, during the process of distributing the atom into the node, the terminal may record any information that can represent the atom, such as the identifier of the atom or the coordinate of the atom, in the data of the node. The embodiment of the present application does not limit this. The process of distributing the atom can be regarded as the process of inserting the atom. Taking the atom as the object, the atom is inserted into the corresponding node in the octree.
[0075] 204. The terminal traverses the octree to which multiple atoms have been distributed, and obtains multiple cavity nodes. No atom is assigned to the cavity nodes, and the cavity nodes are used to represent the cavities in the protein.
[0076] In the embodiments of the present application, the cavity in a protein refers to a hole or channel on the protein where there is no substance (such as an atom). The cavity in the protein can be a closed cavity located inside the protein or a cavity communicating with the outside world, and the embodiments of the present application do not limit this. After all the atoms on the protein are assigned to the nodes in the octree, the terminal traverses the octree again to query the nodes in the octree that have not been assigned atoms. The nodes that have not been assigned atoms indicate that there are no atoms in the space corresponding to the nodes, which is a blank area. The terminal takes the nodes that have not been assigned atoms as cavity nodes. The space represented by the cavity nodes can be a complete cavity or a part of a cavity, and the embodiments of the present application do not limit this.
[0077] 205. The terminal determines the volume of the cavity in the protein based on the spaces corresponding to multiple cavity nodes.
[0078] In the embodiments of the present application, the terminal calculates the volume of the cavity in the protein according to the sizes of the spaces corresponding to multiple cavity nodes.
[0079] The embodiments of the present application provide a method for determining the volume of a cavity in a protein. By the coordinates of the atoms on the protein in the coordinate space, the space occupied by the protein is determined, so that the space can accurately cover the whole protein; then by creating an octree, the space occupied by the protein is divided into multiple local spaces; then by assigning a processing thread to each atom on the protein, it is possible to parallelly assign each atom to the corresponding node in the octree according to the processing thread corresponding to each atom, that is, parallelly determine the local space where each atom on the protein is located. Since each atom corresponds to a processing thread, the allocation processes of multiple atoms can be carried out without interference and simultaneously, improving the efficiency of determining the space where the atoms are located; then, traversing the octree can more quickly query the nodes that have not been assigned atoms, thereby determining the cavities in the protein where there are no atoms, and further determining the volume of the cavities, improving the efficiency of determining the volume of the cavities in the protein.
[0080] Figure 3 is a flowchart of another method for determining the volume of a cavity in a protein provided by the embodiments of the present application. Refer to Figure 3 , in the embodiments of the present application, it is described by taking the execution by the terminal as an example. The method for determining the volume of the cavity in the protein includes the following steps:
[0081] 301. The terminal determines the space occupied by the protein in the coordinate space based on the coordinates of multiple atoms on the protein in the coordinate space.
[0082] In an embodiment of the present application, the terminal can obtain the coordinates of multiple atoms on the protein in the coordinate space from the structure file of the protein. The structure file can be a PDB (protein data bank) file, and the embodiments of the present application do not limit this. The coordinate space can be a Cartesian coordinate system; correspondingly, the coordinates of the atoms include the coordinate values in three coordinate directions such as x, y, and z. Then, the terminal determines the space occupied by the protein in the coordinate space according to the coordinates of multiple atoms on the protein.
[0083] Among them, the terminal can compare the coordinates of multiple atoms. Then, the terminal obtains multiple boundary atoms on the protein from the multiple atoms. There is at least one coordinate value in the position coordinates of each boundary atom that is the maximum or minimum value. The maximum or minimum value means that the coordinate value is the maximum or minimum value among the coordinate values of all atoms in the corresponding coordinate direction. Then, the terminal determines the space occupied by the protein in the coordinate space based on the coordinates of multiple boundary atoms. Each boundary atom is located on the boundary of the space occupied by the protein.
[0084] For example, the protein includes 100 atoms such as n1 to n100. Among the 100 atoms of the protein, the coordinate of atom n1 is (x1, y1, z1). Among them, if in the coordinate direction indicated by x, the coordinate value x1 is the maximum or minimum coordinate value among the above 100 atoms, then the terminal takes atom n1 as a boundary atom. That is, the terminal finds the maximum and minimum coordinate values in the x, y, and z coordinate directions from the coordinates of multiple atoms in the protein, so as to determine the space occupied by the protein.
[0085] The space occupied by the protein can be a cubic space, a spherical space, or an irregular space, and the embodiments of the present application do not limit this. For example, Figure 4 is a schematic diagram of the space occupied by a protein provided according to an embodiment of the present application. Refer to Figure 4 , the space occupied by protein 401 is cubic space 402. The surfaces and edges on cubic space 402 can be regarded as the boundaries of cubic space 402. There are boundary atoms on protein 401 on the boundary of cubic space 402.
[0086] 302. The terminal creates an octree based on the space occupied by the protein in the coordinate space. The octree includes multiple nodes. The root node of the octree is used to represent the space, and the other nodes in the octree except the root node are used to represent the respective local spaces in the space.
[0087] In the embodiments of the present application, the terminal creates the root node of the octree according to the space occupied by the protein in the coordinate space. The root node may include the coordinates of multiple boundary atoms on the protein; the coordinates of the multiple boundary atoms can reflect the coordinate range of the space occupied by the protein. Alternatively, the root node may include the minimum and maximum values of the coordinate values of multiple atoms on the protein in each coordinate direction. That is to say, the root node may include the minimum and maximum values in the three coordinate directions of the x, y, and z axes of the protein structure, so as to reflect the coordinate range of the space occupied by the protein. The embodiments of the present application do not limit the representation method of the space occupied by the protein. Then, the terminal can use the root node as the parent node and create eight child nodes of the root node. Each child node is used to represent the respective corresponding local space in the space occupied by the protein. In this case, the terminal obtains the octree in the initial state. The initial state refers to the state that does not contain atomic information, that is, the state in which atoms are not allocated to the octree.
[0088] 303. The terminal uses the respective processing threads corresponding to multiple atoms and, based on the coordinates of the multiple atoms and the spaces represented by the respective nodes in the octree, parallelly allocates the multiple atoms to the corresponding nodes in the octree.
[0089] In the embodiments of the present application, the terminal can allocate a processing thread to each atom on the protein. For any one of the multiple atoms, during the process of allocating the atom using the processing thread corresponding to the atom, the terminal traverses the nodes in the octree. During the process of traversing the current node, if the coordinates of the atom are within the space represented by the current node, and in the case where the current node does not have multiple child nodes, the terminal uses the current node as the parent node and creates multiple child nodes of the current node in the octree. In the case where the current node has multiple child nodes, the terminal allocates the atom to the child node corresponding to the space where the coordinates of the atom are located based on the coordinates of the atom and the spaces represented by the multiple child nodes. Wherein, the current node is any node in the octree. The terminal uses multiple processing threads to parallelly allocate the multiple atoms to the corresponding nodes in the octree respectively. The solution provided by the embodiments of the present application, by allocating a processing thread to each atom on the protein, enables the parallel allocation of each atom to the corresponding node in the octree according to the processing thread corresponding to each atom, that is, parallelly determines the local space where each atom on the protein is located. Since each atom corresponds to a processing thread, the allocation processes of multiple atoms can be independent of each other and carried out simultaneously, improving the efficiency of determining the space where the atoms are located.
[0090] The terminal divides the space occupied by the protein into multiple parts through an octree, that is, divides the whole protein into multiple parts. In other words, during the process of creating child nodes for any node in the octree, it is equivalent to further dividing the space represented by the node to obtain multiple smaller-sized spaces. The divided spaces can be called grids or lattices. The terminal can divide the space occupied by the protein by creating an octree according to a preset resolution. The resolution determines the size and quantity of the smallest spaces after division. For the space (lattice) represented by each node, the terminal can establish an index of the space and store it in the corresponding node. The index of the space can be the coordinates (i, j, k) of the central position of the space, and the embodiments of the present application do not limit this.
[0091] In some embodiments, when the space is divided to a certain extent, the terminal may no longer continue to divide downward. That is, when the created node meets the preset conditions, the terminal does not create the child nodes of the node. When the created node does not meet the preset conditions, the terminal can create the child nodes of the node. Correspondingly, the process by which the terminal creates multiple child nodes of the current node in the octree includes: if the coordinates of the atom are located in the space represented by the current node, and the current node does not meet the first preset condition and the second preset condition, and the current node does not have multiple child nodes, the terminal uses the current node as the parent node and creates multiple child nodes of the current node in the octree. If the coordinates of the atom are located in the space represented by the current node, and the current node meets the first preset condition or the second preset condition, the terminal assigns the atom to the current node.
[0092] Among them, the first preset condition is that the depth of the current node in the octree reaches the preset depth. The depth of a node refers to the number of edges of the longest simple path from the root node of the octree to the node. The depth of the root node is 0. The depth of the child nodes of the root node is 1. The embodiments of the present application do not limit the size of the preset depth. The second preset condition is that the size of the space represented by the current node is smaller than the size of the atom. In the solution provided by the embodiments of the present application, when the current node meets the first preset condition, the child nodes of the current node are no longer created, that is, the space represented by the current node is no longer divided, so that the division of the protein can meet the requirements, such as the size of the smallest space after division meets the expectation, etc., which is beneficial to the subsequent calculation of the cavity volume; since when the current node meets the second preset condition, the size of the space where the atom is located is already smaller than the size of the atom, even if it is further divided, the space occupied by the atom is still the space corresponding to the current node, and the position of the atom cannot be accurately determined anymore, and the division is meaningless. Therefore, when the current node meets the second preset condition, the child nodes of the current node are no longer created, saving the running consumption on the basis of ensuring that the cavity volume can be accurately calculated according to the position of the atom.
[0093] The terminal can set a preset depth according to the resolution of the space to be divided. The terminal determines the minimum expected size according to the resolution. The minimum expected size refers to the size of the smallest space after division. Then, the terminal determines the preset depth according to the size of the space occupied by the protein and the minimum expected size.
[0094] For example, the side length of the space occupied by the protein is L. The minimum expected size is the side length of the smallest space, which is M. Then the preset depth = the side length of the space occupied by the protein / the minimum expected size = L / M.
[0095] In some embodiments, the processing thread can be a GPU (Graphics Processing Unit) thread, and the embodiments of the present application do not limit this. Correspondingly, the terminal transfers data such as the coordinates and sizes of multiple atoms on the protein to the GPU memory to process the atoms through the GPU thread. This method can make full use of hardware resources to accelerate complex calculation processes. Among them, the terminal can transfer the data of multiple atoms in the form of an array, which can improve the data transfer efficiency.
[0096] In some embodiments, according to the GPU hardware limitation, the terminal can divide multiple atoms into multiple batches for processing. For any batch of multiple atoms, the terminal assigns a GPU thread to each of the multiple atoms in this batch. Then, the terminal uses the processing threads corresponding to each of the multiple atoms in this batch, and based on the coordinates of the multiple atoms and the spaces represented by each node in the octree, parallelly assigns the multiple atoms in this batch to the corresponding nodes in the octree.
[0097] In some embodiments, after the processing threads of all atoms on the protein are processed, the terminal can use the synchronization primitive provided by the GPU to implement the synchronization of the processing threads to ensure that all atoms are fully assigned to the corresponding nodes in the octree. This synchronization primitive can be the __syncthreads() function of CUDA (Compute Unified Device Architecture), and the embodiments of the present application do not limit this. When ensuring that all atoms are fully assigned to the corresponding nodes in the octree, the octree corresponding to the protein is considered to be created. The terminal can transfer the data of the octree back to the CPU (Central Processing Unit). Among them, the terminal can transfer the data of the octree in the form of an array, which can improve the data transfer efficiency.
[0098] 304. The terminal traverses the octree to which multiple atoms have been assigned, and obtains multiple cavity nodes. No atoms are assigned to the cavity nodes, and the cavity nodes are used to represent the cavities in the space occupied by the protein.
[0099] In the embodiments of the present application, the nodes in the octree can be divided into two cases. In one case, there are atoms in the space represented by the node, and it can be considered that the node is in a state of intersecting with the atoms. Intersection means that there is an overlap between the space represented by the node and the space occupied by the atoms. In the other case, there are no atoms in the space represented by the node, and it can be considered that the node is in a cavity state. The cavity state means that the space represented by the node is empty. After allocating the atoms to the nodes in the octree, the terminal can record the state of the node in the data of the node, and the embodiments of the present application do not limit this. For any node in the octree, if the node intersects with the atoms, there may be nodes in its child nodes that intersect with the atoms, or there may be nodes in a cavity state. If the node is in a cavity state, all its child nodes are in a cavity state. That is, if there is no overlap between the space represented by the node and the space occupied by the atoms, there will also be no overlap between the space represented by the child nodes of the node and the space occupied by the atoms.
[0100] Correspondingly, the process by which the terminal traverses the octree to which multiple atoms have been allocated to obtain multiple cavity nodes includes: In the process of traversing the octree to which multiple atoms have been allocated, for any node in the octree, when there are no atoms in the space represented by the node, the terminal determines that the node is a cavity node. The terminal stops traversing the child nodes of the node. When there are atoms in the space represented by the node, the terminal continues to traverse the child nodes of the node. The solution provided by the embodiments of the present application will only traverse the child nodes of a node when there are atoms in the space represented by the node, so as to be able to more accurately locate the atoms on the protein; when there are no atoms in the space represented by the node, it will no longer traverse the child nodes of the node, which can save running consumption and improve the efficiency of obtaining cavity nodes.
[0101] 305. The terminal obtains multiple internal cavity nodes from the multiple cavity nodes, and the internal cavity nodes are used to represent the cavities of the protein.
[0102] In the embodiments of the present application, the space represented by the cavity nodes obtained in step 304 may be located inside the protein or outside the protein. Because the space occupied by the protein determined in step 301 is not closely attached to the surface of the protein, but can cover a larger space of the entire protein. Therefore, the space represented by the cavity nodes obtained in step 304 may be located between the surface of the protein and the boundary of the space occupied by the protein. For example, see also Figure 4, the space represented by the cavity node may be located between the surface of the protein 401 and the boundary of the cubic space 402. Since the space outside the protein is irrelevant to the protein, the terminal can filter out the cavity nodes corresponding to the space outside the protein from multiple cavity nodes, so as to obtain multiple internal cavity nodes.
[0103] In some embodiments, the process by which the terminal obtains multiple internal cavity nodes from multiple cavity nodes includes: for any cavity node among the multiple cavity nodes, the terminal emits a ray starting from the central position of the space represented by the cavity node. Then, the terminal obtains multiple internal cavity nodes from the multiple cavity nodes based on the intersection points between the ray and the outer contour of the protein. Among them, the terminal can add the minimum and maximum values of the space represented by the cavity node on the x, y, and z axes and divide the sum by 2 to obtain the coordinates of the central position of the cavity node. The embodiments of the present application do not limit the method for determining the central position. The direction of the ray can be any random direction, and the embodiments of the present application do not limit this. The direction of the ray can be obtained by generating random azimuth and elevation angles in the spherical coordinate system, and the embodiments of the present application do not limit this.
[0104] If the space represented by the cavity node is located in the protein, the ray emitted from the central position of the cavity node generally passes through the protein, thus forming an intersection point with the outer contour of the protein. If the space represented by the cavity node is located outside the protein, the ray emitted from the central position of the cavity node generally passes into the protein and then passes out of the protein, thus forming two intersection points with the outer contour of the protein; or does not pass through the protein, thus having no intersection point with the outer contour of the protein. Optionally, the terminal can determine the positional relationship between the space represented by the cavity node and the protein according to the number of intersection points. Correspondingly, the process by which the terminal obtains multiple internal cavity nodes includes: when the number of intersection points between the ray and the outer contour of the protein is odd, the terminal determines that the cavity node is an internal cavity node. When the number of intersection points between the ray and the outer contour of the protein is even, the terminal determines that the cavity node is an external cavity node. The external cavity node is used to represent the space located outside the protein.
[0105] In some embodiments, multiple rays are emitted from the central position of the space represented by each cavity node. Correspondingly, the process by which the terminal obtains multiple internal cavity nodes includes: for any one of the multiple rays of any cavity node, if the number of intersections between the ray and the outer contour of the protein is odd, the terminal takes the ray as the first ray. If the number of intersections between the ray and the outer contour of the protein is even, the terminal takes the ray as the second ray. When the number of first rays is greater than the number of second rays, the terminal takes the cavity node as an internal cavity node. Alternatively, when the proportion of the number of first rays in the total number of rays reaches a proportion threshold, the terminal takes the cavity node as an internal cavity node. The embodiments of the present application do not limit this. The solution provided by the embodiments of the present application, for any cavity node, emits multiple rays starting from the central position of the space represented by the cavity node, and based on the intersection situation between the multiple rays and the outer contour of the protein, can more accurately determine the positional relationship between the space represented by the cavity node and the protein, whether it is inside the protein or outside the protein, thereby facilitating more accurate calculation of the volume of the cavity in the protein later.
[0106] Wherein, the outer contour of the protein refers to the topological structure of the protein. Correspondingly, the process by which the terminal obtains the outer contour of the protein includes: the terminal obtains multiple surface residues of the protein from multiple residues based on the solvent accessible surface area of the multiple residues in the protein. The multiple surface residues refer to the residues located on the surface of the protein. Then, the terminal triangulates multiple atoms with multiple atoms among the multiple surface residues as vertices to obtain the topological structure of the protein. The topological structure is used to represent the outer contour of the protein. Among them, for any residue on the protein, the terminal can calculate the solvent accessible surface area of each atom in the residue through the ShrakeRupley algorithm. Then, the terminal sums up the solvent accessible surface areas of the multiple atoms in the residue to obtain the solvent accessible surface area of the residue. Then, the terminal takes the residues that meet the preset area condition of the solvent accessible surface area as the surface residues of the protein. Then, the terminal performs Delaunay triangulation on multiple atoms with multiple atoms among the multiple surface residues as vertices, thereby obtaining the topological structure of the protein.
[0107] For example, Figure 5 is a schematic diagram of a triangulation provided according to an embodiment of the present application. Refer to Figure 5 , Figure 5 In (a) shows an exemplary protein. The terminal performs Delaunay triangulation on multiple atoms with multiple atoms among the multiple surface residues on the protein as vertices to obtain the outer contour of the protein. Please refer to Figure 5 In (b). The outer contour of the protein is a reticular topological structure.
[0108] In some embodiments, during the process of determining whether a cavity node is an internal cavity node, the terminal may also allocate a processing thread (such as a GPU thread) to each cavity node. The terminal uses the processing threads corresponding to the multiple cavity nodes to determine in parallel whether each cavity node is an internal cavity node or an external cavity node, thereby improving the efficiency of obtaining internal cavity nodes.
[0109] 306. The terminal determines the sizes of the spaces corresponding to the multiple internal cavity nodes based on the depths of the multiple internal cavity nodes in the octree and the size of the space occupied by the protein.
[0110] In the embodiments of the present application, for any one of the multiple internal cavity nodes, the terminal determines the size of the space represented by the internal cavity node according to the depth of the internal cavity node in the octree and the size of the space occupied by the protein.
[0111] For example, the side length of the space occupied by the protein represented by the root node of the octree is L. The side length of the space represented by each child node is 1 / 2 of the side length of the space represented by its parent node. The volume of the space represented by each child node is 1 / 8 of the volume of the space represented by its parent node. For a node with a depth of d, the side length of the node is: L / 2^d. Therefore, the volume of the space represented by the node is (L / 2^d)^3.
[0112] 307. The terminal determines the volume of the cavity in the protein based on the sizes of the spaces corresponding to the multiple internal cavity nodes.
[0113] In the embodiments of the present application, the terminal sums the sizes of the spaces corresponding to the multiple internal cavity nodes to obtain the volume of the cavity in the protein.
[0114] In some embodiments, the terminal may also determine which aggregated cavities in the protein are in blocks. An aggregated cavity refers to a larger cavity composed of multiple adjacent cavities. The terminal can quickly find the position and size of the aggregated cavity, facilitating subsequent operations such as studying or engineering the aggregated cavity in the protein. After calculating the cavity volume, the terminal can determine the state of the nodes in the octree. The state of the nodes can be divided into three types, namely intersecting with atoms, internal cavity, and external cavity. The terminal can record the state of the nodes in the corresponding nodes. Then, based on the state of the nodes, the terminal can traverse the octree to query the cavities adjacent in space.
[0115] Accordingly, the terminal starts traversing from the root node of the octree, takes the first cavity node as the starting node, creates a connected list of the first cavity node, and adds the first cavity node to the connected list. The first cavity node is the first internal cavity node found during the current traversal, and the first cavity node has not been added to any connected list before. The connected list of the first cavity node is used to represent the cavity connected component where the cavity represented by the first cavity node is located. The cavity connected component includes, in addition to the cavity represented by the first cavity node, other cavities connected to the cavity represented by the first cavity node. Then, the terminal searches for a second cavity node in the octree. The second cavity node has the same depth as the first cavity node in the octree and is a child node of the same parent node. The second cavity node can be called the sibling node of the first cavity node. When the second cavity node has not been added to any connected list, the terminal adds the second cavity node to the connected list of the first cavity node.
[0116] In some embodiments, the terminal may search for a third cavity node in the octree. The third cavity node is a child node of the first cavity node. When the third cavity node has not been added to any connected list, if the cavity represented by the third cavity node is adjacent to the cavity represented by the second cavity node already added to the connected list of the first cavity node, the third cavity node is added to the connected list of the first cavity node. For all adjacent internal cavity nodes of the currently traversed node, in a recursive search manner, query the sibling nodes and child nodes of each internal cavity node until all nodes of the current cavity connected component are searched. The solution provided by the embodiments of the present application can effectively search for the connected components of the cavities inside the protein, that is, by means of the tree-like data structure of the octree, more quickly retrieve adjacent cavities to obtain the cavity connected components, without having to linearly scan all spaces one by one. This helps to study the structure and distribution of the cavities inside the protein and is of great significance for fields such as drug design and protein function research.
[0117] In some embodiments, after completing the connected list, the terminal may also add the connected list to the connected component list to count the multiple cavity connected components queried through the connected component list.
[0118] The method for determining the cavity volume in a protein provided by the embodiments of the present application can be applied to the following various scenarios:
[0119] Drug design: During the drug design process, researchers need to understand the cavity structure inside the protein in order to find potential drug binding sites. This solution can efficiently calculate the volume and connectivity of protein cavities, helping researchers more accurately identify potential drug targets.
[0120] Protein function research: The function of a protein is usually closely related to its three-dimensional structure and the internal cavity structure. This solution can help researchers quickly understand the cavity characteristics inside the protein, thereby inferring the protein's function and interaction mechanism.
[0121] Vaccine design: During the vaccine design process, it is usually necessary to modify and mutate the antigen to obtain a more stable structure, thereby enhancing the antibody's ability to recognize it. This solution can provide information on the volume of the internal cavity of the protein and the surrounding residues. Researchers can perform site mutations on some internal cavities to reduce the volume of the internal cavity or completely fill it, thereby improving the stability of the vaccine.
[0122] Bioinformatics software: This solution can be integrated into bioinformatics software as a functional module to provide users with the functions of calculating the cavity volume of proteins and analyzing connectivity. This will help a wide range of bioinformatics researchers and laboratories more conveniently analyze protein structure data.
[0123] Online protein structure analysis platform: This solution can be applied to an online protein structure analysis platform to provide users with real-time services for calculating the cavity volume of proteins. Users can upload the structure file of the protein and quickly obtain the results of cavity volume and connectivity analysis, thereby providing a basis for further research.
[0124] The embodiments of this application provide a method for determining the cavity volume in a protein. By using the coordinates of atoms on the protein in the coordinate space, the space occupied by the protein is determined so that this space can accurately cover the whole protein. Then, by creating an octree, the space occupied by the protein is divided into multiple local spaces. Then, by assigning a processing thread to each atom on the protein, it is possible to parallelly assign each atom to the corresponding node in the octree according to the processing thread corresponding to each atom, that is, to parallelly determine the local space where each atom on the protein is located. Since each atom corresponds to a processing thread, the assignment processes of multiple atoms can be carried out without interference and simultaneously, improving the efficiency of determining the space where the atoms are located. Then, by traversing the octree, it is possible to more quickly query the nodes that have not been assigned atoms, thereby determining the cavities in the protein where there are no atoms, and further determining the volume of the cavities, improving the efficiency of determining the cavity volume in the protein. And, through the intersection points between the rays and the outer contour of the protein, it is possible to more accurately determine the positional relationship between the space represented by the cavity nodes and the protein, thereby more accurately finding the cavities in the protein, and further more accurately calculating the volume of the cavities in the protein, improving the calculation accuracy. In addition, it is also possible to effectively search for the connected components of the cavities in the protein, which is beneficial for the subsequent research on the protein.
[0125] Figure 6It is a block diagram of a device for determining the cavity volume in a protein according to an embodiment of the present application. The device for determining the cavity volume in a protein is used to execute the steps when the above method for determining the cavity volume in a protein is executed. Refer to Figure 6 , the device for determining the cavity volume in a protein includes: a first determination module 601, a first processing module 602, an allocation module 603, a traversal module 604, and a second determination module 605.
[0126] The first determination module 601 is configured to determine the space occupied by the protein in the coordinate space based on the coordinates of multiple atoms on the protein in the coordinate space;
[0127] The first processing module 602 is configured to create an octree based on the space occupied by the protein in the coordinate space. The octree includes multiple nodes. The root node of the octree is used to represent the space, and other nodes in the octree except the root node are used to represent the respective local spaces in the space;
[0128] The allocation module 603 is configured to use the processing threads corresponding to the multiple atoms and, based on the coordinates of the multiple atoms and the spaces represented by the respective nodes in the octree, parallelly allocate the multiple atoms to the corresponding nodes in the octree;
[0129] The traversal module 604 is configured to traverse the octree to which the multiple atoms have been allocated to obtain multiple cavity nodes. No atoms are allocated to the cavity nodes, and the cavity nodes are used to represent the cavities in the protein;
[0130] The second determination module 605 is configured to determine the volume of the cavity in the protein based on the spaces corresponding to the multiple cavity nodes.
[0131] In some embodiments, Figure 7 It is a block diagram of another device for determining the cavity volume in a protein according to an embodiment of the present application. Refer to Figure 7 , the allocation module 603 includes:
[0132] A traversal unit 6031 is configured to, for any one of the multiple atoms, traverse the nodes in the octree during the process of allocating the atom using the processing thread corresponding to the atom;
[0133] A processing unit 6032 is configured to, during the process of traversing the current node, if the coordinates of the atom are within the space represented by the current node and the current node does not have multiple child nodes, create multiple child nodes of the current node in the octree with the current node as the parent node, where the current node is any node in the octree;
[0134] The allocation unit 6033 is used to allocate an atom to a child node corresponding to the space where the coordinate of the atom is located based on the coordinate of the atom and the spaces represented by multiple child nodes when the current node has multiple child nodes.
[0135] In some embodiments, continue to refer to Figure 7 , the processing unit 6032 is used to, if the coordinate of the atom is located in the space represented by the current node, create multiple child nodes of the current node in the octree with the current node as the parent node when the current node does not meet the first preset condition and the second preset condition and the current node does not have multiple child nodes. The first preset condition is that the depth of the current node in the octree reaches a preset depth, and the second preset condition is that the size of the space represented by the current node is smaller than the size of the atom.
[0136] In some embodiments, continue to refer to Figure 7 , the allocation unit 6032 is further used to, if the coordinate of the atom is located in the space represented by the current node, allocate the atom to the current node when the current node meets the first preset condition or the second preset condition.
[0137] In some embodiments, continue to refer to Figure 7 , the traversal module 604 is used to, during the process of traversing the octree to which multiple atoms have been allocated, for any node in the octree, determine the node as a cavity node when there is no atom in the space represented by the node; stop traversing the child nodes of the node; and continue to traverse the child nodes of the node when there is an atom in the space represented by the node.
[0138] In some embodiments, continue to refer to Figure 7 , the second determination module 605 includes:
[0139] The acquisition unit 6051 is used to acquire multiple internal cavity nodes from multiple cavity nodes, and the internal cavity nodes are used to represent the cavities of the protein;
[0140] The first determination unit 6052 is used to determine the size of the space corresponding to each of the multiple internal cavity nodes based on the depth of the multiple internal cavity nodes in the octree and the size of the space occupied by the protein;
[0141] The second determination unit 6053 is used to determine the volume of the cavity in the protein based on the size of the space corresponding to the multiple internal cavity nodes.
[0142] In some embodiments, continue to refer to Figure 7 , the acquisition unit 6051 includes:
[0143] The emission subunit 60511 is configured to emit rays starting from the central position of the space represented by any one of the multiple cavity nodes for any one of the multiple cavity nodes.
[0144] The acquisition subunit 60512 is configured to obtain multiple internal cavity nodes from the multiple cavity nodes based on the intersection points between the rays and the outer contour of the protein.
[0145] In some embodiments, continue to refer to Figure 7 , the acquisition subunit 60512 is configured to determine that the cavity node is an internal cavity node when the number of intersection points between the ray and the outer contour of the protein is odd; and determine that the cavity node is an external cavity node when the number of intersection points between the ray and the outer contour of the protein is even, where the external cavity node is used to represent the space located outside the protein.
[0146] In some embodiments, continue to refer to Figure 7 , the apparatus further includes:
[0147] The acquisition module 606 is configured to obtain multiple surface residues of the protein from the multiple residues based on the solvent accessible surface area of the multiple residues in the protein, where the multiple surface residues refer to the residues located on the surface of the protein.
[0148] The second processing module 607 is configured to perform triangulation on multiple atoms with multiple atoms among the multiple surface residues as vertices to obtain the topological structure of the protein, where the topological structure is used to represent the outer contour of the protein.
[0149] In some embodiments, multiple rays are emitted from the central position of the space represented by each cavity node.
[0150] The acquisition subunit 60512 is configured to, for any one of the multiple rays of any one cavity node, if the number of intersection points between the ray and the outer contour of the protein is odd, regard the ray as the first ray; if the number of intersection points between the ray and the outer contour of the protein is even, regard the ray as the second ray; and when the number of the first rays is greater than the number of the second rays, regard the cavity node as an internal cavity node.
[0151] In some embodiments, continue to refer to Figure 7 , the apparatus further includes:
[0152] The third processing module 608 is configured to start traversing from the root node of the octree, use the first cavity node as the starting node, create a connectivity list of the first cavity node, and add the first cavity node to the connectivity list. The first cavity node is the first internal cavity node found during the current traversal process, and the first cavity node has not been added to any connectivity list before. The connectivity list is used to represent the cavity connectivity block where the cavity represented by the first cavity node is located. The cavity connectivity block includes other cavities connected to the cavity represented by the first cavity node; search for the second cavity node in the octree, and add the second cavity node to the connectivity list of the first cavity node when the second cavity node has not been added to any connectivity list. The second cavity node has the same depth as the first cavity node in the octree and is a child node of the same parent node.
[0153] In some embodiments, continue to refer to Figure 7 , the third processing module 608 is further configured to search for the third cavity node in the octree. When the third cavity node has not been added to any connectivity list, if the cavity represented by the third cavity node is adjacent to the cavity represented by the second cavity node already added to the connectivity list of the first cavity node, add the third cavity node to the connectivity list of the first cavity node. The third cavity node is a child node of the first cavity node.
[0154] The embodiment of the present application provides a device for determining the cavity volume of a protein. By the coordinates of the atoms on the protein in the coordinate space, the space occupied by the protein is determined, so that the space can accurately cover the whole protein; then by creating an octree, the space occupied by the protein is divided into multiple local spaces; then by allocating a processing thread to each atom on the protein, it is possible to parallelly allocate each atom to the corresponding node in the octree according to the processing thread corresponding to each atom, that is, to parallelly determine the local space where each atom on the protein is located. Since each atom corresponds to a processing thread, the allocation processes of multiple atoms can be carried out without interference and simultaneously, improving the efficiency of determining the space where the atoms are located; then, by traversing the octree, it is possible to more quickly query the nodes to which no atoms are allocated, thereby determining the cavities in the protein where there are no atoms, and further determining the volume of the cavities, improving the efficiency of determining the cavity volume of the protein.
[0155] It should be noted that when the device for determining the cavity volume in the protein runs the application program, only the division of the above functional modules is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for determining the cavity volume in the protein provided in the above embodiments and the embodiments of the method for determining the cavity volume in the protein belong to the same concept. For the specific implementation process, please refer to the method embodiments and will not be elaborated here.
[0156] In the embodiments of the present application, the computer device can be configured as a terminal or a server. When the computer device is configured as a terminal, the terminal can be used as the execution entity to implement the technical solution provided in the embodiments of the present application. When the computer device is configured as a server, the server can be used as the execution entity to implement the technical solution provided in the embodiments of the present application, or the technical solution provided in the present application can be implemented through the interaction between the terminal and the server. The embodiments of the present application do not make any limitations in this regard.
[0157] Figure 8 It is a structural block diagram of a terminal 800 provided according to the embodiments of the present application. The terminal 800 can be a portable mobile terminal, such as a smart phone, a tablet computer, a notebook computer or a desktop computer. The terminal 800 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc. Generally, the terminal 800 includes a processor 801 and a memory 802.
[0158] The processor 801 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 801 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 801 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.
[0159] The memory 802 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 802 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 802 is used to store at least one computer program, and the at least one computer program is used to be executed by the processor 801 to implement the method for determining the cavity volume of a protein provided in the method embodiments of the present application.
[0160] In some embodiments, the terminal 800 may further optionally include: a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802, and the peripheral device interface 803 may be connected through a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 803 through a bus, signal lines, or a circuit board. Specifically, the peripheral devices include at least one of a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807, and a power supply 808.
[0161] The peripheral device interface 803 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 801 and the memory 802. In some embodiments, the processor 801, the memory 802, and the peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral device interface 803 can be implemented on separate chips or circuit boards, and this embodiment does not limit this.
[0162] The radio frequency circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 804 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts the received electromagnetic signals into electrical signals. In some embodiments, the radio frequency circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and so on. The radio frequency circuit 804 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, metropolitan area network, intranet, each generation of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area network, and / or WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 804 may further include a circuit related to NFC (Near Field Communication), and this application does not limit this.
[0163] The display screen 805 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 805 is a touch display screen, the display screen 805 also has the ability to collect touch signals on or above the surface of the display screen 805. The touch signals can be input to the processor 801 as control signals for processing. At this time, the display screen 805 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 805, which is provided on the front panel of the terminal 800; in other embodiments, there may be at least two display screens 805, which are respectively provided on different surfaces of the terminal 800 or are in a foldable design; in other embodiments, the display screen 805 may be a flexible display screen, which is provided on the curved surface or the folding surface of the terminal 800. Even, the display screen 805 can also be set to an irregular non-rectangular shape, that is, an irregular-shaped screen. The display screen 805 can be prepared from materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0164] The camera module 806 is used to collect images or videos. In some embodiments, the camera module 806 includes a front camera and a rear camera. Generally, the front camera is provided on the front panel of the terminal, and the rear camera is provided on the back of the terminal. In some embodiments, there are at least two rear cameras, which are respectively any one of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, so as to realize the function of background blurring by fusing the main camera and the depth-of-field camera, the function of panoramic shooting by fusing the main camera and the wide-angle camera, and the VR (Virtual Reality) shooting function or other fused shooting functions. In some embodiments, the camera module 806 may further include a flash. The flash can be a single-color-temperature flash or a two-color-temperature flash. The two-color-temperature flash refers to the combination of a warm-light flash and a cold-light flash, which can be used for light compensation under different color temperatures.
[0165] The audio circuit 807 may include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for input to the processor 801 for processing, or input to the radio frequency circuit 804 to enable voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 800. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert the electrical signal from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for uses such as ranging. In some embodiments, the audio circuit 807 may further include a headphone jack.
[0166] The power supply 808 is used to supply power to each component in the terminal 800. The power supply 808 may be alternating current, direct current, a primary battery or a rechargeable battery. When the power supply 808 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charging technology.
[0167] In some embodiments, the terminal 800 further includes one or more sensors 809. The one or more sensors 809 include but are not limited to: an acceleration sensor 810, a gyroscope sensor 811, a pressure sensor 812, an optical sensor 813, and a proximity sensor 814.
[0168] The acceleration sensor 810 can detect the magnitude of acceleration on the three coordinate axes of the coordinate space established with the terminal 800. For example, the acceleration sensor 810 can be used to detect the components of the gravitational acceleration on the three coordinate axes. The processor 801 can control the display screen 805 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 810. The acceleration sensor 810 can also be used for game or user movement data collection.
[0169] The gyroscope sensor 811 can detect the body direction and rotation angle of the terminal 800. The gyroscope sensor 811 can cooperate with the acceleration sensor 810 to collect the 3D actions of the user on the terminal 800. Based on the data collected by the gyroscope sensor 811, the processor 801 can achieve the following functions: motion sensing (such as changing the UI according to the user's tilting operation), image stabilization during shooting, game control, and inertial navigation.
[0170] The pressure sensor 812 can be disposed on the side frame of the terminal 800 and / or the lower layer of the display screen 805. When the pressure sensor 812 is disposed on the side frame of the terminal 800, it can detect the holding signal of the user on the terminal 800, and the processor 801 can perform left / right hand recognition or quick operation according to the holding signal collected by the pressure sensor 812. When the pressure sensor 812 is disposed on the lower layer of the display screen 805, the processor 801 can control the operable controls on the UI interface according to the pressure operation of the user on the display screen 805. The operable controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0171] The optical sensor 813 is used to collect the ambient light intensity. In one embodiment, the processor 801 can control the display brightness of the display screen 805 according to the ambient light intensity collected by the optical sensor 813. Specifically, when the ambient light intensity is high, the display brightness of the display screen 805 is increased; when the ambient light intensity is low, the display brightness of the display screen 805 is decreased. In another embodiment, the processor 801 can also dynamically adjust the shooting parameters of the camera assembly 806 according to the ambient light intensity collected by the optical sensor 813.
[0172] The proximity sensor 814, also known as the distance sensor, is usually disposed on the front panel of the terminal 800. The proximity sensor 814 is used to collect the distance between the user and the front of the terminal 800. In one embodiment, when the proximity sensor 814 detects that the distance between the user and the front of the terminal 800 is gradually decreasing, the processor 801 controls the display screen 805 to switch from the lit state to the off state; when the proximity sensor 814 detects that the distance between the user and the front of the terminal 800 is gradually increasing, the processor 801 controls the display screen 805 to switch from the off state to the lit state.
[0173] Those skilled in the art can understand that Figure 8 the structure shown in does not constitute a limitation on the terminal 800, and it may include more or fewer components than shown in the figure, or combine some components, or adopt different component arrangements.
[0174] Figure 9It is a schematic structural diagram of a server provided by an embodiment of the present application. The server 900 may vary greatly due to configuration or performance differences, and may include one or more processors (Central Processing Units, CPUs) 901 and one or more memories 902. Among them, at least one computer program is stored in the memory 902, and the at least one computer program is loaded and executed by the processor 901 to implement the method for determining the cavity volume in a protein provided by each of the above method embodiments. Of course, the server 900 may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input / output. The server 900 may also include other components for implementing the functions of the device, which will not be elaborated here.
[0175] An embodiment of the present application also provides a computer-readable storage medium in which at least one segment of computer program is stored. The at least one segment of computer program is loaded and executed by the processor of a computer device to implement the operations performed by the computer device in the method for determining the cavity volume in a protein in the above embodiment. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0176] An embodiment of the present application also provides a computer program product, including a computer program, which is stored in a computer-readable storage medium. The processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method for determining the cavity volume in a protein provided in the above various optional implementation manners.
[0177] Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiments can be completed by hardware, or can be completed by a program instructing relevant hardware. The described program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a magnetic disk, or an optical disc, etc.
[0178] The above are only optional embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for determining the cavity volume in a protein, characterized in that, The method includes: Determining the space occupied by the protein in the coordinate space based on the coordinates of multiple atoms on the protein in the coordinate space; Creating an octree based on the space occupied by the protein in the coordinate space, the octree including multiple nodes, the root node of the octree being used to represent the space, and the other nodes in the octree except the root node being used to represent the respective local spaces in the space; Using the processing threads corresponding to the multiple atoms respectively, and based on the coordinates of the multiple atoms and the spaces represented by the respective nodes in the octree, parallelly allocating the multiple atoms to the corresponding nodes in the octree; Traversing the octree to which the multiple atoms have been allocated to obtain multiple cavity nodes, where no atoms are allocated to the cavity nodes, and the cavity nodes are used to represent the cavities in the protein; Determining the volume of the cavities in the protein based on the spaces corresponding to the multiple cavity nodes.
2. The method according to claim 1, characterized in that The step of using the processing threads corresponding to the multiple atoms respectively, and based on the coordinates of the multiple atoms and the spaces represented by the respective nodes in the octree, parallelly allocating the multiple atoms to the corresponding nodes in the octree includes: For any one of the multiple atoms, during the process of allocating the atom using the processing thread corresponding to the atom, traversing the nodes in the octree; During the process of traversing the current node, if the coordinates of the atom are within the space represented by the current node, and in the case where the current node does not have multiple child nodes, using the current node as the parent node to create multiple child nodes of the current node in the octree, where the current node is any node in the octree; In the case where the current node has multiple child nodes, allocating the atom to the child node corresponding to the space where the coordinates of the atom are located based on the coordinates of the atom and the spaces represented by the multiple child nodes.
3. The method according to claim 2, characterized in that, The step of if the coordinates of the atom are within the space represented by the current node, and in the case where the current node does not have multiple child nodes, using the current node as the parent node to create multiple child nodes of the current node in the octree includes: If the coordinates of the atom are within the space represented by the current node, and in the case where the current node does not meet the first preset condition and the second preset condition, and the current node does not have multiple child nodes, using the current node as the parent node to create multiple child nodes of the current node in the octree, where the first preset condition is that the depth of the current node in the octree reaches a preset depth, and the second preset condition is that the size of the space represented by the current node is smaller than the size of the atom.
4. The method according to claim 3, wherein The method further includes: If the coordinates of the atom are within the space represented by the current node, and in the case where the current node meets the first preset condition or the second preset condition, allocating the atom to the current node.
5. The method according to claim 1, wherein The step of traversing the octree to which the multiple atoms have been allocated to obtain multiple cavity nodes includes: During the process of traversing the octree assigned to the multiple atoms, for any node in the octree, when there are no atoms in the space represented by the node, determine the node as a cavity node; stop traversing the child nodes of the node; When there are atoms in the space represented by the node, continue to traverse the child nodes of the node.
6. The method according to claim 1, characterized in that, The determining the volume of the cavity in the protein based on the spaces corresponding to the multiple cavity nodes includes: Obtain multiple internal cavity nodes from the multiple cavity nodes, where the internal cavity nodes are used to represent the cavities in the protein; Based on the depth of the multiple internal cavity nodes in the octree and the size of the space occupied by the protein, determine the sizes of the spaces corresponding to the multiple internal cavity nodes respectively; Based on the sizes of the spaces corresponding to the multiple internal cavity nodes, determine the volume of the cavity in the protein.
7. The method according to claim 6, characterized in that, The obtaining multiple internal cavity nodes from the multiple cavity nodes includes: For any cavity node among the multiple cavity nodes, emit a ray starting from the central position of the space represented by the cavity node; Based on the intersection points between the ray and the outer contour of the protein, obtain multiple internal cavity nodes from the multiple cavity nodes.
8. The method according to claim 7, wherein The obtaining multiple internal cavity nodes from the multiple cavity nodes based on the intersection points between the ray and the outer contour of the protein includes: When the number of intersection points between the ray and the outer contour of the protein is odd, determine the cavity node as an internal cavity node; When the number of intersection points between the ray and the outer contour of the protein is even, determine the cavity node as an external cavity node, where the external cavity node is used to represent the space outside the protein.
9. The method according to claim 7, characterized in that, The method further includes: Based on the solvent accessible surface areas of multiple residues in the protein, obtain multiple surface residues of the protein from the multiple residues, where the multiple surface residues refer to the residues located on the surface of the protein; Triangulate the multiple atoms with the multiple atoms among the multiple surface residues as vertices to obtain the topological structure of the protein, where the topological structure is used to represent the outer contour of the protein.
10. The method according to claim 7, characterized in that, Emit multiple rays from the central position of the space represented by each cavity node; The obtaining multiple internal cavity nodes from the multiple cavity nodes based on the intersection points between the ray and the outer contour of the protein includes: For any one of the multiple rays of any cavity node, if the number of intersection points between the ray and the outer contour of the protein is odd, regard the ray as the first ray; If the number of intersection points between the ray and the outer contour of the protein is even, regard the ray as the second ray; When the number of the first rays is greater than the number of the second rays, regard the cavity node as an internal cavity node.
11. The method according to claim 1, characterized in that, The method further includes: Start traversing from the root node of the octree. Using the first cavity node as the starting node, create a connected list for the first cavity node and add the first cavity node to the connected list. The first cavity node is the first internal cavity node found during the current traversal process, and the first cavity node has not been added to any connected list before. The connected list is used to represent the cavity connected component where the cavity represented by the first cavity node is located. The cavity connected component includes other cavities connected to the cavity represented by the first cavity node. Search for a second cavity node in the octree. When the second cavity node has not been added to any connected list, add the second cavity node to the connected list of the first cavity node. The second cavity node has the same depth as the first cavity node in the octree and is a child node of the same parent node.
12. The method according to claim 11, wherein The method further includes: Search for a third cavity node in the octree. When the third cavity node has not been added to any connected list, if the cavity represented by the third cavity node is adjacent to the cavity represented by the second cavity node that has been added to the connected list of the first cavity node, add the third cavity node to the connected list of the first cavity node. The third cavity node is a child node of the first cavity node.
13. An apparatus for determining the cavity volume of a protein, characterized in that, The apparatus includes: A first determination module, configured to determine the space occupied by a protein in the coordinate space based on the coordinates of multiple atoms on the protein in the coordinate space. A first processing module, configured to create an octree based on the space occupied by the protein in the coordinate space. The octree includes multiple nodes. The root node of the octree is used to represent the space, and other nodes in the octree except the root node are used to represent their respective corresponding local spaces in the space. An allocation module, configured to use the processing threads corresponding to the multiple atoms respectively, and based on the coordinates of the multiple atoms and the spaces represented by the nodes in the octree, allocate the multiple atoms to the corresponding nodes in the octree in parallel. A traversal module, configured to traverse the octree to which the multiple atoms have been allocated, and obtain multiple cavity nodes. No atoms are allocated to the cavity nodes, and the cavity nodes are used to represent the cavities in the protein. A second determination module, configured to determine the volume of the cavities in the protein based on the spaces corresponding to the multiple cavity nodes.
14. A computer device, characterized in that, The computer device includes a processor and a memory. The memory is used to store at least one segment of computer program, and the at least one segment of computer program is loaded and executed by the processor to perform the method for determining the volume of cavities in a protein according to any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store at least one segment of computer program, and the at least one segment of computer program is used to perform the method for determining the volume of cavities in a protein according to any one of claims 1 to 12.
16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method for determining the volume of cavities in a protein according to any one of claims 1 to 12.