# Tag Info

Accepted

### Why is leapfrog integration symplectic and RK4 not, if the latter is more accurate?

TL;DR: It depends on what kind of accuracy you need. Energy conservation does not automatically equal accuracy. Suppose, you want to simulate the solar system, and you are using a solver that – to ...
• 1,819
Accepted

### Removing non-determinism from molecular dynamics code

Both the standard cluster and custom supercomputer (Anton) versions of molecular dynamics at D. E. Shaw Research are both deterministic and parallel invariant. That is, a test run on a single core ...
• 3,879

### Fortran code for Ewald summation

Notice that the summation in $U^{(r)}$ is incorrect. You want to sum over all the copies of the atoms in the lattice of periodic boxes, not just those whose indices satisfy $i > j$. In the ...
• 3,954
Accepted

### Generating random numbers for long molecular dynamics simulations

I suspect the reason why generating the random numbers on the fly is slower for you is due to the rather large state of the Mersenne Twister. Switching to something like the PCG or XorShift+ random ...
• 2,463

### What good are hard-sphere event-driven molecular dynamics simulations in the face of chaos?

Yes, it is possible to show that the statistical behavior of the approximate system will reach that of the "exact" system. (This is true even though hard-sphere dynamics do not accurately describe ...
• 3,483
Accepted

### The velocity Verlet method and variable time steps

The second formula is just the velocity verlet, and it's correct but if you adapt time steps then it's not symplectic. In a separate answer I describe in quite detail that symplecticness is a global ...
• 11.5k
Accepted

• 430
Accepted

### How to compute forces in multi-particle MD

I will only be developing the computation of forces on a given atom (part 1 of BalazsToth answer), for this point is actually a bit tricky and I think it deserves to be a bit more explained. You can ...
• 323

### What good are hard-sphere event-driven molecular dynamics simulations in the face of chaos?

Something that is at least very close to what your are asking for is the Shadowing Lemma, which roughly states that near any numerical solution of a dynamical system, you will find a real solution. I ...
• 1,819

### Calculation of Mean Square Displacement for Brownian dynamics system with Lennard Jones interactions in python3

This will not an answer to your problem, more an excessive comment and few things you might consider, when writing such code even for self educational purpose. Constants You asked whether your ...
• 1,285
Accepted

• 3,954

### periodic boundary conditions for triclinic box

I have never implemented periodicity for this symmetry class, although I have done it for hexagonal crystals before. Let us start with a (2D) box like the one depicted in the image In this case, we ...
• 7,902