Efficiency of Parallel Computing in Molecular Dynamics Simulations

Categories: Physics

Abstract

Molecular-dynamics simulation was well-progressed numerical methods which shows the use of a suitable algorithm to solve a classical equations of motion for atoms relating with a known inter atomic potentials. MD simulation techniques are also well suited for studying surface phenomena, as they give a qualitative explanation of surface structure and dynamics. We are going to parallelize the serial simulation of Molecular Dynamics which will help us to save time.

Introduction

Molecular Dynamics has been used for many decades now to understand the temperature and pressure dependencies of dynamical concept in liquids, solids, and liquid-solid interfaces.

MD simulation techniques are also well matched for understanding surface phenomena, as they give a qualitative understanding of surface structure and dynamics. This Project uses MD methods to better comprehend surface disorder and pre melting.

Generally, it examines the temperature dependence of structure and vibration dynamics at surfaces of face-centered cubic (FCC) metals-mostly Ag, Cu, and Ni. It also makes exchange with results from other theoretical and experimental approaches.

Get quality help now
RhizMan
RhizMan
checked Verified writer

Proficient in: Physics

star star star star 4.9 (247)

“ Rhizman is absolutely amazing at what he does . I highly recommend him if you need an assignment done ”

avatar avatar avatar
+84 relevant experts are online
Hire writer

While the importance in this Project is on metal surfaces, the MD technique has been applied to a wide variety of surfaces with those of semiconductors, insulators, alloys, glasses, and simple or binary liquids. A full review of the pros and cons of the technique as verified to these very exciting systems is ahead the range of this Project.

However, it is important pointing out that success of classical MD simulations depends on accuracy with which the forces acting on the ion cores can be determined.

Get to Know The Price Estimate For Your Paper
Topic
Number of pages
Email Invalid email

By clicking “Check Writers’ Offers”, you agree to our terms of service and privacy policy. We’ll occasionally send you promo and account related email

"You must agree to out terms of services and privacy policy"
Write my paper

You won’t be charged yet!

On semiconductor and insulator surfaces, the success of molecular dynamics simulations has made them more appropriate for such designs rather than standard MD simulations.

We can apply MD Simulation on thousands of atoms with computer and we can find out the structure of an atom built on its contact with other atom. This paper tells us about GROMACS one of the applications of MD particularly designed for proteins the effect of this research lead us to a fact that each protein has different long time. From Grimaces we can understand folding and unfolding

Proposed Work

This process works with K.E and P.E related to an atomic particle that help us with foreseeing motions of atomic units. Both kinetic, potential energy must be equal to the all over energy. our code also prints error in the T.E which will tell us about what percentage of error we can get in our calculations. Given, problem analysis chart (PAC) of the simulated code for better accepting of the MD Simulation.

The main result which we are expecting in this project is decrease in the amount time taken by the process calculating P.E and K.E of atomic units which also is a reason for parallelizing compute along with update functions which requires all the calculation. An another Outcome expected in this simulation would be the reduction of error in theoretical and practically observed energies. Lesser the error, more the accuracy but we also know we cannot have the error free output but we are doing our best to make it very small by do not taking approximate of most of the values in calculation

Our application code will have the following functions:

  • Compute: - COMPUTE computes the forces and energies of atoms.
  • Initialize: - INITIALIZE initializes the positions, velocities, and accelerations.
  • Timestamp: - TIMESTAMP prints the current YMDHMS date as a time stamp.
  • Update: - UPDATE updates positions, velocities and accelerations.
  • Displacement: - DISPLACEMENT computes the displacement between two particles.
  • CPU Time: - CPU_TIME reports the elapsed CPU time.

Compute and update function are the most time overriding functions as they are only about computation and solving mathematical equations so we are going to parallelyze both of them. Some parallel function which we are about to use in our code are pragma omp parallel, pragma omp reduction, pragma omp for, pragma omp shared, pragma omp private. The major extensive thing in our project will be the time difference in the serial code and parallel code because the main goal of our project is to decrease the time taken in molecular dynamics simulation.

In mathematics, numerical analysis, and numerical partial differential equations, domain decay methods solve a edge value problem by splitting it into smaller boundary value problems on sub domains and repeating to coordinate the solution between adjacent sub domains. A coarse problem with one or few unknowns per sub domain is used to further organize the solution between the sub domains globally. The problems on the sub domains are independent, which makes domain decay methods suitable for parallel calculating.

Calculation Involved

The Basic algorithm is we divide time into discrete time steps, no more than a few femtoseconds (10–15 s) each , at every time step we calculate the performing on every atom, using one molecular mechanics force field and when drive in atom occurs we update position and velocity of each atom using Newton’s laws of motion.

