Science China Mathematics

, Volume 57, Issue 7, pp 1331–1340 | Cite as

Efficient implementation of the Barnes-Hut octree algorithm for Monte Carlo simulations of charged systems

Articles Progress of Projects Supported by NSFC


Computer simulation with Monte Carlo is an important tool to investigate the function and equilibrium properties of many biological and soft matter materials solvable in solvents. The appropriate treatment of long-range electrostatic interaction is essential for these charged systems, but remains a challenging problem for large-scale simulations. We have developed an efficient Barnes-Hut treecode algorithm for electrostatic evaluation in Monte Carlo simulations of Coulomb many-body systems. The algorithm is based on a divideand-conquer strategy and fast update of the octree data structure in each trial move through a local adjustment procedure. We test the accuracy of the tree algorithm, and use it to perform computer simulations of electric double layer near a spherical interface. It has been shown that the computational cost of the Monte Carlo method with treecode acceleration scales as log N in each move. For a typical system with ten thousand particles, by using the new algorithm, the speed has been improved by two orders of magnitude from the direct summation.


electrostatics Monte Carlo fast algorithms octree colloidal interfaces 


41A58 82D15 68P05 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Allen M P, Tildesley D J. Computer Simulations of Liquids. Oxford: Oxford University Press, 1987Google Scholar
  2. 2.
    Appel A. An efficient program for many-body simulations. SIAM J Sci Stat Comput, 1985, 6: 85–103CrossRefMathSciNetGoogle Scholar
  3. 3.
    Barnes J, Hut P. A hierarchical O(NlogN) force-calculation algorithm. Nature, 1986, 324: 446–449CrossRefGoogle Scholar
  4. 4.
    Boroudjerdi H, Kim Y W, Naji A, et al. Statics and dynamics of strongly charged soft matter. Phys Rep, 2005, 416: 129–199CrossRefGoogle Scholar
  5. 5.
    Cheng H, Greengard L, Rokhlin V. A fast adaptive multipole algorithm in three dimensions. J Comput Phys, 1999, 155: 468–498CrossRefMATHMathSciNetGoogle Scholar
  6. 6.
    Darden T A, York D M, Pedersen L G. Particle mesh Ewald: An Nlog(N) method for Ewald sums in large systems. J Chem Phys, 1993, 98: 10089–10092CrossRefGoogle Scholar
  7. 7.
    Deserno M, Jiménez-ángeles F, Holm C, et al. Overcharging of dna in the presence of salt: Theory and simulation. J J Phys Chem B, 2001, 105: 10983–1099CrossRefGoogle Scholar
  8. 8.
    Duan Z H, Krasny R. An Ewald summation based multipole method. J Chem Phys, 2000, 113: 3492–3495CrossRefGoogle Scholar
  9. 9.
    Duan Z H, Krasny R. An adaptive treecode for computing nonbonded potential energy in classical molecular systems. J Comput Chem, 2001, 22: 184–195CrossRefGoogle Scholar
  10. 10.
    Ewald P P. Die berechnung optischer und elektrostatischer gitterpotentiale. Ann Phys, 1921, 369: 253–287CrossRefGoogle Scholar
  11. 11.
    French R H, Parsegian V A, Podgornik R, et al. Long range interactions in nanoscale science. Rev Mod Phys, 2010, 82: 1887–1944CrossRefGoogle Scholar
  12. 12.
    Frenkel D, Smit B. Understanding Molecular Simulation: From Algorithms to Applications. New York: Academic Press, 2002Google Scholar
  13. 13.
    Gan Z, Xu Z. Multiple-image treatment of induced charges in Monte Carlo simulations of electrolytes near a spherical dielectric interface. Phys Rev E, 2011, 84: 016705CrossRefGoogle Scholar
  14. 14.
    Geng W, Krasny R. A treecode-accelerated boundary integral Poisson-Boltzmann solver for electrostatics of solvated biomolecules. J Comput Phys, 2013, 247: 62–78CrossRefMathSciNetGoogle Scholar
  15. 15.
    Gibbon P, Speck R, Karmakar A, et al. Progress in mesh-free plasma simulation with parallel tree codes. Plasma Sci IEEE Trans, 2010, 38: 2367–2376CrossRefGoogle Scholar
  16. 16.
    Greengard L, Rokhlin V. A fast algorithm for particle simulations. J Comput Phys, 1987, 73: 325–348CrossRefMATHMathSciNetGoogle Scholar
  17. 17.
    Greengard L, Rokhlin V. A new version of the Fast Multipole Method for the Laplace equation in three dimensions. Acta Numer, 1997, 6: 229–269CrossRefMathSciNetGoogle Scholar
  18. 18.
    Grosberg A Y, Nguyen T T, Shklovskii B I. Colloquium: The physics of charge inversion in chemical and biological systems. Rev Mod Phys, 2002, 74: 329–345CrossRefGoogle Scholar
  19. 19.
    Hockney R W, Eastwood J W. Computer Simulation Using Particles. Boca Raton, FL: CRC Press, 1988CrossRefMATHGoogle Scholar
  20. 20.
    Kabadshow I, Dachsel H. The error-controlled fast multipole method for open and periodic boundary conditions. In: Fast Methods for Long-Range Interactions in Complex Systems, vol. 6. Jülich: Forschungszentrum Jülich, 2011, 85–114Google Scholar
  21. 21.
    Kondrat S, Georgi N, Fedorov M V, et al. A superionic state in nano-porous double-layer capacitors: insights from monte carlo simulations. Phys Chem Chem Phys, 2011, 13: 11359–11366CrossRefGoogle Scholar
  22. 22.
    Lashuk I, Chandramowlishwaran A, Langston H, et al. A massively parallel adaptive fast-multipole method on heterogeneous architectures. Commun ACM, 2012, 55: 101–109CrossRefGoogle Scholar
  23. 23.
    Lau A W C, Lukatsky D B, Pincus P, et al. Charge fluctuations and counterion condensation. Phys Rev E, 2002, 65: 051502CrossRefGoogle Scholar
  24. 24.
    Li P, Johnston H, Krasny R. A Cartesian treecode for screened Coulomb interactions. J Comput Phys, 2009, 228: 3858–3868CrossRefMATHMathSciNetGoogle Scholar
  25. 25.
    Lindsay K, Krasny R. A particle method and adaptive treecode for vortex sheet motion in 3-D flow. J Comput Phys, 2001, 172: 879–907CrossRefMATHMathSciNetGoogle Scholar
  26. 26.
    Linse P. Simulation of charged colloids in solution. Adv Polym Sci, 2005, 185: 111–162CrossRefGoogle Scholar
  27. 27.
    Linse P. Electrostatics in the presence of spherical dielectric discontinuities. J Chem Phys, 2008, 128: 214505CrossRefGoogle Scholar
  28. 28.
    Lyubartsev A P, Tang J X, Janmey P A, et al. Electrostatically induced polyelectrolyte association of rodlike virus particles. Phys Rev Lett, 1998, 81: 5465–5468CrossRefGoogle Scholar
  29. 29.
    Manzanares J, Murphy W, Mafe S, et al. Numerical simulation of the nonequilibrium diffuse double layer in ionexchange membranes. J Phys Chem, 1993, 97: 8524–8530CrossRefGoogle Scholar
  30. 30.
    Marzouk Y M, Ghoniem A F. K-means clustering for optimal partitioning and dynamic load balancing of parallel hierarchical n-body simulations. J Comp Phys, 2005, 207: 493–528CrossRefMATHMathSciNetGoogle Scholar
  31. 31.
    Metropolis N, Rosenbluth A W, Rosenbluth M N, et al. Equation of state calculations by fast computing machines. J Chem Phys, 1953, 21: 1087–1092CrossRefGoogle Scholar
  32. 32.
    Walker D A, Kowalczyk B, de la Cruz M O, et al. Electrostatics at the nanoscale. Nanoscale, 2011, 3: 1316–1344CrossRefGoogle Scholar
  33. 33.
    Winkel M, Speck R, Hübner H, et al. A massively parallel, multi-disciplinary Barnes-Hut tree code for extreme-scale N-body simulations. Comput Phys Comm, 2012, 183: 880–889CrossRefGoogle Scholar
  34. 34.
    Xu Z, Cai W. Fast analytical methods for macroscopic electrostatic models in biomolecular simulations. SIAM Rev, 2011, 53: 683–720CrossRefMATHMathSciNetGoogle Scholar
  35. 35.
    Xu Z, Cheng X, Yang H. Treecode-based generalized Born method. J Chem Phys, 2011, 134: 064107CrossRefGoogle Scholar
  36. 36.
    Xu Z, Liang Y, Xing X. Mellin transform and image charge method for dielectric sphere in an electrolyte. SIAM J Appl Math, 2013, 7: 1396–1415CrossRefMathSciNetGoogle Scholar
  37. 37.
    Ying L. A pedestrian introduction to fast multipole methods. Sci China Math, 2012, 55: 1043–1051CrossRefMATHMathSciNetGoogle Scholar
  38. 38.
    Ying L, Biros G, Zorin D. A kernel-independent adaptive fast multipole algorithm in two and three dimensions. J Comput Phys, 2004, 196: 591–626CrossRefMATHMathSciNetGoogle Scholar

Copyright information

© Science China Press and Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  1. 1.Department of Mathematics, Institute of Natural Sciences, and MoE Key Lab of Scientific and Engineering ComputingShanghai Jiao Tong UniversityShanghaiChina

Personalised recommendations