170 likes | 715 Views
Or The stupid bag of tricks. Truncating the potential and the minimum image convention. Truncation of the potential. Calculation of the non-bonded forces/energies is the most time-consuming part of a simulation Simple ways of reducing the expense Minimal image convention Non-bonded cutoffs
E N D
Or The stupid bag of tricks Truncating the potential and the minimum image convention Truncating the potential and the minimum image convention, MM 283-294. p. 1
Truncation of the potential • Calculation of the non-bonded forces/energies is the most time-consuming part of a simulation • Simple ways of reducing the expense • Minimal image convention • Non-bonded cutoffs • Caveat: all techniques we will discuss today are formally justified only for rapidly decaying (short-range) interactions Truncating the potential and the minimum image convention, MM 283-294. p. 2
Short- and long-range interactions For extended 3D systems: • 1/r interactions formally diverge; results depend on the boundary conditions • 1/r2 and 1/r3 interactions are conditionally convergent • 1/rn (n>3) interactions are absolutely convergent Lennard-Jones – r-6 Dipole-dipole – r-3 Point charge-point charge – r-1 Truncating the potential and the minimum image convention, MM 283-294. p. 3
D D D D Minimum image convention • Periodic boundary conditions • Each atom interacts with at most one image of every atom • Approximates isolated-molecule or cluster calculations • Inter-cell dipole-dipole interactions increase acetone’s dipole moment • Minimum image convention removes this interaction Truncating the potential and the minimum image convention, MM 283-294. p. 4
Cutoffs: Achieving the savings • Even with the cutoffs, we still need to decide whether a non-bonded interaction has to be included. • In a naïve implementation, this means that all N(N-1)/2 possible pair interactions have to be examined. • Still a win, if pair interaction are expensive to compute • Greater payoff is possible with more sophisticated techniques • Non-bonded neightbour list • Cell index method Truncating the potential and the minimum image convention, MM 283-294. p. 5
Atoms outside the cut-off, but still “close” Atom 1 4 6 2 8 5 9 10 3 5 6 7 Atoms within the cut-off Atom 2 … … Non-bonded neighbour list • Only atoms within the neighbour list need to be considered • Including “close” atoms avoids recalculation of the neigbour list on each iteraction • Displacement-based criteria for recalculation of the neighbour list Truncating the potential and the minimum image convention, MM 283-294. p. 6
Cell index method • Assign each atom to a “cell”, with cell size cutoff radius • When recomputing the neighbour list, only the 27 nearest cells (3D) need to be considered Truncating the potential and the minimum image convention, MM 283-294. p. 7
Scaling of the cut-off techniques N – number of particles R – cost of a distance calculation E – cost of an energy evaluation m – number of steps between neighbour list updates k – average number of particles per “cell” Truncating the potential and the minimum image convention, MM 283-294. p. 8
Cut-off artifacts, and patching them up • A fraction of the potential energy is excluded • Partial inclusion of (long-range) group interactions • Discontinuities in potential energy surfaces and gradients Truncating the potential and the minimum image convention, MM 283-294. p. 9
Energy corrections For monoatomic liquid, the total energy is (5.16): Replaced with rc in a cut-off calculation Assuming ideal gas radial distribution g(r), the correction is (5.29): Truncating the potential and the minimum image convention, MM 283-294. p. 10
TIP3P water, 8Å cutoff TIP3P water, no cutoff 1x(O-O) = +29 4x(O-H) = -59 4x(H-H) = +29 Partial inclusion of long-range group interactions • Group-based cutoffs – all contributions are included (or omitted) together • Groups should be neutral or almost so • Groups should be much smaller than the cut-off radius Truncating the potential and the minimum image convention, MM 283-294. p. 11
Discontinuities • Both energy and gradients are discontinuous • Total energy is not conserved • Problems with MD stability • Thermodynamic properties are not affected by the cut-off Energy, kcal/mol Gradient, kcal/mol/Å Truncating the potential and the minimum image convention, MM 283-294. p. 12
Discontinuities: Shifted potential Energy, kcal/mol • Energy is continuous • Gradients are discontinuous • Total energy is conserved • Problems with MD stability • Thermodynamic properties are changed by the cut-off Gradient, kcal/mol/Å Truncating the potential and the minimum image convention, MM 283-294. p. 13
Discontinuities: Switching (A) Energy, kcal/mol • Both energy and gradients are continuous • Total energy is conserved • Stable MD • Thermodynamic properties are changed Gradient, kcal/mol/Å Truncating the potential and the minimum image convention, MM 283-294. p. 14
Discontinuities: Switching (B) • Both energy and gradients are continuous • Total energy is conserved • Stable MD • Thermodynamic properties are not affected Energy, kcal/mol Gradient, kcal/mol/Å Truncating the potential and the minimum image convention, MM 283-294. p. 15
Summary • Cutoff are useful in MC and MD simulations • Simplify simulations of molecules and clusters, when the periodic boundary conditions must be used (minimum image convention) • Can make simulation less expensive • Cutoffs must be used with care, or nasty artifacts may arise Truncating the potential and the minimum image convention, MM 283-294. p. 16