This module continues MD-PBC (the box without edges); meet the periodic box there first. Every number is computed in your browser right now.
MD-CUT · Nearest image and cut-off

Where should an interaction stop? The nearest image and the cut-off distance

In a periodic box every molecule has infinitely many copies. Does a molecule interact with all of them? No: an MD program counts each neighbor only once, through its nearest image, and beyond a certain distance it does not compute the interaction at all. This distance is called the cut-off. Where should we cut, and what do we lose by cutting?

Discoveries: 0 / 3
Experimental bridge

The FRET ruler: how fast does a sixth power fade?

In a FRET (Förster resonance energy transfer) experiment two dyes are attached to two points of a molecule. The donor dye is excited with blue light. If the acceptor is close, the donor passes part of its energy to the acceptor without emitting light, and the acceptor glows red; if the acceptor is far, the donor emits its own green light. The distance between the two dyes is read from the ratio of red to green. This is why FRET is called a "molecular ruler".

Change the distance between the two dyes below. R₀ is the distance at which the transfer is 50 percent (the Förster distance); for common dye pairs it is a few nanometers.

Transfer efficiency E
Green light (donor)
Red light (acceptor)
Transfer rate, relative to R₀

The light shares are computed assuming that both dyes have the same emission efficiency.

Transfer efficiency E = 1 / (1 + (r/R₀)⁶)Transfer rate (R₀/r)⁶: falls as r⁻⁶ (1 at R₀)

Why a sixth power? The electron cloud of the excited donor behaves like a small, rapidly oscillating dipole. The electric field of a dipole falls with the cube of the distance, as 1/r³. The acceptor couples to this field, and the transfer rate is proportional to the square of the field: (1/r³)² = 1/r⁶. This is why the efficiency curve is so steep around R₀.

The link to the van der Waals attraction. The attraction between two uncharged atoms comes from the same coupling. A momentary dipole in the electron cloud of one atom induces a dipole in the neighboring atom, and the two attract each other (the London force). Again the field of a dipole (1/r³) and the response of the dipole it induces (1/r³): the attraction energy falls as 1/r⁶. The Lennard-Jones potential of MD writes this attraction with the term −4ε(σ/r)⁶; the repulsion at very short range comes from the term +4ε(σ/r)¹².

DistanceFRET transfer rateVan der Waals attraction

The two columns are identical because both fall as r⁻⁶. Doubling the distance lowers both the transfer rate and the attraction 64-fold; tripling it, 729-fold. Because the interaction fades this fast, neighbors more than a few molecular diameters away contribute little; this is where the idea of a cut-off comes from.

1 · Workshop

The nearest image: along which path is a distance measured?

There are two molecules in a periodic box: A (blue) and B (orange); the faded ones are their copies. The two attract each other (think of a van der Waals attraction or a hydrogen bond): the most comfortable distance is 1.9 σ, closer than that they repel, and beyond 3.9 σ they do not feel each other. This range is shorter than half the box (4 σ); you will see why this matters at bench 2. The motion is really computed; the arrow on A is the force acting on A at that moment. Speeds are in the model's own units (σ/τ, where τ is the model's time unit): in the workshop 1 second on screen is 1 τ, so the speed is the speed of the animation, not a physical one. The gray dashed line is the distance to B measured inside the box, the red line is the distance from A to the nearest copy of B.

  1. Launch: press anywhere on the box, pull back like a slingshot and let go; B flies in the direction of the arrow. Or press "Launch the pair".
  2. Watch: as one of the molecules leaves through one edge and enters through the opposite one, the gray line jumps while the red line and the energy strip stay calm.
  3. Compare: set the rule to "Inside the box (wrong)" and see what happens to the energy at a crossing.
Press on the box, pull back, let go: B flies along the arrow.
What should the pointer do?
Which distance should the force use?
A-B inside the box
Nearest copy of B to A
Half the box edge (L/2)
Change of total energy
Boundary crossings (A and B)
0
A-B inside the boxDistance to the nearest copyChange of total energy
The two molecules move on, holding on to each otherFor your own trial, press on the box, pull back and let go, or press "Launch the pair".
2 · Bench

The cut-off circle: who is counted, who is not?

Now the box holds a liquid of 64 molecules (two-dimensional Lennard-Jones, periodic box); the motion is computed live. The yellow molecule is the selected one, and the circle around it is the cut-off distance rc. The program computes the interactions of the selected molecule only with the neighbors inside the circle: those are dark blue, the others faded. The lines from the selected molecule are the pairs that are counted; the darker the line, the stronger the attraction. Tap another molecule to change the selection.

  1. Watch: when a neighbor enters the circle a green ring lights up, when it leaves a red one. If it is hard to follow, press "Slow motion".
  2. Look at the energy: the two lines in the lower graph are computed from the same motion. Orange (plain cut-off) makes a step at every entry and exit; blue (shifted) stays calm.
  3. Change the cut-off: lower rc to 1.5 σ so that the steps grow; then raise it above half the box edge (L/2) and look at the copies with red rings.
Tap a molecule to select it.
Energy at the cut-off
Neighbors in the circle
Entering / leaving the circle
0 / 0
Jump at one crossing (plain cut-off)
Pairs within the cut-off, whole box
Neighbors with two copies in the circle
Half the box edge (L/2)
Plain cut-offShiftedThe molecules follow the same path in both methods; only the way the energy is counted differs.
The liquid is movingWait for a neighbor to enter or leave the circle; what happens will be written here.
Open

