Coulomb energy determination method and device, equipment, medium and product
By dividing the particle definition domain into multiple subdomains and calculating the Kulun energy in the pending list, the problem of high complexity in the existing technology of Kulun energy calculation is solved, and more efficient calculation is achieved.
Patent Information
- Application Number
- CN202411501341.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art when calculating the Coulomb energy between particles or molecules, the complexity is O(N2), resulting in low computational efficiency.
By dividing the domain containing multiple particles into multiple subdomains and determining a pending list for the target subdomain where the target particle is located, the Coulomb energy is calculated based on the positional relationship between the reference particle and the target particle in the pending list.
The complexity of Coulomb energy calculation is reduced, the computing efficiency is improved, and the overall accuracy of the DFTB method is significantly improved while maintaining the calculation accuracy.
Smart Images

Figure CN119475940A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment, medium and product for determining Coulomb energy. Background Art
[0002] In the fields of materials science, quantum chemistry, biology and physics, density functional tight binding (DFTB) is usually used to analyze the electronic structure of materials, the interactions between chemical particles and the interactions between biological molecules.
[0003] When determining the interaction between particles or molecules, the interaction between particles or molecules is often obtained by preprocessing, initializing the structure-related information and executing a self-consistent field cycle. During the self-consistent field cycle, when the electron density converges, the distance between each particle (or molecule) and other information are used to perform point-to-point Coulomb energy calculations. However, when there are N particles or molecules, the computational complexity of point-to-point Coulomb energy calculations is O(N 2 ), which has a high complexity, leading to the problem of low efficiency in Coulomb energy calculation. Summary of the invention
[0004] The present invention provides a method, device, equipment, medium and product for determining Coulomb energy, which reduce the complexity of Coulomb energy calculation and improve the calculation efficiency.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for determining Coulomb energy, comprising:
[0006] When the Coulomb energy determination condition is met, a definition domain including a plurality of particles is determined, and the definition domain is divided into at least a first number of subdomains, each of which includes at least five particles, each of which is a basic component unit of a specific substance;
[0007] For the target subdomain where the target particle in each of the particles is located, determining a to-be-processed list of the target subdomain, the to-be-processed list including the subdomains adjacent to the target subdomain in each of the subdomains, and the to-be-processed list including a second number of subdomains;
[0008] The Coulomb energy between each reference particle and the target particle is determined according to the positional relationship between each reference particle included in the to-be-processed list and the target particle, wherein the reference particle is a particle other than the target particle in the definition domain.
[0009] In a second aspect, an embodiment of the present disclosure provides a Coulomb energy determination device, comprising:
[0010] A domain determination module, used for determining a domain containing a plurality of particles when a Coulomb energy determination condition is satisfied, and dividing the domain into at least a first number of subdomains, wherein the subdomains include at least five particles, and the particles are basic constituent units of a specific substance;
[0011] a list partitioning module, for determining a to-be-processed list of the target subdomains where the target particles in each of the particles are located, wherein the to-be-processed list includes subdomains in each of the subdomains that are adjacent to the target subdomain, and the to-be-processed list includes a second number of subdomains;
[0012] The Coulomb energy determination module is used to determine the Coulomb energy between each reference particle and the target particle according to the positional relationship between each reference particle and the target particle included in the to-be-processed list, wherein the reference particle is other particles in the definition domain except the target particle.
[0013] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0014] at least one processor; and
[0015] a memory communicatively connected to at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute a coulomb energy determination method provided by the above-mentioned first aspect embodiment.
[0017] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a processor to implement a coulomb energy determination method provided by the embodiment of the first aspect above when executed.
[0018] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements a coulomb energy determination method provided by the embodiment of the first aspect above.
[0019] A method, device, equipment, medium and product for determining Coulomb energy according to an embodiment of the present invention, when the Coulomb energy determination condition is met, determines a domain containing multiple particles, and divides the domain into at least a first number of subdomains, wherein the subdomain includes at least five particles, and the particles are basic components of a specific substance; for a target subdomain where a target particle is located in each of the particles, determines a list of the target subdomain to be processed, wherein the list includes subdomains adjacent to the target subdomain in each of the subdomains, and the list includes a second number of subdomains; according to the positional relationship between each reference particle included in the list to be processed and the target particle, determines the Coulomb energy between each reference particle and the target particle, wherein the reference particle is a particle other than the target particle in the domain. The above technical solution reduces the complexity of Coulomb energy calculation and improves calculation efficiency.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a flow chart of a method for determining Coulomb energy provided in Embodiment 1 of the present invention;
[0023] Figure 2 This is an example diagram of domain division in a method for determining Coulomb energy provided in Embodiment 1 of the present invention;
[0024] Figure 3 is a reference diagram involving far-field particle conversion in a Coulomb energy determination method provided in Embodiment 1 of the present invention;
[0025] Figure 4 is a flow chart of a method for determining Coulomb energy provided by Embodiment 2 of the present invention;
[0026] Figure 5 is a schematic structural diagram of a coulomb energy determination device provided in Embodiment 3 of the present invention;
[0027] Figure 6 It is a structural schematic diagram of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second" and "target" in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Embodiment 1
[0031] As the performance of a single processor core has plateaued, future supercomputing performance will depend primarily on increasing system size rather than improving single processor performance. Today, processor counts are moving from hundreds of thousands to millions, which means that the number of cores, interconnects, and memory will grow dramatically. It is predicted that hyperscale systems will have about a billion cores (assuming gigahertz cores). For such large-scale distributed memory systems, affordable network topologies are limited, which poses new challenges to current parallel programming models. Currently, many people are working hard to evaluate the hardware and software bottlenecks of hyperscale designs. Therefore, there is an urgent need to build application performance models and understand what changes need to be made to ensure extrapolated scalability.
[0032] N-body problems originate from the field of celestial mechanics, which is motivated by the need to accurately simulate and predict the motion of celestial bodies. The core of the N-body problem is that the motion of a body in a system depends on its position and velocity as well as its position relative to all other massive bodies in the system. In these problems, the system is described by N particles, and the dynamics of the system arise from the interactions between each pair of particles. This requires O(N 2 )’s computational complexity.
[0033] However, the N-body problem is not limited to celestial mechanics. Rather, it is a member of a large class of problems that also exhibit pairwise interactions. Such problems also arise in many fields, such as plasma physics, fluid mechanics, and molecular dynamics. The complexity of the N-body problem and its many application areas motivate us to search for more efficient numerical solutions.
[0034] DFTB is a semi-empirical quantum chemical method. DFTB calculates the total energy of a multi-atom system and the force on each nucleus by solving the approximate electronic Schrödinger equation. For the calculation of Coulomb force, the existing technology still uses the point-to-point (Particle to Particle, P2P) calculation method, and its time complexity is O(N 2 ).
[0035] Figure 1 This is a flow chart of a coulomb energy determination method provided in Example 1 of the present invention. This embodiment can be used to determine the coulomb energy between particles constituting a specific substance when a need for coulomb energy determination arises to characterize the interaction between the particles. The method can be executed by a coulomb energy determination device, which can be implemented in the form of hardware and / or software.
[0036] like Figure 1 As shown, the method includes:
[0037] S101. When the Coulomb energy determination condition is met, determine a definition domain containing multiple particles, and divide the definition domain into at least a first number of subdomains, each of which includes at least five particles, and the particles are basic building blocks of a specific substance.
[0038] In the present embodiment, the Coulomb energy determination condition can be understood as a pre-set precursor condition for executing the Coulomb energy determination. Particles are the basic building blocks of a specific substance, and a specific substance can be understood as a substance in different fields, such as a substance defined in physics or a substance defined in the field of material chemistry, preferably a substance in material chemistry. When a specific substance is a substance defined in physics, the particle can be an electric charge or a particle itself in physics, and when a specific substance is a substance defined in material chemistry, the particle can be an atom, a molecule or a charged particle in chemistry, and preferably a charged particle, such as iron ions in ferroferric oxide, magnesium ions in magnesium oxide, and copper ions in copper oxide. The specific classification and definition of particles are determined by the field of application, and are not limited in the present embodiment.
[0039] The domain can be understood as a virtual space containing all given particles. The subdomain is obtained by dividing the domain and can be considered as a part of the domain, which contains some particles. The domain can be divided into multiple subdomains, and each subdomain can also be divided into its own corresponding subdomains. The first number can be understood as the pre-set number of subdomains related to the domain division rule. For example, when the domain division rule is 2 3 The first number is 8. The domain can include multiple subdomains of different levels. For example, the domain itself is regarded as a box, and each subdomain is also a small box. The zeroth level only contains the domain box itself. If there is only one level of division, the domain only includes 9 boxes (the domain itself + the domain is divided into 2 boxes). 3 8 subdomains obtained by rule division); if there is a two-level hierarchical division, the domain includes 73 boxes (the domain itself + the domain is divided into 2 3 8 subdomains obtained by rule division + 8 subdomains divided by 2 3 The number of subdomains in a domain is defined by the rule. The number of subdomains in a domain is defined by the rule.
[0040] Specifically, when DFTB is applied, the input file is first obtained, the file is preprocessed, and the conformation-related information is initialized based on the preprocessed file. After the initialization is completed, the SCF cycle is executed, the structure-related information is initialized, and the self-consistent field (Self-Consistent Field, SCF) cycle is executed. The SCF cycle process includes updating the HX function, Davidson algorithm calculation, electron density calculation, and judgment on whether the electron density converges. Among them, the HX function is the result of multiplying the Hamiltonian matrix and the wave function, which is obtained based on actual needs, and this embodiment does not set a limitation on this. After completing the update of the HX function, the Davidson algorithm is executed to iteratively solve the eigenvalue, and based on the judgment of whether the eigenvalue meets the corresponding convergence condition, if it does, the electron density of the specific substance is calculated to judge whether the electron density converges. If so, it is determined that the Coulomb energy determination condition is met. If not, return to re-execute the SCF cycle until the electron density converges. When the Coulomb energy determination condition is met, the space where the particle is located is determined, and a domain that can contain all given particles is constructed based on the space where the particle is located. The given particles are pre-defined particles that need to be determined for Coulomb energy, which can be all particles in the substance or part of them. The given particles are a large number of particles, and the number is in units of hundreds, thousands or tens of thousands. The domain can be a regular polyhedron, such as a cube, or an irregular polyhedron, such as a cuboid. The domain is divided according to a specific segmentation rule (such as n 2 or 3 etc., n can be any natural number) to divide the domain into multiple subdomains (for example, based on n 3: 8 subdomains divided by 2x2x2), it should be noted that each of the divided subdomains needs to contain at least 5 particles, generally 5-20. After dividing the subdomains relative to the definition domain, each subdomain can be divided based on actual needs to obtain subdomains of each subdomain until the subdomain cannot be divided into the next level of subdomains (in the case where the subdomain contains only a small number of particles, for example, the number of particles in the subdomain is less than the set division rule 2 3 hour).
[0041] For example, Figure 2 : is an example diagram of a method for determining Coulomb energy provided in the first embodiment of the present invention involving the division of the definition domain. Figure 2 As shown in , if the number of particles is large enough, the initial definition domain of the L0 level is divided into 8 first-level subdomains according to the 2x2x2 rule (the definition domain as a whole contains 8+1 domains at this time), as shown in L1. If the number of particles contained in each first-level subdomain corresponding to L1 is sufficient, each first-level subdomain in L1 can be further divided according to the 2x2x2 rule to obtain a second-level subdomain corresponding to each first-level subdomain. At this time, the definition domain is divided into 64 second-level subdomains as shown in L2, 64 second-level subdomains are subordinate to 8 first-level subdomains, and 8 first-level subdomains are subordinate to 1 definition domain (the definition domain as a whole contains 64+8+1 domains at this time). After completing the division of the second-level subdomains, the second-level subdomains can be further divided into third-level subdomains...
[0042] It is understandable that the above examples are for the case where there are sufficient particles. Under the 2x2x2 partitioning rule, the first-level subdomains are at most 8. If the number of particles in the definition domain is scarce, or there is an extremely non-uniform distribution of particles (for example, the number of particles in one of the eight subdomains is less than 8, and the number of particles in another subdomain exceeds 1,000), the number of subdomains may be less than the maximum number that can be obtained based on the partitioning rule. For example, the first-level subdomain may be less than 8, and similarly, the second-level subdomain may be less than 64. In addition, if the first-level subdomain is divided and it is not possible to satisfy that each second-level subdomain obtained by the division contains at least 5-20 particles, the first-level subdomain will not be divided. At this time, the particles in the first-level subdomain are the bottom-level particles, and the same is true for the division of the lower-level subdomains.
[0043] It is understandable that when the definition domain is divided into subdomains, the particles are assigned to the corresponding subdomains, and the particle serial number is determined by the distance of the particle relative to the subdomain center position (for example, the closer the particle coordinates are to the subdomain center position, the higher the serial number is arranged). The subdomain center coordinates can also be obtained by the particle coordinates and the subdomain serial number (for example, the subdomain center coordinates can be calculated by the coordinates of the particle in the overall definition domain, combined with the subdomain serial number that represents the distance between the subdomain and the definition domain center position). Each subdomain has a corresponding subdomain identifier, and the subdomain identifier includes the subdomain serial number, subdomain center coordinates, subdomain radius, information related to the parent node to which the subdomain belongs, and information related to the child nodes under the subdomain, wherein the information related to the parent node to which the subdomain belongs includes the subdomain serial number, subdomain center coordinates, and subdomain radius of the upper subdomain of the subdomain, and the information related to the child nodes under the subdomain includes the subdomain serial number, subdomain center coordinates, and subdomain radius of the lower subdomain of the subdomain.
[0044] S102. For the target subdomain where the target particle in each particle is located, determine a to-be-processed list of the target subdomain, wherein the to-be-processed list includes subdomains adjacent to the target subdomain in each subdomain, and the to-be-processed list includes at least a second number of subdomains.
[0045] In this embodiment, the target particle can be understood as any one of all the particles contained in the definition domain, which can be a specified particle or randomly determined. The target subdomain can be understood as the subdomain where the target particle is located, which can be the bottom subdomain or the middle subdomain, determined based on actual needs, and this embodiment does not limit this. The pending list can be understood as a collection of all particles that are about to calculate the Coulomb energy between the target particle and the target particle, and the pending list includes a neighbor list and an interaction list. The neighbor list and the interaction list both include multiple subdomains, and each subdomain includes at least 5 particles. The neighbor list can be understood as a collection of several subdomains that are relatively close to the target subdomain where the target particle is located, and the interaction list can be understood as a collection of subdomains that are relatively far from the target subdomain where the target particle is located, and have an upper and lower interactive relationship with the upper subdomain of the target subdomain. The particles in the subdomains included in the neighbor list are near-field particles of the target particle, and the particles in the subdomains included in the interaction list are far-field particles of the target particle. The second number is the number of subdomains that meet the specific distance condition in the first number of subdomains, and the second number is less than the first number.
[0046] Specifically, the target particle is determined from all particles included in the domain, and the target subdomain where the target particle is located is determined according to the position of the target particle. The neighbor list and interaction list of the target particle are constructed. Figure 2The positional relationship between each subdomain in the domain shown is determined, and the subdomains that are relatively close to the target subdomain within a specific range around the target subdomain are determined, and these subdomains are added to the neighbor list of the target subdomain; the subdomains that are relatively far from the target subdomain within a specific range around the target subdomain are determined, and these subdomains are added to the interaction list of the target subdomain. The total number of subdomains in the interaction list and the neighbor list is the second number.
[0047] S103. Determine the Coulomb energy between each reference particle and the target particle according to the positional relationship between each reference particle and the target particle included in the to-be-processed list, wherein the reference particle is a particle other than the target particle in the definition domain.
[0048] In this embodiment, the reference particle can be understood as all particles in the definition domain except the target particle. The positional relationship between the reference particle and the target particle can be understood as the distance between the reference particle and the target particle, or the distance and adjacency relationship between the subdomain where the reference particle is located and the subdomain where the target particle is located. The Coulomb energy characterizes the interaction between the reference particle and the target particle.
[0049] Specifically, in a specific substance (such as ferroferric oxide), there is a certain interaction between each particle (iron ions of ferroferric oxide). Therefore, in this embodiment, corresponding processing is performed based on the positional relationship between each reference particle included in the list to be processed and the target particle, thereby respectively realizing the Coulomb energy determination between the near-field particle and the target particle and the Coulomb energy calculation between the far-field particle and the target particle.
[0050] For each (near-field) reference particle in the subdomain included in the neighbor list, the relative distance between the two is determined based on the position coordinates of the reference particle and the position coordinates of the target particle. The Coulomb energy between each reference particle and the target particle is calculated point-to-point (Particle to Particle, P2P) based on the charge of the reference particle, the charge of the target particle and the relative distance between the two.
[0051] Figure 3 It is a reference diagram involving far-field particle conversion in a Coulomb energy determination method provided in Example 1 of the present invention. Figure 3A tree structure is shown. Taking a five-layer tree structure as an example, the root node root has a Level of 0, i.e., the 0th layer. The root node corresponds to the definition domain. The child nodes of the root node have a Level of 1, i.e., the 1st layer, corresponding to each first-level subdomain divided by the definition domain. The child nodes of the first-level subdomain have a Level of 2, i.e., the 2nd layer, corresponding to each second-level subdomain divided by the first-level subdomain. Similarly, the second-level subdomain is divided into a third-level subdomain, and the third-level subdomain is divided into a fourth-level subdomain. The fourth-level subdomain is the last layer of the definition domain segmentation level, corresponding to the leaf level in the tree structure. It can be understood that Figure 3 The tree structure only shows the subdomain division in a two-dimensional case as a reference and is only presented as an example. The present invention is also applicable to subdomain division in a three-dimensional case or in multiple dimensions, and is preferably applied to a three-dimensional case.
[0052] like Figure 3 As shown, for each subdomain included in the interaction list, the subnode transfers the particle action of the relatively distant edge particles in the far-field particles to the inner layer through particle to multipole aggregation (Particle to Multipole, P2M), multipole to multipole aggregation (Multipole to Multipole, M2M), multipole to local transfer (Multipole to Local, M2L), local to local transfer (Local to Local, L2L) and local to particle transfer (Local to Particle, L2P), so as to realize the determination of the Coulomb energy between the far-field particles and the target particles while reducing the amount of calculation.
[0053] Specifically, through P2M, the particle action values of the (far-field) reference particles contained in each subdomain are aggregated to the subdomain where they are located (aggregated to the leaf node); through M2M, the overall particle action value of the subdomain obtained by P2M aggregation is aggregated to its upper subdomain (the parent node of the corresponding subdomain after P2M aggregation) (aggregated to each parent node except the root node in the tree structure); through M2L, the overall particle action value of the upper subdomain obtained by M2M aggregation is aggregated to its same-layer subdomain (belonging to the same segmentation level in the definition domain as a whole, or in the tree structure). Through L2L, the overall particle action value of the same-layer subdomain obtained by M2L transfer is transferred to its lower-layer subdomain (the subnode of the subdomain after M2L transfer); through L2P, the overall particle action value of L2L transferred to the last layer of lower-layer subdomain (the subdomain corresponding to the leaf node) is transferred to each reference particle contained therein; for each reference particle, through L2P, the Coulomb energy between the reference particle and the target particle is calculated according to the particle action value of the reference particle obtained by L2L transfer.
[0054] A method for determining Coulomb energy provided by an embodiment of the present invention includes determining a domain containing multiple particles when a Coulomb energy determination condition is met, and dividing the domain into at least a first number of subdomains, wherein the subdomain includes at least five particles, and the particle is a basic component unit of a specific substance; for the target subdomain where the target particle is located in each particle, determining a to-be-processed list of the target subdomain, wherein the to-be-processed list includes a subdomain adjacent to the target subdomain in each subdomain, and the to-be-processed list includes a second number of subdomains; according to the positional relationship between each reference particle and the target particle contained in the to-be-processed list, determining the Coulomb energy between each reference particle and the target particle, wherein the reference particle is other particles in the domain except the target particle. The above technical scheme summarizes and classifies particles through the domain and its subordinate subdomains, performs direct calculation or step-by-step conversion calculation of particle action based on the relative positional relationship between each reference particle and the subdomain of the target particle, and finally obtains the Coulomb energy between the target particle and all other reference particles in the form of particle-subdomain-subdomain-particle, thereby realizing the embodiment of particle-particle interaction while reducing the complexity of timing calculation, improving calculation efficiency, and ensuring calculation accuracy and error rate. The DFTB method is essentially an approximate quantum mechanical calculation method that aims to maintain the main features of density functional theory while reducing the computational complexity. However, traditional DFTB may have certain limitations when dealing with long-range Coulomb interactions (such as charge separation and polarization effects). By introducing the above Coulomb energy determination method, these long-range interactions can be calculated more accurately and efficiently, thereby improving the overall accuracy of the DFTB method. Applying the above methods to DFTB can also effectively expand the scope of application of DFTB. For example, when simulating complex systems such as large-scale biomolecules and nanomaterials and complex solid materials in materials science, DFTB combined with the above Coulomb energy determination methods can handle larger-scale systems and significantly improve computational efficiency while maintaining computational accuracy.
[0055] Embodiment 2
[0056] Figure 4 It is a flow chart of a coulomb energy determination method provided in the second embodiment of the present invention. This embodiment is a further optimization of any of the above embodiments and can be used to determine the coulomb energy between particles constituting a specific substance when there is a need to determine the coulomb energy to characterize the interaction between the particles. The method can be executed by a coulomb energy determination device, and the coulomb energy determination device can be implemented in the form of hardware and / or software.
[0057] like Figure 4 As shown, the method includes:
[0058] S201. When the Coulomb energy determination condition is met, determine a definition domain containing multiple particles.
[0059] S202 , taking the definition domain as the object to be segmented, segmenting the object to be segmented, and obtaining a first number of current subdomains of the object to be segmented at the current segmentation level.
[0060] In this embodiment, the object to be segmented can be understood as the segmented subject, the current segmentation level can be understood as the segmentation level where the subdomain is located or the level of the node corresponding to the subdomain, and the current segmentation level is consistent with the corresponding segmentation times. The current subdomain can be understood as any subdomain after each segmentation.
[0061] Specifically, the domain is taken as the object to be segmented, and the domain is defined as the 0th level domain (the largest domain), that is, the root node of the tree structure, and the object to be segmented is divided according to the set division rule, wherein the set division rule can be, for example, dividing the domain into multiple equal parts, such as n, n 2 、n 3 . Get multiple current subdomains of the domain defined at the first level.
[0062] In other words, the current level is L, and the L-th level domain is divided in equal proportion according to the set division rule to obtain the L+1-th level subdomains corresponding to the set division rule (the first number), L≥0. In the corresponding tree structure, the domain is the root node (L=0), and when L≥1, the L-th level subdomain is the parent node of the L+1-th level subdomain. The current number of subdomains of each object to be segmented corresponds to the current segmentation level and the set division rule. For example, if the set division rule is 2 3 , then the current number of subdomains of the object to be segmented (the first number) is 2 3L , based on the sum of geometric progressions, the maximum number of all domains contained in the domain is
[0063] For example, press 2 3 For example, when dividing the definition domain, the number of current subdomains is 8. When the current subdomain is used as a new object to be segmented, the corresponding number of current subdomains is also 8.
[0064] For example, press 2 3 If the domain is divided, the zeroth level only contains the domain itself, L = 0, then 2 3L is 1, is also 1, that is, the first level has only one domain, the domain itself; the first level L = 1, at this time, the first quantity 2 3L is 8, =9, that is, the first level includes the definition domain itself and 8 current subdomains, a total of 9 domains; the second level L = 2, at this time, the first number 2 3L is 64, It is 73, that is, the first level includes the definition domain itself, 8 first-level subdomains and 64 second-level subdomains, a total of 73 domains.
[0065] S203: For each current sub-domain, determine whether the number of particles contained in the current sub-domain meets the segmentation end condition.
[0066] In this embodiment, the segmentation end condition can be understood as a condition for ending iterative segmentation.
[0067] Specifically, for each current subdomain of the Lth layer, according to the particle coordinates and the number of particles contained in the subdomain, determine whether the particles contained in the current subdomain are greater than or equal to the product of the corresponding value of the set division rule and the current segmentation level L. If so, according to the particle coordinates of each particle contained in the current subdomain, determine the distribution of particles in the current subdomain, and judge whether its distribution can ensure that after the current subdomain is segmented into the next level, each subdomain of the next level contains at least one particle. If not, determine that the segmentation end condition is met, and if so, determine that the segmentation end condition is not met.
[0068] S204: If not, take the current subdomain as the object to be segmented, return and re-segment the object to be segmented until the current subdomain of the object to be segmented meets the segmentation end condition.
[0069] In this embodiment, if the segmentation end condition is not met, it indicates that the current subdomain is qualified to continue to be segmented to the next segmentation level, and the current subdomain is used as the object to be segmented, and the segmentation of the object to be segmented is repeated to obtain the corresponding current subdomain, and then it is determined whether the current subdomain meets the subdomain segmentation end condition. If not, the current subdomain obtained by the segmentation is continued as the object to be segmented, and the iterative cycle is repeated until the current subdomain meets the segmentation end condition. If the current subdomain meets the segmentation end condition, the segmentation iteration is terminated, and the current subdomain that meets the segmentation end condition is a leaf node in the tree structure.
[0070] S205, determining the target subdomain where the target particle in each particle is located, and determining the current node corresponding to the target subdomain in the tree structure to which the target subdomain belongs, the root node of the tree structure is the definition domain, and the tree structure is arranged according to the segmentation level of the definition domain.
[0071] In this embodiment, the current node can be understood as a node of the target subdomain in the tree structure, and can be considered as the target subdomain itself.
[0072] Specifically, the target particle is determined from all particles in the definition domain, and then the target subdomain where the particle is located is determined based on the particle coordinates of the target particle. The target subdomain is the bottom-level subdomain where the target particle is located, that is, the smallest subdomain. The tree structure of the target subdomain includes a root node, a child node, and a leaf node. The root node is the definition domain, and the leaf node is the subdomain at the bottom segmentation level. The current node corresponding to the target subdomain in the tree structure is a leaf node.
[0073] The tree structure is arranged according to the segmentation level of the definition domain. For example, the definition domain is the 0th segmentation level, which is the root node in the tree structure. The multiple current subdomains obtained after dividing the definition domain are the 1st segmentation level. Similarly, it corresponds to the first layer in the tree structure, that is, the layer where the child nodes of the root node are located. The current subdomains of the 1st layer are used as objects to be segmented for the next segmentation. The multiple current subdomains obtained are the 2nd segmentation level. Similarly, it corresponds to the second layer in the tree structure, that is, the layer where the child nodes of the child nodes of the root node are located. The iterative cycle is performed until the current subdomain meets the segmentation end condition. The subdomain is the bottommost division level, that is, the layer where the leaf nodes in the tree structure are located.
[0074] For example, the division rule is 2 3 For example, there are three layers in total. In the tree structure, there is a root node in the 0th layer, 8 child nodes in the first layer, and 64 leaf nodes in the second layer. The 64 leaf nodes correspond to the subdomains of the bottom segmentation level leaflevel. The target subdomain where the target particle is located is determined according to the particle coordinates and / or particle sequence number of the target particle, and the leaf node corresponding to the target subdomain in the leaf level is determined as the current node.
[0075] S206, determining a first subdomain corresponding to a first node at the same level as the current node, determining a second subdomain from the first subdomain whose subdomain interval with the target subdomain is less than a set threshold, and adding the second subdomain to a neighbor list of the target subdomain.
[0076] In the present embodiment, the first node can be understood as all other nodes at the same level as the current node in the tree structure. Following the above example, the other 63 leaf nodes in the leaf level level in the tree structure except the current node are all first nodes. The first subdomain can be understood as the subdomain corresponding to the first node, and the first node is the representation of the first subdomain in the tree structure. The subdomain interval can be understood as the positional relationship between each subdomain, which can be the relative distance between the subdomain center coordinates, or the number of subdomains spaced between the two subdomains. The second subdomain can be understood as the closest and most adjacent subdomains to the target subdomain among all the subdomains divided by the definition domain. The particles contained in each second subdomain are near-field particles of the target particle. The neighbor list can be understood as a set of the second subdomain.
[0077] Specifically, determine the first node at the same level as the current node, and determine the subdomain represented by the first node, that is, determine the first subdomain that belongs to the same segmentation level as the target subdomain. Among multiple first subdomains, determine the interval between each first subdomain and the target subdomain, for example, determine the distance between the center coordinates of each first subdomain and the center coordinates of the target subdomain, and determine whether the distance between the two is less than the set distance threshold. The subdomain corresponding to the distance less than the set distance threshold is the second subdomain. Alternatively, determine the number of subdomain intervals between each first subdomain and the target subdomain. If the first subdomain and the target subdomain are adjacent subdomains, the number of subdomain intervals is 0. If there is a subdomain in between, the number of subdomain intervals is 1. Determine whether the number of subdomain intervals between each first subdomain and the target subdomain is less than the set number threshold. The subdomain corresponding to the number of subdomain intervals less than the set number threshold is the second subdomain.
[0078] The second subdomain is a near-field neighbor subdomain of the target subdomain, and the particles contained in it are near-field particles of the target particle. The second subdomain is added to the neighbor list.
[0079] For example, for a subdomain S1 of the Lth layer, its neighbor list refers to the grid list of the same Lth layer and the number of interval grids is less than or equal to the number of interval grids (ws). For particles that are not classified to the bottom layer, it is assumed that they exist in the subdomain, and the particles that meet the conditions are also recorded. The default value of ws is 2.
[0080] S207: Determine from the tree structure a third subdomain that satisfies the set node interaction relationship with the target subdomain, determine from the third subdomain a fourth subdomain that is not included in the neighbor list of the target subdomain, and add the fourth subdomain to the interaction list of the target subdomain.
[0081] In this embodiment, setting the node interaction relationship can be understood as the target subdomain as a child node, the current node corresponding to the target subdomain, and the child nodes of other parent nodes associated with the parent node have a subordinate connection relationship. The third subdomain can be understood as a subdomain with a node interaction relationship with the target subdomain, the third subdomain is part of the first subdomain, and the third subdomain is at the same level as the target subdomain. The fourth subdomain is a subdomain that can be understood as several subdomains that are relatively far from the target subdomain within a certain range among all the subdomains divided by the definition domain. The particles contained in each fourth subdomain are far-field particles of the target particles. The interaction list can be understood as a set of the fourth subdomain.
[0082] Specifically, determine the parent node of the target subdomain corresponding to the current node in the tree structure, determine the neighbor list of the subdomain corresponding to the parent node, determine the child nodes of all subdomains in the neighbor list in the tree structure, determine the subdomains corresponding to these child nodes as the third subdomain, determine whether the third subdomain contains the second subdomain, the second subdomain is a subdomain in the neighbor list of the target subdomain, and determine the third subdomain that is not the second subdomain as the fourth subdomain. The fourth subdomain is a far-field neighbor subdomain of the target subdomain within a certain range, and the particles contained therein are far-field particles of the target particles. Add the fourth subdomain to the interaction list of the target subdomain.
[0083] For example, the set of all child nodes of the neighbor list of the parent node of a subdomain S1 of the Lth layer is called the interaction list of S1, and it is required that the subdomains in the set are not in the neighbor list of S1. Similarly, for particles that are not classified to the bottom layer, it is assumed that they exist in the subdomain, and the particles that meet the conditions are recorded.
[0084] Optionally, determining from the tree structure a third subdomain that satisfies a set node interaction relationship with the target subdomain includes:
[0085] S2071. Determine the current parent node corresponding to the current node in the tree structure.
[0086] In this embodiment, the current parent node can be understood as the parent node of the current node.
[0087] Specifically, from the tree structure, the current node is traversed upward along the connecting edges to determine the parent node of the current node.
[0088] S2072: Access the reference neighbor list of the subdomain corresponding to the current parent node, and determine the reference child node of each subdomain corresponding to the reference parent node included in the reference neighbor list.
[0089] In this embodiment, the reference neighbor list can be understood as the neighbor list of the subdomain corresponding to the current parent node. The reference parent node can be understood as the node corresponding to each subdomain in the reference neighbor list, and the reference child node can be understood as the child node of the reference parent node.
[0090] Specifically, each subdomain has its corresponding neighbor list and interaction list. Access the reference neighbor list of the subdomain corresponding to the current parent node, determine each reference subdomain in the reference neighbor list, find the reference parent node corresponding to each reference subdomain in the tree structure, traverse downward along the connection edge, and determine the reference child node of each reference parent node.
[0091] Continuing with the above example, there is 1 root node in the zeroth layer of the tree structure, 8 child nodes in the first layer, and 64 leaf nodes in the second layer; the parent node of the 1st to 8th leaf nodes in the second layer is the 1st child node in the first layer, the parent node of the 9th to 16th leaf nodes is the 2nd child node in the first layer, the parent node of the 17th to 24th leaf nodes is the 3rd child node in the first layer, the parent node of the 25th to 32nd leaf nodes is the 4th child node in the first layer, the parent node of the 33rd to 40th leaf nodes is the 5th child node in the first layer, the parent node of the 41st to 48th leaf nodes is the 6th child node in the first layer, the parent node of the 49th to 56th leaf nodes is the 7th child node in the first layer, and the parent node of the 57th to 64th leaf nodes is the 8th child node in the first layer. The first leaf node of the second layer is used as the current node. At this time, the first child node in the first layer is the parent node of the current node, that is, the current parent node. Each subdomain corresponding to each node has its neighbor list. The neighbor list of the current parent node (reference neighbor list) includes multiple reference subdomains. These reference subdomains correspond to the second and third child nodes in the first layer in the tree structure. At this time, the second and third child nodes in the first layer are the reference parent nodes, and the child nodes of the reference parent node are the 9th to 24th leaf nodes in the second layer. Thus, the reference child nodes required by this embodiment are determined.
[0092] It is understandable that in the three-dimensional hierarchy, the division of the neighbor list is not based on the serial number. In the above example, the second and third child nodes are taken as the technical content of the corresponding nodes in the subdomain of the neighbor list. This is only an exemplary reference. The specific neighbor list is determined based on the actual distance.
[0093] S2073: Determine the subdomain corresponding to each reference subnode as the third subdomain.
[0094] Continuing with the above example, the 9th to 24th leaf nodes in the second layer are reference sub-nodes, and thus, the third sub-domains corresponding to these leaf nodes are determined.
[0095] Continuing with the above example, the target subdomain is the subdomain corresponding to the first leaf node in the second layer. Correspondingly, the first subdomain is all other subdomains in the second layer except the target subdomain, that is, the first subdomain is the subdomain corresponding to the 2nd to 64th leaf nodes. The second subdomain is the subdomains closest to the target subdomain in the first subdomain, such as the subdomains corresponding to the 2nd to 9th leaf nodes. In the third subdomain, the second subdomain is removed to obtain the fourth subdomain, that is, the subdomains corresponding to the 2nd to 9th leaf nodes are removed from the 9th to 24th leaf nodes, that is, the subdomain corresponding to the 9th leaf node is removed. At this time, the remaining subdomains corresponding to the 10th to 24th leaf nodes are the fourth subdomain.
[0096] It can be understood that the quantity and numbering of the first subdomain, the second subdomain, the third subdomain and the fourth subdomain in the above example are only used as examples to represent the relationship between the subdomains through serial numbers, which is not necessarily the actual number of subdomains. The actual number of subdomains is determined based on actual needs.
[0097] S208. For the neighbor list in the to-be-processed list, determine the Coulomb energy between the reference particle and the target particle according to the distance between the reference particle and the target particle in each subdomain contained in the neighbor list.
[0098] In this embodiment, the reference particles can be understood as all particles in the definition domain except the target particles. The reference particles include the near-field particles and far-field particles of the target subdomain. The near-field particles are contained in the subdomain of the neighbor list, and the far-field particles are contained in the subdomain of the interaction list.
[0099] For the neighbor list in the pending list, since the reference particles in each subdomain contained in the neighbor list are relatively close to the target particles, and the reference particles in the neighbor list are near-field particles of the target particles, point-to-point Coulomb energy calculation can be performed directly based on the formula for determining Coulomb energy. Specifically, the Coulomb energy between the reference particle and the target particle is calculated based on their respective action values (charges) and the distance between the two particles.
[0100] S209, for the interaction list in the to-be-processed list, perform upper layer aggregation, same layer transfer and lower layer transmission according to the reference particles in each subdomain contained in the interaction list to obtain the Coulomb energy between the reference particles and the target particles.
[0101] In this embodiment, for the interaction list in the to-be-processed list, the reference particles in the subdomains included in the interaction list are all far-field particles of the target particles. Figure 3 As shown, for these far-field particles, the particles are aggregated to their subdomains and the subdomains are aggregated to the upper-level subdomains. For the aggregated subdomains, the subdomains are transferred from one subdomain to another at the same level. For the transferred subdomains, the subdomains are transferred to the lower-level subdomains and to individual particles. Finally, the action value of each reference particle itself is obtained, and the Coulomb energy between the reference particle and the target particle is determined based on the action value of the reference particle itself.
[0102] Optionally, upper layer aggregation, same layer transfer and lower layer transfer are performed according to the reference particles in each subdomain included in the interaction list to obtain the Coulomb energy between the reference particles and the target particles, including:
[0103] S2091. For each subdomain in the interaction list, aggregate the reference particles in the subdomain to the target node corresponding to the subdomain, and obtain the multipole expansion value of the target node.
[0104] In this embodiment, the multipole expansion (ME) value can be understood as a numerical value corresponding to a linear combination of basic polynomials representing multipole moments. Each subdomain has its corresponding ME value. The target node can be understood as a node corresponding to a subdomain in the tree structure, and the node represents the subdomain.
[0105] Specifically, for each subdomain in the interaction list, the information of each reference particle in the subdomain is aggregated to obtain the ME value of the corresponding subdomain. The node represents the subdomain, so the information of each reference particle in the subdomain is aggregated to obtain the ME value of the corresponding subdomain, that is, the information of each reference particle in the subdomain is aggregated to obtain the ME value of the corresponding target node. Figure 3 As shown, P2M is performed.
[0106] S2092, traverse the tree structure where the subdomain is located, aggregate each target node to the upper parent node, and obtain the multi-pole expansion value of each parent node.
[0107] In this embodiment, the upper parent node can be understood as the parent node of the target node in the tree structure. The upper parent node here can be any other parent node except the root node in the tree structure.
[0108] Specifically, the tree structure where the subdomain is located is traversed to determine the parent node of the target node corresponding to the subdomain, and the ME value of each target node is aggregated and superimposed on its upper parent node to obtain the ME value of its upper parent node. The ME value of the parent node is the sum of the ME values of the child nodes corresponding to the parent node. Figure 3 As shown, M2M is executed and repeated so that each node (subdomain) has information about the lower-level subdomains (lower-level nodes) it contains, and this information also includes information about the lower-level subdomains (lower-level nodes) of the lower-level subdomains (lower-level nodes) themselves, that is, each node (subdomain) has its corresponding ME value.
[0109] S2093. Perform local expansion conversion processing on the parent node according to the multipolar expansion value of the parent node to obtain the local expansion value of each parent node.
[0110] In this embodiment, the local expansion (LE) value may be understood as a value corresponding to a linear combination of local polynomials representing the multipole moment.
[0111] Specifically, for each subdomain, it is necessary to ensure that it has all the information from the remote particles. Therefore, it is necessary to transfer from multipolar to local, that is, from ME to LE, based on the neighbor list and interaction list corresponding to each subdomain, and obtain the LE value of the subdomain (node). Figure 3 As shown in Figure 2, M2L is executed. After M2L transfer, each node (subdomain) has the information of all remote particles.
[0112] S2094. For each parent node, the local expansion value of the parent node is transferred to the lower-level child nodes to obtain the local expansion value of each child node of the parent node.
[0113] In this embodiment, the lower-level child nodes can be understood as the child nodes of the above-mentioned parent nodes in the tree structure.
[0114] Specifically, traverse the tree structure where the subdomain is located, determine the child node corresponding to the parent node, pass the LE value of the parent node to its lower-level child nodes, and obtain the LE value of each lower-level child node. The sum of the LE values of each lower-level child node should be the LE value of its corresponding parent node. Figure 3 As shown, L2L is executed and L2L is repeated until the leaf node is reached. Each node (subdomain) has its corresponding LE value.
[0115] S2095. For each child node, the local expansion value of the child node is transferred to each reference particle contained in the subdomain corresponding to the child node, so as to obtain the local expansion value of each reference particle.
[0116] In this embodiment, for a leaf node, the LE value of the leaf node is transferred to each reference particle in the subdomain corresponding to the leaf node to obtain the LE value of each reference particle in the subdomain.
[0117] S2096. Determine the Coulomb energy between each reference particle and the target particle according to the local expansion value of each reference particle.
[0118] Based on the LE value corresponding to each reference particle, the particle interaction it represents, that is, the Coulomb energy between the reference particle and the target particle, is directly obtained.
[0119] It can be understood that the above content is the interaction between each reference particle and the target particle. The Coulomb energy between each reference particle and the target particle can also be superimposed to obtain the overall Coulomb energy relative to the target particle in the definition domain.
[0120] A Coulomb energy determination method provided by an embodiment of the present invention includes determining a domain containing multiple particles when a Coulomb energy determination condition is met; using the domain as an object to be segmented, segmenting the object to be segmented, and obtaining a first number of current subdomains of the object to be segmented at a current segmentation level; for each current subdomain, determining whether the number of particles contained in the current subdomain meets a segmentation end condition; if not, using the current subdomain as the object to be segmented, returning to re-segment the object to be segmented until the current subdomain of the object to be segmented meets the segmentation end condition; determining a target subdomain where a target particle in each particle is located, determining a current node corresponding to the target subdomain in a tree structure to which the target subdomain belongs, wherein the root node of the tree structure is the domain, and the tree structure is arranged according to the segmentation level of the domain; determining a first node at the same level as the current node For the first subdomain corresponding to the node, determine from the first subdomain a second subdomain whose subdomain interval with the target subdomain is less than a set threshold, and add the second subdomain to the neighbor list of the target subdomain; determine from the tree structure a third subdomain that satisfies the set node interaction relationship with the target subdomain, determine from the third subdomain a fourth subdomain that is not included in the neighbor list of the target subdomain, and add the fourth subdomain to the interaction list of the target subdomain; for the neighbor list in the to-be-processed list, determine the Coulomb energy between the reference particle and the target particle according to the distance between the reference particle in each subdomain included in the neighbor list and the target particle; for the interaction list in the to-be-processed list, perform upper-layer aggregation, same-layer transfer and lower-layer transmission according to the reference particles in each subdomain included in the interaction list to obtain the Coulomb energy between the reference particle and the target particle. The above technical solution first logically encloses the charged system in a computational mother box (domain), then uses the geometric center as the origin and customizes the division rules, such as dividing it into eight boxes (subdomains) along the Cartesian axis based on a specific direction, and then performs the same operation on each box (subdomain). This process continues until the number of particles in each bottom-level box (subdomain) reaches a certain specified value. After the multipole expansion of the electric potential caused by the charge in each subdomain, the external electric potential of each subdomain is obtained. The potential energy of a single particle is expressed as the direct interaction with the particles in the nearby subdomains, plus the Taylor series expansion of the field generated by the particles in all distant boxes. In this method, the computational domain is hierarchically subdivided and the particles are clustered into a tree structure. This approximation method is suitable for far-field interactions, while near-field interactions are directly summed. This method reduces the complexity from point-to-point O(N) to point-to-point O(N). 2 ) is reduced to O(N).
[0121] Embodiment 3
[0122] Figure 5 Schematic diagram of the structure of a coulomb energy determination device provided by the third embodiment of the present invention. Figure 5 As shown, the device comprises:
[0123] A domain determination module 31 is used to determine a domain containing multiple particles when the Coulomb energy determination condition is met, and divide the domain into at least a first number of subdomains, each of which includes at least five particles, and each particle is a basic component unit of a specific substance;
[0124] A list partitioning module 32 is used to determine a to-be-processed list of the target subdomains where the target particles in each of the particles are located, wherein the to-be-processed list includes subdomains adjacent to the target subdomain in each of the subdomains, and the to-be-processed list includes a second number of subdomains;
[0125] The Coulomb energy determination module 33 is used to determine the Coulomb energy between each reference particle and the target particle according to the positional relationship between each reference particle and the target particle included in the to-be-processed list, wherein the reference particle is other particles in the definition domain except the target particle.
[0126] The Coulomb energy determination device adopted in the present technical solution reduces the complexity of Coulomb energy calculation and improves calculation efficiency.
[0127] Optionally, the domain determination module 31 is specifically used for:
[0128] Taking the definition domain as the object to be segmented, segmenting the object to be segmented, and obtaining a first number of current subdomains of the object to be segmented at a current segmentation level;
[0129] For each of the current sub-domains, determining whether the number of particles contained in the current sub-domain meets a segmentation end condition;
[0130] If not, the current sub-domain is taken as the object to be segmented, and the object to be segmented is returned to be segmented again until the current sub-domain of the object to be segmented meets the segmentation end condition.
[0131] Optionally, the list partitioning module 32 includes:
[0132] a node corresponding unit, used for determining a target subdomain where a target particle in each of the particles is located, and determining a current node corresponding to the target subdomain in a tree structure to which the target subdomain belongs, wherein the root node of the tree structure is the definition domain, and the tree structure is arranged according to the segmentation level of the definition domain;
[0133] a neighbor list determining unit, configured to determine a first subdomain corresponding to a first node at the same level as the current node, determine from the first subdomain a second subdomain whose subdomain interval with the target subdomain is less than a set threshold, and add the second subdomain to a neighbor list of the target subdomain;
[0134] An interaction list determination unit is used to determine from the tree structure a third subdomain that satisfies a set node interaction relationship with the target subdomain, determine from the third subdomain a fourth subdomain that is not included in the neighbor list of the target subdomain, and add the fourth subdomain to the interaction list of the target subdomain.
[0135] Optionally, the interactive list determination unit is specifically used to:
[0136] Determine a current parent node corresponding to the current node in the tree structure;
[0137] Accessing a reference neighbor list of a subdomain corresponding to the current parent node, and determining a reference child node of each subdomain corresponding to a reference parent node included in the reference neighbor list;
[0138] The subdomain corresponding to each of the reference subnodes is determined as the third subdomain.
[0139] Optionally, the Coulomb energy determination module 33 includes:
[0140] A near-field energy determination unit, configured to determine the Coulomb energy between the reference particle and the target particle according to the distance between the reference particle and the target particle in each subdomain contained in the neighbor list in the to-be-processed list;
[0141] The far-field energy determination unit is used to perform upper layer aggregation, same layer transfer and lower layer transmission on the interaction list in the to-be-processed list according to the reference particles in each subdomain contained in the interaction list, so as to obtain the Coulomb energy between the reference particles and the target particles.
[0142] Optionally, a far-field energy determination unit is specifically configured to:
[0143] For each subdomain in the interaction list, the reference particles in the subdomain are aggregated to a target node corresponding to the subdomain, and a multipole expansion value of the target node is obtained;
[0144] Traversing the tree structure where the subdomain is located, aggregating each of the target nodes to the upper parent node, and obtaining the multi-pole expansion value of each of the parent nodes;
[0145] According to the multipole expansion value of the parent node, the parent node is subjected to local expansion conversion processing to obtain the local expansion value of each parent node;
[0146] For each of the parent nodes, the local expansion value of the parent node is transferred to the lower-level child nodes to obtain the local expansion value of each child node of the parent node;
[0147] For each of the child nodes, the local expansion value of the child node is transferred to each reference particle contained in the subdomain corresponding to the child node to obtain the local expansion value of each reference particle;
[0148] The Coulomb energy between each of the reference particles and the target particle is determined according to the local expansion value of each of the reference particles.
[0149] The coulomb energy determination device provided in the embodiment of the present invention can execute the coulomb energy determination method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0150] Embodiment 4
[0151] Figure 6 : is a structural schematic diagram of an electronic device provided in Embodiment 4 of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0152] like Figure 6 As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0153] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0154] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 41 performs the various methods and processes described above, such as the Coulomb energy determination method.
[0155] In some embodiments, the coulomb energy determination method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the coulomb energy determination method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to perform the coulomb energy determination method in any other suitable manner (e.g., by means of firmware).
[0156] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0157] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0158] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0159] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0160] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0161] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0162] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0163] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for determining Coulomb energy, characterized in that: include: When the Coulomb energy determination condition is met, a definition domain including a plurality of particles is determined, and the definition domain is divided into at least a first number of subdomains, each of which includes at least five particles, each of which is a basic component unit of a specific substance; For the target subdomain where the target particle in each of the particles is located, determining a to-be-processed list of the target subdomain, the to-be-processed list including the subdomains adjacent to the target subdomain in each of the subdomains, and the to-be-processed list including a second number of subdomains; The Coulomb energy between each reference particle and the target particle is determined according to the positional relationship between each reference particle included in the to-be-processed list and the target particle, wherein the reference particle is a particle other than the target particle in the definition domain.
2. The method according to claim 1, characterized in that The dividing the definition domain into at least a first number of subdomains comprises: Taking the definition domain as the object to be segmented, segmenting the object to be segmented, and obtaining a first number of current subdomains of the object to be segmented at a current segmentation level; For each of the current sub-domains, determining whether the number of particles contained in the current sub-domain meets a segmentation end condition; If not, the current sub-domain is taken as the object to be segmented, and the object to be segmented is returned to be segmented again until the current sub-domain of the object to be segmented meets the segmentation end condition.
3. The method according to claim 1, characterized in that: The to-be-processed list includes a neighbor list and an interaction list. The to-be-processed list of the target subdomain where the target particle in each of the particles is located includes: Determine a target subdomain where a target particle in each of the particles is located, and determine a current node corresponding to the target subdomain in a tree structure to which the target subdomain belongs, wherein the root node of the tree structure is the definition domain, and the tree structure is arranged according to the segmentation level of the definition domain; Determine a first subdomain corresponding to a first node at the same level as the current node, determine a second subdomain from the first subdomain whose subdomain interval with the target subdomain is less than a set threshold, and add the second subdomain to a neighbor list of the target subdomain; A third subdomain that satisfies a set node interaction relationship with the target subdomain is determined from the tree structure, a fourth subdomain that is not included in the neighbor list of the target subdomain is determined from the third subdomain, and the fourth subdomain is added to the interaction list of the target subdomain.
4. The method according to claim 3, characterized in that The determining, from the tree structure, a third subdomain that satisfies a set node interaction relationship with the target subdomain includes: Determine a current parent node corresponding to the current node in the tree structure; Accessing a reference neighbor list of a subdomain corresponding to the current parent node, and determining a reference child node of each subdomain corresponding to a reference parent node included in the reference neighbor list; The subdomain corresponding to each of the reference subnodes is determined as the third subdomain.
5. The method according to claim 1, characterized in that: Determining the Coulomb energy between each reference particle and the target particle according to the positional relationship between each reference particle and the target particle included in the to-be-processed list includes: For the neighbor list in the to-be-processed list, determining the Coulomb energy between the reference particle and the target particle according to the distance between the reference particle and the target particle in each subdomain contained in the neighbor list; For the interaction list in the to-be-processed list, upper layer aggregation, same layer transfer and lower layer transfer are performed according to the reference particles in each subdomain contained in the interaction list to obtain the Coulomb energy between the reference particles and the target particles.
6. The method according to claim 5, characterized in that The step of performing upper layer aggregation, same layer transfer and lower layer transmission according to the reference particles in each sub-domain included in the interaction list to obtain the Coulomb energy between the reference particles and the target particles includes: For each subdomain in the interaction list, the reference particles in the subdomain are aggregated to a target node corresponding to the subdomain, and a multipole expansion value of the target node is obtained; Traversing the tree structure where the subdomain is located, aggregating each of the target nodes to the upper parent node, and obtaining the multi-pole expansion value of each of the parent nodes; According to the multipole expansion value of the parent node, the parent node is subjected to local expansion conversion processing to obtain the local expansion value of each parent node; For each of the parent nodes, the local expansion value of the parent node is transferred to the lower-level child nodes to obtain the local expansion value of each child node of the parent node; For each of the child nodes, the local expansion value of the child node is transferred to each reference particle contained in the subdomain corresponding to the child node to obtain the local expansion value of each reference particle; The Coulomb energy between each of the reference particles and the target particle is determined according to the local expansion value of each of the reference particles.
7. A coulomb energy determination device, characterized in that: include: A domain determination module, used for determining a domain containing a plurality of particles when a Coulomb energy determination condition is satisfied, and dividing the domain into at least a first number of subdomains, wherein the subdomains include at least five particles, and the particles are basic constituent units of a specific substance; a list partitioning module, for determining a to-be-processed list of the target subdomains where the target particles in each of the particles are located, wherein the to-be-processed list includes subdomains in each of the subdomains that are adjacent to the target subdomain, and the to-be-processed list includes a second number of subdomains; The Coulomb energy determination module is used to determine the Coulomb energy between each reference particle and the target particle according to the positional relationship between each reference particle and the target particle included in the to-be-processed list, wherein the reference particle is other particles in the definition domain except the target particle.
8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform a coulomb energy determination method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a coulomb energy determination method according to any one of claims 1 to 6 when executed.
10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements a coulomb energy determination method according to any one of claims 1 to 6.