Method, apparatus, device and storage medium for processing analog tasks
By dividing the simulation task into subtasks and re-executing the unfinished parts in cloud resources, the problem of resource waste caused by simulation task abortion is solved, and efficient and flexible molecular dynamics simulation is achieved.
Patent Information
- Application Number
- CN202211426411.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-14
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-11-14
AI Technical Summary
Traditional molecular dynamics simulations are prone to interruption in cloud resources, resulting in wasted computing resources, and restarting requires a long time, making it difficult to make flexible use of resources.
The simulation task is divided into multiple subtasks, which are executed sequentially based on the physical characteristics of the molecular dynamics process. If the task is terminated, cloud resources are requested again to execute the unfinished subtasks.
It enables efficient and flexible use of cloud resources, improves the throughput and efficiency of molecular dynamics simulations, and reduces computational costs.
Smart Images

Figure CN115798610B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Example embodiments of the present disclosure generally relate to the field of computers, and in particular, to a method, an apparatus, an equipment and a computer readable storage medium for processing a simulation task. BACKGROUND
[0002] For biological, pharmaceutical, chemical, material and other disciplines, the traditional research and development mainly relies on experimental trial and error, which is low in efficiency and high in time and economic cost. In recent years, theoretical simulation methods represented by molecular dynamics simulation have rapidly emerged. Molecular dynamics simulation is a method for simulating the physical motion trajectory and state of atoms and molecules based on Newtonian mechanics principle, and is one of the simulation methods closest to experimental conditions in molecular simulation. SUMMARY
[0003] In a first aspect of the present disclosure, a method for processing a simulation task is provided. The method comprises: determining that a simulation task is aborted in a process of executing the simulation task related to a molecular dynamics process by using cloud resources; in response to the abortion, determining whether a current subtask of the simulation task is completed, wherein the simulation task is divided into a plurality of subtasks at least partially according to physical characteristics of the molecular dynamics process, and the plurality of subtasks are to be executed serially in time; and in response to determining that the current subtask is not completed, requesting to re-execute the current subtask so as to continue executing the simulation task.
[0004] In a second aspect of the present disclosure, an apparatus for processing a simulation task is provided. The apparatus comprises: a first determining module configured to determine that a simulation task is aborted in a process of executing the simulation task related to a molecular dynamics process by using cloud resources; a second determining module configured to, in response to the abortion, determine whether a current subtask of the simulation task is completed, wherein the simulation task is divided into a plurality of subtasks at least partially according to physical characteristics of the molecular dynamics process, and the plurality of subtasks are to be executed serially in time; and a requesting module configured to, in response to determining that the current subtask is not completed, request to re-execute the current subtask so as to continue executing the simulation task.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The device comprises 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. The instructions, when executed by the at least one processing unit, cause the device to perform the method of the first aspect.
[0006] In a fourth aspect of the present disclosure, a computer readable storage medium is provided. The computer readable storage medium has stored thereon a computer program, which is executable by a processor to implement the method of the first aspect.
[0007] It is to be understood that the description of the content in the summary section is not intended to define key or essential features of embodiments of the disclosure, nor is it intended to limit the scope of the disclosure. Other features of the disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0008] The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:
[0009] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented is shown;
[0010] Figure 2 A schematic diagram showing splitting of simulation tasks according to some embodiments of the present disclosure is shown;
[0011] Figure 3A A flowchart showing a process of processing simulation tasks according to some embodiments of the present disclosure is shown;
[0012] Figure 3B A flowchart showing another process of processing simulation tasks according to some embodiments of the present disclosure is shown;
[0013] Figure 4 A block diagram showing an apparatus for processing simulation tasks according to some embodiments of the present disclosure is shown; and
[0014] Figure 5 A block diagram showing an apparatus capable of implementing a number of embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0015] It can be understood that, before using the technical solutions disclosed by embodiments of the present disclosure, the type of personal information involved in the present disclosure, the scope of use, the scene of use, etc. should be informed to the user and the authorization of the user should be obtained in accordance with relevant laws and regulations.
[0016] For example, in response to receiving a user's active request, a prompt message is sent to the user to explicitly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can voluntarily choose whether to provide personal information to the electronic device, application program, server or storage medium, etc. software or hardware that performs the operation of the technical solutions of the present disclosure according to the prompt message.
[0017] As an optional but non-limiting implementation, in response to receiving the active request of the user, the manner of sending the prompt information to the user may be, for example, a pop-up window manner, in which the prompt information may be presented in the form of text. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0018] It can be understood that the above notification and user authorization obtaining process is only illustrative and does not limit the implementation of the present disclosure, and other manners meeting the relevant laws and regulations can also be applied to the implementation of the present disclosure.
[0019] It can be understood that the data (including but not limited to the data itself, the acquisition or use of the data) involved in the technical solution should comply with the requirements of the relevant laws and regulations and the relevant provisions.
[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms, and should not be interpreted as being limited to the embodiments set forth herein, on the contrary, these embodiments are provided to make the present disclosure more thorough and complete. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes, and are not intended to limit the scope of protection of the present disclosure.
[0021] It should be noted that the titles of any section / subsection provided herein are not limiting. Various embodiments are described throughout this document, and any type of embodiment can be included under any section / subsection. Furthermore, embodiments described in any section / subsection can be combined with any other embodiment described in the same section / subsection and / or a different section / subsection in any manner.
[0022] In the description of embodiments of the present disclosure, the term "comprising" and similar terms are to be understood as open-ended, i.e., "including but not limited to". The term "based on" is to be understood as "based at least in part on". The term "one embodiment" or "the embodiment" is to be understood as "at least one embodiment". The term "some embodiments" is to be understood as "at least some embodiments". Other explicit and implicit definitions can also be included below. The terms "first", "second", etc. can refer to different or the same objects. Other explicit and implicit definitions can also be included below.
[0023] As briefly mentioned above, traditional research and development mainly rely on experimental trial and error, which is inefficient and costly in time and money. In recent years, theoretical simulation methods represented by molecular dynamics simulation have rapidly emerged. Molecular dynamics simulation is one of the simulation methods in molecular simulation that is closest to experimental conditions. Molecular dynamics simulation can give the microscopic evolution process of the system from the atomic level, and intuitively show the mechanism and law of the occurrence of experimental phenomena, thereby promoting research to be more efficient, more economical, and more predictable. Therefore, molecular dynamics simulation plays an increasingly important role in the research of biology, pharmacy, chemistry, and material science.
[0024] For example, advanced energy storage technologies are widely used in modern society, from consumer electronics, electric vehicles to large-scale energy storage, greatly promoting the convenience and intelligentization of social development. Electrolyte is the "blood" of various energy storage devices, which directly determines the actual performance of the energy storage device to a large extent. Therefore, the development of advanced electrolyte systems plays a key role in the further development of future energy storage technologies. Using molecular dynamics simulation, the key physical and chemical properties of the electrolyte can be obtained at the molecular level, thereby guiding the rational design of the next generation of electrolytes. Therefore, molecular dynamics simulation plays a very key role in the design and development of advanced electrolytes. However, due to the large number of electrolyte systems and the complexity of the components, a large number of molecular dynamics simulation calculations often need to be carried out to obtain the relevant physical and chemical properties of the electrolyte. This puts very high requirements on computing resources.
[0025] In order to more clearly understand the embodiments of the present disclosure, an example of the application of molecular dynamics simulation to electrolytes (also referred to as "Example 1") is described. In Example 1, a traditional molecular dynamics simulation method is used to calculate the solvation structure of the electrolyte. LiFP6 ethylene carbonate (EC) / diethyl carbonate (DEC) electrolyte is used as an example. First, Packmol software is used to construct an electrolyte model containing 50 LiFP6, 300 EC and 700 DEC molecules, and then LAMMPS software is used to perform molecular dynamics simulation on the LiFP6 EC / DEC electrolyte model. The simulation process includes four stages.
[0026] In stage (1), isothermal-isobaric ensemble (NPT) calculation is performed at a temperature of 300 K, a pressure of 1 atmosphere, a time of 2 ns, and a time step of 1 fs.
[0027] In stage (2), the temperature is raised from 300 K to 400 K, the ensemble is NPT, the pressure is 1 atmosphere, the temperature raising rate is 40 K / ns, and finally at a temperature of 400 K, the temperature is kept constant for 2 ns, and the time step is 1 fs.
[0028] In stage (3), annealing was performed from 400K to 300K, with an ensemble of NPT, a pressure of 1 atmosphere, a cooling rate of 40K / ns, and finally at 300K, held at a constant temperature for 2ns, with a time step of 1fs.
[0029] In stage (4), the canonical ensemble (NVT) calculation is performed at a temperature of 300K for a time of 10ns and a time step of 1fs.
[0030] The above four-stage molecular dynamics simulation process lasted a total of 21 ns, completed in a single computational node. After the above calculation process was completed, the data from the last 5 ns were sampled, and the solvation structure of the LiFP6 EC / DEC electrolyte was analyzed using radial distribution function (RDF). This included Li–F and Li–O. EC and Li–O DEC The RDF values were obtained. Integrating the three RDF values yielded the coordination number of lithium ions with other atoms, thus revealing the PF6 content in the first solvation shell of the lithium ion. - The average number of EC and DEC.
[0031] For Example 1, when using traditional molecular dynamics simulation methods, the simulation task must be completed in one computational node. If the task is interrupted, it needs to be manually restarted to begin execution again. In other words, the simulation task needs to continuously occupy one or more computational resources, and cannot flexibly utilize computational resources.
[0032] With the development of cloud technology, utilizing cloud resources to perform molecular dynamics simulations offers flexibility and convenience. Cloud resources can be provided as elastic resources. For example, cloud service providers offer computing power through various instances. Such instances can include, for example, spot instances, on-demand instances, and reserved instances. On-demand instances provide computing resources based on the user's actual usage time. Reserved instances allow users to purchase computing resources on a monthly or yearly basis. Spot instances allow users to use currently idle resources in the cloud for computation. Using spot instances, cloud service providers can utilize these idle resources to generate revenue. For users, spot instances are inexpensive, but there is a risk of termination at any time. Cloud service providers can terminate these instances with almost no warning.
[0033] Molecular dynamics simulations, especially those for electrolytes, often deal with complex systems and can therefore require lengthy computation times. If a simulation is aborted, restarting it from scratch will be extremely time-consuming. Therefore, fault-tolerant design is necessary when using cloud resources to perform molecular dynamics simulations.
[0034] Embodiments of this disclosure propose a scheme for handling simulation tasks. According to various embodiments of this disclosure, the simulation task is divided into multiple subtasks, at least in part, based on the physical characteristics of the molecular dynamics process, and these subtasks are executed sequentially in time. During the execution of the simulation task using cloud resources, if the simulation task is aborted, it is determined whether the current subtask of the simulation task has been completed. If the current subtask has not been completed, new cloud resources are requested to re-execute the incomplete current subtask in order to complete the simulation task.
[0035] In the embodiments of this disclosure, the simulation task is divided into several sub-tasks, and cloud resources are invoked sequentially to execute each sub-task. In this way, molecular dynamics simulations do not need to occupy a single computing resource for an extended period. This approach allows for flexible utilization of cloud resources, enabling high-throughput, high-efficiency, and highly portable molecular dynamics simulations.
[0036] The exemplary embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0037] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. In environment 100, cloud computing system 110 may include servers that provide operations such as data processing, storage, or control via virtual machines or similar means.
[0038] The cloud computing system 110 can utilize molecular dynamics simulation applications to handle simulation tasks 120 related to molecular dynamics processes. For example, the cloud computing system 110 may have a molecular dynamics simulation application installed, or it may have access to a molecular dynamics simulation application installed on another device. In embodiments of this disclosure, the molecular dynamics simulation application may include, but is not limited to, LAMMPS, GROMACS, AMBER, CHARMM, NAMD, ACEMD, and PLUMD.
[0039] Simulation task 120 can be used for molecular dynamics processes related to various types of simulated objects. In some embodiments, the simulated object of simulation task 120 may include an electrolyte system. The electrolyte includes one or more of solvents, salts, and additives. The electrolyte system can be applied to one or more of batteries, supercapacitors, and fuel cells. Batteries may include, but are not limited to, lithium-ion batteries, lithium metal batteries, sodium-ion batteries, sodium metal batteries, potassium-ion batteries, potassium metal batteries, magnesium-ion batteries, magnesium metal batteries, calcium-ion batteries, calcium metal batteries, zinc-ion batteries, zinc metal batteries, aluminum-ion batteries, and aluminum metal batteries. Supercapacitors may include, but are not limited to, double-layer capacitors, pseudocapacitors, and asymmetric capacitors. Fuel cells may include, but are not limited to, molten carbonate fuel cells, proton exchange membrane fuel cells, and alkaline fuel cells.
[0040] In some embodiments, the simulation object of simulation task 120 can be other types of materials. For example, it may include, but is not limited to, the following systems: solid electrolytes, polymer materials, biomacromolecules, two-dimensional materials, metal-organic framework materials, organic covalent materials, carbon materials, and metallic materials.
[0041] Environment 100 also includes a task controller 130. Task controller 130 controls the execution of the simulated task 120. For example, task controller 130 can break down the simulated task 120 into multiple subtasks. Alternatively, task controller 130 can resubmit a subtask after it has been aborted. Task controller 130 can be implemented in any suitable manner. In some embodiments, such as... Figure 1 As shown, task controller 130 can be implemented independently of cloud computing system 110. For example, task controller 130 can be implemented using a local device. In this case, task controller 130 can communicate with cloud computing system 110. Alternatively, in some embodiments, task controller 130 can be implemented within cloud computing system 110. For example, task controller 130 can be implemented using cloud servers or containers. Alternatively, in some embodiments, a portion of task controller 130 can be implemented within cloud computing system 110, while another portion is implemented independently of cloud computing system 110. Embodiments of this disclosure are not limited in this respect.
[0042] It should be understood that the structure and functionality of the example environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure.
[0043] Splitting of simulation tasks
[0044] Figure 2 A schematic diagram 200 is shown illustrating the splitting of a simulation task 120 according to some embodiments of the present disclosure. It should be understood that the splitting of the simulation task 120 can be performed on a terminal device or by a task controller 130.
[0045] like Figure 2As shown, simulation task 120 is related to molecular dynamics process 220. Based on at least the physical characteristics of molecular dynamics process 220, it is divided into N segments, namely segments 230-1, 230-2, ..., 230-N, which are collectively or individually referred to as segment 230, where N is a positive integer greater than or equal to 1. The physical characteristics of molecular dynamics process 220 may include, but are not limited to, temperature, pressure, and physical duration. Then, based on the segmentation of molecular dynamics process 220, simulation task 120 is further divided into N subtasks, namely subtasks 210-1, 210-2, ..., 210-N, which are collectively or individually referred to as subtasks 210. Each subtask 210 corresponds to one segment 230. That is, each subtask 210 is used to simulate the molecular dynamics subtask of the corresponding segment.
[0046] In some embodiments, the various subtasks 210 may have the same simulation parameters. Such simulation parameters may include, but are not limited to, interatomic interaction potential functions, time steps, temperature control methods, pressure control methods, atomic displacements, velocity and acceleration calculation methods, etc. In some embodiments, the various subtasks 210 may have different simulation parameters. Such simulation parameters may include, but are not limited to, ensembles (one or more of canonical ensembles, microcanonical ensembles, grand canonical systems, isothermal-isobaric ensembles, isobaric-isoenthalpic ensembles), temperature, pressure, total simulation time, etc.
[0047] In some embodiments, the physical duration of a molecular dynamics process can be segmented based on the availability of cloud resources to determine multiple duration segments. Accordingly, each segment 230 corresponds to a duration segment. The length of each duration segment can depend on the availability of cloud resources, such as the number of elastic computing nodes or resources, computing power, etc. Thus, each subtask 210 corresponds to a duration segment.
[0048] In some embodiments, the molecular dynamics process is divided into equally spaced segments. As an example, let the total computation time of simulation task 220 be T0, and the number of segments be N, i.e., the number of subtasks be N. With equally spaced segments, the computation time of each subtask 220 is T1 = T0 / N. The computation time T1 of each subtask 220 is less than or equal to the maximum computation time T2 that the flexible computing node can provide.
[0049] The following describes an example of equally spaced partitioning of the molecular dynamics process, also known as Example 2. In Example 2, molecular dynamics simulations are performed based on equally spaced partitioning of the molecular dynamics process to calculate the electrolyte solvation structure. For ease of comparison with Example 1, Example 2 also uses a LiFP6 EC / DEC electrolyte as the simulation object. First, an electrolyte model containing 50 LiFP6, 300 EC, and 700 DEC molecules is constructed using Packmol software, with the same model size and atomic coordinates as in Example 1. Then, molecular dynamics simulations are performed on the LiFP6 EC / DEC electrolyte model using LAMMPS software. The simulation process consists of four stages.
[0050] In stage (1), isothermal and isobaric ensemble (NPT) calculations were performed at a temperature of 300K, a pressure of 1 atmosphere, a time of 2ns, and a time step of 1fs.
[0051] In stage (2), the temperature is increased from 300K to 400K, the ensemble is NPT, the pressure is 1 atmosphere, the heating rate is 40K / ns, and finally the temperature is held constant at 400K for 2ns, with a time step of 1fs.
[0052] In stage (3), annealing was performed from 400K to 300K, with an ensemble of NPT, a pressure of 1 atmosphere, a cooling rate of 40K / ns, and finally at 300K, held at a constant temperature for 2ns, with a time step of 1fs.
[0053] In stage (4), NVT (canonical ensemble) calculations were performed at a temperature of 300K for a time of 10ns and a time step of 1fs.
[0054] The total physical duration of the above four stages of molecular dynamics simulation is 21 ns. (Reference) Figure 2 The 21ns simulation process was divided into seven equally spaced segments, each 3ns long. Based on these seven segments, the simulation task was further divided into seven subtasks. Each subtask simulates a corresponding subprocess.
[0055] The first subtask is used to simulate the following subprocess: perform NPT calculation at a temperature of 300K, a pressure of 1 atmosphere, a time of 2 ns, and a time step of 1 fs; then increase the temperature from 300K to 340K, perform NPT ensemble, a pressure of 1 atmosphere, a heating rate of 40K / ns, and a time step of 1 fs.
[0056] The second subtask is used to simulate the following subprocess: heating from 340K to 400K, with an ensemble of NPT, a pressure of 1 atmosphere, a heating rate of 40K / ns, and a time step of 1fs; then performing NPT calculations at 400K, with a pressure of 1 atmosphere, a time of 1.5ns, and a time step of 1fs.
[0057] The third subtask is used to simulate the following subprocess: perform NPT calculation at a temperature of 400K, a pressure of 1 atmosphere, a time of 0.5 ns, and a time step of 1 fs; then anneal from 400K to 300K, with an ensemble of NPT, a pressure of 1 atmosphere, a cooling rate of 40K / ns, and a time step of 1 fs.
[0058] The fourth subtask is used to simulate the following subprocesses: perform NPT calculations at a temperature of 300K, a pressure of 1 atmosphere, a time of 2 ns, and a time step of 1 fs; then perform NVT calculations at a temperature of 300K, a pressure of 1 atmosphere, a time of 1 ns, and a time step of 1 fs.
[0059] Subtasks 5, 6, and 7 are all used to simulate the following subprocess: NVT calculations are performed at a temperature of 300K, a pressure of 1 atmosphere, a time of 3ns, and a time step of 1fs.
[0060] In some embodiments, the molecular dynamics process can be divided into non-equidistant subtasks. The computation time T for each subtask is... 1,i The nodes can be flexibly determined based on the corresponding elastic computing nodes to satisfy the following relationship:
[0061] T 1,i ≤T 2,i And T0 = ∑ i=1,2,…,N T 1,i
[0062] Where T 1,i T represents the computation time of the i-th subtask. 2,i This represents the maximum computation time that the elastic computing resources can provide for the i-th subtask.
[0063] The following describes an example of non-equidistant partitioning of the molecular dynamics process, also known as Example 3. In Example 3, molecular dynamics simulations are performed based on equidistant partitioning of the molecular dynamics process to calculate the electrolyte solvation structure. For ease of comparison with Examples 1 and 2, Example 3 also uses a LiFP6 EC / DEC electrolyte as the simulation object. First, an electrolyte model containing 50 LiFP6, 300 EC, and 700 DEC molecules is constructed using Packmol software, with the same model size and atomic coordinates as in Example 1. Then, molecular dynamics simulations are performed on the LiFP6 EC / DEC electrolyte model using LAMMPS software. The simulation process consists of four stages.
[0064] In stage (1), isothermal and isobaric ensemble (NPT) calculations were performed at a temperature of 300K, a pressure of 1 atmosphere, a time of 2ns, and a time step of 1fs.
[0065] In stage (2), the temperature is increased from 300K to 400K, the ensemble is NPT, the pressure is 1 atmosphere, the heating rate is 40K / ns, and finally the temperature is held constant at 400K for 2ns, with a time step of 1fs.
[0066] In stage (3), annealing was performed from 400K to 300K, with an ensemble of NPT, a pressure of 1 atmosphere, a cooling rate of 40K / ns, and finally at 300K, held at a constant temperature for 2ns, with a time step of 1fs.
[0067] In stage (4), NVT (canonical ensemble) calculations were performed at a temperature of 300K for a time of 10ns and a time step of 1fs.
[0068] The total physical duration of the above four stages of molecular dynamics simulation is 21 ns. (Reference) Figure 2 The 21ns simulation process was divided into five segments with non-equidistant intervals: the first segment had a physical duration of 2ns, the second segment had a physical duration of 4.5ns, the third segment had a physical duration of 4.5ns, the fourth segment had a physical duration of 5ns, and the fifth segment had a physical duration of 5ns. Based on these five segments, the simulation task was divided into five subtasks. Each subtask simulates a subprocess of a specific duration.
[0069] The first subtask is used to simulate the following subprocess: performing NPT calculations at 300K with a pressure of 1 atmosphere, a time of 2ns, and a time step of 1fs.
[0070] The second subtask is used to simulate the following subprocess: heating from 300K to 400K, with an ensemble of NPT, a pressure of 1 atmosphere, a heating rate of 40K / ns, and finally isothermal at 400K for 2ns, with a time step of 1fs.
[0071] The third subtask is used to simulate the following subprocess: annealing from 400K to 300K, with an ensemble of NPT, a pressure of 1 atmosphere, a cooling rate of 40K / ns, and finally isothermal at 300K for 2ns, with a time step of 1fs.
[0072] The fourth and fifth subtasks are both used to simulate the following subprocess: performing NVT calculations at 300K with a time of 5ns and a time step of 1fs.
[0073] By supporting both equidistant and non-equidistant partitioning, simulation tasks can be automatically and flexibly partitioned based on available elastic computing resources (e.g., the duration of elastic computing resources). This approach improves the efficiency of utilizing cloud resources for molecular dynamics simulations.
[0074] Example process for processing simulation tasks
[0075] The above describes an embodiment of breaking down simulation task 120 into multiple subtasks. The following, in conjunction with... Figure 3A and Figure 3B This describes the processing of these subtasks. When processing a subtask, the state of the simulated object in the molecular dynamics process needs to be set. In some embodiments, adjacent subtasks may be related. Accordingly, the initial state of the simulated object in the current subtask is determined based on the final state of the simulated object in the immediately preceding subtask. For example, the initial structure of the first subtask is equal to the initial structure of the simulated task. The initial structure, atomic velocities, etc., of each subsequent subtask are determined by the final state structure, atomic velocities, etc., of the previous subtask.
[0076] Figure 3A A flowchart of a process 300 for processing a simulation task according to some embodiments of the present disclosure is shown. Reference is made below. Figure 1 Describe the process 300.
[0077] In block 310, during the execution of a simulation task 120 related to a molecular dynamics process using cloud resources, it is determined that the simulation task 120 has been aborted. In some embodiments, the reason for the abortion of the simulation task 120 may be further determined. It may be determined that the simulation task 120 was aborted because the cloud resources were at least partially reclaimed. For example, the elastic computing resources used to process the current subtask were reclaimed, causing the simulation task 120 to be aborted. In this case, process 300 may continue to block 320. If it is determined that the simulation task 120 was unexpectedly aborted due to model or algorithmic reasons, process 300 ends.
[0078] In block 320, in response to abort, it is determined whether the current subtask of simulation task 120 has been completed. For example, task controller 130 may determine whether the current i-th subtask has been completed. If it is determined that the current subtask has not been completed, process 300 proceeds to block 330.
[0079] In box 330, a request is made to re-execute the current subtask in order to continue the execution of simulation task 120. For example, task control 130 can resubmit the current i-th subtask. If the subsequent execution of simulation task 120 is aborted, process 300 returns to box 310, as follows. Figure 3A As shown.
[0080] Continuing with the description of box 320. In some embodiments, if it is determined in box 320 that the current subtask has been completed, then the following is performed: Figure 3B The process 305 is shown. In box 350, the output of the current subtask can be stored. In box 360, it is determined whether the current subtask is the last subtask among multiple subtasks. If the current subtask is not the last subtask among multiple subtasks, process 305 proceeds to box 370. In box 370, execution of the next subtask immediately following the current subtask can be requested. For example, task controller 130 can submit the (i+1)th subtask to utilize currently available elastic computing resources for its execution. If subsequent execution of simulation task 120 is aborted, the process returns to box 310.
[0081] Overall, the simulation task is divided into multiple subtasks. While executing these subtasks using cloud resources, upon completion of the current subtask, its output is first stored, and then the remaining subtasks are completed sequentially according to the order in which they were divided.
[0082] If a reclaimed elastic computing node causes the current subtask to be aborted, first determine if the current subtask is complete. If not, request a new elastic computing node to re-execute the current subtask. If the current subtask is complete, store its output and then request a new elastic computing node to execute the next subtask immediately following it. If the current subtask is aborted due to an error in the molecular dynamics model or algorithm, stop the current and subsequent subtasks, and terminate the simulation.
[0083] Continuing with Examples 2 and 3 above, the seven subtasks in Example 2 can be completed using different elastic compute nodes, as can the five subtasks in Example 3. Comparing Examples 2 and 3 with Example 1, the simulation task in Example 1 occupies one elastic compute node, and if the task is interrupted, it needs to be manually restarted. Regardless of when the interruption occurs, execution must start from the beginning. In contrast, each subtask in Examples 2 and 3 occupies one elastic compute node. If a subtask is interrupted, only the current subtask needs to be re-executed, and then the remaining subtasks can be executed sequentially, allowing for flexible use of cloud resources and cost savings.
[0084] To better understand the processing of the simulation task in the fundamental disclosed embodiments, another example, namely Example 4, is described. In Example 4, molecular dynamics simulations are performed based on non-equidistant splitting of molecular dynamics processes to batch calculate solvent and electrolyte viscosities. First, using Packmol software, 12 electrolyte or pure solvent models were constructed, including 1000 models of 1,3-dioxolane (DOL), 1000 models of 1,2-dimethoxyethane (DME), 600DOL+600DME, 50 models of sodium bis(trifluoromethanesulfonyl)imide (NaTFSI)+600DOL+600DME, 100NaTFSI+600DOL+600DME, 200NaTFSI+600DOL+600DME, 1000EC, 1000DEC, 300EC+700DEC, 50LiFP6+300EC+700DEC, 100LiFP6+300EC+700DEC, and 200LiFP6+300EC+700DEC. Batch molecular dynamics simulations were then performed using LAMMPS software, with the same simulation procedure designed:
[0085] In stage (1), NPT calculations were performed at a temperature of 300K, a pressure of 1 atmosphere, a time of 2ns, and a time step of 1fs.
[0086] In stage (2), the temperature was increased from 300K to 500K, the ensemble was NPT, the pressure was 1 atmosphere, the heating rate was 40K / ns, and finally the temperature was held at 500K for 2ns, with a time step of 1fs.
[0087] In stage (3), annealing was performed from 500K to 300K, with an ensemble of NPT, a pressure of 1 atmosphere, a cooling rate of 40K / ns, and finally at 300K, a constant temperature of 2ns, with a time step of 1fs.
[0088] In stage (4), NVT calculations were performed at a temperature of 300K for a time of 15ns and a time step of 1fs.
[0089] According to the non-equal-interval splitting embodiment of this disclosure, the simulation process of the above 12 electrolyte or solvent models is divided into 10 segments and batched for calculation. The submission and running results of each sub-task in the 12 simulation tasks are observed, as shown in the table below:
[0090] Table 1. Number of submissions for each subtask in the simulation tasks corresponding to the 12 models
[0091]
[0092] As shown in Table 1, if a subtask in a simulation task has a submission count of 1, it indicates that the subtask was submitted to the elastic computing node only once and successfully completed the calculation. A few subtasks can successfully complete the calculation after being submitted twice. Very few subtasks require 3 or 4 submissions to successfully complete the calculation. In the simulation tasks corresponding to models 6 and 10 of the electrolyte or solvent model, some subtasks have a submission count of 0, indicating that there are errors caused by non-elastic computing resource issues in their preceding subtasks, such as model problems or algorithm problems leading to unexpected termination, which further causes the simulation task of the electrolyte or solvent model to terminate prematurely.
[0093] The above example illustrates the processing of multiple subtasks. See also... Figure 3B .
[0094] In some embodiments, if it is determined in block 360 that the current subtask is the last of a plurality of subtasks, process 305 proceeds to block 380. In block 380, the outputs of these subtasks can be combined as the simulation result of simulation task 120. In block 390, the properties of the simulated object are determined based on at least a portion of the simulation result. For example, the properties of the simulated object can be analyzed based on any segment of data between the system reaching stability and the end of the simulation task. Using an electrolyte as an example, the properties of the simulated object may include, but are not limited to, the solvation structure, viscosity, and transport characteristics of the electrolyte.
[0095] Furthermore, in some embodiments, to obtain certain properties of the simulated object, such as the diffusion coefficient of the electrolyte, the simulation results need to be analyzed using an output file that is independent of the zero-time position. Based on the analysis principle, when analyzing a trajectory-dependent output file, the structural changes in adjacent subtasks are continuous. When analyzing a zero-time position-dependent output file, the structure in each subtask starts from the zero-time position, and the structural changes in adjacent subtasks are discontinuous, leading to erroneous analysis results. Output files independent of the zero-time position can include, but are not limited to, molecular dynamics simulation trajectory files. Simulation trajectory files indicate the trajectory of positional changes of the molecules included in the simulated object during molecular dynamics processes.
[0096] Continue to refer to Examples 1 to 4 above to describe the determination of the properties of the simulated object.
[0097] Example 1 uses traditional molecular dynamics simulation methods to obtain simulation results. The last 5 ns of data in the simulation results are sampled, and the solvation structure of the LiFP6 EC / DEC electrolyte is analyzed using RDF, including Li–F and Li–O. EC and Li–O DEC The RDF values were obtained. The coordination numbers of lithium ions with other atoms were obtained by integrating the three RDF values, thus revealing the PF6 content in the first solvation shell of the lithium ion. - The average number of EC and DEC.
[0098] Example 2 illustrates the use of equally spaced splitting in this disclosure. After all seven subtasks are completed, the output files of the simulation results from each subtask are automatically concatenated sequentially to construct a complete molecular dynamics simulation trajectory file. Based on the constructed complete molecular dynamics simulation trajectory file, the last 5 ns of data are sampled, and the solvation structure of the LiFP6 EC / DEC electrolyte, including Li–F and Li–O, is analyzed using RDF. EC and Li–O DEC The RDF values were obtained. Integrating the three RDF values yielded the coordination number of lithium ions with other atoms, thus revealing the PF6 content in the first solvation shell of the lithium ion. - The average number of EC and DEC is obtained. That is, the solvation structure of the electrolyte is calculated by the molecular dynamics fragmentation simulation method based on equal-spaced splitting, which is completely consistent with the results in Example 1.
[0099] Example 3 illustrates the non-equidistant splitting method used in this disclosure. After all five subtasks are completed, the output files of the simulation results from each subtask are automatically concatenated to construct a complete molecular dynamics simulation trajectory file. Based on the constructed complete molecular dynamics simulation trajectory file, the last 5 ns of data are sampled, and the solvation structure of the LiFP6EC / DEC electrolyte, including Li–F and Li–O, is analyzed using RDF. EC and Li–O DEC The RDF values were obtained. Integrating the three RDF values yielded the coordination number of lithium ions with other atoms, thus revealing the PF6 content in the first solvation shell of the lithium ion. - The average number of EC and DEC is obtained. That is, the solvation structure of the electrolyte is calculated by the molecular dynamics fragmentation simulation method based on equal-spaced splitting, which is in complete agreement with the results in Examples 1 and 2.
[0100] In the above example, the property analyzed is the solvation structure of the electrolyte. In other embodiments, other properties of the electrolyte can be analyzed. For example, for Example 4, the ion transport properties of the electrolyte can be analyzed, and the viscosity of the electrolyte can be calculated. In this example, for the 10 electrolyte or solvent models that successfully completed the calculation, the viscosity of the electrolyte was calculated using the last 10 ns of output data from the simulation results, according to the following formula:
[0101]
[0102] Where η is viscosity, T is temperature, V is volume, and k is temperature. B It is the Boltzmann constant, P xy The system pressure is given. Based on the above formula, the viscosity of the electrolyte can be determined, allowing for a comparison of the effects of solvent type and salt concentration on viscosity.
[0103] To continue with the example using electrolyte as the simulation object, let's describe another example, namely Example 5.
[0104] In Example 5, the ion transport properties of the electrolyte are calculated using conventional molecular dynamics simulations, a simulation method based on the equidistant partitioning of molecules disclosed herein, and a simulation method based on the non-equidistant partitioning of molecules disclosed herein. The NaTFSI / DOL / DME electrolyte is used as an example. First, an electrolyte model containing 100 NaTFSI, 600 DOL, and 600 DME molecules is constructed using Packmol software. Then, molecular dynamics simulations of the NaTFSI / DOL / DME electrolyte model are performed using GROMACS software. The simulation process includes the following stages:
[0105] In stage (1), NPT calculations were performed at a temperature of 300K, a pressure of 1 atmosphere, a time of 2ns, and a time step of 1fs.
[0106] In stage (2), the temperature was increased from 300K to 420K, the ensemble was NPT, the pressure was 1 atmosphere, the heating rate was 40K / ns, and finally the temperature was kept constant at 420K for 2ns, with a time step of 1fs.
[0107] In stage (3), annealing was performed from 420K to 300K, with an ensemble of NPT, a pressure of 1 atmosphere, a cooling rate of 40K / ns, and finally held at 300K for 2ns with a time step of 1fs.
[0108] In stage (4), NVT calculations were performed at a temperature of 300K for a time of 20ns with a time step of 1fs.
[0109] Three simulation methods were used to obtain three simulation results. The last 15 ns of data from each of the three simulation results were sampled, and the ion diffusion coefficient in the electrolyte was calculated using the mean square displacement method. The calculation formula is as follows:
[0110]
[0111] Where D is the diffusion coefficient, t is time, d is the diffusion dimension (3 for three-dimensional diffusion), and N is sodium or TFSI. - Number of ions, r i Let be the displacement of the i-th ion. Calculation results show that sodium and TFSI obtained by the three methods... - The ion diffusion coefficients are the same.
[0112] As can be seen from Examples 1–5, the embodiments of this disclosure divide the simulation task into multiple subtasks, sequentially call cloud resources to execute each subtask, and then concatenate the outputs of each subtask in sequence to obtain the simulation result of the simulation task. The concatenated result is completely consistent with the molecular dynamics simulation result of the entire run without splitting. However, compared with the traditional method of running the entire run, splitting the simulation task into subtasks not only allows for flexible use of cloud resources, but also ensures the accuracy of the properties of the simulated object, enabling high-throughput, high-efficiency, and highly transferable task simulation.
[0113] Example apparatus and devices
[0114] Figure 4 A schematic structural block diagram of an apparatus 400 for processing simulated tasks according to certain embodiments of the present disclosure is shown. The apparatus 400 may be implemented as a task controller 130 or at least partially included in a cloud computing system 110. The various modules / components in the apparatus 400 may be implemented by hardware, software, firmware, or any combination thereof.
[0115] As shown in the figure, the device 400 includes a first determining module 410 configured to determine that a simulation task related to a molecular dynamics process is aborted during the execution of such a simulation task using cloud resources. The device 400 also includes a second determining module 420 configured to determine, in response to the abort, whether the current subtask of the simulation task has been completed, wherein the simulation task is at least partially divided into multiple subtasks based on the physical characteristics of the molecular dynamics process, and these subtasks will be executed sequentially in time. The device 400 also includes a requesting module 430 configured to request the re-execution of the current subtask in response to determining that it has not been completed, so as to continue the simulation task.
[0116] In some embodiments, the apparatus 400 further includes: a storage module configured to store the output of the current subtask in response to determining that the current subtask has been completed; and a request module further configured to request execution of the next subtask immediately following the current subtask among a plurality of subtasks.
[0117] In some embodiments, the first determining module 410 is further configured to determine that the simulation task is terminated because cloud resources are at least partially reclaimed.
[0118] In some embodiments, physical properties include the physical duration of molecular dynamics processes.
[0119] In some embodiments, the apparatus 400 further includes: a segmentation module configured to segment the physical duration based on the availability of cloud resources to determine multiple duration segments; and a partitioning module configured to divide the simulation task into multiple subtasks based on the segmentation, such that each subtask corresponds to one of the multiple duration segments.
[0120] In some embodiments, the apparatus 400 further includes: a merging module configured to merge the outputs of multiple subtasks as a simulation result of a simulation task in response to determining that the current subtask is completed and that the current subtask is the last of a plurality of subtasks; and a third determining module configured to determine the properties of the simulated object of the molecular dynamics process based on at least a portion of the simulation result.
[0121] In some embodiments, simulation results indicate the trajectory of the positional changes of molecules included in the simulation during molecular dynamics.
[0122] In some embodiments, the initial state of the simulated object in the current subtask is determined based on the final state of the simulated object in the previous subtask, and the current subtask is immediately adjacent to the previous subtask.
[0123] Figure 5 A block diagram illustrating a computing device 500 capable of implementing one or more embodiments of the present disclosure is shown. It should be understood that... Figure 5The computing device 500 shown is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein. Figure 5 The computing device 500 shown can be used to implement Figure 1 The cloud computing system 110, such as the task controller 130.
[0124] like Figure 5 As shown, computing device 500 is in the form of a general-purpose computing device. Components of computing device 500 may include, but are not limited to, one or more processors or processing units 510, memory 520, storage devices 530, one or more communication units 540, one or more input devices 550, and one or more output devices 560. Processing unit 510 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 520. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of computing device 500.
[0125] Computing device 500 typically includes multiple computer storage media. Such media can be any accessible media that is accessible to computing device 500, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 520 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 530 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data (e.g., training data for training) and can be accessed within computing device 500.
[0126] The computing device 500 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 5 As shown, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks can be provided. In these cases, each drive can be connected to a bus (not shown) via one or more data media interfaces. Memory 520 may include computer program product 525 having one or more program modules configured to perform various methods or actions of various embodiments of this disclosure.
[0127] The communication unit 540 enables communication with other computing devices via a communication medium. Additionally, the functionality of the components of the computing device 500 can be implemented as a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the computing device 500 can operate in a networked environment using logical connections to one or more other servers, networked personal computers (PCs), or another network node.
[0128] Input device 550 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 560 can be one or more output devices, such as a monitor, speaker, printer, etc. Computing device 500 can also communicate as needed with one or more external devices (not shown) via communication unit 540. These external devices, such as storage devices, display devices, etc., can communicate with one or more devices that enable user interaction with computing device 500, or with any device that enables computing device 500 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interfaces (not shown).
[0129] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above.
[0130] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0131] 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 apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0132] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0133] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0134] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they 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 chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.
Claims
1. A method for processing simulated tasks, comprising: During the execution of a simulation task related to molecular dynamics processes using cloud resources, it was determined that the simulation task was aborted. In response to the abort, it is determined whether the current subtask of the simulation task has been completed, wherein the simulation task is divided into multiple subtasks at least in part according to the physical characteristics of the molecular dynamics process, and the multiple subtasks will be executed sequentially in time. as well as In response to the determination that the current subtask has not been completed, a request is made to re-execute the current subtask in order to continue the execution of the simulated task.
2. The method according to claim 1, further comprising: In response to determining that the current subtask has been completed, Store the output of the current subtask; as well as Request execution of the next subtask immediately following the current subtask among the plurality of subtasks.
3. The method of claim 1, wherein determining that the simulation task is aborted comprises: It was determined that the simulation task was terminated because the cloud resources were at least partially reclaimed.
4. The method according to claim 1, wherein the physical property includes the physical duration of the molecular dynamics process.
5. The method according to claim 4, further comprising: The physical duration is segmented based on the availability of the cloud resources to determine multiple duration segments; as well as The simulation task is divided into multiple subtasks based on the segmentation, such that each subtask corresponds to one of the multiple segment durations.
6. The method according to claim 1, further comprising: In response to determining that the current subtask is completed and that the current subtask is the last subtask among the plurality of subtasks, the outputs of the plurality of subtasks are merged as the simulation result of the simulation task; as well as Based on at least a portion of the simulation results, the properties of the simulated object of the molecular dynamics process are determined.
7. The method of claim 6, wherein the simulation results indicate the trajectory of positional changes of molecules included in the simulation object during the molecular dynamics process.
8. The method according to claim 1, wherein the initial state of the simulated object of the molecular dynamics process in the current subtask is determined based on the final state of the simulated object in the previous subtask, and the current subtask is adjacent to the previous subtask.
9. An apparatus for processing simulated tasks, comprising: The first determining module is configured to determine that the simulation task is aborted during the execution of a simulation task related to molecular dynamics processes using cloud resources; The second determining module is configured to determine, in response to the abort, whether the current subtask of the simulation task has been completed, wherein the simulation task is divided into multiple subtasks at least in part according to the physical characteristics of the molecular dynamics process, and the multiple subtasks will be executed sequentially in time. as well as The request module is configured to request the re-execution of the current subtask in order to continue the execution of the simulated task in response to determining that the current subtask has not been completed.
10. The apparatus according to claim 9, further comprising: The storage module is configured to store the output of the current subtask in response to determining that the current subtask has been completed; The request module is also configured to request the execution of the next subtask immediately following the current subtask among the plurality of subtasks.
11. The apparatus of claim 9, wherein the first determining module is further configured to determine that the simulation task is terminated because the cloud resources are at least partially reclaimed.
12. The apparatus of claim 9, wherein the physical property includes the physical duration of the molecular dynamics process.
13. The apparatus of claim 12, further comprising: The segmentation module is configured to segment the physical duration based on the availability of the cloud resources to determine multiple duration segments; as well as The segmentation module is configured to divide the simulation task into the plurality of subtasks based on the segments, such that each subtask corresponds to one of the plurality of segment durations.
14. The apparatus according to claim 9, further comprising: The merging module is configured to merge the outputs of the multiple subtasks as the simulation result of the simulation task in response to determining that the current subtask is completed and that the current subtask is the last subtask among the multiple subtasks; as well as The third determining module is configured to determine the properties of the simulated object of the molecular dynamics process based on at least a portion of the simulation results.
15. The apparatus of claim 14, wherein the simulation results indicate the trajectory of positional changes of molecules included in the simulation object during the molecular dynamics process.
16. The apparatus of claim 9, wherein the initial state of the simulated object of the molecular dynamics process in the current subtask is determined based on the final state of the simulated object in the previous subtask, the current subtask being adjacent to the previous subtask.
17. 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, which, when executed by the at least one processing unit, cause the electronic device to perform the method according to any one of claims 1 to 8.
18. A computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Data processing method, data processing device, terminal, and readable storage medium
CN108491263A
Molecular dynamics force field parameter fitting workflow control system and control method thereof
CN112447267A