Newton’s second law: F = ma – where F is force on an atom, where m is associated with mass of atom, and a is the respective acceleration Recall that: – where x represents coordinates of all atoms, and U is the potential energy function ,Velocity is the outcome of position, acceleration is the outcome of velocity. We can thus write the equations of motion as: F(x) = −∇U(x)

dx/ dt = v and dv /dt = F(x) /m

This is a system of ordinary differential equations – For n atoms, we have 3n position coordinates and 3n velocity coordinates. “Analytical” (algebraic) solution is difficult but Numerical solution is straightforward.

xi + 1 = xi + δt vi

vi + 1 = vi + δt F(xi ) /m

Above is the numerical open solution where δ t is the time step.

In practice, people use “time symmetric” integration methods such as “Leapfrog Verlet” xi + 1 = xi + δt v(i+1)/2

v (i + 1)/2 = v(i-1)/2 + δt F(xi ) /m This gives more correctness.

Verlet’s Algorithm

Update velocity, position, acceleration by using Verlet algorithm x(t+dt) = x(t) + v(t) * dt + 0.5 * a(t) * dt * dt

v(t+dt) = v(t) + 0.5 * ( a(t) + a(t+dt) ) * dt

a(t+dt) = f(t) / m

Flow Chart of our Implementation is as follows.Ask for the INPUT First from the User Spatial Dimension No. of particles in Simulation No. of Time Steps Size of Each time step. Then at every time step, compute force and energies by solving following equations.

The potential function V(X) is a harmonic well which smoothly saturates to a maximum value at PI/2: v(x) = ( sin ( min ( x, PI/2 ) ) )**2

The derivative of the potential is:

dv(x) = 2.0 * sin ( min ( x, PI/2 ) ) * cos ( min ( x, PI/2 ) ) = sin ( 2.0 * min ( x, PI/2 ) )

  • Initializes the positions, velocities, and accelerations
  • Compute Time taken for the complete serial simulation
  • Compare the difference between serial and parallel execution time
  • Parallelize the Serial functions UPDATE & COMPUTE
  • Compute Time taken for the parallel simulation

Results

The performance improvement of the parallelized MD simulation was measured in terms of the reduction in computational time and error minimization in energy calculations. The following table summarizes the computational times for different numbers of particles using OpenMP, SIMD, and serial execution:

Table: Computational Time and Speedup for MD Simulation

No of Particles OpenMP (sec) OpenMP + SIMD (sec) Serial (sec) Speedup (OpenMP) Speedup (OpenMP + SIMD)
400 285 196 415.5 1.46 2.12
500 315 272 496.3 1.58 1.82
600 579 409 743 1.28 1.82
700 698 549 832 1.19 1.52
800 965 755 1203 1.25 1.59

Conclusion

This paper is presented with a new approach to speed up simulations with low cost product graphical hard wares. In order to derive an effective mapping onto this type of computer architecture we have used the new Compute Unified Device Architecture programming interface to implement new parallelized algorithm.

Our experimental results show that the algorithm-based methods allows speedup upto fifteen seconds when compared with corresponding sequential implementational process. The speed up can also be enhanced when we increase the amount of atoms and time steps.Energy or force equation is the longest part of almost Simulations. If we take one model system with pair wise additive interaction, we have considered the contribution to the forces on the particle I by all it neighbors. If the interaction is not shortened then, in a system containing N substances , it must evaluate N(N-1)/2 pairs of interactions.

Even if the potential is shortened, it should still be computed with all N(N-1)/2 pairs of distance in order to define which pairs can interact. This implies that, if we use no tricks, the time needed for assessment of the energy scales as N2. There exist techniques that are more efficient to speed up assessment for both short-term as well as long-term contact in such a way that the computing time scales as N3/2, rather than N2. The technique which we have used is combination of Verlet and cell lists.

The first question that rises is when to use which method. This depends mostly on the details of the system. In any event, we always start with a arrangement as simple as possible, hence no trick at all. Although this *ago. scales as N2, this is straightforward to implement the probability of programming errors id relatively small. In addition we should consider how often the program will be used.

Updated: Feb 22, 2024
Cite this page

Efficiency of Parallel Computing in Molecular Dynamics Simulations. (2024, Feb 22). Retrieved from https://studymoose.com/document/efficiency-of-parallel-computing-in-molecular-dynamics-simulations

Live chat  with support 24/7

👋 Hi! I’m your smart assistant Amy!

Don’t know where to start? Type your requirements and I’ll connect you to an academic expert within 3 minutes.

get help with your assignment