CONTENTS 3.4 Constraint dynamics 92 3.5 Checks on accuracy 3.6 Molecular dynamics of hard systems 101 3.6.1 Hard spheres 102 3.6.2 Hard non-spherical bodies 108 4 MONTE CARLO METHODS 110 4.1 Introduction 110 4.2 Monte Carlo integration 111 4.2.1 Hit and miss 111 4.2.2 Sample mean integration 112 4.3 Importance sampling 114 4.4 The Metropolis method 118 4.5 Isothermal-isobaric Monte Carlo 123 4.6 Grand canonical Monte Carlo 126 4.7 Molecular liquids 131 4.7.1 Rigid molecules 131 4.7.2 Non-rigid molecules 135 5 SOME TRICKS OF THE TRADE 140 5.1 Introduction 140 5.2 The heart of the matter 140 5.2.1 Efficient calculation of forces,energies,and pressures 140 5.2.2 Avoiding the square root 143 5.2.3 Table look-up and spline-fit potentials 143 5.2.4 Shifted and shifted-force potentials 145 5.3 Neighbour lists 146 5.3.1 The Verlet neighbour list 147 5.3.2 Cell structures and linked lists 149 5.4 Multiple time step methods 152 5.5 How to handle long-range forces 155 5.5.1 Introduction 155 5.5.2 The Ewald sum 156 5.5.3 The reaction field method 162 5.5.4 Other methods 164 5.5.5 Summary 164 5.6 When the dust has settled 166 5.7 Starting up 168 5.7.1 The initial configuration 168 5.7.2 The initial velocities 170 5.7.3 Equilibration 171 5.8 Organization of the simulation 173 5.8.1 Input/output and file handling 174 5.8.2 Program structure 175 5.8.3 The scheme in action 180 6 HOW TO ANALYSE THE RESULTS 182 6.1 Introduction 182 6.2 Liquid structure 183
CONTENTS xi 6.3 Time correlation functions 185 6.3.1 The direct approach 185 6.3.2 The fast Fourier transform method 188 6.4 Estimating errors 191 6.4.I Errors in equilibrium averages 192 6.4.2 Errors in fluctuations 195 6.4.3 Errors in structural quantities 195 6.4.4 Errors in time correlation functions 196 6.5 Correcting the results 198 6.5.1 Correcting thermodynamic averages 199 6.5.2 Extending g(r)to large r 199 6.5.3 Extrapolating g(r)to contact 201 6.5.4 Smoothing g(r) 203 6.5.5 Calculating transport coefficients 204 6.5.6 Smoothing a spectrum 208 7 ADVANCED SIMULATION TECHNIQUES 212 7.1 Introduction 212 7.2 Free energy estimation 213 7.2.1 Introduction 213 7.2.2 Non-Boltzmann sampling 213 7.2.3 Acceptance ratio method 218 7.2.4 Summary 219 7.3 Smarter Monte Carlo 220 7.3.I Preferential sampling 220 7.3.2 Force-bias Monte Carlo 224 7.3.3 Smart Monte Carlo 225 7.3.4 Virial-bias Monte Carlo 226 7.4 Constant-temperature molecular dynamics 227 7.4.1 Stochastic methods 227 7.4.2 Extended system methods 228 7.4.3 Constraint methods 230 7.4.4 Other methods 23】 7.5 Constant-pressure molecular dynamics 232 7.5.1 Extended system methods 232 7.5.2 Constraint methods 234 7.5.3 Other methods 236 7.5.4 Changing box shape 236 7.6 Practical points 238 7.7 The Gibbs Monte Carlo method 239 8 NON-EQUILIBRIUM MOLECULAR DYNAMICS 240 8.1 Introduction 240 8.2 Shear flow 242 8.3 Expansion and contraction 249 8.4 Heat flow 250 8.5 DifTusion 251 8.6 Other perturbations 253 8.7 Practical points 253
xii CONTENTS 9 BROWNIAN DYNAMICS 257 9.1 Introduction 257 9.2 Projection operators 257 9.3 Brownian dynamics 259 9.4 Hydrodynamic and memory effects 264 10 QUANTUM SIMULATIONS 270 10.1 Introduction 270 10.2 Semiclassical path-integral simulations 272 10.3 Semiclassical Gaussian wavepackets 279 10.4 Quantum random walk simulations 282 11 SOME APPLICATIONS 286 11.1 Introduction 286 11.2 The liquid drop 286 11.3 Melting 292 11.4 Molten salts 298 11.5 Liquid crystals 300 11.6 Rotational dynamics 306 11.7 Long-time tails 310 11.8 Interfaces 312 APPENDIX A COMPUTERS AND COMPUTER SIMULATION 320 A.I Computer hardware 320 A.2 Programming languages 322 A.3 Efficient programming in FORTRAN-77 324 APPENDIX B REDUCED UNITS 327 B.1 Reduced units 327 APPENDIX C CALCULATION OF FORCES AND TORQUES 329 C.1 Introduction 329 C.2 The polymer chain 329 C.3 The molecular fluid with multipoles 332 C.4 The triple-dipole potential 334 APPENDIX D FOURIER TRANSFORMS 336 D.1 The Fourier transform 336 D.2 The discrete Fourier transform 337 D.3 Numerical Fourier transforms 338 APPENDIX E THE GEAR PREDICTOR-CORRECTOR 340 E.I The Gear predictor-corrector 340 APPENDIX F PROGRAM AVAILABILITY 343
CONTENTS xi近 APPENDIX G RANDOM NUMBERS 345 G.1 Random number generators 345 G.2 Random numbers uniform on(0,1) 345 G.3 Generating non-uniform distributions 347 G.4 Random vectors on the surface of a sphere 349 G.5 Choosing randomly and uniformly from complicated regions 349 G.6 Sampling from an arbitrary distribution 351 REFERENCES 352 INDEX 383
LIST OF SYMBOLS Latin Alphabet a atom index (1.3.3) ” molecular acceleration (3.2) A Helmholtz free energy (2.2) Q7 general dynamic variable (2.1) A rotation matrix 3.3.1) 4 set of dynamic variables (8.1) 6 atom index (1.3.3) b time derivative of acceleration (3.2) B second virial coefficient (1.4.3) 第 general dynamic variable (2.3) cw(t) normalized time correlation function (2.7) c(r) direct pair correlation function (6.5.2) Cda(t) un-normalized time correlation function (2.7) CP constant-pressure heat capacity (2.5 constant-volume heat capacity (2.5) spatial dimensionality (5.5) dab intramolecular bond length (5.5.2) atom position relative to molecular centre of mass (3.3) D diffusion coefficient (2.7) D可 pair diffusion matrix (9.4) 9hm' Wigner rotation matrix (2.6) molecular axis unit vector (1.3.3) E total internal energy (2.2) 8 electric field (5.5.3) force on molecule (2.4) f force on molecule i due to j (2.4) Fermi function (7.2.3) 等 applied field (8.1) g(r) pair distribution function. (2.6) g(ry DiR;) molecular pair distribution function (2.6) gab(rab) site-site distribution function (2.6) 9Im(r) spherical harmonic coefficients of pair distribution function (2.6) 91 angular correlation parameter (2.6) g constraint force 3.4) G Gibbs free energy (2.2) G(r,t) van Hove function 2.7) h=h/2π Planck's constant (2.2) h(r) total pair correlation function (6.5.2) H enthalpy (2.2) 3光 Hamiltonian (1.3.1) molecule index (1.3.1) 1 molecular moment of inertia (2.9) principal components of inertia tensor (2.9)