From 26ad6640796aecd54b7a27cdd01207c4abd0cd09 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Fri, 25 Sep 2020 13:44:28 -0400 Subject: [PATCH 01/42] Avoid string duplication and remove memory leak --- src/input.cpp | 5 ++--- unittest/commands/test_simple_commands.cpp | 26 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/input.cpp b/src/input.cpp index 78086906c5..420f840a14 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -1234,12 +1234,11 @@ void Input::shell() } else if (strcmp(arg[0],"putenv") == 0) { if (narg < 2) error->all(FLERR,"Illegal shell putenv command"); for (int i = 1; i < narg; i++) { - char *ptr = strdup(arg[i]); rv = 0; #ifdef _WIN32 - if (ptr != nullptr) rv = _putenv(ptr); + if (arg[i]) rv = _putenv(arg[i]); #else - if (ptr != nullptr) rv = putenv(ptr); + if (arg[i]) rv = putenv(arg[i]); #endif rv = (rv < 0) ? errno : 0; MPI_Reduce(&rv,&err,1,MPI_INT,MPI_MAX,0,world); diff --git a/unittest/commands/test_simple_commands.cpp b/unittest/commands/test_simple_commands.cpp index 0c6043ea84..f13ae62a73 100644 --- a/unittest/commands/test_simple_commands.cpp +++ b/unittest/commands/test_simple_commands.cpp @@ -312,6 +312,32 @@ TEST_F(SimpleCommandsTest, Units) TEST_FAILURE(".*ERROR: Illegal units command.*", lmp->input->one("units unknown");); } + +TEST_F(SimpleCommandsTest, Shell) +{ + if (!verbose) ::testing::internal::CaptureStdout(); + lmp->input->one("shell putenv TEST_VARIABLE=simpletest"); + if (!verbose) ::testing::internal::GetCapturedStdout(); + + char * test_var = getenv("TEST_VARIABLE"); + ASSERT_NE(test_var, nullptr); + ASSERT_THAT(test_var, StrEq("simpletest")); + + if (!verbose) ::testing::internal::CaptureStdout(); + lmp->input->one("shell putenv TEST_VARIABLE=simpletest"); + lmp->input->one("shell putenv TEST_VARIABLE2=simpletest2 OTHER_VARIABLE=2"); + if (!verbose) ::testing::internal::GetCapturedStdout(); + + char * test_var2 = getenv("TEST_VARIABLE2"); + char * other_var = getenv("OTHER_VARIABLE"); + + ASSERT_NE(test_var2, nullptr); + ASSERT_THAT(test_var2, StrEq("simpletest2")); + + ASSERT_NE(other_var, nullptr); + ASSERT_THAT(other_var, StrEq("2")); +} + } // namespace LAMMPS_NS int main(int argc, char **argv) From 2e67aa6b478a0a9e2fc52642e006fdb047827a7a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 16:16:06 -0400 Subject: [PATCH 02/42] autodetect OpenMP 4.0 semantic compatibility if not explicitly set --- src/omp_compat.h | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/src/omp_compat.h b/src/omp_compat.h index d80d6f6f7f..340bbca204 100644 --- a/src/omp_compat.h +++ b/src/omp_compat.h @@ -25,11 +25,30 @@ // so this is what LAMMPS primarily uses. For those compilers // that strictly implement OpenMP 4.0 (such as GCC 9.0 and later // or Clang 10.0 and later), we give up default(none). -#if LAMMPS_OMP_COMPAT == 4 -# define LMP_SHARED(...) -# define LMP_DEFAULT_NONE default(shared) -#else -# define LMP_SHARED(...) shared(__VA_ARGS__) -# define LMP_DEFAULT_NONE default(none) + +// autodetect OpenMP compatibility if not explicitly set + +#ifndef LAMMPS_OMP_COMPAT +# if defined(__INTEL_COMPILER) +# if __INTEL_COMPILER > 18 +# define LAMMPS_OMP_COMPAT 4 +# endif +# elif defined(__clang__) +# if __clang_major__ >= 10 +# define LAMMPS_OMP_COMPAT 4 +# endif +# elif defined(__GNUC__) +# if __GNUC__ >= 0 +# define LAMMPS_OMP_COMPAT 4 +# endif +# endif +#endif + +#if LAMMPS_OMP_COMPAT == 4 +# define LMP_SHARED(...) +# define LMP_DEFAULT_NONE default(shared) +#else +# define LMP_SHARED(...) shared(__VA_ARGS__) +# define LMP_DEFAULT_NONE default(none) #endif From 5489c64aeffafdf001111597b171c32b87d6ca58 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 16:32:54 -0400 Subject: [PATCH 03/42] remove trailing whitespace --- doc/src/Bibliography.rst | 464 +++++++++++++++++++-------------------- 1 file changed, 232 insertions(+), 232 deletions(-) diff --git a/doc/src/Bibliography.rst b/doc/src/Bibliography.rst index 39e93b4e90..7789ae6e7b 100644 --- a/doc/src/Bibliography.rst +++ b/doc/src/Bibliography.rst @@ -212,58 +212,58 @@ Bibliography C.\ Cercignani and M. Lampis. Trans. Theory Stat. Phys. 1, 2, 101 (1971). **(Cerda)** - Cerda, Ballenegger, Lenz, Holm, J Chem Phys 129, 234104 (2008) + Cerda, Ballenegger, Lenz, Holm, J Chem Phys 129, 234104 (2008) **(Ceriotti)** - Ceriotti, Bussi and Parrinello, J Chem Theory Comput 6, 1170-80 (2010) + Ceriotti, Bussi and Parrinello, J Chem Theory Comput 6, 1170-80 (2010) **(Ceriotti2)** Ceriotti, Bussi and Parrinello, Phys Rev Lett 103, 030603 (2009) **(Cerutti)** - Cerutti, Duke, Darden, Lybrand, Journal of Chemical Theory and Computation 5, 2322 (2009) + Cerutti, Duke, Darden, Lybrand, Journal of Chemical Theory and Computation 5, 2322 (2009) **(Chen)** - J Chen, D Tzou and J Beraun, Int. J. Heat Mass Transfer, 49, 307-316 (2006). + J Chen, D Tzou and J Beraun, Int. J. Heat Mass Transfer, 49, 307-316 (2006). **(Chenoweth_2008)** - Chenoweth, van Duin and Goddard, Journal of Physical Chemistry A, 112, 1040-1053 (2008). + Chenoweth, van Duin and Goddard, Journal of Physical Chemistry A, 112, 1040-1053 (2008). **(Clarke)** Clarke and Smith, J Chem Phys, 84, 2290 (1986). **(Coleman)** - Coleman, Spearot, Capolungo, MSMSE, 21, 055020 (2013). + Coleman, Spearot, Capolungo, MSMSE, 21, 055020 (2013). **(Colliex)** - Colliex et al. International Tables for Crystallography Volume C: Mathematical and Chemical Tables, 249-429 (2004). + Colliex et al. International Tables for Crystallography Volume C: Mathematical and Chemical Tables, 249-429 (2004). **(Cooke)** - "Cooke, Kremer and Deserno, Phys. Rev. E, 72, 011506 (2005)" + "Cooke, Kremer and Deserno, Phys. Rev. E, 72, 011506 (2005)" **(Cornell)** - Cornell, Cieplak, Bayly, Gould, Merz, Ferguson, Spellmeyer, Fox, Caldwell, Kollman, JACS 117, 5179-5197 (1995). + Cornell, Cieplak, Bayly, Gould, Merz, Ferguson, Spellmeyer, Fox, Caldwell, Kollman, JACS 117, 5179-5197 (1995). **(Cusentino)** Cusentino, Wood, and Thompson, J Phys Chem A, xxx, xxxxx, (2020) **(Daivis and Todd)** - Daivis and Todd, J Chem Phys, 124, 194103 (2006). + Daivis and Todd, J Chem Phys, 124, 194103 (2006). **(Daivis and Todd)** - Daivis and Todd, Nonequilibrium Molecular Dynamics (book), Cambridge University Press, https://doi.org/10.1017/9781139017848, (2017). + Daivis and Todd, Nonequilibrium Molecular Dynamics (book), Cambridge University Press, https://doi.org/10.1017/9781139017848, (2017). **(Dammak)** - Dammak, Chalopin, Laroche, Hayoun, and Greffet, Phys Rev Lett, 103, 190601 (2009). + Dammak, Chalopin, Laroche, Hayoun, and Greffet, Phys Rev Lett, 103, 190601 (2009). **(Darden)** - Darden, York, Pedersen, J Chem Phys, 98, 10089 (1993). + Darden, York, Pedersen, J Chem Phys, 98, 10089 (1993). **(Davidchack)** - R.L Davidchack, T.E. Ouldridge, and M.V. Tretyakov. J. Chem. Phys. 142, 144114 (2015). + R.L Davidchack, T.E. Ouldridge, and M.V. Tretyakov. J. Chem. Phys. 142, 144114 (2015). **(Daw1)** - Daw, Baskes, Phys Rev Lett, 50, 1285 (1983). Daw, Baskes, Phys Rev B, 29, 6443 (1984). + Daw, Baskes, Phys Rev Lett, 50, 1285 (1983). Daw, Baskes, Phys Rev B, 29, 6443 (1984). **(Daw2)** M.\ S. Daw, and M. I. Baskes, Phys. Rev. B, 29, 6443 (1984). @@ -272,28 +272,28 @@ Bibliography Shinoda, DeVane, Klein, Soft Matter, 4, 2453-2462 (2008). **(Deserno)** - Deserno and Holm, J Chem Phys, 109, 7694 (1998). + Deserno and Holm, J Chem Phys, 109, 7694 (1998). **(Destree)** M.\ Destree, F. Laupretre, A. Lyulin, and J.-P. Ryckaert, J Chem Phys, 112, 9632 (2000). **(Dobson)** - Dobson, J Chem Phys, 141, 184103 (2014). + Dobson, J Chem Phys, 141, 184103 (2014). **(Duffy)** - D M Duffy and A M Rutherford, J. Phys.: Condens. Matter, 19, 016207-016218 (2007). + D M Duffy and A M Rutherford, J. Phys.: Condens. Matter, 19, 016207-016218 (2007). **(Dullweber)** Dullweber, Leimkuhler and McLachlan, J Chem Phys, 107, 5840 (1997). **(Dunn1)** - Dunn and Noid, J Chem Phys, 143, 243148 (2015). + Dunn and Noid, J Chem Phys, 143, 243148 (2015). **(Dunn2)** Dunn, Lebold, DeLyser, Rudzinski, and Noid, J. Phys. Chem. B, 122, 3363 (2018). **(Dunweg)** - Dunweg and Paul, Int J of Modern Physics C, 2, 817-27 (1991). + Dunweg and Paul, Int J of Modern Physics C, 2, 817-27 (1991). **(EDIP)** J F Justo et al, Phys Rev B 58, 2539 (1998). @@ -308,37 +308,37 @@ Bibliography M.\ Elstner, D. Poresag, G. Jungnickel, J. Elsner, M. Haugk, T. Frauenheim, S. Suhai, and G. Seifert, Phys. Rev. B, 58, 7260 (1998). **(Erdmann)** - U.\ Erdmann , W. Ebeling, L. Schimansky-Geier, and F. Schweitzer, Eur. Phys. J. B 15, 105-113, 2000. + U.\ Erdmann , W. Ebeling, L. Schimansky-Geier, and F. Schweitzer, Eur. Phys. J. B 15, 105-113, 2000. **(Espanol and Revenga)** Espanol, Revenga, Physical Review E, 67, 026705 (2003). **(Espanol1997)** - Espanol, Europhys Lett, 40(6): 631-636 (1997). DOI: 10.1209/epl/i1997-00515-8 + Espanol, Europhys Lett, 40(6): 631-636 (1997). DOI: 10.1209/epl/i1997-00515-8 **(Evans and Morriss)** - Evans and Morriss, Phys Rev A, 30, 1528 (1984). + Evans and Morriss, Phys Rev A, 30, 1528 (1984). **(Evans)** - Evans and Morriss, Phys. Rev. Lett. 56, 2172 (1986). + Evans and Morriss, Phys. Rev. Lett. 56, 2172 (1986). **(Everaers)** - Everaers and Ejtehadi, Phys Rev E, 67, 041710 (2003). + Everaers and Ejtehadi, Phys Rev E, 67, 041710 (2003). **(Faken)** - Faken, Jonsson, Comput Mater Sci, 2, 279 (1994). + Faken, Jonsson, Comput Mater Sci, 2, 279 (1994). **(Fath)** Fath, Hochbruck, Singh, J Comp Phys, 333, 180-198 (2017). **(Fennell)** - C.\ J. Fennell, J. D. Gezelter, J Chem Phys, 124, 234104 (2006). + C.\ J. Fennell, J. D. Gezelter, J Chem Phys, 124, 234104 (2006). **(Feynman)** - R.\ Feynman and A. Hibbs, Chapter 7, Quantum Mechanics and Path Integrals, McGraw-Hill, New York (1965). + R.\ Feynman and A. Hibbs, Chapter 7, Quantum Mechanics and Path Integrals, McGraw-Hill, New York (1965). **(Fichthorn)** - Fichthorn, Balankura, Qi, CrystEngComm, 18(29), 5410-5417 (2016). + Fichthorn, Balankura, Qi, CrystEngComm, 18(29), 5410-5417 (2016). **(Fily)** Y.\ Fily and M.C. Marchetti, Phys. Rev. Lett. 108, 235702, 2012. Default @@ -347,10 +347,10 @@ Bibliography Fincham, Mackrodt and Mitchell, J Phys Condensed Matter, 6, 393-404 (1994). **(Finnis1)** - Finnis, Sinclair, Philosophical Magazine A, 50, 45 (1984). + Finnis, Sinclair, Philosophical Magazine A, 50, 45 (1984). **(Finnis2)** - M.\ W. Finnis, A. T. Paxton, M. Methfessel, and M. van Schilfgarde, Phys. Rev. Lett., 81, 5149 (1998). + M.\ W. Finnis, A. T. Paxton, M. Methfessel, and M. van Schilfgarde, Phys. Rev. Lett., 81, 5149 (1998). **(Fiorin)** Fiorin, Klein, Henin, Mol. Phys., DOI:10.1080/00268976.2013.813594 @@ -359,16 +359,16 @@ Bibliography Fox, O'Keefe, Tabbernor, Acta Crystallogr. A, 45, 786-93 (1989). **(Fraige)** - F.\ Y. Fraige, P. A. Langston, A. J. Matchett, J. Dodds, Particuology, 6, 455 (2008). + F.\ Y. Fraige, P. A. Langston, A. J. Matchett, J. Dodds, Particuology, 6, 455 (2008). **(Freitas)** - Freitas, Asta, and de Koning, Computational Materials Science, 112, 333 (2016). + Freitas, Asta, and de Koning, Computational Materials Science, 112, 333 (2016). **(Frenkel)** Frenkel and Smit, Understanding Molecular Simulation, Academic Press, London, 2002. **(GLE4MD)** - `http://gle4md.org/ `_ + `http://gle4md.org/ `_ **(Gao)** Gao and Weber, Nuclear Instruments and Methods in Physics Research B 191 (2012) 504. @@ -380,7 +380,7 @@ Bibliography Glosli, unpublished, 2005. Streitz, Glosli, Patel, Chan, Yates, de Supinski, Sexton and Gunnels, Journal of Physics: Conference Series, 46, 254 (2006). **(Goldman1)** - Goldman, Reed and Fried, J. Chem. Phys. 131, 204103 (2009) + Goldman, Reed and Fried, J. Chem. Phys. 131, 204103 (2009) **(Goldman2)** Goldman, Srinivasan, Hamel, Fried, Gaus, and Elstner, J. Phys. Chem. C, 117, 7885 (2013). @@ -389,16 +389,16 @@ Bibliography Grime and Voth, to appear in J Chem Theory & Computation (2014). **(Grimme)** - Grimme, J Comput Chem, 27(15), 1787-1799 (2006). + Grimme, J Comput Chem, 27(15), 1787-1799 (2006). **(Gronbech-Jensen1)** - Gronbech Jensen and Gronbech-Jensen, Mol Phys, 117, 2511 (2019) + Gronbech Jensen and Gronbech-Jensen, Mol Phys, 117, 2511 (2019) **(Gronbech-Jensen2)** Gronbech-Jensen and Farago, Mol Phys, 111, 983 (2013) **(Gronbech-Jensen3)** - Hayre, and Farago, Comp Phys Comm, 185, 524 (2014) + Hayre, and Farago, Comp Phys Comm, 185, 524 (2014) **(Groot)** Groot and Warren, J Chem Phys, 107: 4423-4435 (1997). DOI: 10.1063/1.474784 @@ -416,19 +416,19 @@ Bibliography David Hardy thesis: Multilevel Summation for the Fast Evaluation of Forces for the Simulation of Biomolecules, University of Illinois at Urbana-Champaign, (2006). **(Hardy2)** - Hardy, Stone, Schulten, Parallel Computing, 35, 164-177 (2009). + Hardy, Stone, Schulten, Parallel Computing, 35, 164-177 (2009). **(Hecht)** - Hecht, Harting, Ihle, Herrmann, Phys Rev E, 72, 011408 (2005). + Hecht, Harting, Ihle, Herrmann, Phys Rev E, 72, 011408 (2005). **(Henkelman1)** - Henkelman and Jonsson, J Chem Phys, 113, 9978-9985 (2000). + Henkelman and Jonsson, J Chem Phys, 113, 9978-9985 (2000). **(Henkelman2)** - Henkelman, Uberuaga, Jonsson, J Chem Phys, 113, 9901-9904 (2000). + Henkelman, Uberuaga, Jonsson, J Chem Phys, 113, 9901-9904 (2000). **(Henkes)** - Henkes, S, Fily, Y., and Marchetti, M. C. Phys. Rev. E, 84, 040301(R), 2011. + Henkes, S, Fily, Y., and Marchetti, M. C. Phys. Rev. E, 84, 040301(R), 2011. **(Henrich)** O.\ Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018). @@ -437,46 +437,46 @@ Bibliography Hess, B. The Journal of Chemical Physics 2002, 116 (1), 209-217. **(Heyes)** - Heyes, Phys Rev B, 49, 755 (1994). + Heyes, Phys Rev B, 49, 755 (1994). **(Hijazi)** - M.\ Hijazi, D. M. Wilkins, M. Ceriotti, J. Chem. Phys. 148, 184109 (2018) + M.\ Hijazi, D. M. Wilkins, M. Ceriotti, J. Chem. Phys. 148, 184109 (2018) **(Hockney)** - Hockney and Eastwood, Computer Simulation Using Particles, Adam Hilger, NY (1989). + Hockney and Eastwood, Computer Simulation Using Particles, Adam Hilger, NY (1989). **(Holian)** - Holian and Ravelo, Phys Rev B, 51, 11275 (1995). + Holian and Ravelo, Phys Rev B, 51, 11275 (1995). **(Hone)** - T.\ Hone, P. Rossky, G. Voth, J Chem Phys, 124, 154103 (2006). + T.\ Hone, P. Rossky, G. Voth, J Chem Phys, 124, 154103 (2006). **(Hoover)** - Hoover, Phys Rev A, 31, 1695 (1985). + Hoover, Phys Rev A, 31, 1695 (1985). **(Hummer)** - Hummer, Gronbech-Jensen, Neumann, J Chem Phys, 109, 2791 (1998) + Hummer, Gronbech-Jensen, Neumann, J Chem Phys, 109, 2791 (1998) **(Hunt)** - Hunt, Mol Simul, 42, 347 (2016). + Hunt, Mol Simul, 42, 347 (2016). **(IPI)** `http://epfl-cosmo.github.io/gle4md/index.html?page=ipi `_ **(IPI-CPC)** - Ceriotti, More and Manolopoulos, Comp Phys Comm, 185, 1019-1026 (2014). + Ceriotti, More and Manolopoulos, Comp Phys Comm, 185, 1019-1026 (2014). **(Ikeshoji)** - Ikeshoji and Hafskjold, Molecular Physics, 81, 251-261 (1994). + Ikeshoji and Hafskjold, Molecular Physics, 81, 251-261 (1994). **(In 't Veld)** - In 't Veld, Ismail, Grest, J Chem Phys (accepted) (2007). + In 't Veld, Ismail, Grest, J Chem Phys (accepted) (2007). **(Isele-Holder)** - Isele-Holder, Mitchell, Ismail, J Chem Phys, 137, 174107 (2012). + Isele-Holder, Mitchell, Ismail, J Chem Phys, 137, 174107 (2012). **(Isele-Holder2)** - Isele-Holder, Mitchell, Hammond, Kohlmeyer, Ismail, J Chem Theory Comput 9, 5412 (2013). + Isele-Holder, Mitchell, Hammond, Kohlmeyer, Ismail, J Chem Theory Comput 9, 5412 (2013). **(Ismail)** Ismail, Tsige, In 't Veld, Grest, Molecular Physics (accepted) (2007). @@ -488,10 +488,10 @@ Bibliography Izrailev, Stepaniants, Isralewitz, Kosztin, Lu, Molnar, Wriggers, Schulten. Computational Molecular Dynamics: Challenges, Methods, Ideas, volume 4 of Lecture Notes in Computational Science and **(Izvekov)** - Izvekov, Voth, J Chem Phys 123, 134105 (2005). + Izvekov, Voth, J Chem Phys 123, 134105 (2005). **(Janssens)** - Janssens, Olmsted, Holm, Foiles, Plimpton, Derlet, Nature Materials, 5, 124-127 (2006). + Janssens, Olmsted, Holm, Foiles, Plimpton, Derlet, Nature Materials, 5, 124-127 (2006). **(Jaramillo-Botero)** Jaramillo-Botero, Su, Qi, Goddard, Large-scale, Long-term Non-adiabatic Electron Molecular Dynamics for Describing Material Properties and Phenomena in Extreme Environments, J Comp @@ -500,28 +500,28 @@ Bibliography Jarzynski, Phys. Rev. Lett. 78, 2690 (1997) **(Jiang)** - Jiang, Hardy, Phillips, MacKerell, Schulten, and Roux, J Phys Chem Lett, 2, 87-92 (2011). + Jiang, Hardy, Phillips, MacKerell, Schulten, and Roux, J Phys Chem Lett, 2, 87-92 (2011). **(Johnson et al, 1971)** Johnson, K. L., Kendall, K., & Roberts, A. D. (1971). Surface energy and the contact of elastic solids. Proc. R. Soc. Lond. A, 324(1558), 301-313. **(Jones)** - Jones, RE; Templeton, JA; Wagner, GJ; Olmsted, D; Modine, JA, "Electron transport enhanced molecular dynamics for metals and semi-metals." International Journal for Numerical Methods in Engineering (2010), 83:940. + Jones, RE; Templeton, JA; Wagner, GJ; Olmsted, D; Modine, JA, "Electron transport enhanced molecular dynamics for metals and semi-metals." International Journal for Numerical Methods in Engineering (2010), 83:940. **(Jonsson)** Jonsson, Mills and Jacobsen, in Classical and Quantum Dynamics in Condensed Phase Simulations, edited by Berne, Ciccotti, and Coker World Scientific, Singapore, 1998, p 385. **(Jorgensen)** - Jorgensen, Chandrasekhar, Madura, Impey, Klein, J Chem Phys, 79, 926 (1983). + Jorgensen, Chandrasekhar, Madura, Impey, Klein, J Chem Phys, 79, 926 (1983). **(Jusufi)** Jusufi, Hynninen, and Panagiotopoulos, J Phys Chem B, 112, 13783 (2008). **(Kamberaj)** - Kamberaj, Low, Neal, J Chem Phys, 122, 224114 (2005). + Kamberaj, Low, Neal, J Chem Phys, 122, 224114 (2005). **(Katsura)** - H.\ Katsura, N. Nagaosa, A.V. Balatsky. Phys. Rev. Lett., 95(5), 057205. (2005) + H.\ Katsura, N. Nagaosa, A.V. Balatsky. Phys. Rev. Lett., 95(5), 057205. (2005) **(Kelchner)** Kelchner, Plimpton, Hamilton, Phys Rev B, 58, 11085 (1998). @@ -530,16 +530,16 @@ Bibliography Khrapak, Chaudhuri, and Morfill, J Chem Phys, 134, 054120 (2011). **(Kim)** - Kim, Keyes, Straub, J Chem. Phys, 132, 224107 (2010). + Kim, Keyes, Straub, J Chem. Phys, 132, 224107 (2010). **(Klapp)** - Klapp, Schoen, J Chem Phys, 117, 8050 (2002). + Klapp, Schoen, J Chem Phys, 117, 8050 (2002). **(Kolafa)** - Kolafa and Perram, Molecular Simulation, 9, 351 (1992). + Kolafa and Perram, Molecular Simulation, 9, 351 (1992). **(Kolmogorov)** - A.\ N. Kolmogorov, V. H. Crespi, Phys. Rev. B 71, 235415 (2005). + A.\ N. Kolmogorov, V. H. Crespi, Phys. Rev. B 71, 235415 (2005). **(Kong)** L.T. Kong, G. Bartels, C. Campana, C. Denniston, and Martin H. Muser, `Computer Physics Communications [180](6):1004-1010 (2009). `_ @@ -548,19 +548,19 @@ Bibliography L.T. Kong, `Computer Physics Communications [182](10):2201-2207, (2011). `_ **(Kremer)** - Kremer, Grest, J Chem Phys, 92, 5057 (1990). + Kremer, Grest, J Chem Phys, 92, 5057 (1990). **(Kuhn and Bagi, 2005)** Kuhn, M. R., & Bagi, K. (2004). Contact rolling and deformation in granular media. International journal of solids and structures, 41(21), 5793-5820. **(Kumagai)** - T.\ Kumagai, S. Izumi, S. Hara, S. Sakai, Comp. Mat. Science, 39, 457 (2007). + T.\ Kumagai, S. Izumi, S. Hara, S. Sakai, Comp. Mat. Science, 39, 457 (2007). **(Kumar)** Kumar and Higdon, Phys Rev E, 82, 051401 (2010). **(Kumar)** - Kumar and Skinner, J. Phys. Chem. B, 112, 8311 (2008) + Kumar and Skinner, J. Phys. Chem. B, 112, 8311 (2008) **(Lamoureux and Roux)** G.\ Lamoureux, B. Roux, J. Chem. Phys 119, 3025 (2003) @@ -587,31 +587,31 @@ Bibliography Lechman, et al, in preparation (2010). **(Lee)** - Lee, Baskes, Phys. Rev. B, 62, 8564-8567 (2000). + Lee, Baskes, Phys. Rev. B, 62, 8564-8567 (2000). **(Lee2)** - Lee, Baskes, Kim, Cho. Phys. Rev. B, 64, 184102 (2001). + Lee, Baskes, Kim, Cho. Phys. Rev. B, 64, 184102 (2001). **(Lenart)** - Lenart , Jusufi, and Panagiotopoulos, J Chem Phys, 126, 044509 (2007). + Lenart , Jusufi, and Panagiotopoulos, J Chem Phys, 126, 044509 (2007). **(Lenosky)** Lenosky, Sadigh, Alonso, Bulatov, de la Rubia, Kim, Voter, Kress, Modelling Simulation Materials Science Engineering, 8, 825 (2000). **(Leven1)** - I.\ Leven, I. Azuri, L. Kronik and O. Hod, J. Chem. Phys. 140, 104106 (2014). + I.\ Leven, I. Azuri, L. Kronik and O. Hod, J. Chem. Phys. 140, 104106 (2014). **(Leven2)** - I.\ Leven et al, J. Chem.Theory Comput. 12, 2896-905 (2016). + I.\ Leven et al, J. Chem.Theory Comput. 12, 2896-905 (2016). **(Li2013_POF)** - Li, Hu, Wang, Ma, Zhou, Phys Fluids, 25: 072103 (2013). DOI: 10.1063/1.4812366. + Li, Hu, Wang, Ma, Zhou, Phys Fluids, 25: 072103 (2013). DOI: 10.1063/1.4812366. **(Li2014_JCP)** Li, Tang, Lei, Caswell, Karniadakis, J Comput Phys, 265: 113-127 (2014). DOI: 10.1016/j.jcp.2014.02.003. **(Li2015_CC)** - Li, Tang, Li, Karniadakis, Chem Commun, 51: 11038-11040 (2015). DOI: 10.1039/C5CC01684C. + Li, Tang, Li, Karniadakis, Chem Commun, 51: 11038-11040 (2015). DOI: 10.1039/C5CC01684C. **(Li2015_JCP)** Li, Yazdani, Tartakovsky, Karniadakis, J Chem Phys, 143: 014101 (2015). DOI: 10.1063/1.4923254. @@ -632,19 +632,19 @@ Bibliography J.\ H. Los et al. "Extended Tersoff potential for boron nitride: Energetics and elastic properties of pristine and defective h-BN", Phys. Rev. B 96 (184108), 2017. **(Luding, 2008)** - Luding, S. (2008). Cohesive, frictional powders: contact models for tension. Granular matter, 10(4), 235. + Luding, S. (2008). Cohesive, frictional powders: contact models for tension. Granular matter, 10(4), 235. **(Maaravi)** - T.\ Maaravi et al, J. Phys. Chem. C 121, 22826-22835 (2017). + T.\ Maaravi et al, J. Phys. Chem. C 121, 22826-22835 (2017). **(MacKerell)** MacKerell, Bashford, Bellott, Dunbrack, Evanseck, Field, Fischer, Gao, Guo, Ha, et al, J Phys Chem B, 102, 3586 (1998). **(Mackay and Denniston)** - Mackay, F. E., and Denniston, C., Coupling MD particles to a lattice-Boltzmann fluid through the use of conservative forces, J. Comput. Phys. 237 (2013) 289-298. + Mackay, F. E., and Denniston, C., Coupling MD particles to a lattice-Boltzmann fluid through the use of conservative forces, J. Comput. Phys. 237 (2013) 289-298. **(Mackay et al.)** - Mackay, F. E., Ollila, S.T.T., and Denniston, C., Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid, Computer Physics Communications 184 (2013) 2021-2031. + Mackay, F. E., Ollila, S.T.T., and Denniston, C., Hydrodynamic Forces Implemented into LAMMPS through a lattice-Boltzmann fluid, Computer Physics Communications 184 (2013) 2021-2031. **(Magda)** Magda, Tirrell, Davis, J Chem Phys, 83, 1888-1901 (1985); erratum in JCP 84, 2901 (1986). @@ -668,70 +668,70 @@ Bibliography Marshall, J. S. (2009). Discrete-element modeling of particulate aerosol flows. Journal of Computational Physics, 228(5), 1541-1561. **(Martyna1992)** - Martyna, Klein, Tuckerman, J Chem Phys, 97, 2635 (1992); Martyna, Tuckerman, Tobias, Klein, Mol Phys, 87, 1117. + Martyna, Klein, Tuckerman, J Chem Phys, 97, 2635 (1992); Martyna, Tuckerman, Tobias, Klein, Mol Phys, 87, 1117. **(Martyna1994)** - Martyna, Tobias and Klein, J Chem Phys, 101, 4177 (1994). + Martyna, Tobias and Klein, J Chem Phys, 101, 4177 (1994). **(Mason)** - J.\ K. Mason, Acta Cryst A65, 259 (2009). + J.\ K. Mason, Acta Cryst A65, 259 (2009). **(Mattice)** - Mattice, Suter, Conformational Theory of Large Molecules, Wiley, New York, 1994. + Mattice, Suter, Conformational Theory of Large Molecules, Wiley, New York, 1994. **(Maxwell)** - J.C. Maxwell, Philos. Tans. Royal Soc. London, 157: 49-88 (1867). + J.C. Maxwell, Philos. Tans. Royal Soc. London, 157: 49-88 (1867). **(Mayergoyz)** - I.D. Mayergoyz, G. Bertotti, C. Serpico (2009). Elsevier (2009) + I.D. Mayergoyz, G. Bertotti, C. Serpico (2009). Elsevier (2009) **(Mayo)** - Mayo, Olfason, Goddard III, J Phys Chem, 94, 8897-8909 (1990). + Mayo, Olfason, Goddard III, J Phys Chem, 94, 8897-8909 (1990). **(Mees)** - M.\ J. Mees, G. Pourtois, E. C. Neyts, B. J. Thijsse, and A. Stesmans, Phys. Rev. B 85, 134301 (2012). + M.\ J. Mees, G. Pourtois, E. C. Neyts, B. J. Thijsse, and A. Stesmans, Phys. Rev. B 85, 134301 (2012). **(Mei)** Mei, Davenport, Fernando, Phys Rev B, 43 4653 (1991) **(Melchor)** - Gonzalez-Melchor, Mayoral, Velazquez, and Alejandre, J Chem Phys, 125, 224107 (2006). + Gonzalez-Melchor, Mayoral, Velazquez, and Alejandre, J Chem Phys, 125, 224107 (2006). **(Meloni)** Meloni, Rosati and Colombo, J Chem Phys, 126, 121102 (2007). **(Meremianin)** - Meremianin, J. Phys. A, 39, 3099 (2006). + Meremianin, J. Phys. A, 39, 3099 (2006). **(Mezei)** - Mezei, J Chem Phys, 86, 7084 (1987) + Mezei, J Chem Phys, 86, 7084 (1987) **(Mickel)** - W.\ Mickel, S. C. Kapfer, G. E. Schroeder-Turkand, K. Mecke, J. Chem. Phys. 138, 044501 (2013). + W.\ Mickel, S. C. Kapfer, G. E. Schroeder-Turkand, K. Mecke, J. Chem. Phys. 138, 044501 (2013). **(Mie)** - G.\ Mie, Ann Phys, 316, 657 (1903). + G.\ Mie, Ann Phys, 316, 657 (1903). **(Miller1)** - T.\ F. Miller III, M. Eleftheriou, P. Pattnaik, A. Ndirango, G. J. Martyna, J. Chem. Phys., 116, 8649-8659 (2002). + T.\ F. Miller III, M. Eleftheriou, P. Pattnaik, A. Ndirango, G. J. Martyna, J. Chem. Phys., 116, 8649-8659 (2002). **(Miller2)** Miller, Tadmor, Gibson, Bernstein and Pavia, J Chem Phys, 144, 184107 (2016). **(Minary)** - Minary, Martyna, and Tuckerman, J Chem Phys, 18, 2510 (2003). + Minary, Martyna, and Tuckerman, J Chem Phys, 18, 2510 (2003). **(Mindlin and Deresiewicz, 1953)** Mindlin, R.D., & Deresiewicz, H (1953). Elastic Spheres in Contact under Varying Oblique Force. J. Appl. Mech., ASME 20, 327-344. **(Mindlin, 1949)** - Mindlin, R. D. (1949). Compliance of elastic bodies in contact. J. Appl. Mech., ASME 16, 259-268. + Mindlin, R. D. (1949). Compliance of elastic bodies in contact. J. Appl. Mech., ASME 16, 259-268. **(Miron)** R.\ A. Miron and K. A. Fichthorn, J Chem Phys, 119, 6210 (2003). **(Mishin)** - Mishin, Mehl, and Papaconstantopoulos, Acta Mater, 53, 4029 (2005). + Mishin, Mehl, and Papaconstantopoulos, Acta Mater, 53, 4029 (2005). **(Mitchell and Finchham)** Mitchell, Finchham, J Phys Condensed Matter, 5, 1031-1038 (1993). @@ -755,13 +755,13 @@ Bibliography Y.\ Mori, Y. Okamoto, J. Phys. Soc. Jpn., 7, 074003 (2010). **(Moriarty1)** - Moriarty, Physical Review B, 38, 3199 (1988). + Moriarty, Physical Review B, 38, 3199 (1988). **(Moriarty2)** - Moriarty, Physical Review B, 42, 1609 (1990). Moriarty, Physical Review B 49, 12431 (1994). + Moriarty, Physical Review B, 42, 1609 (1990). Moriarty, Physical Review B 49, 12431 (1994). **(Moriarty3)** - Moriarty, Benedict, Glosli, Hood, Orlikowski, Patel, Soderlind, Streitz, Tang, and Yang, Journal of Materials Research, 21, 563 (2006). + Moriarty, Benedict, Glosli, Hood, Orlikowski, Patel, Soderlind, Streitz, Tang, and Yang, Journal of Materials Research, 21, 563 (2006). **(Morris)** Morris, Fox, Zhu, J Comp Physics, 136, 214-226 (1997). @@ -770,22 +770,22 @@ Bibliography Sabry G. Moustafa, Andrew J. Schultz, and David A. Kofke, *Very fast averaging of thermal properties of crystals by molecular simulation*\ , `Phys. Rev. E [92], 043303 (2015) `_ **(Muller-Plathe1)** - Muller-Plathe, J Chem Phys, 106, 6082 (1997). + Muller-Plathe, J Chem Phys, 106, 6082 (1997). **(Muller-Plathe2)** - Muller-Plathe, Phys Rev E, 59, 4894-4898 (1999). + Muller-Plathe, Phys Rev E, 59, 4894-4898 (1999). **(Murdick)** - D.A. Murdick, X.W. Zhou, H.N.G. Wadley, D. Nguyen-Manh, R. Drautz, and D.G. Pettifor, Phys. Rev. B, 73, 45206 (2006). + D.A. Murdick, X.W. Zhou, H.N.G. Wadley, D. Nguyen-Manh, R. Drautz, and D.G. Pettifor, Phys. Rev. B, 73, 45206 (2006). **(Murty)** - M.V.R. Murty, H.A. Atwater, Phys Rev B, 51, 4889 (1995). + M.V.R. Murty, H.A. Atwater, Phys Rev B, 51, 4889 (1995). **(Nakano)** - A.\ Nakano, Computer Physics Communications, 104, 59-69 (1997). + A.\ Nakano, Computer Physics Communications, 104, 59-69 (1997). **(Neelov)** - Neelov, Holm, J Chem Phys 132, 234103 (2010) + Neelov, Holm, J Chem Phys 132, 234103 (2010) **(Negre2016)** C.\ F. A. Negre, S. M. Mniszewski, M. J. Cawkwell, N. Bock, M. E. Wall, and A. M. N. Niklasson, J. Chem. Theory Comp., 12, 3063 (2016). @@ -806,31 +806,31 @@ Bibliography The spline-based MEAM+SW format was first devised and used to develop potentials for bcc transition metals by Jeremy Nicklas, Michael Fellinger, **(Niklasson2002)** - A.\ M. N. Niklasson, Phys. Rev. B, 66, 155115 (2002). + A.\ M. N. Niklasson, Phys. Rev. B, 66, 155115 (2002). **(Niklasson2008)** - A.\ M. N. Niklasson, Phys. Rev. Lett., 100, 123004 (2008). + A.\ M. N. Niklasson, Phys. Rev. Lett., 100, 123004 (2008). **(Niklasson2014)** - A.\ M. N. Niklasson and M. Cawkwell, J. Chem. Phys., 141, 164123, (2014). + A.\ M. N. Niklasson and M. Cawkwell, J. Chem. Phys., 141, 164123, (2014). **(Niklasson2017)** - A.\ M. N. Niklasson, J. Chem. Phys., 147, 054103 (2017). + A.\ M. N. Niklasson, J. Chem. Phys., 147, 054103 (2017). **(Noid)** Noid, Chu, Ayton, Krishna, Izvekov, Voth, Das, Andersen, J Chem Phys 128, 134105 (2008). **(Nordlund95)** - Nordlund, Kai. Computational materials science 3.4 (1995): 448-456. + Nordlund, Kai. Computational materials science 3.4 (1995): 448-456. **(Nordlund98)** - Nordlund, Kai, et al. Physical Review B 57.13 (1998): 7556. + Nordlund, Kai, et al. Physical Review B 57.13 (1998): 7556. **(Norman)** - G E Norman, S V Starikov, V V Stegailov et al., Contrib. Plasma Phys., 53, 129-139 (2013). + G E Norman, S V Starikov, V V Stegailov et al., Contrib. Plasma Phys., 53, 129-139 (2013). **(Noskov)** - Noskov, Lamoureux and Roux, J Phys Chem B, 109, 6705 (2005). + Noskov, Lamoureux and Roux, J Phys Chem B, 109, 6705 (2005). **(Nurdin)** Nurdin and Schotte Phys Rev E, 61(4), 3579 (2000) @@ -839,31 +839,31 @@ Bibliography O'Connor et al., J. Chem. Phys. 142, 024903 (2015). **(Okabe)** - T.\ Okabe, M. Kawata, Y. Okamoto, M. Masuhiro, Chem. Phys. Lett., 335, 435-439 (2001). + T.\ Okabe, M. Kawata, Y. Okamoto, M. Masuhiro, Chem. Phys. Lett., 335, 435-439 (2001). **(Ollila et al.)** - Ollila, S.T.T., Denniston, C., Karttunen, M., and Ala-Nissila, T., Fluctuating lattice-Boltzmann model for complex fluids, J. Chem. Phys. 134 (2011) 064902. + Ollila, S.T.T., Denniston, C., Karttunen, M., and Ala-Nissila, T., Fluctuating lattice-Boltzmann model for complex fluids, J. Chem. Phys. 134 (2011) 064902. **(Omelyan)** - Omelyan, Mryglod, and Folk. Phys. Rev. Lett. 86(5), 898. (2001). + Omelyan, Mryglod, and Folk. Phys. Rev. Lett. 86(5), 898. (2001). **(Oppelstrup)** Oppelstrup, unpublished, 2015. Oppelstrup and Moriarty, to be published. **(Orsi)** - Orsi & Essex, The ELBA force field for coarse-grain modeling of lipid membranes, PloS ONE 6(12): e28637, 2011. + Orsi & Essex, The ELBA force field for coarse-grain modeling of lipid membranes, PloS ONE 6(12): e28637, 2011. **(Otis R. Walton)** - Walton, O.R., Personal Communication + Walton, O.R., Personal Communication **(Ouldridge)** - T.E. Ouldridge, A.A. Louis, J.P.K. Doye, J. Chem. Phys. 134, 085101 (2011). + T.E. Ouldridge, A.A. Louis, J.P.K. Doye, J. Chem. Phys. 134, 085101 (2011). **(Ouldridge-DPhil)** - T.E. Ouldridge, Coarse-grained modelling of DNA and DNA self-assembly, DPhil. University of Oxford (2011). + T.E. Ouldridge, Coarse-grained modelling of DNA and DNA self-assembly, DPhil. University of Oxford (2011). **(Ouyang1)** - W.\ Ouyang, D. Mandelli, M. Urbakh and O. Hod, Nano Lett. 18, 6009-6016 (2018). + W.\ Ouyang, D. Mandelli, M. Urbakh and O. Hod, Nano Lett. 18, 6009-6016 (2018). **(Ouyang2)** W.\ Ouyang et al., J. Chem. Theory Comput. 16(1), 666-676 (2020). @@ -872,28 +872,28 @@ Bibliography PASS webpage: https://www.sdu.dk/en/DPASS **(PLUMED)** - G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014) + G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014) **(Paquay)** Paquay and Kusters, Biophys. J., 110, 6, (2016). preprint available at `arXiv:1411.3019 `_. **(Park)** - Park, Schulten, J. Chem. Phys. 120 (13), 5946 (2004) + Park, Schulten, J. Chem. Phys. 120 (13), 5946 (2004) **(Parks)** - Parks, Lehoucq, Plimpton, Silling, Comp Phys Comm, 179(11), 777-783 (2008). + Parks, Lehoucq, Plimpton, Silling, Comp Phys Comm, 179(11), 777-783 (2008). **(Parrinello1981)** Parrinello and Rahman, J Appl Phys, 52, 7182 (1981). **(Paula Leite2016)** - Paula Leite , Freitas, Azevedo, and de Koning, J Chem Phys, 126, 044509 (2016). + Paula Leite , Freitas, Azevedo, and de Koning, J Chem Phys, 126, 044509 (2016). **(Paula Leite2017)** - Paula Leite, Santos-Florez, and de Koning, Phys Rev E, 96, 32115 (2017). + Paula Leite, Santos-Florez, and de Koning, Phys Rev E, 96, 32115 (2017). **(Pearlman)** - Pearlman, J Chem Phys, 98, 1487 (1994) + Pearlman, J Chem Phys, 98, 1487 (1994) **(Pedersen)** Pedersen, J. Chem. Phys., 139, 104102 (2013). @@ -902,34 +902,34 @@ Bibliography Peng, Ren, Dudarev, Whelan, Acta Crystallogr. A, 52, 257-76 (1996). **(Perram)** - Perram and Rasmussen, Phys Rev E, 54, 6565-6572 (1996). + Perram and Rasmussen, Phys Rev E, 54, 6565-6572 (1996). **(Petersen)** - Petersen, J Chem Phys, 103, 3668 (1995). + Petersen, J Chem Phys, 103, 3668 (1995). **(Petersen)** - Petersen, Lechman, Plimpton, Grest, in' t Veld, Schunk, J Chem Phys, 132, 174106 (2010). + Petersen, Lechman, Plimpton, Grest, in' t Veld, Schunk, J Chem Phys, 132, 174106 (2010). **(Pettifor_1)** - D.G. Pettifor and I.I. Oleinik, Phys. Rev. B, 59, 8487 (1999). + D.G. Pettifor and I.I. Oleinik, Phys. Rev. B, 59, 8487 (1999). **(Pettifor_2)** - D.G. Pettifor and I.I. Oleinik, Phys. Rev. Lett., 84, 4124 (2000). + D.G. Pettifor and I.I. Oleinik, Phys. Rev. Lett., 84, 4124 (2000). **(Pettifor_3)** - D.G. Pettifor and I.I. Oleinik, Phys. Rev. B, 65, 172103 (2002). + D.G. Pettifor and I.I. Oleinik, Phys. Rev. B, 65, 172103 (2002). **(Phillips)** C.\ L. Phillips, J. A. Anderson, S. C. Glotzer, Comput Phys Comm, 230, 7191-7201 (2011). **(Piaggi)** - Piaggi and Parrinello, J Chem Phys, 147, 114112 (2017). + Piaggi and Parrinello, J Chem Phys, 147, 114112 (2017). **(Pisarev)** V V Pisarev and S V Starikov, J. Phys.: Condens. Matter, 26, 475401 (2014). **(Pollock)** - Pollock and Glosli, Comp Phys Comm, 95, 93 (1996). + Pollock and Glosli, Comp Phys Comm, 95, 93 (1996). **(Price1)** Price and Brooks, J Chem Phys, 121, 10096 (2004). @@ -947,58 +947,58 @@ Bibliography J.\ Ramirez, S.K. Sukumaran, B. Vorselaars and A.E. Likhtman, J. Chem. Phys. 133, 154103 (2010). **(Rappe)** - Rappe and Goddard III, Journal of Physical Chemistry, 95, 3358-3363 (1991). + Rappe and Goddard III, Journal of Physical Chemistry, 95, 3358-3363 (1991). **(Ravelo)** Ravelo, Holian, Germann and Lomdahl, Phys Rev B, 70, 014103 (2004). **(ReaxFF)** - A.\ C. T. van Duin, S. Dasgupta, F. Lorant, W. A. Goddard III, J Physical Chemistry, 105, 9396-9049 (2001) + A.\ C. T. van Duin, S. Dasgupta, F. Lorant, W. A. Goddard III, J Physical Chemistry, 105, 9396-9049 (2001) **(Rector)** Rector, Van Swol, Henderson, Molecular Physics, 82, 1009 (1994). **(Ree)** - Ree, Journal of Chemical Physics, 73, 5401 (1980). + Ree, Journal of Chemical Physics, 73, 5401 (1980). **(Reed)** - Reed, Fried, and Joannopoulos, Phys. Rev. Lett., 90, 235503 (2003). + Reed, Fried, and Joannopoulos, Phys. Rev. Lett., 90, 235503 (2003). **(Reed2)** - Reed, J. Phys. Chem. C, 116, 2205 (2012). + Reed, J. Phys. Chem. C, 116, 2205 (2012). **(Rick)** S.\ W. Rick, S. J. Stuart, B. J. Berne, J Chem Phys 101, 16141 (1994). **(Rohart)** - Rohart and Thiaville, Physical Review B, 88(18), 184422. (2013). + Rohart and Thiaville, Physical Review B, 88(18), 184422. (2013). **(Rosenberger)** Rosenberger, Sanyal, Shell and van der Vegt, Journal of Chemical Physics, 2019, 151 (4), 044111. **(Rubensson)** - E.\ H. Rubensson, A. M. N. Niklasson, SIAM J. Sci. Comput. 36 (2), 147-170, (2014). + E.\ H. Rubensson, A. M. N. Niklasson, SIAM J. Sci. Comput. 36 (2), 147-170, (2014). **(Rutherford)** - A M Rutherford and D M Duffy, J. Phys.: Condens. Matter, 19, 496201-496210 (2007). + A M Rutherford and D M Duffy, J. Phys.: Condens. Matter, 19, 496201-496210 (2007). **(Ryckaert)** - J.-P. Ryckaert, G. Ciccotti and H. J. C. Berendsen, J of Comp Phys, 23, 327-341 (1977). + J.-P. Ryckaert, G. Ciccotti and H. J. C. Berendsen, J of Comp Phys, 23, 327-341 (1977). **(SMTB-Q_1)** - N.\ Salles, O. Politano, E. Amzallag, R. Tetot, Comput. Mater. Sci. 111 (2016) 181-189 + N.\ Salles, O. Politano, E. Amzallag, R. Tetot, Comput. Mater. Sci. 111 (2016) 181-189 **(SMTB-Q_2)** - E.\ Maras, N. Salles, R. Tetot, T. Ala-Nissila, H. Jonsson, J. Phys. Chem. C 2015, 119, 10391-10399 + E.\ Maras, N. Salles, R. Tetot, T. Ala-Nissila, H. Jonsson, J. Phys. Chem. C 2015, 119, 10391-10399 **(SMTB-Q_3)** - R.\ Tetot, N. Salles, S. Landron, E. Amzallag, Surface Science 616, 19-8722 28 (2013) + R.\ Tetot, N. Salles, S. Landron, E. Amzallag, Surface Science 616, 19-8722 28 (2013) **(SRIM)** - SRIM webpage: http://www.srim.org/ + SRIM webpage: http://www.srim.org/ **(SW)** - F.\ H. Stillinger, and T. A. Weber, Phys. Rev. B, 31, 5262 (1985). + F.\ H. Stillinger, and T. A. Weber, Phys. Rev. B, 31, 5262 (1985). **(SWM4-NDP)** Lamoureux, Harder, Vorobyov, Roux, MacKerell, Chem Phys Let, 418, 245-249 (2006) @@ -1013,10 +1013,10 @@ Bibliography Salerno, Bernstein, J Chem Theory Comput, --, ---- (2018). **(Sanyal1)** - Sanyal and Shell, Journal of Chemical Physics, 2016, 145 (3), 034109. + Sanyal and Shell, Journal of Chemical Physics, 2016, 145 (3), 034109. **(Sanyal2)** - Sanyal and Shell, Journal of Physical Chemistry B, 122 (21), 5678-5693. + Sanyal and Shell, Journal of Physical Chemistry B, 122 (21), 5678-5693. **(Schelling)** Patrick K. Schelling, Comp. Mat. Science, 44, 274 (2008). @@ -1028,43 +1028,43 @@ Bibliography Schlitter and Klahn, "The free energy of a reaction coordinate at multiple constraints: a concise formulation", Molecular Physics, 101, 3439-3443 (2003). **(Schmid)** - S.\ Bureekaew, S. Amirjalayer, M. Tafipolsky, C. Spickermann, T.K. Roy and R. Schmid, Phys. Status Solidi B, 6, 1128 (2013). + S.\ Bureekaew, S. Amirjalayer, M. Tafipolsky, C. Spickermann, T.K. Roy and R. Schmid, Phys. Status Solidi B, 6, 1128 (2013). **(Schneider)** - Schneider and Stoll, Phys Rev B, 17, 1302 (1978). + Schneider and Stoll, Phys Rev B, 17, 1302 (1978). **(Schratt & Mohles)** Schratt, Mohles. Comp. Mat. Sci. 182 (2020) 109774 ---------- **(Schroeder)** - Schroeder and Steinhauser, J Chem Phys, 133, 154511 (2010). + Schroeder and Steinhauser, J Chem Phys, 133, 154511 (2010). **(Semaev)** - Semaev, Cryptography and Lattices, 181 (2001). + Semaev, Cryptography and Lattices, 181 (2001). **(Sheppard)** Sheppard, Terrell, Henkelman, J Chem Phys, 128, 134106 (2008). See ref 1 in this paper for original reference to Qmin in Jonsson, Mills, Jacobsen. **(Shinoda)** - Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007). + Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007). **(Shinoda)** - Shinoda, Shiga, and Mikami, Phys Rev B, 69, 134103 (2004). + Shinoda, Shiga, and Mikami, Phys Rev B, 69, 134103 (2004). **(Sides)** Sides, Grest, Stevens, Plimpton, J Polymer Science B, 42, 199-208 (2004). **(Silbert)** - Silbert, Ertas, Grest, Halsey, Levine, Plimpton, Phys Rev E, 64, p 051302 (2001). + Silbert, Ertas, Grest, Halsey, Levine, Plimpton, Phys Rev E, 64, p 051302 (2001). **(Silbert, 2001)** Silbert, L. E., Ertas, D., Grest, G. S., Halsey, T. C., Levine, D., & Plimpton, S. J. (2001). Granular flow down an inclined plane: Bagnold scaling and rheology. Physical Review E, **(Silling 2000)** - Silling, J Mech Phys Solids, 48, 175-209 (2000). + Silling, J Mech Phys Solids, 48, 175-209 (2000). **(Silling 2007)** - Silling, Epton, Weckner, Xu, Askari, J Elasticity, 88, 151-184 (2007). + Silling, Epton, Weckner, Xu, Askari, J Elasticity, 88, 151-184 (2007). **(Singh)** Singh and Warner, Acta Mater, 58, 5797-5805 (2010), @@ -1073,85 +1073,85 @@ Bibliography Sirk TW, Sliozberg YR, Brennan JK, Lisal M, Andzelm JW, J Chem Phys, 136 (13) 134903, 2012. **(Sirk2)** - Sirk, Moore, Brown, J Chem Phys, 138, 064505 (2013). + Sirk, Moore, Brown, J Chem Phys, 138, 064505 (2013). **(Skomski)** Skomski, R. (2008). Simple models of magnetism. Oxford University Press. **(Snodin)** - B.E. Snodin, F. Randisi, M. Mosayebi, et al., J. Chem. Phys. 142, 234901 (2015). + B.E. Snodin, F. Randisi, M. Mosayebi, et al., J. Chem. Phys. 142, 234901 (2015). **(Srivastava)** - Zhigilei, Wei, Srivastava, Phys. Rev. B 71, 165417 (2005). + Zhigilei, Wei, Srivastava, Phys. Rev. B 71, 165417 (2005). **(Steinbach)** Steinbach, Brooks, J Comput Chem, 15, 667 (1994). **(Steinhardt)** - P.\ Steinhardt, D. Nelson, and M. Ronchetti, Phys. Rev. B 28, 784 (1983). + P.\ Steinhardt, D. Nelson, and M. Ronchetti, Phys. Rev. B 28, 784 (1983). **(Stiles)** - Stiles , Hubbard, and Kayser, J Chem Phys, 77, 6189 (1982). + Stiles , Hubbard, and Kayser, J Chem Phys, 77, 6189 (1982). **(Stillinger)** - Stillinger, Weber, Phys. Rev. B 31, 5262 (1985). + Stillinger, Weber, Phys. Rev. B 31, 5262 (1985). **(Stoddard)** - Stoddard and Ford, Phys Rev A, 8, 1504 (1973). + Stoddard and Ford, Phys Rev A, 8, 1504 (1973). **(Streitz)** - F.\ H. Streitz, J. W. Mintmire, Phys Rev B, 50, 11996-12003 (1994). + F.\ H. Streitz, J. W. Mintmire, Phys Rev B, 50, 11996-12003 (1994). **(Strong)** - Strong and Eaves, J. Phys. Chem. B 121, 189 (2017). + Strong and Eaves, J. Phys. Chem. B 121, 189 (2017). **(Stuart)** - Stuart, Tutein, Harrison, J Chem Phys, 112, 6472-6486 (2000). + Stuart, Tutein, Harrison, J Chem Phys, 112, 6472-6486 (2000). **(Stukowski)** - Stukowski, Sadigh, Erhart, Caro; Modeling Simulation Materials Science & Engineering, 7, 075005 (2009). + Stukowski, Sadigh, Erhart, Caro; Modeling Simulation Materials Science & Engineering, 7, 075005 (2009). **(Su)** - Su and Goddard, Excited Electron Dynamics Modeling of Warm Dense Matter, Phys Rev Lett, 99:185003 (2007). + Su and Goddard, Excited Electron Dynamics Modeling of Warm Dense Matter, Phys Rev Lett, 99:185003 (2007). **(Sulc1)** - P.\ Sulc, F. Romano, T. E. Ouldridge, et al., J. Chem. Phys. 140, 235102 (2014). + P.\ Sulc, F. Romano, T. E. Ouldridge, et al., J. Chem. Phys. 140, 235102 (2014). **(Sulc2)** P.\ Sulc, F. Romano, T.E. Ouldridge, L. Rovigatti, J.P.K. Doye, A.A. Louis, J. Chem. Phys. 137, 135101 (2012). **(Sun)** - Sun, J. Phys. Chem. B, 102, 7338-7364 (1998). + Sun, J. Phys. Chem. B, 102, 7338-7364 (1998). **(Surblys)** - Surblys, Matsubara, Kikugawa, Ohara, Phys Rev E, 99, 051301(R) (2019). + Surblys, Matsubara, Kikugawa, Ohara, Phys Rev E, 99, 051301(R) (2019). **(Sutmann)** - Sutmann, Arnold, Fahrenberger, et. al., Physical review / E 88(6), 063308 (2013) + Sutmann, Arnold, Fahrenberger, et. al., Physical review / E 88(6), 063308 (2013) **(Swinburne)** Swinburne and Marinica, Physical Review Letters, 120, 1 (2018) **(Tadmor)** - Tadmor, Elliott, Sethna, Miller and Becker, JOM, 63, 17 (2011). doi: `https://doi.org/10.1007/s11837-011-0102-6 `_ + Tadmor, Elliott, Sethna, Miller and Becker, JOM, 63, 17 (2011). doi: `https://doi.org/10.1007/s11837-011-0102-6 `_ **(Tainter 2011)** - Tainter, Pieniazek, Lin, and Skinner, J. Chem. Phys., 134, 184501 (2011) + Tainter, Pieniazek, Lin, and Skinner, J. Chem. Phys., 134, 184501 (2011) **(Tainter 2015)** Tainter, Shi, and Skinner, 11, 2268 (2015) **(Templeton2010)** - Templeton, JA; Jones, RE; Wagner, GJ, "Application of a field-based method to spatially varying thermal transport problems in molecular dynamics." Modelling and Simulation in Materials Science and Engineering (2010), 18:085007. + Templeton, JA; Jones, RE; Wagner, GJ, "Application of a field-based method to spatially varying thermal transport problems in molecular dynamics." Modelling and Simulation in Materials Science and Engineering (2010), 18:085007. **(Templeton2011)** - Templeton, JA; Jones, RE; Lee, JW; Zimmerman, JA; Wong, BM, "A long-range electric field solver for molecular dynamics based on atomistic-to-continuum modeling." Journal of Chemical Theory and Computation (2011), 7:1736. + Templeton, JA; Jones, RE; Lee, JW; Zimmerman, JA; Wong, BM, "A long-range electric field solver for molecular dynamics based on atomistic-to-continuum modeling." Journal of Chemical Theory and Computation (2011), 7:1736. **(Tersoff_1)** - J.\ Tersoff, Phys Rev B, 37, 6991 (1988). + J.\ Tersoff, Phys Rev B, 37, 6991 (1988). **(Tersoff_2)** - J.\ Tersoff, Phys Rev B, 38, 9902 (1988). + J.\ Tersoff, Phys Rev B, 38, 9902 (1988). **(Tersoff_3)** J.\ Tersoff, Phys Rev B, 39, 5566 (1989); errata (PRB 41, 3248) @@ -1160,19 +1160,19 @@ Bibliography Theodorou, Suter, Macromolecules, 18, 1206 (1985). **(Thole)** - Chem Phys, 59, 341 (1981). + Chem Phys, 59, 341 (1981). **(Thompson1)** - Thompson, Plimpton, Mattson, J Chem Phys, 131, 154107 (2009). + Thompson, Plimpton, Mattson, J Chem Phys, 131, 154107 (2009). **(Thompson2)** - Thompson, Swiler, Trott, Foiles, Tucker, J Comp Phys, 285, 316 (2015). + Thompson, Swiler, Trott, Foiles, Tucker, J Comp Phys, 285, 316 (2015). **(Thornton et al, 2013)** Thornton, C., Cummins, S. J., & Cleary, P. W. (2013). An investigation of the comparative behavior of alternative contact force models during inelastic collisions. Powder **(Thornton, 1991)** - Thornton, C. (1991). Interparticle sliding in the presence of adhesion. J. Phys. D: Appl. Phys. 24 1942 + Thornton, C. (1991). Interparticle sliding in the presence of adhesion. J. Phys. D: Appl. Phys. 24 1942 **(To)** Q.D. To, V.H. Vu, G. Lauriat, and C. Leonard. J. Math. Phys. 56, 103101 (2015). @@ -1181,7 +1181,7 @@ Bibliography B.\ D. Todd, Denis J. Evans, and Peter J. Daivis: "Pressure tensor for inhomogeneous fluids", Phys. Rev. E 52, 1627 (1995). **(Toukmaji)** - Toukmaji, Sagui, Board, and Darden, J Chem Phys, 113, 10913 (2000). + Toukmaji, Sagui, Board, and Darden, J Chem Phys, 113, 10913 (2000). **(Toxvaerd)** Toxvaerd, Dyre, J Chem Phys, 134, 081102 (2011). @@ -1196,10 +1196,10 @@ Bibliography Tsuzuki, Branicio, Rino, Comput Phys Comm, 177, 518 (2007). **(Tuckerman1)** - M.\ Tuckerman and B. Berne, J Chem Phys, 99, 2796 (1993). + M.\ Tuckerman and B. Berne, J Chem Phys, 99, 2796 (1993). **(Tuckerman2)** - Tuckerman, Alejandre, Lopez-Rendon, Jochim, and Martyna, J Phys A: Math Gen, 39, 5629 (2006). + Tuckerman, Alejandre, Lopez-Rendon, Jochim, and Martyna, J Phys A: Math Gen, 39, 5629 (2006). **(Tuckerman3)** Tuckerman, Berne and Martyna, J Chem Phys, 97, p 1990 (1992). @@ -1208,46 +1208,46 @@ Bibliography Tuckerman, Mundy, Balasubramanian, Klein, J Chem Phys, 106, 5615 (1997). **(Ulomek)** - Ulomek, Brien, Foiles, Mohles, Modelling Simul. Mater. Sci. Eng. 23 (2015) 025007 + Ulomek, Brien, Foiles, Mohles, Modelling Simul. Mater. Sci. Eng. 23 (2015) 025007 **(Vaiwala)** - Vaiwala, Jadhav, and Thaokar, J Chem Phys, 146, 124904 (2017). + Vaiwala, Jadhav, and Thaokar, J Chem Phys, 146, 124904 (2017). **(Valone)** - Valone, Baskes, Martin, Phys. Rev. B, 73, 214209 (2006). + Valone, Baskes, Martin, Phys. Rev. B, 73, 214209 (2006). **(Varshalovich)** - Varshalovich, Moskalev, Khersonskii, Quantum Theory of Angular Momentum, World Scientific, Singapore (1987). + Varshalovich, Moskalev, Khersonskii, Quantum Theory of Angular Momentum, World Scientific, Singapore (1987). **(Vashishta1990)** - P.\ Vashishta, R. K. Kalia, J. P. Rino, Phys. Rev. B 41, 12197 (1990). + P.\ Vashishta, R. K. Kalia, J. P. Rino, Phys. Rev. B 41, 12197 (1990). **(Vashishta2007)** - P.\ Vashishta, R. K. Kalia, A. Nakano, J. P. Rino. J. Appl. Phys. 101, 103515 (2007). + P.\ Vashishta, R. K. Kalia, A. Nakano, J. P. Rino. J. Appl. Phys. 101, 103515 (2007). **(Veld)** - In 't Veld, Ismail, Grest, J Chem Phys, 127, 144711 (2007). + In 't Veld, Ismail, Grest, J Chem Phys, 127, 144711 (2007). **(Volkov1)** - Volkov and Zhigilei, J Phys Chem C, 114, 5513 (2010). + Volkov and Zhigilei, J Phys Chem C, 114, 5513 (2010). **(Volkov2)** Volkov, Simov and Zhigilei, APS Meeting Abstracts, Q31.013 (2008). **(Voter1998)** - Voter, Phys Rev B, 57, 13985 (1998). + Voter, Phys Rev B, 57, 13985 (1998). **(Voter2000)** - Sorensen and Voter, J Chem Phys, 112, 9599 (2000) + Sorensen and Voter, J Chem Phys, 112, 9599 (2000) **(Voter2002)** Voter, Montalenti, Germann, Annual Review of Materials Research 32, 321 (2002). **(Voter2013)** - S.\ Y. Kim, D. Perez, A. F. Voter, J Chem Phys, 139, 144110 (2013). + S.\ Y. Kim, D. Perez, A. F. Voter, J Chem Phys, 139, 144110 (2013). **(Wagner)** - Wagner, GJ; Jones, RE; Templeton, JA; Parks, MA, "An atomistic-to-continuum coupling method for heat transfer in solids." Special Issue of Computer Methods and Applied Mechanics (2008) 197:3351. + Wagner, GJ; Jones, RE; Templeton, JA; Parks, MA, "An atomistic-to-continuum coupling method for heat transfer in solids." Special Issue of Computer Methods and Applied Mechanics (2008) 197:3351. **(Wang et al, 2015)** Wang, Y., Alonso-Marroquin, F., & Guo, W. W. (2015). Rolling and sliding in 3-D discrete element models. Particuology, 23, 49-55. @@ -1256,19 +1256,19 @@ Bibliography J.\ Wang, H. S. Yu, P. A. Langston, F. Y. Fraige, Granular Matter, 13, 1 (2011). **(Wang2)** - J.\ Wang, and A. Rockett, Phys. Rev. B, 43, 12571 (1991). + J.\ Wang, and A. Rockett, Phys. Rev. B, 43, 12571 (1991). **(Wang3)** - Wang and Holm, J Chem Phys, 115, 6277 (2001). + Wang and Holm, J Chem Phys, 115, 6277 (2001). **(Wang4)** - Wang, Van Hove, Ross, Baskes, J. Chem. Phys., 121, 5410 (2004). + Wang, Van Hove, Ross, Baskes, J. Chem. Phys., 121, 5410 (2004). **(Ward)** - D.K. Ward, X.W. Zhou, B.M. Wong, F.P. Doty, and J.A. Zimmerman, Phys. Rev. B, 85,115206 (2012). + D.K. Ward, X.W. Zhou, B.M. Wong, F.P. Doty, and J.A. Zimmerman, Phys. Rev. B, 85,115206 (2012). **(Warren)** - Warren, Phys Rev E, 68, 066702 (2003). + Warren, Phys Rev E, 68, 066702 (2003). **(Watkins)** Watkins and Jorgensen, J Phys Chem A, 105, 4118-4125 (2001). @@ -1277,10 +1277,10 @@ Bibliography Weeks, Chandler and Andersen, J. Chem. Phys., 54, 5237 (1971) **(WeinanE)** - E, Ren, Vanden-Eijnden, Phys Rev B, 66, 052301 (2002). + E, Ren, Vanden-Eijnden, Phys Rev B, 66, 052301 (2002). **(Wen)** - M.\ Wen, S. Carr, S. Fang, E. Kaxiras, and E. B. Tadmor, Phys. Rev. B, 98, 235404 (2018) + M.\ Wen, S. Carr, S. Fang, E. Kaxiras, and E. B. Tadmor, Phys. Rev. B, 98, 235404 (2018) **(Wennberg)** Wennberg, Murtola, Hess, Lindahl, J Chem Theory Comput, 9, 3527 (2013). @@ -1289,28 +1289,28 @@ Bibliography Who, Author2, Author3, J of Long Range Solvers, 35, 164-177 (2012). **(Wicaksono1)** - Wicaksono, Sinclair, Militzer, Computational Materials Science, 117, 397-405 (2016). + Wicaksono, Sinclair, Militzer, Computational Materials Science, 117, 397-405 (2016). **(Wicaksono2)** - Wicaksono, figshare, https://doi.org/10.6084/m9.figshare.1488628.v1 (2015). + Wicaksono, figshare, https://doi.org/10.6084/m9.figshare.1488628.v1 (2015). **(Wirnsberger)** Wirnsberger, Frenkel, and Dellago, J Chem Phys, 143, 124104 (2015). **(Wolf)** - D.\ Wolf, P. Keblinski, S. R. Phillpot, J. Eggebrecht, J Chem Phys, 110, 8254 (1999). + D.\ Wolf, P. Keblinski, S. R. Phillpot, J. Eggebrecht, J Chem Phys, 110, 8254 (1999). **(Wolff)** - Wolff and Rudd, Comp Phys Comm, 120, 200-32 (1999). + Wolff and Rudd, Comp Phys Comm, 120, 200-32 (1999). **(Wood)** - Wood and Thompson, J Chem Phys, 148, 241721, (2018) + Wood and Thompson, J Chem Phys, 148, 241721, (2018) **(Yeh)** - Yeh and Berkowitz, J Chem Phys, 111, 3155 (1999). + Yeh and Berkowitz, J Chem Phys, 111, 3155 (1999). **(ZBL)** - J.F. Ziegler, J.P. Biersack, U. Littmark, 'Stopping and Ranges of Ions in Matter' Vol 1, 1985, Pergamon Press. + J.F. Ziegler, J.P. Biersack, U. Littmark, 'Stopping and Ranges of Ions in Matter' Vol 1, 1985, Pergamon Press. **(Zhang1)** Zhang and Makse, Phys Rev E, 72, p 011301 (2005). @@ -1328,43 +1328,43 @@ Bibliography Zhang, Lussetti, de Souza, Muller-Plathe, J Phys Chem B, 109, 15060-15067 (2005). **(Zhigilei1)** - Volkov and Zhigilei, ACS Nano 4, 6187 (2010). + Volkov and Zhigilei, ACS Nano 4, 6187 (2010). **(Zhigilei2)** - Volkov, Simov, Zhigilei, ASME paper IMECE2008, 68021 (2008). + Volkov, Simov, Zhigilei, ASME paper IMECE2008, 68021 (2008). **(Zhigilei3)** - Volkov, Zhigilei, J. Phys. Chem. C 114, 5513 (2010). + Volkov, Zhigilei, J. Phys. Chem. C 114, 5513 (2010). **(Zhigilei4)** - Wittmaack, Banna, Volkov, Zhigilei, Carbon 130, 69 (2018). + Wittmaack, Banna, Volkov, Zhigilei, Carbon 130, 69 (2018). **(Zhigilei5)** - Wittmaack, Volkov, Zhigilei, Compos. Sci. Technol. 166, 66 (2018). + Wittmaack, Volkov, Zhigilei, Compos. Sci. Technol. 166, 66 (2018). **(Zhigilei6)** - Wittmaack, Volkov, Zhigilei, Carbon 143, 587 (2019). + Wittmaack, Volkov, Zhigilei, Carbon 143, 587 (2019). **(Zhigilei7)** - Volkov, Zhigilei, Phys. Rev. Lett. 104, 215902 (2010). + Volkov, Zhigilei, Phys. Rev. Lett. 104, 215902 (2010). **(Zhigilei8)** - Volkov, Shiga, Nicholson, Shiomi, Zhigilei, J. Appl. Phys. 111, 053501 (2012). + Volkov, Shiga, Nicholson, Shiomi, Zhigilei, J. Appl. Phys. 111, 053501 (2012). **(Zhigilei9)** - Volkov, Zhigilei, Appl. Phys. Lett. 101, 043113 (2012). + Volkov, Zhigilei, Appl. Phys. Lett. 101, 043113 (2012). **(Zhigilei10)** - Jacobs, Nicholson, Zemer, Volkov, Zhigilei, Phys. Rev. B 86, 165414 (2012). + Jacobs, Nicholson, Zemer, Volkov, Zhigilei, Phys. Rev. B 86, 165414 (2012). **(Zhou1)** Zhou, Saidi, Fichthorn, J Phys Chem C, 118(6), 3366-3374 (2014). **(Zhou3)** - X.\ W. Zhou, M. E. Foster, R. E. Jones, P. Yang, H. Fan, and F. P. Doty, J. Mater. Sci. Res., 4, 15 (2015). + X.\ W. Zhou, M. E. Foster, R. E. Jones, P. Yang, H. Fan, and F. P. Doty, J. Mater. Sci. Res., 4, 15 (2015). **(Zhou4)** - X.\ W. Zhou, M. E. Foster, J. A. Ronevich, and C. W. San Marchi, J. Comp. Chem., 41, 1299 (2020). + X.\ W. Zhou, M. E. Foster, J. A. Ronevich, and C. W. San Marchi, J. Comp. Chem., 41, 1299 (2020). **(Zhu)** Zhu, Tajkhorshid, and Schulten, Biophys. J. 83, 154 (2002). @@ -1373,10 +1373,10 @@ Bibliography J.F. Ziegler, J. P. Biersack and U. Littmark, "The Stopping and Range of Ions in Matter," Volume 1, Pergamon, 1985. **(Zimmerman2004)** - Zimmerman, JA; Webb, EB; Hoyt, JJ;. Jones, RE; Klein, PA; Bammann, DJ, "Calculation of stress in atomistic simulation." Special Issue of Modelling and Simulation in Materials Science and Engineering (2004),12:S319. + Zimmerman, JA; Webb, EB; Hoyt, JJ;. Jones, RE; Klein, PA; Bammann, DJ, "Calculation of stress in atomistic simulation." Special Issue of Modelling and Simulation in Materials Science and Engineering (2004),12:S319. **(Zimmerman2010)** - Zimmerman, JA; Jones, RE; Templeton, JA, "A material frame approach for evaluating continuum variables in atomistic simulations." Journal of Computational Physics (2010), 229:2364. + Zimmerman, JA; Jones, RE; Templeton, JA, "A material frame approach for evaluating continuum variables in atomistic simulations." Journal of Computational Physics (2010), 229:2364. **(de Buyl)** de Buyl, Colberg and Hofling, H5MD: A structured, efficient, and portable file format for molecular data, Comp. Phys. Comm. 185(6), 1546-1553 (2014) - @@ -1385,7 +1385,7 @@ Bibliography de Koning and Antonelli, Phys Rev E, 53, 465 (1996). **(electronic stopping)** - Wikipedia - Electronic Stopping Power: https://en.wikipedia.org/wiki/Stopping_power_%28particle_radiation%29 + Wikipedia - Electronic Stopping Power: https://en.wikipedia.org/wiki/Stopping_power_%28particle_radiation%29 **(tenWolde)** P.\ R. ten Wolde, M. J. Ruiz-Montero, D. Frenkel, J. Chem. Phys. 104, 9932 (1996). From 5e110fe70741c554e8b42120aa0cf981b83197b4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 16:45:39 -0400 Subject: [PATCH 04/42] update docs for autodetected OpenMP compatibility --- doc/src/Build_basics.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/Build_basics.rst b/doc/src/Build_basics.rst index 3b20209e5c..d364382591 100644 --- a/doc/src/Build_basics.rst +++ b/doc/src/Build_basics.rst @@ -159,11 +159,11 @@ others (e.g. GCC version 9 and beyond, Clang version 10 and later) may implement strict OpenMP 4.0 and later semantics, which are incompatible with the OpenMP 3.1 semantics used in LAMMPS for maximal compatibility with compiler versions in use. If compilation with OpenMP enabled fails -because of your compiler requiring strict OpenMP 4.0 semantic, you can +because of your compiler requiring strict OpenMP 4.0 semantics, you can change the behavior by adding ``-D LAMMPS_OMP_COMPAT=4`` to the ``LMP_INC`` variable in your makefile, or add it to the command line -while configuring with CMake. CMake will detect the suitable setting for -the GNU, Clang, and Intel compilers. +while configuring with CMake. LAMMPS will autodetect a suitable setting +for most GNU, Clang, and Intel compilers. ---------- From e378532003d9f58cb52adab42811f275018eebf8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 17:31:49 -0400 Subject: [PATCH 05/42] avoid 32-bit integer overflow --- src/reset_atom_ids.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/reset_atom_ids.cpp b/src/reset_atom_ids.cpp index bf642533d5..55513a1109 100644 --- a/src/reset_atom_ids.cpp +++ b/src/reset_atom_ids.cpp @@ -368,9 +368,9 @@ void ResetIDs::sort() // bins are numbered from 0 to Nbins-1 bigint nbins = (bigint) nbinx*nbiny*nbinz; - int nlo = nbins / nprocs; - int nhi = nlo + 1; - int nplo = nprocs - (nbins % nprocs); + bigint nlo = nbins / nprocs; + bigint nhi = nlo + 1; + bigint nplo = nprocs - (nbins % nprocs); bigint nbinlo = nplo*nlo; if (me < nplo) { From d1321a0860d92a2a351048984561c340bfe0853a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 17:49:52 -0400 Subject: [PATCH 06/42] fix argument dimensions --- src/SPIN/pair_spin_dipole_long.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPIN/pair_spin_dipole_long.cpp b/src/SPIN/pair_spin_dipole_long.cpp index 28a70a047d..364c2025c8 100644 --- a/src/SPIN/pair_spin_dipole_long.cpp +++ b/src/SPIN/pair_spin_dipole_long.cpp @@ -453,7 +453,7 @@ void PairSpinDipoleLong::compute_long(int /* i */, int /* j */, double eij[3], ------------------------------------------------------------------------- */ void PairSpinDipoleLong::compute_long_mech(int /* i */, int /* j */, double eij[3], - double bij[4], double fi[3], double spi[3], double spj[3]) + double bij[4], double fi[3], double spi[4], double spj[4]) { double sisj,sieij,sjeij,b2,b3; double g1,g2,g1b2_g2b3,gigj,pre; From c496b18a9de08c445e3c242d78d0f9af711da1a6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 17:50:02 -0400 Subject: [PATCH 07/42] avoid memory leak --- src/math_eigen_impl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/math_eigen_impl.h b/src/math_eigen_impl.h index a48158de32..daef0e7052 100644 --- a/src/math_eigen_impl.h +++ b/src/math_eigen_impl.h @@ -849,6 +849,7 @@ void Jacobi:: Dealloc() { //assert(! is_preallocated); Dealloc2D(&M); + delete[] max_idx_row; Init(); } From c0384eb2642080a2cf0380ed8aae57f4f54a52e0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 17:52:13 -0400 Subject: [PATCH 08/42] update code owners --- .github/CODEOWNERS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 033939551b..8457af3af9 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -114,6 +114,7 @@ src/info.* @akohlmey @rbberger src/timer.* @akohlmey src/min* @sjplimp @stanmoore1 src/utils.* @akohlmey @rbberger +src/math_eigen_impl.h @jewettaij # tools tools/msi2lmp/* @akohlmey @@ -134,6 +135,9 @@ cmake/presets/*.cmake @junghans @rbberger @akohlmey # python python/* @rbberger +# fortran +fortran/* @akohlmey + # docs doc/utils/*/* @rbberger doc/Makefile @rbberger From bd60174fd320b446f814ceea77a5d65432184adb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 18:00:19 -0400 Subject: [PATCH 09/42] fix argument dimensions --- src/SPIN/pair_spin_dipole_cut.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPIN/pair_spin_dipole_cut.cpp b/src/SPIN/pair_spin_dipole_cut.cpp index 7444be347a..b482792e12 100644 --- a/src/SPIN/pair_spin_dipole_cut.cpp +++ b/src/SPIN/pair_spin_dipole_cut.cpp @@ -379,7 +379,7 @@ void PairSpinDipoleCut::compute_dipolar(int /* i */, int /* j */, double eij[3], ------------------------------------------------------------------------- */ void PairSpinDipoleCut::compute_dipolar_mech(int /* i */, int /* j */, double eij[3], - double fi[3], double spi[3], double spj[3], double r2inv) + double fi[3], double spi[4], double spj[4], double r2inv) { double sisj,sieij,sjeij; double gigjri4,bij,pre; From ab08a27731e27c3a05e4d7a79d8bacd8389d5b42 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 18:00:47 -0400 Subject: [PATCH 10/42] correct data layout for creating integrate style --- src/USER-INTEL/fix_intel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/USER-INTEL/fix_intel.cpp b/src/USER-INTEL/fix_intel.cpp index 92b47179dd..de1f947bc2 100644 --- a/src/USER-INTEL/fix_intel.cpp +++ b/src/USER-INTEL/fix_intel.cpp @@ -160,9 +160,9 @@ FixIntel::FixIntel(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) // if using LRT mode, create the integrate style if (_lrt) { - char *str; - str = (char *) "verlet/lrt/intel"; - update->create_integrate(1,&str,0); + char *cmd[1]; + cmd[0] = (char *) "verlet/lrt/intel"; + update->create_integrate(1,cmd,0); } // error check From 2ffa50f2f8fd56c8c54757eb59cc249e8ce9cd4a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 18:13:52 -0400 Subject: [PATCH 11/42] fix memory leak --- src/compute_pressure.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compute_pressure.cpp b/src/compute_pressure.cpp index f626718596..5c6cbcb71a 100644 --- a/src/compute_pressure.cpp +++ b/src/compute_pressure.cpp @@ -36,7 +36,7 @@ using namespace LAMMPS_NS; ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg), - vptr(nullptr), id_temp(nullptr) + vptr(nullptr), id_temp(nullptr), pstyle(nullptr) { if (narg < 4) error->all(FLERR,"Illegal compute pressure command"); if (igroup) error->all(FLERR,"Compute pressure must use group all"); @@ -146,6 +146,7 @@ ComputePressure::~ComputePressure() delete [] id_temp; delete [] vector; delete [] vptr; + delete [] pstyle; } /* ---------------------------------------------------------------------- */ From a963e85846aca021a97331ff78b20015224f6199 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 21:50:53 -0400 Subject: [PATCH 12/42] remove dead code --- src/ASPHERE/pair_line_lj.cpp | 1 - src/ASPHERE/pair_tri_lj.cpp | 1 - src/BODY/compute_body_local.cpp | 2 +- src/BODY/compute_temp_body.cpp | 1 - src/CLASS2/angle_class2.cpp | 4 ---- 5 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/ASPHERE/pair_line_lj.cpp b/src/ASPHERE/pair_line_lj.cpp index ba565c5922..7e6979f0a5 100644 --- a/src/ASPHERE/pair_line_lj.cpp +++ b/src/ASPHERE/pair_line_lj.cpp @@ -74,7 +74,6 @@ void PairLineLJ::compute(int eflag, int vflag) double xi[2],xj[2],fi[2],dxi,dxj,dyi,dyj; int *ilist,*jlist,*numneigh,**firstneigh; - evdwl = 0.0; ev_init(eflag,vflag); double **x = atom->x; diff --git a/src/ASPHERE/pair_tri_lj.cpp b/src/ASPHERE/pair_tri_lj.cpp index 79253140c0..5f62d211db 100644 --- a/src/ASPHERE/pair_tri_lj.cpp +++ b/src/ASPHERE/pair_tri_lj.cpp @@ -74,7 +74,6 @@ void PairTriLJ::compute(int eflag, int vflag) double dc1[3],dc2[3],dc3[3]; int *ilist,*jlist,*numneigh,**firstneigh; - evdwl = 0.0; ev_init(eflag,vflag); AtomVecTri::Bonus *bonus = avec->bonus; diff --git a/src/BODY/compute_body_local.cpp b/src/BODY/compute_body_local.cpp index 940250d160..6443f95325 100644 --- a/src/BODY/compute_body_local.cpp +++ b/src/BODY/compute_body_local.cpp @@ -123,7 +123,7 @@ void ComputeBodyLocal::compute_local() int ncount = compute_body(0); if (ncount > nmax) reallocate(ncount); size_local_rows = ncount; - ncount = compute_body(1); + compute_body(1); } /* ---------------------------------------------------------------------- diff --git a/src/BODY/compute_temp_body.cpp b/src/BODY/compute_temp_body.cpp index 6903f7a25c..210bb07417 100644 --- a/src/BODY/compute_temp_body.cpp +++ b/src/BODY/compute_temp_body.cpp @@ -343,7 +343,6 @@ void ComputeTempBody::compute_vector() inertia = bonus[body[i]].inertia; quat = bonus[body[i]].quat; - massone = rmass[i]; // wbody = angular velocity in body frame diff --git a/src/CLASS2/angle_class2.cpp b/src/CLASS2/angle_class2.cpp index 28d081c5c9..616d191d1c 100644 --- a/src/CLASS2/angle_class2.cpp +++ b/src/CLASS2/angle_class2.cpp @@ -447,10 +447,6 @@ double AngleClass2::single(int type, int i1, int i2, int i3) if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; - double s = sqrt(1.0 - c*c); - if (s < SMALL) s = SMALL; - s = 1.0/s; - double dtheta = acos(c) - theta0[type]; double dtheta2 = dtheta*dtheta; double dtheta3 = dtheta2*dtheta; From 172bb6050af242f288890db58a5240caaba9ae11 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 22:08:22 -0400 Subject: [PATCH 13/42] use safe read function --- src/USER-MISC/pair_coul_slater_cut.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/USER-MISC/pair_coul_slater_cut.cpp b/src/USER-MISC/pair_coul_slater_cut.cpp index 5e799178c9..f7096292ba 100644 --- a/src/USER-MISC/pair_coul_slater_cut.cpp +++ b/src/USER-MISC/pair_coul_slater_cut.cpp @@ -152,10 +152,10 @@ void PairCoulSlaterCut::write_restart_settings(FILE *fp) void PairCoulSlaterCut::read_restart_settings(FILE *fp) { if (comm->me == 0) { - fread(&cut_global,sizeof(double),1,fp); - fread(&lamda,sizeof(double),1,fp); - fread(&offset_flag,sizeof(int),1,fp); - fread(&mix_flag,sizeof(int),1,fp); + utils::sfread(FLERR,&cut_global,sizeof(double),1,fp,nullptr,error); + utils::sfread(FLERR,&lamda,sizeof(double),1,fp,nullptr,error); + utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,nullptr,error); + utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,nullptr,error); } MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world); MPI_Bcast(&lamda,1,MPI_DOUBLE,0,world); From 6967522a4fef8aa36268299cabf711023c977845 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 22:08:28 -0400 Subject: [PATCH 14/42] fix logic error --- src/change_box.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/change_box.cpp b/src/change_box.cpp index 1bd3fe733f..a214a56969 100644 --- a/src/change_box.cpp +++ b/src/change_box.cpp @@ -176,7 +176,7 @@ void ChangeBox::command(int narg, char **arg) int move_atoms = 0; for (int m = 0; m < nops; m++) { - if (ops[m].style != ORTHO || ops[m].style != TRICLINIC) move_atoms = 1; + if (ops[m].style != ORTHO && ops[m].style != TRICLINIC) move_atoms = 1; } // error if moving atoms and there is stored per-atom restart state From 909960514af58720686038fc4eec79169bbeba32 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 22:10:30 -0400 Subject: [PATCH 15/42] avoid unneeded division --- src/USER-UEF/compute_pressure_uef.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/USER-UEF/compute_pressure_uef.cpp b/src/USER-UEF/compute_pressure_uef.cpp index adb9970c12..e0c5f667a7 100644 --- a/src/USER-UEF/compute_pressure_uef.cpp +++ b/src/USER-UEF/compute_pressure_uef.cpp @@ -78,7 +78,7 @@ double ComputePressureUef::compute_scalar() addstep(update->ntimestep+1); int k =0; - scalar = 0; + scalar = 0.0; if (ext_flags[0]) { scalar += vector[0]; k++; @@ -92,7 +92,7 @@ double ComputePressureUef::compute_scalar() k++; } - scalar /= k; + if (k > 1) scalar /= k; return scalar; } From adef7d4e1843910054b1c518830cd545ce655dfb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 22:14:21 -0400 Subject: [PATCH 16/42] need to check for nthreads < 1 only if OpenMP is enabled --- src/USER-OMP/fix_omp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-OMP/fix_omp.cpp b/src/USER-OMP/fix_omp.cpp index 2bbfa22b99..75eadca25e 100644 --- a/src/USER-OMP/fix_omp.cpp +++ b/src/USER-OMP/fix_omp.cpp @@ -78,10 +78,10 @@ FixOMP::FixOMP(LAMMPS *lmp, int narg, char **arg) #endif } +#if defined(_OPENMP) if (nthreads < 1) error->all(FLERR,"Illegal number of OpenMP threads requested"); -#if defined(_OPENMP) int reset_thr = 0; #endif if (nthreads != comm->nthreads) { From 7e68746ebe1a9ad946cfadbdb922093055f2849e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 22:16:19 -0400 Subject: [PATCH 17/42] use safe reader function --- src/USER-MISC/bond_special.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/USER-MISC/bond_special.cpp b/src/USER-MISC/bond_special.cpp index 4f79fea519..b21396202e 100644 --- a/src/USER-MISC/bond_special.cpp +++ b/src/USER-MISC/bond_special.cpp @@ -184,8 +184,8 @@ void BondSpecial::read_restart(FILE *fp) allocate(); if (comm->me == 0) { - fread(&factor_lj[1],sizeof(double),atom->nbondtypes,fp); - fread(&factor_coul[1],sizeof(double),atom->nbondtypes,fp); + utils::sfread(FLERR,&factor_lj[1],sizeof(double),atom->nbondtypes,fp,nullptr,error); + utils::sfread(FLERR,&factor_coul[1],sizeof(double),atom->nbondtypes,fp,nullptr,error); } MPI_Bcast(&factor_lj[1],atom->nbondtypes,MPI_DOUBLE,0,world); MPI_Bcast(&factor_coul[1],atom->nbondtypes,MPI_DOUBLE,0,world); From d23f7d14c9490b96f033b9fb7a539134c345b3c9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 25 Sep 2020 22:20:31 -0400 Subject: [PATCH 18/42] typo --- src/SPIN/neb_spin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 8abf7b8e7c..31122ec678 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -298,7 +298,7 @@ void NEBSpin::run() fprintf(uscreen,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc EBF EBR RDT " "RD1 PE1 RD2 PE2 ... RDN PEN " - "GradV0dottan DN0... GradVNdottan DNN\n"); + "GradV0dottan DN0 ... GradVNdottan DNN\n"); } else { fprintf(uscreen,"Step MaxReplicaTorque MaxAtomTorque " "GradV0 GradV1 GradVc " From b11b420b08f35a816d6111438f2557ee55215bd6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 26 Sep 2020 22:30:05 -0400 Subject: [PATCH 19/42] small doc update for singularity --- doc/src/Tools.rst | 1 + tools/singularity/README.md | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/src/Tools.rst b/doc/src/Tools.rst index 3600d6c661..e3e6b344c0 100644 --- a/doc/src/Tools.rst +++ b/doc/src/Tools.rst @@ -663,6 +663,7 @@ The singularity sub-directory contains container definitions files that can be used to build container images for building and testing LAMMPS on specific OS variants using the `Singularity `_ container software. Contributions for additional variants are welcome. +For more details please see the README.md file in that folder. ---------- diff --git a/tools/singularity/README.md b/tools/singularity/README.md index bcc13fbaa1..100d367439 100644 --- a/tools/singularity/README.md +++ b/tools/singularity/README.md @@ -5,12 +5,12 @@ for [Singularity](https://sylabs.io), suitable for compiling and testing LAMMPS on a variety of OS variants with support for most standard packages and - for some of them - also building/spellchecking the manual in all supported formats. This allows to test and debug LAMMPS code on -different OS variants than what is locally installed on your development +different OS variants without doing a full installation on your development workstation, e.g. when bugs are reported that can only be reproduced on a specific OS or with specific (mostly older) versions of tools, compilers, or libraries. -Ready-to-use container images built from these definition files are +Ready-to-use container images built from some these definition files are occasionally uploaded to the container library at sylabs.io. They can be found here: https://cloud.sylabs.io/library/lammps/default/lammps_development# and will be signed with a GPG key that has the fingerprint: @@ -25,7 +25,7 @@ git clone --depth 500 git://github.com/lammps/lammps.git lammps mkdir build-centos7 cd build-centos7 sudo singularity build centos7.sif ../tools/singularity/centos7.def -singularity shell centos7.sif +singularity exec centos7.sif bash --login cmake -C ../cmake/presets/most.cmake ../cmake make ``` @@ -39,7 +39,7 @@ git clone --depth 500 git://github.com/lammps/lammps.git lammps mkdir build-ubuntu18 cd build-ubuntu18 singularity pull library://lammps/default/lammps_development:ubuntu18.04 -singularity shell lammps_development_ubuntu18.04.sif +singularity exec lammps_development_ubuntu18.04.sif bash --login cmake -C ../cmake/presets/most.cmake ../cmake make ``` From fdbdd26585428bedd4d434d7527dee893c902c65 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 26 Sep 2020 22:30:21 -0400 Subject: [PATCH 20/42] include intel fortran compiler into intel cmake preset --- cmake/presets/intel.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/presets/intel.cmake b/cmake/presets/intel.cmake index 099d744ad3..d101a0f699 100644 --- a/cmake/presets/intel.cmake +++ b/cmake/presets/intel.cmake @@ -1,7 +1,8 @@ -# preset that will enable clang/clang++ with support for MPI and OpenMP (on Linux boxes) +# preset that will enable Intel compilers with support for MPI and OpenMP (on Linux boxes) set(CMAKE_CXX_COMPILER "icpc" CACHE STRING "" FORCE) set(CMAKE_C_COMPILER "icc" CACHE STRING "" FORCE) +set(CMAKE_Fortran_COMPILER "ifort" CACHE STRING "" FORCE) set(MPI_CXX "icpc" CACHE STRING "" FORCE) set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE) unset(HAVE_OMP_H_INCLUDE CACHE) @@ -12,5 +13,6 @@ set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE) set(OpenMP_CXX "icpc" CACHE STRING "" FORCE) set(OpenMP_CXX_FLAGS "-qopenmp" CACHE STRING "" FORCE) set(OpenMP_CXX_LIB_NAMES "omp" CACHE STRING "" FORCE) +set(OpenMP_Fortran_FLAGS "-qopenmp" CACHE STRING "" FORCE) set(OpenMP_omp_LIBRARY "libiomp5.so" CACHE PATH "" FORCE) From 9d39587d37bc9faaed25ecc0547ccb41fb2fc8bb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 27 Sep 2020 19:05:40 -0400 Subject: [PATCH 21/42] expand c-library properties example --- doc/src/Library_properties.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/src/Library_properties.rst b/doc/src/Library_properties.rst index bf36dcb8b1..037e6ffb5a 100644 --- a/doc/src/Library_properties.rst +++ b/doc/src/Library_properties.rst @@ -26,9 +26,18 @@ event as atoms are migrating between sub-domains. handle = lammps_open_no_mpi(0, NULL, NULL); lammps_file(handle,"in.sysinit"); - printf("running simulation with %g atoms\n", + printf("Running a simulation with %g atoms.\n", lammps_get_natoms(handle)); + printf(" %d local and %d ghost atoms. %d atom types\n", + lammps_extract_setting(handle,"nlocal"), + lammps_extract_setting(handle,"nghost"), + lammps_extract_setting(handle,"ntypes")); + + double *dt = (double *)lammps_extract_global(handle,"dt"); + printf("Changing timestep from %g to 0.5\n", *dt); + *dt = 0.5; + lammps_command(handle,"run 1000 post no"); for (i=0; i < 10; ++i) { From c626208c80d99247ace2e02c489924afa6e80e1a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 27 Sep 2020 19:05:58 -0400 Subject: [PATCH 22/42] avoid failure with Intel compilers --- unittest/c-library/test_library_properties.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittest/c-library/test_library_properties.cpp b/unittest/c-library/test_library_properties.cpp index a63dac9b01..7bf0da3d72 100644 --- a/unittest/c-library/test_library_properties.cpp +++ b/unittest/c-library/test_library_properties.cpp @@ -63,7 +63,7 @@ TEST_F(LibraryProperties, memory_usage) lammps_memory_usage(lmp, meminfo); EXPECT_GT(meminfo[0], 0.0); #if defined(__linux__) || defined(_WIN32) - EXPECT_GT(meminfo[1], 0.0); + EXPECT_GE(meminfo[1], 0.0); #endif EXPECT_GT(meminfo[2], 0.0); }; From 407f44575303fb8495f673e54285c5fbae671eaf Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 28 Sep 2020 07:32:11 -0400 Subject: [PATCH 23/42] remove specializations using cilk array notation --- src/USER-INTEL/intel_intrinsics.h | 257 +----------------------------- 1 file changed, 4 insertions(+), 253 deletions(-) diff --git a/src/USER-INTEL/intel_intrinsics.h b/src/USER-INTEL/intel_intrinsics.h index ee20cd1119..d1f019feea 100644 --- a/src/USER-INTEL/intel_intrinsics.h +++ b/src/USER-INTEL/intel_intrinsics.h @@ -35,114 +35,10 @@ #include #endif -// Vector classes for Cilk array notation -// This is experimental and doesn't yield good code yet -template -struct lmp_intel_an_fvec { - fscal data[VL]; - lmp_intel_an_fvec() {} - explicit lmp_intel_an_fvec(const fscal f) { data[:] = f; } - explicit lmp_intel_an_fvec(fscal f[VL]) { data[:] = f[:]; } - lmp_intel_an_fvec(const lmp_intel_an_fvec &a) { data[:] = a.data[:]; } - lmp_intel_an_fvec& operator =(const lmp_intel_an_fvec &a) { data[:] = a.data[:]; return *this; } - const lmp_intel_an_fvec operator +(const lmp_intel_an_fvec &b) const { - lmp_intel_an_fvec ret = *this; - ret.data[:] += b.data[:]; - return ret; - } - const lmp_intel_an_fvec operator -(const lmp_intel_an_fvec &b) const { - lmp_intel_an_fvec ret = *this; - ret.data[:] -= b.data[:]; - return ret; - } - const lmp_intel_an_fvec operator *(const lmp_intel_an_fvec &b) const { - lmp_intel_an_fvec ret = *this; - ret.data[:] *= b.data[:]; - return ret; - } - const lmp_intel_an_fvec operator /(const lmp_intel_an_fvec &b) const { - lmp_intel_an_fvec ret = *this; - ret.data[:] /= b.data[:]; - return ret; - } - lmp_intel_an_fvec& operator +=(const lmp_intel_an_fvec &b) { - data[:] += b.data[:]; return *this; - } - lmp_intel_an_fvec& operator -=(const lmp_intel_an_fvec &b) { - data[:] -= b.data[:]; return *this; - } - lmp_intel_an_fvec& operator *=(const lmp_intel_an_fvec &b) { - data[:] *= b.data[:]; return *this; - } - lmp_intel_an_fvec& operator /=(const lmp_intel_an_fvec &b) { - data[:] /= b.data[:]; return *this; - } - friend lmp_intel_an_fvec sqrt(const lmp_intel_an_fvec &a) __attribute__((always_inline)) { - lmp_intel_an_fvec ret; ret.data[:] = sqrt(a.data[:]); return ret; - } - friend lmp_intel_an_fvec exp(const lmp_intel_an_fvec &a) __attribute__((always_inline)) { - lmp_intel_an_fvec ret; ret.data[:] = exp(a.data[:]); return ret; - } - friend lmp_intel_an_fvec sin(const lmp_intel_an_fvec &a) __attribute__((always_inline)) { - lmp_intel_an_fvec ret; ret.data[:] = sin(a.data[:]); return ret; - } - friend lmp_intel_an_fvec invsqrt(const lmp_intel_an_fvec &a) __attribute__((always_inline)) { - lmp_intel_an_fvec ret; ret.data[:] = ((fscal)1.) / sqrt(a.data[:]); return ret; - } - friend lmp_intel_an_fvec pow(const lmp_intel_an_fvec &a, const lmp_intel_an_fvec &b) __attribute__((always_inline)) { - lmp_intel_an_fvec ret; ret.data[:] = pow(a.data[:], b.data[:]); return ret; - } - lmp_intel_an_fvec operator - () const { - lmp_intel_an_fvec ret; ret.data[:] = - data[:]; return ret; - } -}; -template -struct lmp_intel_an_ivec { - int data[VL]; - lmp_intel_an_ivec() {} - explicit lmp_intel_an_ivec(int i) { data[:] = i; } - explicit lmp_intel_an_ivec(const int * a) { data[:] = a[0:VL]; } - const lmp_intel_an_ivec operator &(const lmp_intel_an_ivec &b) { - lmp_intel_an_ivec ret = *this; - ret.data[:] &= b.data[:]; - return ret; - } - const lmp_intel_an_ivec operator |(const lmp_intel_an_ivec &b) { - lmp_intel_an_ivec ret = *this; - ret.data[:] |= b.data[:]; - return ret; - } - const lmp_intel_an_ivec operator +(const lmp_intel_an_ivec &b) { - lmp_intel_an_ivec ret = *this; - ret.data[:] += b.data[:]; - return ret; - } -}; -template -struct lmp_intel_an_bvec { - bool data[VL]; - lmp_intel_an_bvec() {} - lmp_intel_an_bvec(const lmp_intel_an_bvec &a) { data[:] = a.data[:]; } - lmp_intel_an_bvec& operator =(const lmp_intel_an_bvec &a) { data[:] = a.data[:]; return *this; } - explicit lmp_intel_an_bvec(int i) { data[:] = i; } - friend lmp_intel_an_bvec operator &(const lmp_intel_an_bvec &a, const lmp_intel_an_bvec &b) __attribute__((always_inline)) { - lmp_intel_an_bvec ret; ret.data[:] = a.data[:] & b.data[:]; return ret; - } - friend lmp_intel_an_bvec operator |(const lmp_intel_an_bvec &a, const lmp_intel_an_bvec &b) __attribute__((always_inline)) { - lmp_intel_an_bvec ret; ret.data[:] = a.data[:] | b.data[:]; return ret; - } - friend lmp_intel_an_bvec operator ~(const lmp_intel_an_bvec &a) __attribute__((always_inline)) { - lmp_intel_an_bvec ret; ret.data[:] = ! a.data[:]; return ret; - } - lmp_intel_an_bvec& operator &=(const lmp_intel_an_bvec &a) __attribute__((always_inline)) { - data[:] &= a.data[:]; return *this; - } -}; - namespace lmp_intel { -// Self explanatory mostly, KNC=IMCI and AVX-512, NONE=Scalar, AN=Array Not. -enum CalculationMode { KNC, AVX, AVX2, SSE, NONE, AN }; +// Self explanatory mostly, KNC=IMCI and AVX-512, NONE=Scalar. +enum CalculationMode {KNC, AVX, AVX2, SSE, NONE}; #ifdef __MIC__ #ifdef LMP_INTEL_VECTOR_MIC static const CalculationMode mode = LMP_INTEL_VECTOR_MIC; @@ -1916,148 +1812,6 @@ struct vector_ops { } }; -// Array notation implementation -template -struct vector_ops { - static const int VL = 4; - typedef flt_t fscal; - typedef lmp_intel_an_fvec fvec; - typedef lmp_intel_an_ivec ivec; - typedef lmp_intel_an_bvec bvec; - typedef flt_t farr[VL]; - typedef int iarr[VL]; - static fvec recip(const fvec &a) { - fvec ret; ret.data[:] = ((fscal)1.) / a.data[:]; return ret; - } - template - static void gather_prefetch_t0(const ivec &idx, const bvec &mask, const void *base) { - // nop - } - template - static fvec gather(const fvec &from, const bvec &mask, const ivec &idx, const void *base) { - fvec ret = from; - if (mask.data[:]) ret.data[:] = *reinterpret_cast(reinterpret_cast(base) + scale * idx.data[:]); - return ret; - } - template - static void gather_x(const ivec &idxs, const bvec &mask, const T *base, fvec *x, fvec *y, fvec *z, ivec *w) { - *x = gather<1>(*x, mask, idxs, &base->x); - *y = gather<1>(*y, mask, idxs, &base->y); - *z = gather<1>(*z, mask, idxs, &base->z); - *w = int_gather<1>(*w, mask, idxs, &base->w); - } - static void gather_8(const ivec &idxs, const bvec &mask, const void *base, - fvec *r0, fvec *r1, fvec *r2, fvec *r3, fvec *r4, fvec *r5, fvec *r6, fvec *r7) { - fvec a = zero(), b = zero(), c = zero(), d = zero(); - gather_4(idxs, mask, base, r0, r1, r2, r3); - gather_4(idxs, mask, reinterpret_cast(base) + 4 * sizeof(fscal), r4, r5, r6, r7); - } - static void gather_4(const ivec &idxs, const bvec &mask, const void *base, - fvec *r0, fvec *r1, fvec *r2, fvec *r3) { - *r0 = gather<4>(*r0, mask, idxs, reinterpret_cast(base) + 0 * sizeof(fscal)); - *r1 = gather<4>(*r1, mask, idxs, reinterpret_cast(base) + 1 * sizeof(fscal)); - *r2 = gather<4>(*r2, mask, idxs, reinterpret_cast(base) + 2 * sizeof(fscal)); - *r3 = gather<4>(*r3, mask, idxs, reinterpret_cast(base) + 3 * sizeof(fscal)); - } - static fvec blend(const bvec &mask, const fvec &a, const fvec &b) { - fvec ret = a; - if (mask.data[:]) ret.data[:] = b.data[:]; - return ret; - } - static ivec int_blend(const bvec &mask, const ivec &a, const ivec &b) { - fvec ret = a; - if (mask.data[:]) ret.data[:] = b.data[:]; - return ret; - } - static fvec fmadd(const fvec &a, const fvec &b, const fvec &c) { - fvec ret; ret.data[:] = a.data[:] * b.data[:] + c.data[:]; return ret; - } - static fvec zero() { - return fvec(0.); - } - static bvec cmpeq(const fvec &a, const fvec &b) { - bvec ret; ret.data[:] = a.data[:] == b.data[:]; return ret; - } - static bvec cmpnle(const fvec &a, const fvec &b) { - bvec ret; ret.data[:] = !(a.data[:] <= b.data[:]); return ret; - } - static bvec cmple(const fvec &a, const fvec &b) { - bvec ret; ret.data[:] = a.data[:] <= b.data[:]; return ret; - } - static bvec cmplt(const fvec &a, const fvec &b) { - bvec ret; ret.data[:] = a.data[:] < b.data[:]; return ret; - } - static bvec int_cmpneq(const ivec &a, const ivec &b) { - bvec ret; ret.data[:] = a.data[:] != b.data[:]; return ret; - } - static bvec int_cmplt(const ivec &a, const ivec &b) { - bvec ret; ret.data[:] = a.data[:] < b.data[:]; return ret; - } - static fvec invsqrt(const fvec &a) { - fvec ret; ret.data[:] = ((fscal)1.) / sqrt(a.data[:]); return ret; - } - static fvec sincos(fvec *c, const fvec &a) { - c->data[:] = cos(a.data[:]); - fvec ret; ret.data[:] = sin(a.data[:]); return ret; - } - static fscal reduce_add(const fvec &a) { - return __sec_reduce_add(a.data[:]); - } - static ivec int_mullo(const ivec &a, const ivec &b) { - ivec ret; ret.data[:] = a.data[:] * b.data[:]; return ret; - } - static ivec int_mask_add(const ivec &src, const bvec &mask, const ivec &a, const ivec &b) { - ivec ret = src; - if (mask.data[:]) ret.data[:] = a.data[:] + b.data[:]; - return ret; - } - template - static ivec int_gather(const ivec &from, bvec mask, const ivec &idx, const void *base) { - ivec ret = from; - if (mask.data[:]) ret.data[:] = reinterpret_cast(base)[scale * idx.data[:] / sizeof(int)]; - return ret; - } - static fvec mask_add(const fvec &src, const bvec &mask, const fvec &a, const fvec &b) { - fvec ret = src; - if (mask.data[:]) ret.data[:] = a.data[:] + b.data[:]; - return ret; - } - static void store(void *at, const fvec &a) { - reinterpret_cast(at)[0:VL] = a.data[:]; - } - static void int_store(int *at, const ivec &a) { - reinterpret_cast(at)[0:VL] = a.data[:]; - } - static void mask_store(int *at, const bvec &a) { - at[0:VL] = a.data[:]; - } - static fvec min(const fvec &a, const fvec &b) { - fvec ret = b; - if (a.data[:] < b.data[:]) ret.data[:] = a.data[:]; - return ret; - } - static bool mask_test_at(const bvec &mask, int at) { - return mask.data[at]; - } - static bool mask_testz(const bvec &mask) { - return ! __sec_reduce_or(mask.data[:]); - } - static bvec mask_enable_lower(int n) { - bvec ret; ret.data[:] = __sec_implicit_index(0) < n; return ret; - } - static ivec int_load_vl(const int *a) { - return ivec(a); - } - static void int_clear_arr(int *a) { - a[0:VL] = 0; - } - static bvec full_mask() { - return bvec(1); - } - static void int_print(const ivec &a) { - } -}; - // Mixins to implement mixed precision and single/single and double/double // This one is for single/single and double/double template @@ -2138,7 +1892,7 @@ struct AccumulatorTwiceMixin { }; // For cases where vector_ops::VL == vector_ops::VL -// i.e. scalar & AN + template struct AccumulatorTwiceMixinNone { typedef vector_ops BASE; @@ -2177,11 +1931,8 @@ struct vector_routines : public vector_ops, public template struct vector_routines : public vector_ops, public AccumulatorTwiceMixin {}; -// Specialize for AN and scalar +// Specialize for scalar template<> struct vector_routines : public vector_ops, public AccumulatorTwiceMixinNone {}; -template<> -struct vector_routines : public vector_ops, public AccumulatorTwiceMixinNone {}; - } // namespace lmp_intel From d868271b014177713a2b49c98bcb9a4c2f4fda2a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 28 Sep 2020 07:52:38 -0400 Subject: [PATCH 24/42] remove unneeded escapes from input examples --- doc/src/dump_cfg_uef.rst | 4 ++-- doc/src/dump_image.rst | 6 +++--- doc/src/restart.rst | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/dump_cfg_uef.rst b/doc/src/dump_cfg_uef.rst index 8c6a4937d7..ee027e9347 100644 --- a/doc/src/dump_cfg_uef.rst +++ b/doc/src/dump_cfg_uef.rst @@ -24,8 +24,8 @@ Examples .. code-block:: LAMMPS - dump 1 all cfg/uef 10 dump.\*.cfg mass type xs ys zs - dump 2 all cfg/uef 100 dump.\*.cfg mass type xs ys zs id c_stress + dump 1 all cfg/uef 10 dump.*.cfg mass type xs ys zs + dump 2 all cfg/uef 100 dump.*.cfg mass type xs ys zs id c_stress Description """"""""""" diff --git a/doc/src/dump_image.rst b/doc/src/dump_image.rst index 396f1eeb2d..b22da251ff 100644 --- a/doc/src/dump_image.rst +++ b/doc/src/dump_image.rst @@ -87,9 +87,9 @@ Examples .. code-block:: LAMMPS - dump d0 all image 100 dump.\*.jpg type type - dump d1 mobile image 500 snap.\*.png element element ssao yes 4539 0.6 - dump d2 all image 200 img-\*.ppm type type zoom 2.5 adiam 1.5 size 1280 720 + dump d0 all image 100 dump.*.jpg type type + dump d1 mobile image 500 snap.*.png element element ssao yes 4539 0.6 + dump d2 all image 200 img-*.ppm type type zoom 2.5 adiam 1.5 size 1280 720 dump m0 all movie 1000 movie.mpg type type size 640 480 dump m1 all movie 1000 movie.avi type type size 640 480 dump m2 all movie 100 movie.m4v type type zoom 1.8 adiam v_value size 1280 720 diff --git a/doc/src/restart.rst b/doc/src/restart.rst index e0958d4bb1..1a746a280d 100644 --- a/doc/src/restart.rst +++ b/doc/src/restart.rst @@ -34,7 +34,7 @@ Examples restart 0 restart 1000 poly.restart restart 1000 poly.restart.mpiio - restart 1000 restart.\*.equil + restart 1000 restart.*.equil restart 10000 poly.%.1 poly.%.2 nfile 10 restart v_mystep poly.restart From 405c1b98c5755b67190e97b442338cd20745b5c1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 28 Sep 2020 08:18:00 -0400 Subject: [PATCH 25/42] remove inactive code and documentation for dump image persp option --- doc/src/Errors_messages.rst | 12 ------------ doc/src/dump_image.rst | 26 +++++--------------------- src/dump_image.cpp | 30 +++--------------------------- src/dump_image.h | 20 ++------------------ 4 files changed, 10 insertions(+), 78 deletions(-) diff --git a/doc/src/Errors_messages.rst b/doc/src/Errors_messages.rst index b1b9f38311..aa38b3c0ba 100644 --- a/doc/src/Errors_messages.rst +++ b/doc/src/Errors_messages.rst @@ -3005,9 +3005,6 @@ Doc page with :doc:`WARNING messages ` *Dump image line requires atom style line* Self-explanatory. -*Dump image persp option is not yet supported* - Self-explanatory. - *Dump image requires one snapshot per file* Use a "\*" in the filename. @@ -5108,9 +5105,6 @@ Doc page with :doc:`WARNING messages ` The file produced by dump image cannot be binary and must be for a single processor. -*Invalid dump image persp value* - Persp value must be >= 0.0. - *Invalid dump image theta value* Theta must be between 0.0 and 180.0 inclusive. @@ -8116,9 +8110,6 @@ keyword to allow for additional bonds to be formed *Variable for dump image center is invalid style* Must be an equal-style variable. -*Variable for dump image persp is invalid style* - Must be an equal-style variable. - *Variable for dump image phi is invalid style* Must be an equal-style variable. @@ -8259,9 +8250,6 @@ keyword to allow for additional bonds to be formed *Variable name for dump image center does not exist* Self-explanatory. -*Variable name for dump image persp does not exist* - Self-explanatory. - *Variable name for dump image phi does not exist* Self-explanatory. diff --git a/doc/src/dump_image.rst b/doc/src/dump_image.rst index b22da251ff..3923d5c2dc 100644 --- a/doc/src/dump_image.rst +++ b/doc/src/dump_image.rst @@ -21,7 +21,7 @@ Syntax * color = atom attribute that determines color of each atom * diameter = atom attribute that determines size of each atom * zero or more keyword/value pairs may be appended -* keyword = *atom* or *adiam* or *bond* or *line* or *tri* or *body* or *fix* or *size* or *view* or *center* or *up* or *zoom* or *persp* or *box* or *axes* or *subbox* or *shiny* or *ssao* +* keyword = *atom* or *adiam* or *bond* or *line* or *tri* or *body* or *fix* or *size* or *view* or *center* or *up* or *zoom* or *box* or *axes* or *subbox* or *shiny* or *ssao* .. parsed-literal:: @@ -62,9 +62,6 @@ Syntax *zoom* value = zfactor = size that simulation box appears in image zfactor = scale image size by factor > 1 to enlarge, factor < 1 to shrink zfactor can be a variable (see below) - *persp* value = pfactor = amount of "perspective" in image - pfactor = amount of perspective (0 = none, < 1 = some, > 1 = highly skewed) - pfactor can be a variable (see below) *box* values = yes/no diam = draw outline of simulation box yes/no = do or do not draw simulation box lines diam = diameter of box lines as fraction of shortest box length @@ -426,13 +423,14 @@ i.e. the number of pixels in each direction. ---------- -The *view*\ , *center*\ , *up*\ , *zoom*\ , and *persp* values determine how +The *view*\ , *center*\ , *up*\ , and *zoom* values determine how 3d simulation space is mapped to the 2d plane of the image. Basically they control how the simulation box appears in the image. -All of the *view*\ , *center*\ , *up*\ , *zoom*\ , and *persp* values can be +All of the *view*\ , *center*\ , *up*\ , and *zoom* values can be specified as numeric quantities, whose meaning is explained below. -Any of them can also be specified as an :doc:`equal-style variable `, by using v_name as the value, where "name" is +Any of them can also be specified as an :doc:`equal-style variable `, +by using v_name as the value, where "name" is the variable name. In this case the variable will be evaluated on the timestep each image is created to create a new value. If the equal-style variable is time-dependent, this is a means of changing @@ -483,19 +481,6 @@ image mostly filled by the atoms in the simulation box. A *zfactor* > 1 will make the simulation box larger; a *zfactor* < 1 will make it smaller. *Zfactor* must be a value > 0.0. -The *persp* keyword determines how much depth perspective is present -in the image. Depth perspective makes lines that are parallel in -simulation space appear non-parallel in the image. A *pfactor* value -of 0.0 means that parallel lines will meet at infinity (1.0/pfactor), -which is an orthographic rendering with no perspective. A *pfactor* -value between 0.0 and 1.0 will introduce more perspective. A *pfactor* -value > 1 will create a highly skewed image with a large amount of -perspective. - -.. note:: - - The *persp* keyword is not yet supported as an option. - ---------- The *box* keyword determines if and how the simulation box boundaries @@ -692,7 +677,6 @@ The defaults for the keywords are as follows: * up = 0 0 1 (for 3d) * up = 0 1 0 (for 2d) * zoom = 1.0 -* persp = 0.0 * box = yes 0.02 * axes = no 0.0 0.0 * subbox no 0.0 diff --git a/src/dump_image.cpp b/src/dump_image.cpp index 1362b6a6de..0dc0b9b26d 100644 --- a/src/dump_image.cpp +++ b/src/dump_image.cpp @@ -52,7 +52,7 @@ enum{NO,YES}; DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : DumpCustom(lmp, narg, arg), thetastr(nullptr), phistr(nullptr), cxstr(nullptr), cystr(nullptr), czstr(nullptr), upxstr(nullptr), upystr(nullptr), upzstr(nullptr), - zoomstr(nullptr), perspstr(nullptr), diamtype(nullptr), diamelement(nullptr), + zoomstr(nullptr), diamtype(nullptr), diamelement(nullptr), bdiamtype(nullptr), colortype(nullptr), colorelement(nullptr), bcolortype(nullptr), avec_line(nullptr), avec_tri(nullptr), avec_body(nullptr), fixptr(nullptr), image(nullptr), chooseghost(nullptr), bufcopy(nullptr) @@ -133,7 +133,6 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : upxstr = upystr = upzstr = nullptr; zoomstr = nullptr; - perspstr = nullptr; boxflag = YES; boxdiam = 0.02; axesflag = NO; @@ -305,20 +304,6 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : } iarg += 2; - } else if (strcmp(arg[iarg],"persp") == 0) { - error->all(FLERR,"Dump image persp option is not yet supported"); - if (iarg+2 > narg) error->all(FLERR,"Illegal dump image command"); - if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) { - int n = strlen(&arg[iarg+1][2]) + 1; - perspstr = new char[n]; - strcpy(perspstr,&arg[iarg+1][2]); - } else { - double persp = utils::numeric(FLERR,arg[iarg+1],false,lmp); - if (persp < 0.0) error->all(FLERR,"Illegal dump image command"); - image->persp = persp; - } - iarg += 2; - } else if (strcmp(arg[iarg],"box") == 0) { if (iarg+3 > narg) error->all(FLERR,"Illegal dump image command"); if (strcmp(arg[iarg+1],"yes") == 0) boxflag = YES; @@ -449,7 +434,7 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : viewflag = STATIC; if (thetastr || phistr || cflag == DYNAMIC || - upxstr || upystr || upzstr || zoomstr || perspstr) viewflag = DYNAMIC; + upxstr || upystr || upzstr || zoomstr) viewflag = DYNAMIC; box_bounds(); if (cflag == STATIC) box_center(); @@ -553,13 +538,6 @@ void DumpImage::init_style() if (!input->variable->equalstyle(zoomvar)) error->all(FLERR,"Variable for dump image zoom is invalid style"); } - if (perspstr) { - perspvar = input->variable->find(perspstr); - if (perspvar < 0) - error->all(FLERR,"Variable name for dump image persp does not exist"); - if (!input->variable->equalstyle(perspvar)) - error->all(FLERR,"Variable for dump image persp is invalid style"); - } // set up type -> element mapping @@ -719,12 +697,10 @@ void DumpImage::view_params() if (upystr) image->up[1] = input->variable->compute_equal(upyvar); if (upzstr) image->up[2] = input->variable->compute_equal(upzvar); - // zoom and perspective + // zoom if (zoomstr) image->zoom = input->variable->compute_equal(zoomvar); if (image->zoom <= 0.0) error->all(FLERR,"Invalid dump image zoom value"); - if (perspstr) image->persp = input->variable->compute_equal(perspvar); - if (image->persp < 0.0) error->all(FLERR,"Invalid dump image persp value"); // remainder of view setup is internal to Image class diff --git a/src/dump_image.h b/src/dump_image.h index 4faf558b1a..fb560e252d 100644 --- a/src/dump_image.h +++ b/src/dump_image.h @@ -67,8 +67,8 @@ class DumpImage : public DumpCustom { int cxvar,cyvar,czvar; // index to box center vars char *upxstr,*upystr,*upzstr; // view up vector variables int upxvar,upyvar,upzvar; // index to up vector vars - char *zoomstr,*perspstr; // view zoom and perspective variables - int zoomvar,perspvar; // index to zoom,persp vars + char *zoomstr; // view zoom variable name + int zoomvar; // index to zoom variable int boxflag,axesflag; // 0/1 for draw box and axes double boxdiam,axeslen,axesdiam; // params for drawing box and axes int subboxflag; @@ -136,10 +136,6 @@ E: Invalid dump image theta value Theta must be between 0.0 and 180.0 inclusive. -E: Dump image persp option is not yet supported - -Self-explanatory. - E: Dump image line requires atom style line Self-explanatory. @@ -196,14 +192,6 @@ E: Variable for dump image zoom is invalid style Must be an equal-style variable. -E: Variable name for dump image persp does not exist - -Self-explanatory. - -E: Variable for dump image persp is invalid style - -Must be an equal-style variable. - E: Invalid dump image element name The specified element name was not in the standard list of elements. @@ -218,10 +206,6 @@ E: Invalid dump image zoom value Zoom value must be > 0.0. -E: Invalid dump image persp value - -Persp value must be >= 0.0. - E: Invalid color in dump_modify command The specified color name was not in the list of recognized colors. From 25bda86ad0941c294fb66389d2db00bfaed9efc6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 28 Sep 2020 12:52:32 -0400 Subject: [PATCH 26/42] fix typo --- src/omp_compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/omp_compat.h b/src/omp_compat.h index 340bbca204..366dd9371c 100644 --- a/src/omp_compat.h +++ b/src/omp_compat.h @@ -38,7 +38,7 @@ # define LAMMPS_OMP_COMPAT 4 # endif # elif defined(__GNUC__) -# if __GNUC__ >= 0 +# if __GNUC__ >= 9 # define LAMMPS_OMP_COMPAT 4 # endif # endif From 54c4b95c4df24b4d0cbc24fa7f3fe7ce3c89139a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 28 Sep 2020 14:09:03 -0400 Subject: [PATCH 27/42] small format tweak --- doc/src/compute_centro_atom.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/compute_centro_atom.rst b/doc/src/compute_centro_atom.rst index 489b7845ce..b250634b5c 100644 --- a/doc/src/compute_centro_atom.rst +++ b/doc/src/compute_centro_atom.rst @@ -133,7 +133,7 @@ simulation into gold (FCC). These were provided by Jon Zimmerman Stacking faults ~ 5.0 (4.0 to 6.0) Free surface ~ 23.0 -These values are \*not\* normalized by the square of the lattice +These values are **not** normalized by the square of the lattice parameter. If they were, normalized values would be: .. parsed-literal:: From 0ed935ab76d74e38aea0300c778ca2d2ed6718e5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 29 Sep 2020 11:19:12 -0400 Subject: [PATCH 28/42] silence compiler warning on windows --- tools/msi2lmp/src/msi2lmp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/msi2lmp/src/msi2lmp.c b/tools/msi2lmp/src/msi2lmp.c index b5e9a96293..4e519855f3 100644 --- a/tools/msi2lmp/src/msi2lmp.c +++ b/tools/msi2lmp/src/msi2lmp.c @@ -152,6 +152,10 @@ #include #include +#ifdef _WIN32 +#include +#endif + /* global variables */ char *rootname; From e4cfb9116997703e97f21d7ee038ba8ccb2193bd Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 29 Sep 2020 16:57:19 -0400 Subject: [PATCH 29/42] discuss that USER-MESONT package potentials are not bundled and provide URL --- doc/src/pair_mesocnt.rst | 7 +++++-- doc/src/pair_mesont_tpm.rst | 15 ++++++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/doc/src/pair_mesocnt.rst b/doc/src/pair_mesocnt.rst index e6164943f3..90b6644fd9 100644 --- a/doc/src/pair_mesocnt.rst +++ b/doc/src/pair_mesocnt.rst @@ -77,8 +77,11 @@ boron nitride nanotubes. .. note:: - LAMMPS comes with one *mesocnt* style potential file - where the default number of data points per table is 1001. + Because of their size, *mesocnt* style potential files + are not bundled with LAMMPS. When compiling LAMMPS from + source code, the file ``C_10_10.mesocnt`` should be downloaded + transparently from `https://download.lammps.org/potentials/C_10_10.mesocnt `_ + This file has as number of data points per table 1001. This is sufficient for NVT simulations. For proper energy conservation, we recommend using a potential file where the resolution for Phi is at least 2001 data points. diff --git a/doc/src/pair_mesont_tpm.rst b/doc/src/pair_mesont_tpm.rst index e26f16fba3..d698dddd92 100644 --- a/doc/src/pair_mesont_tpm.rst +++ b/doc/src/pair_mesont_tpm.rst @@ -147,12 +147,17 @@ where L is the maximum segment length, R is the maximum tube radius, and segments. Because of the use of extended chain concept at CNT ends, the recommended cutoff is 3L. -The MESONT-TABTP_10_10.xrs potential file provided with LAMMPS (see the -potentials directory) is parameterized for metal :doc:`units `. +.. note:: + + Because of their size, *mesont* style potential files + are not bundled with LAMMPS. When compiling LAMMPS from + source code, the file ``TABTP_10_10.mesont`` should be downloaded + transparently from `https://download.lammps.org/potentials/TABTP_10_10.mesont `_ + +The ``TABTP_10_10.mesont`` potential file is parameterized for metal :doc:`units `. You can use the carbon nanotube mesoscopic force field with any LAMMPS units, -but you would need to create your own TPMSSTP.xrs and TPMA.xrs potential files -with coefficients listed in appropriate units, if your simulation -does not use "metal" units. +but you would need to create your own potential files with coefficients listed in +appropriate units, if your simulation does not use "metal" units. The chirality parameters set during system generation must match the values specified during generation of the potential tables. From 555fba1e4bb5559079b3572ffd09f6bfbd20fe60 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 29 Sep 2020 18:46:32 -0400 Subject: [PATCH 30/42] add special case for windows installer package where the .dll file is in the bin folder --- python/lammps.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/lammps.py b/python/lammps.py index 6f9cf5031d..e3c8f7f61c 100644 --- a/python/lammps.py +++ b/python/lammps.py @@ -169,6 +169,8 @@ class lammps(object): # determine module file location modpath = dirname(abspath(getsourcefile(lambda:0))) + # for windows installers the shared library is in a different folder + winpath = abspath(os.path.join(modpath,'..','bin')) self.lib = None self.lmp = None @@ -197,6 +199,10 @@ class lammps(object): elif any([f.startswith('liblammps') and f.endswith('.dll') for f in os.listdir(modpath)]): lib_ext = ".dll" + elif any([f.startswith('liblammps') and f.endswith('.dll') + for f in os.listdir(winpath)]): + lib_ext = ".dll" + modpath = winpath else: lib_ext = ".so" From d84300a3ac87f74a6612ec454071a63b28dcb4b7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 30 Sep 2020 00:05:15 -0400 Subject: [PATCH 31/42] do not fail when looking for gzip or ffmpeg executables when cross compiling to windows --- cmake/CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index d9887925ec..0d041b2aa9 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -343,20 +343,22 @@ find_program(GZIP_EXECUTABLE gzip) find_package_handle_standard_args(GZIP REQUIRED_VARS GZIP_EXECUTABLE) option(WITH_GZIP "Enable GZIP support" ${GZIP_FOUND}) if(WITH_GZIP) - if(NOT GZIP_FOUND) + if(GZIP_FOUND OR ((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING)) + target_compile_definitions(lammps PRIVATE -DLAMMPS_GZIP) + else() message(FATAL_ERROR "gzip executable not found") endif() - target_compile_definitions(lammps PRIVATE -DLAMMPS_GZIP) endif() find_program(FFMPEG_EXECUTABLE ffmpeg) find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_EXECUTABLE) option(WITH_FFMPEG "Enable FFMPEG support" ${FFMPEG_FOUND}) if(WITH_FFMPEG) - if(NOT FFMPEG_FOUND) + if(FFMPEG_FOUND OR ((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING)) + target_compile_definitions(lammps PRIVATE -DLAMMPS_FFMPEG) + else() message(FATAL_ERROR "ffmpeg executable not found") endif() - target_compile_definitions(lammps PRIVATE -DLAMMPS_FFMPEG) endif() if(BUILD_SHARED_LIBS) From 23279836c96cd4fc19d5d61d22629f64e38a9280 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Wed, 30 Sep 2020 09:10:40 -0400 Subject: [PATCH 32/42] Invalidate pointer after deallocation --- src/math_eigen_impl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/math_eigen_impl.h b/src/math_eigen_impl.h index daef0e7052..80502b1701 100644 --- a/src/math_eigen_impl.h +++ b/src/math_eigen_impl.h @@ -850,6 +850,7 @@ Dealloc() { //assert(! is_preallocated); Dealloc2D(&M); delete[] max_idx_row; + max_idx_row = nullptr; Init(); } From cbc529881c9dcf737bff75ab8bfb29895b54f8e2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 30 Sep 2020 14:07:46 -0400 Subject: [PATCH 33/42] support hybrid atom styles in in fix propel/self --- src/USER-MISC/fix_propel_self.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-MISC/fix_propel_self.cpp b/src/USER-MISC/fix_propel_self.cpp index 02a55599db..34fcfaeee1 100644 --- a/src/USER-MISC/fix_propel_self.cpp +++ b/src/USER-MISC/fix_propel_self.cpp @@ -160,13 +160,13 @@ template void FixPropelSelf::post_force_quaternion(int /* vflag */ ) { double **f = atom->f; - AtomVecEllipsoid *av = static_cast(atom->avec); int *mask = atom->mask; int nlocal = atom->nlocal; int *type = atom->type; int* ellipsoid = atom->ellipsoid; + AtomVecEllipsoid *av = static_cast(atom->style_match("ellipsoid")); AtomVecEllipsoid::Bonus *bonus = av->bonus; // Add the active force to the atom force: From 4b71e1cbdac9d505a629ea36b95c0a700087e33f Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 30 Sep 2020 15:37:11 -0600 Subject: [PATCH 34/42] initial library doc page edits --- doc/src/Library.rst | 52 +++++++++++++++++----------------- doc/src/Library_create.rst | 25 ++++++++-------- doc/src/Library_execute.rst | 24 ++++++++-------- doc/src/Library_properties.rst | 28 ++++++++++-------- 4 files changed, 67 insertions(+), 62 deletions(-) diff --git a/doc/src/Library.rst b/doc/src/Library.rst index 8222fc7172..1a12ed134b 100644 --- a/doc/src/Library.rst +++ b/doc/src/Library.rst @@ -9,15 +9,15 @@ script `. Even the LAMMPS standalone executable is essentially a thin wrapper on top of the LAMMPS library, creating a LAMMPS instance, processing input and then existing. -Several of these approaches are based on C language wrapper functions -in the files ``src/library.h`` and ``src/library.cpp``, but it is also -possible to use C++ directly. The basic procedure is always the same: -you create one or more instances of the -:cpp:class:`LAMMPS ` and then pass commands as -strings or from files to that LAMMPS instance to execute calculations, -or read, manipulate, and update data from the active class instances -inside the LAMMPS to do analysis or perform operations that are not -possible with existing commands. +Most of the APIs described below are based on C language wrapper +functions in the files ``src/library.h`` and ``src/library.cpp``, but +it is also possible to use C++ directly. The basic procedure is +always the same: you create one or more instances of +:cpp:class:`LAMMPS `, pass commands as strings or +from files to that LAMMPS instance to execute calculations, and/or +call functions that read, manipulate, and update data from the active +class instances inside LAMMPS to do analysis or perform operations +that are not possible with existing input script commands. .. _thread-safety: @@ -36,13 +36,13 @@ possible with existing commands. Another major issue to deal with is to correctly handle MPI. Creating a LAMMPS instance requires passing an MPI communicator, or it assumes the ``MPI_COMM_WORLD`` communicator, which spans all MPI - processor ranks. When creating multiple LAMMPS object instances from - different threads, this communicator has to be different for each - thread or else collisions can happen. or it has to be guaranteed, - that only one thread at a time is active. MPI communicators, - however, are not a problem, if LAMMPS is compiled with the MPI STUBS - library, which implies that there is no MPI communication and only 1 - MPI rank. + processor ranks. When creating multiple LAMMPS object instances + from different threads, this communicator has to be different for + each thread or else collisions can happen. Or it has to be + guaranteed, that only one thread at a time is active. MPI + communicators, however, are not a problem, if LAMMPS is compiled + with the MPI STUBS library, which implies that there is no MPI + communication and only 1 MPI rank. ---------- @@ -51,7 +51,7 @@ possible with existing commands. LAMMPS C Library API ==================== -The C library interface is most commonly used path to manage LAMMPS +The C library interface is the most commonly used path to manage LAMMPS instances from a compiled code and it is the basis for the :doc:`Python ` and :doc:`Fortran ` modules. Almost all functions of the C language API require an argument containing a @@ -64,7 +64,7 @@ library interface. This usually must be the header from the same MPI library as the LAMMPS library was compiled with. The exception is when LAMMPS was compiled in serial mode using the ``STUBS`` MPI library. In that case the calling code may be compiled with a different MPI library -for as long as :cpp:func:`lammps_open_no_mpi` is called to create a +so long as :cpp:func:`lammps_open_no_mpi` is called to create a LAMMPS instance. Then you may set the define ``-DLAMMPS_LIB_NO_MPI`` when compiling your code and the inclusion of ``mpi.h`` will be skipped and consequently the function :cpp:func:`lammps_open` may not be used. @@ -72,7 +72,7 @@ and consequently the function :cpp:func:`lammps_open` may not be used. .. admonition:: Errors versus exceptions :class: note - If any of the function calls in the LAMMPS library API will trigger + If any of the function calls in the LAMMPS library API trigger an error inside LAMMPS, this will result in an abort of the entire program. This is not always desirable. Instead, LAMMPS can be compiled to instead :ref:`throw a C++ exception `. @@ -81,7 +81,7 @@ and consequently the function :cpp:func:`lammps_open` may not be used. No checks are made on the arguments of the function calls of the C library interface. *All* function arguments must be non-NULL unless - *explicitly* allowed and point to consistent and valid data. Buffers + *explicitly* allowed, and msut point to consistent and valid data. Buffers for storing returned data must be allocated to a suitable size. Passing invalid or unsuitable information will likely cause crashes or corrupt data. @@ -113,10 +113,10 @@ Python by dynamically loading functions in the LAMMPS shared library through the `Python ctypes module `_. Because of the dynamic loading, it is **required** that LAMMPS is compiled in :ref:`"shared" mode `. The Python interface is object oriented, but -otherwise trying to be very similar to the C library API. Three different +otherwise tries to be very similar to the C library API. Three different Python classes to run LAMMPS are available and they build on each other. More information on this is in the :doc:`Python_head` -section of the manual and for using the LAMMPS Python modules is in +section of the manual. Use of the LAMMPS Python module is described in :doc:`Python_module`. ------------------- @@ -127,8 +127,8 @@ LAMMPS Fortran API ================== The LAMMPS Fortran module is a wrapper around calling functions from the -LAMMPS C library API from Fortran through the ISO_C_BINDING feature in -Fortran 2003. The interface is object oriented but otherwise trying to +LAMMPS C library API. This is done using the ISO_C_BINDING feature in +Fortran 2003. The interface is object oriented but otherwise tries to be very similar to the C library API and the basic Python module. .. toctree:: @@ -144,8 +144,8 @@ LAMMPS C++ API ============== It is also possible to invoke the LAMMPS C++ API directly in your code. -It is lacking some of the convenience of the C library API, but it allows -a more direct access to simulation data and thus more low-level manipulations. +It lacks some of the convenience of the C library API, but it allows +more direct access to simulation data and thus more low-level manipulations. The following links provide some examples and references to the C++ API. .. toctree:: diff --git a/doc/src/Library_create.rst b/doc/src/Library_create.rst index f8a8fb7829..a30b3c6e02 100644 --- a/doc/src/Library_create.rst +++ b/doc/src/Library_create.rst @@ -3,9 +3,9 @@ Creating or deleting a LAMMPS object The :cpp:func:`lammps_open` and :cpp:func:`lammps_open_no_mpi` functions are used to create and initialize a -:cpp:func:`LAMMPS` instance. The calling program has to -provide a handle where a reference to this instance can be stored and -which has to be used in all subsequent function calls until that +:cpp:func:`LAMMPS` instance. The calling program provides +a handle where a reference to this instance can be stored and +which is then used in all subsequent function calls until that instance is destroyed by calling :cpp:func:`lammps_close`. Here is a simple example demonstrating its use: @@ -39,9 +39,9 @@ Here is a simple example demonstrating its use: return 0; } -The LAMMPS library will be using the MPI library it was compiled with +The LAMMPS library uses the MPI library it was compiled with and will either run on all processors in the ``MPI_COMM_WORLD`` -communicator or on the set of processors in the communicator given in +communicator or on the set of processors in the communicator passed as the ``comm`` argument of :cpp:func:`lammps_open`. This means the calling code can run LAMMPS on all or a subset of processors. For example, a wrapper code might decide to alternate between LAMMPS and @@ -55,13 +55,14 @@ concurrently on split communicators, or run them one after the other. The :cpp:func:`lammps_open` function may be called multiple times for this latter purpose. -The :cpp:func:`lammps_close` function is used to shut down -the :cpp:class:`LAMMPS ` class pointed to by the handle -passed as an argument and free all its memory. This has to be called for -every instance created with any of the :cpp:func:`lammps_open` functions. It will, however, **not** call -``MPI_Finalize()``, since that may only be called once. See -:cpp:func:`lammps_mpi_finalize` for an alternative to calling -``MPI_Finalize()`` explicitly in the calling program. +The :cpp:func:`lammps_close` function is used to shut down the +:cpp:class:`LAMMPS ` class pointed to by the handle +passed as an argument and free all its memory. This has to be called +for every instance created with one of the :cpp:func:`lammps_open` +functions. It will, however, **not** call ``MPI_Finalize()``, since +that may only be called once. See :cpp:func:`lammps_mpi_finalize` for +an alternative to invoking ``MPI_Finalize()`` explicitly from the +calling program. The :cpp:func:`lammps_free` function is a clean-up function to free memory that the library allocated previously diff --git a/doc/src/Library_execute.rst b/doc/src/Library_execute.rst index 3e79cb3cb4..77e7c13f70 100644 --- a/doc/src/Library_execute.rst +++ b/doc/src/Library_execute.rst @@ -7,19 +7,19 @@ LAMMPS commands like in an input file. This can be done through reading a file or passing single commands or lists of commands or blocks of commands with the following functions. -Via these functions, the calling code can have the LAMMPS instance act -on a series of :doc:`input file commands ` that are either -read from a file or passed as strings. This for, for example, allows to -setup a problem from a template file and then run it in stages while -performing other operations in between or concurrently. The caller can -interleave the LAMMPS function calls with operations it performs, calls -to extract information from or set information within LAMMPS, or calls -to another code's library. +Via these functions, the calling code can have LAMMPS act on a series +of :doc:`input file commands ` that are either read from +a file or passed as strings. For example, this allows setup of a +problem from an input script, and then running it in stages while +performing other operations in between or concurrently. The caller +can interleave the LAMMPS function calls with operations it performs, +such as calls to extract information from or set information within +LAMMPS, or calls to another code's library. -Also equivalent to regular :doc:`input script parsing ` -is the handling of comments and expansion of variables with ``${name}`` -or ``$(expression)`` syntax before the commands are parsed and -executed. Below is a short example using some of these functions. +Just as with :doc:`input script parsing ` comments can +be included in the file or strings, and expansion of variables with +``${name}`` or ``$(expression)`` syntax is performed. +Below is a short example using some of these functions. .. code-block:: C diff --git a/doc/src/Library_properties.rst b/doc/src/Library_properties.rst index bf36dcb8b1..84b3fc7b8f 100644 --- a/doc/src/Library_properties.rst +++ b/doc/src/Library_properties.rst @@ -1,18 +1,22 @@ Retrieving or setting LAMMPS system properties ============================================== -The library interface allows to extract different kinds of information -about the active simulation instance and also to modify some of it. -This enables combining MD simulation steps with other processing and -simulation methods computed in the calling code or another code that is -coupled to LAMMPS via the library interface. In some cases the data -returned is direct reference to the original data inside LAMMPS cast -to a void pointer. In that case the data needs to be cast to a suitable -pointer to be able to access it, and you need to know the correct dimensions -and lengths. When accessing per-atom data, please note that this data -is the per-processor **local** data and indexed accordingly. These arrays -can change sizes and order at every neighbor list rebuild and atom sort -event as atoms are migrating between sub-domains. +The library interface allows extraction of different kinds of +information about the active simulation instance and also +modifications to it. This enables combining of a LAMMPS simulation +with other processing and simulation methods computed by the calling +code, or by another code that is coupled to LAMMPS via the library +interface. In some cases the data returned is direct reference to the +original data inside LAMMPS, cast to a void pointer. In that case the +data needs to be cast to a suitable pointer for the calling program to +access it, and you may need to know the correct dimensions and +lengths. This also means you can directly change those value(s) from +the calling program, e.g. to modify atom positions. Of course, this +should be done with care. When accessing per-atom data, please note +that this data is the per-processor **local** data and is indexed +accordingly. Per-atom data can change sizes and ordering at every +neighbor list rebuild or atom sort event as atoms migrate between +sub-domains and processors. .. code-block:: C From 38d954e0383b5dccde00bd0104a082fe1680e74b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 30 Sep 2020 19:54:07 -0400 Subject: [PATCH 35/42] Update the text to mention returning the handle instead of passing it as an argument. --- doc/src/Library_create.rst | 43 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/doc/src/Library_create.rst b/doc/src/Library_create.rst index a30b3c6e02..3c3b9da22f 100644 --- a/doc/src/Library_create.rst +++ b/doc/src/Library_create.rst @@ -1,13 +1,12 @@ Creating or deleting a LAMMPS object ==================================== -The :cpp:func:`lammps_open` and :cpp:func:`lammps_open_no_mpi` -functions are used to create and initialize a -:cpp:func:`LAMMPS` instance. The calling program provides -a handle where a reference to this instance can be stored and -which is then used in all subsequent function calls until that -instance is destroyed by calling :cpp:func:`lammps_close`. -Here is a simple example demonstrating its use: +The :cpp:func:`lammps_open` and :cpp:func:`lammps_open_no_mpi` functions +are used to create and initialize a :cpp:func:`LAMMPS` instance. They +return a reference to this instance as a ``void *`` pointer to be used +as the "handle" argument in subsequent function calls until that +instance is destroyed by calling :cpp:func:`lammps_close`. Here is a +simple example demonstrating its use: .. code-block:: C @@ -39,21 +38,21 @@ Here is a simple example demonstrating its use: return 0; } -The LAMMPS library uses the MPI library it was compiled with -and will either run on all processors in the ``MPI_COMM_WORLD`` -communicator or on the set of processors in the communicator passed as -the ``comm`` argument of :cpp:func:`lammps_open`. This means -the calling code can run LAMMPS on all or a subset of processors. For -example, a wrapper code might decide to alternate between LAMMPS and -another code, allowing them both to run on all the processors. Or it -might allocate part of the processors to LAMMPS and the rest to the -other code by creating a custom communicator with ``MPI_Comm_split()`` -and running both codes concurrently before syncing them up periodically. -Or it might instantiate multiple instances of LAMMPS to perform -different calculations and either alternate between them, run them -concurrently on split communicators, or run them one after the other. -The :cpp:func:`lammps_open` function may be called multiple -times for this latter purpose. +The LAMMPS library uses the MPI library it was compiled with and will +either run on all processors in the ``MPI_COMM_WORLD`` communicator or +on the set of processors in the communicator passed as the ``comm`` +argument of :cpp:func:`lammps_open`. This means the calling code can +run LAMMPS on all or a subset of processors. For example, a wrapper +code might decide to alternate between LAMMPS and another code, allowing +them both to run on all the processors. Or it might allocate part of +the processors to LAMMPS and the rest to the other code by creating a +custom communicator with ``MPI_Comm_split()`` and running both codes +concurrently before syncing them up periodically. Or it might +instantiate multiple instances of LAMMPS to perform different +calculations and either alternate between them, run them concurrently on +split communicators, or run them one after the other. The +:cpp:func:`lammps_open` function may be called multiple times for this +latter purpose. The :cpp:func:`lammps_close` function is used to shut down the :cpp:class:`LAMMPS ` class pointed to by the handle From dc13a61b4002bd7852aa019f735f704db430d4a0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 30 Sep 2020 20:00:53 -0400 Subject: [PATCH 36/42] fix spelling --- doc/src/Build_basics.rst | 2 +- doc/src/Library.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/Build_basics.rst b/doc/src/Build_basics.rst index d364382591..87863e3042 100644 --- a/doc/src/Build_basics.rst +++ b/doc/src/Build_basics.rst @@ -162,7 +162,7 @@ with compiler versions in use. If compilation with OpenMP enabled fails because of your compiler requiring strict OpenMP 4.0 semantics, you can change the behavior by adding ``-D LAMMPS_OMP_COMPAT=4`` to the ``LMP_INC`` variable in your makefile, or add it to the command line -while configuring with CMake. LAMMPS will autodetect a suitable setting +while configuring with CMake. LAMMPS will auto-detect a suitable setting for most GNU, Clang, and Intel compilers. ---------- diff --git a/doc/src/Library.rst b/doc/src/Library.rst index 1a12ed134b..8096980a32 100644 --- a/doc/src/Library.rst +++ b/doc/src/Library.rst @@ -81,7 +81,7 @@ and consequently the function :cpp:func:`lammps_open` may not be used. No checks are made on the arguments of the function calls of the C library interface. *All* function arguments must be non-NULL unless - *explicitly* allowed, and msut point to consistent and valid data. Buffers + *explicitly* allowed, and must point to consistent and valid data. Buffers for storing returned data must be allocated to a suitable size. Passing invalid or unsuitable information will likely cause crashes or corrupt data. From 77fb2ee311f2b51c7d7c3500d4a84c80d6ec8e0d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 30 Sep 2020 21:16:48 -0400 Subject: [PATCH 37/42] add list of documented functions at the top of the C-Library doc pages --- doc/src/Library_config.rst | 17 +++++++++++++++ doc/src/Library_create.rst | 12 +++++++++++ doc/src/Library_execute.rst | 9 ++++++++ doc/src/Library_neighbor.rst | 8 ++++++- doc/src/Library_objects.rst | 7 ++++++- doc/src/Library_properties.rst | 18 ++++++++++++++++ doc/src/Library_scatter.rst | 38 ++++++++++++++++++++++++++++++++++ doc/src/Library_utility.rst | 20 +++++++++++++++++- 8 files changed, 126 insertions(+), 3 deletions(-) diff --git a/doc/src/Library_config.rst b/doc/src/Library_config.rst index d33afe3b5b..0c07896ff6 100644 --- a/doc/src/Library_config.rst +++ b/doc/src/Library_config.rst @@ -1,6 +1,23 @@ Retrieving LAMMPS configuration information =========================================== +This section documents the following functions: + +- :cpp:func:`lammps_config_has_mpi_support` +- :cpp:func:`lammps_config_has_gzip_support` +- :cpp:func:`lammps_config_has_png_support` +- :cpp:func:`lammps_config_has_jpeg_support` +- :cpp:func:`lammps_config_has_ffmpeg_support` +- :cpp:func:`lammps_config_has_exceptions` +- :cpp:func:`lammps_config_has_package` +- :cpp:func:`lammps_config_package_count` +- :cpp:func:`lammps_config_package_name` +- :cpp:func:`lammps_has_style` +- :cpp:func:`lammps_style_count` +- :cpp:func:`lammps_style_name` + +-------------------- + The following library functions can be used to query the LAMMPS library about compile time settings and included packages and styles. This enables programs that use the library interface to run LAMMPS diff --git a/doc/src/Library_create.rst b/doc/src/Library_create.rst index 3c3b9da22f..7303c499d1 100644 --- a/doc/src/Library_create.rst +++ b/doc/src/Library_create.rst @@ -1,6 +1,18 @@ Creating or deleting a LAMMPS object ==================================== +This section documents the following functions: + +- :cpp:func:`lammps_open` +- :cpp:func:`lammps_open_no_mpi` +- :cpp:func:`lammps_open_fortran` +- :cpp:func:`lammps_close` +- :cpp:func:`lammps_mpi_init` +- :cpp:func:`lammps_mpi_finalize` +- :cpp:func:`lammps_free` + +-------------------- + The :cpp:func:`lammps_open` and :cpp:func:`lammps_open_no_mpi` functions are used to create and initialize a :cpp:func:`LAMMPS` instance. They return a reference to this instance as a ``void *`` pointer to be used diff --git a/doc/src/Library_execute.rst b/doc/src/Library_execute.rst index 77e7c13f70..b6bcab2ead 100644 --- a/doc/src/Library_execute.rst +++ b/doc/src/Library_execute.rst @@ -1,6 +1,15 @@ Executing LAMMPS commands ========================= +This section documents the following functions: + +- :cpp:func:`lammps_file` +- :cpp:func:`lammps_command` +- :cpp:func:`lammps_commands_list` +- :cpp:func:`lammps_commands_string` + +-------------------- + Once a LAMMPS instance is created, there are multiple ways to "drive" a simulation. In most cases it is easiest to process single or multiple LAMMPS commands like in an input file. This can be done through reading diff --git a/doc/src/Library_neighbor.rst b/doc/src/Library_neighbor.rst index b004e85d0e..3179b669f1 100644 --- a/doc/src/Library_neighbor.rst +++ b/doc/src/Library_neighbor.rst @@ -2,7 +2,13 @@ Accessing LAMMPS Neighbor lists =============================== The following functions allow to access neighbor lists -generated by LAMMPS or query their properties. +generated by LAMMPS or query their properties: + +- :cpp:func:`lammps_find_compute_neighlist` +- :cpp:func:`lammps_find_fix_neighlist` +- :cpp:func:`lammps_find_pair_neighlist` +- :cpp:func:`lammps_neighlist_num_elements` +- :cpp:func:`lammps_neighlist_element_neighbors` ----------------------- diff --git a/doc/src/Library_objects.rst b/doc/src/Library_objects.rst index 301511b848..3b87842169 100644 --- a/doc/src/Library_objects.rst +++ b/doc/src/Library_objects.rst @@ -2,7 +2,12 @@ Retrieving or setting properties of LAMMPS objects ================================================== This section documents accessing or modifying data from objects like -computes, fixes, or variables in LAMMPS. +computes, fixes, or variables in LAMMPS using following functions: + +- :cpp:func:`lammps_extract_compute` +- :cpp:func:`lammps_extract_fix` +- :cpp:func:`lammps_extract_variable` +- :cpp:func:`lammps_set_variable` ----------------------- diff --git a/doc/src/Library_properties.rst b/doc/src/Library_properties.rst index 3e43a80600..e53a3caa0d 100644 --- a/doc/src/Library_properties.rst +++ b/doc/src/Library_properties.rst @@ -1,6 +1,24 @@ Retrieving or setting LAMMPS system properties ============================================== +This section documents the following functions: + +- :cpp:func:`lammps_version` +- :cpp:func:`lammps_memory_usage` +- :cpp:func:`lammps_get_mpi_comm` +- :cpp:func:`lammps_get_natoms` +- :cpp:func:`lammps_get_thermo` +- :cpp:func:`lammps_extract_box` +- :cpp:func:`lammps_reset_box` +- :cpp:func:`lammps_extract_setting` +- :cpp:func:`lammps_extract_global_datatype` +- :cpp:func:`lammps_extract_global` +- :cpp:func:`lammps_extract_atom_datatype` +- :cpp:func:`lammps_extract_atom` +- :cpp:func:`lammps_create_atoms` + +-------------------- + The library interface allows extraction of different kinds of information about the active simulation instance and also modifications to it. This enables combining of a LAMMPS simulation diff --git a/doc/src/Library_scatter.rst b/doc/src/Library_scatter.rst index 5865d22349..e3ca34e999 100644 --- a/doc/src/Library_scatter.rst +++ b/doc/src/Library_scatter.rst @@ -1,6 +1,19 @@ Library functions for scatter/gather operations ================================================ +This section documents the following functions: + +- :cpp:func:`lammps_gather_atoms` +- :cpp:func:`lammps_gather_atoms_concat` +- :cpp:func:`lammps_gather_atoms_subset` +- :cpp:func:`lammps_scatter_atoms` +- :cpp:func:`lammps_scatter_atoms_subset` +- :cpp:func:`lammps_gather` +- :cpp:func:`lammps_gather_concat` +- :cpp:func:`lammps_gather_subset` +- :cpp:func:`lammps_scatter` +- :cpp:func:`lammps_scatter_subset` + .. TODO add description ----------------------- @@ -27,3 +40,28 @@ Library functions for scatter/gather operations .. doxygenfunction:: lammps_scatter_atoms_subset :project: progguide + +----------------------- + +.. doxygenfunction:: lammps_gather + :project: progguide + +----------------------- + +.. doxygenfunction:: lammps_gather_concat + :project: progguide + +----------------------- + +.. doxygenfunction:: lammps_gather_subset + :project: progguide + +----------------------- + +.. doxygenfunction:: lammps_scatter + :project: progguide + +----------------------- + +.. doxygenfunction:: lammps_scatter_subset + :project: progguide diff --git a/doc/src/Library_utility.rst b/doc/src/Library_utility.rst index 8eda4e4988..3d2fae53d3 100644 --- a/doc/src/Library_utility.rst +++ b/doc/src/Library_utility.rst @@ -2,7 +2,15 @@ Library interface utility functions =================================== To simplify some of the tasks, the library interface contains -some utility functions that are not directly calling LAMMPS. +some utility functions that are not directly calling LAMMPS: + +- :cpp:func:`lammps_encode_image_flags` +- :cpp:func:`lammps_decode_image_flags` +- :cpp:func:`lammps_set_fix_external_callback` +- :cpp:func:`lammps_fix_external_set_energy_global` +- :cpp:func:`lammps_fix_external_set_virial_global` +- :cpp:func:`lammps_has_error` +- :cpp:func:`lammps_get_last_error_message` ----------------------- @@ -21,6 +29,16 @@ some utility functions that are not directly calling LAMMPS. ----------------------- +.. doxygenfunction:: lammps_fix_external_set_energy_global + :project: progguide + +----------------------- + +.. doxygenfunction:: lammps_fix_external_set_virial_global + :project: progguide + +----------------------- + .. doxygenfunction:: lammps_has_error :project: progguide From a79a7b270499069117ee5924096739a5344c4b3f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 30 Sep 2020 21:24:55 -0400 Subject: [PATCH 38/42] fix typo reported on lammps-users --- src/library.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library.cpp b/src/library.cpp index da9ece326e..90a71beb0c 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -4252,7 +4252,7 @@ int lammps_find_compute_neighlist(void* handle, char * id, int request) { } } - if (compute == nullptr) { + if (compute != nullptr) { // find neigh list for (int i = 0; i < lmp->neighbor->nlist; i++) { NeighList * list = lmp->neighbor->lists[i]; From fb33a71720e3ba8aac2a0bd915cb66c3c4576acb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 1 Oct 2020 00:34:03 -0400 Subject: [PATCH 39/42] look for liblammps.dll in windows binary dir only if that directory exists --- python/lammps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/lammps.py b/python/lammps.py index e3c8f7f61c..59f2dce012 100644 --- a/python/lammps.py +++ b/python/lammps.py @@ -199,8 +199,8 @@ class lammps(object): elif any([f.startswith('liblammps') and f.endswith('.dll') for f in os.listdir(modpath)]): lib_ext = ".dll" - elif any([f.startswith('liblammps') and f.endswith('.dll') - for f in os.listdir(winpath)]): + elif os.path.exists(winpath) and any([f.startswith('liblammps') and f.endswith('.dll') + for f in os.listdir(winpath)]): lib_ext = ".dll" modpath = winpath else: From 9efcaf2d61cae7f98b96d01cd4cd73fb93371273 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 1 Oct 2020 00:57:53 -0400 Subject: [PATCH 40/42] update documentation for Windows installer --- doc/src/Install_windows.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/src/Install_windows.rst b/doc/src/Install_windows.rst index 548f67e484..ac1e578241 100644 --- a/doc/src/Install_windows.rst +++ b/doc/src/Install_windows.rst @@ -12,14 +12,20 @@ Note that each installer package has a date in its name, which corresponds to the LAMMPS version of the same date. Installers for current and older versions of LAMMPS are available. 32-bit and 64-bit installers are available, and each installer contains both a serial -and parallel executable. The installer site also explains how to +and parallel executable. The installer web site also explains how to install the Windows MPI package (MPICH2 from Argonne National Labs), needed to run in parallel. -The LAMMPS binaries contain all optional packages included in the -source distribution except: KIM, KOKKOS, USER-INTEL, and USER-QMMM. +The LAMMPS binaries contain *all* :doc:`optional packages ` +included in the source distribution except: KIM, KOKKOS, MSCG, PYTHON, +USER-ADIOS, USER-H5MD, USER-NETCDF, USER-QMMM, USER-QUIP, and USER-VTK. The serial version also does not include the MPIIO and -USER-LB packages. GPU support is provided for OpenCL. +USER-LB packages. The GPU package is compiled for OpenCL with +mixed precision kernels. + +The LAMMPS library is compiled as a shared library and the +:doc:`LAMMPS Python module ` is installed, so that +it is possible to load LAMMPS into a Python interpreter. The installer site also has instructions on how to run LAMMPS under Windows, once it is installed, in both serial and parallel. @@ -42,5 +48,3 @@ install multiple versions of LAMMPS (in different directories), but only the executable for the last-installed package will be found automatically, so this should only be done for debugging purposes. -Thanks to Axel Kohlmeyer (Temple U, akohlmey at gmail.com) for setting -up this Windows capability. From 343b24dd5edf52efa73b2cc2824bfd545de50f95 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 1 Oct 2020 10:50:33 -0600 Subject: [PATCH 41/42] more edits to C library chapter --- doc/src/Library_add.rst | 29 +++++++++++++++-------------- doc/src/Library_config.rst | 24 ++++++++++++------------ doc/src/Library_neighbor.rst | 4 ++-- doc/src/Library_objects.rst | 4 ++-- doc/src/Library_scatter.rst | 13 ++++++++++--- doc/src/Library_utility.rst | 4 ++-- 6 files changed, 43 insertions(+), 35 deletions(-) diff --git a/doc/src/Library_add.rst b/doc/src/Library_add.rst index e58b6c2b73..ef91c98ab0 100644 --- a/doc/src/Library_add.rst +++ b/doc/src/Library_add.rst @@ -2,11 +2,11 @@ Adding code to the Library interface ==================================== The functionality of the LAMMPS library interface has historically -always been motivated by the needs of its users and functions were -added or expanded as they were needed and used. Contributions to -the interface are always welcome. However with a refactoring of -the library interface and its documentation that started in 2020, -there are now a few requirements for inclusion of changes. +been motivated by the needs of its users. Functions have been added +or expanded as they were needed and used. Contributions to the +interface are always welcome. However with a refactoring of the +library interface and its documentation that started in 2020, there +are now a few requirements for including new changes or extensions. - New functions should be orthogonal to existing ones and not implement functionality that can already be achieved with the @@ -17,17 +17,18 @@ there are now a few requirements for inclusion of changes. ``doc/src`` folder. - If possible, new unit tests to test those new features should be added. - - The new feature should also be implemented and documented for - the Python and Fortran modules. + - The new feature should also be implemented and documented not + just for the C interface, but also the Python and Fortran interfaces. - All additions should work and be compatible with ``-DLAMMPS_BIGBIG``, - ``-DLAMMPS_SMALLBIG``, ``-DLAMMPS_SMALLSMALL`` and compiling + ``-DLAMMPS_SMALLBIG``, ``-DLAMMPS_SMALLSMALL`` and when compiling with and without MPI support. - The ``library.h`` file should be kept compatible to C code at a level similar to C89. Its interfaces may not reference any - custom data types (e.g. ``bigint``, ``tagint``, and so on) only - known inside of LAMMPS. - - only C style comments, not C++ style + custom data types (e.g. ``bigint``, ``tagint``, and so on) that + are only known inside of LAMMPS. + - only use C style comments, not C++ style + +Please note that these are *not* *strict* requirements, but the LAMMPS +developers appreciate if they are followed and can assist with +implementing what is missing. -Please note, that these are *not* *strict* requirements, but the -LAMMPS developers appreciate if they are followed closely and will -assist with implementing what is missing. diff --git a/doc/src/Library_config.rst b/doc/src/Library_config.rst index 0c07896ff6..3389d52173 100644 --- a/doc/src/Library_config.rst +++ b/doc/src/Library_config.rst @@ -18,18 +18,18 @@ This section documents the following functions: -------------------- -The following library functions can be used to query the LAMMPS library -about compile time settings and included packages and styles. This -enables programs that use the library interface to run LAMMPS -simulations to determine, whether the linked LAMMPS library is compatible -with the requirements of the application without crashing during the -LAMMPS functions (e.g. due to missing pair styles from packages) or to -choose between different options (e.g. whether to use ``lj/cut``, -``lj/cut/opt``, ``lj/cut/omp`` or ``lj/cut/intel``). Most of the -functions can be called directly without first creating a LAMMPS -instance. While crashes within LAMMPS may be recovered from through -enabling :ref:`exceptions `, avoiding them proactively is -a safer approach. +These library functions can be used to query the LAMMPS library for +compile time settings and included packages and styles. This enables +programs that use the library interface to determine whether the +linked LAMMPS library is compatible with the requirements of the +application without crashing during the LAMMPS functions (e.g. due to +missing pair styles from packages) or to choose between different +options (e.g. whether to use ``lj/cut``, ``lj/cut/opt``, +``lj/cut/omp`` or ``lj/cut/intel``). Most of the functions can be +called directly without first creating a LAMMPS instance. While +crashes within LAMMPS may be recovered from by enabling +:ref:`exceptions `, avoiding them proactively is a safer +approach. .. code-block:: C :caption: Example for using configuration settings functions diff --git a/doc/src/Library_neighbor.rst b/doc/src/Library_neighbor.rst index 3179b669f1..f50d28b81e 100644 --- a/doc/src/Library_neighbor.rst +++ b/doc/src/Library_neighbor.rst @@ -1,8 +1,8 @@ Accessing LAMMPS Neighbor lists =============================== -The following functions allow to access neighbor lists -generated by LAMMPS or query their properties: +The following functions enable access to neighbor lists generated by +LAMMPS or querying of their properties: - :cpp:func:`lammps_find_compute_neighlist` - :cpp:func:`lammps_find_fix_neighlist` diff --git a/doc/src/Library_objects.rst b/doc/src/Library_objects.rst index 3b87842169..5ce03f84a3 100644 --- a/doc/src/Library_objects.rst +++ b/doc/src/Library_objects.rst @@ -1,8 +1,8 @@ Retrieving or setting properties of LAMMPS objects ================================================== -This section documents accessing or modifying data from objects like -computes, fixes, or variables in LAMMPS using following functions: +This section documents accessing or modifying data stored by computes, +fixes, or variables in LAMMPS using the following functions: - :cpp:func:`lammps_extract_compute` - :cpp:func:`lammps_extract_fix` diff --git a/doc/src/Library_scatter.rst b/doc/src/Library_scatter.rst index e3ca34e999..9594593172 100644 --- a/doc/src/Library_scatter.rst +++ b/doc/src/Library_scatter.rst @@ -1,7 +1,16 @@ Library functions for scatter/gather operations ================================================ -This section documents the following functions: +This section has functions which gather per-atom data from one or more +processors into a contiguous global list ordered by atom ID. The same +list is returned to all calling processors. It also contains +functions which scatter per-atom data from a contiguous global list +across the processors that own those atom IDs. It also has a +create_atoms() function which can create a new simulation by +scattering atms appropriately to owning processors in the LAMMPS +spatial decomposition. + +It documents the following functions: - :cpp:func:`lammps_gather_atoms` - :cpp:func:`lammps_gather_atoms_concat` @@ -14,8 +23,6 @@ This section documents the following functions: - :cpp:func:`lammps_scatter` - :cpp:func:`lammps_scatter_subset` -.. TODO add description - ----------------------- .. doxygenfunction:: lammps_gather_atoms diff --git a/doc/src/Library_utility.rst b/doc/src/Library_utility.rst index 3d2fae53d3..6cc3337d48 100644 --- a/doc/src/Library_utility.rst +++ b/doc/src/Library_utility.rst @@ -1,8 +1,8 @@ Library interface utility functions =================================== -To simplify some of the tasks, the library interface contains -some utility functions that are not directly calling LAMMPS: +To simplify some tasks, the library interface contains these utility +functions. They do not directly call the LAMMPS library. - :cpp:func:`lammps_encode_image_flags` - :cpp:func:`lammps_decode_image_flags` From 9dc42262ec20ad3e7133b3bb1365831b9f95084b Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 1 Oct 2020 11:34:27 -0600 Subject: [PATCH 42/42] one more edit --- doc/src/Library_scatter.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/Library_scatter.rst b/doc/src/Library_scatter.rst index 9594593172..4fb02ec3e3 100644 --- a/doc/src/Library_scatter.rst +++ b/doc/src/Library_scatter.rst @@ -6,9 +6,9 @@ processors into a contiguous global list ordered by atom ID. The same list is returned to all calling processors. It also contains functions which scatter per-atom data from a contiguous global list across the processors that own those atom IDs. It also has a -create_atoms() function which can create a new simulation by -scattering atms appropriately to owning processors in the LAMMPS -spatial decomposition. +create_atoms() function which can create new atoms by scattering them +appropriately to owning processors in the LAMMPS spatial +decomposition. It documents the following functions: