Method and apparatus for calculating coulomb potential of excluded pair of atoms, device and medium
By constructing a target exclusion atomic pair list and calculating long-range correction terms, the problem of ultra-long-distance atomic pairs in molecular dynamics analysis cannot be calculated, and efficient and accurate Coulomb potential calculation is achieved, simplifying the pre-processing process.
Patent Information
- Application Number
- PCT/CN2024/133046
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-29
- Filing Date
- 2024-11-19
- Publication Date
- 2025-09-04
AI Technical Summary
In existing molecular dynamics analysis, atomic pairs exceeding the truncated radius cannot calculate the long-range Coulomb potential, resulting in calculation errors and too large calculations, and it is impossible to accurately simulate the interaction of molecular systems.
By constructing a target exclusion atomic pair list, long-range correction terms are calculated for atomic pairs exceeding the truncated radius, the Ewald method is used to correct the Coulomb potential, and combined with GPU accelerated calculation, the Coulomb potential correction for ultra-long-distance atomic pairs is achieved.
It effectively solves the Coulomb potential calculation problem of ultra-long-distance atomic pairs, improves calculation efficiency and accuracy, reduces boundary effect, simplifies the pre-processing process, and reduces the computational complexity.
Smart Images

Figure CN2024133046_04092025_PF_FP_ABST
Abstract
Description
Method, device, apparatus and medium for excluding atom pair Coulomb potential calculation
[0001] This application claims priority to the Chinese invention patent application entitled “Methods, devices, equipment and media for excluding atomic pair Coulomb potential calculations” and application number 202410232473.8, filed on February 29, 2024. The entire contents of that application are incorporated herein by reference. Technical Field
[0002] Example embodiments of the present disclosure generally relate to the field of computer technology, and more particularly, to methods, devices, apparatuses, and computer-readable storage media for calculating excluded atom-pair Coulomb potentials. Background Art
[0003] Molecular dynamics (MD) is a computational study of the dynamic behavior of molecules and atoms in molecular systems. This study simulates the consequences of various physical laws, including the interaction between atoms and molecules and the law of gravity. The study of MD has significant implications for fields such as physics, chemistry, and medicine. In MD analysis, molecules are viewed as a group of particles that interact through potential energy. The Coulomb potential between atoms in a molecule is an important type of interaction potential, describing the interactions between charges. Summary of the Invention
[0004] In a first aspect of the present disclosure, a method for calculating the Coulomb potential of an excluded atom pair is provided. The method comprises: determining, for an atom pair in a target excluded atom pair list, whether the distance between the atom pairs exceeds a cutoff radius, and determining that the type of Coulomb interaction between the atom pairs is a long-range interaction, and that the atom pairs in the target excluded atom pair list belong to excluded non-bonded interactions; if the distance between the atom pairs exceeds the cutoff radius and the type of Coulomb interaction between the atom pairs is a long-range interaction, determining a long-range correction term for the Coulomb potential of the atom pair based at least on the Coulomb charges of the two atoms in the atom pair, the distance between the atom pairs, and a predetermined error function; and determining a corrected Coulomb potential of the atom pair based at least on the determined long-range correction term.
[0005] In a second aspect of the present disclosure, a device for calculating the Coulomb potential of an atom pair is provided. The device includes: a judgment module configured to determine, for an atom pair in a target exclusion atom pair list, whether the distance between the atom pairs exceeds a cutoff radius, and determine that the type of Coulomb interaction between the atom pairs is a long-range interaction, and that the atom pairs in the target exclusion atom pair list belong to an excluded non-bonded interaction; a correction term determination module configured to determine, if the distance between the atom pairs exceeds the cutoff radius and the type of Coulomb interaction between the atom pairs is a long-range interaction, a long-range correction term for the Coulomb potential of the atom pair based at least on the Coulomb charges of the two atoms in the atom pair, the distance between the atom pairs, and a predetermined error function; and a Coulomb potential determination module configured to determine the corrected Coulomb potential of the atom pair based at least on the determined long-range correction term.
[0006] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the device to perform the method of the first aspect.
[0007] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the medium, and when the computer program is executed by a processor, the method of the first aspect is implemented.
[0008] In a fifth aspect of the present disclosure, a computer program product is provided, which includes a computer program, and when the computer program is executed by a processor, the method of the first aspect is implemented.
[0009] It should be understood that the content described in this section is not intended to limit the key features or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0011] FIG1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented;
[0012] FIG2 is a schematic block diagram showing a process for excluding atom-pair Coulomb potential calculation according to some embodiments of the present disclosure;
[0013] FIG3 shows a flowchart of a correction term calculation process for non-perturbatively excluded atom pairs according to some embodiments of the present disclosure;
[0014] FIG4 is a schematic diagram showing an example of constructing a non-perturbative excluded atom pair list according to some embodiments of the present disclosure;
[0015] FIG5 shows a flowchart of a correction term calculation process for perturbation-excluded atom pairs according to some embodiments of the present disclosure;
[0016] FIG6 shows a block diagram of a process for excluding atom-pair Coulomb potential calculations according to some embodiments of the present disclosure;
[0017] FIG7 shows a block diagram of an apparatus for excluding atom-pair Coulomb potential calculation according to some embodiments of the present disclosure; and
[0018] FIG8 illustrates a block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION
[0019] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0020] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, i.e., "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below.
[0021] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0022] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0023] For example, in response to receiving a user's active request, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to the electronic device, application, server or storage medium and other software or hardware that performs the operation of the technical solution of the present disclosure based on the prompt message.
[0024] As an optional but non-limiting implementation, in response to receiving a user's active request, a prompt message may be sent to the user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form. Furthermore, the pop-up window may also include a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0025] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0026] FIG1 shows a schematic diagram of an environment 100 in which embodiments of the present disclosure can be implemented. In the environment 100 of FIG1 , a processing system 110 utilizes a molecular dynamics analysis application 115 to calculate the values of various molecular dynamics properties of interest based on atomic information 102 in a class of molecules to be studied. The molecular dynamics analysis application 115 can support analysis of interactions between atomic pairs to calculate the property values of properties such as the Coulomb potential of atomic pairs, the atomic forces of individual atoms, and the total molecular energy. Typically, the calculation of the total molecular energy is based on the Coulomb potential of each atomic pair; the calculation of the atomic force (also called the force vector) of each atom is also based on the Coulomb potential of the atomic pair composed of the atom and other atoms.
[0027] In FIG1 , computing system 110 may include any computing system / electronic device with computing capabilities, such as various computing devices / systems, terminal devices, servers, etc. Terminal devices may include any type of mobile, fixed, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. Servers include, but are not limited to, mainframe computers, edge computing nodes, computing devices in cloud environments, supercomputers, etc.
[0028] Current molecular dynamics analysis applications (e.g., Gromacs) often require that atom pairs whose distances are smaller than a cutoff radius be excluded from the atom pair table. If this requirement is not met, subsequent calculations cannot proceed. In some calculation scenarios, it is possible that atom pairs excluded during bond formation may become too far apart after bond breakage, exceeding the cutoff radius and thus preventing calculations.
[0029] For example, in molecular dynamics analysis applications, an atom pair list (pairlist) is constructed at the beginning of the calculation to record which atom pairs are to be subjected to interaction calculations. The atom pair list also records which atom pairs are excluded from the calculation, including atom pairs that exceed the cutoff radius and some atom pairs that may be excluded by artificial rules. On the one hand, atom pairs that exceed the cutoff radius will not be added to the pairlist. On the other hand, atom pairs that need to be excluded usually need to calculate the Ewald long-range correction term. This calculation will require that the excluded atom pairs also need to be included in the atom pair list pairlist. This means that atom pairs that exceed the cutoff radius and are excluded will not be calculated. During the current calculation, the atomic distance within the excluded atom pairs will be checked. If the distance exceeds the cutoff radius, an error will be reported and the calculation will exit directly.
[0030] According to an embodiment of the present disclosure, for the current calculation process, it is proposed to separately calculate long-range correction terms for perturbations exceeding the cutoff radius and for excluded atom pairs without perturbations to solve such problems.
[0031] The following will first analyze the necessity of calculating the long-range correction term for atomic pairs exceeding the cutoff radius (also called ultra-long-range atomic pairs), and then describe in detail the calculation of the Coulomb potential for atomic pairs in the embodiments of the present disclosure.
[0032] The Coulomb potential is a long-range interaction that decays slowly as the distance increases. The molecular dynamics electrostatic Coulomb potential is calculated as follows:
[0033] Where i and j represent the i-th atom and j-th atom in the molecule, q i ,q j represents the Coulomb charge of the two atoms, r i and r j represents the position vectors of the two atoms, |r i -r j | represents the distance between two atoms, ε r Represents the dielectric constant.
[0034] In actual calculations of molecular systems, in order to ensure that the calculated properties are closer to the real situation and reduce boundary effects, periodic boundaries are often used for calculations. In this case, one atom has to calculate the Coulomb potential with almost infinite other atoms, so the amount of calculation is very large and almost impossible to calculate. To solve this problem, the Ewald method is usually used to calculate the long-range Coulomb potential. Conventional atomic pairs split the long-range Coulomb potential calculation into two parts: E coul =FT+ΔE
[0035] Where ΔE is the Ewald correction term; FT is the Ewald calculation term, which uses fast Fourier transform in reciprocal space and calculates all atom pairs, including the excluded atoms. ΔE = Eqq·erfc is the Ewald correction term, calculated in real space.
[0036] It can be seen that for excluded atom pairs, the calculation in Ewald reciprocal space will still include the interaction of the excluded atom pairs, so this part needs to be subtracted. The excluded atom pairs smaller than the cutoff radius will have this part subtracted. However, the excluded atom pairs larger than the cutoff radius will not have this part subtracted because they are not in the excluded atom pair list pairlist. For these atom pairs, the following should appear: E excl ≡0
[0037] But E. excl =FT excl
[0038] At the same time FT excl =Eqq excl -ΔE excl
[0039] So E coul =E coul -FT excl =E coul -(Eqq excl -ΔE excl )
[0040] So E coul =E coul -Eqq excl (1-erfc)=E coul -E ewaldcorr
[0041] Among them E excl represents the Coulomb potential that excludes atomic pairs, and erfc is a shape function that represents the error function.
[0042] According to the above analysis, it can be seen that The Ewald long-range correction term for excluded atomic pairs needs to be subtracted for excluded atomic pairs that exceed the cutoff radius. In other words, for atomic pairs that exceed the cutoff radius, the long-range forces between them will still affect the calculation of the Coulomb potential, so they need to be excluded from the calculation.
[0043] Embodiments of the present disclosure provide a solution for calculating the Coulomb potential correction for ultra-long-range excluded atom pairs. FIG2 shows a schematic block diagram of a process 200 for calculating the Coulomb potential for excluded atom pairs according to some embodiments of the present disclosure. Process 200 can be implemented, for example, in computing system 110 of FIG1 .
[0044] At block 210, the computing system 110 constructs a target exclusion atom pair list. As will be discussed in detail below, in embodiments of the present disclosure, the constructed target exclusion atom pair list is constructed for a set of excluded atom pairs. The atom pairs in the target exclusion atom pair list belong to excluded non-bonded interactions. The excluded atom set includes atoms that are marked as excluded from the interaction calculation, such as atom pairs that exceed a cutoff radius, or atom pairs that are considered to be marked for exclusion.
[0045] In block 220 , the computing system 110 determines, for each atom pair in the target excluded atom pair list (also referred to as an “excluded atom pair”), whether the distance between the atom pairs exceeds a cutoff radius and determines the type of Coulombic interaction between the atom pairs as a long-range interaction.
[0046] If the distance between the atom pair exceeds the cutoff radius and the type of Coulomb interaction between the atom pair is a long-range interaction, at block 230, the computing system 110 calculates a long-range correction term for the Coulomb potential of the current atom pair. The calculation of the long-range correction term is based on at least the Coulomb charges of the two atoms in the atom pair, the distance between the atom pair, and a predetermined error function. In some embodiments, if the Ewald method is used to calculate the long-range Coulomb potential, the calculated long-range correction term is also referred to as an Ewald correction term and is used to correct the Ewald calculation term in the long-range Coulomb potential.
[0047] In some embodiments, the calculation of the long-range correction term is determined based on at least the following:
[0048] Where i and j represent the i-th atom and j-th atom in the molecule, q i ,q j represents the Coulomb charge of the two atoms, r i and r j represents the position vectors of the two atoms, |r i -r j | represents the distance between two atoms, ε rrepresents the dielectric constant. erfc represents the error function, the value of which is related to the distance between the two atoms.
[0049] In box 240, computing system 110 determines whether the atom pairs in the target exclusion atom pair list have all been traversed. If not yet traversed, continue to return and continue to judge the next atom pair in the target exclusion atom pair list to determine whether to calculate the long-range correction term. If the atom pairs in the target exclusion atom pair list have been traversed, then the correction term calculation for the atom pair is completed. In box 250, computing system 110 calculates the modified Coulomb potential of each atom pair based on the long-range correction term of each atom pair (or some atom pairs do not have the long-range correction term). For the atom pair with the long-range correction term, its modified Coulomb potential can be determined as E coul -E ewaldcorr , where E coul The long-range Coulomb potential calculated for this atomic pair. The long-range correction term E ewaldcorr It is used to correct the Ewald term in the long-range Coulomb potential.
[0050] In some embodiments, after determining the modified Coulomb potentials for each atom pair in the target exclusion atom pair list, a total modified energy corresponding to the set of atoms or molecules that includes the target exclusion atom pair list may be calculated, as needed. In some embodiments, for a given atom, a force vector for the given atom may be calculated based on the modified Coulomb potentials for each atom pair that includes the atom.
[0051] In some embodiments, the calculation process of the long-range correction term can be different depending on whether the atom is perturbed or not. In order to support the exclusion of both non-perturbative and perturbed atom pairs exceeding the cutoff radius, technical implementations need to be performed for these two cases respectively.
[0052] 3 shows a flow chart of a correction term calculation process 300 for non-perturbatively excluded atom pairs according to some embodiments of the present disclosure. The process 300 may be implemented at the computing system 110.
[0053] At block 310, the computing system 110 determines non-perturbative atoms. The computing system 110 may filter the non-perturbative atom set from the excluded atom set, where the excluded atom set refers to atoms marked as excluded from the interaction calculation. In some embodiments, for a particular type of molecule, the atoms in the molecule that have been excluded from the interaction calculation may be identified, and the non-perturbative atoms may be determined from these atoms.
[0054] Then, in block 320, the computing system 110 determines an excluded atom pair list ExclListOfLists for computing interactions based on the set of non-perturbative atoms, which includes all atoms in a particular type of molecule that are excluded by themselves, wherein all atom pairs are regular atoms without perturbation. FIG4 illustrates an atom pair list ExclListOfLists 410, which includes non-perturbative atom pairs in a molecule of a particular type (e.g., Type 1), wherein each atom pair is determined between an atom pair number and an excluded atom.
[0055] At block 330 , computing system 110 constructs at least a portion of a target exclusion atom pair list to be used from atom pair list ExclListOfLists , represented as ExclPairlist , wherein duplicate atom pairs in ExclListOfLists are removed. ExclPairlist includes the excluded non-perturbative atom pairs, such as example ExclPairlist 420 in FIG. 4 .
[0056] Next, for each atom pair in the ExclPairlist list (also referred to as excluding atom pair), the long-range correction term that can be determined according to the described mode of process 200 of Fig. 2 whether to determine that this atom is right, and when determining that needs determine the long-range correction term, calculate the corresponding long-range correction term.In certain embodiments, all will traverse the atom pair in the ExclPairlist list in each iteration, calculate the distance between two atoms in the atom pair.In certain embodiments, when calculating the distance between the atom, it can also be judged whether to need to apply periodic boundary conditions to calculate the nearest neighbor distance of two atoms under the periodic boundary.
[0057] In some embodiments, for a given atom pair in the ExclPairlist list, if the Coulombic interaction type is determined to be Ewald, and the distance between the two atoms in the excluded atom pair is greater than the cutoff radius, then an additional long-range correction term (e.g., an Ewald correction term) is calculated here. If the distance between the atom pair is less than the cutoff radius, the Ewald correction term is calculated in the original calculation path.
[0058] When calculating the long-range correction term, the Coulomb point library of the two atoms in the atomic pair can be calculated, the Coulomb charges can be multiplied together, and then multiplied by the dielectric constant. For an atomic pair without perturbation, the long-range correction term can be determined according to the above formula (2).
[0059] After calculating the long-range correction term, the modified Coulomb potential for the atom pair can be further calculated. However, for the molecule or atom collection of interest, the modified Coulomb potential for the current atom pair can be added to the total corrected energy of the molecule or atom collection. When calculating the force vector for an atom, it can be determined based on the modified Coulomb potential of one or more atom pairs that include the atom.
[0060] In some embodiments, considering that the calculation of the atomic pair distance and the correction term requires a certain amount of computation, computational acceleration can be performed by an accelerated processing unit, such as a graphics processing unit (GPU). Process 300 in FIG3 illustrates a process involving GPU acceleration. At block 340, the computing system 110 determines whether GPU computation is required. If GPU computation is not required, then at blocks 350, 360, and 370, the atomic pair correction term calculation is iteratively performed in a conventional manner, such as on a central processing unit (CPU).
[0061] If it is determined that GPU computing is required, the computing system 110 distributes the computing of the long-range correction term for each atom pair in the target excluded atom pair list to multiple threads of the GPU (represented as N threads, where N is greater than or equal to 2).
[0062] In some examples, the constructed ExclPairlist list and parameters can be passed into GPU device memory before iteration, and each atom pair in the ExclPairlist list can be marked as a bound GPU type so that calculations of these atom pairs are recognized as being calculated on the GPU.
[0063] The computing system 110 may distribute the calculation of each atom pair in the ExclPairlist list to N threads in a load-balanced manner, and determine the long-range correction term of the Coulomb potential for each atom pair in the target excluded atom pair list in parallel in the N threads.
[0064] Fig. 3 shows in each thread in N number of threads, at frame 355-1, ... 355-N, determine whether the right distance of atom exceeds the cut-off radius (assuming that these atoms are to all having long-range force).If determine that the right distance of atom exceeds the cut-off radius, at frame 365-1, ... 365-N, calculate the long-range correction term of current atom to corresponding in each thread, for example Ewald correction term.After the long-range correction term in each thread is calculated, can further determine in frame 375 whether atom is to all traversed.If atom is to not traversed, can continue to traverse atom in N number of GPU threads.If atom is to traverse, and after determining that iteration ends in frame 380, mean that the correction term of all atoms in atom pair list is all calculated.
[0065] In some embodiments, each atom pair in the ExclPairlist list may be assigned to each thread in the GPU for energy and force calculation.
[0066] In some embodiments, after the long-range correction term is calculated, if it is necessary to calculate the total corrected energy corresponding to the set of atoms or molecules including the target excluded atom pair list, the Coulomb potential calculated for each atom pair is superimposed on the local energy summation variable in the GPU. In some embodiments, if it is necessary to calculate the force vector of an atom, the calculated corrected Coulomb potential of the atom pair including the given atom can be added to the corresponding atom using the GPU atomic addition operation in the GPU. In some embodiments, the calculated corrected Coulomb potential of the atom pair including the given atom can be superimposed on the force vector of the atom in multiple threads of the GPU, and then the force vectors superimposed by multiple threads are merged to obtain the final force vector of the atom.
[0067] The locally summed energies and forces can then be transferred back to CPU memory. After all atom pairs are calculated, the total corrected energy for the set of atoms or molecules, including the target exclusion list, can be calculated based on the values of the local energy sum variables corresponding to the multiple threads. Furthermore, the force variables calculated by each thread can be added to the force vector for a given atom (i.e., to obtain the total force for the atom).
[0068] Compared with the original CPU end-to-end, by utilizing GPU acceleration, the overall computing speed can be significantly improved.
[0069] In some embodiments, for the ExclPairlist list constructed by non-perturbative atoms, the check for excluding atoms with excessively large distances can be canceled from the pre-processing process of the molecular dynamics analysis application, while adding the calculation and interface output of the maximum distance of excluded atoms. The interface output is to allow the user to confirm the maximum atomic distance. The pre-processing process here at least includes excluding atomic pairs that exceed the cutoff radius when constructing the excluded atom pair list. Since it is proposed in the embodiments of the present disclosure that the correction term and the corrected Coulomb potential still need to be calculated for atomic pairs that exceed the cutoff radius, it can be required that the molecular dynamics analysis application does not need to exclude atoms with excessively large distances during the pre-processing process. This can further simplify the computational overhead and complexity of the pre-processing stage.
[0070] The calculation of correction terms for atoms without perturbation is described above. FIG5 shows a flowchart of a process 500 for calculating correction terms for a pair of atoms with perturbation according to some embodiments of the present disclosure. Process 500 may be implemented at computing system 110 .
[0071] At block 510, the computing system 110 determines the perturbed atoms. The computing system 110 may filter the perturbed atoms from the excluded atoms set, where the excluded atoms set refers to atoms marked as excluded from the interaction calculation. In some embodiments, for a particular type of molecule, the atoms in the molecule that have been excluded from the interaction calculation may be identified, and the perturbed atoms may be determined from these atoms.
[0072] At block 520, the computing system 110 determines, based on the set of perturbed atoms, at least a portion of a target excluded atom pair list for computing interactions, denoted as fepExclPairlist. Each atom pair in fepExclPairlist includes at least one perturbed atom. That is, one atom in the atom pair is perturbed, and the other atom can be perturbed or non-perturbed.
[0073] It can be seen that after considering the perturbed and non-perturbed atoms, the ExclPairlist list and the fepExclPairlist list constitute the total set of target excluded atom pairs to be considered for the correction term.
[0074] By constructing a list of excluded atom pairs whose distances exceed the cutoff radius, fepExclPairlist is used. This list can be traversed and calculated, effectively reducing the number of atom pairs that are not excluded but exceed the cutoff radius. This list is constructed simultaneously with the software's calculation of atom pair distances.
[0075] Specifically, when constructing the atom pair list fepExclPairlist, it is checked whether an atom i and an atom j should be excluded. If they are excluded, the sequence number of atom i will be added to the "iinr" attribute of "fepExclPairlist", and the sequence number of atom j will be added to the "jjnr" attribute of "fepExclPairlist", and the "excl_fep" flag will be set to indicate whether this atom pair is a perturbative atom pair and should be excluded. Then, the value of "nrj" is increased, and the number of excluded atom pairs is counted. The "iinr" attribute and the "jjnr" attribute represent the sequence numbers of atom i and atom j, respectively.
[0076] In some embodiments, the computing system 110 may remove the atom pairs in the fepExclPairlist from the original total exclusion list to prevent repeated calculations. The final fepExclPairlist contains the perturbed atom pairs that are excluded and whose distance exceeds the cutoff radius.
[0077] When calculating the correction term, at each iteration, the fepExclPairlist table is traversed to exclude atom pairs from the calculation of the perturbed atomic short-range nonbonded forces. The distances between the atom pairs in the table are calculated, and a determination is made as to whether periodic boundary conditions should be applied in order to calculate the nearest neighbor distances between the two atoms under the periodic boundary. This is because the distances between the atom pairs may have changed between the time the list is constructed and the time the atomic distances are calculated, and therefore need to be recalculated.
[0078] If the Coulomb interaction type in the fepExclPairlist table is Ewald, and it is determined in block 530 that the distance between the perturbed atom pair exceeds the cutoff radius, then an Ewald correction term for the perturbed atom pair needs to be calculated. Taking into account that the state of the perturbed atom is unstable (changing between the A state and the B state), in some embodiments, for each atom pair in the fepExclPairlist table, in block 540, the computing system 110 calculates a first long-range correction term for both atoms in the atom pair in the first state (also referred to as the A state).
[0079] In some embodiments, the long-range correction term in the first state can be calculated based on the Coulomb charges of the two atoms in the first state, the distance between the atom pair, a predetermined error function, and the state value corresponding to the first state, which can be expressed as follows:
[0080] Where λ represents the state value.
[0081] At block 550, the computing system 110 calculates a second long-range correction term for the two atoms in the atom pair in the second state (also referred to as the B state). The second long-range correction term can be calculated based on the charges of the two atoms in the atom pair in the second state, the distance between the atom pair, a predetermined error function, and the state value corresponding to the second state to determine the second long-range correction term for the Coulomb potential of the atom pair in the second state. The calculation formula can be similar to equation (3) above, except that the parameters are determined in the second state (B state).
[0082] At block 560, computing system 110 determines whether the atom pairs have been traversed. If not, the atom pairs in fepExclPairlist may continue to be traversed. If it is determined at block 570 that the iteration is complete, then the correction terms for all atom pairs in the atom pair list have been calculated.
[0083] After calculating the first long-range correction term and the second long-range correction term for each atom pair in the fepExclPairlist list, the computing system 110 may determine a modified Coulomb potential for each atom pair based on the first long-range correction term and the second long-range correction term for each atom pair.
[0084] In some embodiments, if energy calculation is required, the current molecular pair energy is added to the total corrected energy. The force vector is then calculated and applied to the corresponding atoms.
[0085] In some embodiments, for the ExclPairlist constructed from non-perturbative atoms, the check for excessive distances to excluded atoms can be disabled in the pre-processing of the molecular dynamics analysis application. In addition, the calculation and interface output of the maximum distance to excluded atoms are added. This interface output allows the user to confirm the maximum distance.
[0086] In some embodiments, although not specifically shown, for the fepExclPairlist list consisting of perturbed atom pairs, computational acceleration can be performed using multiple threads of the GPU in a manner similar to that shown in FIG3 . In some embodiments, for the total list consisting of the fepExclPairlist list with perturbed atoms and the ExclPairlist list without perturbated atoms, the computation of the correction terms for each atom pair in the total list can be distributed among multiple threads of the GPU in the manner shown in FIG3 .
[0087] FIG6 shows a schematic diagram of a process 600 for calculating the Coulomb potential of an atom pair according to some embodiments of the present disclosure. The process 600 may be implemented in the computing system 110 of FIG1 .
[0088] In block 610 , the computing system 110 determines whether the distance between the atom pairs exceeds a cutoff radius for the atom pairs in the target exclusion atom pair list, and determines that the type of Coulombic interaction between the atom pairs is a long-range interaction.
[0089] In block 620 , the computing system 110 determines a long-range correction term for the Coulomb potential of the atom pair based on at least the Coulomb charges of the two atoms in the atom pair, the distance between the atom pair, and a predetermined error function if the distance between the atom pair exceeds the cutoff radius and the type of Coulomb interaction between the atom pair is a long-range interaction.
[0090] At block 630 , the computing system 110 determines a modified Coulomb potential for the atom pair based at least on the determined long-range correction term.
[0091] In some embodiments, process 600 further includes: calculating the total corrected energy corresponding to the set of atoms or molecules including the target exclusion atom pair list based on the Coulomb potential determined for each atom pair in the target exclusion atom pair list; and / or calculating the force vector of each of one or two atoms in the atom pair based at least on the corrected Coulomb potential of the atom pair.
[0092] In some embodiments, process 600 further includes: constructing a target exclusion atom pair list by filtering a non-perturbative atom set from an excluded atom set, the excluded atom set including atoms marked as excluded from interaction calculations; and determining at least a portion of the target exclusion atom pair list for calculating interactions based on the non-perturbative atom set.
[0093] In some embodiments, process 600 further includes: constructing a target exclusion atom pair list by filtering a perturbed atom set from an excluded atom set, the excluded atom set including atoms marked as excluded from interaction calculations; and determining at least a portion of the target exclusion atom pair list for calculating interactions based on the perturbed atom set.
[0094] In some embodiments, determining a long-range correction term for the Coulomb potential of an atom pair includes: if the atom pair includes at least one perturbed atom, determining a first long-range correction term for the Coulomb potential of the atom pair in the first state based on the charges of the two atoms in the atom pair in the first state, the distance between the atom pair, a predetermined error function, and a state value corresponding to the first state; and determining a second long-range correction term for the Coulomb potential of the atom pair in the second state based on the charges of the two atoms in the atom pair in the second state, the distance between the atom pair, the predetermined error function, and the state value corresponding to the second state. Determining the modified Coulomb potential of the atom pair includes determining the modified Coulomb potential of the atom pair based on the first long-range correction term and the second long-range correction term.
[0095] In some embodiments, determining the modified Coulomb potential of the atom pair based at least on the determined long-range correction term includes: determining the long-range Coulomb potential of the atom pair; and applying the long-range correction term to the Ewald calculation term in the modified long-range Coulomb potential to obtain the modified Coulomb potential of the atom pair.
[0096] In some embodiments, process 600 further includes distributing the calculation of the long-range correction term for each atom pair in the target exclusion atom pair list to multiple threads of the processing unit, and determining the long-range correction term for the Coulomb potential for each atom pair in the target exclusion atom pair list in parallel in the multiple threads.
[0097] In some embodiments, process 600 also includes: if the total corrected energy corresponding to the set of atoms or molecules including the target exclusion atom pair list is to be calculated, superimposing the corrected Coulomb potential calculated for each atom pair into the local energy summation variable in the processing unit; and calculating the total corrected energy corresponding to the set of atoms or molecules including the target exclusion atom pair list based on the values of the local energy summation variables corresponding to multiple threads.
[0098] In some embodiments, process 600 further includes determining, in a plurality of threads of the processing unit, the force vector for the given atom based on a modified Coulomb potential of an atom pair including the given atom, if the force vector for the given atom is to be calculated.
[0099] In some embodiments, the processing unit comprises a graphics processing unit (GPU).
[0100] FIG7 shows a block diagram of an apparatus 700 for calculating the Coulomb potential of atomic pairs according to some embodiments of the present disclosure. Apparatus 700 may be implemented as or included in computing system 110 of FIG1 . Each module / component in apparatus 700 may be implemented by hardware, software, firmware, or any combination thereof.
[0101] As shown in the figure, the apparatus 700 includes a determination module 710 configured to determine, for an atom pair in a target exclusion atom pair list, whether the distance between the atom pairs exceeds a cutoff radius, and determine that the type of Coulombic interaction between the atom pairs is a long-range interaction;
[0102] The device 700 also includes a correction term determination module 720, which is configured to determine a long-range correction term for the Coulomb potential of the atomic pair based on at least the Coulomb charges of the two atoms in the atomic pair, the distance between the atomic pair, and a predetermined error function if the distance between the atomic pair exceeds the cutoff radius and the type of Coulomb interaction between the atomic pair is a long-range interaction.
[0103] The apparatus 700 further includes a Coulomb potential determination module 730 configured to determine a modified Coulomb potential of the atom pair based at least on the determined long-range correction term.
[0104] In some embodiments, the device 700 also includes: an energy calculation module, configured to calculate the total corrected energy corresponding to the set of atoms or molecules including the target exclusion atom pair list based on the Coulomb potential determined for each atom pair in the target exclusion atom pair list; and / or an atomic force calculation module, configured to calculate the force vector of each of one or two atoms in the atom pair based at least on the corrected Coulomb potential of the atom pair.
[0105] In some embodiments, the device 700 also includes a non-perturbation atom pair list determination module, which is configured to: construct a target exclusion atom pair list by filtering a non-perturbation atom set from an excluded atom set, the excluded atom set including atoms marked as excluded from the interaction calculation; and determine at least a portion of the target exclusion atom pair list for calculating the interaction based on the non-perturbation atom set.
[0106] In some embodiments, the device 700 also includes a perturbation atom pair list determination module, which is configured to: construct a target exclusion atom pair list by filtering a perturbation atom set from an excluded atom set, the excluded atom set including atoms marked as excluded from the interaction calculation; and determine at least a portion of the target exclusion atom pair list for calculating the interaction based on the perturbation atom set.
[0107] In some embodiments, the correction term determination module 720 is further configured to: if the atom pair includes at least one perturbed atom, determine a first long-range correction term for the Coulomb potential of the atom pair in the first state based on the charges of the two atoms in the atom pair in the first state, the distance between the atom pair, a predetermined error function, and the state value corresponding to the first state; and determine a second long-range correction term for the Coulomb potential of the atom pair in the second state based on the charges of the two atoms in the atom pair in the second state, the distance between the atom pair, the predetermined error function, and the state value corresponding to the second state. The Coulomb potential determination module 730 is configured to determine the modified Coulomb potential of the atom pair based on the first long-range correction term and the second long-range correction term.
[0108] In some embodiments, the Coulomb potential determination module 730 is further configured to include: determining the long-range Coulomb potential of the atom pair; and using the long-range correction term in the Ewald calculation term in the correction long-range Coulomb potential to obtain the corrected Coulomb potential of the atom pair.
[0109] In some embodiments, the device 700 also includes: a thread allocation module, configured to allocate the calculation of the long-range correction term for each atom pair in the target exclusion atom pair list to multiple threads of the processing unit, and a thread execution module, configured to determine the long-range correction term for the Coulomb potential for each atom pair in the target exclusion atom pair list in parallel in multiple threads.
[0110] In some embodiments, the device 700 also includes: a thread-based energy calculation module, configured to: if the total corrected energy corresponding to the set of atoms or molecules including the target exclusion atom pair list is to be calculated, superimpose the Coulomb potential calculated for each atom pair into the local energy summation variable in the processing unit; and calculate the total corrected energy corresponding to the set of atoms or molecules including the target exclusion atom pair list based on the values of the local energy summation variables corresponding to multiple threads.
[0111] In some embodiments, the device 700 also includes a thread-based atomic force calculation module configured to: if the force vector of a given atom is to be calculated, determine the force vector of the given atom based on the modified Coulomb potential of the atomic pair including the given atom in multiple threads of the processing unit.
[0112] In some embodiments, the processing unit comprises a graphics processing unit (GPU).
[0113] FIG8 shows a block diagram of an electronic device 800 in which one or more embodiments of the present disclosure may be implemented. It should be understood that the electronic device 800 shown in FIG8 is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein. The electronic device 800 shown in FIG8 may be used to implement the computing system 110 of FIG1 or the apparatus 700 of FIG7.
[0114] As shown in FIG8 , electronic device 800 is in the form of a general-purpose computing device. Components of electronic device 800 may include, but are not limited to, one or more processors or processing units 810, memory 820, storage device 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860. Processing unit 810 may be a real or virtual processor and is capable of performing various processes according to programs stored in memory 820. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to enhance the parallel processing capabilities of electronic device 800.
[0115] The electronic device 800 typically includes a plurality of computer storage media. Such media can be any available media accessible to the electronic device 800, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 820 can be a volatile memory (e.g., registers, cache, random access memory (RAM)), a non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 830 can be a removable or non-removable medium and can include a machine-readable medium, such as a flash drive, a disk, or any other medium that can be used to store information and / or data and can be accessed within the electronic device 800.
[0116] The electronic device 800 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG8 , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "mobile hard disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data medium interfaces. The memory 820 may include a computer program product 828 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.
[0117] The communication unit 840 enables communication with other electronic devices via a communication medium. Additionally, the functions of the components of the electronic device 800 can be implemented in a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the electronic device 800 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0118] The input device 850 may be one or more input devices, such as a mouse, keyboard, or trackball. The output device 860 may be one or more output devices, such as a display, a speaker, or a printer. The electronic device 800 may also communicate with one or more external devices (not shown) via the communication unit 840 as needed, such as a storage device, a display device, or the like, with one or more devices that allow a user to interact with the electronic device 800, or with any device that allows the electronic device 800 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0119] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0120] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0121] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0122] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0123] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple implementations of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and a part for a module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0124] While various implementations of the present disclosure have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is selected to best explain the principles of the implementations, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the various implementations disclosed herein.
Claims
1. A method for excluding atom-pair Coulomb potential calculations, comprising: For the atom pairs in the target exclusion atom pair list, determining whether the distance between the atom pairs exceeds the cutoff radius, and determining that the type of Coulomb interaction between the atom pairs is a long-range interaction, and the atom pairs in the target exclusion atom pair list belong to excluded non-bonded interactions; If the distance between the atom pair exceeds a cutoff radius and the type of Coulombic interaction between the atom pair is a long-range interaction, determining a long-range correction term for the Coulombic potential of the atom pair based at least on the Coulombic charges of two atoms in the atom pair, the distance between the atom pair, and a predetermined error function; as well as A modified Coulomb potential for the atom pair is determined based at least on the determined long-range correction term.
2. The method according to claim 1, further comprising: Calculating a total corrected energy corresponding to a set of atoms or molecules including the target excluded atom pair list based on the Coulomb potential determined for each atom pair in the target excluded atom pair list; and / or A force vector is calculated for each of one or both atoms in the atom pair based at least on the modified Coulomb potential of the atom pair.
3. The method according to claim 1, further comprising: The target exclusion atom pair list is constructed by: screening a non-perturbative atom set from an excluded atom set, the excluded atom set including atoms marked as excluded from interaction calculations; as well as At least a portion of the target excluded atom pair list for calculating interactions is determined based on the non-perturbative atom set.
4. The method according to claim 1, further comprising: The target exclusion atom pair list is constructed by: screening a perturbation atom set from an excluded atom set, the excluded atom set comprising atoms marked as excluded from interaction calculations; as well as At least a portion of the target excluded atom pair list for calculating interactions is determined based on the perturbed atom set.
5. The method of claim 1 , wherein determining a long-range correction term for the Coulomb potential of the atom pair comprises: If the atom pair includes at least one perturbed atom, determining a first long-range correction term for the Coulomb potential of the atomic pair in the first state based on charges of two atoms in the atomic pair in the first state, a distance between the atomic pair, a predetermined error function, and a state value corresponding to the first state; as well as determining a second long-range correction term for the Coulomb potential of the atomic pair in the second state based on the charges of the two atoms in the atomic pair in the second state, the distance between the atomic pair, a predetermined error function, and a state value corresponding to the second state; as well as And wherein determining the modified Coulomb potential of the atom pair comprises: determining the modified Coulomb potential of the atom pair based on the first long-range correction term and the second long-range correction term.
6. The method of claim 1 , wherein determining a modified Coulomb potential of the atom pair based at least on the determined long-range correction term comprises: determining the long-range Coulomb potential of the atomic pair; as well as The long-range correction term is used to correct the Ewald calculation term in the long-range Coulomb potential to obtain the corrected Coulomb potential of the atomic pair.
7. The method according to claim 1, further comprising: Distributing the calculation of the long-range correction term for each atom pair in the target excluded atom pair list to multiple threads of the processing unit, and A long-range correction term of the Coulomb potential for each atom pair in the target excluded atom pair list is determined in parallel in the plurality of threads.
8. The method according to claim 7, further comprising: If a total corrected energy corresponding to a set of atoms or molecules including the target excluded atom pair list is to be calculated, the Coulomb potential calculated for each atom pair is superimposed on a local energy summation variable in the processing unit; as well as Based on the values of the local energy summation variables corresponding to the multiple threads, a total corrected energy corresponding to the atom set or the molecule set including the target excluded atom pair list is calculated.
9. The method according to claim 7, further comprising: If a force vector of a given atom is to be calculated, the force vector of the given atom is determined in the plurality of threads of the processing unit based on a modified Coulomb potential of an atom pair including the given atom.
10. The method of any one of claims 7 to 9, wherein the processing unit comprises a graphics processing unit (GPU).
11. A device for calculating the Coulomb potential of an excluded atom pair, comprising: a judgment module configured to determine, for the atom pairs in the target exclusion atom pair list, whether the distance between the atom pairs exceeds a cutoff radius, and determine that the type of Coulombic interaction between the atom pairs is a long-range interaction, and that the atom pairs in the target exclusion atom pair list belong to excluded non-bonded interactions; a correction term determining module configured to determine a long-range correction term for the Coulomb potential of the atomic pair based on at least the Coulomb charges of two atoms in the atomic pair, the distance between the atomic pair, and a predetermined error function if the distance between the atomic pair exceeds a cutoff radius and the type of the Coulomb interaction between the atomic pair is a long-range interaction; as well as The Coulomb potential determination module is configured to determine a modified Coulomb potential of the atom pair based at least on the determined long-range correction term.
12. An electronic device comprising: at least one processing unit; as well as At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the apparatus to perform the method according to any one of claims 1 to 10.
13. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 10 when executed by a processor.
14. A computer program product comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Method for compositely measuring zero distance constant in law of universal gravitation by using multiple experiments
CN114187809A
Tailor-made force fields for crystal structure prediction
US20100023473A1