What jumps at the boundary, what stays continuous?

In the workshop, launch the molecules and watch them cross the box boundary at least twice.

Launch B or press "Launch the pair"; two boundary crossings under the nearest-image rule are enough.
Open

Plain cut-off or shifted?

In the notebook below, measure both methods at different cut-off distances.

Measure at least two cut-off distances in both methods; in one of them the cut-off should be 2.5 σ or shorter.
Open

What if the cut-off is larger than the box?

Make the cut-off larger than half the box edge and look at the circle.

Raise rc above L/2.
3 · Discovery notebook

The cut-off distance: accuracy and cost

In each measurement a liquid of 100 molecules is first equilibrated at constant temperature, then run for 3000 steps without outside influence (energy should be conserved). Two things are recorded: the fluctuation of the total energy relative to the start (it should be small) and the number of pairs computed per molecule at each step (the cost of the calculation).

Method
Cut-off distance (σ)

No measurement.

Plain cut-offShiftedPairs per molecule (right axis)
Methodrc (σ)Energy fluctuation (ε/molecule)Pairs per molecule
4 · Back to the protein

Next to the protein: the cut-off circle and the neighbor list at real scale

The circle from the bench is now in a real run. In the middle is an atom on the surface of ubiquitin (yellow); on the left the protein (green), on the right water molecules (blue). The scale is real: the bar at the lower right is 1 nm, and a water molecule is about 0.3 nm across. The red dashed circle is this project's cut-off distance (1.0 nm): the yellow atom interacts only with what is inside it. The water molecules jiggle with their real speeds at 300 K; each frame is one 2 fs MD step.

  1. Why is there a second circle? The program does not measure every distance at every step. It writes everything inside a list circle (yellow dashed), slightly larger than the cut-off, into a list and looks only at those. The list is renewed every 50 steps; the yellow ring flashes at that moment. The yellow band between the two circles is the buffer.
  2. Watch: water molecules with a yellow ring are on the list but still outside the cut-off. If a water molecule enters the cut-off circle from outside before the list is renewed, it is not counted because it is not on the list: a red ring lights up.
  3. Try: press "No buffer" and "Sparse list"; look at the missed interactions and at the path measured between two renewals. The "Fast" button makes time run ten times faster.
Atoms within the cut-off (3D estimate)
Atoms on the list (3D estimate)
Path of water in one interval (mean / max)
Missed interactions (not on the list)
0
Elapsed time
Selected protein atomWater within the cut-offOn the list, outside the cut-off (buffer)Missed interaction
The list is renewed every 50 stepsAfter the first renewal, the path taken by the water molecules will be written here.

The atom counts are estimates for three dimensions (about 100 atoms/nm³ in water); the canvas shows a two-dimensional slice. The water motion is computed with the Langevin method, matched to the measured diffusion coefficient of water (0.0023 nm²/ps); the protein atoms are held fixed. In a real run both atoms move; GROMACS chooses the buffer from the path two atoms can travel relative to each other and from the allowed energy error (verlet-buffer-tolerance = 0.005 kJ/mol/ps/atom). Because only the water moves here, a neighbor slipping into the cut-off is in reality somewhat more likely than shown. The van der Waals attraction beyond the cut-off is not thrown away: GROMACS adds its average contribution separately (DispCorr); the long-range part of electrostatics is the topic of the MD-ELEC module.

Setting (mdout.mdp and log)ValueMeaning
rvdw, rcoulomb1.0 nmcut-off distance
vdw-modifierPotential-shift-Verletshifted potential at the cut-off
DispCorrEnerPresthe average contribution of the attraction beyond the cut-off is added to energy and pressure
coulombtypePMElong-range part of electrostatics on a grid (MD-ELEC)
nstlist, rlist10 → 50; 1.0 → 1.106 nmneighbor list; mdrun extended the list so that it is renewed every 50 steps

The 1.106 nm in the table. The run file said nstlist 10 and rlist 1.0 nm. To run faster, mdrun decided to renew the list every 50 steps and widened the buffer to 0.106 nm according to the allowed energy error (log of the unrestrained trial run; in the narrower S3 box the same calculation gave 1.104 nm). The "This project's setting" button above uses these values.

The box limit. If the cut-off exceeds half the shortest box vector, two copies of the same neighbor fall inside the circle, but the program can count only one. This is why GROMACS refuses to run with such a box (the manual's rule: the cut-off may not exceed half the shortest box vector). In the square box of the bench this is half the edge. This project's 1UBQ box is a dodecahedron: all three box vectors are 6.49 nm long, half of that is 3.25 nm, more than three times the cut-off. For triclinic boxes GROMACS also checks the perpendicular components of the box vectors (ax, by, cz; the smallest is 4.59 nm in this box); this extra limit is looser here, and the binding one is still 3.25 nm.

5 · Test yourself

Six questions

Model: two-dimensional Lennard-Jones liquid, reduced units (σ, ε, m), periodic box, nearest-image rule, velocity Verlet, Δt = 0.005; 64 molecules at the bench, 100 molecules in the notebook, ρ = 0.82, equilibration at T = 0.70 ε (Langevin), no heat bath during the measurement. The forces are the same in both cut-off methods; the difference is whether the total energy jumps at the cut-off. Your notebook is kept only in this browser.

Next module: MD-ELEC · Salt and Ewald. Why is a cut-off not enough for charges, and what does PME do?

Terms in this module

The definition of each term and the other modules where it appears are in the glossary.