Merge branch 'develop' into plumed-plugin

This commit is contained in:
Axel Kohlmeyer
2024-08-20 11:09:18 -04:00
523 changed files with 107974 additions and 12608 deletions

View File

@ -515,6 +515,14 @@ if(PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_T
endif() endif()
endif() endif()
find_package(CURL QUIET COMPONENTS HTTP HTTPS)
option(WITH_CURL "Enable libcurl support" ${CURL_FOUND})
if(WITH_CURL)
find_package(CURL REQUIRED COMPONENTS HTTP HTTPS)
target_compile_definitions(lammps PRIVATE -DLAMMPS_CURL)
target_link_libraries(lammps PRIVATE CURL::libcurl)
endif()
# tweak jpeg library names to avoid linker errors with MinGW cross-compilation # tweak jpeg library names to avoid linker errors with MinGW cross-compilation
set(JPEG_NAMES libjpeg libjpeg-62) set(JPEG_NAMES libjpeg libjpeg-62)
find_package(JPEG QUIET) find_package(JPEG QUIET)

View File

@ -24,6 +24,12 @@ target_include_directories(colvars PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/colvars)
target_include_directories(colvars PRIVATE ${LAMMPS_SOURCE_DIR}) target_include_directories(colvars PRIVATE ${LAMMPS_SOURCE_DIR})
target_link_libraries(lammps PRIVATE colvars) target_link_libraries(lammps PRIVATE colvars)
if(BUILD_OMP)
# Enable OpenMP for Colvars as well
target_compile_options(colvars PRIVATE ${OpenMP_CXX_FLAGS})
target_link_libraries(colvars PRIVATE OpenMP::OpenMP_CXX)
endif()
if(COLVARS_DEBUG) if(COLVARS_DEBUG)
# Need to export the define publicly to be valid in interface code # Need to export the define publicly to be valid in interface code
target_compile_definitions(colvars PUBLIC -DCOLVARS_DEBUG) target_compile_definitions(colvars PUBLIC -DCOLVARS_DEBUG)

View File

@ -2,9 +2,10 @@
APP_NAME=lammps-gui APP_NAME=lammps-gui
DESTDIR=${PWD}/../LAMMPS_GUI DESTDIR=${PWD}/../LAMMPS_GUI
VERSION="$1"
echo "Delete old files, if they exist" echo "Delete old files, if they exist"
rm -rf ${DESTDIR} ../LAMMPS_GUI-Linux-amd64.tar.gz rm -rf ${DESTDIR} ../LAMMPS_GUI-Linux-amd64*.tar.gz
echo "Create staging area for deployment and populate" echo "Create staging area for deployment and populate"
DESTDIR=${DESTDIR} cmake --install . --prefix "/" DESTDIR=${DESTDIR} cmake --install . --prefix "/"
@ -71,7 +72,7 @@ do \
done done
pushd .. pushd ..
tar -czvvf LAMMPS_GUI-Linux-amd64.tar.gz LAMMPS_GUI tar -czvvf LAMMPS_GUI-Linux-amd64-${VERSION}.tar.gz LAMMPS_GUI
popd popd
echo "Cleanup dir" echo "Cleanup dir"

View File

@ -1,9 +1,10 @@
#!/bin/bash #!/bin/bash
APP_NAME=lammps-gui APP_NAME=lammps-gui
VERSION="$1"
echo "Delete old files, if they exist" echo "Delete old files, if they exist"
rm -f ${APP_NAME}.dmg ${APP_NAME}-rw.dmg LAMMPS_GUI-macOS-multiarch.dmg rm -f ${APP_NAME}.dmg ${APP_NAME}-rw.dmg LAMMPS_GUI-macOS-multiarch*.dmg
echo "Create initial dmg file with macdeployqt" echo "Create initial dmg file with macdeployqt"
macdeployqt lammps-gui.app -dmg macdeployqt lammps-gui.app -dmg
@ -96,12 +97,12 @@ sync
echo "Unmount modified disk image and convert to compressed read-only image" echo "Unmount modified disk image and convert to compressed read-only image"
hdiutil detach "${DEVICE}" hdiutil detach "${DEVICE}"
hdiutil convert "${APP_NAME}-rw.dmg" -format UDZO -o "LAMMPS_GUI-macOS-multiarch.dmg" hdiutil convert "${APP_NAME}-rw.dmg" -format UDZO -o "LAMMPS_GUI-macOS-multiarch-${VERSION}.dmg"
echo "Attach icon to .dmg file" echo "Attach icon to .dmg file"
echo "read 'icns' (-16455) \"lammps-gui.app/Contents/Resources/lammps.icns\";" > icon.rsrc echo "read 'icns' (-16455) \"lammps-gui.app/Contents/Resources/lammps.icns\";" > icon.rsrc
Rez -a icon.rsrc -o LAMMPS_GUI-macOS-multiarch.dmg Rez -a icon.rsrc -o LAMMPS_GUI-macOS-multiarch-${VERSION}.dmg
SetFile -a C LAMMPS_GUI-macOS-multiarch.dmg SetFile -a C LAMMPS_GUI-macOS-multiarch-${VERSION}.dmg
rm icon.rsrc rm icon.rsrc
echo "Delete temporary disk images" echo "Delete temporary disk images"

View File

@ -3,9 +3,10 @@
APP_NAME=lammps-gui APP_NAME=lammps-gui
DESTDIR=${PWD}/LAMMPS_GUI DESTDIR=${PWD}/LAMMPS_GUI
SYSROOT="$1" SYSROOT="$1"
VERSION="$2"
echo "Delete old files, if they exist" echo "Delete old files, if they exist"
rm -rvf ${DESTDIR}/LAMMPS_GUI ${DESTDIR}/LAMMPS-Win10-amd64.zip rm -rvf ${DESTDIR}/LAMMPS_GUI ${DESTDIR}/LAMMPS-Win10-amd64*.zip
echo "Create staging area for deployment and populate" echo "Create staging area for deployment and populate"
DESTDIR=${DESTDIR} cmake --install . --prefix "/" DESTDIR=${DESTDIR} cmake --install . --prefix "/"
@ -60,5 +61,5 @@ cat > ${DESTDIR}/bin/qt.conf <<EOF
[Paths] [Paths]
Plugins = ../qt5plugins Plugins = ../qt5plugins
EOF EOF
zip -9rvD LAMMPS-Win10-amd64.zip LAMMPS_GUI zip -9rvD LAMMPS-Win10-amd64-${VERSION}.zip LAMMPS_GUI

View File

@ -226,6 +226,20 @@ arguments of the "dump" command. See the
.B LAMMPS .B LAMMPS
manual for details on either of the two commands. manual for details on either of the two commands.
.TP .TP
\fB\-r2info <restart file> <keyword> ...\fR or
\fB\-restart2info <restart file> <keyword> ...\fR
Write information about the <restart file> previously written by
.B LAMMPS
to the screen and immediately exit. Following <restart file>
argument, additional keywords for the
.B LAMMPS
"info" command may be added to increase the amount of information
written. By default "system" "group" "fix" "compute" are already
set. See the
.B LAMMPS
manual for details on the "info" command.
.TP
.TP
\fB\-sc <file name>\fR or \fB\-screen <file name>\fR \fB\-sc <file name>\fR or \fB\-screen <file name>\fR
Specify a file for Specify a file for
.B LAMMPS .B LAMMPS

View File

@ -1,6 +1,12 @@
Bibliography Bibliography
************ ************
**(Abascal1)**
Abascal, Sanz, Fernandez, Vega, J Chem Phys, 122, 234511 (2005)
**(Abascal2)**
Abascal, J Chem Phys, 123, 234505 (2005)
**(Ackland)** **(Ackland)**
Ackland, Jones, Phys Rev B, 73, 054104 (2006). Ackland, Jones, Phys Rev B, 73, 054104 (2006).
@ -22,21 +28,24 @@ Bibliography
**(Agnolin and Roux 2007)** **(Agnolin and Roux 2007)**
Agnolin, I. & Roux, J-N. (2007). Internal states of model isotropic granular packings. I. Assembling process, geometry, and contact networks. Phys. Rev. E, 76, 061302. Agnolin, I. & Roux, J-N. (2007). Internal states of model isotropic granular packings. I. Assembling process, geometry, and contact networks. Phys. Rev. E, 76, 061302.
**(Ahrens-Iwers2022)**
Ahrens-Iwers *et al.*, J. Chem. Phys. 157, 084801 (2022).
**(Ahrens-Iwers)**
Ahrens-Iwers and Meissner, J. Chem. Phys. 155, 104104 (2021).
**(Aktulga)** **(Aktulga)**
Aktulga, Fogarty, Pandit, Grama, Parallel Computing, 38, 245-259 (2012). Aktulga, Fogarty, Pandit, Grama, Parallel Computing, 38, 245-259 (2012).
**(Albe)** **(Albe)**
J.\ Nord, K. Albe, P. Erhart, and K. Nordlund, J. Phys.: Condens. Matter, 15, 5649(2003). J.\ Nord, K. Albe, P. Erhart, and K. Nordlund, J. Phys.: Condens. Matter, 15, 5649(2003).
**(Albe)** **(Albe1)**
K.\ Albe, K. Nordlund, J. Nord, and A. Kuronen, Phys. Rev. B, 66, 035205 (2002). K.\ Albe, K. Nordlund, J. Nord, and A. Kuronen, Phys. Rev. B, 66, 035205 (2002).
**(Allen)** **(Allen)**
Allen and Germano, Mol Phys 104, 3225-3235 (2006). Allen and Germano, Mol Phys 104, 3225-3235 (2006).
**(Allen)**
Allen and Tildesley, Computer Simulation of Liquids, Clarendon Press, Oxford, 1987.
**(AllenTildesley)** **(AllenTildesley)**
Allen and Tildesley, Computer Simulation of Liquids, Oxford University Press (1987) Allen and Tildesley, Computer Simulation of Liquids, Oxford University Press (1987)
@ -49,6 +58,9 @@ Bibliography
**(Anderson)** **(Anderson)**
Anderson, Mukherjee, Critchley, Ziegler, and Lipton "POEMS: Parallelizable Open-source Efficient Multibody Software ", Engineering With Computers (2006). Anderson, Mukherjee, Critchley, Ziegler, and Lipton "POEMS: Parallelizable Open-source Efficient Multibody Software ", Engineering With Computers (2006).
**(Appshaw)**
Appshaw, Seddon, Hanna, Soft. Matter,18, 1747(2022).
**(Avendano)** **(Avendano)**
C.\ Avendano, T. Lafitte, A. Galindo, C. S. Adjiman, G. Jackson, E. Muller, J Phys Chem B, 115, 11154 (2011). C.\ Avendano, T. Lafitte, A. Galindo, C. S. Adjiman, G. Jackson, E. Muller, J Phys Chem B, 115, 11154 (2011).
@ -58,7 +70,7 @@ Bibliography
**(Babadi)** **(Babadi)**
Babadi, Ejtehadi, Everaers, J Comp Phys, 219, 770-779 (2006). Babadi, Ejtehadi, Everaers, J Comp Phys, 219, 770-779 (2006).
**(Babadi)** **(Babadi2)**
Babadi and Ejtehadi, EPL, 77 (2007) 23002. Babadi and Ejtehadi, EPL, 77 (2007) 23002.
**(Baczewski)** **(Baczewski)**
@ -73,23 +85,23 @@ Bibliography
**(Ballenegger)** **(Ballenegger)**
Ballenegger, Arnold, Cerda, J Chem Phys, 131, 094107 (2009). Ballenegger, Arnold, Cerda, J Chem Phys, 131, 094107 (2009).
**(Banna)**
Volkov, Banna, Comp. Mater. Sci. 176, 109410 (2020).
**(Barrat)** **(Barrat)**
Barrat and Rodney, J. Stat. Phys, 144, 679 (2011). Barrat and Rodney, J. Stat. Phys, 144, 679 (2011).
**(Barrett)** **(Barrett)**
Barrett, Tschopp, El Kadiri, Scripta Mat. 66, p.666 (2012). Barrett, Tschopp, El Kadiri, Scripta Mat. 66, p.666 (2012).
**(Barros)**
Barros, Sinkovits, Luijten, J. Chem. Phys, 140, 064903 (2014)
**(Bartok)** **(Bartok)**
Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010). Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010).
**(Bartok2010)** **(Bartok2010)**
Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010). Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010).
**(Bartok_2010)** **(Bartok2013)**
AP Bartok, MC Payne, R Kondor, and G Csanyi, Physical Review Letters 104, 136403 (2010). Bartok, Kondor, Csanyi, Phys Rev B, 87, 184115 (2013).
**(Bartok_PhD)** **(Bartok_PhD)**
A Bartok-Partay, PhD Thesis, University of Cambridge, (2010). A Bartok-Partay, PhD Thesis, University of Cambridge, (2010).
@ -97,36 +109,51 @@ Bibliography
**(Baskes)** **(Baskes)**
Baskes, Phys Rev B, 46, 2727-2742 (1992). Baskes, Phys Rev B, 46, 2727-2742 (1992).
**(Baskes2)**
Baskes, Phys Rev B, 75, 094113 (2007).
**(Beck)** **(Beck)**
Beck, Molecular Physics, 14, 311 (1968). Beck, Molecular Physics, 14, 311 (1968).
**(Becton)**
Becton, Averett, Wang, Biomech. Model. Mechanobiology, 18, 425-433(2019).
**(Behler and Parrinello 2007)**
Behler, J.; Parrinello, M. Phys. Rev. Lett. 2007, 98 (14), 146401.
**(Bennet)** **(Bennet)**
Bennet, J Comput Phys, 22, 245 (1976) Bennet, J Comput Phys, 22, 245 (1976)
**(Berardi)** **(Berardi)**
Berardi, Fava, Zannoni, Chem Phys Lett, 297, 8-14 (1998). Berardi, Muccioli, Zannoni, J Chem Phys, 128, 024905 (2008). Berardi, Fava, Zannoni, Chem Phys Lett, 297, 8-14 (1998). Berardi, Muccioli, Zannoni, J Chem Phys, 128, 024905 (2008).
**(Berendsen)**
Berendsen, Grigera, Straatsma, J Phys Chem, 91, 6269-6271 (1987).
**(Berendsen)** **(Berendsen)**
Berendsen, Postma, van Gunsteren, DiNola, Haak, J Chem Phys, 81, 3684 (1984). Berendsen, Postma, van Gunsteren, DiNola, Haak, J Chem Phys, 81, 3684 (1984).
**(Berendsen2)**
Berendsen, Grigera, Straatsma, J Phys Chem, 91, 6269-6271 (1987).
**(Bessarab)** **(Bessarab)**
Bessarab, Uzdin, Jonsson, Comp Phys Comm, 196, 335-347 (2015). Bessarab, Uzdin, Jonsson, Comp Phys Comm, 196, 335-347 (2015).
**(Beutler)** **(Beutler)**
Beutler, Mark, van Schaik, Gerber, van Gunsteren, Chem Phys Lett, 222, 529 (1994). Beutler, Mark, van Schaik, Gerber, van Gunsteren, Chem Phys Lett, 222, 529 (1994).
**(Bialke)**
J.\ Bialke, T. Speck, and H Loewen, Phys. Rev. Lett. 108, 168301, 2012.
**(Bird)** **(Bird)**
G.\ A. Bird, "Molecular Gas Dynamics and the Direct Simulation of Gas Flows" (1994). G.\ A. Bird, "Molecular Gas Dynamics and the Direct Simulation of Gas Flows" (1994).
**(Bitzek)** **(Bitzek)**
Bitzek, Koskinen, Gahler, Moseler, Gumbsch, Phys Rev Lett, 97, 170201 (2006). Bitzek, Koskinen, Gahler, Moseler, Gumbsch, Phys Rev Lett, 97, 170201 (2006).
**(Bolintineanu1)**
Bolintineanu, Lechman, Plimpton, Grest, Phys Rev E, 86, 066703 (2012).
**(Bolintineanu2)**
Bolintineanu, Grest, Lechman, Pierce, Plimpton, Schunk, Comp Particle Mechanics, 1, 321-356 (2014).
**(Bomont)**
Bomont, Bretonnet, J. Chem. Phys. 124, 054504 (2006).
**(Bond)** **(Bond)**
Bond and Leimkuhler, SIAM J Sci Comput, 30, p 134 (2007). Bond and Leimkuhler, SIAM J Sci Comput, 30, p 134 (2007).
@ -134,7 +161,7 @@ Bibliography
Boone, Babaei, Wilmer, J Chem Theory Comput, 15, 5579--5587 (2019). Boone, Babaei, Wilmer, J Chem Theory Comput, 15, 5579--5587 (2019).
**(BoreschKarplus)** **(BoreschKarplus)**
Boresch and Karplus, J Phys Chem A, 103, 103 (1999) Boresch and Karplus, J Phys Chem A, 103, 103 (1999).
**(Botu1)** **(Botu1)**
V.\ Botu and R. Ramprasad, Int. J. Quant. Chem., 115(16), 1074 (2015). V.\ Botu and R. Ramprasad, Int. J. Quant. Chem., 115(16), 1074 (2015).
@ -169,8 +196,11 @@ Bibliography
**(Buck)** **(Buck)**
Buck, Bouguet-Bonnet, Pastor, MacKerell Jr., Biophys J, 90, L36 (2006). Buck, Bouguet-Bonnet, Pastor, MacKerell Jr., Biophys J, 90, L36 (2006).
**(Bulacu)**
Bulacu, Goga, Zhao, Rossi, Monticelli, Periole, Tieleman, Marrink, J Chem Theory Comput, 9, 3282-3292
**(Bussi)** **(Bussi)**
G.\ Bussi, M. Parrinello, Phs. Rev. E 75, 056707 (2007) G. Bussi, T. Zykova-Timan, M. Parrinello, J Chem Phys, 130, 074101 (2009).
**(Bussi1)** **(Bussi1)**
Bussi, Donadio and Parrinello, J. Chem. Phys. 126, 014101(2007) Bussi, Donadio and Parrinello, J. Chem. Phys. 126, 014101(2007)
@ -178,20 +208,20 @@ Bibliography
**(Bussi2)** **(Bussi2)**
Bussi and Parrinello, Phys. Rev. E 75, 056707 (2007) Bussi and Parrinello, Phys. Rev. E 75, 056707 (2007)
**(COMB)** **(COMB_1)**
J.\ Yu, S. B. Sinnott, S. R. Phillpot, Phys Rev B, 75, 085311 (2007),
**(COMB_2)**
T.-R. Shan, B. D. Devine, T. W. Kemper, S. B. Sinnott, and S. R. Phillpot, Phys. Rev. B 81, 125328 (2010) T.-R. Shan, B. D. Devine, T. W. Kemper, S. B. Sinnott, and S. R. Phillpot, Phys. Rev. B 81, 125328 (2010)
**(COMB3)** **(COMB3)**
T.\ Liang, T.-R. Shan, Y.-T. Cheng, B. D. Devine, M. Noordhoek, Y. Li, Z. Lu, S. R. Phillpot, and S. B. Sinnott, Mat. Sci. & Eng: R 74, 255-279 (2013). T.\ Liang, T.-R. Shan, Y.-T. Cheng, B. D. Devine, M. Noordhoek, Y. Li, Z. Lu, S. R. Phillpot, and S. B. Sinnott, Mat. Sci. & Eng: R 74, 255-279 (2013).
**(COMB_1)**
J.\ Yu, S. B. Sinnott, S. R. Phillpot, Phys Rev B, 75, 085311 (2007),
**(Calhoun)** **(Calhoun)**
A.\ Calhoun, M. Pavese, G. Voth, Chem Phys Letters, 262, 415 (1996). A.\ Calhoun, M. Pavese, G. Voth, Chem Phys Letters, 262, 415 (1996).
**(Campana)** **(Campana)**
C.\ Campana and M. H. Muser, *Practical Green's function approach to the simulation of elastic semi-infinite solids*, `Phys. Rev. B [74], 075420 (2006) <https://doi.org/10.1103/PhysRevB.74.075420>`_ C.\ Campana and M. H. Muser, Phys. Rev. B [74], 075420 (2006).
**(Cao1)** **(Cao1)**
J.\ Cao and B. Berne, J Chem Phys, 99, 2902 (1993). J.\ Cao and B. Berne, J Chem Phys, 99, 2902 (1993).
@ -215,6 +245,9 @@ Bibliography
Cerda, Ballenegger, Lenz, Holm, J Chem Phys 129, 234104 (2008) Cerda, Ballenegger, Lenz, Holm, J Chem Phys 129, 234104 (2008)
**(Ceriotti)** **(Ceriotti)**
M. Ceriotti, M. Parrinello, T. Markland, D. Manolopoulos, J. Chem. Phys. 133, 124104 (2010).
**(Ceriotti1)**
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)** **(Ceriotti2)**
@ -232,6 +265,18 @@ Bibliography
**(Clarke)** **(Clarke)**
Clarke and Smith, J Chem Phys, 84, 2290 (1986). Clarke and Smith, J Chem Phys, 84, 2290 (1986).
**(Clavier)**
G. Clavier, N. Desbiens, E. Bourasseau, V. Lachet, N. Brusselle-Dupend and B. Rousseau, Mol Sim, 43, 1413 (2017).
**(Clemmer)**
Clemmer and Robbins, Phys. Rev. Lett. (2022).
**(Clemmer1)**
Clemmer, Monti, Lechman, Soft Matter, 20, 1702 (2024).
**(Clemmer2)**
Clemmer, Pierce, O'Connor, Nevins, Jones, Lechman, Tencer, Appl. Math. Model., 130, 310-326 (2024).
**(Coleman)** **(Coleman)**
Coleman, Spearot, Capolungo, MSMSE, 21, 055020 (2013). Coleman, Spearot, Capolungo, MSMSE, 21, 055020 (2013).
@ -244,8 +289,17 @@ Bibliography
**(Cornell)** **(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).
**(Cundall, 1987)**
Cundall, P. A. Distinct Element Models of Rock and Soil
**(Curk1)**
T. Curk, J. Yuan, and E. Luijten, JCP 156 (2022).
**(Curk2)**
T. Curk and E. Luijten, PRL 126 (2021)
**(Cusentino)** **(Cusentino)**
Cusentino, Wood, and Thompson, J Phys Chem A, xxx, xxxxx, (2020) Cusentino, Wood, Thompson, J Phys Chem A, 124, 5456, (2020)
**(Daivis and Todd)** **(Daivis and Todd)**
Daivis and Todd, J Chem Phys, 124, 194103 (2006). Daivis and Todd, J Chem Phys, 124, 194103 (2006).
@ -268,6 +322,15 @@ Bibliography
**(Daw2)** **(Daw2)**
M.\ S. Daw, and M. I. Baskes, Phys. Rev. B, 29, 6443 (1984). M.\ S. Daw, and M. I. Baskes, Phys. Rev. B, 29, 6443 (1984).
**(de Buyl)**
de Buyl, Colberg and Hofling, Comp. Phys. Comm. 185(6), 1546-1553 (2014) -
**(Deissenbeck)**
Deissenbeck *et al.*, Phys. Rev. Letters 126, 136803 (2021).
**(de Koning)**
de Koning and Antonelli, Phys Rev E, 53, 465 (1996).
**(DeVane)** **(DeVane)**
Shinoda, DeVane, Klein, Soft Matter, 4, 2453-2462 (2008). Shinoda, DeVane, Klein, Soft Matter, 4, 2453-2462 (2008).
@ -277,12 +340,24 @@ Bibliography
**(Destree)** **(Destree)**
M.\ Destree, F. Laupretre, A. Lyulin, and J.-P. Ryckaert, J Chem Phys, 112, 9632 (2000). M.\ Destree, F. Laupretre, A. Lyulin, and J.-P. Ryckaert, J Chem Phys, 112, 9632 (2000).
**(Dickel)**
Dickel, Francis, and Barrett, Computational Materials Science 171 (2020): 109157.
**(Dietz)**
Dietz and Hoy, J. Chem Phys, 156, 014103 (2022).
**(Dobson)** **(Dobson)**
Dobson, J Chem Phys, 141, 184103 (2014). Dobson, J Chem Phys, 141, 184103 (2014).
**(Drautz)**
Drautz, Phys Rev B, 99, 014104 (2019).
**(Duffy)** **(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).
**(Dufils)**
Dufils *et al.*, Phys. Rev. Letters 123, 195501 (2019).
**(Dullweber)** **(Dullweber)**
Dullweber, Leimkuhler and McLachlan, J Chem Phys, 107, 5840 (1997). Dullweber, Leimkuhler and McLachlan, J Chem Phys, 107, 5840 (1997).
@ -295,6 +370,9 @@ Bibliography
**(Dunweg)** **(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).
**(EcheverriRestrepo)**
Echeverri Restrepo, Andric, Comput Mater Sci, 218, 111978 (2023).
**(EDIP)** **(EDIP)**
J F Justo et al, Phys Rev B 58, 2539 (1998). J F Justo et al, Phys Rev B 58, 2539 (1998).
@ -304,12 +382,21 @@ Bibliography
**(Elliott)** **(Elliott)**
Elliott, Tadmor and Bernstein, `https://openkim.org/kim-api <https://openkim.org/kim-api>`_ (2011) doi: `https://doi.org/10.25950/FF8F563A <https://doi.org/10.25950/FF8F563A>`_ Elliott, Tadmor and Bernstein, `https://openkim.org/kim-api <https://openkim.org/kim-api>`_ (2011) doi: `https://doi.org/10.25950/FF8F563A <https://doi.org/10.25950/FF8F563A>`_
**(Ellis)**
Ellis, Fiedler, Popoola, Modine, Stephens, Thompson, Cangi, Rajamanickam, Phys Rev B, 104, 035120, (2021)
**(Emmrich)**
Emmrich, Weckner, Commun. Math. Sci., 5, 851-864 (2007),
**(Elstner)** **(Elstner)**
M.\ Elstner, D. Poresag, G. Jungnickel, J. Elsner, M. Haugk, T. Frauenheim, S. Suhai, and G. Seifert, Phys. Rev. B, 58, 7260 (1998). M.\ Elstner, D. Poresag, G. Jungnickel, J. Elsner, M. Haugk, T. Frauenheim, S. Suhai, and G. Seifert, Phys. Rev. B, 58, 7260 (1998).
**(Erdmann)** **(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.
**(Eshelby)**
J.D. Eshelby, Philos. Trans. Royal Soc. London A, Math. Phys. Sci., Vol. 244, No. 877 (1951) pp. 87-112; J. Elasticity, Vol. 5, Nos. 3-4 (1975) pp. 321-335]
**(Espanol and Revenga)** **(Espanol and Revenga)**
Espanol, Revenga, Physical Review E, 67, 026705 (2003). Espanol, Revenga, Physical Review E, 67, 026705 (2003).
@ -328,9 +415,18 @@ Bibliography
**(Faken)** **(Faken)**
Faken, Jonsson, Comput Mater Sci, 2, 279 (1994). Faken, Jonsson, Comput Mater Sci, 2, 279 (1994).
**(Falk)**
Falk and Langer PRE, 57, 7192 (1998).
**(Fath)** **(Fath)**
Fath, Hochbruck, Singh, J Comp Phys, 333, 180-198 (2017). Fath, Hochbruck, Singh, J Comp Phys, 333, 180-198 (2017).
**(Feng1)**
Z. Feng, ..., and W. Ouyang, J. Phys. Chem. C. 127(18), 8704-8713 (2023).
**(Feng2)**
Z. Feng, ..., and W. Ouyang, Langmuir 39(50), 18198-18207 (2023).
**(Fennell)** **(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).
@ -367,18 +463,36 @@ Bibliography
**(Frenkel)** **(Frenkel)**
Frenkel and Smit, Understanding Molecular Simulation, Academic Press, London, 2002. Frenkel and Smit, Understanding Molecular Simulation, Academic Press, London, 2002.
**(GLE4MD)** **(Fu)**
`https://gle4md.org/ <https://gle4md.org/>`_ Fu, Peng, Yuan, Kfoury, Young, Comput. Phys. Commun, 210, 193-203(2017).
**(Gao)** **(Gao)**
Gao and Weber, Nuclear Instruments and Methods in Physics Research B 191 (2012) 504. Gao and Weber, Nuclear Instruments and Methods in Physics Research B 191 (2012) 504.
**(Gingrich)**
Gingrich, `MSc thesis` <https://gingrich.chem.northwestern.edu/papers/ThesiswCorrections.pdf>` (2010).
**(Gissinger2017)**
Gissinger, Jensen and Wise, Polymer, 128, 211-217 (2017).
**(Gissinger2020)**
Gissinger, Jensen and Wise, Macromolecules, 53, 22, 9953-9961 (2020).
**(Gissinger)** **(Gissinger)**
Gissinger, Jensen and Wise, Polymer, 128, 211 (2017). Jacob R. Gissinger, Scott R. Zavada, Joseph G. Smith, Josh Kemppainen, Ivan Gallegos, Gregory M. Odegard, Emilie J. Siochi, and Kristopher E. Wise, Carbon, 202, 336-347 (2023).
**(Gissinger2024)**
J. R. Gissinger, I. Nikiforov, Y. Afshar, B. Waters, M. Choi, D. S. Karls, A. Stukowski, W. Im, H. Heinz, A. Kohlmeyer, and E. B. Tadmor, J Phys Chem B, 128, 3282-3297 (2024).
**(Gloor)**
Gloor, J Chem Phys, 123, 134703 (2005)
**(Glosli)** **(Glosli)**
Glosli, unpublished, 2005. Streitz, Glosli, Patel, Chan, Yates, de Supinski, Sexton and Gunnels, Journal of Physics: Conference Series, 46, 254 (2006). Glosli, unpublished, 2005. Streitz, Glosli, Patel, Chan, Yates, de Supinski, Sexton and Gunnels, Journal of Physics: Conference Series, 46, 254 (2006).
**(Goff)**
Goff, Zhang, Negre, Rohskopf, Niklasson, Journal of Chemical Theory and Computation 19, no. 13 (2023).
**(Goldman1)** **(Goldman1)**
Goldman, Reed and Fried, J. Chem. Phys. 131, 204103 (2009) Goldman, Reed and Fried, J. Chem. Phys. 131, 204103 (2009)
@ -412,6 +526,9 @@ Bibliography
**(Guo)** **(Guo)**
Guo and Thirumalai, Journal of Molecular Biology, 263, 323-43 (1996). Guo and Thirumalai, Journal of Molecular Biology, 263, 323-43 (1996).
**(Gupta)**
Gupta ,Phys Rev. B, 23, 6265-6270 (1981).
**(Hardy)** **(Hardy)**
David Hardy thesis: Multilevel Summation for the Fast Evaluation of Forces for the Simulation of Biomolecules, University of Illinois at Urbana-Champaign, (2006). David Hardy thesis: Multilevel Summation for the Fast Evaluation of Forces for the Simulation of Biomolecules, University of Illinois at Urbana-Champaign, (2006).
@ -433,6 +550,9 @@ Bibliography
**(Henrich)** **(Henrich)**
O.\ Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018). O.\ Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018).
**(Herman)**
M. F. Herman, E. J. Bruskin, B. J. Berne, J Chem Phys, 76, 5150 (1982).
**(Hess)** **(Hess)**
Hess, B. The Journal of Chemical Physics 2002, 116 (1), 209-217. Hess, B. The Journal of Chemical Physics 2002, 116 (1), 209-217.
@ -454,24 +574,42 @@ Bibliography
**(Hoover)** **(Hoover)**
Hoover, Phys Rev A, 31, 1695 (1985). Hoover, Phys Rev A, 31, 1695 (1985).
**(Huang)**
Huang, Zhang, Yuan, Gao, Zhang, Nano Lett. 13, 4546(2013).
**(Huang2014)**
X. Huang, "Exploring critical-state behavior using DEM", Doctoral dissertation, Imperial College. (2014). https://doi.org/10.25560/25316
**(Hu)**
Hu, and Adams J. Comp. Physics, 213, 844-861 (2006).
**(Hu)**
Hu, J. Chem. Theory Comput. 10, 5254 (2014).
**(Hummer)** **(Hummer)**
Hummer, Gronbech-Jensen, Neumann, J Chem Phys, 109, 2791 (1998) Hummer, Gronbech-Jensen, Neumann, J Chem Phys, 109, 2791 (1998)
**(Hunt)** **(Hunt)**
Hunt, Mol Simul, 42, 347 (2016). Hunt, Mol Simul, 42, 347 (2016).
**(Ikeshoji)**
Ikeshoji and Hafskjold, Molecular Physics, 81, 251-261 (1994).
**(Ikeshoji2)**
Ikeshoji, Hafskjold, Furuholt, Mol Sim, 29, 101-109, (2003).
**(Ilie)**
Ilie, Briels, den Otter, Journal of Chemical Physics, 142, 114103 (2015).
**(In 't Veld)**
In 't Veld, Ismail, Grest, J Chem Phys (accepted) (2007).
**(IPI)** **(IPI)**
`https://ipi-code.org/ <https://ipi-code.org/>` `https://ipi-code.org/ <https://ipi-code.org/>`
**(IPI-CPC)** **(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).
**(In 't Veld)**
In 't Veld, Ismail, Grest, J Chem Phys (accepted) (2007).
**(Isele-Holder)** **(Isele-Holder)**
Isele-Holder, Mitchell, Ismail, J Chem Phys, 137, 174107 (2012). Isele-Holder, Mitchell, Ismail, J Chem Phys, 137, 174107 (2012).
@ -490,6 +628,9 @@ Bibliography
**(Izvekov)** **(Izvekov)**
Izvekov, Voth, J Chem Phys 123, 134105 (2005). Izvekov, Voth, J Chem Phys 123, 134105 (2005).
**(Jadhao)**
Jadhao, Solis, Olvera de la Cruz, J Chem Phys, 138, 054119 (2013)
**(Janssens)** **(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).
@ -502,6 +643,15 @@ Bibliography
**(Jiang)** **(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).
**(Jiang1)**
Jiang, Hardy, Phillips, MacKerell, Schulten, and Roux, J Phys Chem Lett, 2, 87-92 (2011).
**(Jiang2)**
J.-W. Jiang, Nanotechnology 26, 315706 (2015).
**(Jiang3)**
J.-W. Jiang, Acta Mech. Solida. Sin 32, 17 (2019).
**(Johnson et al, 1971)** **(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. 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.
@ -571,21 +721,24 @@ Bibliography
**(Lamoureux)** **(Lamoureux)**
Lamoureux and Roux, J Chem Phys, 119, 3025-3039 (2003). Lamoureux and Roux, J Chem Phys, 119, 3025-3039 (2003).
**(Larentzos)** **(Landsgesell)**
J.P. Larentzos, J.K. Brennan, J.D. Moore, and W.D. Mattson, "LAMMPS Implementation of Constant Energy Dissipative Particle Dynamics (DPD-E)", ARL-TR-6863, U.S. Army Research J. Landsgesell, P. Hebbeker, O. Rud, R. Lunkad, P. Kosovan, and C. Holm, Macromolecules 53, 3007-3020 (2020).
**(Larentzos1)** **(Larentzos1)**
J.P. Larentzos, J.K. Brennan, J.D. Moore, M. Lisal and W.D. Mattson, "Parallel Implementation of Isothermal and Isoenergetic Dissipative Particle Dynamics Using Shardlow-Like Splitting J.P. Larentzos, J.K. Brennan, J.D. Moore, M. Lisal and W.D. Mattson, Comput. Phys. Commun., 185, 1987-1998 (2014).
**(Larentzos2)** **(Larentzos2)**
J.P. Larentzos, J.K. Brennan, J.D. Moore, and W.D. Mattson, "LAMMPS Implementation of Constant Energy Dissipative Particle Dynamics (DPD-E)", ARL-TR-6863, U.S. Army Research J.P. Larentzos, J.K. Brennan, J.D. Moore, and W.D. Mattson, ARL-TR-6863, U.S. Army Research Laboratory, Aberdeen Proving Ground, MD (2014).
**(Larsen)** **(Larsen)**
Larsen, Schmidt, Schiotz, Modelling Simul Mater Sci Eng, 24, 055007 (2016). Larsen, Schmidt, Schiotz, Modelling Simul Mater Sci Eng, 24, 055007 (2016).
**(Lebedeva et al.)** **(Lebedeva1)**
I.\ V. Lebedeva, A. A. Knizhnik, A. M. Popov, Y. E. Lozovik, B. V. Potapkin, Phys. Rev. B, 84, 245437 (2011) I.\ V. Lebedeva, A. A. Knizhnik, A. M. Popov, Y. E. Lozovik, B. V. Potapkin, Phys. Rev. B, 84, 245437 (2011)
**(Lebedeva2)**
I. V. Lebedeva, A. A. Knizhnik, A. M. Popov, Y. E. Lozovik, B. V. Potapkin, Physica E: 44, 949-954 (2012)
**(Lechman)** **(Lechman)**
Lechman, et al, in preparation (2010). Lechman, et al, in preparation (2010).
@ -595,6 +748,9 @@ Bibliography
**(Lee2)** **(Lee2)**
Lee, Baskes, Kim, Cho. Phys. Rev. B, 64, 184102 (2001). Lee, Baskes, Kim, Cho. Phys. Rev. B, 64, 184102 (2001).
**(Lee2020)**
C.W. Lee, et al. (2020) Physical Review B, 102(2), 024107.
**(Lenart)** **(Lenart)**
Lenart , Jusufi, and Panagiotopoulos, J Chem Phys, 126, 044509 (2007). Lenart , Jusufi, and Panagiotopoulos, J Chem Phys, 126, 044509 (2007).
@ -619,8 +775,11 @@ Bibliography
**(Li2015_JCP)** **(Li2015_JCP)**
Li, Yazdani, Tartakovsky, Karniadakis, J Chem Phys, 143: 014101 (2015). DOI:10.1063/1.4923254. Li, Yazdani, Tartakovsky, Karniadakis, J Chem Phys, 143: 014101 (2015). DOI:10.1063/1.4923254.
**(Liang)**
Liang, Phillpot, Sinnott Phys. Rev. B79 245110, (2009), Erratum: Phys. Rev. B85 199903(E), (2012)
**(Lisal)** **(Lisal)**
M.\ Lisal, J.K. Brennan, J. Bonet Avalos, "Dissipative particle dynamics at isothermal, isobaric, isoenergetic, and isoenthalpic conditions using Shardlow-like splitting algorithms.", M.\ Lisal, J.K. Brennan, J. Bonet Avalos, J. Chem. Phys., 135, 204105 (2011).
**(Liu1)** **(Liu1)**
L.\ Liu, Y. Liu, S. V. Zybin, H. Sun and W. A. Goddard, Journal of Physical Chemistry A, 115, 11016-11022 (2011). L.\ Liu, Y. Liu, S. V. Zybin, H. Sun and W. A. Goddard, Journal of Physical Chemistry A, 115, 11016-11022 (2011).
@ -637,6 +796,15 @@ Bibliography
**(Luding, 2008)** **(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.
**(Lysogorskiy)**
Lysogorskiy, van der Oord, Bochkarev, Menon, Rinaldi, Hammerschmidt, Mrovec, Thompson, Csanyi, Ortner, Drautz, npj Comp Mat, 7, 97 (2021).
**(Lysogorskiy21)**
Lysogorskiy, van der Oord, Bochkarev, Menon, Rinaldi, Hammerschmidt, Mrovec, Thompson, Csanyi, Ortner, Drautz, npj Comp Mat, 7, 97 (2021).
**(Lysogorskiy23)**
Lysogorskiy, Bochkarev, Mrovec, Drautz, Phys Rev Mater, 7, 043801 (2023) / arXiv:2212.08716 (2022).
**(Maaravi)** **(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).
@ -655,12 +823,18 @@ Bibliography
**(Maginn)** **(Maginn)**
Kelkar, Rafferty, Maginn, Siepmann, Fluid Phase Equilibria, 260, 218-231 (2007). Kelkar, Rafferty, Maginn, Siepmann, Fluid Phase Equilibria, 260, 218-231 (2007).
**(Mahoney)**
Mahoney, Jorgensen, J Chem Phys 112, 8910 (2000)
**(Malolepsza)** **(Malolepsza)**
Malolepsza, Secor, Keyes, J Phys Chem B 119 (42), 13379-13384 (2015). Malolepsza, Secor, Keyes, J Phys Chem B 119 (42), 13379-13384 (2015).
**(Mandadapu)** **(Mandadapu)**
Mandadapu, KK; Templeton, JA; Lee, JW, "Polarization as a field variable from molecular dynamics simulations." Journal of Chemical Physics (2013), 139:054115. Please refer to the standard finite element (FE) texts, e.g. T.J.R Hughes " The finite element method ", Dover 2003, for the basics of FE simulation. Mandadapu, KK; Templeton, JA; Lee, JW, "Polarization as a field variable from molecular dynamics simulations." Journal of Chemical Physics (2013), 139:054115. Please refer to the standard finite element (FE) texts, e.g. T.J.R Hughes " The finite element method ", Dover 2003, for the basics of FE simulation.
**(Mandelli_1)**
D. Mandelli, W. Ouyang, M. Urbakh, and O. Hod, ACS Nano 13(7), 7603-7609 (2019).
**(Maras)** **(Maras)**
Maras, Trushin, Stukowski, Ala-Nissila, Jonsson, Comp Phys Comm, 205, 13-21 (2016). Maras, Trushin, Stukowski, Ala-Nissila, Jonsson, Comp Phys Comm, 205, 13-21 (2016).
@ -676,6 +850,9 @@ Bibliography
**(Martyna1994)** **(Martyna1994)**
Martyna, Tobias and Klein, J Chem Phys, 101, 4177 (1994). Martyna, Tobias and Klein, J Chem Phys, 101, 4177 (1994).
**(Martyna2)**
G. Martyna, A. Hughes, M. Tuckerman, J. Chem. Phys. 110, 3275 (1999).
**(Mason)** **(Mason)**
J.\ K. Mason, Acta Cryst A65, 259 (2009). J.\ K. Mason, Acta Cryst A65, 259 (2009).
@ -715,6 +892,9 @@ Bibliography
**(Mie)** **(Mie)**
G.\ Mie, Ann Phys, 316, 657 (1903). G.\ Mie, Ann Phys, 316, 657 (1903).
**(Milano)**
G. Milano, S. Goudeau, F. Mueller-Plathe, J. Polym. Sci. B Polym. Phys. 43, 871 (2005).
**(Miller1)** **(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).
@ -745,12 +925,18 @@ Bibliography
**(Mitchell2011a)** **(Mitchell2011a)**
Mitchell. A Nonlocal, Ordinary, State-Based Plasticity Model for Peridynamics. Sandia National Lab Report, 3166:1-34 (2011). Mitchell. A Nonlocal, Ordinary, State-Based Plasticity Model for Peridynamics. Sandia National Lab Report, 3166:1-34 (2011).
**(Miyazaki)**
Miyazaki, Okazaki, Shinoda, J Chem Theory Comput, 16, 782-793 (2020).
**(Mniszewski)** **(Mniszewski)**
S.\ M. Mniszewski, M. J. Cawkwell, M. E. Wall, J. Mohd-Yusof, N. Bock, T. C. Germann, and A. M. N. Niklasson, J. Chem. Theory Comput., 11, 4644 (2015). S.\ M. Mniszewski, M. J. Cawkwell, M. E. Wall, J. Mohd-Yusof, N. Bock, T. C. Germann, and A. M. N. Niklasson, J. Chem. Theory Comput., 11, 4644 (2015).
**(Monaghan)** **(Monaghan)**
Monaghan and Gingold, Journal of Computational Physics, 52, 374-389 (1983). Monaghan and Gingold, Journal of Computational Physics, 52, 374-389 (1983).
**(Monti)**
Monti, Clemmer, Srivastava, Silbert, Grest, and Lechman, Phys. Rev. E, (2022).
**(Moore)** **(Moore)**
Moore, J Chem Phys, 144, 104501 (2016). Moore, J Chem Phys, 144, 104501 (2016).
@ -770,7 +956,7 @@ Bibliography
Morris, Fox, Zhu, J Comp Physics, 136, 214-226 (1997). Morris, Fox, Zhu, J Comp Physics, 136, 214-226 (1997).
**(Moustafa)** **(Moustafa)**
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) <https://link.aps.org/doi/10.1103/PhysRevE.92.043303>`_ Sabry G. Moustafa, Andrew J. Schultz, and David A. Kofke, `Phys. Rev. E [92], 043303 (2015) <https://link.aps.org/doi/10.1103/PhysRevE.92.043303>`_
**(Muller-Plathe1)** **(Muller-Plathe1)**
Muller-Plathe, J Chem Phys, 106, 6082 (1997). Muller-Plathe, J Chem Phys, 106, 6082 (1997).
@ -790,9 +976,6 @@ Bibliography
**(Neelov)** **(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).
**(Nelson)** **(Nelson)**
Nelson, Halperin, Phys Rev B, 19, 2457 (1979). Nelson, Halperin, Phys Rev B, 19, 2457 (1979).
@ -802,12 +985,24 @@ Bibliography
**(Neyts)** **(Neyts)**
E.\ C. Neyts and A. Bogaerts, Theor. Chem. Acc. 132, 1320 (2013). E.\ C. Neyts and A. Bogaerts, Theor. Chem. Acc. 132, 1320 (2013).
**(Nguyen2023)**
Nguyen, Physical Review B, 107(14), 144103, (2023).
**(Nguyen2024)**
Nguyen, Journal of Computational Physics, 113102, (2024).
**(Nguyen and Rohskopf)**
Nguyen and Rohskopf, Journal of Computational Physics, 480, 112030, (2023).
**(Nguyen and Sema)**
Nguyen and Sema, https://arxiv.org/abs/2405.00306, (2024).
**(NguyenTD)**
Nguyen, Li, Bagchi, Solis, Olvera de la Cruz, Comput Phys Commun 241, 80-19 (2019)
**(Nicholson and Rutledge)** **(Nicholson and Rutledge)**
Nicholson and Rutledge, J Chem Phys, 145, 244903 (2016). Nicholson and Rutledge, J Chem Phys, 145, 244903 (2016).
**(Nicklas)**
The spline-based MEAM+SW format was first devised and used to develop potentials for bcc transition metals by Jeremy Nicklas, Michael Fellinger,
**(Niklasson2002)** **(Niklasson2002)**
A.\ M. N. Niklasson, Phys. Rev. B, 66, 155115 (2002). A.\ M. N. Niklasson, Phys. Rev. B, 66, 155115 (2002).
@ -820,6 +1015,9 @@ Bibliography
**(Niklasson2017)** **(Niklasson2017)**
A.\ M. N. Niklasson, J. Chem. Phys., 147, 054103 (2017). A.\ M. N. Niklasson, J. Chem. Phys., 147, 054103 (2017).
**(Nitol)**
Nitol, Dickel, and Barrett, Computational Materials Science 188 (2021): 110207.
**(Noid)** **(Noid)**
Noid, Chu, Ayton, Krishna, Izvekov, Voth, Das, Andersen, J Chem Phys 128, 134105 (2008). Noid, Chu, Ayton, Krishna, Izvekov, Voth, Das, Andersen, J Chem Phys 128, 134105 (2008).
@ -841,6 +1039,9 @@ Bibliography
**(O'Connor)** **(O'Connor)**
O'Connor et al., J. Chem. Phys. 142, 024903 (2015). O'Connor et al., J. Chem. Phys. 142, 024903 (2015).
**(O'Hearn)**
O'Hearn, Alperen, Aktulga, SIAM J. Sci. Comput., 42(1), C1--C22 (2020).
**(Okabe)** **(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).
@ -850,6 +1051,8 @@ Bibliography
**(Omelyan)** **(Omelyan)**
Omelyan, Mryglod, and Folk. Phys. Rev. Lett. 86(5), 898. (2001). Omelyan, Mryglod, and Folk. Phys. Rev. Lett. 86(5), 898. (2001).
**(OPLS-AA96)** Jorgensen, Maxwell, Tirado-Rives, J Am Chem Soc, 118(45), 11225-11236 (1996).
**(Oppelstrup)** **(Oppelstrup)**
Oppelstrup, unpublished, 2015. Oppelstrup and Moriarty, to be published. Oppelstrup, unpublished, 2015. Oppelstrup and Moriarty, to be published.
@ -871,14 +1074,17 @@ Bibliography
**(Ouyang2)** **(Ouyang2)**
W.\ Ouyang et al., J. Chem. Theory Comput. 16(1), 666-676 (2020). W.\ Ouyang et al., J. Chem. Theory Comput. 16(1), 666-676 (2020).
**(PASS)** **(Ouyang_1)**
PASS webpage: https://www.sdu.dk/en/DPASS W. Ouyang et al., J. Chem. Theory Comput. 16(1), 666-676 (2020).
**(PLUMED)** **(Ouyang6)**
G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014) W. Ouyang, O. Hod, and R. Guerra, J. Chem. Theory Comput. 17, 7215 (2021).
**(Pavlov)** **(Ouyang7)**
D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Journal of High Performance Computing Applications, 38, 34-49 (2024). W. Ouyang, et al., J. Chem. Theory Comput. 17, 7237 (2021).
**(Palkar)**
Palkar V, Kuksenok O, J. Phys. Chem. B, 126 (1), 336-346, 2022
**(Paquay)** **(Paquay)**
Paquay and Kusters, Biophys. J., 110, 6, (2016). preprint available at `arXiv:1411.3019 <https://arxiv.org/abs/1411.3019/>`_. Paquay and Kusters, Biophys. J., 110, 6, (2016). preprint available at `arXiv:1411.3019 <https://arxiv.org/abs/1411.3019/>`_.
@ -889,21 +1095,33 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Parks)** **(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)**
Parrinello and Rahman, J Appl Phys, 52, 7182 (1981). Parrinello and Rahman, J Appl Phys, 52, 7182 (1981).
**(PASS)**
PASS webpage: https://www.sdu.dk/en/DPASS
**(Paula Leite2016)** **(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 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).
**(Pavlov1)**
D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Journal of High Performance Computing Applications, 38, 34-49 (2024).
**(Pavlov2)**
Pavlov, Galigerov, Kolotinskii, Nikolskiy, Stegailov, "GPU-based Molecular Dynamics of Fluid Flows: Reaching for Turbulence", Int. J. High Perf. Comp. Appl., (2024)
**(Pearlman)** **(Pearlman)**
Pearlman, J Chem Phys, 98, 1487 (1994) Pearlman, J Chem Phys, 98, 1487 (1994)
**(Pedersen)** **(Pedersen)**
Pedersen, J. Chem. Phys., 139, 104102 (2013). Pedersen, J. Chem. Phys., 139, 104102 (2013).
**(Pedone)**
A. Pedone, G. Malavasi, M. C. Menziani, A. N. Cormack, and U. Segre, J. Phys. Chem. B, 110, 11780 (2006)
**(Peng)** **(Peng)**
Peng, Ren, Dudarev, Whelan, Acta Crystallogr. A, 52, 257-76 (1996). Peng, Ren, Dudarev, Whelan, Acta Crystallogr. A, 52, 257-76 (1996).
@ -925,6 +1143,9 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Pettifor_3)** **(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).
**(PFC)**
PFC Particle Flow Code 6.0 Documentation. Itasca Consulting Group.
**(Phillips)** **(Phillips)**
C.\ L. Phillips, J. A. Anderson, S. C. Glotzer, Comput Phys Comm, 230, 7191-7201 (2011). C.\ L. Phillips, J. A. Anderson, S. C. Glotzer, Comput Phys Comm, 230, 7191-7201 (2011).
@ -934,9 +1155,21 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Pisarev)** **(Pisarev)**
V V Pisarev and S V Starikov, J. Phys.: Condens. Matter, 26, 475401 (2014). V V Pisarev and S V Starikov, J. Phys.: Condens. Matter, 26, 475401 (2014).
**(Plimpton)**
Plimpton and Knight, JPDC, 147, 184-195 (2021).
**(PLUMED)**
G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014)
**(Pollock)** **(Pollock)**
Pollock and Glosli, Comp Phys Comm, 95, 93 (1996). Pollock and Glosli, Comp Phys Comm, 95, 93 (1996).
**(Ponder)**
Ponder, Wu, Ren, Pande, Chodera, Schnieders, Haque, Mobley, Lambrecht, DiStasio Jr, M. Head-Gordon, Clark, Johnson, T. Head-Gordon, J Phys Chem B, 114, 2549-2564 (2010).
**(Popov1)**
A.M. Popov, I. V. Lebedeva, A. A. Knizhnik, Y. E. Lozovik and B. V. Potapkin, Chem. Phys. Lett. 536, 82-86 (2012).
**(Price1)** **(Price1)**
Price and Brooks, J Chem Phys, 121, 10096 (2004). Price and Brooks, J Chem Phys, 121, 10096 (2004).
@ -976,6 +1209,12 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Rick)** **(Rick)**
S.\ W. Rick, S. J. Stuart, B. J. Berne, J Chem Phys 101, 16141 (1994). S.\ W. Rick, S. J. Stuart, B. J. Berne, J Chem Phys 101, 16141 (1994).
**(Rick2)**
S. W. Rick, S. J. Stuart, B. J. Berne, J Chem Phys 101, 6141
**(Roberts)**
R. Roberts (2019) "Evenly Distributing Points in a Triangle." Extreme Learning. `<http://extremelearning.com.au/evenly-distributing-points-in-a-triangle/>`_
**(Rohart)** **(Rohart)**
Rohart and Thiaville, Physical Review B, 88(18), 184422. (2013). Rohart and Thiaville, Physical Review B, 88(18), 184422. (2013).
@ -1012,9 +1251,18 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Sadigh)** **(Sadigh)**
B Sadigh, P Erhart, A Stukowski, A Caro, E Martinez, and L Zepeda-Ruiz, Phys. Rev. B, 85, 184203 (2012). B Sadigh, P Erhart, A Stukowski, A Caro, E Martinez, and L Zepeda-Ruiz, Phys. Rev. B, 85, 184203 (2012).
**(Sadigh1)**
B. Sadigh, P. Erhart, A. Stukowski, A. Caro, E. Martinez, and L. Zepeda-Ruiz, Phys. Rev. B **85**, 184203 (2012)
**(Sadigh2)**
B. Sadigh and P. Erhart, Phys. Rev. B **86**, 134204 (2012)
**(Safran)** **(Safran)**
Safran, Statistical Thermodynamics of Surfaces, Interfaces, And Membranes, Westview Press, ISBN: 978-0813340791 (2003). Safran, Statistical Thermodynamics of Surfaces, Interfaces, And Membranes, Westview Press, ISBN: 978-0813340791 (2003).
**(Salanne)**
Salanne, Rotenberg, Jahn, Vuilleumier, Simon, Christian and Madden, Theor Chem Acc, 131, 1143 (2012).
**(Salerno)** **(Salerno)**
Salerno, Bernstein, J Chem Theory Comput, --, ---- (2018). Salerno, Bernstein, J Chem Theory Comput, --, ---- (2018).
@ -1024,9 +1272,18 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Sanyal2)** **(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.
**(Scalfi)**
Scalfi *et al.*, J. Chem. Phys., 153, 174704 (2020).
**(Schelling)** **(Schelling)**
Patrick K. Schelling, Comp. Mat. Science, 44, 274 (2008). Patrick K. Schelling, Comp. Mat. Science, 44, 274 (2008).
**(Scherer1)**
C. Scherer and D. Andrienko, Phys. Chem. Chem. Phys. 20, 22387-22394 (2018).
**(Scherer2)**
C. Scherer, R. Scheid, D. Andrienko, and T. Bereau, J. Chem. Theor. Comp. 16, 3194-3204 (2020).
**(Schlitter1)** **(Schlitter1)**
Schlitter, Swegat, Mulders, "Distance-type reaction coordinates for modelling activated processes", J Molecular Modeling, 7, 171-177 (2001). Schlitter, Swegat, Mulders, "Distance-type reaction coordinates for modelling activated processes", J Molecular Modeling, 7, 171-177 (2001).
@ -1045,21 +1302,36 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Schroeder)** **(Schroeder)**
Schroeder and Steinhauser, J Chem Phys, 133, 154511 (2010). Schroeder and Steinhauser, J Chem Phys, 133, 154511 (2010).
**(Seleson 2010)**
Seleson, Parks, Int J Mult Comp Eng 9(6), pp. 689-706, 2011.
**(Semaev)** **(Semaev)**
Semaev, Cryptography and Lattices, 181 (2001). Semaev, Cryptography and Lattices, 181 (2001).
**(Seo)**
Seo, Shinoda, J Chem Theory Comput, 15, 762-774 (2019).
**(Sheppard)** **(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. Sheppard, Terrell, Henkelman, J Chem Phys, 128, 134106 (2008). See ref 1 in this paper for original reference to Qmin in Jonsson, Mills, Jacobsen.
**(Shi)**
Shi, Xia, Zhang, Best, Wu, Ponder, Ren, J Chem Theory Comp, 9, 4046, 2013.
**(Shinoda)** **(Shinoda)**
Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007). Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007).
**(Shinoda)** **(Shinoda)**
Shinoda, Shiga, and Mikami, Phys Rev B, 69, 134103 (2004). Shinoda, Shiga, and Mikami, Phys Rev B, 69, 134103 (2004).
**(Shire)**
Shire, Hanley and Stratford, Comp. Part. Mech., (2020).
**(Sides)** **(Sides)**
Sides, Grest, Stevens, Plimpton, J Polymer Science B, 42, 199-208 (2004). Sides, Grest, Stevens, Plimpton, J Polymer Science B, 42, 199-208 (2004).
**(Siepmann)**
Siepmann and Sprik, J. Chem. Phys. 102, 511 (1995).
**(Silbert)** **(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).
@ -1069,12 +1341,21 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Silling 2000)** **(Silling 2000)**
Silling, J Mech Phys Solids, 48, 175-209 (2000). Silling, J Mech Phys Solids, 48, 175-209 (2000).
**(Silling 2005)**
Silling Askari, Computer and Structures, 83, 1526-1535 (2005).
**(Silling 2007)** **(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)**
Singh and Warner, Acta Mater, 58, 5797-5805 (2010), Singh and Warner, Acta Mater, 58, 5797-5805 (2010),
**(Singraber, Behler and Dellago 2019)**
Singraber, A.; Behler, J.; Dellago, C. J., Chem. Theory Comput. 2019, 15 (3), 1827-1840
**(Singraber et al 2019)**
Singraber, A.; Morawietz, T.; Behler, J.; Dellago, C., J. Chem. Theory Comput. 2019, 15 (5), 3075-3092.
**(Sirk1)** **(Sirk1)**
Sirk TW, Sliozberg YR, Brennan JK, Lisal M, Andzelm JW, J Chem Phys, 136 (13) 134903, 2012. Sirk TW, Sliozberg YR, Brennan JK, Lisal M, Andzelm JW, J Chem Phys, 136 (13) 134903, 2012.
@ -1087,6 +1368,9 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Snodin)** **(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).
**(Son)**
Son, McDaniel, Cui and Yethiraj, J Phys Chem Lett, 10, 7523 (2019).
**(Srivastava)** **(Srivastava)**
Zhigilei, Wei, Srivastava, Phys. Rev. B 71, 165417 (2005). Zhigilei, Wei, Srivastava, Phys. Rev. B 71, 165417 (2005).
@ -1096,6 +1380,12 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Steinhardt)** **(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).
**(Steward)**
Stewart, Spearot, Modelling Simul. Mater. Sci. Eng. 21, 045003, (2013).
**(Stewart2018)**
J.A. Stewart, et al. (2018) Journal of Applied Physics, 123(16), 165902.
**(Stiles)** **(Stiles)**
Stiles , Hubbard, and Kayser, J Chem Phys, 77, 6189 (1982). Stiles , Hubbard, and Kayser, J Chem Phys, 77, 6189 (1982).
@ -1153,12 +1443,21 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Tainter 2015)** **(Tainter 2015)**
Tainter, Shi, and Skinner, 11, 2268 (2015) Tainter, Shi, and Skinner, 11, 2268 (2015)
**(Tang and Toennies)**
J Chem Phys, 80, 3726 (1984).
**(Tee)**
Tee and Searles, J. Chem. Phys. 156, 184101 (2022).
**(Templeton2010)** **(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)** **(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.
**(tenWolde)**
P.\ R. ten Wolde, M. J. Ruiz-Montero, D. Frenkel, J. Chem. Phys. 104, 9932 (1996).
**(Tersoff_1)** **(Tersoff_1)**
J.\ Tersoff, Phys Rev B, 37, 6991 (1988). J.\ Tersoff, Phys Rev B, 37, 6991 (1988).
@ -1201,6 +1500,9 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Tranchida)** **(Tranchida)**
Tranchida, Plimpton, Thibaudeau and Thompson, Journal of Computational Physics, 372, 406-425, (2018). Tranchida, Plimpton, Thibaudeau and Thompson, Journal of Computational Physics, 372, 406-425, (2018).
**(Tribello)**
G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014)
**(Tsuji et al, 1992)** **(Tsuji et al, 1992)**
Tsuji, Y., Tanaka, T., & Ishida, T. (1992). Lagrangian numerical simulation of plug flow of cohesionless particles in a horizontal pipe. Powder technology, 71(3), Tsuji, Y., Tanaka, T., & Ishida, T. (1992). Lagrangian numerical simulation of plug flow of cohesionless particles in a horizontal pipe. Powder technology, 71(3),
@ -1219,6 +1521,9 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Tuckerman4)** **(Tuckerman4)**
Tuckerman, Mundy, Balasubramanian, Klein, J Chem Phys, 106, 5615 (1997). Tuckerman, Mundy, Balasubramanian, Klein, J Chem Phys, 106, 5615 (1997).
**(Tyagi)**
Tyagi, Suzen, Sega, Barbosa, Kantorovich, Holm, J Chem Phys, 132, 154112 (2010)
**(Ulomek)** **(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
@ -1228,6 +1533,15 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Valone)** **(Valone)**
Valone, Baskes, Martin, Phys. Rev. B, 73, 214209 (2006). Valone, Baskes, Martin, Phys. Rev. B, 73, 214209 (2006).
**(vanWijk)**
M. M. van Wijk, A. Schuring, M. I. Katsnelson, and A. Fasolino, Physical Review Letters, 113, 135504 (2014)
**(Van Workum)**
K. Van Workum et al., J. Chem. Phys. 125 144506 (2006)
**(Vargas and McCarthy 2001)**
Vargas, W.L. and McCarthy, J.J. (2001).
**(Varshalovich)** **(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).
@ -1240,6 +1554,9 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Veld)** **(Veld)**
In 't Veld, Ismail, Grest, J Chem Phys, 127, 144711 (2007). In 't Veld, Ismail, Grest, J Chem Phys, 127, 144711 (2007).
**(Verstraelen)**
Verstraelen, Ayers, Speybroeck, Waroquier, J. Chem. Phys. 138, 074108 (2013).
**(Volkov1)** **(Volkov1)**
Volkov and Zhigilei, J Phys Chem C, 114, 5513 (2010). Volkov and Zhigilei, J Phys Chem C, 114, 5513 (2010).
@ -1264,6 +1581,9 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Wang et al, 2015)** **(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. Wang, Y., Alonso-Marroquin, F., & Guo, W. W. (2015). Rolling and sliding in 3-D discrete element models. Particuology, 23, 49-55.
**(Wang2020)**
X. Wang, S. Ramirez-Hinestrosa, J. Dobnikar, and D. Frenkel, Phys. Chem. Chem. Phys. 22, 10624 (2020).
**(Wang1)** **(Wang1)**
J.\ Wang, H. S. Yu, P. A. Langston, F. Y. Fraige, Granular Matter, 13, 1 (2011). J.\ Wang, H. S. Yu, P. A. Langston, F. Y. Fraige, Granular Matter, 13, 1 (2011).
@ -1303,6 +1623,9 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Wicaksono2)** **(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).
**(Winkler)**
Winkler, Wysocki, and Gompper, Soft Matter, 11, 6680 (2015).
**(Wirnsberger)** **(Wirnsberger)**
Wirnsberger, Frenkel, and Dellago, J Chem Phys, 143, 124104 (2015). Wirnsberger, Frenkel, and Dellago, J Chem Phys, 143, 124104 (2015).
@ -1315,9 +1638,27 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Wood)** **(Wood)**
Wood and Thompson, J Chem Phys, 148, 241721, (2018) Wood and Thompson, J Chem Phys, 148, 241721, (2018)
**(Xie23)**
Xie, S.R., Rupp, M. & Hennig, R.G. Ultra-fast interpretable machine-learning potentials. npj Comput Mater 9, 162 (2023). https://doi.org/10.1038/s41524-023-01092-7
**(Yade-DEM)**
V. Smilauer et al. (2021), Yade Documentation 3rd ed.
**(Yanxon2020)**
Yanxon, Zagaceta, Tang, Matteson, Zhu, Mach. Learn.: Sci. Technol. 2, 027001 (2020).
**(Yeh)** **(Yeh)**
Yeh and Berkowitz, J Chem Phys, 111, 3155 (1999). Yeh and Berkowitz, J Chem Phys, 111, 3155 (1999).
**(Yuan2010a)**
Yuan, Huang, Li, Lykotrafitis, Zhang, Phys. Rev. E, 82, 011905(2010).
**(Yuan2010b)**
Yuan, Huang, Zhang, Soft. Matter, 6, 4571(2010).
**(Zagaceta2020)**
Zagaceta, Yanxon, Zhu, J Appl Phys, 128, 045113 (2020).
**(ZBL)** **(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.
@ -1387,17 +1728,6 @@ D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Jo
**(Zimmerman2010)** **(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) -
**(de Koning)**
de Koning and Antonelli, Phys Rev E, 53, 465 (1996).
**(electronic stopping)** **(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).
**(vanWijk)**
M.\ M. van Wijk, A. Schuring, M. I. Katsnelson, and A. Fasolino, Physical Review Letters, 113, 135504 (2014)

View File

@ -37,8 +37,9 @@ standard. A more detailed discussion of that is below.
.. code-block:: bash .. code-block:: bash
-D BUILD_MPI=value # yes or no, default is yes if CMake finds MPI, else no -D BUILD_MPI=value # yes or no, default is yes if CMake finds MPI
-D BUILD_OMP=value # yes or no, default is yes if a compatible compiler is detected -D BUILD_OMP=value # yes or no, default is yes if a compatible
# compiler is detected
-D LAMMPS_MACHINE=name # name = mpi, serial, mybox, titan, laptop, etc -D LAMMPS_MACHINE=name # name = mpi, serial, mybox, titan, laptop, etc
# no default value # no default value
@ -74,7 +75,7 @@ standard. A more detailed discussion of that is below.
this is ``-fopenmp``\ , which can be added to the ``CC`` and this is ``-fopenmp``\ , which can be added to the ``CC`` and
``LINK`` makefile variables. ``LINK`` makefile variables.
For the serial build the following make variables are set (see src/MAKE/Makefile.serial): For the serial build the following make variables are set (see ``src/MAKE/Makefile.serial``):
.. code-block:: make .. code-block:: make
@ -231,24 +232,32 @@ LAMMPS.
.. code-block:: bash .. code-block:: bash
# Building with GNU Compilers: # Building with GNU Compilers:
cmake ../cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_Fortran_COMPILER=gfortran cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ \
# Building with Intel Compilers: -DCMAKE_Fortran_COMPILER=gfortran ../cmake
cmake ../cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc -DCMAKE_Fortran_COMPILER=ifort # Building with Intel Classic Compilers:
cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc \
-DCMAKE_Fortran_COMPILER=ifort ../cmake
# Building with Intel oneAPI Compilers: # Building with Intel oneAPI Compilers:
cmake ../cmake -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCMAKE_Fortran_COMPILER=ifx cmake -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx \
-DCMAKE_Fortran_COMPILER=ifx ../cmake
# Building with LLVM/Clang Compilers: # Building with LLVM/Clang Compilers:
cmake ../cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_Fortran_COMPILER=flang cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_Fortran_COMPILER=flang ../cmake
# Building with PGI/Nvidia Compilers: # Building with PGI/Nvidia Compilers:
cmake ../cmake -DCMAKE_C_COMPILER=pgcc -DCMAKE_CXX_COMPILER=pgc++ -DCMAKE_Fortran_COMPILER=pgfortran cmake -DCMAKE_C_COMPILER=pgcc -DCMAKE_CXX_COMPILER=pgc++ \
-DCMAKE_Fortran_COMPILER=pgfortran ../cmake
# Building with the NVHPC Compilers:
cmake -DCMAKE_C_COMPILER=nvc -DCMAKE_CXX_COMPILER=nvc++ \
-DCMAKE_Fortran_COMPILER=nvfortran ../cmake
For compiling with the Clang/LLVM compilers a CMake preset is For compiling with the Clang/LLVM compilers a CMake preset is
provided that can be loaded with provided that can be loaded with
`-C ../cmake/presets/clang.cmake`. Similarly, ``-C ../cmake/presets/clang.cmake``. Similarly,
`-C ../cmake/presets/intel.cmake` should switch the compiler ``-C ../cmake/presets/intel.cmake`` should switch the compiler
toolchain to the legacy Intel compilers, `-C ../cmake/presets/oneapi.cmake` toolchain to the legacy Intel compilers, ``-C ../cmake/presets/oneapi.cmake``
will switch to the LLVM based oneAPI Intel compilers, will switch to the LLVM based oneAPI Intel compilers,
and `-C ../cmake/presets/pgi.cmake` ``-C ../cmake/presets/pgi.cmake`` will switch the compiler to the PGI compilers,
will switch the compiler to the PGI compilers. and ``-C ../cmake/presets/nvhpc.cmake`` will switch to the NVHPC compilers.
Furthermore, you can set ``CMAKE_TUNE_FLAGS`` to specifically add Furthermore, you can set ``CMAKE_TUNE_FLAGS`` to specifically add
compiler flags to tune for optimal performance on given hosts. compiler flags to tune for optimal performance on given hosts.
@ -259,7 +268,7 @@ LAMMPS.
When the cmake command completes, it prints a summary to the When the cmake command completes, it prints a summary to the
screen which compilers it is using and what flags and settings screen which compilers it is using and what flags and settings
will be used for the compilation. Note that if the top-level will be used for the compilation. Note that if the top-level
compiler is mpicxx, it is simply a wrapper on a real compiler. compiler is ``mpicxx``, it is simply a wrapper on a real compiler.
The underlying compiler info is what CMake will try to The underlying compiler info is what CMake will try to
determine and report. You should check to confirm you are determine and report. You should check to confirm you are
using the compiler and optimization flags you want. using the compiler and optimization flags you want.
@ -316,10 +325,10 @@ LAMMPS.
there may be specific compiler or linker flags that are either there may be specific compiler or linker flags that are either
required or recommended to enable required features and to required or recommended to enable required features and to
achieve optimal performance. You need to include these in the achieve optimal performance. You need to include these in the
CCFLAGS and LINKFLAGS settings above. For details, see the ``CCFLAGS`` and ``LINKFLAGS`` settings above. For details, see the
documentation for the individual packages listed on the documentation for the individual packages listed on the
:doc:`Speed_packages` page. Or examine these files in the :doc:`Speed_packages` page. Or examine these files in the
src/MAKE/OPTIONS directory. They correspond to each of the 5 ``src/MAKE/OPTIONS`` directory. They correspond to each of the 5
accelerator packages and their hardware variants: accelerator packages and their hardware variants:
.. code-block:: bash .. code-block:: bash
@ -388,7 +397,8 @@ running LAMMPS from Python via its library interface.
make machine # build LAMMPS executable lmp_machine make machine # build LAMMPS executable lmp_machine
make mode=static machine # same as "make machine" make mode=static machine # same as "make machine"
make mode=shared machine # build LAMMPS shared lib liblammps_machine.so instead make mode=shared machine # build LAMMPS shared lib liblammps_machine.so
# instead
The "static" build will generate a static library called The "static" build will generate a static library called
``liblammps_machine.a`` and an executable named ``lmp_machine``\ , ``liblammps_machine.a`` and an executable named ``lmp_machine``\ ,
@ -450,7 +460,7 @@ installation.
Including or removing debug support Including or removing debug support
----------------------------------- -----------------------------------
By default the compilation settings will include the *-g* flag which By default the compilation settings will include the ``-g`` flag which
instructs the compiler to include debug information (e.g. which line of instructs the compiler to include debug information (e.g. which line of
source code a particular instruction correspond to). This can be source code a particular instruction correspond to). This can be
extremely useful in case LAMMPS crashes and can help to provide crucial extremely useful in case LAMMPS crashes and can help to provide crucial
@ -463,7 +473,7 @@ If this is a concern, you can change the compilation settings or remove
the debug information from the LAMMPS executable: the debug information from the LAMMPS executable:
- **Traditional make**: edit your ``Makefile.<machine>`` to remove the - **Traditional make**: edit your ``Makefile.<machine>`` to remove the
*-g* flag from the ``CCFLAGS`` and ``LINKFLAGS`` definitions ``-g`` flag from the ``CCFLAGS`` and ``LINKFLAGS`` definitions
- **CMake**: use ``-D CMAKE_BUILD_TYPE=Release`` or explicitly reset - **CMake**: use ``-D CMAKE_BUILD_TYPE=Release`` or explicitly reset
the applicable compiler flags (best done using the text mode or the applicable compiler flags (best done using the text mode or
graphical user interface). graphical user interface).
@ -488,7 +498,9 @@ using CMake or Make.
.. code-block:: bash .. code-block:: bash
-D BUILD_TOOLS=value # yes or no (default). Build binary2txt, chain.x, micelle2d.x, msi2lmp, phana, stl_bin2txt -D BUILD_TOOLS=value # yes or no (default). Build binary2txt,
# chain.x, micelle2d.x, msi2lmp, phana,
# stl_bin2txt
-D BUILD_LAMMPS_GUI=value # yes or no (default). Build LAMMPS-GUI -D BUILD_LAMMPS_GUI=value # yes or no (default). Build LAMMPS-GUI
The generated binaries will also become part of the LAMMPS installation The generated binaries will also become part of the LAMMPS installation

View File

@ -131,20 +131,20 @@ file called ``CMakeLists.txt`` (for LAMMPS it is located in the
configuration step. The cache file contains all current CMake settings. configuration step. The cache file contains all current CMake settings.
To modify settings, enable or disable features, you need to set To modify settings, enable or disable features, you need to set
*variables* with either the *-D* command line flag (``-D *variables* with either the ``-D`` command line flag (``-D
VARIABLE1_NAME=value``) or change them in the text mode of the graphical VARIABLE1_NAME=value``) or change them in the text mode of the graphical
user interface. The *-D* flag can be used several times in one command. user interface. The ``-D`` flag can be used several times in one command.
For your convenience, we provide :ref:`CMake presets <cmake_presets>` For your convenience, we provide :ref:`CMake presets <cmake_presets>`
that combine multiple settings to enable optional LAMMPS packages or use that combine multiple settings to enable optional LAMMPS packages or use
a different compiler tool chain. Those are loaded with the *-C* flag a different compiler tool chain. Those are loaded with the ``-C`` flag
(``-C ../cmake/presets/basic.cmake``). This step would only be needed (``-C ../cmake/presets/basic.cmake``). This step would only be needed
once, as the settings from the preset files are stored in the once, as the settings from the preset files are stored in the
``CMakeCache.txt`` file. It is also possible to customize the build ``CMakeCache.txt`` file. It is also possible to customize the build
by adding one or more *-D* flags to the CMake command line. by adding one or more ``-D`` flags to the CMake command line.
Generating files for alternate build tools (e.g. Ninja) and project files Generating files for alternate build tools (e.g. Ninja) and project files
for IDEs like Eclipse, CodeBlocks, or Kate can be selected using the *-G* for IDEs like Eclipse, CodeBlocks, or Kate can be selected using the ``-G``
command line flag. A list of available generator settings for your command line flag. A list of available generator settings for your
specific CMake version is given when running ``cmake --help``. specific CMake version is given when running ``cmake --help``.
@ -171,7 +171,7 @@ files. E.g. with:
In that case the resulting binaries are not in the build folder directly In that case the resulting binaries are not in the build folder directly
but in subdirectories corresponding to the build type (i.e. Release in but in subdirectories corresponding to the build type (i.e. Release in
the example from above). Similarly, for running unit tests the the example from above). Similarly, for running unit tests the
configuration is selected with the *-C* flag: configuration is selected with the ``-C`` flag:
.. code-block:: bash .. code-block:: bash

View File

@ -181,24 +181,24 @@ The output of this command will be looking something like this:
$ ctest $ ctest
Test project /home/akohlmey/compile/lammps/build-testing Test project /home/akohlmey/compile/lammps/build-testing
Start 1: RunLammps Start 1: RunLammps
1/563 Test #1: RunLammps .......................................... Passed 0.28 sec 1/563 Test #1: RunLammps .................................. Passed 0.28 sec
Start 2: HelpMessage Start 2: HelpMessage
2/563 Test #2: HelpMessage ........................................ Passed 0.06 sec 2/563 Test #2: HelpMessage ................................ Passed 0.06 sec
Start 3: InvalidFlag Start 3: InvalidFlag
3/563 Test #3: InvalidFlag ........................................ Passed 0.06 sec 3/563 Test #3: InvalidFlag ................................ Passed 0.06 sec
Start 4: Tokenizer Start 4: Tokenizer
4/563 Test #4: Tokenizer .......................................... Passed 0.05 sec 4/563 Test #4: Tokenizer .................................. Passed 0.05 sec
Start 5: MemPool Start 5: MemPool
5/563 Test #5: MemPool ............................................ Passed 0.05 sec 5/563 Test #5: MemPool .................................... Passed 0.05 sec
Start 6: ArgUtils Start 6: ArgUtils
6/563 Test #6: ArgUtils ........................................... Passed 0.05 sec 6/563 Test #6: ArgUtils ................................... Passed 0.05 sec
[...] [...]
Start 561: ImproperStyle:zero Start 561: ImproperStyle:zero
561/563 Test #561: ImproperStyle:zero ................................. Passed 0.07 sec 561/563 Test #561: ImproperStyle:zero ......................... Passed 0.07 sec
Start 562: TestMliapPyUnified Start 562: TestMliapPyUnified
562/563 Test #562: TestMliapPyUnified ................................. Passed 0.16 sec 562/563 Test #562: TestMliapPyUnified ......................... Passed 0.16 sec
Start 563: TestPairList Start 563: TestPairList
563/563 Test #563: TestPairList ....................................... Passed 0.06 sec 563/563 Test #563: TestPairList ............................... Passed 0.06 sec
100% tests passed, 0 tests failed out of 563 100% tests passed, 0 tests failed out of 563
@ -213,24 +213,25 @@ The output of this command will be looking something like this:
The ``ctest`` command has many options, the most important ones are: The ``ctest`` command has many options, the most important ones are:
.. list-table:: .. list-table::
:widths: 20 80
* - Option * - Option
- Function - Function
* - -V * - ``-V``
- verbose output: display output of individual test runs - verbose output: display output of individual test runs
* - -j <num> * - ``-j <num>``
- parallel run: run <num> tests in parallel - parallel run: run <num> tests in parallel
* - -R <regex> * - ``-R <regex>``
- run subset of tests matching the regular expression <regex> - run subset of tests matching the regular expression <regex>
* - -E <regex> * - ``-E <regex>``
- exclude subset of tests matching the regular expression <regex> - exclude subset of tests matching the regular expression <regex>
* - -L <regex> * - ``-L <regex>``
- run subset of tests with a label matching the regular expression <regex> - run subset of tests with a label matching the regular expression <regex>
* - -LE <regex> * - ``-LE <regex>``
- exclude subset of tests with a label matching the regular expression <regex> - exclude subset of tests with a label matching the regular expression <regex>
* - -N * - ``-N``
- dry-run: display list of tests without running them - dry-run: display list of tests without running them
* - -T memcheck * - ``-T memcheck``
- run tests with valgrind memory checker (if available) - run tests with valgrind memory checker (if available)
In its full implementation, the unit test framework will consist of multiple In its full implementation, the unit test framework will consist of multiple
@ -336,16 +337,17 @@ paths in the individual source files.
The force style test programs have a common set of options: The force style test programs have a common set of options:
.. list-table:: .. list-table::
:widths: 25 75
* - Option * - Option
- Function - Function
* - -g <newfile> * - ``-g <newfile>``
- regenerate reference data in new YAML file - regenerate reference data in new YAML file
* - -u * - ``-u``
- update reference data in the original YAML file - update reference data in the original YAML file
* - -s * - ``-s``
- print error statistics for each group of comparisons - print error statistics for each group of comparisons
* - -v * - ``-v``
- verbose output: also print the executed LAMMPS commands - verbose output: also print the executed LAMMPS commands
The ``ctest`` tool has no mechanism to directly pass flags to the individual The ``ctest`` tool has no mechanism to directly pass flags to the individual
@ -359,10 +361,10 @@ set in an environment variable ``TEST_ARGS``. Example:
To add a test for a style that is not yet covered, it is usually best To add a test for a style that is not yet covered, it is usually best
to copy a YAML file for a similar style to a new file, edit the details to copy a YAML file for a similar style to a new file, edit the details
of the style (how to call it, how to set its coefficients) and then of the style (how to call it, how to set its coefficients) and then
run test command with either the *-g* and the replace the initial run test command with either the ``-g`` and the replace the initial
test file with the regenerated one or the *-u* option. The *-u* option test file with the regenerated one or the ``-u`` option. The ``-u`` option
will destroy the original file, if the generation run does not complete, will destroy the original file, if the generation run does not complete,
so using *-g* is recommended unless the YAML file is fully tested so using ``-g`` is recommended unless the YAML file is fully tested
and working. and working.
Some of the force style tests are rather slow to run and some are very Some of the force style tests are rather slow to run and some are very
@ -512,7 +514,9 @@ After post-processing with ``gen_coverage_html`` the results are in
a folder ``coverage_html`` and can be viewed with a web browser. a folder ``coverage_html`` and can be viewed with a web browser.
The images below illustrate how the data is presented. The images below illustrate how the data is presented.
.. list-table:: .. only:: not latex
.. list-table::
* - .. figure:: JPG/coverage-overview-top.png * - .. figure:: JPG/coverage-overview-top.png
:scale: 25% :scale: 25%
@ -534,6 +538,28 @@ The images below illustrate how the data is presented.
Source page with branches Source page with branches
.. only:: latex
.. figure:: JPG/coverage-overview-top.png
:width: 60%
Top of the overview page
.. figure:: JPG/coverage-overview-manybody.png
:width: 60%
Styles with good coverage
.. figure:: JPG/coverage-file-top.png
:width: 60%
Top of individual source page
.. figure:: JPG/coverage-file-branches.png
:width: 60%
Source page with branches
Coding style utilities Coding style utilities
---------------------- ----------------------

View File

@ -14,7 +14,7 @@ in addition to
cmake -D PKG_NAME=yes cmake -D PKG_NAME=yes
- .. code-block:: console - .. code-block:: bash
make yes-name make yes-name
@ -73,7 +73,7 @@ COMPRESS package
To build with this package you must have the `zlib compression library To build with this package you must have the `zlib compression library
<https://zlib.net>`_ available on your system to build dump styles with <https://zlib.net>`_ available on your system to build dump styles with
a '/gz' suffix. There are also styles using the a ``/gz`` suffix. There are also styles using the
`Zstandard <https://facebook.github.io/zstd/>`_ library which have a `Zstandard <https://facebook.github.io/zstd/>`_ library which have a
'/zstd' suffix. The zstd library version must be at least 1.4. Older '/zstd' suffix. The zstd library version must be at least 1.4. Older
versions use an incompatible API and thus LAMMPS will fail to compile. versions use an incompatible API and thus LAMMPS will fail to compile.
@ -95,7 +95,7 @@ versions use an incompatible API and thus LAMMPS will fail to compile.
<https://www.freedesktop.org/wiki/Software/pkg-config/>`_ tool to <https://www.freedesktop.org/wiki/Software/pkg-config/>`_ tool to
identify the necessary flags to compile with this library, so the identify the necessary flags to compile with this library, so the
corresponding ``libzstandard.pc`` file must be in a folder where corresponding ``libzstandard.pc`` file must be in a folder where
pkg-config can find it, which may require adding it to the ``pkg-config`` can find it, which may require adding it to the
``PKG_CONFIG_PATH`` environment variable. ``PKG_CONFIG_PATH`` environment variable.
.. tab:: Traditional make .. tab:: Traditional make
@ -127,46 +127,53 @@ CMake build
# value = double or mixed (default) or single # value = double or mixed (default) or single
-D GPU_ARCH=value # primary GPU hardware choice for GPU_API=cuda -D GPU_ARCH=value # primary GPU hardware choice for GPU_API=cuda
# value = sm_XX (see below, default is sm_50) # value = sm_XX (see below, default is sm_50)
-D GPU_DEBUG=value # enable debug code in the GPU package library, mostly useful for developers -D GPU_DEBUG=value # enable debug code in the GPU package library,
# mostly useful for developers
# value = yes or no (default) # value = yes or no (default)
-D HIP_PATH=value # value = path to HIP installation. Must be set if GPU_API=HIP -D HIP_PATH=value # value = path to HIP installation. Must be set if
# GPU_API=HIP
-D HIP_ARCH=value # primary GPU hardware choice for GPU_API=hip -D HIP_ARCH=value # primary GPU hardware choice for GPU_API=hip
# value depends on selected HIP_PLATFORM # value depends on selected HIP_PLATFORM
# default is 'gfx906' for HIP_PLATFORM=amd and 'sm_50' for HIP_PLATFORM=nvcc # default is 'gfx906' for HIP_PLATFORM=amd and 'sm_50' for
# HIP_PLATFORM=nvcc
-D HIP_USE_DEVICE_SORT=value # enables GPU sorting -D HIP_USE_DEVICE_SORT=value # enables GPU sorting
# value = yes (default) or no # value = yes (default) or no
-D CUDPP_OPT=value # use GPU binning on with CUDA (should be off for modern GPUs) -D CUDPP_OPT=value # use GPU binning with CUDA (should be off for modern GPUs)
# enables CUDA Performance Primitives, must be "no" for CUDA_MPS_SUPPORT=yes # enables CUDA Performance Primitives, must be "no" for
# CUDA_MPS_SUPPORT=yes
# value = yes or no (default) # value = yes or no (default)
-D CUDA_MPS_SUPPORT=value # enables some tweaks required to run with active nvidia-cuda-mps daemon -D CUDA_MPS_SUPPORT=value # enables some tweaks required to run with active
# nvidia-cuda-mps daemon
# value = yes or no (default) # value = yes or no (default)
-D CUDA_BUILD_MULTIARCH=value # enables building CUDA kernels for all supported GPU architectures -D CUDA_BUILD_MULTIARCH=value # enables building CUDA kernels for all supported GPU
# architectures
# value = yes (default) or no # value = yes (default) or no
-D USE_STATIC_OPENCL_LOADER=value # downloads/includes OpenCL ICD loader library, no local OpenCL headers/libs needed -D USE_STATIC_OPENCL_LOADER=value # downloads/includes OpenCL ICD loader library,
# no local OpenCL headers/libs needed
# value = yes (default) or no # value = yes (default) or no
:code:`GPU_ARCH` settings for different GPU hardware is as follows: ``GPU_ARCH`` settings for different GPU hardware is as follows:
* sm_30 for Kepler (supported since CUDA 5 and until CUDA 10.x) * ``sm_30`` for Kepler (supported since CUDA 5 and until CUDA 10.x)
* sm_35 or sm_37 for Kepler (supported since CUDA 5 and until CUDA 11.x) * ``sm_35`` or ``sm_37`` for Kepler (supported since CUDA 5 and until CUDA 11.x)
* sm_50 or sm_52 for Maxwell (supported since CUDA 6) * ``sm_50`` or ``sm_52`` for Maxwell (supported since CUDA 6)
* sm_60 or sm_61 for Pascal (supported since CUDA 8) * ``sm_60`` or ``sm_61`` for Pascal (supported since CUDA 8)
* sm_70 for Volta (supported since CUDA 9) * ``sm_70`` for Volta (supported since CUDA 9)
* sm_75 for Turing (supported since CUDA 10) * ``sm_75`` for Turing (supported since CUDA 10)
* sm_80 or sm_86 for Ampere (supported since CUDA 11, sm_86 since CUDA 11.1) * ``sm_80`` or sm_86 for Ampere (supported since CUDA 11, sm_86 since CUDA 11.1)
* sm_89 for Lovelace (supported since CUDA 11.8) * ``sm_89`` for Lovelace (supported since CUDA 11.8)
* sm_90 for Hopper (supported since CUDA 12.0) * ``sm_90`` for Hopper (supported since CUDA 12.0)
A more detailed list can be found, for example, A more detailed list can be found, for example,
at `Wikipedia's CUDA article <https://en.wikipedia.org/wiki/CUDA#GPUs_supported>`_ at `Wikipedia's CUDA article <https://en.wikipedia.org/wiki/CUDA#GPUs_supported>`_
CMake can detect which version of the CUDA toolkit is used and thus will CMake can detect which version of the CUDA toolkit is used and thus will
try to include support for **all** major GPU architectures supported by try to include support for **all** major GPU architectures supported by
this toolkit. Thus the GPU_ARCH setting is merely an optimization, to this toolkit. Thus the ``GPU_ARCH`` setting is merely an optimization, to
have code for the preferred GPU architecture directly included rather have code for the preferred GPU architecture directly included rather
than having to wait for the JIT compiler of the CUDA driver to translate than having to wait for the JIT compiler of the CUDA driver to translate
it. This behavior can be turned off (e.g. to speed up compilation) by it. This behavior can be turned off (e.g. to speed up compilation) by
setting :code:`CUDA_ENABLE_MULTIARCH` to :code:`no`. setting ``CUDA_ENABLE_MULTIARCH`` to ``no``.
When compiling for CUDA or HIP with CUDA, version 8.0 or later of the When compiling for CUDA or HIP with CUDA, version 8.0 or later of the
CUDA toolkit is required and a GPU architecture of Kepler or later, CUDA toolkit is required and a GPU architecture of Kepler or later,
@ -185,21 +192,21 @@ build, and link with a static OpenCL ICD loader library and standard
OpenCL headers. This way no local OpenCL development headers or library OpenCL headers. This way no local OpenCL development headers or library
needs to be present and only OpenCL compatible drivers need to be needs to be present and only OpenCL compatible drivers need to be
installed to use OpenCL. If this is not desired, you can set installed to use OpenCL. If this is not desired, you can set
:code:`USE_STATIC_OPENCL_LOADER` to :code:`no`. ``USE_STATIC_OPENCL_LOADER`` to ``no``.
The GPU library has some multi-thread support using OpenMP. If LAMMPS The GPU library has some multi-thread support using OpenMP. If LAMMPS
is built with ``-D BUILD_OMP=on`` this will also be enabled. is built with ``-D BUILD_OMP=on`` this will also be enabled.
If you are compiling with HIP, note that before running CMake you will If you are compiling with HIP, note that before running CMake you will
have to set appropriate environment variables. Some variables such as have to set appropriate environment variables. Some variables such as
:code:`HCC_AMDGPU_TARGET` (for ROCm <= 4.0) or :code:`CUDA_PATH` are ``HCC_AMDGPU_TARGET`` (for ROCm <= 4.0) or ``CUDA_PATH`` are
necessary for :code:`hipcc` and the linker to work correctly. necessary for ``hipcc`` and the linker to work correctly.
.. versionadded:: 3Aug2022 .. versionadded:: 3Aug2022
Using the CHIP-SPV implementation of HIP is supported. It allows one to Using the CHIP-SPV implementation of HIP is supported. It allows one to
run HIP code on Intel GPUs via the OpenCL or Level Zero backends. To use run HIP code on Intel GPUs via the OpenCL or Level Zero backends. To use
CHIP-SPV, you must set :code:`-DHIP_USE_DEVICE_SORT=OFF` in your CMake CHIP-SPV, you must set ``-DHIP_USE_DEVICE_SORT=OFF`` in your CMake
command line as CHIP-SPV does not yet support hipCUB. As of Summer 2022, command line as CHIP-SPV does not yet support hipCUB. As of Summer 2022,
the use of HIP for Intel GPUs is experimental. You should only use this the use of HIP for Intel GPUs is experimental. You should only use this
option in preparations to run on Aurora system at Argonne. option in preparations to run on Aurora system at Argonne.
@ -257,28 +264,35 @@ script with the specified args:
.. code-block:: bash .. code-block:: bash
make lib-gpu # print help message # print help message
make lib-gpu args="-b" # build GPU library with default Makefile.linux make lib-gpu
make lib-gpu args="-m xk7 -p single -o xk7.single" # create new Makefile.xk7.single, altered for single-precision
make lib-gpu args="-m mpi -a sm_60 -p mixed -b" # build GPU library with mixed precision and P100 using other settings in Makefile.mpi # build GPU library with default Makefile.linux
make lib-gpu args="-b"
# create new Makefile.xk7.single, altered for single-precision
make lib-gpu args="-m xk7 -p single -o xk7.single"
# build GPU library with mixed precision and P100 using other settings in Makefile.mpi
make lib-gpu args="-m mpi -a sm_60 -p mixed -b"
Note that this procedure starts with a Makefile.machine in lib/gpu, as Note that this procedure starts with a Makefile.machine in lib/gpu, as
specified by the "-m" switch. For your convenience, machine makefiles specified by the ``-m`` switch. For your convenience, machine makefiles
for "mpi" and "serial" are provided, which have the same settings as for "mpi" and "serial" are provided, which have the same settings as
the corresponding machine makefiles in the main LAMMPS source the corresponding machine makefiles in the main LAMMPS source
folder. In addition you can alter 4 important settings in the folder. In addition you can alter 4 important settings in the
Makefile.machine you start from via the corresponding -c, -a, -p, -e Makefile.machine you start from via the corresponding ``-c``, ``-a``, ``-p``, ``-e``
switches (as in the examples above), and also save a copy of the new switches (as in the examples above), and also save a copy of the new
Makefile if desired: Makefile if desired:
* ``CUDA_HOME`` = where NVIDIA CUDA software is installed on your system * ``CUDA_HOME`` = where NVIDIA CUDA software is installed on your system
* ``CUDA_ARCH`` = sm_XX, what GPU hardware you have, same as CMake GPU_ARCH above * ``CUDA_ARCH`` = ``sm_XX``, what GPU hardware you have, same as CMake ``GPU_ARCH`` above
* ``CUDA_PRECISION`` = precision (double, mixed, single) * ``CUDA_PRECISION`` = precision (double, mixed, single)
* ``EXTRAMAKE`` = which Makefile.lammps.\* file to copy to Makefile.lammps * ``EXTRAMAKE`` = which ``Makefile.lammps.*`` file to copy to Makefile.lammps
The file Makefile.cuda is set up to include support for multiple The file ``Makefile.cuda`` is set up to include support for multiple
GPU architectures as supported by the CUDA toolkit in use. This is done GPU architectures as supported by the CUDA toolkit in use. This is done
through using the "--gencode " flag, which can be used multiple times and through using the ``--gencode`` flag, which can be used multiple times and
thus support all GPU architectures supported by your CUDA compiler. thus support all GPU architectures supported by your CUDA compiler.
To enable GPU binning via CUDA performance primitives set the Makefile variable To enable GPU binning via CUDA performance primitives set the Makefile variable
@ -349,12 +363,16 @@ minutes to hours) to build. Of course you only need to do that once.)
.. code-block:: bash .. code-block:: bash
-D DOWNLOAD_KIM=value # download OpenKIM API v2 for build, value = no (default) or yes -D DOWNLOAD_KIM=value # download OpenKIM API v2 for build
-D LMP_DEBUG_CURL=value # set libcurl verbose mode on/off, value = off (default) or on # value = no (default) or yes
-D LMP_NO_SSL_CHECK=value # tell libcurl to not verify the peer, value = no (default) or yes -D LMP_DEBUG_CURL=value # set libcurl verbose mode on/off
-D KIM_EXTRA_UNITTESTS=value # enables extra unit tests, value = no (default) or yes # value = off (default) or on
-D LMP_NO_SSL_CHECK=value # tell libcurl to not verify the peer
# value = no (default) or yes
-D KIM_EXTRA_UNITTESTS=value # enables extra unit tests
# value = no (default) or yes
If ``DOWNLOAD_KIM`` is set to *yes* (or *on*), the KIM API library If ``DOWNLOAD_KIM`` is set to ``yes`` (or ``on``), the KIM API library
will be downloaded and built inside the CMake build directory. If will be downloaded and built inside the CMake build directory. If
the KIM library is already installed on your system (in a location the KIM library is already installed on your system (in a location
where CMake cannot find it), you may need to set the where CMake cannot find it), you may need to set the
@ -362,7 +380,7 @@ minutes to hours) to build. Of course you only need to do that once.)
found, or run the command ``source kim-api-activate``. found, or run the command ``source kim-api-activate``.
Extra unit tests can only be available if they are explicitly requested Extra unit tests can only be available if they are explicitly requested
(``KIM_EXTRA_UNITTESTS`` is set to *yes* (or *on*)) and the prerequisites (``KIM_EXTRA_UNITTESTS`` is set to ``yes`` (or ``on``)) and the prerequisites
are met. See :ref:`KIM Extra unit tests <kim_extra_unittests>` for are met. See :ref:`KIM Extra unit tests <kim_extra_unittests>` for
more details on this. more details on this.
@ -376,15 +394,28 @@ minutes to hours) to build. Of course you only need to do that once.)
.. code-block:: bash .. code-block:: bash
make lib-kim # print help message # print help message
make lib-kim args="-b " # (re-)install KIM API lib with only example models make lib-kim
make lib-kim args="-b -a Glue_Ercolessi_Adams_Al__MO_324507536345_001" # ditto plus one model
make lib-kim args="-b -a everything" # install KIM API lib with all models
make lib-kim args="-n -a EAM_Dynamo_Ackland_W__MO_141627196590_002" # add one model or model driver
make lib-kim args="-p /usr/local" # use an existing KIM API installation at the provided location
make lib-kim args="-p /usr/local -a EAM_Dynamo_Ackland_W__MO_141627196590_002" # ditto but add one model or driver
When using the "-b " option, the KIM library is built using its native # (re-)install KIM API lib with only example models
make lib-kim args="-b"
# ditto plus one model
make lib-kim args="-b -a Glue_Ercolessi_Adams_Al__MO_324507536345_001"
# install KIM API lib with all models
make lib-kim args="-b -a everything"
# add one model or model driver
make lib-kim args="-n -a EAM_Dynamo_Ackland_W__MO_141627196590_002"
# use an existing KIM API installation at the provided location
make lib-kim args="-p <prefix>"
# ditto but add one model or driver
make lib-kim args="-p <prefix> -a EAM_Dynamo_Ackland_W__MO_141627196590_002"
When using the ``-b`` option, the KIM library is built using its native
cmake build system. The ``lib/kim/Install.py`` script supports a cmake build system. The ``lib/kim/Install.py`` script supports a
``CMAKE`` environment variable if the cmake executable is named other ``CMAKE`` environment variable if the cmake executable is named other
than ``cmake`` on your system. Additional environment variables may be than ``cmake`` on your system. Additional environment variables may be
@ -394,7 +425,9 @@ minutes to hours) to build. Of course you only need to do that once.)
.. code-block:: bash .. code-block:: bash
CMAKE=cmake3 CXX=g++-11 CC=gcc-11 FC=gfortran-11 make lib-kim args="-b " # (re-)install KIM API lib using cmake3 and gnu v11 compilers with only example models # (re-)install KIM API lib using cmake3 and gnu v11 compilers
# with only example models
CMAKE=cmake3 CXX=g++-11 CC=gcc-11 FC=gfortran-11 make lib-kim args="-b"
Settings for debugging OpenKIM web queries discussed below need to Settings for debugging OpenKIM web queries discussed below need to
be applied by adding them to the ``LMP_INC`` variable through be applied by adding them to the ``LMP_INC`` variable through
@ -434,7 +467,7 @@ KIM Extra unit tests (CMake only)
During development, testing, or debugging, if During development, testing, or debugging, if
:doc:`unit testing <Build_development>` is enabled in LAMMPS, one can also :doc:`unit testing <Build_development>` is enabled in LAMMPS, one can also
enable extra tests on :doc:`KIM commands <kim_commands>` by setting the enable extra tests on :doc:`KIM commands <kim_commands>` by setting the
``KIM_EXTRA_UNITTESTS`` to *yes* (or *on*). ``KIM_EXTRA_UNITTESTS`` to ``yes`` (or ``on``).
Enabling the extra unit tests have some requirements, Enabling the extra unit tests have some requirements,
@ -449,10 +482,12 @@ Enabling the extra unit tests have some requirements,
*conda-forge* channel as ``conda install kim-property`` if LAMMPS is built in *conda-forge* channel as ``conda install kim-property`` if LAMMPS is built in
Conda. More detailed information is available at: Conda. More detailed information is available at:
`kim-property installation <https://github.com/openkim/kim-property#installing-kim-property>`_. `kim-property installation <https://github.com/openkim/kim-property#installing-kim-property>`_.
* It is also necessary to install * It is also necessary to install the following KIM models:
``EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000``,
``EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005``, and * ``EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000``
``LennardJones612_UniversalShifted__MO_959249795837_003`` KIM models. * ``EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005``
* ``LennardJones612_UniversalShifted__MO_959249795837_003``
See `Obtaining KIM Models <https://openkim.org/doc/usage/obtaining-models>`_ See `Obtaining KIM Models <https://openkim.org/doc/usage/obtaining-models>`_
to learn how to install a pre-built binary of the OpenKIM Repository of to learn how to install a pre-built binary of the OpenKIM Repository of
Models or see Models or see
@ -729,7 +764,8 @@ This list was last updated for version 4.3.0 of the Kokkos library.
mkdir build-kokkos-cuda mkdir build-kokkos-cuda
cd build-kokkos-cuda cd build-kokkos-cuda
cmake -C ../cmake/presets/basic.cmake -C ../cmake/presets/kokkos-cuda.cmake ../cmake cmake -C ../cmake/presets/basic.cmake \
-C ../cmake/presets/kokkos-cuda.cmake ../cmake
cmake --build . cmake --build .
.. tab:: Basic traditional make settings: .. tab:: Basic traditional make settings:
@ -757,9 +793,10 @@ This list was last updated for version 4.3.0 of the Kokkos library.
.. code-block:: make .. code-block:: make
KOKKOS_DEVICES = Cuda KOKKOS_DEVICES = Cuda
KOKKOS_ARCH = HOSTARCH,GPUARCH # HOSTARCH = HOST from list above that is hosting the GPU KOKKOS_ARCH = HOSTARCH,GPUARCH # HOSTARCH = HOST from list above that is
KOKKOS_CUDA_OPTIONS = "enable_lambda" # hosting the GPU
# GPUARCH = GPU from list above # GPUARCH = GPU from list above
KOKKOS_CUDA_OPTIONS = "enable_lambda"
FFT_INC = -DFFT_CUFFT # enable use of cuFFT (optional) FFT_INC = -DFFT_CUFFT # enable use of cuFFT (optional)
FFT_LIB = -lcufft # link to cuFFT library FFT_LIB = -lcufft # link to cuFFT library
@ -787,7 +824,8 @@ This list was last updated for version 4.3.0 of the Kokkos library.
.. code-block:: make .. code-block:: make
KOKKOS_DEVICES = HIP KOKKOS_DEVICES = HIP
KOKKOS_ARCH = HOSTARCH,GPUARCH # HOSTARCH = HOST from list above that is hosting the GPU KOKKOS_ARCH = HOSTARCH,GPUARCH # HOSTARCH = HOST from list above that is
# hosting the GPU
# GPUARCH = GPU from list above # GPUARCH = GPU from list above
FFT_INC = -DFFT_HIPFFT # enable use of hipFFT (optional) FFT_INC = -DFFT_HIPFFT # enable use of hipFFT (optional)
FFT_LIB = -lhipfft # link to hipFFT library FFT_LIB = -lhipfft # link to hipFFT library
@ -874,11 +912,16 @@ included in the LAMMPS source distribution in the ``lib/lepton`` folder.
.. code-block:: bash .. code-block:: bash
make lib-lepton # print help message # print help message
make lib-lepton args="-m serial" # build with GNU g++ compiler (settings as with "make serial") make lib-lepton
make lib-lepton args="-m mpi" # build with default MPI compiler (settings as with "make mpi")
The "machine" argument of the "-m" flag is used to find a # build with GNU g++ compiler (settings as with "make serial")
make lib-lepton args="-m serial"
# build with default MPI compiler (settings as with "make mpi")
make lib-lepton args="-m mpi"
The "machine" argument of the ``-m`` flag is used to find a
Makefile.machine to use as build recipe. Makefile.machine to use as build recipe.
The build should produce a ``build`` folder and the library ``lib/lepton/liblmplepton.a`` The build should produce a ``build`` folder and the library ``lib/lepton/liblmplepton.a``
@ -900,7 +943,8 @@ Eigen3 is a template library, so you do not need to build it.
.. code-block:: bash .. code-block:: bash
-D DOWNLOAD_EIGEN3 # download Eigen3, value = no (default) or yes -D DOWNLOAD_EIGEN3 # download Eigen3, value = no (default) or yes
-D EIGEN3_INCLUDE_DIR=path # path to Eigen library (only needed if a custom location) -D EIGEN3_INCLUDE_DIR=path # path to Eigen library (only needed if a
# custom location)
If ``DOWNLOAD_EIGEN3`` is set, the Eigen3 library will be If ``DOWNLOAD_EIGEN3`` is set, the Eigen3 library will be
downloaded and inside the CMake build directory. If the Eigen3 downloaded and inside the CMake build directory. If the Eigen3
@ -918,9 +962,14 @@ Eigen3 is a template library, so you do not need to build it.
.. code-block:: bash .. code-block:: bash
make lib-machdyn # print help message # print help message
make lib-machdyn args="-b" # download to lib/machdyn/eigen3 make lib-machdyn
make lib-machdyn args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3
# download to lib/machdyn/eigen3
make lib-machdyn args="-b"
# use existing Eigen installation in /usr/include/eigen3
make lib-machdyn args="-p /usr/include/eigen3"
Note that a symbolic (soft) link named ``includelink`` is created Note that a symbolic (soft) link named ``includelink`` is created
in ``lib/machdyn`` to point to the Eigen dir. When LAMMPS builds it in ``lib/machdyn`` to point to the Eigen dir. When LAMMPS builds it
@ -994,7 +1043,7 @@ OPT package
The compiler flag ``-restrict`` must be used to build LAMMPS with The compiler flag ``-restrict`` must be used to build LAMMPS with
the OPT package when using Intel compilers. It should be added to the OPT package when using Intel compilers. It should be added to
the :code:`CCFLAGS` line of your ``Makefile.machine``. See the ``CCFLAGS`` line of your ``Makefile.machine``. See
``src/MAKE/OPTIONS/Makefile.opt`` for an example. ``src/MAKE/OPTIONS/Makefile.opt`` for an example.
---------- ----------
@ -1021,10 +1070,17 @@ POEMS package
.. code-block:: bash .. code-block:: bash
make lib-poems # print help message # print help message
make lib-poems args="-m serial" # build with GNU g++ compiler (settings as with "make serial") make lib-poems
make lib-poems args="-m mpi" # build with default MPI C++ compiler (settings as with "make mpi")
make lib-poems args="-m icc" # build with Intel icc compiler # build with GNU g++ compiler (settings as with "make serial")
make lib-poems args="-m serial"
# build with default MPI C++ compiler (settings as with "make mpi")
make lib-poems args="-m mpi"
# build with Intel Classic compiler
make lib-poems args="-m icc"
The build should produce two files: ``lib/poems/libpoems.a`` and The build should produce two files: ``lib/poems/libpoems.a`` and
``lib/poems/Makefile.lammps``. The latter is copied from an ``lib/poems/Makefile.lammps``. The latter is copied from an
@ -1088,9 +1144,12 @@ binary package provided by your operating system.
.. code-block:: bash .. code-block:: bash
-D DOWNLOAD_VORO=value # download Voro++ for build, value = no (default) or yes -D DOWNLOAD_VORO=value # download Voro++ for build
-D VORO_LIBRARY=path # Voro++ library file (only needed if at custom location) # value = no (default) or yes
-D VORO_INCLUDE_DIR=path # Voro++ include directory (only needed if at custom location) -D VORO_LIBRARY=path # Voro++ library file
# (only needed if at custom location)
-D VORO_INCLUDE_DIR=path # Voro++ include directory
# (only needed if at custom location)
If ``DOWNLOAD_VORO`` is set, the Voro++ library will be downloaded If ``DOWNLOAD_VORO`` is set, the Voro++ library will be downloaded
and built inside the CMake build directory. If the Voro++ library and built inside the CMake build directory. If the Voro++ library
@ -1110,12 +1169,19 @@ binary package provided by your operating system.
.. code-block:: bash .. code-block:: bash
make lib-voronoi # print help message # print help message
make lib-voronoi args="-b" # download and build the default version in lib/voronoi/voro++-<version> make lib-voronoi
make lib-voronoi args="-p $HOME/voro++" # use existing Voro++ installation in $HOME/voro++
make lib-voronoi args="-b -v voro++0.4.6" # download and build the 0.4.6 version in lib/voronoi/voro++-0.4.6
Note that 2 symbolic (soft) links, ``includelink`` and # download and build the default version in lib/voronoi/voro++-<version>
make lib-voronoi args="-b"
# use existing Voro++ installation in $HOME/voro++
make lib-voronoi args="-p $HOME/voro++"
# download and build the 0.4.6 version in lib/voronoi/voro++-0.4.6
make lib-voronoi args="-b -v voro++0.4.6"
Note that two symbolic (soft) links, ``includelink`` and
``liblink``, are created in lib/voronoi to point to the Voro++ ``liblink``, are created in lib/voronoi to point to the Voro++
source dir. When LAMMPS builds in ``src`` it will use these source dir. When LAMMPS builds in ``src`` it will use these
links. You should not need to edit the links. You should not need to edit the
@ -1189,10 +1255,17 @@ The ATC package requires the MANYBODY package also be installed.
.. code-block:: bash .. code-block:: bash
make lib-atc # print help message # print help message
make lib-atc args="-m serial" # build with GNU g++ compiler and MPI STUBS (settings as with "make serial") make lib-atc
make lib-atc args="-m mpi" # build with default MPI compiler (settings as with "make mpi")
make lib-atc args="-m icc" # build with Intel icc compiler # build with GNU g++ compiler and MPI STUBS (settings as with "make serial")
make lib-atc args="-m serial"
# build with default MPI compiler (settings as with "make mpi")
make lib-atc args="-m mpi"
# build with Intel Classic compiler
make lib-atc args="-m icc"
The build should produce two files: ``lib/atc/libatc.a`` and The build should produce two files: ``lib/atc/libatc.a`` and
``lib/atc/Makefile.lammps``. The latter is copied from an ``lib/atc/Makefile.lammps``. The latter is copied from an
@ -1211,10 +1284,17 @@ The ATC package requires the MANYBODY package also be installed.
.. code-block:: bash .. code-block:: bash
make lib-linalg # print help message # print help message
make lib-linalg args="-m serial" # build with GNU C++ compiler (settings as with "make serial") make lib-linalg
make lib-linalg args="-m mpi" # build with default MPI C++ compiler (settings as with "make mpi")
make lib-linalg args="-m g++" # build with GNU Fortran compiler # build with GNU C++ compiler (settings as with "make serial")
make lib-linalg args="-m serial"
# build with default MPI C++ compiler (settings as with "make mpi")
make lib-linalg args="-m mpi"
# build with GNU Fortran compiler
make lib-linalg args="-m g++"
---------- ----------
@ -1240,10 +1320,17 @@ AWPMD package
.. code-block:: bash .. code-block:: bash
make lib-awpmd # print help message # print help message
make lib-awpmd args="-m serial" # build with GNU g++ compiler and MPI STUBS (settings as with "make serial") make lib-awpmd
make lib-awpmd args="-m mpi" # build with default MPI compiler (settings as with "make mpi")
make lib-awpmd args="-m icc" # build with Intel icc compiler # build with GNU g++ compiler and MPI STUBS (settings as with "make serial")
make lib-awpmd args="-m serial"
# build with default MPI compiler (settings as with "make mpi")
make lib-awpmd args="-m mpi"
# build with Intel Classic compiler
make lib-awpmd args="-m icc"
The build should produce two files: ``lib/awpmd/libawpmd.a`` and The build should produce two files: ``lib/awpmd/libawpmd.a`` and
``lib/awpmd/Makefile.lammps``. The latter is copied from an ``lib/awpmd/Makefile.lammps``. The latter is copied from an
@ -1262,10 +1349,17 @@ AWPMD package
.. code-block:: bash .. code-block:: bash
make lib-linalg # print help message # print help message
make lib-linalg args="-m serial" # build with GNU C++ compiler (settings as with "make serial") make lib-linalg
make lib-linalg args="-m mpi" # build with default MPI C++ compiler (settings as with "make mpi")
make lib-linalg args="-m g++" # build with GNU C++ compiler # build with GNU C++ compiler (settings as with "make serial")
make lib-linalg args="-m serial"
# build with default MPI C++ compiler (settings as with "make mpi")
make lib-linalg args="-m mpi"
# build with GNU C++ compiler
make lib-linalg args="-m g++"
---------- ----------
@ -1298,10 +1392,17 @@ module included in the LAMMPS source distribution.
.. code-block:: bash .. code-block:: bash
make lib-colvars # print help message # print help message
make lib-colvars args="-m serial" # build with GNU g++ compiler (settings as with "make serial") make lib-colvars
make lib-colvars args="-m mpi" # build with default MPI compiler (settings as with "make mpi")
make lib-colvars args="-m g++-debug" # build with GNU g++ compiler and colvars debugging enabled # build with GNU g++ compiler (settings as with "make serial")
make lib-colvars args="-m serial"
# build with default MPI compiler (settings as with "make mpi")
make lib-colvars args="-m mpi"
# build with GNU g++ compiler and colvars debugging enabled
make lib-colvars args="-m g++-debug"
The "machine" argument of the "-m" flag is used to find a The "machine" argument of the "-m" flag is used to find a
``Makefile.machine`` file to use as build recipe. If such recipe does ``Makefile.machine`` file to use as build recipe. If such recipe does
@ -1320,8 +1421,11 @@ module included in the LAMMPS source distribution.
.. code-block:: bash .. code-block:: bash
COLVARS_DEBUG=yes make lib-colvars args="-m machine" # Build with debug code (much slower) # Build with debug code (much slower)
COLVARS_LEPTON=no make lib-colvars args="-m machine" # Build without Lepton (included otherwise) COLVARS_DEBUG=yes make lib-colvars args="-m machine"
# Build without Lepton (included otherwise)
COLVARS_LEPTON=no make lib-colvars args="-m machine"
The build should produce two files: the library The build should produce two files: the library
``lib/colvars/libcolvars.a`` and the specification file ``lib/colvars/libcolvars.a`` and the specification file
@ -1368,9 +1472,14 @@ This package depends on the KSPACE package.
.. code-block:: bash .. code-block:: bash
make lib-electrode # print help message # print help message
make lib-electrode args="-m serial" # build with GNU g++ compiler and MPI STUBS (settings as with "make serial") make lib-electrode
make lib-electrode args="-m mpi" # build with default MPI compiler (settings as with "make mpi")
# build with GNU g++ compiler and MPI STUBS (settings as with "make serial")
make lib-electrode args="-m serial"
# build with default MPI compiler (settings as with "make mpi")
make lib-electrode args="-m mpi"
Note that the ``Makefile.lammps`` file has settings for the BLAS Note that the ``Makefile.lammps`` file has settings for the BLAS
@ -1381,10 +1490,17 @@ This package depends on the KSPACE package.
.. code-block:: bash .. code-block:: bash
make lib-linalg # print help message # print help message
make lib-linalg args="-m serial" # build with GNU C++ compiler (settings as with "make serial") make lib-linalg
make lib-linalg args="-m mpi" # build with default MPI C++ compiler (settings as with "make mpi")
make lib-linalg args="-m g++" # build with GNU C++ compiler # build with GNU C++ compiler (settings as with "make serial")
make lib-linalg args="-m serial"
# build with default MPI C++ compiler (settings as with "make mpi")
make lib-linalg args="-m mpi"
# build with GNU C++ compiler
make lib-linalg args="-m g++"
The package itself is activated with ``make yes-KSPACE`` and The package itself is activated with ``make yes-KSPACE`` and
``make yes-ELECTRODE`` ``make yes-ELECTRODE``
@ -1429,8 +1545,11 @@ folder and then load this plugin at runtime with the :doc:`plugin command <plugi
.. code-block:: bash .. code-block:: bash
make lib-pace # print help message # print help message
make lib-pace args="-b" # download and build the default version in lib/pace make lib-pace
# download and build the default version in lib/pace
make lib-pace args="-b"
You should not need to edit the ``lib/pace/Makefile.lammps`` file. You should not need to edit the ``lib/pace/Makefile.lammps`` file.
@ -1457,10 +1576,17 @@ ML-POD package
.. code-block:: bash .. code-block:: bash
make lib-mlpod # print help message # print help message
make lib-mlpod args="-m serial" # build with GNU g++ compiler and MPI STUBS (settings as with "make serial") make lib-mlpod
make lib-mlpod args="-m mpi" # build with default MPI compiler (settings as with "make mpi")
make lib-mlpod args="-m mpi -e linalg" # same as above but use the bundled linalg lib # build with GNU g++ compiler and MPI STUBS (settings as with "make serial")
make lib-mlpod args="-m serial"
# build with default MPI compiler (settings as with "make mpi")
make lib-mlpod args="-m mpi"
# same as above but use the bundled linalg lib
make lib-mlpod args="-m mpi -e linalg"
Note that the ``Makefile.lammps`` file has settings to use the BLAS Note that the ``Makefile.lammps`` file has settings to use the BLAS
and LAPACK linear algebra libraries. These can either exist on and LAPACK linear algebra libraries. These can either exist on
@ -1470,10 +1596,17 @@ ML-POD package
.. code-block:: bash .. code-block:: bash
make lib-linalg # print help message # print help message
make lib-linalg args="-m serial" # build with GNU C++ compiler (settings as with "make serial") make lib-linalg
make lib-linalg args="-m mpi" # build with default MPI C++ compiler (settings as with "make mpi")
make lib-linalg args="-m g++" # build with GNU C++ compiler # build with GNU C++ compiler (settings as with "make serial")
make lib-linalg args="-m serial"
# build with default MPI C++ compiler (settings as with "make mpi")
make lib-linalg args="-m mpi"
# build with GNU C++ compiler
make lib-linalg args="-m g++"
The package itself is activated with ``make yes-ML-POD``. The package itself is activated with ``make yes-ML-POD``.
@ -1496,9 +1629,12 @@ within CMake will download the non-commercial use version.
.. code-block:: bash .. code-block:: bash
-D DOWNLOAD_QUIP=value # download QUIP library for build, value = no (default) or yes -D DOWNLOAD_QUIP=value # download QUIP library for build
-D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location) # value = no (default) or yes
-D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK -D QUIP_LIBRARY=path # path to libquip.a
# (only needed if a custom location)
-D USE_INTERNAL_LINALG=value # Use the internal linear algebra library
# instead of LAPACK
# value = no (default) or yes # value = no (default) or yes
CMake will try to download and build the QUIP library from GitHub, CMake will try to download and build the QUIP library from GitHub,
@ -1588,17 +1724,20 @@ folder and then load this plugin at runtime with the :doc:`plugin command <plugi
.. code-block:: bash .. code-block:: bash
-D DOWNLOAD_PLUMED=value # download PLUMED for build, value = no (default) or yes -D DOWNLOAD_PLUMED=value # download PLUMED for build
-D PLUMED_MODE=value # Linkage mode for PLUMED, value = static (default), shared, or runtime # value = no (default) or yes
-D PLUMED_MODE=value # Linkage mode for PLUMED
# value = static (default), shared,
# or runtime
If DOWNLOAD_PLUMED is set to "yes", the PLUMED library will be If ``DOWNLOAD_PLUMED`` is set to ``yes``, the PLUMED library will be
downloaded (the version of PLUMED that will be downloaded is downloaded (the version of PLUMED that will be downloaded is
hard-coded to a vetted version of PLUMED, usually a recent stable hard-coded to a vetted version of PLUMED, usually a recent stable
release version) and built inside the CMake build directory. If release version) and built inside the CMake build directory. If
``DOWNLOAD_PLUMED`` is set to "no" (the default), CMake will try ``DOWNLOAD_PLUMED`` is set to "no" (the default), CMake will try
to detect and link to an installed version of PLUMED. For this to to detect and link to an installed version of PLUMED. For this to
work, the PLUMED library has to be installed into a location where work, the PLUMED library has to be installed into a location where
the ``pkg-config`` tool can find it or the PKG_CONFIG_PATH the ``pkg-config`` tool can find it or the ``PKG_CONFIG_PATH``
environment variable has to be set up accordingly. PLUMED should environment variable has to be set up accordingly. PLUMED should
be installed in such a location if you compile it using the be installed in such a location if you compile it using the
default make; make install commands. default make; make install commands.
@ -1627,14 +1766,21 @@ folder and then load this plugin at runtime with the :doc:`plugin command <plugi
.. code-block:: bash .. code-block:: bash
make lib-plumed # print help message # print help message
make lib-plumed args="-b" # download and build PLUMED in lib/plumed/plumed2 make lib-plumed
make lib-plumed args="-p $HOME/.local" # use existing PLUMED installation in $HOME/.local
make lib-plumed args="-p /usr/local -m shared" # use existing PLUMED installation in
# /usr/local and use shared linkage mode
Note that 2 symbolic (soft) links, ``includelink`` and ``liblink`` # download and build PLUMED in lib/plumed/plumed2
are created in lib/plumed that point to the location of the PLUMED make lib-plumed args="-b"
# use existing PLUMED installation in $HOME/.local
make lib-plumed args="-p $HOME/.local"
# use existing PLUMED installation in /usr/local and
# use shared linkage mode
make lib-plumed args="-p /usr/local -m shared"
Note that two symbolic (soft) links, ``includelink`` and ``liblink``
are created in ``lib/plumed`` that point to the location of the PLUMED
build to use. A new file ``lib/plumed/Makefile.lammps`` is also build to use. A new file ``lib/plumed/Makefile.lammps`` is also
created with settings suitable for LAMMPS to compile and link created with settings suitable for LAMMPS to compile and link
PLUMED using the desired linkage mode. After this step is PLUMED using the desired linkage mode. After this step is
@ -1649,17 +1795,17 @@ folder and then load this plugin at runtime with the :doc:`plugin command <plugi
Once this compilation completes you should be able to run LAMMPS Once this compilation completes you should be able to run LAMMPS
in the usual way. For shared linkage mode, libplumed.so must be in the usual way. For shared linkage mode, libplumed.so must be
found by the LAMMPS executable, which on many operating systems found by the LAMMPS executable, which on many operating systems
means, you have to set the LD_LIBRARY_PATH environment variable means, you have to set the ``LD_LIBRARY_PATH`` environment variable
accordingly. accordingly.
Support for the different linkage modes in LAMMPS varies for Support for the different linkage modes in LAMMPS varies for
different operating systems, using the static linkage is expected different operating systems, using the static linkage is expected
to be the most portable, and thus set to be the default. to be the most portable, and thus set to be the default.
If you want to change the linkage mode, you have to re-run "make If you want to change the linkage mode, you have to re-run ``make
lib-plumed" with the desired settings **and** do a re-install if lib-plumed`` with the desired settings **and** do a re-install if
the PLUMED package with "make yes-plumed" to update the the PLUMED package with ``make yes-plumed`` to update the
required makefile settings with the changes in the lib/plumed required makefile settings with the changes in the ``lib/plumed``
folder. folder.
---------- ----------
@ -1733,8 +1879,10 @@ details please see ``lib/hdnnp/README`` and the `n2p2 build documentation
.. code-block:: bash .. code-block:: bash
-D DOWNLOAD_N2P2=value # download n2p2 for build, value = no (default) or yes -D DOWNLOAD_N2P2=value # download n2p2 for build
-D N2P2_DIR=path # n2p2 base directory (only needed if a custom location) # value = no (default) or yes
-D N2P2_DIR=path # n2p2 base directory
# (only needed if a custom location)
If ``DOWNLOAD_N2P2`` is set, the *n2p2* library will be downloaded and If ``DOWNLOAD_N2P2`` is set, the *n2p2* library will be downloaded and
built inside the CMake build directory. If the *n2p2* library is already built inside the CMake build directory. If the *n2p2* library is already
@ -1751,12 +1899,19 @@ details please see ``lib/hdnnp/README`` and the `n2p2 build documentation
.. code-block:: bash .. code-block:: bash
make lib-hdnnp # print help message # print help message
make lib-hdnnp args="-b" # download and build in lib/hdnnp/n2p2-... make lib-hdnnp
make lib-hdnnp args="-b -v 2.1.4" # download and build specific version
make lib-hdnnp args="-p /usr/local/n2p2" # use the existing n2p2 installation in /usr/local/n2p2
Note that 3 symbolic (soft) links, ``includelink``, ``liblink`` and # download and build in lib/hdnnp/n2p2-...
make lib-hdnnp args="-b"
# download and build specific version
make lib-hdnnp args="-b -v 2.1.4"
# use the existing n2p2 installation in /usr/local/n2p2
make lib-hdnnp args="-p /usr/local/n2p2"
Note that three symbolic (soft) links, ``includelink``, ``liblink`` and
``Makefile.lammps``, will be created in ``lib/hdnnp`` to point to ``Makefile.lammps``, will be created in ``lib/hdnnp`` to point to
``n2p2/include``, ``n2p2/lib`` and ``n2p2/lib/Makefile.lammps-extra``, ``n2p2/include``, ``n2p2/lib`` and ``n2p2/lib/Makefile.lammps-extra``,
respectively. When LAMMPS is built in ``src`` it will use these links. respectively. When LAMMPS is built in ``src`` it will use these links.
@ -1844,7 +1999,8 @@ MDI package
.. code-block:: bash .. code-block:: bash
-D DOWNLOAD_MDI=value # download MDI Library for build, value = no (default) or yes -D DOWNLOAD_MDI=value # download MDI Library for build
# value = no (default) or yes
.. tab:: Traditional make .. tab:: Traditional make
@ -1873,7 +2029,8 @@ MOLFILE package
.. code-block:: bash .. code-block:: bash
-D MOLFILE_INCLUDE_DIR=path # (optional) path where VMD molfile plugin headers are installed -D MOLFILE_INCLUDE_DIR=path # (optional) path where VMD molfile
# plugin headers are installed
-D PKG_MOLFILE=yes -D PKG_MOLFILE=yes
Using ``-D PKG_MOLFILE=yes`` enables the package, and setting Using ``-D PKG_MOLFILE=yes`` enables the package, and setting
@ -2032,10 +2189,17 @@ verified to work in February 2020 with Quantum Espresso versions 6.3 to
.. code-block:: bash .. code-block:: bash
make lib-qmmm # print help message # print help message
make lib-qmmm args="-m serial" # build with GNU Fortran compiler (settings as in "make serial") make lib-qmmm
make lib-qmmm args="-m mpi" # build with default MPI compiler (settings as in "make mpi")
make lib-qmmm args="-m gfortran" # build with GNU Fortran compiler # build with GNU Fortran compiler (settings as in "make serial")
make lib-qmmm args="-m serial"
# build with default MPI compiler (settings as in "make mpi")
make lib-qmmm args="-m mpi"
# build with GNU Fortran compiler
make lib-qmmm args="-m gfortran"
The build should produce two files: ``lib/qmmm/libqmmm.a`` and The build should produce two files: ``lib/qmmm/libqmmm.a`` and
``lib/qmmm/Makefile.lammps``. The latter is copied from an ``lib/qmmm/Makefile.lammps``. The latter is copied from an
@ -2048,10 +2212,10 @@ verified to work in February 2020 with Quantum Espresso versions 6.3 to
You can then install QMMM package and build LAMMPS in the usual You can then install QMMM package and build LAMMPS in the usual
manner. After completing the LAMMPS build and compiling Quantum manner. After completing the LAMMPS build and compiling Quantum
ESPRESSO with external library support (via "make couple"), go ESPRESSO with external library support (via ``make couple``), go
back to the ``lib/qmmm`` folder and follow the instructions in the back to the ``lib/qmmm`` folder and follow the instructions in the
README file to build the combined LAMMPS/QE QM/MM executable README file to build the combined LAMMPS/QE QM/MM executable
(pwqmmm.x) in the lib/qmmm folder. (``pwqmmm.x``) in the ``lib/qmmm`` folder.
---------- ----------
@ -2121,11 +2285,16 @@ To build with this package, you must download and build the
.. code-block:: bash .. code-block:: bash
make lib-scafacos # print help message # print help message
make lib-scafacos args="-b" # download and build in lib/scafacos/scafacos-<version> make lib-scafacos
make lib-scafacos args="-p $HOME/scafacos # use existing ScaFaCoS installation in $HOME/scafacos
Note that 2 symbolic (soft) links, ``includelink`` and ``liblink``, are # download and build in lib/scafacos/scafacos-<version>
make lib-scafacos args="-b"
# use existing ScaFaCoS installation in $HOME/scafacos
make lib-scafacos args="-p $HOME/scafacos
Note that two symbolic (soft) links, ``includelink`` and ``liblink``, are
created in ``lib/scafacos`` to point to the ScaFaCoS src dir. When LAMMPS created in ``lib/scafacos`` to point to the ScaFaCoS src dir. When LAMMPS
builds in src it will use these links. You should not need to edit builds in src it will use these links. You should not need to edit
the ``lib/scafacos/Makefile.lammps`` file. the ``lib/scafacos/Makefile.lammps`` file.

View File

@ -37,7 +37,7 @@ executable code from the library is copied into the calling executable.
.. tab:: CMake build .. tab:: CMake build
This assumes that LAMMPS has been configured without setting a This assumes that LAMMPS has been configured without setting a
``LAMMPS_MACHINE`` name, installed with "make install", and the ``LAMMPS_MACHINE`` name, installed with ``make install``, and the
``PKG_CONFIG_PATH`` environment variable has been updated to ``PKG_CONFIG_PATH`` environment variable has been updated to
include the ``liblammps.pc`` file installed into the configured include the ``liblammps.pc`` file installed into the configured
destination folder. The commands to compile and link a coupled destination folder. The commands to compile and link a coupled
@ -59,10 +59,10 @@ executable code from the library is copied into the calling executable.
mpicc -c -O -I${HOME}/lammps/src caller.c mpicc -c -O -I${HOME}/lammps/src caller.c
mpicxx -o caller caller.o -L${HOME}/lammps/src -llammps_mpi mpicxx -o caller caller.o -L${HOME}/lammps/src -llammps_mpi
The *-I* argument is the path to the location of the ``library.h`` The ``-I`` argument is the path to the location of the ``library.h``
header file containing the interface to the LAMMPS C-style library header file containing the interface to the LAMMPS C-style library
interface. The *-L* argument is the path to where the interface. The ``-L`` argument is the path to where the
``liblammps_mpi.a`` file is located. The *-llammps_mpi* argument ``liblammps_mpi.a`` file is located. The ``-llammps_mpi`` argument
is shorthand for telling the compiler to link the file is shorthand for telling the compiler to link the file
``liblammps_mpi.a``. If LAMMPS has been built as a shared ``liblammps_mpi.a``. If LAMMPS has been built as a shared
library, then the linker will use ``liblammps_mpi.so`` instead. library, then the linker will use ``liblammps_mpi.so`` instead.
@ -142,7 +142,7 @@ When linking to LAMMPS built as a shared library, the situation becomes
much simpler, as all dependent libraries and objects are either included much simpler, as all dependent libraries and objects are either included
in the shared library or registered as a dependent library in the shared in the shared library or registered as a dependent library in the shared
library file. Thus, those libraries need not be specified when linking library file. Thus, those libraries need not be specified when linking
the calling executable. Only the *-I* flags are needed. So the example the calling executable. Only the ``-I`` flags are needed. So the example
case from above of the serial version static LAMMPS library with the case from above of the serial version static LAMMPS library with the
POEMS package installed becomes: POEMS package installed becomes:

View File

@ -25,7 +25,7 @@ additional tools to be available and functioning.
require adding flags like ``-std=c++11`` to enable the C++11 mode. require adding flags like ``-std=c++11`` to enable the C++11 mode.
* A Bourne shell compatible "Unix" shell program (frequently this is ``bash``) * A Bourne shell compatible "Unix" shell program (frequently this is ``bash``)
* A few shell utilities: ``ls``, ``mv``, ``ln``, ``rm``, ``grep``, ``sed``, ``tr``, ``cat``, ``touch``, ``diff``, ``dirname`` * A few shell utilities: ``ls``, ``mv``, ``ln``, ``rm``, ``grep``, ``sed``, ``tr``, ``cat``, ``touch``, ``diff``, ``dirname``
* Python (optional, required for ``make lib-<pkg>`` in the src * Python (optional, required for ``make lib-<pkg>`` in the ``src``
folder). Python scripts are currently tested with python 2.7 and folder). Python scripts are currently tested with python 2.7 and
3.6 to 3.11. The procedure for :doc:`building the documentation 3.6 to 3.11. The procedure for :doc:`building the documentation
<Build_manual>` *requires* Python 3.5 or later. <Build_manual>` *requires* Python 3.5 or later.

View File

@ -172,18 +172,41 @@ make a copy of one of them and modify it to suit your needs.
.. code-block:: bash .. code-block:: bash
cmake -C ../cmake/presets/basic.cmake [OPTIONS] ../cmake # enable just a few core packages # enable just a few core packages
cmake -C ../cmake/presets/most.cmake [OPTIONS] ../cmake # enable most packages cmake -C ../cmake/presets/basic.cmake [OPTIONS] ../cmake
cmake -C ../cmake/presets/download.cmake [OPTIONS] ../cmake # enable packages which download sources or potential files
cmake -C ../cmake/presets/nolib.cmake [OPTIONS] ../cmake # disable packages that do require extra libraries or tools # enable most packages
cmake -C ../cmake/presets/clang.cmake [OPTIONS] ../cmake # change settings to use the Clang compilers by default cmake -C ../cmake/presets/most.cmake [OPTIONS] ../cmake
cmake -C ../cmake/presets/gcc.cmake [OPTIONS] ../cmake # change settings to use the GNU compilers by default
cmake -C ../cmake/presets/intel.cmake [OPTIONS] ../cmake # change settings to use the Intel compilers by default # enable packages which download sources or potential files
cmake -C ../cmake/presets/pgi.cmake [OPTIONS] ../cmake # change settings to use the PGI compilers by default cmake -C ../cmake/presets/download.cmake [OPTIONS] ../cmake
cmake -C ../cmake/presets/all_on.cmake [OPTIONS] ../cmake # enable all packages
cmake -C ../cmake/presets/all_off.cmake [OPTIONS] ../cmake # disable all packages # disable packages that do require extra libraries or tools
mingw64-cmake -C ../cmake/presets/mingw-cross.cmake [OPTIONS] ../cmake # compile with MinGW cross-compilers cmake -C ../cmake/presets/nolib.cmake [OPTIONS] ../cmake
cmake -C ../cmake/presets/macos-multiarch.cmake [OPTIONS] ../cmake # compile serial multi-arch binaries on macOS
# change settings to use the Clang compilers by default
cmake -C ../cmake/presets/clang.cmake [OPTIONS] ../cmake
# change settings to use the GNU compilers by default
cmake -C ../cmake/presets/gcc.cmake [OPTIONS] ../cmake
# change settings to use the Intel compilers by default
cmake -C ../cmake/presets/intel.cmake [OPTIONS] ../cmake
# change settings to use the PGI compilers by default
cmake -C ../cmake/presets/pgi.cmake [OPTIONS] ../cmake
# enable all packages
cmake -C ../cmake/presets/all_on.cmake [OPTIONS] ../cmake
# disable all packages
cmake -C ../cmake/presets/all_off.cmake [OPTIONS] ../cmake
# compile with MinGW cross-compilers
mingw64-cmake -C ../cmake/presets/mingw-cross.cmake [OPTIONS] ../cmake
# compile serial multi-arch binaries on macOS
cmake -C ../cmake/presets/macos-multiarch.cmake [OPTIONS] ../cmake
Presets that have names starting with "windows" are specifically for Presets that have names starting with "windows" are specifically for
compiling LAMMPS :doc:`natively on Windows <Build_windows>` and compiling LAMMPS :doc:`natively on Windows <Build_windows>` and
@ -209,7 +232,8 @@ Example
# GPU package and configure it for using CUDA. You can run. # GPU package and configure it for using CUDA. You can run.
mkdir build mkdir build
cd build cd build
cmake -C ../cmake/presets/most.cmake -C ../cmake/presets/nolib.cmake -D PKG_GPU=on -D GPU_API=cuda ../cmake cmake -C ../cmake/presets/most.cmake -C ../cmake/presets/nolib.cmake \
-D PKG_GPU=on -D GPU_API=cuda ../cmake
# to add another package, say BODY to the previous configuration you can run: # to add another package, say BODY to the previous configuration you can run:
cmake -D PKG_BODY=on . cmake -D PKG_BODY=on .

View File

@ -1,3 +1,7 @@
.. raw:: latex
\clearpage
Optional build settings Optional build settings
======================= =======================
@ -8,7 +12,8 @@ explains how to do this for building both with CMake and make.
* `FFT library`_ for use with the :doc:`kspace_style pppm <kspace_style>` command * `FFT library`_ for use with the :doc:`kspace_style pppm <kspace_style>` command
* `Size of LAMMPS integer types and size limits`_ * `Size of LAMMPS integer types and size limits`_
* `Read or write compressed files`_ * `Read or write compressed files`_
* `Output of JPG, PNG, and move files` via the :doc:`dump image <dump_image>` or :doc:`dump movie <dump_image>` commands * `Output of JPEG, PNG, and movie files`_ via the :doc:`dump image <dump_image>` or :doc:`dump movie <dump_image>` commands
* `Support for downloading files`_
* `Memory allocation alignment`_ * `Memory allocation alignment`_
* `Workaround for long long integers`_ * `Workaround for long long integers`_
* `Exception handling when using LAMMPS as a library`_ to capture errors * `Exception handling when using LAMMPS as a library`_ to capture errors
@ -19,7 +24,7 @@ explains how to do this for building both with CMake and make.
.. _cxx11: .. _cxx11:
C++11 standard compliance C++11 standard compliance
------------------------------------------ -------------------------
A C++11 standard compatible compiler is a requirement for compiling LAMMPS. A C++11 standard compatible compiler is a requirement for compiling LAMMPS.
LAMMPS version 3 March 2020 is the last version compatible with the previous LAMMPS version 3 March 2020 is the last version compatible with the previous
@ -31,12 +36,16 @@ flags to enable C++11 compliance. Example for GNU c++ 4.8.x:
CCFLAGS = -g -O3 -std=c++11 CCFLAGS = -g -O3 -std=c++11
Individual packages may require compliance with a later C++ standard
like C++14 or C++17. These requirements will be documented with the
:doc:`individual packages <Packages_details>`.
---------- ----------
.. _fft: .. _fft:
FFT library FFT library
--------------------- -----------
When the KSPACE package is included in a LAMMPS build, the When the KSPACE package is included in a LAMMPS build, the
:doc:`kspace_style pppm <kspace_style>` command performs 3d FFTs which :doc:`kspace_style pppm <kspace_style>` command performs 3d FFTs which
@ -58,8 +67,10 @@ libraries and better pipelining for packing and communication.
.. code-block:: bash .. code-block:: bash
-D FFT=value # FFTW3 or MKL or KISS, default is FFTW3 if found, else KISS -D FFT=value # FFTW3 or MKL or KISS, default is FFTW3 if found,
-D FFT_KOKKOS=value # FFTW3 or MKL or KISS or CUFFT or HIPFFT, default is KISS # else KISS
-D FFT_KOKKOS=value # FFTW3 or MKL or KISS or CUFFT or HIPFFT,
# default is KISS
-D FFT_SINGLE=value # yes or no (default), no = double precision -D FFT_SINGLE=value # yes or no (default), no = double precision
-D FFT_PACK=value # array (default) or pointer or memcpy -D FFT_PACK=value # array (default) or pointer or memcpy
-D FFT_USE_HEFFTE=value # yes or no (default), yes links to heFFTe -D FFT_USE_HEFFTE=value # yes or no (default), yes links to heFFTe
@ -67,11 +78,11 @@ libraries and better pipelining for packing and communication.
.. note:: .. note::
When the Kokkos variant of a package is compiled and selected at run time, When the Kokkos variant of a package is compiled and selected at run time,
the FFT library selected by the FFT_KOKKOS variable applies. Otherwise, the FFT library selected by the ``FFT_KOKKOS`` variable applies. Otherwise,
the FFT library selected by the FFT variable applies. the FFT library selected by the FFT variable applies.
The same FFT settings apply to both. FFT_KOKKOS must be compatible with the The same FFT settings apply to both. ``FFT_KOKKOS`` must be compatible with the
Kokkos back end - for example, when using the CUDA back end of Kokkos, Kokkos back end - for example, when using the CUDA back end of Kokkos,
you must use either CUFFT or KISS. you must use either ``CUFFT`` or ``KISS``.
Usually these settings are all that is needed. If FFTW3 is Usually these settings are all that is needed. If FFTW3 is
selected, then CMake will try to detect, if threaded FFTW selected, then CMake will try to detect, if threaded FFTW
@ -89,7 +100,8 @@ libraries and better pipelining for packing and communication.
-D MKL_INCLUDE_DIR=path # ditto for Intel MKL library -D MKL_INCLUDE_DIR=path # ditto for Intel MKL library
-D FFT_MKL_THREADS=on # enable using threaded FFTs with MKL libraries -D FFT_MKL_THREADS=on # enable using threaded FFTs with MKL libraries
-D MKL_LIBRARY=path # path to MKL libraries -D MKL_LIBRARY=path # path to MKL libraries
-D FFT_HEFFTE_BACKEND=value # FFTW or MKL or empty/undefined for the stock heFFTe back end -D FFT_HEFFTE_BACKEND=value # FFTW or MKL or empty/undefined for the stock
# heFFTe back end
-D Heffte_ROOT=path # path to an existing heFFTe installation -D Heffte_ROOT=path # path to an existing heFFTe installation
.. note:: .. note::
@ -108,10 +120,10 @@ libraries and better pipelining for packing and communication.
.. code-block:: make .. code-block:: make
FFT_INC = -DFFT_FFTW3 # -DFFT_FFTW3, -DFFT_FFTW (same as -DFFT_FFTW3), -DFFT_MKL, or -DFFT_KISS FFT_INC = -DFFT_<NAME> # where <NAME> is KISS (default), FFTW3,
# default is KISS if not specified # FFTW (same as FFTW3), or MKL
FFT_INC = -DFFT_KOKKOS_CUFFT # -DFFT_KOKKOS_{FFTW,FFTW3,MKL,CUFFT,HIPFFT,KISS} FFT_INC = -DFFT_KOKKOS_<NAME> # where <NAME> is KISS (default), FFTW3,
# default is KISS if not specified # FFTW (same as FFTW3), MKL, CUFFT, or HIPFFT
FFT_INC = -DFFT_SINGLE # do not specify for double precision FFT_INC = -DFFT_SINGLE # do not specify for double precision
FFT_INC = -DFFT_FFTW_THREADS # enable using threaded FFTW3 libraries FFT_INC = -DFFT_FFTW_THREADS # enable using threaded FFTW3 libraries
FFT_INC = -DFFT_MKL_THREADS # enable using threaded FFTs with MKL libraries FFT_INC = -DFFT_MKL_THREADS # enable using threaded FFTs with MKL libraries
@ -122,16 +134,36 @@ libraries and better pipelining for packing and communication.
FFT_INC = -I/usr/local/include FFT_INC = -I/usr/local/include
FFT_PATH = -L/usr/local/lib FFT_PATH = -L/usr/local/lib
FFT_LIB = -lhipfft # hipFFT either precision
FFT_LIB = -lcufft # cuFFT either precision # hipFFT either precision
FFT_LIB = -lfftw3 # FFTW3 double precision FFT_LIB = -lhipfft
FFT_LIB = -lfftw3 -lfftw3_omp # FFTW3 double precision with threads (needs -DFFT_FFTW_THREADS)
FFT_LIB = -lfftw3 -lfftw3f # FFTW3 single precision # cuFFT either precision
FFT_LIB = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core # MKL with Intel compiler, serial interface FFT_LIB = -lcufft
FFT_LIB = -lmkl_gf_lp64 -lmkl_sequential -lmkl_core # MKL with GNU compiler, serial interface
FFT_LIB = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core # MKL with Intel compiler, threaded interface # FFTW3 double precision
FFT_LIB = -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core # MKL with GNU compiler, threaded interface FFT_LIB = -lfftw3
FFT_LIB = -lmkl_rt # MKL with automatic runtime selection of interface libs
# FFTW3 double precision with threads (needs -DFFT_FFTW_THREADS)
FFT_LIB = -lfftw3 -lfftw3_omp
# FFTW3 single precision
FFT_LIB = -lfftw3 -lfftw3f
# serial MKL with Intel compiler
FFT_LIB = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
# serial MKL with GNU compiler
FFT_LIB = -lmkl_gf_lp64 -lmkl_sequential -lmkl_core
# threaded MKL with Intel compiler
FFT_LIB = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core
# threaded MKL with GNU compiler
FFT_LIB = -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core
# MKL with automatic runtime selection of interface libs
FFT_LIB = -lmkl_rt
As with CMake, you do not need to set paths in ``FFT_INC`` or As with CMake, you do not need to set paths in ``FFT_INC`` or
``FFT_PATH``, if the compiler can find the FFT header and library ``FFT_PATH``, if the compiler can find the FFT header and library
@ -147,11 +179,11 @@ libraries and better pipelining for packing and communication.
FFT_PATH = FFT_PATH =
FFT_LIB = $(heffte_link) $(heffte_libs) FFT_LIB = $(heffte_link) $(heffte_libs)
The heFFTe install path will contain `HeffteMakefile.in`. The heFFTe install path will contain ``HeffteMakefile.in``.
which will define the `heffte_` include variables needed to link to heFFTe from which will define the ``heffte_`` include variables needed to link to heFFTe from
an external project using traditional make. an external project using traditional make.
The `-DFFT_HEFFTE` is required to switch to using heFFTe, while the optional `-DFFT_HEFFTE_FFTW` The ``-DFFT_HEFFTE`` is required to switch to using heFFTe, while the optional ``-DFFT_HEFFTE_FFTW``
selects the desired heFFTe back end, e.g., `-DFFT_HEFFTE_FFTW` or `-DFFT_HEFFTE_MKL`, selects the desired heFFTe back end, e.g., ``-DFFT_HEFFTE_FFTW`` or ``-DFFT_HEFFTE_MKL``,
omitting the variable will default to the `stock` back end. omitting the variable will default to the `stock` back end.
The heFFTe `stock` back end is intended to be used for testing and debugging, The heFFTe `stock` back end is intended to be used for testing and debugging,
but is not performance optimized for large scale production runs. but is not performance optimized for large scale production runs.
@ -179,7 +211,7 @@ it from `www.fftw.org <https://www.fftw.org>`_. LAMMPS requires version
Building FFTW for your box should be as simple as ``./configure; make; Building FFTW for your box should be as simple as ``./configure; make;
make install``. The install command typically requires root privileges make install``. The install command typically requires root privileges
(e.g. invoke it via sudo), unless you specify a local directory with (e.g. invoke it via sudo), unless you specify a local directory with
the "--prefix" option of configure. Type ``./configure --help`` to see the ``--prefix`` option of configure. Type ``./configure --help`` to see
various options. various options.
The Intel MKL math library is part of the Intel compiler suite. It The Intel MKL math library is part of the Intel compiler suite. It
@ -215,7 +247,7 @@ produce the additional libraries ``libfftw3f.a`` and/or ``libfftw3f.so``\ .
Performing 3d FFTs requires communication to transpose the 3d FFT Performing 3d FFTs requires communication to transpose the 3d FFT
grid. The data packing/unpacking for this can be done in one of 3 grid. The data packing/unpacking for this can be done in one of 3
modes (ARRAY, POINTER, MEMCPY) as set by the FFT_PACK syntax above. modes (ARRAY, POINTER, MEMCPY) as set by the ``FFT_PACK`` syntax above.
Depending on the machine, the size of the FFT grid, the number of Depending on the machine, the size of the FFT grid, the number of
processors used, one option may be slightly faster. The default is processors used, one option may be slightly faster. The default is
ARRAY mode. ARRAY mode.
@ -232,6 +264,10 @@ and those variables will be passed into the heFFTe build.
---------- ----------
.. raw:: latex
\clearpage
.. _size: .. _size:
Size of LAMMPS integer types and size limits Size of LAMMPS integer types and size limits
@ -272,7 +308,7 @@ LAMMPS system size restrictions
.. list-table:: .. list-table::
:header-rows: 1 :header-rows: 1
:widths: auto :widths: 18 27 28 27
:align: center :align: center
* - * -
@ -341,8 +377,8 @@ in whichever ``lib/gpu/Makefile`` is used must be the same as above.
.. _graphics: .. _graphics:
Output of JPG, PNG, and movie files Output of JPEG, PNG, and movie files
-------------------------------------------------- ------------------------------------
The :doc:`dump image <dump_image>` command has options to output JPEG or The :doc:`dump image <dump_image>` command has options to output JPEG or
PNG image files. Likewise, the :doc:`dump movie <dump_image>` command PNG image files. Likewise, the :doc:`dump movie <dump_image>` command
@ -356,9 +392,10 @@ requires the following settings:
.. code-block:: bash .. code-block:: bash
-D WITH_JPEG=value # yes or no -D WITH_JPEG=value # yes or no
# default = yes if CMake finds JPEG files, else no # default = yes if CMake finds JPEG development files, else no
-D WITH_PNG=value # yes or no -D WITH_PNG=value # yes or no
# default = yes if CMake finds PNG and ZLIB files, else no # default = yes if CMake finds PNG and ZLIB development files,
# else no
-D WITH_FFMPEG=value # yes or no -D WITH_FFMPEG=value # yes or no
# default = yes if CMake can find ffmpeg, else no # default = yes if CMake can find ffmpeg, else no
@ -382,8 +419,10 @@ requires the following settings:
LMP_INC = -DLAMMPS_JPEG -DLAMMPS_PNG -DLAMMPS_FFMPEG <other LMP_INC settings> LMP_INC = -DLAMMPS_JPEG -DLAMMPS_PNG -DLAMMPS_FFMPEG <other LMP_INC settings>
JPG_INC = -I/usr/local/include # path to jpeglib.h, png.h, zlib.h header files if make cannot find them JPG_INC = -I/usr/local/include # path to jpeglib.h, png.h, zlib.h headers
JPG_PATH = -L/usr/lib # paths to libjpeg.a, libpng.a, libz.a (.so) files if make cannot find them # if make cannot find them
JPG_PATH = -L/usr/lib # paths to libjpeg.a, libpng.a, libz.a (.so)
# files if make cannot find them
JPG_LIB = -ljpeg -lpng -lz # library names JPG_LIB = -ljpeg -lpng -lz # library names
As with CMake, you do not need to set ``JPG_INC`` or ``JPG_PATH``, As with CMake, you do not need to set ``JPG_INC`` or ``JPG_PATH``,
@ -424,7 +463,7 @@ including :doc:`read_data <read_data>`, :doc:`rerun <rerun>`, and
.. code-block:: bash .. code-block:: bash
-D WITH_GZIP=value # yes or no -D WITH_GZIP=value # yes or no
# default is yes if CMake can find the gzip program, else no # default is yes if CMake can find the gzip program
.. tab:: Traditional make .. tab:: Traditional make
@ -446,18 +485,64 @@ during a run.
available using a compression library instead, which is what the available using a compression library instead, which is what the
:ref:`COMPRESS package <PKG-COMPRESS>` enables. :ref:`COMPRESS package <PKG-COMPRESS>` enables.
--------------------------------------------------
.. _libcurl:
Support for downloading files
-----------------------------
.. versionadded:: TBD
The :doc:`geturl command <geturl>` command uses the `the libcurl library
<https://curl.se/libcurl/>`_ to download files. This requires that
LAMMPS is compiled accordingly which needs the following settings:
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D WITH_CURL=value # yes or no
# default = yes if CMake finds CURL development files, else no
Usually these settings are all that is needed. If CMake cannot
find the graphics header, library, executable files, you can set
these variables:
.. code-block:: bash
-D CURL_INCLUDE_DIR=path # path to folder which contains curl.h header file
-D CURL_LIBRARY=path # path to libcurls.a (.so) file
.. tab:: Traditional make
.. code-block:: make
LMP_INC = -DLAMMPS_CURL <other LMP_INC settings>
CURL_INC = -I/usr/local/include # path to curl folder with curl.h
CURL_PATH = -L/usr/lib # paths to libcurl.a(.so) if make cannot find it
CURL_LIB = -lcurl # library names
As with CMake, you do not need to set ``CURL_INC`` or ``CURL_PATH``,
if make can find the libcurl header and library files in their
default system locations. You must specify ``CURL_LIB`` with a
paths or linker flags to link to libcurl.
---------- ----------
.. _align: .. _align:
Memory allocation alignment Memory allocation alignment
--------------------------------------- ---------------------------
This setting enables the use of the "posix_memalign()" call instead of This setting enables the use of the ``posix_memalign()`` call instead of
"malloc()" when LAMMPS allocates large chunks of memory. Vector ``malloc()`` when LAMMPS allocates large chunks of memory. Vector
instructions on CPUs may become more efficient, if dynamically allocated instructions on CPUs may become more efficient, if dynamically allocated
memory is aligned on larger-than-default byte boundaries. On most memory is aligned on larger-than-default byte boundaries. On most
current operating systems, the "malloc()" implementation returns current operating systems, the ``malloc()`` implementation returns
pointers that are aligned to 16-byte boundaries. Using SSE vector pointers that are aligned to 16-byte boundaries. Using SSE vector
instructions efficiently, however, requires memory blocks being aligned instructions efficiently, however, requires memory blocks being aligned
on 64-byte boundaries. on 64-byte boundaries.
@ -471,9 +556,9 @@ on 64-byte boundaries.
-D LAMMPS_MEMALIGN=value # 0, 8, 16, 32, 64 (default) -D LAMMPS_MEMALIGN=value # 0, 8, 16, 32, 64 (default)
Use a ``LAMMPS_MEMALIGN`` value of 0 to disable using Use a ``LAMMPS_MEMALIGN`` value of 0 to disable using
"posix_memalign()" and revert to using the "malloc()" C-library ``posix_memalign()`` and revert to using the ``malloc()`` C-library
function instead. When compiling LAMMPS for Windows systems, function instead. When compiling LAMMPS for Windows systems,
"malloc()" will always be used and this setting is ignored. ``malloc()`` will always be used and this setting is ignored.
.. tab:: Traditional make .. tab:: Traditional make
@ -482,7 +567,7 @@ on 64-byte boundaries.
LMP_INC = -DLAMMPS_MEMALIGN=value # 8, 16, 32, 64 LMP_INC = -DLAMMPS_MEMALIGN=value # 8, 16, 32, 64
Do not set ``-DLAMMPS_MEMALIGN``, if you want to have memory Do not set ``-DLAMMPS_MEMALIGN``, if you want to have memory
allocated with the "malloc()" function call allocated with the ``malloc()`` function call
instead. ``-DLAMMPS_MEMALIGN`` **cannot** be used on Windows, as instead. ``-DLAMMPS_MEMALIGN`` **cannot** be used on Windows, as
Windows different function calls with different semantics for Windows different function calls with different semantics for
allocating aligned memory, that are not compatible with how LAMMPS allocating aligned memory, that are not compatible with how LAMMPS

View File

@ -1,5 +1,7 @@
.. table_from_list:: .. only:: html
:columns: 3
.. table_from_list::
:columns: 5
* :doc:`General commands <Commands_all>` * :doc:`General commands <Commands_all>`
* :doc:`Fix styles <Commands_fix>` * :doc:`Fix styles <Commands_fix>`
@ -12,15 +14,17 @@
* :doc:`KSpace styles <Commands_kspace>` * :doc:`KSpace styles <Commands_kspace>`
* :doc:`Dump styles <Commands_dump>` * :doc:`Dump styles <Commands_dump>`
.. raw:: latex
\clearpage
General commands General commands
================ ================
An alphabetic list of general LAMMPS commands. Note that style An alphabetic list of general LAMMPS commands.
commands with many variants, can be more easily accessed via the small
table above.
.. table_from_list:: .. table_from_list::
:columns: 5 :columns: 6
* :doc:`angle_coeff <angle_coeff>` * :doc:`angle_coeff <angle_coeff>`
* :doc:`angle_style <angle_style>` * :doc:`angle_style <angle_style>`
@ -54,6 +58,7 @@ table above.
* :doc:`echo <echo>` * :doc:`echo <echo>`
* :doc:`fix <fix>` * :doc:`fix <fix>`
* :doc:`fix_modify <fix_modify>` * :doc:`fix_modify <fix_modify>`
* :doc:`geturl <geturl>`
* :doc:`group <group>` * :doc:`group <group>`
* :doc:`if <if>` * :doc:`if <if>`
* :doc:`improper_coeff <improper_coeff>` * :doc:`improper_coeff <improper_coeff>`
@ -121,7 +126,7 @@ commands have accelerated versions. This is indicated by an
additional letter in parenthesis: k = KOKKOS. additional letter in parenthesis: k = KOKKOS.
.. table_from_list:: .. table_from_list::
:columns: 5 :columns: 6
* :doc:`dynamical_matrix (k) <dynamical_matrix>` * :doc:`dynamical_matrix (k) <dynamical_matrix>`
* :doc:`group2ndx <group2ndx>` * :doc:`group2ndx <group2ndx>`

View File

@ -1,21 +1,7 @@
.. table_from_list::
:columns: 3
* :doc:`General commands <Commands_all>`
* :doc:`Fix styles <Commands_fix>`
* :doc:`Compute styles <Commands_compute>`
* :doc:`Pair styles <Commands_pair>`
* :ref:`Bond styles <bond>`
* :ref:`Angle styles <angle>`
* :ref:`Dihedral styles <dihedral>`
* :ref:`Improper styles <improper>`
* :doc:`KSpace styles <Commands_kspace>`
* :doc:`Dump styles <Commands_dump>`
.. _bond: .. _bond:
Bond_style potentials Bond styles
===================== ===========
All LAMMPS :doc:`bond_style <bond_style>` commands. Some styles have All LAMMPS :doc:`bond_style <bond_style>` commands. Some styles have
accelerated versions. This is indicated by additional letters in accelerated versions. This is indicated by additional letters in
@ -23,7 +9,7 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT. OPT.
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 5
* :doc:`none <bond_none>` * :doc:`none <bond_none>`
* :doc:`zero <bond_zero>` * :doc:`zero <bond_zero>`
@ -33,6 +19,8 @@ OPT.
* *
* *
* *
*
*
* :doc:`bpm/rotational <bond_bpm_rotational>` * :doc:`bpm/rotational <bond_bpm_rotational>`
* :doc:`bpm/spring <bond_bpm_spring>` * :doc:`bpm/spring <bond_bpm_spring>`
* :doc:`class2 (ko) <bond_class2>` * :doc:`class2 (ko) <bond_class2>`
@ -60,8 +48,8 @@ OPT.
.. _angle: .. _angle:
Angle_style potentials Angle styles
====================== ============
All LAMMPS :doc:`angle_style <angle_style>` commands. Some styles have All LAMMPS :doc:`angle_style <angle_style>` commands. Some styles have
accelerated versions. This is indicated by additional letters in accelerated versions. This is indicated by additional letters in
@ -69,7 +57,7 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT. OPT.
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 5
* :doc:`none <angle_none>` * :doc:`none <angle_none>`
* :doc:`zero <angle_zero>` * :doc:`zero <angle_zero>`
@ -79,6 +67,8 @@ OPT.
* *
* *
* *
*
*
* :doc:`amoeba <angle_amoeba>` * :doc:`amoeba <angle_amoeba>`
* :doc:`charmm (iko) <angle_charmm>` * :doc:`charmm (iko) <angle_charmm>`
* :doc:`class2 (ko) <angle_class2>` * :doc:`class2 (ko) <angle_class2>`
@ -106,8 +96,8 @@ OPT.
.. _dihedral: .. _dihedral:
Dihedral_style potentials Dihedral styles
========================= ===============
All LAMMPS :doc:`dihedral_style <dihedral_style>` commands. Some styles All LAMMPS :doc:`dihedral_style <dihedral_style>` commands. Some styles
have accelerated versions. This is indicated by additional letters in have accelerated versions. This is indicated by additional letters in
@ -115,7 +105,7 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT. OPT.
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 5
* :doc:`none <dihedral_none>` * :doc:`none <dihedral_none>`
* :doc:`zero <dihedral_zero>` * :doc:`zero <dihedral_zero>`
@ -125,6 +115,8 @@ OPT.
* *
* *
* *
*
*
* :doc:`charmm (iko) <dihedral_charmm>` * :doc:`charmm (iko) <dihedral_charmm>`
* :doc:`charmmfsw (k) <dihedral_charmm>` * :doc:`charmmfsw (k) <dihedral_charmm>`
* :doc:`class2 (ko) <dihedral_class2>` * :doc:`class2 (ko) <dihedral_class2>`
@ -144,8 +136,8 @@ OPT.
.. _improper: .. _improper:
Improper_style potentials Improper styles
========================= ===============
All LAMMPS :doc:`improper_style <improper_style>` commands. Some styles All LAMMPS :doc:`improper_style <improper_style>` commands. Some styles
have accelerated versions. This is indicated by additional letters in have accelerated versions. This is indicated by additional letters in
@ -153,7 +145,7 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT. OPT.
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 5
* :doc:`none <improper_none>` * :doc:`none <improper_none>`
* :doc:`zero <improper_zero>` * :doc:`zero <improper_zero>`
@ -163,6 +155,8 @@ OPT.
* *
* *
* *
*
*
* :doc:`amoeba <improper_amoeba>` * :doc:`amoeba <improper_amoeba>`
* :doc:`class2 (ko) <improper_class2>` * :doc:`class2 (ko) <improper_class2>`
* :doc:`cossq (o) <improper_cossq>` * :doc:`cossq (o) <improper_cossq>`

View File

@ -1,3 +1,7 @@
.. raw:: latex
\clearpage
Commands by category Commands by category
==================== ====================
@ -6,8 +10,8 @@ This page lists most of the LAMMPS commands, grouped by category. The
alphabetically. Style options for entries like fix, compute, pair etc. alphabetically. Style options for entries like fix, compute, pair etc.
have their own pages where they are listed alphabetically. have their own pages where they are listed alphabetically.
Initialization: Initialization
------------------------------ --------------
.. table_from_list:: .. table_from_list::
:columns: 5 :columns: 5
@ -18,8 +22,8 @@ Initialization:
* :doc:`suffix <suffix>` * :doc:`suffix <suffix>`
* :doc:`units <units>` * :doc:`units <units>`
Setup simulation box: Setup simulation box
------------------------------ --------------------
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 4
@ -31,8 +35,8 @@ Setup simulation box:
* :doc:`lattice <lattice>` * :doc:`lattice <lattice>`
* :doc:`region <region>` * :doc:`region <region>`
Setup atoms: Setup atoms
------------------------------ -----------
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 4
@ -55,8 +59,8 @@ Setup atoms:
* :doc:`set <set>` * :doc:`set <set>`
* :doc:`velocity <velocity>` * :doc:`velocity <velocity>`
Force fields: Force fields
------------------------------ ------------
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 4
@ -79,8 +83,8 @@ Force fields:
* :doc:`pair_write <pair_write>` * :doc:`pair_write <pair_write>`
* :doc:`special_bonds <special_bonds>` * :doc:`special_bonds <special_bonds>`
Settings: Settings
------------------------------ --------
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 4
@ -98,8 +102,8 @@ Settings:
* :doc:`timer <timer>` * :doc:`timer <timer>`
* :doc:`timestep <timestep>` * :doc:`timestep <timestep>`
Operations within timestepping (fixes) and diagnostics (computes): Operations within timestepping (fixes) and diagnostics (computes)
------------------------------------------------------------------------------------------ -----------------------------------------------------------------
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 4
@ -111,8 +115,8 @@ Operations within timestepping (fixes) and diagnostics (computes):
* :doc:`uncompute <uncompute>` * :doc:`uncompute <uncompute>`
* :doc:`unfix <unfix>` * :doc:`unfix <unfix>`
Output: Output
------------------------------ ------
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 4
@ -131,8 +135,8 @@ Output:
* :doc:`write_dump <write_dump>` * :doc:`write_dump <write_dump>`
* :doc:`write_restart <write_restart>` * :doc:`write_restart <write_restart>`
Actions: Actions
------------------------------ -------
.. table_from_list:: .. table_from_list::
:columns: 6 :columns: 6
@ -146,8 +150,8 @@ Actions:
* :doc:`tad <tad>` * :doc:`tad <tad>`
* :doc:`temper <temper>` * :doc:`temper <temper>`
Input script control: Input script control
------------------------------ --------------------
.. table_from_list:: .. table_from_list::
:columns: 7 :columns: 7

View File

@ -1,19 +1,5 @@
.. table_from_list:: Compute styles
:columns: 3 ==============
* :doc:`General commands <Commands_all>`
* :doc:`Fix styles <Commands_fix>`
* :doc:`Compute styles <Commands_compute>`
* :doc:`Pair styles <Commands_pair>`
* :ref:`Bond styles <bond>`
* :ref:`Angle styles <angle>`
* :ref:`Dihedral styles <dihedral>`
* :ref:`Improper styles <improper>`
* :doc:`KSpace styles <Commands_kspace>`
* :doc:`Dump styles <Commands_dump>`
Compute commands
================
An alphabetic list of all LAMMPS :doc:`compute <compute>` commands. An alphabetic list of all LAMMPS :doc:`compute <compute>` commands.
Some styles have accelerated versions. This is indicated by Some styles have accelerated versions. This is indicated by
@ -21,7 +7,7 @@ additional letters in parenthesis: g = GPU, i = INTEL, k =
KOKKOS, o = OPENMP, t = OPT. KOKKOS, o = OPENMP, t = OPT.
.. table_from_list:: .. table_from_list::
:columns: 5 :columns: 4
* :doc:`ackland/atom <compute_ackland_atom>` * :doc:`ackland/atom <compute_ackland_atom>`
* :doc:`adf <compute_adf>` * :doc:`adf <compute_adf>`

View File

@ -1,24 +1,10 @@
.. table_from_list:: Dump styles
:columns: 3 ===========
* :doc:`General commands <Commands_all>`
* :doc:`Fix styles <Commands_fix>`
* :doc:`Compute styles <Commands_compute>`
* :doc:`Pair styles <Commands_pair>`
* :ref:`Bond styles <bond>`
* :ref:`Angle styles <angle>`
* :ref:`Dihedral styles <dihedral>`
* :ref:`Improper styles <improper>`
* :doc:`KSpace styles <Commands_kspace>`
* :doc:`Dump styles <Commands_dump>`
Dump commands
=============
An alphabetic list of all LAMMPS :doc:`dump <dump>` commands. An alphabetic list of all LAMMPS :doc:`dump <dump>` commands.
.. table_from_list:: .. table_from_list::
:columns: 5 :columns: 6
* :doc:`atom <dump>` * :doc:`atom <dump>`
* :doc:`atom/adios <dump_adios>` * :doc:`atom/adios <dump_adios>`

View File

@ -1,19 +1,5 @@
.. table_from_list:: Fix styles
:columns: 3 ==========
* :doc:`General commands <Commands_all>`
* :doc:`Fix styles <Commands_fix>`
* :doc:`Compute styles <Commands_compute>`
* :doc:`Pair styles <Commands_pair>`
* :ref:`Bond styles <bond>`
* :ref:`Angle styles <angle>`
* :ref:`Dihedral styles <dihedral>`
* :ref:`Improper styles <improper>`
* :doc:`KSpace styles <Commands_kspace>`
* :doc:`Dump styles <Commands_dump>`
Fix commands
============
An alphabetic list of all LAMMPS :doc:`fix <fix>` commands. Some styles An alphabetic list of all LAMMPS :doc:`fix <fix>` commands. Some styles
have accelerated versions. This is indicated by additional letters in have accelerated versions. This is indicated by additional letters in
@ -21,7 +7,7 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT. OPT.
.. table_from_list:: .. table_from_list::
:columns: 5 :columns: 4
* :doc:`accelerate/cos <fix_accelerate_cos>` * :doc:`accelerate/cos <fix_accelerate_cos>`
* :doc:`acks2/reaxff (k) <fix_acks2_reaxff>` * :doc:`acks2/reaxff (k) <fix_acks2_reaxff>`

View File

@ -10,14 +10,14 @@ for any commands that may be processed later. Commands may set an
internal variable, read in a file, or run a simulation. These actions internal variable, read in a file, or run a simulation. These actions
can be grouped into three categories: can be grouped into three categories:
a) commands that change a global setting (examples: timestep, newton, a) commands that change a global setting (examples: :doc:`timestep <timestep>`, :doc:`newton <newton>`,
echo, log, thermo, restart), :doc:`echo <echo>`, :doc:`log <log>`, :doc:`thermo <thermo>`, :doc:`restart <restart>`),
b) commands that add, modify, remove, or replace "styles" that are b) commands that add, modify, remove, or replace "styles" that are
executed during a "run" (examples: pair_style, fix, compute, dump, executed during a "run" (examples: :doc:`pair_style <pair_style>`, :doc:`fix <fix>`, :doc:`compute <compute>`, :doc:`dump <dump>`,
thermo_style, pair_modify), and :doc:`thermo_style <thermo_style>`, :doc:`pair_modify <pair_modify>`), and
c) commands that execute a "run" or perform some other computation or c) commands that execute a "run" or perform some other computation or
operation (examples: print, run, minimize, temper, write_dump, rerun, operation (examples: :doc:`print <print>`, :doc:`run <run>`, :doc:`minimize <minimize>`, :doc:`temper <temper>`, :doc:`write_dump <write_dump>`, :doc:`rerun <rerun>`,
read_data, read_restart) :doc:`read_data <read_data>`, :doc:`read_restart <read_restart>`)
Commands in category a) have default settings, which means you only Commands in category a) have default settings, which means you only
need to use the command if you wish to change the defaults. need to use the command if you wish to change the defaults.
@ -61,7 +61,7 @@ between commands in the c) category. The following rules apply:
<read_data>` command initializes the system by setting up the <read_data>` command initializes the system by setting up the
simulation box and assigning atoms to processors. If default values simulation box and assigning atoms to processors. If default values
are not desired, the :doc:`processors <processors>` and are not desired, the :doc:`processors <processors>` and
:doc:`boundary <boundary>` commands need to be used before read_data :doc:`boundary <boundary>` commands need to be used before ``read_data``
to tell LAMMPS how to map processors to the simulation box. to tell LAMMPS how to map processors to the simulation box.
Many input script errors are detected by LAMMPS and an ERROR or Many input script errors are detected by LAMMPS and an ERROR or
@ -70,6 +70,6 @@ more information on what errors mean. The documentation for each
command lists restrictions on how the command can be used. command lists restrictions on how the command can be used.
You can use the :ref:`-skiprun <skiprun>` command line flag You can use the :ref:`-skiprun <skiprun>` command line flag
to have LAMMPS skip the execution of any "run", "minimize", or similar to have LAMMPS skip the execution of any ``run``, ``minimize``, or similar
commands to check the entire input for correct syntax to avoid crashes commands to check the entire input for correct syntax to avoid crashes
on typos or syntax errors in long runs. on typos or syntax errors in long runs.

View File

@ -1,19 +1,5 @@
.. table_from_list:: KSpace styles
:columns: 3 =============
* :doc:`General commands <Commands_all>`
* :doc:`Fix styles <Commands_fix>`
* :doc:`Compute styles <Commands_compute>`
* :doc:`Pair styles <Commands_pair>`
* :ref:`Bond styles <bond>`
* :ref:`Angle styles <angle>`
* :ref:`Dihedral styles <dihedral>`
* :ref:`Improper styles <improper>`
* :doc:`KSpace styles <Commands_kspace>`
* :doc:`Dump styles <Commands_dump>`
KSpace solvers
==============
All LAMMPS :doc:`kspace_style <kspace_style>` solvers. Some styles have All LAMMPS :doc:`kspace_style <kspace_style>` solvers. Some styles have
accelerated versions. This is indicated by additional letters in accelerated versions. This is indicated by additional letters in
@ -21,7 +7,7 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT. OPT.
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 5
* :doc:`ewald (o) <kspace_style>` * :doc:`ewald (o) <kspace_style>`
* :doc:`ewald/disp <kspace_style>` * :doc:`ewald/disp <kspace_style>`

View File

@ -1,19 +1,5 @@
.. table_from_list:: Pair styles
:columns: 3 ===========
* :doc:`General commands <Commands_all>`
* :doc:`Fix styles <Commands_fix>`
* :doc:`Compute styles <Commands_compute>`
* :doc:`Pair styles <Commands_pair>`
* :ref:`Bond styles <bond>`
* :ref:`Angle styles <angle>`
* :ref:`Dihedral styles <dihedral>`
* :ref:`Improper styles <improper>`
* :doc:`KSpace styles <Commands_kspace>`
* :doc:`Dump styles <Commands_dump>`
Pair_style potentials
======================
All LAMMPS :doc:`pair_style <pair_style>` commands. Some styles have All LAMMPS :doc:`pair_style <pair_style>` commands. Some styles have
accelerated versions. This is indicated by additional letters in accelerated versions. This is indicated by additional letters in
@ -21,7 +7,7 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT. OPT.
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 3
* :doc:`none <pair_none>` * :doc:`none <pair_none>`
* :doc:`zero <pair_zero>` * :doc:`zero <pair_zero>`
@ -35,10 +21,6 @@ OPT.
* *
* *
* *
*
*
*
*
* :doc:`adp (ko) <pair_adp>` * :doc:`adp (ko) <pair_adp>`
* :doc:`agni (o) <pair_agni>` * :doc:`agni (o) <pair_agni>`
* :doc:`aip/water/2dm (t) <pair_aip_water_2dm>` * :doc:`aip/water/2dm (t) <pair_aip_water_2dm>`

View File

@ -42,8 +42,8 @@ LAMMPS:
If the $ is followed by text in curly brackets '{}', then the If the $ is followed by text in curly brackets '{}', then the
variable name is the text inside the curly brackets. If no curly variable name is the text inside the curly brackets. If no curly
brackets follow the $, then the variable name is the single character brackets follow the $, then the variable name is the single character
immediately following the $. Thus ${myTemp} and $x refer to variables immediately following the $. Thus ``${myTemp}`` and ``$x`` refer to variables
named "myTemp" and "x", while "$xx" will be interpreted as a variable named "myTemp" and "x", while ``$xx`` will be interpreted as a variable
named "x" followed by an "x" character. named "x" followed by an "x" character.
How the variable is converted to a text string depends on what style How the variable is converted to a text string depends on what style
@ -79,10 +79,10 @@ LAMMPS:
Additionally, the entire "immediate" variable expression may be Additionally, the entire "immediate" variable expression may be
followed by a colon, followed by a C-style format string, followed by a colon, followed by a C-style format string,
e.g. ":%f" or ":%.10g". The format string must be appropriate for e.g. ``:%f`` or ``:%.10g``. The format string must be appropriate for
a double-precision floating-point value. The format string is used a double-precision floating-point value. The format string is used
to output the result of the variable expression evaluation. If a to output the result of the variable expression evaluation. If a
format string is not specified, a high-precision "%.20g" is used as format string is not specified, a high-precision ``%.20g`` is used as
the default format. the default format.
This can be useful for formatting print output to a desired precision: This can be useful for formatting print output to a desired precision:
@ -101,8 +101,8 @@ LAMMPS:
variable b2 equal 4 variable b2 equal 4
print "B2 = ${b$a}" print "B2 = ${b$a}"
Nor can you specify an expression like "$($x-1.0)" for an immediate Nor can you specify an expression like ``$($x-1.0)`` for an immediate
variable, but you could use $(v_x-1.0), since the latter is valid variable, but you could use ``$(v_x-1.0)``, since the latter is valid
syntax for an :doc:`equal-style variable <variable>`. syntax for an :doc:`equal-style variable <variable>`.
See the :doc:`variable <variable>` command for more details of how See the :doc:`variable <variable>` command for more details of how

View File

@ -8,10 +8,10 @@ page.
A LAMMPS input script typically has 4 parts: A LAMMPS input script typically has 4 parts:
1. :ref:`Initialization <init>` #. :ref:`Initialization <init>`
2. :ref:`System definition <system>` #. :ref:`System definition <system>`
3. :ref:`Simulation settings <settings>` #. :ref:`Simulation settings <settings>`
4. :ref:`Run a simulation <run>` #. :ref:`Run a simulation <run>`
The last 2 parts can be repeated as many times as desired. I.e. run a The last 2 parts can be repeated as many times as desired. I.e. run a
simulation, change some settings, run some more, etc. Each of the 4 simulation, change some settings, run some more, etc. Each of the 4

View File

@ -2,7 +2,7 @@ Accessing per-atom data
----------------------- -----------------------
This page discusses how per-atom data is managed in LAMMPS, how it can This page discusses how per-atom data is managed in LAMMPS, how it can
be accessed, what communication patters apply, and some of the utility be accessed, what communication patterns apply, and some of the utility
functions that exist for a variety of purposes. functions that exist for a variety of purposes.
@ -14,11 +14,11 @@ As described on the :doc:`parallel partitioning algorithms
simulation domain, either in a *brick* or *tiled* manner. Each MPI simulation domain, either in a *brick* or *tiled* manner. Each MPI
process *owns* exactly one subdomain and the atoms within it. To compute process *owns* exactly one subdomain and the atoms within it. To compute
forces for tuples of atoms that are spread across sub-domain boundaries, forces for tuples of atoms that are spread across sub-domain boundaries,
also a "halo" of *ghost* atoms are maintained within a the communication also a "halo" of *ghost* atoms are maintained within the communication
cutoff distance of its subdomain. cutoff distance of its subdomain.
The total number of atoms is stored in `Atom::natoms` (within any The total number of atoms is stored in `Atom::natoms` (within any
typical class this can be referred to at `atom->natoms`. The number of typical class this can be referred to at `atom->natoms`). The number of
*owned* (or "local" atoms) are stored in `Atom::nlocal`; the number of *owned* (or "local" atoms) are stored in `Atom::nlocal`; the number of
*ghost* atoms is stored in `Atom::nghost`. The sum of `Atom::nlocal` *ghost* atoms is stored in `Atom::nghost`. The sum of `Atom::nlocal`
over all MPI processes should be `Atom::natoms`. This is by default over all MPI processes should be `Atom::natoms`. This is by default
@ -27,8 +27,8 @@ LAMMPS stops with a "lost atoms" error. For convenience also the
property `Atom::nmax` is available, this is the maximum of property `Atom::nmax` is available, this is the maximum of
`Atom::nlocal + Atom::nghost` across all MPI processes. `Atom::nlocal + Atom::nghost` across all MPI processes.
Per-atom properties are either managed by the atom style, or individual Per-atom properties are either managed by the atom style, individual
classes. or as custom arrays by the individual classes. If only access classes, or as custom arrays by the individual classes. If only access
to *owned* atoms is needed, they are usually allocated to be of size to *owned* atoms is needed, they are usually allocated to be of size
`Atom::nlocal`, otherwise of size `Atom::nmax`. Please note that not all `Atom::nlocal`, otherwise of size `Atom::nmax`. Please note that not all
per-atom properties are available or updated on *ghost* atoms. For per-atom properties are available or updated on *ghost* atoms. For
@ -61,7 +61,7 @@ can be found via the `Atom::sametag` array. It points to the next atom
index with the same tag or -1 if there are no more atoms with the same index with the same tag or -1 if there are no more atoms with the same
tag. The list will be exhaustive when starting with an index of an tag. The list will be exhaustive when starting with an index of an
*owned* atom, since the atom IDs are unique, so there can only be one *owned* atom, since the atom IDs are unique, so there can only be one
such atom. Example code to count atoms with same atom ID in subdomain: such atom. Example code to count atoms with same atom ID in a subdomain:
.. code-block:: c++ .. code-block:: c++

View File

@ -69,7 +69,7 @@ The basic LAMMPS class hierarchy which is created by the LAMMPS class
constructor is shown in :ref:`class-topology`. When input commands constructor is shown in :ref:`class-topology`. When input commands
are processed, additional class instances are created, or deleted, or are processed, additional class instances are created, or deleted, or
replaced. Likewise, specific member functions of specific classes are replaced. Likewise, specific member functions of specific classes are
called to trigger actions such creating atoms, computing forces, called to trigger actions such as creating atoms, computing forces,
computing properties, time-propagating the system, or writing output. computing properties, time-propagating the system, or writing output.
Compositing and Inheritance Compositing and Inheritance
@ -110,9 +110,10 @@ As mentioned above, there can be multiple instances of classes derived
from the ``Fix`` or ``Compute`` base classes. They represent a from the ``Fix`` or ``Compute`` base classes. They represent a
different facet of LAMMPS' flexibility, as they provide methods which different facet of LAMMPS' flexibility, as they provide methods which
can be called at different points within a timestep, as explained in can be called at different points within a timestep, as explained in
`Developer_flow`. This allows the input script to tailor how a specific the :doc:`How a timestep works <Developer_flow>` doc page. This allows
simulation is run, what diagnostic computations are performed, and how the input script to tailor how a specific simulation is run, what
the output of those computations is further processed or output. diagnostic computations are performed, and how the output of those
computations is further processed or output.
Additional code sharing is possible by creating derived classes from the Additional code sharing is possible by creating derived classes from the
derived classes (e.g., to implement an accelerated version of a pair derived classes (e.g., to implement an accelerated version of a pair

View File

@ -128,7 +128,7 @@ reflect particles off box boundaries in the :doc:`FixWallReflect class
The ``decide()`` method in the Neighbor class determines whether The ``decide()`` method in the Neighbor class determines whether
neighbor lists need to be rebuilt on the current timestep (conditions neighbor lists need to be rebuilt on the current timestep (conditions
can be changed using the :doc:`neigh_modify every/delay/check can be changed using the :doc:`neigh_modify every/delay/check
<neigh_modify>` command. If not, coordinates of ghost atoms are <neigh_modify>` command). If not, coordinates of ghost atoms are
acquired by each processor via the ``forward_comm()`` method of the Comm acquired by each processor via the ``forward_comm()`` method of the Comm
class. If neighbor lists need to be built, several operations within class. If neighbor lists need to be built, several operations within
the inner if clause of the pseudocode are first invoked. The the inner if clause of the pseudocode are first invoked. The

View File

@ -433,7 +433,7 @@ from owned to ghost cells, or ghost to owned cells, respectively, as
described above. The *caller* argument should be one of these values described above. The *caller* argument should be one of these values
-- Grid3d::COMPUTE, Grid3d::FIX, Grid3d::KSPACE, Grid3d::PAIR -- -- Grid3d::COMPUTE, Grid3d::FIX, Grid3d::KSPACE, Grid3d::PAIR --
depending on the style of the caller class. The *ptr* argument is the depending on the style of the caller class. The *ptr* argument is the
"this" pointer to the caller class. These 2 arguments are used to "this" pointer to the caller class. These two arguments are used to
call back to pack()/unpack() functions in the caller class, as call back to pack()/unpack() functions in the caller class, as
explained below. explained below.

View File

@ -20,7 +20,7 @@ Available topics are:
Reading and parsing of text and text files Reading and parsing of text and text files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It is frequently required for a class in LAMMPS to read in additional Classes in LAMMPS frequently need to read in additional
data from a file, e.g. potential parameters from a potential file for data from a file, e.g. potential parameters from a potential file for
manybody potentials. LAMMPS provides several custom classes and manybody potentials. LAMMPS provides several custom classes and
convenience functions to simplify the process. They offer the convenience functions to simplify the process. They offer the
@ -128,9 +128,8 @@ that determines the kind of neighbor list requested. The default value
used here asks for a perpetual "half" neighbor list. used here asks for a perpetual "half" neighbor list.
Non-default values of the second argument need to be used to adjust a Non-default values of the second argument need to be used to adjust a
neighbor list request to the specific needs of a style an additional neighbor list request to the specific needs of a style. The :doc:`tersoff
request flag is needed. The :doc:`tersoff <pair_tersoff>` pair style, <pair_tersoff>` pair style, for example, needs a "full" neighbor list:
for example, needs a "full" neighbor list:
.. code-block:: c++ .. code-block:: c++
@ -141,8 +140,8 @@ for example, needs a "full" neighbor list:
} }
When a pair style supports r-RESPA time integration with different cutoff regions, When a pair style supports r-RESPA time integration with different cutoff regions,
the request flag may depend on the corresponding r-RESPA settings. Here an example the request flag may depend on the corresponding r-RESPA settings. Here is an
from pair style lj/cut: example from pair style lj/cut:
.. code-block:: c++ .. code-block:: c++
@ -160,7 +159,7 @@ from pair style lj/cut:
} }
Granular pair styles need neighbor lists based on particle sizes and not cutoff Granular pair styles need neighbor lists based on particle sizes and not cutoff
and also may require to have the list of previous neighbors available ("history"). and also may need to store data across timesteps ("history").
For example with: For example with:
.. code-block:: c++ .. code-block:: c++
@ -169,7 +168,7 @@ For example with:
else neighbor->add_request(this, NeighConst::REQ_SIZE); else neighbor->add_request(this, NeighConst::REQ_SIZE);
In case a class would need to make multiple neighbor list requests with different In case a class would need to make multiple neighbor list requests with different
settings each request can set an id which is then used in the corresponding settings, each request can set an id which is then used in the corresponding
``init_list()`` function to assign it to the suitable pointer variable. This is ``init_list()`` function to assign it to the suitable pointer variable. This is
done for example by the :doc:`pair style meam <pair_meam>`: done for example by the :doc:`pair style meam <pair_meam>`:
@ -279,8 +278,8 @@ And here is how the code operates:
* The :doc:`thermo_style custom <thermo_style>` command defines * The :doc:`thermo_style custom <thermo_style>` command defines
*ecouple* and *econserve* keywords. *ecouple* and *econserve* keywords.
* These keywords sum the energy contributions from all the * These keywords sum the energy contributions from all the
*ecouple_flag* = 1 fixes by invoking the energy_couple() method in *ecouple_flag* = 1 fixes by invoking the *energy_couple()* method in
the Modify class, which calls the compute_scalar() method of each the Modify class, which calls the *compute_scalar()* method of each
fix in the list. fix in the list.
------------------ ------------------
@ -320,19 +319,19 @@ The fix must also do the following:
The ev_init() and ev_tally() methods also account for global and The ev_init() and ev_tally() methods also account for global and
peratom virial contributions. Thus you do not need to invoke the peratom virial contributions. Thus you do not need to invoke the
v_init() and v_tally() methods, if the fix also calculates peratom v_init() and v_tally() methods if the fix also calculates peratom
energies. energies.
The fix must also specify whether (by default) to include or exclude The fix must also specify whether (by default) to include or exclude
these contributions to the global/peratom energy/virial of the system. these contributions to the global/peratom energy/virial of the system.
For the fix to include the contributions, set either of both of these For the fix to include the contributions, set either or both of these
variables in the constructor: variables in the constructor:
* *thermo_energy* = 1, for global and peratom energy * *thermo_energy* = 1, for global and peratom energy
* *thermo_virial* = 1, for global and peratom virial * *thermo_virial* = 1, for global and peratom virial
Note that these variables are zeroed in fix.cpp. Thus if you don't Note that these variables are zeroed in fix.cpp. Thus if you don't
set the variables, the contributions will be excluded (by default) set the variables, the contributions will be excluded (by default).
However, the user has ultimate control over whether to include or However, the user has ultimate control over whether to include or
exclude the contributions of the fix via the :doc:`fix modify exclude the contributions of the fix via the :doc:`fix modify
@ -406,9 +405,11 @@ processor owns, within the global grid:
.. parsed-literal:: .. parsed-literal::
nxlo_in,nxhi_in,nylo_in,nyhi_in,nzlo_in,nzhi_in = 3d decomposition brick nFOO_in = 3d decomposition brick
nxlo_fft,nxhi_fft,nylo_fft,nyhi_fft,nzlo_fft,nzhi_fft = FFT decomposition brick nFOO_fft = FFT decomposition brick
nxlo_out,nxhi_out,nylo_out,nyhi_out,nzlo_out,nzhi_out = 3d decomposition brick + ghost cells nFOO_out = 3d decomposition brick + ghost cells
where ``FOO`` corresponds to ``xlo, xhi, ylo, yhi, zlo,`` or ``zhi``.
The ``in`` and ``fft`` indices are from 0 to N-1 inclusive in each The ``in`` and ``fft`` indices are from 0 to N-1 inclusive in each
dimension, where N is the grid size. dimension, where N is the grid size.

View File

@ -4,8 +4,7 @@ Communication
Following the selected partitioning scheme, all per-atom data is Following the selected partitioning scheme, all per-atom data is
distributed across the MPI processes, which allows LAMMPS to handle very distributed across the MPI processes, which allows LAMMPS to handle very
large systems provided it uses a correspondingly large number of MPI large systems provided it uses a correspondingly large number of MPI
processes. Since The per-atom data (atom IDs, positions, velocities, processes. To be able to compute the short-range interactions, MPI
types, etc.) To be able to compute the short-range interactions, MPI
processes need not only access to the data of atoms they "own" but also processes need not only access to the data of atoms they "own" but also
information about atoms from neighboring subdomains, in LAMMPS referred information about atoms from neighboring subdomains, in LAMMPS referred
to as "ghost" atoms. These are copies of atoms storing required to as "ghost" atoms. These are copies of atoms storing required
@ -37,7 +36,7 @@ be larger than half the simulation domain.
Efficient communication patterns are needed to update the "ghost" atom Efficient communication patterns are needed to update the "ghost" atom
data, since that needs to be done at every MD time step or minimization data, since that needs to be done at every MD time step or minimization
step. The diagrams of the `ghost-atom-comm` figure illustrate how ghost step. The diagrams of the :ref:`ghost-atom-comm` figure illustrate how ghost
atom communication is performed in two stages for a 2d simulation (three atom communication is performed in two stages for a 2d simulation (three
in 3d) for both a regular and irregular partitioning of the simulation in 3d) for both a regular and irregular partitioning of the simulation
box. For the regular case (left) atoms are exchanged first in the box. For the regular case (left) atoms are exchanged first in the

View File

@ -93,7 +93,7 @@ processors, since each tile in the initial tiling overlaps with a
handful of tiles in the final tiling. handful of tiles in the final tiling.
The transformations could also be done using collective communication The transformations could also be done using collective communication
across all $P$ processors with a single call to ``MPI_Alltoall()``, but across all :math:`P` processors with a single call to ``MPI_Alltoall()``, but
this is typically much slower. However, for the specialized brick and this is typically much slower. However, for the specialized brick and
pencil tiling illustrated in :ref:`fft-parallel` figure, collective pencil tiling illustrated in :ref:`fft-parallel` figure, collective
communication across the entire MPI communicator is not required. In communication across the entire MPI communicator is not required. In
@ -138,7 +138,7 @@ grid/particle operations that LAMMPS supports:
:math:`O(P^{\frac{1}{2}})`. :math:`O(P^{\frac{1}{2}})`.
- For efficiency in performing 1d FFTs, the grid transpose - For efficiency in performing 1d FFTs, the grid transpose
operations illustrated in Figure \ref{fig:fft} also involve operations illustrated in Figure :ref:`fft-parallel` also involve
reordering the 3d data so that a different dimension is contiguous reordering the 3d data so that a different dimension is contiguous
in memory. This reordering can be done during the packing or in memory. This reordering can be done during the packing or
unpacking of buffers for MPI communication. unpacking of buffers for MPI communication.

View File

@ -149,7 +149,7 @@ supports:
- Dependent on the "pair" setting of the :doc:`newton <newton>` command, - Dependent on the "pair" setting of the :doc:`newton <newton>` command,
the "half" neighbor lists may contain **all** pairs of atoms where the "half" neighbor lists may contain **all** pairs of atoms where
atom *j* is a ghost atom (i.e. when the newton pair setting is *off*) atom *j* is a ghost atom (i.e. when the newton pair setting is *off*).
For the newton pair *on* setting the atom *j* is only added to the For the newton pair *on* setting the atom *j* is only added to the
list if its *z* coordinate is larger, or if equal the *y* coordinate list if its *z* coordinate is larger, or if equal the *y* coordinate
is larger, and that is equal, too, the *x* coordinate is larger. For is larger, and that is equal, too, the *x* coordinate is larger. For

View File

@ -1,13 +1,13 @@
OpenMP Parallelism OpenMP Parallelism
^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
The styles in the INTEL, KOKKOS, and OPENMP package offer to use OpenMP The styles in the INTEL, KOKKOS, and OPENMP packages offer to use OpenMP
thread parallelism to predominantly distribute loops over local data thread parallelism to predominantly distribute loops over local data
and thus follow an orthogonal parallelization strategy to the and thus follow an orthogonal parallelization strategy to the
decomposition into spatial domains used by the :doc:`MPI partitioning decomposition into spatial domains used by the :doc:`MPI partitioning
<Developer_par_part>`. For clarity, this section discusses only the <Developer_par_part>`. For clarity, this section discusses only the
implementation in the OPENMP package, as it is the simplest. The INTEL implementation in the OPENMP package, as it is the simplest. The INTEL
and KOKKOS package offer additional options and are more complex since and KOKKOS packages offer additional options and are more complex since
they support more features and different hardware like co-processors they support more features and different hardware like co-processors
or GPUs. or GPUs.
@ -16,7 +16,7 @@ keep the changes to the source code small, so that it would be easier to
maintain the code and keep it in sync with the non-threaded standard maintain the code and keep it in sync with the non-threaded standard
implementation. This is achieved by a) making the OPENMP version a implementation. This is achieved by a) making the OPENMP version a
derived class from the regular version (e.g. ``PairLJCutOMP`` from derived class from the regular version (e.g. ``PairLJCutOMP`` from
``PairLJCut``) and overriding only methods that are multi-threaded or ``PairLJCut``) and only overriding methods that are multi-threaded or
need to be modified to support multi-threading (similar to what was done need to be modified to support multi-threading (similar to what was done
in the OPT package), b) keeping the structure in the modified code very in the OPT package), b) keeping the structure in the modified code very
similar so that side-by-side comparisons are still useful, and c) similar so that side-by-side comparisons are still useful, and c)

View File

@ -53,7 +53,7 @@ Members of ``lammpsplugin_t``
.. list-table:: .. list-table::
:header-rows: 1 :header-rows: 1
:widths: auto :widths: 15 85
* - Member * - Member
- Description - Description
@ -135,7 +135,7 @@ unique inside the entire LAMMPS executable.
Fix style example Fix style example
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
If the factory function would be for a fix or compute, which take three If the factory function is for a fix or compute, which take three
arguments (a pointer to the LAMMPS class, the number of arguments and the arguments (a pointer to the LAMMPS class, the number of arguments and the
list of argument strings), then the pointer type is ``lammpsplugin_factory2`` list of argument strings), then the pointer type is ``lammpsplugin_factory2``
and it must be assigned to the *creator.v2* member of the plugin struct. and it must be assigned to the *creator.v2* member of the plugin struct.
@ -271,7 +271,7 @@ Plugins need to be compiled with the same compilers and libraries
as the LAMMPS executable and library. Otherwise the plugin will likely as the LAMMPS executable and library. Otherwise the plugin will likely
not load due to mismatches in the function signatures (LAMMPS is C++ so not load due to mismatches in the function signatures (LAMMPS is C++ so
scope, type, and number of arguments are encoded into the symbol names scope, type, and number of arguments are encoded into the symbol names
and thus differences in them will lead to failed plugin load commands. and thus differences in them will lead to failed plugin load commands).
Compilation of the plugin can be managed via both, CMake or traditional Compilation of the plugin can be managed via both, CMake or traditional
GNU makefiles. Some examples that can be used as a template are in the GNU makefiles. Some examples that can be used as a template are in the
``examples/plugins`` folder. The CMake script code has some small ``examples/plugins`` folder. The CMake script code has some small

View File

@ -44,7 +44,7 @@ available:
.. list-table:: .. list-table::
:header-rows: 1 :header-rows: 1
:widths: auto :widths: 32 18 50
:align: left :align: left
* - File name: * - File name:
@ -227,12 +227,12 @@ Tests for the C-style library interface
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Tests for validating the LAMMPS C-style library interface are in the Tests for validating the LAMMPS C-style library interface are in the
``unittest/c-library`` folder. They are implemented in either way used ``unittest/c-library`` folder. They are implemented either to be used
for utility functions and for LAMMPS commands, but use the functions for utility functions or for LAMMPS commands, but use the functions
implemented in the ``src/library.cpp`` file as much as possible. There implemented in the ``src/library.cpp`` file as much as possible. There
may be some overlap with other tests, but only in as much as is required may be some overlap with other tests, but only in as much as is required
to test the C-style library API. The tests are distributed over to test the C-style library API. The tests are distributed over
multiple test programs which tries to match the grouping of the multiple test programs which try to match the grouping of the
functions in the source code and :ref:`in the manual <lammps_c_api>`. functions in the source code and :ref:`in the manual <lammps_c_api>`.
This group of tests also includes tests invoking LAMMPS in parallel This group of tests also includes tests invoking LAMMPS in parallel
@ -258,7 +258,7 @@ Tests for the Python module and package
The ``unittest/python`` folder contains primarily tests for classes and The ``unittest/python`` folder contains primarily tests for classes and
functions in the LAMMPS python module but also for commands in the functions in the LAMMPS python module but also for commands in the
PYTHON package. These tests are only enabled, if the necessary PYTHON package. These tests are only enabled if the necessary
prerequisites are detected or enabled during configuration and prerequisites are detected or enabled during configuration and
compilation of LAMMPS (shared library build enabled, Python interpreter compilation of LAMMPS (shared library build enabled, Python interpreter
found, Python development files found). found, Python development files found).
@ -272,7 +272,7 @@ Tests for the Fortran interface
Tests for using the Fortran module are in the ``unittest/fortran`` Tests for using the Fortran module are in the ``unittest/fortran``
folder. Since they are also using the GoogleTest library, they require folder. Since they are also using the GoogleTest library, they require
to also implement test wrappers in C++ that will call fortran functions implementing test wrappers in C++ that will call fortran functions
which provide a C function interface through ISO_C_BINDINGS that will in which provide a C function interface through ISO_C_BINDINGS that will in
turn call the functions in the LAMMPS Fortran module. turn call the functions in the LAMMPS Fortran module.
@ -293,7 +293,7 @@ The ``unittest/formats`` folder contains test programs for reading and
writing files like data files, restart files, potential files or dump files. writing files like data files, restart files, potential files or dump files.
This covers simple things like the file i/o convenience functions in the This covers simple things like the file i/o convenience functions in the
``utils::`` namespace to complex tests of atom styles where creating and ``utils::`` namespace to complex tests of atom styles where creating and
deleting of atoms with different properties is tested in different ways deleting atoms with different properties is tested in different ways
and through script commands or reading and writing of data or restart files. and through script commands or reading and writing of data or restart files.
Tests for styles computing or modifying forces Tests for styles computing or modifying forces
@ -411,7 +411,7 @@ With this scheme a large fraction of the code of any tested pair style
will be executed and consistent results are required for different will be executed and consistent results are required for different
settings and between different accelerated pair style variants and the settings and between different accelerated pair style variants and the
base class, as well as for computing individual pairs through the base class, as well as for computing individual pairs through the
``Pair::single()`` where supported. ``Pair::single()`` method where supported.
The ``test_pair_style`` tester is used with 4 categories of test inputs: The ``test_pair_style`` tester is used with 4 categories of test inputs:
@ -443,7 +443,7 @@ file for a style that is similar to one to be tested. The file name should
follow the naming conventions described above and after copying the file, follow the naming conventions described above and after copying the file,
the first step is to replace the style names where needed. The coefficient the first step is to replace the style names where needed. The coefficient
values do not have to be meaningful, just in a reasonable range for the values do not have to be meaningful, just in a reasonable range for the
given system. It does not matter if some forces are large, for as long as given system. It does not matter if some forces are large, as long as
they do not diverge. they do not diverge.
The template input files define a large number of index variables at the top The template input files define a large number of index variables at the top
@ -535,7 +535,7 @@ The are by default no unit tests for newly added features (e.g. pair, fix,
or compute styles) unless your pull request also includes tests for the or compute styles) unless your pull request also includes tests for the
added features. If you are modifying some features, you may see failures added features. If you are modifying some features, you may see failures
for existing tests, if your modifications have some unexpected side effects for existing tests, if your modifications have some unexpected side effects
or your changes render the existing text invalid. If you are adding an or your changes render the existing test invalid. If you are adding an
accelerated version of an existing style, then only tests for INTEL, accelerated version of an existing style, then only tests for INTEL,
KOKKOS (with OpenMP only), OPENMP, and OPT will be run automatically. KOKKOS (with OpenMP only), OPENMP, and OPT will be run automatically.
Tests for the GPU package are time consuming and thus are only run Tests for the GPU package are time consuming and thus are only run
@ -543,7 +543,7 @@ Tests for the GPU package are time consuming and thus are only run
to the pull request. After the test has started, it is often best to to the pull request. After the test has started, it is often best to
remove the label since every PR activity will re-trigger the test (that remove the label since every PR activity will re-trigger the test (that
is a limitation of triggering a test with a label). Support for unit is a limitation of triggering a test with a label). Support for unit
tests with using KOKKOS with GPU acceleration is currently not supported. tests when using KOKKOS with GPU acceleration is currently not supported.
When you see a failed build on GitHub, click on ``Details`` to be taken When you see a failed build on GitHub, click on ``Details`` to be taken
to the corresponding LAMMPS Jenkins CI web page. Click on the "Exit" to the corresponding LAMMPS Jenkins CI web page. Click on the "Exit"
@ -589,11 +589,10 @@ While the epsilon (relative precision) for a single, `IEEE 754 compliant
point operation is at about 2.2e-16, the achievable precision for the point operation is at about 2.2e-16, the achievable precision for the
tests is lower due to most numbers being sums over intermediate results tests is lower due to most numbers being sums over intermediate results
and the non-associativity of floating point math leading to larger and the non-associativity of floating point math leading to larger
errors. In some cases specific properties of the tested style. As a errors. As a rule of thumb, the test epsilon can often be in the range
rule of thumb, the test epsilon can often be in the range 5.0e-14 to 5.0e-14 to 1.0e-13. But for "noisy" force kernels, e.g. those a larger
1.0e-13. But for "noisy" force kernels, e.g. those a larger amount of amount of arithmetic operations involving `exp()`, `log()` or `sin()`
arithmetic operations involving `exp()`, `log()` or `sin()` functions, functions, and also due to the effect of compiler optimization or differences
and also due to the effect of compiler optimization or differences
between compilers or platforms, epsilon may need to be further relaxed, between compilers or platforms, epsilon may need to be further relaxed,
sometimes epsilon can be relaxed to 1.0e-12. If interpolation or lookup sometimes epsilon can be relaxed to 1.0e-12. If interpolation or lookup
tables are used, epsilon may need to be set to 1.0e-10 or even higher. tables are used, epsilon may need to be set to 1.0e-10 or even higher.

View File

@ -52,10 +52,9 @@ Rename of pack/unpack_comm() to pack/unpack_forward_comm()
.. versionchanged:: 8Aug2014 .. versionchanged:: 8Aug2014
In this change set the functions to pack data into communication buffers In this change set, the functions to pack/unpack data into communication buffers
and to unpack data from communication buffers for :doc:`forward for :doc:`forward communications <Developer_comm_ops>` were renamed from
communications <Developer_comm_ops>` were renamed from ``pack_comm()`` ``pack_comm()`` and ``unpack_comm()`` to ``pack_forward_comm()`` and
and ``unpack_comm()`` to ``pack_forward_comm()`` and
``unpack_forward_comm()``, respectively. Also the meaning of the return ``unpack_forward_comm()``, respectively. Also the meaning of the return
value of these functions was changed: rather than returning the number value of these functions was changed: rather than returning the number
of items per atom stored in the buffer, now the total number of items of items per atom stored in the buffer, now the total number of items
@ -109,7 +108,7 @@ Use ev_init() to initialize variables derived from eflag and vflag
There are several variables that need to be initialized based on There are several variables that need to be initialized based on
the values of the "eflag" and "vflag" variables and since sometimes the values of the "eflag" and "vflag" variables and since sometimes
there are new bits added and new variables need to be set to 1 or 0. there are new bits added and new variables need to be set to 1 or 0.
To make this consistent, across all styles, there is now an inline To make this consistent across all styles, there is now an inline
function ``ev_init(eflag, vflag)`` that makes those settings function ``ev_init(eflag, vflag)`` that makes those settings
consistently and calls either ``ev_setup()`` or ``ev_unset()``. consistently and calls either ``ev_setup()`` or ``ev_unset()``.
Example from a pair style: Example from a pair style:
@ -211,14 +210,14 @@ The :cpp:func:`utils::open_potential()
calls to ``force->open_potential()`` and should be used to replace calls to ``force->open_potential()`` and should be used to replace
``fopen()`` for opening potential files for reading. The custom ``fopen()`` for opening potential files for reading. The custom
function does three additional steps compared to ``fopen()``: 1) it will function does three additional steps compared to ``fopen()``: 1) it will
try to parse the ``UNITS:`` and ``DATE:`` metadata will stop with an try to parse the ``UNITS:`` and ``DATE:`` metadata and will stop with an
error on a units mismatch and will print the date info, if present, in error on a units mismatch and will print the date info, if present, in
the log file; 2) for pair styles that support it, it will set up the log file; 2) for pair styles that support it, it will set up
possible automatic unit conversions based on the embedded unit possible automatic unit conversions based on the embedded unit
information and LAMMPS' current units setting; 3) it will not only try information and LAMMPS' current units setting; 3) it will not only try
to open a potential file at the given path, but will also search in the to open a potential file at the given path, but will also search in the
folders listed in the ``LAMMPS_POTENTIALS`` environment variable. This folders listed in the ``LAMMPS_POTENTIALS`` environment variable. This
allows to keep potential files in a common location instead of having to allows potential files to reside in a common location instead of having to
copy them around for simulations. copy them around for simulations.
Old: Old:
@ -246,36 +245,38 @@ to use scoped enumerators instead.
.. list-table:: .. list-table::
:header-rows: 1 :header-rows: 1
:widths: auto :widths: 23 10 23 10 23 10
* - Symbolic Constant * - Symbolic Constant
- Value - Value
- Symbolic Constant - Symbolic Constant
- Value - Value
- Symbolic Constant
- Value
* - Atom::GROW * - Atom::GROW
- 0
- Atom::ATOMIC
- 0 - 0
- Atom::MAP_NONE - Atom::MAP_NONE
- 0 - 0
* - Atom::RESTART * - Atom::RESTART
- 1
- Atom::MOLECULAR
- 1 - 1
- Atom::MAP_ARRAY - Atom::MAP_ARRAY
- 1 - 1
* - Atom::BORDER * - Atom::BORDER
- 2
- Atom::TEMPLATE
- 2 - 2
- Atom::MAP_HASH - Atom::MAP_HASH
- 2 - 2
* - Atom::ATOMIC * - AtomVec::PER_ATOM
- 0 - 0
- Atom::MAP_YES
- 3
* - Atom::MOLECULAR
- 1
- AtomVec::PER_ATOM
- 0
* - Atom::TEMPLATE
- 2
- AtomVec::PER_TYPE - AtomVec::PER_TYPE
- 1 - 1
- Atom::MAP_YES
- 3
Old: Old:
@ -306,7 +307,7 @@ Simplify customized error messages
Aided by features of the bundled {fmt} library, error messages now Aided by features of the bundled {fmt} library, error messages now
can have a variable number of arguments and the string will be interpreted can have a variable number of arguments and the string will be interpreted
as a {fmt} style format string so that custom error messages can be as a {fmt} style format string so that error messages can be
easily customized without having to use temporary buffers and ``sprintf()``. easily customized without having to use temporary buffers and ``sprintf()``.
Example: Example:
@ -332,7 +333,7 @@ Use of "override" instead of "virtual"
.. versionchanged:: 17Feb2022 .. versionchanged:: 17Feb2022
Since LAMMPS requires C++11 we switched to use the "override" keyword Since LAMMPS requires C++11, we switched to use the "override" keyword
instead of "virtual" to indicate polymorphism in derived classes. This instead of "virtual" to indicate polymorphism in derived classes. This
allows the C++ compiler to better detect inconsistencies when an allows the C++ compiler to better detect inconsistencies when an
override is intended or not. Please note that "override" has to be override is intended or not. Please note that "override" has to be
@ -370,7 +371,7 @@ Simplified function names for forward and reverse communication
.. versionchanged:: 24Mar2022 .. versionchanged:: 24Mar2022
Rather then using the function name to distinguish between the different Rather than using the function name to distinguish between the different
forward and reverse communication functions for styles, LAMMPS now uses forward and reverse communication functions for styles, LAMMPS now uses
the type of the "this" pointer argument. the type of the "this" pointer argument.

View File

@ -622,7 +622,7 @@ classes:
of a dense, symmetric, real matrix. of a dense, symmetric, real matrix.
#. The "PEigenDense" class only calculates the principal eigenvalue #. The "PEigenDense" class only calculates the principal eigenvalue
(ie. the largest or smallest eigenvalue), and its corresponding (i.e. the largest or smallest eigenvalue), and its corresponding
eigenvector. However it is much more efficient than "Jacobi" when eigenvector. However it is much more efficient than "Jacobi" when
applied to large matrices (larger than 13x13). PEigenDense also can applied to large matrices (larger than 13x13). PEigenDense also can
understand complex-valued Hermitian matrices. understand complex-valued Hermitian matrices.

View File

@ -74,8 +74,7 @@ The next method we need to implement is ``setmask()``:
Here the we specify which methods of the fix should be called during Here the we specify which methods of the fix should be called during
:doc:`execution of a timestep <Developer_flow>`. The constant :doc:`execution of a timestep <Developer_flow>`. The constant
``END_OF_STEP`` corresponds to the ``end_of_step()`` method. The most ``END_OF_STEP`` corresponds to the ``end_of_step()`` method.
important available methods that are called during a timestep.
.. code-block:: c++ .. code-block:: c++
@ -127,7 +126,7 @@ there is no need to inherit from it directly.
The code above computes average velocity for all particles in the The code above computes average velocity for all particles in the
simulation. Yet you have one unused parameter in fix call from the simulation. Yet you have one unused parameter in fix call from the
script: ``group_name``. This parameter specifies the group of atoms script: ``group_name``. This parameter specifies the group of atoms
used in the fix. So we should compute average for all particles in the used in the fix. So we should compute the average for all particles in the
simulation only if ``group_name == "all"``, but it can be any group. simulation only if ``group_name == "all"``, but it can be any group.
The group membership information of an atom is contained in the *mask* The group membership information of an atom is contained in the *mask*
property of an atom and the bit corresponding to a given group is property of an atom and the bit corresponding to a given group is
@ -142,7 +141,7 @@ stored in the groupbit variable which is defined in Fix base class:
} }
Class Atom encapsulates atoms positions, velocities, forces, etc. Users Class Atom encapsulates atoms positions, velocities, forces, etc. Users
can access them using particle index. Note, that particle indexes are can access them using the particle index. Note, that particle indexes are
usually changed every few timesteps because of neighbor list rebuilds usually changed every few timesteps because of neighbor list rebuilds
and spatial sorting (to improve cache efficiency). and spatial sorting (to improve cache efficiency).
@ -154,8 +153,8 @@ this situation there are several methods which should be implemented:
- ``double memory_usage()``: return how much memory the fix uses (optional) - ``double memory_usage()``: return how much memory the fix uses (optional)
- ``void grow_arrays(int)``: do reallocation of the per-particle arrays in your fix - ``void grow_arrays(int)``: do reallocation of the per-particle arrays in your fix
- ``void copy_arrays(int i, int j, int delflag)``: copy i-th per-particle - ``void copy_arrays(int i, int j, int delflag)``: copy i-th per-particle
information to j-th. Used when atom sorting is performed. if delflag is set information to j-th particle position. Used when atom sorting is performed.
and atom j owns a body, move the body information to atom i. if delflag is set and atom j owns a body, move the body information to atom i.
- ``void set_arrays(int i)``: sets i-th particle related information to zero - ``void set_arrays(int i)``: sets i-th particle related information to zero
Note, that if your class implements these methods, it must add calls of Note, that if your class implements these methods, it must add calls of
@ -230,11 +229,11 @@ is just a bunch of template functions for allocating 1D and 2D
arrays. So you need to add include ``memory.h`` to have access to them. arrays. So you need to add include ``memory.h`` to have access to them.
Finally, if you need to write/read some global information used in Finally, if you need to write/read some global information used in
your fix to the restart file, you might do it by setting flag your fix to the restart file, you might do it by setting the flag
``restart_global = 1`` in the constructor and implementing methods void ``restart_global = 1`` in the constructor and implementing methods
``write_restart(FILE *fp)`` and ``void restart(char *buf)``. ``void write_restart(FILE *fp)`` and ``void restart(char *buf)``.
If, in addition, you want to write the per-atom property to restart If, in addition, you want to write the per-atom property to restart
files additional settings and functions are needed: files then these additional settings and functions are needed:
- a fix flag indicating this needs to be set ``restart_peratom = 1;`` - a fix flag indicating this needs to be set ``restart_peratom = 1;``
- ``atom->add_callback()`` and ``atom->delete_callback()`` must be called - ``atom->add_callback()`` and ``atom->delete_callback()`` must be called

View File

@ -371,9 +371,9 @@ but moving this to a separate function allows users to change global
settings like the default cutoff without having to reissue all settings like the default cutoff without having to reissue all
pair_coeff commands or re-read the ``Pair Coeffs`` sections from the pair_coeff commands or re-read the ``Pair Coeffs`` sections from the
data file. In the ``settings()`` function, also the arrays for storing data file. In the ``settings()`` function, also the arrays for storing
parameters, to define cutoffs, track with pairs of parameters have been parameters, to define cutoffs, track which pairs of parameters have been
explicitly set are allocated and, if needed, initialized. In this case, explicitly set and allocated and, if needed, initialized. In this case,
the memory allocation and initialization is moved to a function the memory allocation and initialization are moved to a function
``allocate()``. ``allocate()``.
.. code-block:: c++ .. code-block:: c++
@ -588,17 +588,20 @@ loop atoms are also initialized.
jnum = numneigh[i]; jnum = numneigh[i];
The inner loop (index *j*) processes the neighbor lists. The neighbor The inner loop (index *j*) processes the neighbor lists. The neighbor
list code encodes in the upper 2 bits whether a pair is a regular pair list code encodes extra information using the upper 3 bits. The 2
of neighbor (= 0) or a pair of 1-2 (= 1), 1-3 (= 2), or 1-4 (= 3) highest bits encode whether a pair is a regular pair of neighbor (= 0)
:doc:`"special" neighbor <special_bonds>`. The ``sbmask()`` inline or a pair of 1-2 (= 1), 1-3 (= 2), or 1-4 (= 3) :doc:`"special" neighbor
function extracts those bits and converts them into a number. This <special_bonds>`. The next highest bit encodes whether the pair stores
number is used to look up the corresponding scaling factor for the data in a ``fix neigh/history`` instance (an undocumented internal fix
non-bonded interaction from the ``force->special_lj`` array and stores style). The ``sbmask()`` inline function extracts those bits and
it in the `factor_lj` variable. Due to the additional bits, the value converts them into a number. This number is used to look up the
of *j* would be out of range when accessing data from per-atom arrays, corresponding scaling factor for the non-bonded interaction from the
so we apply the NEIGHMASK constant with a bit-wise and operation to mask ``force->special_lj`` array and stores it in the `factor_lj` variable.
them out. This step *must* be done, even if a pair style does not use Due to the additional bits, the value of *j* would be out of range when
special bond scaling of forces and energies to avoid segmentation faults. accessing data from per-atom arrays, so we apply the NEIGHMASK constant
with a bit-wise and operation to mask them out. This step *must* be
done, even if a pair style does not use special bond scaling of forces
and energies to avoid segmentation faults.
With the corrected *j* index, it is now possible to compute the distance With the corrected *j* index, it is now possible to compute the distance
of the pair. For efficiency reasons, the square root is only taken of the pair. For efficiency reasons, the square root is only taken
@ -891,7 +894,7 @@ through *multiple* :doc:`pair_coeff commands <pair_coeff>`. Pair styles
that require a single "pair_coeff \* \*" command line are not compatible that require a single "pair_coeff \* \*" command line are not compatible
with reading their parameters from data files. For pair styles like with reading their parameters from data files. For pair styles like
*born/gauss* that do support writing to data files, the potential *born/gauss* that do support writing to data files, the potential
parameters will be read from the data file, if present and parameters will be read from the data file, if present, and
:doc:`pair_coeff commands <pair_coeff>` may not be needed. :doc:`pair_coeff commands <pair_coeff>` may not be needed.
The member variable ``writedata`` should be set to 1 in the constructor, The member variable ``writedata`` should be set to 1 in the constructor,

View File

@ -39,7 +39,8 @@ figure out your physics or numerical mistakes, like choosing too big a
timestep, specifying erroneous force field coefficients, or putting 2 timestep, specifying erroneous force field coefficients, or putting 2
atoms on top of each other! If you run into errors that LAMMPS atoms on top of each other! If you run into errors that LAMMPS
does not catch that you think it should flag, please send an email to does not catch that you think it should flag, please send an email to
the `developers <https://www.lammps.org/authors.html>`_. the `developers <https://www.lammps.org/authors.html>`_ or create an new
topic on the dedicated `MatSci forum section <https://matsci.org/lammps/>`_.
If you get an error message about an invalid command in your input If you get an error message about an invalid command in your input
script, you can determine what command is causing the problem by script, you can determine what command is causing the problem by

View File

@ -96,13 +96,13 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
are too far apart to make a valid angle. are too far apart to make a valid angle.
*Angle atoms %d %d %d missing on proc %d at step %ld* *Angle atoms %d %d %d missing on proc %d at step %ld*
One or more of 3 atoms needed to compute a particular angle are One or more of three atoms needed to compute a particular angle are
missing on this processor. Typically this is because the pairwise missing on this processor. Typically this is because the pairwise
cutoff is set too short or the angle has blown apart and an atom is cutoff is set too short or the angle has blown apart and an atom is
too far away. too far away.
*Angle atoms missing on proc %d at step %ld* *Angle atoms missing on proc %d at step %ld*
One or more of 3 atoms needed to compute a particular angle are One or more of three atoms needed to compute a particular angle are
missing on this processor. Typically this is because the pairwise missing on this processor. Typically this is because the pairwise
cutoff is set too short or the angle has blown apart and an atom is cutoff is set too short or the angle has blown apart and an atom is
too far away. too far away.
@ -1932,7 +1932,7 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
Self-explanatory. Self-explanatory.
*Compute chunk/atom fix array is accessed out-of-range* *Compute chunk/atom fix array is accessed out-of-range*
the index for the array is out of bounds. The index for the array is out of bounds.
*Compute chunk/atom fix does not calculate a per-atom array* *Compute chunk/atom fix does not calculate a per-atom array*
Self-explanatory. Self-explanatory.
@ -6073,9 +6073,9 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
*New atom IDs exceed maximum allowed ID* *New atom IDs exceed maximum allowed ID*
See the setting for tagint in the src/lmptype.h file. See the setting for tagint in the src/lmptype.h file.
*New bond exceeded bonds per atom in create_bonds* *New bond exceeded bonds per atom in create\_bonds*
See the read_data command for info on using the "extra/bond/per/atom" See the read_data command for info on using the "extra/bond/per/atom"
keyword to allow for additional bonds to be formed keyword to allow for additional bonds to be formed
*New bond exceeded bonds per atom in fix bond/create* *New bond exceeded bonds per atom in fix bond/create*
See the read_data command for info on using the "extra/bond/per/atom" See the read_data command for info on using the "extra/bond/per/atom"
@ -7310,12 +7310,12 @@ keyword to allow for additional bonds to be formed
atom has moved too far. atom has moved too far.
*Restrain atoms %d %d %d missing on proc %d at step %ld* *Restrain atoms %d %d %d missing on proc %d at step %ld*
The 3 atoms in a restrain angle specified by the fix restrain The three atoms in a restrain angle specified by the fix restrain
command are not all accessible to a processor. This probably means an command are not all accessible to a processor. This probably means an
atom has moved too far. atom has moved too far.
*Restrain atoms %d %d missing on proc %d at step %ld* *Restrain atoms %d %d missing on proc %d at step %ld*
The 2 atoms in a restrain bond specified by the fix restrain The two atoms in a restrain bond specified by the fix restrain
command are not all accessible to a processor. This probably means an command are not all accessible to a processor. This probably means an
atom has moved too far. atom has moved too far.
@ -7406,7 +7406,7 @@ keyword to allow for additional bonds to be formed
*Shake angles have different bond types* *Shake angles have different bond types*
All 3-atom angle-constrained SHAKE clusters specified by the fix shake All 3-atom angle-constrained SHAKE clusters specified by the fix shake
command that are the same angle type, must also have the same bond command that are the same angle type, must also have the same bond
types for the 2 bonds in the angle. types for the two bonds in the angle.
*Shake atoms %d %d %d %d missing on proc %d at step %ld* *Shake atoms %d %d %d %d missing on proc %d at step %ld*
The 4 atoms in a single shake cluster specified by the fix shake The 4 atoms in a single shake cluster specified by the fix shake
@ -7414,12 +7414,12 @@ keyword to allow for additional bonds to be formed
an atom has moved too far. an atom has moved too far.
*Shake atoms %d %d %d missing on proc %d at step %ld* *Shake atoms %d %d %d missing on proc %d at step %ld*
The 3 atoms in a single shake cluster specified by the fix shake The three atoms in a single shake cluster specified by the fix shake
command are not all accessible to a processor. This probably means command are not all accessible to a processor. This probably means
an atom has moved too far. an atom has moved too far.
*Shake atoms %d %d missing on proc %d at step %ld* *Shake atoms %d %d missing on proc %d at step %ld*
The 2 atoms in a single shake cluster specified by the fix shake The two atoms in a single shake cluster specified by the fix shake
command are not all accessible to a processor. This probably means command are not all accessible to a processor. This probably means
an atom has moved too far. an atom has moved too far.

View File

@ -23,7 +23,7 @@ Doc page with :doc:`ERROR messages <Errors_messages>`
adjusted to match the user-specified accuracy. adjusted to match the user-specified accuracy.
*Angle atoms missing at step %ld* *Angle atoms missing at step %ld*
One or more of 3 atoms needed to compute a particular angle are One or more of three atoms needed to compute a particular angle are
missing on this processor. Typically this is because the pairwise missing on this processor. Typically this is because the pairwise
cutoff is set too short or the angle has blown apart and an atom is cutoff is set too short or the angle has blown apart and an atom is
too far away. too far away.
@ -233,7 +233,7 @@ Doc page with :doc:`ERROR messages <Errors_messages>`
style. style.
*Fix langevin gjf using random gaussians is not implemented with kokkos* *Fix langevin gjf using random gaussians is not implemented with kokkos*
This will most likely cause errors in kinetic fluctuations. This will most likely cause errors in kinetic fluctuations.
*Fix property/atom mol or charge w/out ghost communication* *Fix property/atom mol or charge w/out ghost communication*
A model typically needs these properties defined for ghost atoms. A model typically needs these properties defined for ghost atoms.
@ -324,7 +324,7 @@ This will most likely cause errors in kinetic fluctuations.
Specifically they are further apart than half a periodic box length. Specifically they are further apart than half a periodic box length.
Or they are more than a box length apart in a non-periodic dimension. Or they are more than a box length apart in a non-periodic dimension.
This is usually due to the initial data file not having correct image This is usually due to the initial data file not having correct image
flags for the 2 atoms in a bond that straddles a periodic boundary. flags for the two atoms in a bond that straddles a periodic boundary.
They should be different by 1 in that case. This is a warning because They should be different by 1 in that case. This is a warning because
inconsistent image flags will not cause problems for dynamics or most inconsistent image flags will not cause problems for dynamics or most
LAMMPS simulations. However they can cause problems when such atoms LAMMPS simulations. However they can cause problems when such atoms

View File

@ -1077,7 +1077,7 @@ Procedures Bound to the :f:type:`lammps` Derived Type
.. list-table:: .. list-table::
:header-rows: 1 :header-rows: 1
:widths: auto :widths: 21 20 40 19
* - Style * - Style
- Type - Type
@ -1167,7 +1167,7 @@ Procedures Bound to the :f:type:`lammps` Derived Type
.. list-table:: .. list-table::
:header-rows: 1 :header-rows: 1
:widths: auto :widths: 20 19 11 11 21 18
* - Style * - Style
- Type - Type

View File

@ -43,7 +43,7 @@ have potential energy function of the form
}} \!\!\!\!\!\!\!\!+ \!\!\sum_{special}\! E_s + \!\!\!\!\sum_{residues} \!\!\!{\scriptstyle\mathrm{CMAP}(\phi,\psi)} }} \!\!\!\!\!\!\!\!+ \!\!\sum_{special}\! E_s + \!\!\!\!\sum_{residues} \!\!\!{\scriptstyle\mathrm{CMAP}(\phi,\psi)}
The terms are computed by bond styles (relationship between 2 atoms), The terms are computed by bond styles (relationship between two atoms),
angle styles (between 3 atoms) , dihedral/improper styles (between 4 angle styles (between 3 atoms) , dihedral/improper styles (between 4
atoms), pair styles (non-covalently bonded pair interactions) and atoms), pair styles (non-covalently bonded pair interactions) and
special bonds. The CMAP term (see :doc:`fix cmap <fix_cmap>` command for special bonds. The CMAP term (see :doc:`fix cmap <fix_cmap>` command for
@ -73,7 +73,7 @@ with additional switching or shifting functions that ramp the energy
and/or force smoothly to zero between an inner :math:`(a)` and outer and/or force smoothly to zero between an inner :math:`(a)` and outer
:math:`(b)` cutoff. The older styles with *charmm* (not *charmmfsw* or :math:`(b)` cutoff. The older styles with *charmm* (not *charmmfsw* or
*charmmfsh*\ ) in their name compute the LJ and Coulombic interactions *charmmfsh*\ ) in their name compute the LJ and Coulombic interactions
with an energy switching function (esw) S(r) which ramps the energy with an energy switching function (esw) :math:`S(r)` which ramps the energy
smoothly to zero between the inner and outer cutoff. This can cause smoothly to zero between the inner and outer cutoff. This can cause
irregularities in pairwise forces (due to the discontinuous second irregularities in pairwise forces (due to the discontinuous second
derivative of energy at the boundaries of the switching region), which derivative of energy at the boundaries of the switching region), which

View File

@ -178,7 +178,7 @@ the pairs. This can be done by using the *bias* keyword of the
To maintain the correct polarizability of the core/shell pairs, the To maintain the correct polarizability of the core/shell pairs, the
kinetic energy of the internal motion shall remain nearly constant. kinetic energy of the internal motion shall remain nearly constant.
Therefore the choice of spring force and mass ratio need to ensure Therefore the choice of spring force and mass ratio need to ensure
much faster relative motion of the 2 atoms within the core/shell pair much faster relative motion of the two atoms within the core/shell pair
than their center-of-mass velocity. This allows the shells to than their center-of-mass velocity. This allows the shells to
effectively react instantaneously to the electrostatic environment and effectively react instantaneously to the electrostatic environment and
limits energy transfer to or from the core/shell oscillators. limits energy transfer to or from the core/shell oscillators.

View File

@ -36,7 +36,7 @@ the context of your application.
steps, invoke the command, etc. steps, invoke the command, etc.
In this scenario, the other code can be called as a library, as in In this scenario, the other code can be called as a library, as in
1., or it could be a stand-alone code, invoked by a system() call 1., or it could be a stand-alone code, invoked by a ``system()`` call
made by the command (assuming your parallel machine allows one or made by the command (assuming your parallel machine allows one or
more processors to start up another program). In the latter case the more processors to start up another program). In the latter case the
stand-alone code could communicate with LAMMPS through files that the stand-alone code could communicate with LAMMPS through files that the

View File

@ -1,8 +1,8 @@
Calculate diffusion coefficients Calculate diffusion coefficients
================================ ================================
The diffusion coefficient D of a material can be measured in at least The diffusion coefficient :math:`D` of a material can be measured in at least
2 ways using various options in LAMMPS. See the examples/DIFFUSE 2 ways using various options in LAMMPS. See the ``examples/DIFFUSE``
directory for scripts that implement the 2 methods discussed here for directory for scripts that implement the 2 methods discussed here for
a simple Lennard-Jones fluid model. a simple Lennard-Jones fluid model.
@ -12,7 +12,7 @@ of the MSD versus time is proportional to the diffusion coefficient.
The instantaneous MSD values can be accumulated in a vector via the The instantaneous MSD values can be accumulated in a vector via the
:doc:`fix vector <fix_vector>` command, and a line fit to the vector to :doc:`fix vector <fix_vector>` command, and a line fit to the vector to
compute its slope via the :doc:`variable slope <variable>` function, and compute its slope via the :doc:`variable slope <variable>` function, and
thus extract D. thus extract :math:`D`.
The second method is to measure the velocity auto-correlation function The second method is to measure the velocity auto-correlation function
(VACF) of the system, via the :doc:`compute vacf <compute_vacf>` (VACF) of the system, via the :doc:`compute vacf <compute_vacf>`
@ -20,4 +20,4 @@ command. The time-integral of the VACF is proportional to the
diffusion coefficient. The instantaneous VACF values can be diffusion coefficient. The instantaneous VACF values can be
accumulated in a vector via the :doc:`fix vector <fix_vector>` command, accumulated in a vector via the :doc:`fix vector <fix_vector>` command,
and time integrated via the :doc:`variable trap <variable>` function, and time integrated via the :doc:`variable trap <variable>` function,
and thus extract D. and thus extract :math:`D`.

View File

@ -4,21 +4,27 @@ Calculate elastic constants
Elastic constants characterize the stiffness of a material. The formal Elastic constants characterize the stiffness of a material. The formal
definition is provided by the linear relation that holds between the definition is provided by the linear relation that holds between the
stress and strain tensors in the limit of infinitesimal deformation. stress and strain tensors in the limit of infinitesimal deformation.
In tensor notation, this is expressed as s_ij = C_ijkl \* e_kl, where In tensor notation, this is expressed as
the repeated indices imply summation. s_ij are the elements of the
symmetric stress tensor. e_kl are the elements of the symmetric strain .. math::
tensor. C_ijkl are the elements of the fourth rank tensor of elastic
constants. In three dimensions, this tensor has 3\^4=81 elements. Using s_{ij} = C_{ijkl} e_{kl}
Voigt notation, the tensor can be written as a 6x6 matrix, where C_ij
is now the derivative of s_i w.r.t. e_j. Because s_i is itself a where
derivative w.r.t. e_i, it follows that C_ij is also symmetric, with at the repeated indices imply summation. :math:`s_{ij}` are the elements of the
most 7\*6/2 = 21 distinct elements. symmetric stress tensor. :math:`e_{kl}` are the elements of the symmetric strain
tensor. :math:`C_{ijkl}` are the elements of the fourth rank tensor of elastic
constants. In three dimensions, this tensor has :math:`3^4=81` elements. Using
Voigt notation, the tensor can be written as a 6x6 matrix, where :math:`C_{ij}`
is now the derivative of :math:`s_i` w.r.t. :math:`e_j`. Because :math:`s_i` is itself a
derivative w.r.t. :math:`e_i`, it follows that :math:`C_{ij}` is also symmetric, with at
most :math:`\frac{7 \times 6}{2}` = 21 distinct elements.
At zero temperature, it is easy to estimate these derivatives by At zero temperature, it is easy to estimate these derivatives by
deforming the simulation box in one of the six directions using the deforming the simulation box in one of the six directions using the
:doc:`change_box <change_box>` command and measuring the change in the :doc:`change_box <change_box>` command and measuring the change in the
stress tensor. A general-purpose script that does this is given in the stress tensor. A general-purpose script that does this is given in the
examples/ELASTIC directory described on the :doc:`Examples <Examples>` ``examples/ELASTIC`` directory described on the :doc:`Examples <Examples>`
doc page. doc page.
Calculating elastic constants at finite temperature is more Calculating elastic constants at finite temperature is more
@ -33,7 +39,7 @@ the :doc:`compute born/matrix <compute_born_matrix>` command,
which works for any bonded or non-bonded potential in LAMMPS. which works for any bonded or non-bonded potential in LAMMPS.
The most expensive part of the calculation is the sampling of The most expensive part of the calculation is the sampling of
the stress fluctuations. Several examples of this method are the stress fluctuations. Several examples of this method are
provided in the examples/ELASTIC_T/BORN_MATRIX directory provided in the ``examples/ELASTIC_T/BORN_MATRIX`` directory
described on the :doc:`Examples <Examples>` doc page. described on the :doc:`Examples <Examples>` doc page.
A second way is to measure A second way is to measure
@ -43,7 +49,7 @@ the systematic and statistical errors in this method, the magnitude of
the deformation must be chosen judiciously, and care must be taken to the deformation must be chosen judiciously, and care must be taken to
fully equilibrate the deformed cell before sampling the stress fully equilibrate the deformed cell before sampling the stress
tensor. An example of this method is provided in the tensor. An example of this method is provided in the
examples/ELASTIC_T/DEFORMATION directory ``examples/ELASTIC_T/DEFORMATION`` directory
described on the :doc:`Examples <Examples>` doc page. described on the :doc:`Examples <Examples>` doc page.
Another approach is to sample the triclinic cell fluctuations Another approach is to sample the triclinic cell fluctuations

View File

@ -1,20 +1,22 @@
Calculate thermal conductivity Calculate thermal conductivity
============================== ==============================
The thermal conductivity kappa of a material can be measured in at The thermal conductivity :math:`\kappa` of a material can be measured in at
least 4 ways using various options in LAMMPS. See the examples/KAPPA least 4 ways using various options in LAMMPS. See the ``examples/KAPPA``
directory for scripts that implement the 4 methods discussed here for directory for scripts that implement the 4 methods discussed here for
a simple Lennard-Jones fluid model. Also, see the :doc:`Howto viscosity <Howto_viscosity>` page for an analogous discussion a simple Lennard-Jones fluid model. Also, see the :doc:`Howto viscosity <Howto_viscosity>` page for an analogous discussion
for viscosity. for viscosity.
The thermal conductivity tensor kappa is a measure of the propensity The thermal conductivity tensor :math:`\mathbf{\kappa}` is a measure of the propensity
of a material to transmit heat energy in a diffusive manner as given of a material to transmit heat energy in a diffusive manner as given
by Fourier's law by Fourier's law
J = -kappa grad(T) .. math::
where J is the heat flux in units of energy per area per time and J = -\kappa \cdot \text{grad}(T)
grad(T) is the spatial gradient of temperature. The thermal
where :math:`J` is the heat flux in units of energy per area per time and
:math:`\text{grad}(T)` is the spatial gradient of temperature. The thermal
conductivity thus has units of energy per distance per time per degree conductivity thus has units of energy per distance per time per degree
K and is often approximated as an isotropic quantity, i.e. as a K and is often approximated as an isotropic quantity, i.e. as a
scalar. scalar.
@ -49,7 +51,7 @@ details.
The fourth method is based on the Green-Kubo (GK) formula which The fourth method is based on the Green-Kubo (GK) formula which
relates the ensemble average of the auto-correlation of the heat flux relates the ensemble average of the auto-correlation of the heat flux
to kappa. The heat flux can be calculated from the fluctuations of to :math:`\kappa`. The heat flux can be calculated from the fluctuations of
per-atom potential and kinetic energies and per-atom stress tensor in per-atom potential and kinetic energies and per-atom stress tensor in
a steady-state equilibrated simulation. This is in contrast to the a steady-state equilibrated simulation. This is in contrast to the
two preceding non-equilibrium methods, where energy flows continuously two preceding non-equilibrium methods, where energy flows continuously

View File

@ -387,6 +387,8 @@ record a separate log for each run attempt by using the command
at the beginning of an input file. That would record logs to files at the beginning of an input file. That would record logs to files
``logfile-1.txt``, ``logfile-2.txt``, and so on for successive runs. ``logfile-1.txt``, ``logfile-2.txt``, and so on for successive runs.
.. _snapshot_viewer:
Snapshot Image Viewer Snapshot Image Viewer
--------------------- ---------------------
@ -533,13 +535,40 @@ keyboard, the first of those entries is chosen.
If the word under the cursor is a file, then additionally the context If the word under the cursor is a file, then additionally the context
menu has an entry to open the file in a read-only text viewer window. menu has an entry to open the file in a read-only text viewer window.
This is a convenient way to view the contents of files that are If the file is a LAMMPS restart file, instead the menu entry offers to
referenced in the input. The file viewer also supports on-the-fly :ref:`inspect the restart <inspect_restart>`.
The text viewer is a convenient way to view the contents of files that
are referenced in the input. The file viewer also supports on-the-fly
decompression based on the file name suffix in a :ref:`similar fashion decompression based on the file name suffix in a :ref:`similar fashion
as available with LAMMPS <gzip>`. If the necessary decompression as available with LAMMPS <gzip>`. If the necessary decompression
program is missing or the file cannot be decompressed, the viewer window program is missing or the file cannot be decompressed, the viewer window
will contain a corresponding message. will contain a corresponding message.
.. _inspect_restart:
Inspecting a Restart file
^^^^^^^^^^^^^^^^^^^^^^^^^
.. versionadded:: 1.6
When LAMMPS-GUI is asked to "Inspect a Restart", it will read the
restart file into a LAMMPS instance and then open three different
windows. The first window is a text viewer with the output of an
:doc:`info command <info>` with system information stored in the
restart. The second window is text viewer containing a data file
generated with a :doc:`write_data command <write_data>`. The third
window is a :ref:`Snapshot Image Viewer <snapshot_viewer>` containing a
visualization of the system in the restart.
If the restart file is larger than 250 MBytes, a dialog will ask
for confirmation before continuing, since large restart files
may require large amounts of RAM since the entire system must
be read into RAM. Thus restart file for large simulations that
have been run on an HPC cluster may overload a laptop or local
workstation. The ``Show Details...`` button will display a rough
estimate of the additional memory required.
Menu Menu
---- ----
@ -559,6 +588,7 @@ The ``File`` menu offers the usual options:
- ``New`` clears the current buffer and resets the file name to ``*unknown*`` - ``New`` clears the current buffer and resets the file name to ``*unknown*``
- ``Open`` opens a dialog to select a new file for editing in the *Editor* - ``Open`` opens a dialog to select a new file for editing in the *Editor*
- ``View`` opens a dialog to select a file for viewing in a *separate* window (read-only) with support for on-the-fly decompression as explained above. - ``View`` opens a dialog to select a file for viewing in a *separate* window (read-only) with support for on-the-fly decompression as explained above.
- ``Inspect restart`` opens a dialog to select a file. If that file is a :doc:`LAMMPS restart <write_restart>` three windows with :ref:`information about the file are opened <inspect_restart>`.
- ``Save`` saves the current file; if the file name is ``*unknown*`` - ``Save`` saves the current file; if the file name is ``*unknown*``
a dialog will open to select a new file name a dialog will open to select a new file name
- ``Save As`` opens a dialog to select and new file name (and folder, if - ``Save As`` opens a dialog to select and new file name (and folder, if

View File

@ -367,5 +367,4 @@ And execute the simulation with the following:
.. _OPLSAA96: .. _OPLSAA96:
**(OPLS-AA)** Jorgensen, Maxwell, Tirado-Rives, J Am Chem Soc, **(OPLS-AA)** Jorgensen, Maxwell, Tirado-Rives, J Am Chem Soc, 118(45), 11225-11236 (1996).
118(45), 11225-11236 (1996).

View File

@ -44,7 +44,7 @@ For large numbers of independent simulations, you can use
:doc:`variables <variable>` and the :doc:`next <next>` and :doc:`variables <variable>` and the :doc:`next <next>` and
:doc:`jump <jump>` commands to loop over the same input script :doc:`jump <jump>` commands to loop over the same input script
multiple times with different settings. For example, this multiple times with different settings. For example, this
script, named in.polymer script, named ``in.polymer``
.. code-block:: LAMMPS .. code-block:: LAMMPS
@ -57,7 +57,7 @@ script, named in.polymer
next d next d
jump in.polymer jump in.polymer
would run 8 simulations in different directories, using a data.polymer would run 8 simulations in different directories, using a ``data.polymer``
file in each directory. The same concept could be used to run the file in each directory. The same concept could be used to run the
same system at 8 different temperatures, using a temperature variable same system at 8 different temperatures, using a temperature variable
and storing the output in different log and dump files, for example and storing the output in different log and dump files, for example
@ -83,10 +83,10 @@ partition of processors. LAMMPS can be run on multiple partitions via
the :doc:`-partition command-line switch <Run_options>`. the :doc:`-partition command-line switch <Run_options>`.
In the last 2 examples, if LAMMPS were run on 3 partitions, the same In the last 2 examples, if LAMMPS were run on 3 partitions, the same
scripts could be used if the "index" and "loop" variables were scripts could be used if the ``index`` and ``loop`` variables were
replaced with *universe*\ -style variables, as described in the replaced with *universe*\ -style variables, as described in the
:doc:`variable <variable>` command. Also, the "next t" and "next a" :doc:`variable <variable>` command. Also, the :lammps:`next t` and :lammps:`next a`
commands would need to be replaced with a single "next a t" command. commands would need to be replaced with a single :lammps:`next a t` command.
With these modifications, the 8 simulations of each script would run With these modifications, the 8 simulations of each script would run
on the 3 partitions one after the other until all were finished. on the 3 partitions one after the other until all were finished.
Initially, 3 simulations would be started simultaneously, one on each Initially, 3 simulations would be started simultaneously, one on each

View File

@ -26,8 +26,8 @@ scripts are based on. If that script had the line
restart 50 tmp.restart restart 50 tmp.restart
added to it, it would produce 2 binary restart files (tmp.restart.50 added to it, it would produce two binary restart files (``tmp.restart.50``
and tmp.restart.100) as it ran. and ``tmp.restart.100``) as it ran.
This script could be used to read the first restart file and re-run the This script could be used to read the first restart file and re-run the
last 50 timesteps: last 50 timesteps:
@ -47,21 +47,21 @@ last 50 timesteps:
run 50 run 50
Note that the following commands do not need to be repeated because Note that the following commands do not need to be repeated because
their settings are included in the restart file: *units, atom_style, their settings are included in the restart file: :lammps:`units`, :lammps:`atom_style`,
special_bonds, pair_style, bond_style*. However, these commands do :lammps:`special_bonds`, :lammps:`pair_style`, :lammps:`bond_style`. However, these commands do
need to be used, since their settings are not in the restart file: need to be used, since their settings are not in the restart file:
*neighbor, fix, timestep*\ . :lammps:`neighbor`, :lammps:`fix`, :lammps:`timestep`.
If you actually use this script to perform a restarted run, you will If you actually use this script to perform a restarted run, you will
notice that the thermodynamic data match at step 50 (if you also put a notice that the thermodynamic data match at step 50 (if you also put a
"thermo 50" command in the original script), but do not match at step :lammps:`thermo 50` command in the original script), but do not match at step
100. This is because the :doc:`fix langevin <fix_langevin>` command 100. This is because the :doc:`fix langevin <fix_langevin>` command
uses random numbers in a way that does not allow for perfect restarts. uses random numbers in a way that does not allow for perfect restarts.
As an alternate approach, the restart file could be converted to a data As an alternate approach, the restart file could be converted to a data
file as follows: file as follows:
.. code-block:: LAMMPS .. code-block:: bash
lmp_g++ -r tmp.restart.50 tmp.restart.data lmp_g++ -r tmp.restart.50 tmp.restart.data
@ -89,8 +89,8 @@ Then, this script could be used to re-run the last 50 steps:
reset_timestep 50 reset_timestep 50
run 50 run 50
Note that nearly all the settings specified in the original *in.chain* Note that nearly all the settings specified in the original ``in.chain``
script must be repeated, except the *pair_coeff* and *bond_coeff* script must be repeated, except the :lammps:`pair_coeff` and :lammps:`bond_coeff`
commands, since the new data file lists the force field coefficients. commands, since the new data file lists the force field coefficients.
Also, the :doc:`reset_timestep <reset_timestep>` command is used to tell Also, the :doc:`reset_timestep <reset_timestep>` command is used to tell
LAMMPS the current timestep. This value is stored in restart files, but LAMMPS the current timestep. This value is stored in restart files, but

View File

@ -15,7 +15,6 @@ details of the system, or develop new capabilities. For instance, the numerics
associated with calculating gradients, reproducing kernels, etc. are separated associated with calculating gradients, reproducing kernels, etc. are separated
into distinct classes to simplify the development of new integration schemes into distinct classes to simplify the development of new integration schemes
which can call these calculations. Additional numerical details can be found in which can call these calculations. Additional numerical details can be found in
:ref:`(Palermo) <howto_rheo_palermo>` and
:ref:`(Clemmer) <howto_rheo_clemmer>`. :ref:`(Clemmer) <howto_rheo_clemmer>`.
Note, if you simply want to run a traditional SPH simulation, the :ref:`SPH package Note, if you simply want to run a traditional SPH simulation, the :ref:`SPH package
@ -107,10 +106,6 @@ criteria for creating/deleting a bond or altering force calculations).
---------- ----------
.. _howto_rheo_palermo:
**(Palermo)** Palermo, Wolf, Clemmer, O'Connor, in preparation.
.. _howto_rheo_clemmer: .. _howto_rheo_clemmer:
**(Clemmer)** Clemmer, Pierce, O'Connor, Nevins, Jones, Lechman, Tencer, Appl. Math. Model., 130, 310-326 (2024). **(Clemmer)** Clemmer, Pierce, O'Connor, Nevins, Jones, Lechman, Tencer, Appl. Math. Model., 130, 310-326 (2024).

View File

@ -2,7 +2,7 @@ SPC water model
=============== ===============
The SPC water model specifies a 3-site rigid water molecule with The SPC water model specifies a 3-site rigid water molecule with
charges and Lennard-Jones parameters assigned to each of the 3 atoms. charges and Lennard-Jones parameters assigned to each of the three atoms.
In LAMMPS the :doc:`fix shake <fix_shake>` command can be used to hold In LAMMPS the :doc:`fix shake <fix_shake>` command can be used to hold
the two O-H bonds and the H-O-H angle rigid. A bond style of the two O-H bonds and the H-O-H angle rigid. A bond style of
*harmonic* and an angle style of *harmonic* or *charmm* should also be *harmonic* and an angle style of *harmonic* or *charmm* should also be
@ -33,7 +33,7 @@ the partial charge assignments change:
| O charge = -0.8476 | O charge = -0.8476
| H charge = 0.4238 | H charge = 0.4238
See the :ref:`(Berendsen) <howto-Berendsen>` reference for more details on both See the :ref:`(Berendsen2) <howto-Berendsen>` reference for more details on both
the SPC and SPC/E models. the SPC and SPC/E models.
Below is the code for a LAMMPS input file and a molecule file Below is the code for a LAMMPS input file and a molecule file
@ -149,4 +149,4 @@ Wikipedia also has a nice article on `water models <https://en.wikipedia.org/wik
.. _howto-Berendsen: .. _howto-Berendsen:
**(Berendsen)** Berendsen, Grigera, Straatsma, J Phys Chem, 91, 6269-6271 (1987). **(Berendsen2)** Berendsen, Grigera, Straatsma, J Phys Chem, 91, 6269-6271 (1987).

View File

@ -341,7 +341,12 @@ data files and obtain a list of dictionaries.
.. code-block:: .. code-block::
[{'timestep': 0, 'pe': -6.773368053259247, 'ke': 4.498875000000003}, {'timestep': 50, 'pe': -4.80824944183232, 'ke': 2.5257981827119798}, {'timestep': 100, 'pe': -4.787560887558151, 'ke': 2.5062598821985103}, {'timestep': 150, 'pe': -4.747103368600548, 'ke': 2.46609592554545}, {'timestep': 200, 'pe': -4.750905285854413, 'ke': 2.4701136792591694}, {'timestep': 250, 'pe': -4.777432735632181, 'ke': 2.4962152903997175}] [{'timestep': 0, 'pe': -6.773368053259247, 'ke': 4.498875000000003},
{'timestep': 50, 'pe': -4.80824944183232, 'ke': 2.5257981827119798},
{'timestep': 100, 'pe': -4.787560887558151, 'ke': 2.5062598821985103},
{'timestep': 150, 'pe': -4.747103368600548, 'ke': 2.46609592554545},
{'timestep': 200, 'pe': -4.750905285854413, 'ke': 2.4701136792591694},
{'timestep': 250, 'pe': -4.777432735632181, 'ke': 2.4962152903997175}]
Line Delimited JSON (LD-JSON) Line Delimited JSON (LD-JSON)
----------------------------- -----------------------------
@ -352,7 +357,8 @@ Each line represents one JSON object.
.. code-block:: LAMMPS .. code-block:: LAMMPS
fix extra all print 50 """{"timestep": $(step), "pe": $(pe), "ke": $(ke)}""" title "" file output.json screen no fix extra all print 50 """{"timestep": $(step), "pe": $(pe), "ke": $(ke)}""" &
title "" file output.json screen no
.. code-block:: json .. code-block:: json
:caption: output.json :caption: output.json

View File

@ -3,7 +3,7 @@ TIP3P water model
The TIP3P water model as implemented in CHARMM :ref:`(MacKerell) The TIP3P water model as implemented in CHARMM :ref:`(MacKerell)
<howto-tip3p>` specifies a 3-site rigid water molecule with charges and <howto-tip3p>` specifies a 3-site rigid water molecule with charges and
Lennard-Jones parameters assigned to each of the 3 atoms. Lennard-Jones parameters assigned to each of the three atoms.
A suitable pair style with cutoff Coulomb would be: A suitable pair style with cutoff Coulomb would be:
@ -32,9 +32,9 @@ optimized for a long-range Coulomb solver (e.g. Ewald or PPPM in LAMMPS)
model (without fix shake) is desired, for rigid bonds/angles they are model (without fix shake) is desired, for rigid bonds/angles they are
ignored. ignored.
.. list-table:: .. list-table::
:header-rows: 1 :header-rows: 1
:widths: auto :widths: 38 22 20 20
* - Parameter * - Parameter
- TIP3P-CHARMM - TIP3P-CHARMM

View File

@ -25,7 +25,7 @@ There are two ways to implement TIP4P water in LAMMPS:
This can be done with the following pair styles for Coulomb with a cutoff: This can be done with the following pair styles for Coulomb with a cutoff:
* :doc:`pair_style tip4p/cut <pair_lj_cut_tip4p>` * :doc:`pair_style tip4p/cut <pair_coul>`
* :doc:`pair_style lj/cut/tip4p/cut <pair_lj_cut_tip4p>` * :doc:`pair_style lj/cut/tip4p/cut <pair_lj_cut_tip4p>`
or these commands for a long-range Coulomb treatment: or these commands for a long-range Coulomb treatment:
@ -70,9 +70,9 @@ parameters adjusted for use with a long-range Coulombic solver
OM distance is specified in the :doc:`pair_style <pair_style>` command, OM distance is specified in the :doc:`pair_style <pair_style>` command,
not as part of the pair coefficients. not as part of the pair coefficients.
.. list-table:: .. list-table::
:header-rows: 1 :header-rows: 1
:widths: auto :widths: 36 19 13 15 17
* - Parameter * - Parameter
- TIP4P (original) - TIP4P (original)

View File

@ -32,9 +32,9 @@ The table below lists the force field parameters (in real :doc:`units
<Mahoney>` and the TIP5P-E model :ref:`(Rick) <Rick>` for use with a <Mahoney>` and the TIP5P-E model :ref:`(Rick) <Rick>` for use with a
long-range Coulombic solver (e.g. Ewald or PPPM in LAMMPS). long-range Coulombic solver (e.g. Ewald or PPPM in LAMMPS).
.. list-table:: .. list-table::
:header-rows: 1 :header-rows: 1
:widths: auto :widths: 50 25 25
* - Parameter * - Parameter
- TIP5P - TIP5P

View File

@ -1,22 +1,24 @@
Calculate viscosity Calculate viscosity
=================== ===================
The shear viscosity eta of a fluid can be measured in at least 6 ways The shear viscosity :math:`\eta` of a fluid can be measured in at least 6 ways
using various options in LAMMPS. See the examples/VISCOSITY directory using various options in LAMMPS. See the ``examples/VISCOSITY`` directory
for scripts that implement the 5 methods discussed here for a simple for scripts that implement the 5 methods discussed here for a simple
Lennard-Jones fluid model and 1 method for SPC/E water model. Lennard-Jones fluid model and 1 method for SPC/E water model.
Also, see the :doc:`page on calculating thermal conductivity <Howto_kappa>` Also, see the :doc:`page on calculating thermal conductivity <Howto_kappa>`
for an analogous discussion for thermal conductivity. for an analogous discussion for thermal conductivity.
Eta is a measure of the propensity of a fluid to transmit momentum in :math:`\eta` is a measure of the propensity of a fluid to transmit momentum in
a direction perpendicular to the direction of velocity or momentum a direction perpendicular to the direction of velocity or momentum
flow. Alternatively it is the resistance the fluid has to being flow. Alternatively it is the resistance the fluid has to being
sheared. It is given by sheared. It is given by
J = -eta grad(Vstream) .. math::
where J is the momentum flux in units of momentum per area per time. J = -\eta \cdot \text{grad}(V_{\text{stream}})
and grad(Vstream) is the spatial gradient of the velocity of the fluid
where :math:`J` is the momentum flux in units of momentum per area per time.
and :math:`\text{grad}(V_{\text{stream}})` is the spatial gradient of the velocity of the fluid
moving in another direction, normal to the area through which the moving in another direction, normal to the area through which the
momentum flows. Viscosity thus has units of pressure-time. momentum flows. Viscosity thus has units of pressure-time.
@ -38,11 +40,11 @@ velocity to prevent the fluid from heating up.
In both cases, the velocity profile setup in the fluid by this In both cases, the velocity profile setup in the fluid by this
procedure can be monitored by the :doc:`fix ave/chunk <fix_ave_chunk>` procedure can be monitored by the :doc:`fix ave/chunk <fix_ave_chunk>`
command, which determines grad(Vstream) in the equation above. command, which determines :math:`\text{grad}(V_{\text{stream}})` in the equation above.
E.g. the derivative in the y-direction of the Vx component of fluid E.g. the derivative in the y-direction of the :math:`V_x` component of fluid
motion or grad(Vstream) = dVx/dy. The Pxy off-diagonal component of motion or :math:`\text{grad}(V_{\text{stream}}) = \frac{\text{d} V_x}{\text{d} y}`. The :math:`P_{xy}` off-diagonal component of
the pressure or stress tensor, as calculated by the :doc:`compute pressure <compute_pressure>` command, can also be monitored, which the pressure or stress tensor, as calculated by the :doc:`compute pressure <compute_pressure>` command, can also be monitored, which
is the J term in the equation above. See the :doc:`Howto nemd <Howto_nemd>` page for details on NEMD simulations. is the :math:`J` term in the equation above. See the :doc:`Howto nemd <Howto_nemd>` page for details on NEMD simulations.
The third method is to perform a reverse non-equilibrium MD simulation The third method is to perform a reverse non-equilibrium MD simulation
using the :doc:`fix viscosity <fix_viscosity>` command which implements using the :doc:`fix viscosity <fix_viscosity>` command which implements
@ -55,7 +57,7 @@ See the :doc:`fix viscosity <fix_viscosity>` command for details.
The fourth method is based on the Green-Kubo (GK) formula which The fourth method is based on the Green-Kubo (GK) formula which
relates the ensemble average of the auto-correlation of the relates the ensemble average of the auto-correlation of the
stress/pressure tensor to eta. This can be done in a fully stress/pressure tensor to :math:`\eta`. This can be done in a fully
equilibrated simulation which is in contrast to the two preceding equilibrated simulation which is in contrast to the two preceding
non-equilibrium methods, where momentum flows continuously through the non-equilibrium methods, where momentum flows continuously through the
simulation box. simulation box.

View File

@ -6,7 +6,7 @@ analyzed in a variety of ways.
LAMMPS snapshots are created by the :doc:`dump <dump>` command, which LAMMPS snapshots are created by the :doc:`dump <dump>` command, which
can create files in several formats. The native LAMMPS dump format is a can create files in several formats. The native LAMMPS dump format is a
text file (see "dump atom" or "dump custom") which can be visualized by text file (see :lammps:`dump atom` or :lammps:`dump custom`) which can be visualized by
`several visualization tools <https://www.lammps.org/viz.html>`_ for MD `several visualization tools <https://www.lammps.org/viz.html>`_ for MD
simulation trajectories. `OVITO <https://www.ovito.org>`_ and `VMD simulation trajectories. `OVITO <https://www.ovito.org>`_ and `VMD
<https://www.ks.uiuc.edu/Research/vmd>`_ seem to be the most popular <https://www.ks.uiuc.edu/Research/vmd>`_ seem to be the most popular
@ -14,7 +14,13 @@ choices among them.
The :doc:`dump image <dump_image>` and :doc:`dump movie <dump_image>` The :doc:`dump image <dump_image>` and :doc:`dump movie <dump_image>`
styles can output internally rendered images or convert them to a movie styles can output internally rendered images or convert them to a movie
during the MD run. during the MD run. It is also possible to create visualizations from
LAMMPS inputs or restart file with the :doc:`LAMMPS-GUI
<Howto_lammps_gui>`, which uses the :doc:`dump image <dump_image>`
command internally. The ``Snapshot Image Viewer`` can be used to
adjust the visualization of the system interactively and then export
the corresponding LAMMPS commands to the clipboard to be inserted
into input files.
Programs included with LAMMPS as auxiliary tools can convert Programs included with LAMMPS as auxiliary tools can convert
between LAMMPS format files and other formats. See the :doc:`Tools between LAMMPS format files and other formats. See the :doc:`Tools

View File

@ -35,35 +35,35 @@ you **must** build LAMMPS from the source code.
These are the files and subdirectories in the LAMMPS distribution: These are the files and subdirectories in the LAMMPS distribution:
+------------+---------------------------------------------+ +-----------------+---------------------------------------------+
| README | Short description of the LAMMPS package | | ``README`` | Short description of the LAMMPS package |
+------------+---------------------------------------------+ +-----------------+---------------------------------------------+
| LICENSE | GNU General Public License (GPL) | | ``LICENSE`` | GNU General Public License (GPL) |
+------------+---------------------------------------------+ +-----------------+---------------------------------------------+
| SECURITY.md| Security policy for the LAMMPS package | | ``SECURITY.md`` | Security policy for the LAMMPS package |
+------------+---------------------------------------------+ +-----------------+---------------------------------------------+
| bench | benchmark inputs | | ``bench`` | benchmark inputs |
+------------+---------------------------------------------+ +-----------------+---------------------------------------------+
| cmake | CMake build files | | ``cmake`` | CMake build files |
+------------+---------------------------------------------+ +-----------------+---------------------------------------------+
| doc | documentation and tools to build the manual | | ``doc`` | documentation and tools to build the manual |
+------------+---------------------------------------------+ +-----------------+---------------------------------------------+
| examples | example input files | | ``examples`` | example input files |
+------------+---------------------------------------------+ +-----------------+---------------------------------------------+
| fortran | Fortran module for LAMMPS library interface | | ``fortran`` | Fortran module for LAMMPS library interface |
+------------+---------------------------------------------+ +-----------------+---------------------------------------------+
| lib | additional provided or external libraries | | ``lib`` | additional provided or external libraries |
+------------+---------------------------------------------+ +-----------------+---------------------------------------------+
| potentials | selected interatomic potential files | | ``potentials`` | selected interatomic potential files |
+------------+---------------------------------------------+ +-----------------+---------------------------------------------+
| python | Python module for LAMMPS library interface | | ``python`` | Python module for LAMMPS library interface |
+------------+---------------------------------------------+ +-----------------+---------------------------------------------+
| src | LAMMPS source files | | ``src`` | LAMMPS source files |
+------------+---------------------------------------------+ +-----------------+---------------------------------------------+
| tools | pre- and post-processing tools | | ``tools`` | pre- and post-processing tools |
+------------+---------------------------------------------+ +-----------------+---------------------------------------------+
| unittest | source code and inputs for testing LAMMPS | | ``unittest`` | source code and inputs for testing LAMMPS |
+------------+---------------------------------------------+ +-----------------+---------------------------------------------+
You will have all of these if you downloaded the LAMMPS source code. You will have all of these if you downloaded the LAMMPS source code.
You will have only some of them if you downloaded executables, as You will have only some of them if you downloaded executables, as

View File

@ -60,7 +60,7 @@ between them at any time using "git checkout <branch name>".)
files (mostly by accident). If you do not need access to the entire files (mostly by accident). If you do not need access to the entire
commit history (most people don't), you can speed up the "cloning" commit history (most people don't), you can speed up the "cloning"
process and reduce local disk space requirements by using the process and reduce local disk space requirements by using the
*--depth* git command line flag. That will create a "shallow clone" ``--depth`` git command line flag. That will create a "shallow clone"
of the repository, which contains only a subset of the git history. of the repository, which contains only a subset of the git history.
Using a depth of 1000 is usually sufficient to include the head Using a depth of 1000 is usually sufficient to include the head
commits of the *develop*, the *release*, and the *maintenance* commits of the *develop*, the *release*, and the *maintenance*
@ -122,7 +122,7 @@ changed. How to do this depends on the build system you are using.
.. code-block:: bash .. code-block:: bash
cmake . --build cmake --build .
CMake should auto-detect whether it needs to re-run the CMake CMake should auto-detect whether it needs to re-run the CMake
configuration step and otherwise redo the build for all files configuration step and otherwise redo the build for all files

View File

@ -31,7 +31,7 @@ command:
tar -xzvf lammps*.tar.gz tar -xzvf lammps*.tar.gz
This will create a LAMMPS directory with the version date in its name, This will create a LAMMPS directory with the version date in its name,
e.g. lammps-28Mar23. e.g. ``lammps-28Mar23``.
---------- ----------

View File

@ -34,7 +34,7 @@ When you download the installer package, you run it on your Windows
machine. It will then prompt you with a dialog, where you can choose machine. It will then prompt you with a dialog, where you can choose
the installation directory, unpack and copy several executables, the installation directory, unpack and copy several executables,
potential files, documentation PDFs, selected example files, etc. It potential files, documentation PDFs, selected example files, etc. It
will then update a few system settings (e.g. PATH, LAMMPS_POTENTIALS) will then update a few system settings (e.g. ``PATH``, ``LAMMPS_POTENTIALS``)
and add an entry into the Start Menu (with references to the and add an entry into the Start Menu (with references to the
documentation, LAMMPS homepage and more). From that menu, there is documentation, LAMMPS homepage and more). From that menu, there is
also a link to an uninstaller that removes the files and undoes the also a link to an uninstaller that removes the files and undoes the

View File

@ -25,9 +25,13 @@ Here are suggestions on how to perform these tasks:
wraps the library interface is provided. Thus, GUI interfaces can be wraps the library interface is provided. Thus, GUI interfaces can be
written in Python or C/C++ that run LAMMPS and visualize or plot its written in Python or C/C++ that run LAMMPS and visualize or plot its
output. Examples of this are provided in the python directory and output. Examples of this are provided in the python directory and
described on the :doc:`Python <Python_head>` doc page. As of version described on the :doc:`Python <Python_head>` doc page.
2 August 2023 :ref:`a GUI tool <lammps_gui>` is included in LAMMPS.
Also, there are several external wrappers or GUI front ends. Since version 2 August 2023 :ref:`a LAMMPS-GUI tool <lammps_gui>` is
included in LAMMPS. Also, there are several external wrappers or GUI
front ends that are mentioned on the `Pre-/post-processing tools page
<https://www.lammps.org/prepost.html>`_ of the LAMMPS homepage.
* **Builder:** Several pre-processing tools are packaged with LAMMPS. * **Builder:** Several pre-processing tools are packaged with LAMMPS.
Some of them convert input files in formats produced by other MD codes Some of them convert input files in formats produced by other MD codes
such as CHARMM, AMBER, or Insight into LAMMPS input formats. Some of such as CHARMM, AMBER, or Insight into LAMMPS input formats. Some of
@ -35,12 +39,13 @@ Here are suggestions on how to perform these tasks:
such as linear bead-spring polymer chains. The moltemplate program is such as linear bead-spring polymer chains. The moltemplate program is
a true molecular builder that will generate complex molecular models. a true molecular builder that will generate complex molecular models.
See the :doc:`Tools <Tools>` page for details on tools packaged with See the :doc:`Tools <Tools>` page for details on tools packaged with
LAMMPS. The `Pre-/post-processing page LAMMPS. The `Pre-/post-processing tools page
<https://www.lammps.org/prepost.html>`_ of the LAMMPS homepage <https://www.lammps.org/prepost.html>`_ of the LAMMPS homepage
describes a variety of third party tools for this task. Furthermore, describes a variety of third party tools for this task. Furthermore,
some internal LAMMPS commands allow reconstructing, or selectively adding some internal LAMMPS commands allow reconstructing, or selectively adding
topology information, as well as provide the option to insert molecule topology information, as well as provide the option to insert molecule
templates instead of atoms for building bulk molecular systems. templates instead of atoms for building bulk molecular systems.
* **Force-field assignment:** The conversion tools described in the previous * **Force-field assignment:** The conversion tools described in the previous
bullet for CHARMM, AMBER, and Insight will also assign force field bullet for CHARMM, AMBER, and Insight will also assign force field
coefficients in the LAMMPS format, assuming you provide CHARMM, AMBER, coefficients in the LAMMPS format, assuming you provide CHARMM, AMBER,
@ -49,6 +54,7 @@ Here are suggestions on how to perform these tasks:
`InterMol <https://github.com/shirtsgroup/InterMol>`_ are particularly `InterMol <https://github.com/shirtsgroup/InterMol>`_ are particularly
powerful and flexible in converting force field and topology data powerful and flexible in converting force field and topology data
between various MD simulation programs. between various MD simulation programs.
* **Simulation analysis:** If you want to perform analysis on-the-fly as * **Simulation analysis:** If you want to perform analysis on-the-fly as
your simulation runs, see the :doc:`compute <compute>` and :doc:`fix your simulation runs, see the :doc:`compute <compute>` and :doc:`fix
<fix>` doc pages, which list commands that can be used in a LAMMPS <fix>` doc pages, which list commands that can be used in a LAMMPS
@ -66,19 +72,38 @@ Here are suggestions on how to perform these tasks:
extract and massage data in dump files to make it easier to import extract and massage data in dump files to make it easier to import
into other programs. See the :doc:`Tools <Tools>` page for details on into other programs. See the :doc:`Tools <Tools>` page for details on
these various options. these various options.
The `Pre-/post-processing page <https://www.lammps.org/prepost.html>`_
on the LAMMPS homepage lists some external packages for analysis of MD
simulation data, including data produced by LAMMPS.
* **Visualization:** LAMMPS can produce NETPBM, JPG, or PNG format * **Visualization:** LAMMPS can produce NETPBM, JPG, or PNG format
snapshot images on-the-fly via its :doc:`dump image <dump_image>` snapshot images on-the-fly via its :doc:`dump image <dump_image>`
command and pass them to an external program, `FFmpeg <https://ffmpeg.org/>`_, command and pass them to an external program, `FFmpeg
to generate movies from them. For high-quality, interactive visualization, <https://ffmpeg.org/>`_, to generate movies from them. The
there are many excellent and free tools available. See the `Visualization Tools :ref:`LAMMPS-GUI tool <lammps_gui>` has an *Snapshot Image Viewer*
which uses :doc:`dump image <dump_image>` and allows to modify the
visualization settings interactively. It also has a *Slide Show*
feature where images created by :doc:`dump image <dump_image>` are
collected during a simulation and can be animated interactively or
exported to a movie with FFmpeg.
For high-quality, interactive visualization, there are many excellent
and free tools available. See the `Visualization Tools
<https://www.lammps.org/viz.html>`_ page of the LAMMPS website for <https://www.lammps.org/viz.html>`_ page of the LAMMPS website for
visualization packages that can process LAMMPS output data. visualization packages that can process LAMMPS output data.
* **Plotting:** See the next bullet about Pizza.py as well as the * **Plotting:** See the next bullet about Pizza.py as well as the
:doc:`Python <Python_head>` page for examples of plotting LAMMPS :doc:`Python <Python_head>` page for examples of plotting LAMMPS
output. Scripts provided with the *python* tool in the ``tools`` output. Scripts provided with the *python* tool in the ``tools``
directory will extract and process data in log and dump files to make directory will extract and process data in log and dump files to make
it easier to analyze and plot. See the :doc:`Tools <Tools>` doc page it easier to analyze and plot. See the :doc:`Tools <Tools>` doc page
for more discussion of the various tools. for more discussion of the various tools.
The :ref:`LAMMPS-GUI tool <lammps_gui>` has an *Chart Viewer* where
:doc:`thermodynamic data <thermo_style>` computed by LAMMPS is
collected during the simulation and plotted immediately.
* **Pizza.py:** Our group has also written a separate toolkit called * **Pizza.py:** Our group has also written a separate toolkit called
`Pizza.py <https://lammps.github.io/pizza>`_ which can do certain kinds of `Pizza.py <https://lammps.github.io/pizza>`_ which can do certain kinds of
setup, analysis, plotting, and visualization (via OpenGL) for LAMMPS setup, analysis, plotting, and visualization (via OpenGL) for LAMMPS

View File

@ -2,6 +2,8 @@
LAMMPS Documentation (|version| version) LAMMPS Documentation (|version| version)
######################################## ########################################
**About LAMMPS and this manual**
LAMMPS stands for **L**\ arge-scale **A**\ tomic/**M**\ olecular LAMMPS stands for **L**\ arge-scale **A**\ tomic/**M**\ olecular
**M**\ assively **P**\ arallel **S**\ imulator. **M**\ assively **P**\ arallel **S**\ imulator.
@ -39,9 +41,12 @@ doc directory.
If needed, you can build a copy on your local machine of the manual If needed, you can build a copy on your local machine of the manual
(HTML pages or PDF file) for the version of LAMMPS you have (HTML pages or PDF file) for the version of LAMMPS you have
downloaded. Follow the steps on the :doc:`Build_manual` page. If you downloaded. Follow the steps on the :doc:`Build_manual` page.
have difficulties viewing the pages, please :ref:`see this note
<webbrowser>`. .. only:: html
If you have difficulties viewing the HTML pages, please :ref:`see this note
<webbrowser>` about compatibility with web browsers.
----------- -----------
@ -144,8 +149,10 @@ Indices and tables
* :ref:`genindex` * :ref:`genindex`
* :ref:`search` * :ref:`search`
.. _webbrowser: .. only:: html
.. admonition:: Web Browser Compatibility
.. _webbrowser:
.. admonition:: Web Browser Compatibility
:class: note :class: note
The HTML version of the manual makes use of advanced features present The HTML version of the manual makes use of advanced features present

View File

@ -96,7 +96,7 @@ methods that a new variable name or flag needs to be added to.
In ``Atom::peratom_create()`` when using the ``Atom::add_peratom()`` In ``Atom::peratom_create()`` when using the ``Atom::add_peratom()``
method, a cols argument of 0 is for per-atom vectors, a length > method, a cols argument of 0 is for per-atom vectors, a length >
1 is for per-atom arrays. Note the use of the extra per-thread flag and 1 is for per-atom arrays. Note the use of the extra per-thread flag and
the add_peratom_vary() method when last dimension of the array is the add_peratom_vary() method when the last dimension of the array is
variable-length. variable-length.
Adding the variable name to Atom::extract() enables the per-atom data Adding the variable name to Atom::extract() enables the per-atom data

View File

@ -1,7 +1,7 @@
Submitting new features for inclusion in LAMMPS Submitting new features for inclusion in LAMMPS
=============================================== ===============================================
We encourage LAMMPS users to submit new features they wrote for LAMMPS We encourage LAMMPS users to submit new features they write for LAMMPS
to be included in the LAMMPS distribution and thus become easily to be included in the LAMMPS distribution and thus become easily
accessible to all LAMMPS users. The LAMMPS source code is managed accessible to all LAMMPS users. The LAMMPS source code is managed
with git and public development is hosted on `GitHub with git and public development is hosted on `GitHub

View File

@ -37,6 +37,7 @@ includes several public variables that describe the geometry/dynamics of the
contact such as contact such as
.. list-table:: .. list-table::
:widths: 25 75
* - ``xi`` and ``xj`` * - ``xi`` and ``xj``
- Positions of the two contacting bodies - Positions of the two contacting bodies
@ -64,38 +65,31 @@ GranSubMod classes. All GranSubMod classes share several general methods which m
need to be defined need to be defined
.. list-table:: .. list-table::
:widths: 25 75
* - ``GranSubMod->mix_coeff()`` * - ``mix_coeff()``
- Optional method to define how coefficients are mixed for different atom types. By default, coefficients are mixed using a geometric mean. - Optional method to define how coefficients are mixed for different atom types. By default, coefficients are mixed using a geometric mean.
* - ``GranSubMod->coeffs_to_local()`` * - ``coeffs_to_local()``
- Parses coefficients to define local variables. Run once at model construction. - Parses coefficients to define local variables. Run once at model construction.
* - ``GranSubMod->init()`` * - ``init()``
- Optional method to define local variables after other GranSubMod types were created. For instance, this method may be used by a tangential model that derives parameters from the normal model. - Optional method to define local variables after other GranSubMod types were created. For instance, this method may be used by a tangential model that derives parameters from the normal model.
There are also several type-specific methods The Normal, Damping, Tangential, Twisting, and Rolling sub-models also have a
``calculate_forces()`` method which calculate the respective forces/torques.
Correspondingly, the Heat sub-model has a ``calculate_heat()`` method. Lastly,
the Normal sub-model has a few extra optional methods:
.. list-table:: .. list-table::
:widths: 25 75
* - ``GranSubModNormal->touch()`` * - ``touch()``
- Optional method to test when particles are in contact. By default, this is when particles overlap. - Tests whether particles are in contact. By default, when particles overlap.
* - ``GranSubModNormal->pulloff_distance()`` * - ``pulloff_distance()``
- Optional method to return the distance at which particles stop interacting. By default, this is when particles no longer overlap. - Returns the distance at which particles stop interacting. By default, when particles no longer overlap.
* - ``GranSubModNormal->calculate_radius()`` * - ``calculate_radius()``
- Optional method to return the radius of the contact. By default, this returns the radius of the geometric cross section. - Returns the radius of the contact. By default, the radius of the geometric cross section.
* - ``GranSubModNormal->set_fncrit()`` * - ``set_fncrit()``
- Optional method that defines the critical force to break the contact used by some tangential, rolling, and twisting sub-models. By default, this is the current total normal force including damping. - Defines the critical force to break the contact used by some tangential, rolling, and twisting sub-models. By default, the current total normal force including damping.
* - ``GranSubModNormal->calculate_forces()``
- Required method that returns the normal contact force
* - ``GranSubModDamping->calculate_forces()``
- Required method that returns the normal damping force
* - ``GranSubModTangential->calculate_forces()``
- Required method that calculates tangential forces/torques
* - ``GranSubModTwisting->calculate_forces()``
- Required method that calculates twisting friction forces/torques
* - ``GranSubModRolling->calculate_forces()``
- Required method that calculates rolling friction forces/torques
* - ``GranSubModHeat->calculate_heat()``
- Required method that returns the rate of heat flow
As an example, say one wanted to create a new normal force option that consisted As an example, say one wanted to create a new normal force option that consisted
of a Hookean force with a piecewise stiffness. This could be done by adding a new of a Hookean force with a piecewise stiffness. This could be done by adding a new
@ -125,7 +119,6 @@ set of files ``gran_sub_mod_custom.h``:
protected: protected:
double k1, k2, delta_switch; double k1, k2, delta_switch;
}; };
} // namespace Granular_NS } // namespace Granular_NS
} // namespace LAMMPS_NS } // namespace LAMMPS_NS

View File

@ -12,8 +12,8 @@ programming style choices in LAMMPS is :doc:`given elsewhere
<Developer_code_design>`. <Developer_code_design>`.
Most of the new features described on the :doc:`Modify <Modify>` doc Most of the new features described on the :doc:`Modify <Modify>` doc
page require you to write a new C++ derived class (except for page require you to write a new C++ derived class (excluding exceptions
exceptions described below, where you can make small edits to existing described below, this can often be done by making small edits to existing
files). Creating a new class requires 2 files, a source code file files). Creating a new class requires 2 files, a source code file
(\*.cpp) and a header file (\*.h). The derived class must provide (\*.cpp) and a header file (\*.h). The derived class must provide
certain methods to work as a new option. Depending on how different certain methods to work as a new option. Depending on how different
@ -46,7 +46,7 @@ then your ``pair_foo.h`` file should be structured as follows:
// clang-format off // clang-format off
PairStyle(foo,PairFoo); PairStyle(foo,PairFoo);
#else #else
// clanf-format on // clang-format on
... ...
(class definition for PairFoo) (class definition for PairFoo)
... ...

View File

@ -33,47 +33,47 @@ Here is a brief list of some the class methods in the Pair class that
| coeff | set coefficients for one i,j type pair, called from pair_coeff | | coeff | set coefficients for one i,j type pair, called from pair_coeff |
+---------------------------------+---------------------------------------------------------------------+ +---------------------------------+---------------------------------------------------------------------+
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| Optional | methods that have a default or dummy implementation | | Optional | methods that have a default or dummy implementation |
+=================================+======================================================================+ +=================================+========================================================================+
| init_one | perform initialization for one i,j type pair | | init_one | perform initialization for one i,j type pair |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| init_style | style initialization: request neighbor list(s), error checks | | init_style | style initialization: request neighbor list(s), error checks |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| init_list | Neighbor class callback function to pass neighbor list to pair style | | init_list | Neighbor class callback function to pass neighbor list to pair style |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| single | force/r and energy of a single pairwise interaction between 2 atoms | | single | force/r and energy of a single pairwise interaction between two atoms |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| compute_inner/middle/outer | versions of compute used by rRESPA | | compute_inner/middle/outer | versions of compute used by rRESPA |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| memory_usage | return estimated amount of memory used by the pair style | | memory_usage | return estimated amount of memory used by the pair style |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| modify_params | process arguments to pair_modify command | | modify_params | process arguments to pair_modify command |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| extract | provide access to internal scalar or per-type data like cutoffs | | extract | provide access to internal scalar or per-type data like cutoffs |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| extract_peratom | provide access to internal per-atom data | | extract_peratom | provide access to internal per-atom data |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| setup | initialization at the beginning of a run | | setup | initialization at the beginning of a run |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| finish | called at the end of a run, e.g. to print | | finish | called at the end of a run, e.g. to print |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| write & read_restart | write/read i,j pair coeffs to restart files | | write & read_restart | write/read i,j pair coeffs to restart files |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| write & read_restart_settings | write/read global settings to restart files | | write & read_restart_settings | write/read global settings to restart files |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| write_data | write Pair Coeffs section to data file | | write_data | write Pair Coeffs section to data file |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| write_data_all | write PairIJ Coeffs section to data file | | write_data_all | write PairIJ Coeffs section to data file |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| pack & unpack_forward_comm | copy data to and from buffer if style uses forward communication | | pack & unpack_forward_comm | copy data to and from buffer if style uses forward communication |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| pack & unpack_reverse_comm | copy data to and from buffer if style uses reverse communication | | pack & unpack_reverse_comm | copy data to and from buffer if style uses reverse communication |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| reinit | reset all type-based parameters, called by fix adapt for example | | reinit | reset all type-based parameters, called by fix adapt for example |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
| reset_dt | called when the time step is changed by timestep or fix reset/dt | | reset_dt | called when the time step is changed by timestep or fix reset/dt |
+---------------------------------+----------------------------------------------------------------------+ +---------------------------------+------------------------------------------------------------------------+
Here is a list of flags or settings that should be set in the Here is a list of flags or settings that should be set in the
constructor of the derived pair class when they differ from the default constructor of the derived pair class when they differ from the default

View File

@ -184,7 +184,7 @@ package so that it is optional.
Included Fortran code has to be compatible with the Fortran 2003 Included Fortran code has to be compatible with the Fortran 2003
standard. Since not all platforms supported by LAMMPS provide good standard. Since not all platforms supported by LAMMPS provide good
support for compiling Fortran files, it should be considered to rewrite support for compiling Fortran files, it should be considered to rewrite
these parts as C++ code, if possible and thus allow for a wider adoption these parts as C++ code, if possible, and thus allow for a wider adoption
of the contribution. As of January 2023, all previously included of the contribution. As of January 2023, all previously included
Fortran code for the LAMMPS executable has been replaced by equivalent Fortran code for the LAMMPS executable has been replaced by equivalent
C++ code. C++ code.

View File

@ -14,7 +14,7 @@ style, but can be adapted using :doc:`thermo_modify line <thermo_modify>`.
The thermo styles (one, multi, etc) are defined by lists of keywords The thermo styles (one, multi, etc) are defined by lists of keywords
with associated formats for integer and floating point numbers and with associated formats for integer and floating point numbers and
identified but an enumerator constant. Adding a new style thus mostly identified by an enumerator constant. Adding a new style thus mostly
requires defining a new list of keywords and the associated formats and requires defining a new list of keywords and the associated formats and
then inserting the required output processing where the enumerators are then inserting the required output processing where the enumerators are
identified. Search for the word "CUSTOMIZATION" with references to identified. Search for the word "CUSTOMIZATION" with references to

File diff suppressed because it is too large Load Diff

View File

@ -10,8 +10,8 @@ the rest of LAMMPS.
The "Examples" column is a subdirectory in the examples directory of the The "Examples" column is a subdirectory in the examples directory of the
distribution which has one or more input scripts that use the package. distribution which has one or more input scripts that use the package.
E.g. "peptide" refers to the examples/peptide directory; PACKAGES/atc refers E.g. ``peptide`` refers to the ``examples/peptide`` directory; ``PACKAGES/atc`` refers
to the examples/PACKAGES/atc directory. The "Lib" column indicates to the ``examples/PACKAGES/atc`` directory. The "Lib" column indicates``
whether an extra library is needed to build and use the package: whether an extra library is needed to build and use the package:
* no = no library * no = no library
@ -21,7 +21,7 @@ whether an extra library is needed to build and use the package:
.. list-table:: .. list-table::
:header-rows: 1 :header-rows: 1
:widths: auto :widths: 20 20 30 25 5
* - Package * - Package
- Description - Description
@ -31,7 +31,7 @@ whether an extra library is needed to build and use the package:
* - :ref:`ADIOS <PKG-ADIOS>` * - :ref:`ADIOS <PKG-ADIOS>`
- dump output via ADIOS - dump output via ADIOS
- :doc:`dump adios <dump_adios>` - :doc:`dump adios <dump_adios>`
- PACKAGES/adios - ``PACKAGES/adios``
- ext - ext
* - :ref:`AMOEBA <PKG-AMOEBA>` * - :ref:`AMOEBA <PKG-AMOEBA>`
- AMOEBA and HIPPO force fields - AMOEBA and HIPPO force fields
@ -46,17 +46,17 @@ whether an extra library is needed to build and use the package:
* - :ref:`ATC <PKG-ATC>` * - :ref:`ATC <PKG-ATC>`
- Atom-to-Continuum coupling - Atom-to-Continuum coupling
- :doc:`fix atc <fix_atc>` - :doc:`fix atc <fix_atc>`
- PACKAGES/atc - ``PACKAGES/atc``
- int - int
* - :ref:`AWPMD <PKG-AWPMD>` * - :ref:`AWPMD <PKG-AWPMD>`
- wave packet MD - wave packet MD
- :doc:`pair_style awpmd/cut <pair_awpmd>` - :doc:`pair_style awpmd/cut <pair_awpmd>`
- PACKAGES/awpmd - ``PACKAGES/awpmd``
- int - int
* - :ref:`BOCS <PKG-BOCS>` * - :ref:`BOCS <PKG-BOCS>`
- BOCS bottom up coarse graining - BOCS bottom up coarse graining
- :doc:`fix bocs <fix_bocs>` - :doc:`fix bocs <fix_bocs>`
- PACKAGES/bocs - ``PACKAGES/bocs``
- no - no
* - :ref:`BODY <PKG-BODY>` * - :ref:`BODY <PKG-BODY>`
- body-style particles - body-style particles
@ -71,17 +71,17 @@ whether an extra library is needed to build and use the package:
* - :ref:`BROWNIAN <PKG-BROWNIAN>` * - :ref:`BROWNIAN <PKG-BROWNIAN>`
- Brownian dynamics, self-propelled particles - Brownian dynamics, self-propelled particles
- :doc:`fix brownian <fix_brownian>`, :doc:`fix propel/self <fix_propel_self>` - :doc:`fix brownian <fix_brownian>`, :doc:`fix propel/self <fix_propel_self>`
- PACKAGES/brownian - ``PACKAGES/brownian``
- no - no
* - :ref:`CG-DNA <PKG-CG-DNA>` * - :ref:`CG-DNA <PKG-CG-DNA>`
- coarse-grained DNA force fields - coarse-grained DNA force fields
- src/CG-DNA/README - ``src/CG-DNA/README``
- PACKAGES/cgdna - ``PACKAGES/cgdna``
- no - no
* - :ref:`CG-SPICA <PKG-CG-SPICA>` * - :ref:`CG-SPICA <PKG-CG-SPICA>`
- SPICA (SDK) coarse-graining model - SPICA (SDK) coarse-graining model
- :doc:`pair_style lj/spica <pair_spica>` - :doc:`pair_style lj/spica <pair_spica>`
- PACKAGES/cgspica - ``PACKAGES/cgspica``
- no - no
* - :ref:`CLASS2 <PKG-CLASS2>` * - :ref:`CLASS2 <PKG-CLASS2>`
- class 2 force fields - class 2 force fields
@ -96,7 +96,7 @@ whether an extra library is needed to build and use the package:
* - :ref:`COLVARS <PKG-COLVARS>` * - :ref:`COLVARS <PKG-COLVARS>`
- `Colvars collective variables library <https://colvars.github.io/>`_ - `Colvars collective variables library <https://colvars.github.io/>`_
- :doc:`fix colvars <fix_colvars>` - :doc:`fix colvars <fix_colvars>`
- PACKAGES/colvars - ``PACKAGES/colvars``
- int - int
* - :ref:`COMPRESS <PKG-COMPRESS>` * - :ref:`COMPRESS <PKG-COMPRESS>`
- I/O compression - I/O compression
@ -111,12 +111,12 @@ whether an extra library is needed to build and use the package:
* - :ref:`DIELECTRIC <PKG-DIELECTRIC>` * - :ref:`DIELECTRIC <PKG-DIELECTRIC>`
- dielectric boundary solvers and force styles - dielectric boundary solvers and force styles
- :doc:`compute efield/atom <compute_efield_atom>` - :doc:`compute efield/atom <compute_efield_atom>`
- PACKAGES/dielectric - ``PACKAGES/dielectric``
- no - no
* - :ref:`DIFFRACTION <PKG-DIFFRACTION>` * - :ref:`DIFFRACTION <PKG-DIFFRACTION>`
- virtual x-ray and electron diffraction - virtual x-ray and electron diffraction
- :doc:`compute xrd <compute_xrd>` - :doc:`compute xrd <compute_xrd>`
- PACKAGES/diffraction - ``PACKAGES/diffraction``
- no - no
* - :ref:`DIPOLE <PKG-DIPOLE>` * - :ref:`DIPOLE <PKG-DIPOLE>`
- point dipole particles - point dipole particles
@ -126,37 +126,37 @@ whether an extra library is needed to build and use the package:
* - :ref:`DPD-BASIC <PKG-DPD-BASIC>` * - :ref:`DPD-BASIC <PKG-DPD-BASIC>`
- basic DPD models - basic DPD models
- :doc:`pair_styles dpd <pair_dpd>` :doc:`dpd/ext <pair_dpd_ext>` - :doc:`pair_styles dpd <pair_dpd>` :doc:`dpd/ext <pair_dpd_ext>`
- PACKAGES/dpd-basic - ``PACKAGES/dpd-basic``
- no - no
* - :ref:`DPD-MESO <PKG-DPD-MESO>` * - :ref:`DPD-MESO <PKG-DPD-MESO>`
- mesoscale DPD models - mesoscale DPD models
- :doc:`pair_style edpd <pair_mesodpd>` - :doc:`pair_style edpd <pair_mesodpd>`
- PACKAGES/dpd-meso - ``PACKAGES/dpd-meso``
- no - no
* - :ref:`DPD-REACT <PKG-DPD-REACT>` * - :ref:`DPD-REACT <PKG-DPD-REACT>`
- reactive dissipative particle dynamics - reactive dissipative particle dynamics
- src/DPD-REACT/README - ``src/DPD-REACT/README``
- PACKAGES/dpd-react - ``PACKAGES/dpd-react``
- no - no
* - :ref:`DPD-SMOOTH <PKG-DPD-SMOOTH>` * - :ref:`DPD-SMOOTH <PKG-DPD-SMOOTH>`
- smoothed dissipative particle dynamics - smoothed dissipative particle dynamics
- src/DPD-SMOOTH/README - ``src/DPD-SMOOTH/README``
- PACKAGES/dpd-smooth - ``PACKAGES/dpd-smooth``
- no - no
* - :ref:`DRUDE <PKG-DRUDE>` * - :ref:`DRUDE <PKG-DRUDE>`
- Drude oscillators - Drude oscillators
- :doc:`Howto drude <Howto_drude>` - :doc:`Howto drude <Howto_drude>`
- PACKAGES/drude - ``PACKAGES/drude``
- no - no
* - :ref:`EFF <PKG-EFF>` * - :ref:`EFF <PKG-EFF>`
- electron force field - electron force field
- :doc:`pair_style eff/cut <pair_eff>` - :doc:`pair_style eff/cut <pair_eff>`
- PACKAGES/eff - ``PACKAGES/eff``
- no - no
* - :ref:`ELECTRODE <PKG-ELECTRODE>` * - :ref:`ELECTRODE <PKG-ELECTRODE>`
- electrode charges to match potential - electrode charges to match potential
- :doc:`fix electrode/conp <fix_electrode>` - :doc:`fix electrode/conp <fix_electrode>`
- PACKAGES/electrode - ``PACKAGES/electrode``
- no - no
* - :ref:`EXTRA-COMMAND <PKG-EXTRA-COMMAND>` * - :ref:`EXTRA-COMMAND <PKG-EXTRA-COMMAND>`
- additional command styles - additional command styles
@ -191,7 +191,7 @@ whether an extra library is needed to build and use the package:
* - :ref:`FEP <PKG-FEP>` * - :ref:`FEP <PKG-FEP>`
- free energy perturbation - free energy perturbation
- :doc:`compute fep <compute_fep>` - :doc:`compute fep <compute_fep>`
- PACKAGES/fep - ``PACKAGES/fep``
- no - no
* - :ref:`GPU <PKG-GPU>` * - :ref:`GPU <PKG-GPU>`
- GPU-enabled styles - GPU-enabled styles
@ -216,7 +216,7 @@ whether an extra library is needed to build and use the package:
* - :ref:`INTERLAYER <PKG-INTERLAYER>` * - :ref:`INTERLAYER <PKG-INTERLAYER>`
- Inter-layer pair potentials - Inter-layer pair potentials
- :doc:`several pair styles <Commands_pair>` - :doc:`several pair styles <Commands_pair>`
- PACKAGES/interlayer - ``PACKAGES/interlayer``
- no - no
* - :ref:`KIM <PKG-KIM>` * - :ref:`KIM <PKG-KIM>`
- OpenKIM wrapper - OpenKIM wrapper
@ -236,22 +236,22 @@ whether an extra library is needed to build and use the package:
* - :ref:`LATBOLTZ <PKG-LATBOLTZ>` * - :ref:`LATBOLTZ <PKG-LATBOLTZ>`
- Lattice Boltzmann fluid - Lattice Boltzmann fluid
- :doc:`fix lb/fluid <fix_lb_fluid>` - :doc:`fix lb/fluid <fix_lb_fluid>`
- PACKAGES/latboltz - ``PACKAGES/latboltz``
- no - no
* - :ref:`LEPTON <PKG-LEPTON>` * - :ref:`LEPTON <PKG-LEPTON>`
- evaluate strings as potential function - evaluate strings as potential function
- :doc:`pair_style lepton <pair_lepton>` - :doc:`pair_style lepton <pair_lepton>`
- PACKAGES/lepton - ``PACKAGES/lepton``
- int - int
* - :ref:`MACHDYN <PKG-MACHDYN>` * - :ref:`MACHDYN <PKG-MACHDYN>`
- smoothed Mach dynamics - smoothed Mach dynamics
- `SMD User Guide <PDF/MACHDYN_LAMMPS_userguide.pdf>`_ - `SMD User Guide <PDF/MACHDYN_LAMMPS_userguide.pdf>`_
- PACKAGES/machdyn - ``PACKAGES/machdyn``
- ext - ext
* - :ref:`MANIFOLD <PKG-MANIFOLD>` * - :ref:`MANIFOLD <PKG-MANIFOLD>`
- motion on 2d surfaces - motion on 2d surfaces
- :doc:`fix manifoldforce <fix_manifoldforce>` - :doc:`fix manifoldforce <fix_manifoldforce>`
- PACKAGES/manifold - ``PACKAGES/manifold``
- no - no
* - :ref:`MANYBODY <PKG-MANYBODY>` * - :ref:`MANYBODY <PKG-MANYBODY>`
- many-body potentials - many-body potentials
@ -266,7 +266,7 @@ whether an extra library is needed to build and use the package:
* - :ref:`MDI <PKG-MDI>` * - :ref:`MDI <PKG-MDI>`
- client-server code coupling - client-server code coupling
- :doc:`MDI Howto <Howto_mdi>` - :doc:`MDI Howto <Howto_mdi>`
- PACKAGES/mdi - ``PACKAGES/mdi``
- ext - ext
* - :ref:`MEAM <PKG-MEAM>` * - :ref:`MEAM <PKG-MEAM>`
- modified EAM potential (C++) - modified EAM potential (C++)
@ -276,12 +276,12 @@ whether an extra library is needed to build and use the package:
* - :ref:`MESONT <PKG-MESONT>` * - :ref:`MESONT <PKG-MESONT>`
- mesoscopic tubular potential model - mesoscopic tubular potential model
- pair styles :doc:`mesocnt <pair_mesocnt>` - pair styles :doc:`mesocnt <pair_mesocnt>`
- PACKAGES/mesont - ``PACKAGES/mesont``
- no - no
* - :ref:`MGPT <PKG-MGPT>` * - :ref:`MGPT <PKG-MGPT>`
- fast MGPT multi-ion potentials - fast MGPT multi-ion potentials
- :doc:`pair_style mgpt <pair_mgpt>` - :doc:`pair_style mgpt <pair_mgpt>`
- PACKAGES/mgpt - ``PACKAGES/mgpt``
- no - no
* - :ref:`MISC <PKG-MISC>` * - :ref:`MISC <PKG-MISC>`
- miscellaneous single-file commands - miscellaneous single-file commands
@ -291,7 +291,7 @@ whether an extra library is needed to build and use the package:
* - :ref:`ML-HDNNP <PKG-ML-HDNNP>` * - :ref:`ML-HDNNP <PKG-ML-HDNNP>`
- High-dimensional neural network potentials - High-dimensional neural network potentials
- :doc:`pair_style hdnnp <pair_hdnnp>` - :doc:`pair_style hdnnp <pair_hdnnp>`
- PACKAGES/hdnnp - ``PACKAGES/hdnnp``
- ext - ext
* - :ref:`ML-IAP <PKG-ML-IAP>` * - :ref:`ML-IAP <PKG-ML-IAP>`
- multiple machine learning potentials - multiple machine learning potentials
@ -301,7 +301,7 @@ whether an extra library is needed to build and use the package:
* - :ref:`ML-PACE <PKG-ML-PACE>` * - :ref:`ML-PACE <PKG-ML-PACE>`
- Atomic Cluster Expansion potential - Atomic Cluster Expansion potential
- :doc:`pair pace <pair_pace>` - :doc:`pair pace <pair_pace>`
- PACKAGES/pace - ``PACKAGES/pace``
- ext - ext
* - :ref:`ML-POD <PKG-ML-POD>` * - :ref:`ML-POD <PKG-ML-POD>`
- Proper orthogonal decomposition potentials - Proper orthogonal decomposition potentials
@ -311,12 +311,12 @@ whether an extra library is needed to build and use the package:
* - :ref:`ML-QUIP <PKG-ML-QUIP>` * - :ref:`ML-QUIP <PKG-ML-QUIP>`
- QUIP/libatoms interface - QUIP/libatoms interface
- :doc:`pair_style quip <pair_quip>` - :doc:`pair_style quip <pair_quip>`
- PACKAGES/quip - ``PACKAGES/quip``
- ext - ext
* - :ref:`ML-RANN <PKG-ML-RANN>` * - :ref:`ML-RANN <PKG-ML-RANN>`
- Pair style for RANN potentials - Pair style for RANN potentials
- :doc:`pair rann <pair_rann>` - :doc:`pair rann <pair_rann>`
- PACKAGES/rann - ``PACKAGES/rann``
- no - no
* - :ref:`ML-SNAP <PKG-ML-SNAP>` * - :ref:`ML-SNAP <PKG-ML-SNAP>`
- quantum-fitted potential - quantum-fitted potential
@ -326,12 +326,12 @@ whether an extra library is needed to build and use the package:
* - :ref:`ML-UF3 <PKG-ML-UF3>` * - :ref:`ML-UF3 <PKG-ML-UF3>`
- quantum-fitted ultra fast potentials - quantum-fitted ultra fast potentials
- :doc:`pair_style uf3 <pair_uf3>` - :doc:`pair_style uf3 <pair_uf3>`
- PACKAGES/uf3 - ``PACKAGES/uf3``
- no - no
* - :ref:`MOFFF <PKG-MOFFF>` * - :ref:`MOFFF <PKG-MOFFF>`
- styles for `MOF-FF <MOFplus_>`_ force field - styles for `MOF-FF <MOFplus_>`_ force field
- :doc:`pair_style buck6d/coul/gauss <pair_buck6d_coul_gauss>` - :doc:`pair_style buck6d/coul/gauss <pair_buck6d_coul_gauss>`
- PACKAGES/mofff - ``PACKAGES/mofff``
- no - no
* - :ref:`MOLECULE <PKG-MOLECULE>` * - :ref:`MOLECULE <PKG-MOLECULE>`
- molecular system force fields - molecular system force fields
@ -361,7 +361,7 @@ whether an extra library is needed to build and use the package:
* - :ref:`ORIENT <PKG-ORIENT>` * - :ref:`ORIENT <PKG-ORIENT>`
- fixes for orientation depended forces - fixes for orientation depended forces
- :doc:`fix orient/* <fix_orient>` - :doc:`fix orient/* <fix_orient>`
- PACKAGES/orient_eco - ``PACKAGES/orient_eco``
- no - no
* - :ref:`PERI <PKG-PERI>` * - :ref:`PERI <PKG-PERI>`
- Peridynamics models - Peridynamics models
@ -371,7 +371,7 @@ whether an extra library is needed to build and use the package:
* - :ref:`PHONON <PKG-PHONON>` * - :ref:`PHONON <PKG-PHONON>`
- phonon dynamical matrix - phonon dynamical matrix
- :doc:`fix phonon <fix_phonon>` - :doc:`fix phonon <fix_phonon>`
- PACKAGES/phonon - ``PACKAGES/phonon``
- no - no
* - :ref:`PLUGIN <PKG-PLUGIN>` * - :ref:`PLUGIN <PKG-PLUGIN>`
- Plugin loader command - Plugin loader command
@ -381,7 +381,7 @@ whether an extra library is needed to build and use the package:
* - :ref:`PLUMED <PKG-PLUMED>` * - :ref:`PLUMED <PKG-PLUMED>`
- `PLUMED free energy library <https://www.plumed.org>`_ - `PLUMED free energy library <https://www.plumed.org>`_
- :doc:`fix plumed <fix_plumed>` - :doc:`fix plumed <fix_plumed>`
- PACKAGES/plumed - ``PACKAGES/plumed``
- ext - ext
* - :ref:`POEMS <PKG-POEMS>` * - :ref:`POEMS <PKG-POEMS>`
- coupled rigid body motion - coupled rigid body motion
@ -406,7 +406,7 @@ whether an extra library is needed to build and use the package:
* - :ref:`QMMM <PKG-QMMM>` * - :ref:`QMMM <PKG-QMMM>`
- QM/MM coupling - QM/MM coupling
- :doc:`fix qmmm <fix_qmmm>` - :doc:`fix qmmm <fix_qmmm>`
- PACKAGES/qmmm - ``PACKAGES/qmmm``
- ext - ext
* - :ref:`QTB <PKG-QTB>` * - :ref:`QTB <PKG-QTB>`
- quantum nuclear effects - quantum nuclear effects
@ -421,7 +421,7 @@ whether an extra library is needed to build and use the package:
* - :ref:`REACTION <PKG-REACTION>` * - :ref:`REACTION <PKG-REACTION>`
- chemical reactions in classical MD - chemical reactions in classical MD
- :doc:`fix bond/react <fix_bond_react>` - :doc:`fix bond/react <fix_bond_react>`
- PACKAGES/reaction - ``PACKAGES/reaction``
- no - no
* - :ref:`REAXFF <PKG-REAXFF>` * - :ref:`REAXFF <PKG-REAXFF>`
- ReaxFF potential (C/C++) - ReaxFF potential (C/C++)
@ -441,7 +441,7 @@ whether an extra library is needed to build and use the package:
* - :ref:`SCAFACOS <PKG-SCAFACOS>` * - :ref:`SCAFACOS <PKG-SCAFACOS>`
- wrapper for ScaFaCoS Kspace solver - wrapper for ScaFaCoS Kspace solver
- :doc:`kspace_style scafacos <kspace_style>` - :doc:`kspace_style scafacos <kspace_style>`
- PACKAGES/scafacos - ``PACKAGES/scafacos``
- ext - ext
* - :ref:`SHOCK <PKG-SHOCK>` * - :ref:`SHOCK <PKG-SHOCK>`
- shock loading methods - shock loading methods
@ -451,12 +451,12 @@ whether an extra library is needed to build and use the package:
* - :ref:`SMTBQ <PKG-SMTBQ>` * - :ref:`SMTBQ <PKG-SMTBQ>`
- second moment tight binding potentials - second moment tight binding potentials
- pair styles :doc:`smtbq <pair_smtbq>`, :doc:`smatb <pair_smatb>` - pair styles :doc:`smtbq <pair_smtbq>`, :doc:`smatb <pair_smatb>`
- PACKAGES/smtbq - ``PACKAGES/smtbq``
- no - no
* - :ref:`SPH <PKG-SPH>` * - :ref:`SPH <PKG-SPH>`
- smoothed particle hydrodynamics - smoothed particle hydrodynamics
- `SPH User Guide <PDF/SPH_LAMMPS_userguide.pdf>`_ - `SPH User Guide <PDF/SPH_LAMMPS_userguide.pdf>`_
- PACKAGES/sph - ``PACKAGES/sph``
- no - no
* - :ref:`SPIN <PKG-SPIN>` * - :ref:`SPIN <PKG-SPIN>`
- magnetic atomic spin dynamics - magnetic atomic spin dynamics
@ -471,12 +471,12 @@ whether an extra library is needed to build and use the package:
* - :ref:`TALLY <PKG-TALLY>` * - :ref:`TALLY <PKG-TALLY>`
- pairwise tally computes - pairwise tally computes
- :doc:`compute XXX/tally <compute_tally>` - :doc:`compute XXX/tally <compute_tally>`
- PACKAGES/tally - ``PACKAGES/tally``
- no - no
* - :ref:`UEF <PKG-UEF>` * - :ref:`UEF <PKG-UEF>`
- extensional flow - extensional flow
- :doc:`fix nvt/uef <fix_nh_uef>` - :doc:`fix nvt/uef <fix_nh_uef>`
- PACKAGES/uef - ``PACKAGES/uef``
- no - no
* - :ref:`VORONOI <PKG-VORONOI>` * - :ref:`VORONOI <PKG-VORONOI>`
- Voronoi tesselation - Voronoi tesselation
@ -491,7 +491,7 @@ whether an extra library is needed to build and use the package:
* - :ref:`YAFF <PKG-YAFF>` * - :ref:`YAFF <PKG-YAFF>`
- additional styles implemented in YAFF - additional styles implemented in YAFF
- :doc:`angle_style cross <angle_cross>` - :doc:`angle_style cross <angle_cross>`
- PACKAGES/yaff - ``PACKAGES/yaff``
- no - no
.. _MOFplus: https://www.mofplus.org/content/show/MOF-FF .. _MOFplus: https://www.mofplus.org/content/show/MOF-FF

View File

@ -16,7 +16,7 @@ can be handled through the Python exception handling mechanism.
try: try:
# LAMMPS will normally terminate itself and the running process if an error # LAMMPS will normally terminate itself and the running process if an error
# occurs. This would kill the Python interpreter. The library wrapper will # occurs. This would kill the Python interpreter. The library wrapper will
# detect that an error has occured and throw a Python exception # detect that an error has occurred and throw a Python exception
lmp.command('unknown') lmp.command('unknown')
except MPIAbortException as ae: except MPIAbortException as ae:

View File

@ -2,7 +2,7 @@ Neighbor list access
==================== ====================
Access to neighbor lists is handled through a couple of wrapper classes Access to neighbor lists is handled through a couple of wrapper classes
that allows to treat it like either a python list or a NumPy array. The that allows one to treat it like either a python list or a NumPy array. The
access procedure is similar to that of the C-library interface: use one access procedure is similar to that of the C-library interface: use one
of the "find" functions to look up the index of the neighbor list in the of the "find" functions to look up the index of the neighbor list in the
global table of neighbor lists and then get access to the neighbor list global table of neighbor lists and then get access to the neighbor list
@ -79,11 +79,11 @@ potential is shown below.
* :py:meth:`lammps.get_neighlist_element_neighbors()`: Get element in neighbor list and its neighbors * :py:meth:`lammps.get_neighlist_element_neighbors()`: Get element in neighbor list and its neighbors
* :py:meth:`lammps.find_pair_neighlist() <lammps.lammps.find_pair_neighlist()>`: Find neighbor list of pair style * :py:meth:`lammps.find_pair_neighlist() <lammps.lammps.find_pair_neighlist()>`: Find neighbor list of pair style
* :py:meth:`lammps.find_fix_neighlist() <lammps.lammps.find_pair_neighlist()>`: Find neighbor list of pair style * :py:meth:`lammps.find_fix_neighlist() <lammps.lammps.find_pair_neighlist()>`: Find neighbor list of fix style
* :py:meth:`lammps.find_compute_neighlist() <lammps.lammps.find_pair_neighlist()>`: Find neighbor list of pair style * :py:meth:`lammps.find_compute_neighlist() <lammps.lammps.find_pair_neighlist()>`: Find neighbor list of compute style
**NumPy Methods:** **NumPy Methods:**
* :py:meth:`lammps.numpy.get_neighlist() <lammps.numpy_wrapper.numpy_wrapper.get_neighlist()>`: Get neighbor list for given index, which uses NumPy arrays for its element neighbor arrays * :py:meth:`lammps.numpy.get_neighlist() <lammps.numpy_wrapper.numpy_wrapper.get_neighlist()>`: Get neighbor list for given index, which uses NumPy arrays for its element neighbor arrays
* :py:meth:`lammps.numpy.get_neighlist_element_neighbors() <lammps.numpy_wrapper.numpy_wrapper.get_neighlist_element_neighbors()>`: Get element in neighbor list and its neighbors (as numpy array) * :py:meth:`lammps.numpy.get_neighlist_element_neighbors() <lammps.numpy_wrapper.numpy_wrapper.get_neighlist_element_neighbors()>`: Get element in neighbor list and its neighbors (as a numpy array)

View File

@ -23,20 +23,22 @@ passed by all calling processors, to individual atoms, which may be
owned by different processors. owned by different processors.
Note that the data returned by the gather methods, Note that the data returned by the gather methods,
e.g. gather_atoms("x"), is different from the data structure returned e.g. :py:meth:`gather_atoms("x") <lammps.lammps.gather_atoms()>`, is
by extract_atom("x") in four ways. (1) Gather_atoms() returns a different from the data structure returned by
vector which you index as x[i]; extract_atom() returns an array :py:meth:`extract_atom("x") <lammps.lammps.extract_atom()>` in four ways.
which you index as x[i][j]. (2) Gather_atoms() orders the atoms (1) :code:`gather_atoms()` returns a vector which you index as x[i];
by atom ID while extract_atom() does not. (3) Gather_atoms() returns :code:`extract_atom()` returns an array which you index as x[i][j].
a list of all atoms in the simulation; extract_atoms() returns just (2) :code:`gather_atoms()` orders the atoms by atom ID while
the atoms local to each processor. (4) Finally, the gather_atoms() :code:`extract_atom()` does not. (3) :code:`gather_atoms()` returns
a list of all atoms in the simulation; :code:`extract_atoms()` returns just
the atoms local to each processor. (4) Finally, the :code:`gather_atoms()`
data structure is a copy of the atom coords stored internally in data structure is a copy of the atom coords stored internally in
LAMMPS, whereas extract_atom() returns an array that effectively LAMMPS, whereas :code:`extract_atom()` returns an array that effectively
points directly to the internal data. This means you can change points directly to the internal data. This means you can change
values inside LAMMPS from Python by assigning a new values to the values inside LAMMPS from Python by assigning a new values to the
extract_atom() array. To do this with the gather_atoms() vector, you :code:`extract_atom()` array. To do this with the :code:`gather_atoms()` vector, you
need to change values in the vector, then invoke the scatter_atoms() need to change values in the vector, then invoke the
method. :py:meth:`scatter_atoms("x") <lammps.lammps.scatter_atoms()>` method.
For the scatter methods, the array of coordinates passed to must be a For the scatter methods, the array of coordinates passed to must be a
ctypes vector of ints or doubles, allocated and initialized something ctypes vector of ints or doubles, allocated and initialized something

View File

@ -2,8 +2,8 @@ Basics of running LAMMPS
======================== ========================
LAMMPS is run from the command line, reading commands from a file via LAMMPS is run from the command line, reading commands from a file via
the -in command line flag, or from standard input. Using the "-in the ``-in`` command line flag, or from standard input. Using the ``-in
in.file" variant is recommended (see note below). The name of the in.file`` variant is recommended (see note below). The name of the
LAMMPS executable is either ``lmp`` or ``lmp_<machine>`` with LAMMPS executable is either ``lmp`` or ``lmp_<machine>`` with
`<machine>` being the machine string used when compiling LAMMPS. This `<machine>` being the machine string used when compiling LAMMPS. This
is required when compiling LAMMPS with the traditional build system is required when compiling LAMMPS with the traditional build system
@ -35,7 +35,7 @@ executable itself can be placed elsewhere.
form is required. form is required.
As LAMMPS runs it prints info to the screen and a logfile named As LAMMPS runs it prints info to the screen and a logfile named
*log.lammps*\ . More info about output is given on the :doc:`screen and ``log.lammps``. More info about output is given on the :doc:`screen and
logfile output <Run_output>` page. logfile output <Run_output>` page.
If LAMMPS encounters errors in the input script or while running a If LAMMPS encounters errors in the input script or while running a
@ -69,12 +69,12 @@ defaults are often adequate.
For example, it is often important to bind MPI tasks (processes) to For example, it is often important to bind MPI tasks (processes) to
physical cores (processor affinity), so that the operating system does physical cores (processor affinity), so that the operating system does
not migrate them during a simulation. If this is not the default not migrate them during a simulation. If this is not the default
behavior on your machine, the mpirun option "--bind-to core" (OpenMPI) behavior on your machine, the mpirun option ``--bind-to core`` (OpenMPI)
or "-bind-to core" (MPICH) can be used. or ``-bind-to core`` (MPICH) can be used.
If the LAMMPS command(s) you are using support multi-threading, you If the LAMMPS command(s) you are using support multi-threading, you
can set the number of threads per MPI task via the environment can set the number of threads per MPI task via the environment
variable OMP_NUM_THREADS, before you launch LAMMPS: variable ``OMP_NUM_THREADS``, before you launch LAMMPS:
.. code-block:: bash .. code-block:: bash
@ -91,7 +91,7 @@ packages and which commands support multi-threading.
You can experiment with running LAMMPS using any of the input scripts You can experiment with running LAMMPS using any of the input scripts
provided in the examples or bench directory. Input scripts are named provided in the examples or bench directory. Input scripts are named
in.\* and sample outputs are named log.\*.P where P is the number of ``in.*`` and sample outputs are named ``log.*.P`` where P is the number of
processors it was run on. processors it was run on.
Some of the examples or benchmarks require LAMMPS to be built with Some of the examples or benchmarks require LAMMPS to be built with

View File

@ -22,6 +22,7 @@ letter abbreviation can be used:
* :ref:`-ro or -reorder <reorder>` * :ref:`-ro or -reorder <reorder>`
* :ref:`-r2data or -restart2data <restart2data>` * :ref:`-r2data or -restart2data <restart2data>`
* :ref:`-r2dump or -restart2dump <restart2dump>` * :ref:`-r2dump or -restart2dump <restart2dump>`
* :ref:`-r2info or -restart2info <restart2info>`
* :ref:`-sc or -screen <screen>` * :ref:`-sc or -screen <screen>`
* :ref:`-sr or skiprun <skiprun>` * :ref:`-sr or skiprun <skiprun>`
* :ref:`-sf or -suffix <suffix>` * :ref:`-sf or -suffix <suffix>`
@ -274,13 +275,13 @@ impact can be significant, especially for large parallel runs.
Invoke the :doc:`package <package>` command with style and args. The Invoke the :doc:`package <package>` command with style and args. The
syntax is the same as if the command appeared at the top of the input syntax is the same as if the command appeared at the top of the input
script. For example "-package gpu 2" or "-pk gpu 2" is the same as script. For example ``-package gpu 2`` or ``-pk gpu 2`` is the same as
:doc:`package gpu 2 <package>` in the input script. The possible styles :doc:`package gpu 2 <package>` in the input script. The possible styles
and args are documented on the :doc:`package <package>` doc page. This and args are documented on the :doc:`package <package>` doc page. This
switch can be used multiple times, e.g. to set options for the switch can be used multiple times, e.g. to set options for the
INTEL and OPENMP packages which can be used together. INTEL and OPENMP packages which can be used together.
Along with the "-suffix" command-line switch, this is a convenient Along with the ``-suffix`` command-line switch, this is a convenient
mechanism for invoking accelerator packages and their options without mechanism for invoking accelerator packages and their options without
having to edit an input script. having to edit an input script.
@ -299,7 +300,7 @@ specify the number of processors in each partition. Arguments of the
form MxN mean M partitions, each with N processors. Arguments of the form MxN mean M partitions, each with N processors. Arguments of the
form N mean a single partition with N processors. The sum of form N mean a single partition with N processors. The sum of
processors in all partitions must equal P. Thus the command processors in all partitions must equal P. Thus the command
"-partition 8x2 4 5" has 10 partitions and runs on a total of 25 ``-partition 8x2 4 5`` has 10 partitions and runs on a total of 25
processors. processors.
Running with multiple partitions can be useful for running Running with multiple partitions can be useful for running
@ -377,8 +378,8 @@ processors will be in the first partition, the second set in the second
partition. The -reorder command-line switch can alter this so that partition. The -reorder command-line switch can alter this so that
the first N procs in the first partition and one proc in the second partition the first N procs in the first partition and one proc in the second partition
will be ordered consecutively, e.g. as the cores on one physical node. will be ordered consecutively, e.g. as the cores on one physical node.
This can boost performance. For example, if you use "-reorder nth 4" This can boost performance. For example, if you use ``-reorder nth 4``
and "-partition 9 3" and you are running on 12 processors, the and ``-partition 9 3`` and you are running on 12 processors, the
processors will be reordered from processors will be reordered from
.. parsed-literal:: .. parsed-literal::
@ -503,6 +504,37 @@ e.g. the *nfile* and *fileper* keywords. See the
---------- ----------
.. _restart2info:
**-restart2info restartfile keyword ...**
.. versionadded:: TBD
Write out some info about the restart file and and immediately exit.
This is the same operation as if the following 2-line input script were
run:
.. code-block:: LAMMPS
read_restart restartfile
info system group computes fixes
The specified restartfile name may contain the wild-card character "\*".
The restartfile name may also contain the wild-card character "%". The
meaning of these characters is explained on the :doc:`read_restart
<read_restart>` documentation. The use of "%" means that a parallel
restart file can be read. Note that a filename such as file.\* may need
to be enclosed in quotes or the "\*" character prefixed with a backslash
("\") to avoid shell expansion of the "\*" character.
Optional keywords may follow the restartfile argument. These must be
valid keywords for the :doc:`info command <info>`. The most useful
ones - *system*, *group*, *computes*, and *fixes* - are already applied.
Appending keywords like *coeffs* or *communication* may provide
additional useful information stored in the restart file.
----------
.. _screen: .. _screen:
**-screen file** **-screen file**
@ -552,11 +584,11 @@ style that accepts arguments. It allows for two packages to be
specified. The first package specified is the default and will be used specified. The first package specified is the default and will be used
if it is available. If no style is available for the first package, if it is available. If no style is available for the first package,
the style for the second package will be used if available. For the style for the second package will be used if available. For
example, "-suffix hybrid intel omp" will use styles from the example, ``-suffix hybrid intel omp`` will use styles from the
INTEL package if they are installed and available, but styles for INTEL package if they are installed and available, but styles for
the OPENMP package otherwise. the OPENMP package otherwise.
Along with the "-package" command-line switch, this is a convenient Along with the ``-package`` command-line switch, this is a convenient
mechanism for invoking accelerator packages and their options without mechanism for invoking accelerator packages and their options without
having to edit an input script. having to edit an input script.
@ -573,30 +605,30 @@ variant version does not exist, the standard version is created.
For the GPU package, using this command-line switch also invokes the For the GPU package, using this command-line switch also invokes the
default GPU settings, as if the command "package gpu 1" were used at default GPU settings, as if the command "package gpu 1" were used at
the top of your input script. These settings can be changed by using the top of your input script. These settings can be changed by using
the "-package gpu" command-line switch or the :doc:`package gpu <package>` command in your script. the ``-package gpu`` command-line switch or the :doc:`package gpu <package>` command in your script.
For the INTEL package, using this command-line switch also For the INTEL package, using this command-line switch also
invokes the default INTEL settings, as if the command "package invokes the default INTEL settings, as if the command "package
intel 1" were used at the top of your input script. These settings intel 1" were used at the top of your input script. These settings
can be changed by using the "-package intel" command-line switch or can be changed by using the ``-package intel`` command-line switch or
the :doc:`package intel <package>` command in your script. If the the :doc:`package intel <package>` command in your script. If the
OPENMP package is also installed, the hybrid style with "intel omp" OPENMP package is also installed, the hybrid style with "intel omp"
arguments can be used to make the omp suffix a second choice, if a arguments can be used to make the omp suffix a second choice, if a
requested style is not available in the INTEL package. It will requested style is not available in the INTEL package. It will
also invoke the default OPENMP settings, as if the command "package also invoke the default OPENMP settings, as if the command "package
omp 0" were used at the top of your input script. These settings can omp 0" were used at the top of your input script. These settings can
be changed by using the "-package omp" command-line switch or the be changed by using the ``-package omp`` command-line switch or the
:doc:`package omp <package>` command in your script. :doc:`package omp <package>` command in your script.
For the KOKKOS package, using this command-line switch also invokes For the KOKKOS package, using this command-line switch also invokes
the default KOKKOS settings, as if the command "package kokkos" were the default KOKKOS settings, as if the command "package kokkos" were
used at the top of your input script. These settings can be changed used at the top of your input script. These settings can be changed
by using the "-package kokkos" command-line switch or the :doc:`package kokkos <package>` command in your script. by using the ``-package kokkos`` command-line switch or the :doc:`package kokkos <package>` command in your script.
For the OMP package, using this command-line switch also invokes the For the OMP package, using this command-line switch also invokes the
default OMP settings, as if the command "package omp 0" were used at default OMP settings, as if the command "package omp 0" were used at
the top of your input script. These settings can be changed by using the top of your input script. These settings can be changed by using
the "-package omp" command-line switch or the :doc:`package omp <package>` command in your script. the ``-package omp`` command-line switch or the :doc:`package omp <package>` command in your script.
The :doc:`suffix <suffix>` command can also be used within an input The :doc:`suffix <suffix>` command can also be used within an input
script to set a suffix, or to turn off or back on any suffix setting script to set a suffix, or to turn off or back on any suffix setting

View File

@ -15,7 +15,7 @@ The 5 standard problems are as follow:
#. LJ = atomic fluid, Lennard-Jones potential with 2.5 sigma cutoff (55 #. LJ = atomic fluid, Lennard-Jones potential with 2.5 sigma cutoff (55
neighbors per atom), NVE integration neighbors per atom), NVE integration
#. Chain = bead-spring polymer melt of 100-mer chains, FENE bonds and LJ #. Chain = bead-spring polymer melt of 100-mer chains, FENE bonds and LJ
pairwise interactions with a 2\^(1/6) sigma cutoff (5 neighbors per pairwise interactions with a :math:`2^{\frac{1}{6}}` sigma cutoff (5 neighbors per
atom), NVE integration atom), NVE integration
#. EAM = metallic solid, Cu EAM potential with 4.95 Angstrom cutoff (45 #. EAM = metallic solid, Cu EAM potential with 4.95 Angstrom cutoff (45
neighbors per atom), NVE integration neighbors per atom), NVE integration
@ -29,19 +29,19 @@ The 5 standard problems are as follow:
Input files for these 5 problems are provided in the bench directory Input files for these 5 problems are provided in the bench directory
of the LAMMPS distribution. Each has 32,000 atoms and runs for 100 of the LAMMPS distribution. Each has 32,000 atoms and runs for 100
timesteps. The size of the problem (number of atoms) can be varied timesteps. The size of the problem (number of atoms) can be varied
using command-line switches as described in the bench/README file. using command-line switches as described in the ``bench/README`` file.
This is an easy way to test performance and either strong or weak This is an easy way to test performance and either strong or weak
scalability on your machine. scalability on your machine.
The bench directory includes a few log.\* files that show performance The bench directory includes a few ``log.*`` files that show performance
of these 5 problems on 1 or 4 cores of Linux desktop. The bench/FERMI of these 5 problems on 1 or 4 cores of Linux desktop. The ``bench/FERMI``
and bench/KEPLER directories have input files and scripts and instructions and ``bench/KEPLER`` directories have input files and scripts and instructions
for running the same (or similar) problems using OpenMP or GPU or Xeon for running the same (or similar) problems using OpenMP or GPU or Xeon
Phi acceleration options. See the README files in those directories and the Phi acceleration options. See the ``README`` files in those directories and the
:doc:`Accelerator packages <Speed_packages>` pages for instructions on how :doc:`Accelerator packages <Speed_packages>` pages for instructions on how
to build LAMMPS and run on that kind of hardware. to build LAMMPS and run on that kind of hardware.
The bench/POTENTIALS directory has input files which correspond to the The ``bench/POTENTIALS`` directory has input files which correspond to the
table of results on the table of results on the
`Potentials <https://www.lammps.org/bench.html#potentials>`_ section of `Potentials <https://www.lammps.org/bench.html#potentials>`_ section of
the Benchmarks web page. So you can also run those test problems on the Benchmarks web page. So you can also run those test problems on
@ -50,7 +50,7 @@ your machine.
The `billion-atom <https://www.lammps.org/bench.html#billion>`_ section The `billion-atom <https://www.lammps.org/bench.html#billion>`_ section
of the Benchmarks web page has performance data for very large of the Benchmarks web page has performance data for very large
benchmark runs of simple Lennard-Jones (LJ) models, which use the benchmark runs of simple Lennard-Jones (LJ) models, which use the
bench/in.lj input script. ``bench/in.lj`` input script.
---------- ----------

View File

@ -38,10 +38,10 @@ to have an NVIDIA GPU and install the corresponding NVIDIA CUDA
toolkit software on your system (this is only tested on Linux toolkit software on your system (this is only tested on Linux
and unsupported on Windows): and unsupported on Windows):
* Check if you have an NVIDIA GPU: cat /proc/driver/nvidia/gpus/\*/information * Check if you have an NVIDIA GPU: ``cat /proc/driver/nvidia/gpus/\*/information``
* Go to https://developer.nvidia.com/cuda-downloads * Go to https://developer.nvidia.com/cuda-downloads
* Install a driver and toolkit appropriate for your system (SDK is not necessary) * Install a driver and toolkit appropriate for your system (SDK is not necessary)
* Run lammps/lib/gpu/nvc_get_devices (after building the GPU library, see below) to * Run ``lammps/lib/gpu/nvc_get_devices`` (after building the GPU library, see below) to
list supported devices and properties list supported devices and properties
To compile and use this package in OpenCL mode, you currently need To compile and use this package in OpenCL mode, you currently need
@ -51,7 +51,7 @@ installed. There can be multiple of them for the same or different hardware
(GPUs, CPUs, Accelerators) installed at the same time. OpenCL refers to those (GPUs, CPUs, Accelerators) installed at the same time. OpenCL refers to those
as 'platforms'. The GPU library will try to auto-select the best suitable platform, as 'platforms'. The GPU library will try to auto-select the best suitable platform,
but this can be overridden using the platform option of the :doc:`package <package>` but this can be overridden using the platform option of the :doc:`package <package>`
command. run lammps/lib/gpu/ocl_get_devices to get a list of available command. run ``lammps/lib/gpu/ocl_get_devices`` to get a list of available
platforms and devices with a suitable ICD available. platforms and devices with a suitable ICD available.
To compile and use this package for Intel GPUs, OpenCL or the Intel oneAPI To compile and use this package for Intel GPUs, OpenCL or the Intel oneAPI
@ -63,7 +63,7 @@ provides optimized C++, MPI, and many other libraries and tools. See:
If you do not have a discrete GPU card installed, this package can still provide If you do not have a discrete GPU card installed, this package can still provide
significant speedups on some CPUs that include integrated GPUs. Additionally, for significant speedups on some CPUs that include integrated GPUs. Additionally, for
many macs, OpenCL is already included with the OS and Makefiles are available many macs, OpenCL is already included with the OS and Makefiles are available
in the lib/gpu directory. in the ``lib/gpu`` directory.
To compile and use this package in HIP mode, you have to have the AMD ROCm To compile and use this package in HIP mode, you have to have the AMD ROCm
software installed. Versions of ROCm older than 3.5 are currently deprecated software installed. Versions of ROCm older than 3.5 are currently deprecated
@ -94,31 +94,36 @@ shared by 4 MPI tasks.
The GPU package also has limited support for OpenMP for both The GPU package also has limited support for OpenMP for both
multi-threading and vectorization of routines that are run on the CPUs. multi-threading and vectorization of routines that are run on the CPUs.
This requires that the GPU library and LAMMPS are built with flags to This requires that the GPU library and LAMMPS are built with flags to
enable OpenMP support (e.g. -fopenmp). Some styles for time integration enable OpenMP support (e.g. ``-fopenmp``). Some styles for time integration
are also available in the GPU package. These run completely on the CPUs are also available in the GPU package. These run completely on the CPUs
in full double precision, but exploit multi-threading and vectorization in full double precision, but exploit multi-threading and vectorization
for faster performance. for faster performance.
Use the "-sf gpu" :doc:`command-line switch <Run_options>`, which will Use the ``-sf gpu`` :doc:`command-line switch <Run_options>`, which will
automatically append "gpu" to styles that support it. Use the "-pk automatically append "gpu" to styles that support it. Use the ``-pk
gpu Ng" :doc:`command-line switch <Run_options>` to set Ng = # of gpu Ng`` :doc:`command-line switch <Run_options>` to set ``Ng`` = # of
GPUs/node to use. If Ng is 0, the number is selected automatically as GPUs/node to use. If ``Ng`` is 0, the number is selected automatically as
the number of matching GPUs that have the highest number of compute the number of matching GPUs that have the highest number of compute
cores. cores.
.. code-block:: bash .. code-block:: bash
lmp_machine -sf gpu -pk gpu 1 -in in.script # 1 MPI task uses 1 GPU # 1 MPI task uses 1 GPU
mpirun -np 12 lmp_machine -sf gpu -pk gpu 2 -in in.script # 12 MPI tasks share 2 GPUs on a single 16-core (or whatever) node lmp_machine -sf gpu -pk gpu 1 -in in.script
mpirun -np 48 -ppn 12 lmp_machine -sf gpu -pk gpu 2 -in in.script # ditto on 4 16-core nodes
Note that if the "-sf gpu" switch is used, it also issues a default # 12 MPI tasks share 2 GPUs on a single 16-core (or whatever) node
mpirun -np 12 lmp_machine -sf gpu -pk gpu 2 -in in.script
# ditto on 4 16-core nodes
mpirun -np 48 -ppn 12 lmp_machine -sf gpu -pk gpu 2 -in in.script
Note that if the ``-sf gpu`` switch is used, it also issues a default
:doc:`package gpu 0 <package>` command, which will result in :doc:`package gpu 0 <package>` command, which will result in
automatic selection of the number of GPUs to use. automatic selection of the number of GPUs to use.
Using the "-pk" switch explicitly allows for setting of the number of Using the ``-pk`` switch explicitly allows for setting of the number of
GPUs/node to use and additional options. Its syntax is the same as GPUs/node to use and additional options. Its syntax is the same as
the "package gpu" command. See the :doc:`package <package>` the ``package gpu`` command. See the :doc:`package <package>`
command page for details, including the default values used for command page for details, including the default values used for
all its options if it is not specified. all its options if it is not specified.
@ -141,7 +146,7 @@ Use the :doc:`suffix gpu <suffix>` command, or you can explicitly add an
pair_style lj/cut/gpu 2.5 pair_style lj/cut/gpu 2.5
You must also use the :doc:`package gpu <package>` command to enable the You must also use the :doc:`package gpu <package>` command to enable the
GPU package, unless the "-sf gpu" or "-pk gpu" :doc:`command-line switches <Run_options>` were used. It specifies the number of GPU package, unless the ``-sf gpu`` or ``-pk gpu`` :doc:`command-line switches <Run_options>` were used. It specifies the number of
GPUs/node to use, as well as other options. GPUs/node to use, as well as other options.
**Speed-ups to expect:** **Speed-ups to expect:**

View File

@ -41,7 +41,7 @@ precision mode. Performance improvements are shown compared to
LAMMPS *without using other acceleration packages* as these are LAMMPS *without using other acceleration packages* as these are
under active development (and subject to performance changes). The under active development (and subject to performance changes). The
measurements were performed using the input files available in measurements were performed using the input files available in
the src/INTEL/TEST directory with the provided run script. the ``src/INTEL/TEST`` directory with the provided run script.
These are scalable in size; the results given are with 512K These are scalable in size; the results given are with 512K
particles (524K for Liquid Crystal). Most of the simulations are particles (524K for Liquid Crystal). Most of the simulations are
standard LAMMPS benchmarks (indicated by the filename extension in standard LAMMPS benchmarks (indicated by the filename extension in
@ -56,7 +56,7 @@ Results are speedups obtained on Intel Xeon E5-2697v4 processors
Knights Landing), and Intel Xeon Gold 6148 processors (code-named Knights Landing), and Intel Xeon Gold 6148 processors (code-named
Skylake) with "June 2017" LAMMPS built with Intel Parallel Studio Skylake) with "June 2017" LAMMPS built with Intel Parallel Studio
2017 update 2. Results are with 1 MPI task per physical core. See 2017 update 2. Results are with 1 MPI task per physical core. See
*src/INTEL/TEST/README* for the raw simulation rates and ``src/INTEL/TEST/README`` for the raw simulation rates and
instructions to reproduce. instructions to reproduce.
---------- ----------
@ -82,9 +82,9 @@ order of operations compared to LAMMPS without acceleration:
* The *newton* setting applies to all atoms, not just atoms shared * The *newton* setting applies to all atoms, not just atoms shared
between MPI tasks between MPI tasks
* Vectorization can change the order for adding pairwise forces * Vectorization can change the order for adding pairwise forces
* When using the -DLMP_USE_MKL_RNG define (all included intel optimized * When using the ``-DLMP_USE_MKL_RNG`` define (all included intel optimized
makefiles do) at build time, the random number generator for makefiles do) at build time, the random number generator for
dissipative particle dynamics (pair style dpd/intel) uses the Mersenne dissipative particle dynamics (``pair style dpd/intel``) uses the Mersenne
Twister generator included in the Intel MKL library (that should be Twister generator included in the Intel MKL library (that should be
more robust than the default Masaglia random number generator) more robust than the default Masaglia random number generator)
@ -106,36 +106,36 @@ LAMMPS should be built with the INTEL package installed.
Simulations should be run with 1 MPI task per physical *core*, Simulations should be run with 1 MPI task per physical *core*,
not *hardware thread*\ . not *hardware thread*\ .
* Edit src/MAKE/OPTIONS/Makefile.intel_cpu_intelmpi as necessary. * Edit ``src/MAKE/OPTIONS/Makefile.intel_cpu_intelmpi`` as necessary.
* Set the environment variable KMP_BLOCKTIME=0 * Set the environment variable ``KMP_BLOCKTIME=0``
* "-pk intel 0 omp $t -sf intel" added to LAMMPS command-line * ``-pk intel 0 omp $t -sf intel`` added to LAMMPS command-line
* $t should be 2 for Intel Xeon CPUs and 2 or 4 for Intel Xeon Phi * ``$t`` should be 2 for Intel Xeon CPUs and 2 or 4 for Intel Xeon Phi
* For some of the simple 2-body potentials without long-range * For some of the simple 2-body potentials without long-range
electrostatics, performance and scalability can be better with electrostatics, performance and scalability can be better with
the "newton off" setting added to the input script the ``newton off`` setting added to the input script
* For simulations on higher node counts, add "processors \* \* \* grid * For simulations on higher node counts, add ``processors * * * grid
numa" to the beginning of the input script for better scalability numa`` to the beginning of the input script for better scalability
* If using *kspace_style pppm* in the input script, add * If using ``kspace_style pppm`` in the input script, add
"kspace_modify diff ad" for better performance ``kspace_modify diff ad`` for better performance
For Intel Xeon Phi CPUs: For Intel Xeon Phi CPUs:
* Runs should be performed using MCDRAM. * Runs should be performed using MCDRAM.
For simulations using *kspace_style pppm* on Intel CPUs supporting For simulations using ``kspace_style pppm`` on Intel CPUs supporting
AVX-512: AVX-512:
* Add "kspace_modify diff ad" to the input script * Add ``kspace_modify diff ad`` to the input script
* The command-line option should be changed to * The command-line option should be changed to
"-pk intel 0 omp $r lrt yes -sf intel" where $r is the number of ``-pk intel 0 omp $r lrt yes -sf intel`` where ``$r`` is the number of
threads minus 1. threads minus 1.
* Do not use thread affinity (set KMP_AFFINITY=none) * Do not use thread affinity (set ``KMP_AFFINITY=none``)
* The "newton off" setting may provide better scalability * The ``newton off`` setting may provide better scalability
For Intel Xeon Phi co-processors (Offload): For Intel Xeon Phi co-processors (Offload):
* Edit src/MAKE/OPTIONS/Makefile.intel_co-processor as necessary * Edit ``src/MAKE/OPTIONS/Makefile.intel_co-processor`` as necessary
* "-pk intel N omp 1" added to command-line where N is the number of * ``-pk intel N omp 1`` added to command-line where ``N`` is the number of
co-processors per node. co-processors per node.
---------- ----------
@ -209,7 +209,7 @@ See the :ref:`Build extras <intel>` page for
instructions. Some additional details are covered here. instructions. Some additional details are covered here.
For building with make, several example Makefiles for building with For building with make, several example Makefiles for building with
the Intel compiler are included with LAMMPS in the src/MAKE/OPTIONS/ the Intel compiler are included with LAMMPS in the ``src/MAKE/OPTIONS/``
directory: directory:
.. code-block:: bash .. code-block:: bash
@ -239,35 +239,35 @@ However, if you do not have co-processors on your system, building
without offload support will produce a smaller binary. without offload support will produce a smaller binary.
The general requirements for Makefiles with the INTEL package The general requirements for Makefiles with the INTEL package
are as follows. When using Intel compilers, "-restrict" is required are as follows. When using Intel compilers, ``-restrict`` is required
and "-qopenmp" is highly recommended for CCFLAGS and LINKFLAGS. and ``-qopenmp`` is highly recommended for ``CCFLAGS`` and ``LINKFLAGS``.
CCFLAGS should include "-DLMP_INTEL_USELRT" (unless POSIX Threads ``CCFLAGS`` should include ``-DLMP_INTEL_USELRT`` (unless POSIX Threads
are not supported in the build environment) and "-DLMP_USE_MKL_RNG" are not supported in the build environment) and ``-DLMP_USE_MKL_RNG``
(unless Intel Math Kernel Library (MKL) is not available in the build (unless Intel Math Kernel Library (MKL) is not available in the build
environment). For Intel compilers, LIB should include "-ltbbmalloc" environment). For Intel compilers, ``LIB`` should include ``-ltbbmalloc``
or if the library is not available, "-DLMP_INTEL_NO_TBB" can be added or if the library is not available, ``-DLMP_INTEL_NO_TBB`` can be added
to CCFLAGS. For builds supporting offload, "-DLMP_INTEL_OFFLOAD" is to ``CCFLAGS``. For builds supporting offload, ``-DLMP_INTEL_OFFLOAD`` is
required for CCFLAGS and "-qoffload" is required for LINKFLAGS. Other required for ``CCFLAGS`` and ``-qoffload`` is required for ``LINKFLAGS``. Other
recommended CCFLAG options for best performance are "-O2 -fno-alias recommended ``CCFLAG`` options for best performance are ``-O2 -fno-alias
-ansi-alias -qoverride-limits fp-model fast=2 -no-prec-div". -ansi-alias -qoverride-limits fp-model fast=2 -no-prec-div``.
.. note:: .. note::
See the src/INTEL/README file for additional flags that See the ``src/INTEL/README`` file for additional flags that
might be needed for best performance on Intel server processors might be needed for best performance on Intel server processors
code-named "Skylake". code-named "Skylake".
.. note:: .. note::
The vectorization and math capabilities can differ depending on The vectorization and math capabilities can differ depending on
the CPU. For Intel compilers, the "-x" flag specifies the type of the CPU. For Intel compilers, the ``-x`` flag specifies the type of
processor for which to optimize. "-xHost" specifies that the compiler processor for which to optimize. ``-xHost`` specifies that the compiler
should build for the processor used for compiling. For Intel Xeon Phi should build for the processor used for compiling. For Intel Xeon Phi
x200 series processors, this option is "-xMIC-AVX512". For fourth x200 series processors, this option is ``-xMIC-AVX512``. For fourth
generation Intel Xeon (v4/Broadwell) processors, "-xCORE-AVX2" should generation Intel Xeon (v4/Broadwell) processors, ``-xCORE-AVX2`` should
be used. For older Intel Xeon processors, "-xAVX" will perform best be used. For older Intel Xeon processors, ``-xAVX`` will perform best
in general for the different simulations in LAMMPS. The default in general for the different simulations in LAMMPS. The default
in most of the example Makefiles is to use "-xHost", however this in most of the example Makefiles is to use ``-xHost``, however this
should not be used when cross-compiling. should not be used when cross-compiling.
Running LAMMPS with the INTEL package Running LAMMPS with the INTEL package
@ -304,11 +304,11 @@ almost all cases.
uniform. Unless disabled at build time, affinity for MPI tasks and uniform. Unless disabled at build time, affinity for MPI tasks and
OpenMP threads on the host (CPU) will be set by default on the host OpenMP threads on the host (CPU) will be set by default on the host
*when using offload to a co-processor*\ . In this case, it is unnecessary *when using offload to a co-processor*\ . In this case, it is unnecessary
to use other methods to control affinity (e.g. taskset, numactl, to use other methods to control affinity (e.g. ``taskset``, ``numactl``,
I_MPI_PIN_DOMAIN, etc.). This can be disabled with the *no_affinity* ``I_MPI_PIN_DOMAIN``, etc.). This can be disabled with the *no_affinity*
option to the :doc:`package intel <package>` command or by disabling the option to the :doc:`package intel <package>` command or by disabling the
option at build time (by adding -DINTEL_OFFLOAD_NOAFFINITY to the option at build time (by adding ``-DINTEL_OFFLOAD_NOAFFINITY`` to the
CCFLAGS line of your Makefile). Disabling this option is not ``CCFLAGS`` line of your Makefile). Disabling this option is not
recommended, especially when running on a machine with Intel recommended, especially when running on a machine with Intel
Hyper-Threading technology disabled. Hyper-Threading technology disabled.
@ -316,7 +316,7 @@ Run with the INTEL package from the command line
""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""
To enable INTEL optimizations for all available styles used in To enable INTEL optimizations for all available styles used in
the input script, the "-sf intel" :doc:`command-line switch <Run_options>` can be used without any requirement for the input script, the ``-sf intel`` :doc:`command-line switch <Run_options>` can be used without any requirement for
editing the input script. This switch will automatically append editing the input script. This switch will automatically append
"intel" to styles that support it. It also invokes a default command: "intel" to styles that support it. It also invokes a default command:
:doc:`package intel 1 <package>`. This package command is used to set :doc:`package intel 1 <package>`. This package command is used to set
@ -329,15 +329,15 @@ will be used with automatic balancing of work between the CPU and the
co-processor. co-processor.
You can specify different options for the INTEL package by using You can specify different options for the INTEL package by using
the "-pk intel Nphi" :doc:`command-line switch <Run_options>` with the ``-pk intel Nphi`` :doc:`command-line switch <Run_options>` with
keyword/value pairs as specified in the documentation. Here, Nphi = # keyword/value pairs as specified in the documentation. Here, ``Nphi`` = #
of Xeon Phi co-processors/node (ignored without offload of Xeon Phi co-processors/node (ignored without offload
support). Common options to the INTEL package include *omp* to support). Common options to the INTEL package include *omp* to
override any OMP_NUM_THREADS setting and specify the number of OpenMP override any ``OMP_NUM_THREADS`` setting and specify the number of OpenMP
threads, *mode* to set the floating-point precision mode, and *lrt* to threads, *mode* to set the floating-point precision mode, and *lrt* to
enable Long-Range Thread mode as described below. See the :doc:`package intel <package>` command for details, including the default values enable Long-Range Thread mode as described below. See the :doc:`package intel <package>` command for details, including the default values
used for all its options if not specified, and how to set the number used for all its options if not specified, and how to set the number
of OpenMP threads via the OMP_NUM_THREADS environment variable if of OpenMP threads via the ``OMP_NUM_THREADS`` environment variable if
desired. desired.
Examples (see documentation for your MPI/Machine for differences in Examples (see documentation for your MPI/Machine for differences in
@ -345,8 +345,13 @@ launching MPI applications):
.. code-block:: bash .. code-block:: bash
mpirun -np 72 -ppn 36 lmp_machine -sf intel -in in.script # 2 nodes, 36 MPI tasks/node, $OMP_NUM_THREADS OpenMP Threads # 2 nodes, 36 MPI tasks/node, $OMP_NUM_THREADS OpenMP Threads
mpirun -np 72 -ppn 36 lmp_machine -sf intel -in in.script -pk intel 0 omp 2 mode double # Don't use any co-processors that might be available, use 2 OpenMP threads for each task, use double precision mpirun -np 72 -ppn 36 lmp_machine -sf intel -in in.script
# Don't use any co-processors that might be available,
# use 2 OpenMP threads for each task, use double precision
mpirun -np 72 -ppn 36 lmp_machine -sf intel -in in.script \
-pk intel 0 omp 2 mode double
Or run with the INTEL package by editing an input script Or run with the INTEL package by editing an input script
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@ -386,19 +391,19 @@ Long-Range Thread (LRT) mode is an option to the :doc:`package intel <package>`
with SMT. It generates an extra pthread for each MPI task. The thread with SMT. It generates an extra pthread for each MPI task. The thread
is dedicated to performing some of the PPPM calculations and MPI is dedicated to performing some of the PPPM calculations and MPI
communications. This feature requires setting the pre-processor flag communications. This feature requires setting the pre-processor flag
-DLMP_INTEL_USELRT in the makefile when compiling LAMMPS. It is unset ``-DLMP_INTEL_USELRT`` in the makefile when compiling LAMMPS. It is unset
in the default makefiles (\ *Makefile.mpi* and *Makefile.serial*\ ) but in the default makefiles (``Makefile.mpi`` and ``Makefile.serial``) but
it is set in all makefiles tuned for the INTEL package. On Intel it is set in all makefiles tuned for the INTEL package. On Intel
Xeon Phi x200 series CPUs, the LRT feature will likely improve Xeon Phi x200 series CPUs, the LRT feature will likely improve
performance, even on a single node. On Intel Xeon processors, using performance, even on a single node. On Intel Xeon processors, using
this mode might result in better performance when using multiple nodes, this mode might result in better performance when using multiple nodes,
depending on the specific machine configuration. To enable LRT mode, depending on the specific machine configuration. To enable LRT mode,
specify that the number of OpenMP threads is one less than would specify that the number of OpenMP threads is one less than would
normally be used for the run and add the "lrt yes" option to the "-pk" normally be used for the run and add the ``lrt yes`` option to the ``-pk``
command-line suffix or "package intel" command. For example, if a run command-line suffix or "package intel" command. For example, if a run
would normally perform best with "-pk intel 0 omp 4", instead use would normally perform best with "-pk intel 0 omp 4", instead use
"-pk intel 0 omp 3 lrt yes". When using LRT, you should set the ``-pk intel 0 omp 3 lrt yes``. When using LRT, you should set the
environment variable "KMP_AFFINITY=none". LRT mode is not supported environment variable ``KMP_AFFINITY=none``. LRT mode is not supported
when using offload. when using offload.
.. note:: .. note::
@ -411,12 +416,12 @@ Not all styles are supported in the INTEL package. You can mix
the INTEL package with styles from the :doc:`OPT <Speed_opt>` the INTEL package with styles from the :doc:`OPT <Speed_opt>`
package or the :doc:`OPENMP package <Speed_omp>`. Of course, this package or the :doc:`OPENMP package <Speed_omp>`. Of course, this
requires that these packages were installed at build time. This can requires that these packages were installed at build time. This can
performed automatically by using "-sf hybrid intel opt" or "-sf hybrid performed automatically by using ``-sf hybrid intel opt`` or ``-sf hybrid
intel omp" command-line options. Alternatively, the "opt" and "omp" intel omp`` command-line options. Alternatively, the "opt" and "omp"
suffixes can be appended manually in the input script. For the latter, suffixes can be appended manually in the input script. For the latter,
the :doc:`package omp <package>` command must be in the input script or the :doc:`package omp <package>` command must be in the input script or
the "-pk omp Nt" :doc:`command-line switch <Run_options>` must be used the ``-pk omp Nt`` :doc:`command-line switch <Run_options>` must be used
where Nt is the number of OpenMP threads. The number of OpenMP threads where ``Nt`` is the number of OpenMP threads. The number of OpenMP threads
should not be set differently for the different packages. Note that should not be set differently for the different packages. Note that
the :doc:`suffix hybrid intel omp <suffix>` command can also be used the :doc:`suffix hybrid intel omp <suffix>` command can also be used
within the input script to automatically append the "omp" suffix to within the input script to automatically append the "omp" suffix to
@ -436,7 +441,7 @@ alternative to LRT mode and the two cannot be used together.
Currently, when using Intel MPI with Intel Xeon Phi x200 series Currently, when using Intel MPI with Intel Xeon Phi x200 series
CPUs, better performance might be obtained by setting the CPUs, better performance might be obtained by setting the
environment variable "I_MPI_SHM_LMT=shm" for Linux kernels that do environment variable ``I_MPI_SHM_LMT=shm`` for Linux kernels that do
not yet have full support for AVX-512. Runs on Intel Xeon Phi x200 not yet have full support for AVX-512. Runs on Intel Xeon Phi x200
series processors will always perform better using MCDRAM. Please series processors will always perform better using MCDRAM. Please
consult your system documentation for the best approach to specify consult your system documentation for the best approach to specify
@ -515,7 +520,7 @@ per MPI task. Additionally, an offload timing summary is printed at
the end of each run. When offloading, the frequency for :doc:`atom sorting <atom_modify>` is changed to 1 so that the per-atom data is the end of each run. When offloading, the frequency for :doc:`atom sorting <atom_modify>` is changed to 1 so that the per-atom data is
effectively sorted at every rebuild of the neighbor lists. All the effectively sorted at every rebuild of the neighbor lists. All the
available co-processor threads on each Phi will be divided among MPI available co-processor threads on each Phi will be divided among MPI
tasks, unless the *tptask* option of the "-pk intel" :doc:`command-line switch <Run_options>` is used to limit the co-processor threads per tasks, unless the ``tptask`` option of the ``-pk intel`` :doc:`command-line switch <Run_options>` is used to limit the co-processor threads per
MPI task. MPI task.
Restrictions Restrictions

View File

@ -48,7 +48,7 @@ version 23 November 2023 and Kokkos version 4.2.
Kokkos requires using a compiler that supports the c++17 standard. For Kokkos requires using a compiler that supports the c++17 standard. For
some compilers, it may be necessary to add a flag to enable c++17 support. some compilers, it may be necessary to add a flag to enable c++17 support.
For example, the GNU compiler uses the -std=c++17 flag. For a list of For example, the GNU compiler uses the ``-std=c++17`` flag. For a list of
compilers that have been tested with the Kokkos library, see the compilers that have been tested with the Kokkos library, see the
`requirements document of the Kokkos Wiki `requirements document of the Kokkos Wiki
<https://kokkos.github.io/kokkos-core-wiki/requirements.html>`_. <https://kokkos.github.io/kokkos-core-wiki/requirements.html>`_.
@ -111,14 +111,21 @@ for CPU acceleration, assuming one or more 16-core nodes.
.. code-block:: bash .. code-block:: bash
mpirun -np 16 lmp_kokkos_mpi_only -k on -sf kk -in in.lj # 1 node, 16 MPI tasks/node, no multi-threading # 1 node, 16 MPI tasks/node, no multi-threading
mpirun -np 2 -ppn 1 lmp_kokkos_omp -k on t 16 -sf kk -in in.lj # 2 nodes, 1 MPI task/node, 16 threads/task mpirun -np 16 lmp_kokkos_mpi_only -k on -sf kk -in in.lj
mpirun -np 2 lmp_kokkos_omp -k on t 8 -sf kk -in in.lj # 1 node, 2 MPI tasks/node, 8 threads/task
mpirun -np 32 -ppn 4 lmp_kokkos_omp -k on t 4 -sf kk -in in.lj # 8 nodes, 4 MPI tasks/node, 4 threads/task
To run using the KOKKOS package, use the "-k on", "-sf kk" and "-pk # 2 nodes, 1 MPI task/node, 16 threads/task
kokkos" :doc:`command-line switches <Run_options>` in your mpirun mpirun -np 2 -ppn 1 lmp_kokkos_omp -k on t 16 -sf kk -in in.lj
command. You must use the "-k on" :doc:`command-line switch <Run_options>` to enable the KOKKOS package. It takes
# 1 node, 2 MPI tasks/node, 8 threads/task
mpirun -np 2 lmp_kokkos_omp -k on t 8 -sf kk -in in.lj
# 8 nodes, 4 MPI tasks/node, 4 threads/task
mpirun -np 32 -ppn 4 lmp_kokkos_omp -k on t 4 -sf kk -in in.lj
To run using the KOKKOS package, use the ``-k on``, ``-sf kk`` and ``-pk
kokkos`` :doc:`command-line switches <Run_options>` in your ``mpirun``
command. You must use the ``-k on`` :doc:`command-line switch <Run_options>` to enable the KOKKOS package. It takes
additional arguments for hardware settings appropriate to your system. additional arguments for hardware settings appropriate to your system.
For OpenMP use: For OpenMP use:
@ -126,18 +133,18 @@ For OpenMP use:
-k on t Nt -k on t Nt
The "t Nt" option specifies how many OpenMP threads per MPI task to The ``t Nt`` option specifies how many OpenMP threads per MPI task to
use with a node. The default is Nt = 1, which is MPI-only mode. Note use with a node. The default is ``Nt`` = 1, which is MPI-only mode. Note
that the product of MPI tasks \* OpenMP threads/task should not exceed that the product of MPI tasks \* OpenMP threads/task should not exceed
the physical number of cores (on a node), otherwise performance will the physical number of cores (on a node), otherwise performance will
suffer. If Hyper-Threading (HT) is enabled, then the product of MPI suffer. If Hyper-Threading (HT) is enabled, then the product of MPI
tasks \* OpenMP threads/task should not exceed the physical number of tasks \* OpenMP threads/task should not exceed the physical number of
cores \* hardware threads. The "-k on" switch also issues a cores \* hardware threads. The ``-k on`` switch also issues a
"package kokkos" command (with no additional arguments) which sets ``package kokkos`` command (with no additional arguments) which sets
various KOKKOS options to default values, as discussed on the various KOKKOS options to default values, as discussed on the
:doc:`package <package>` command doc page. :doc:`package <package>` command doc page.
The "-sf kk" :doc:`command-line switch <Run_options>` will automatically The ``-sf kk`` :doc:`command-line switch <Run_options>` will automatically
append the "/kk" suffix to styles that support it. In this manner no append the "/kk" suffix to styles that support it. In this manner no
modification to the input script is needed. Alternatively, one can run modification to the input script is needed. Alternatively, one can run
with the KOKKOS package by editing the input script as described with the KOKKOS package by editing the input script as described
@ -146,20 +153,22 @@ below.
.. note:: .. note::
When using a single OpenMP thread, the Kokkos Serial back end (i.e. When using a single OpenMP thread, the Kokkos Serial back end (i.e.
Makefile.kokkos_mpi_only) will give better performance than the OpenMP ``Makefile.kokkos_mpi_only``) will give better performance than the OpenMP
back end (i.e. Makefile.kokkos_omp) because some of the overhead to make back end (i.e. ``Makefile.kokkos_omp``) because some of the overhead to make
the code thread-safe is removed. the code thread-safe is removed.
.. note:: .. note::
Use the "-pk kokkos" :doc:`command-line switch <Run_options>` to Use the ``-pk kokkos`` :doc:`command-line switch <Run_options>` to
change the default :doc:`package kokkos <package>` options. See its doc change the default :doc:`package kokkos <package>` options. See its doc
page for details and default settings. Experimenting with its options page for details and default settings. Experimenting with its options
can provide a speed-up for specific calculations. For example: can provide a speed-up for specific calculations. For example:
.. code-block:: bash .. code-block:: bash
mpirun -np 16 lmp_kokkos_mpi_only -k on -sf kk -pk kokkos newton on neigh half comm no -in in.lj # Newton on, Half neighbor list, non-threaded comm # Newton on, Half neighbor list, non-threaded comm
mpirun -np 16 lmp_kokkos_mpi_only -k on -sf kk \
-pk kokkos newton on neigh half comm no -in in.lj
If the :doc:`newton <newton>` command is used in the input If the :doc:`newton <newton>` command is used in the input
script, it can also override the Newton flag defaults. script, it can also override the Newton flag defaults.
@ -172,7 +181,7 @@ small numbers of threads (i.e. 8 or less) but does increase memory
footprint and is not scalable to large numbers of threads. An footprint and is not scalable to large numbers of threads. An
alternative to data duplication is to use thread-level atomic operations alternative to data duplication is to use thread-level atomic operations
which do not require data duplication. The use of atomic operations can which do not require data duplication. The use of atomic operations can
be enforced by compiling LAMMPS with the "-DLMP_KOKKOS_USE_ATOMICS" be enforced by compiling LAMMPS with the ``-DLMP_KOKKOS_USE_ATOMICS``
pre-processor flag. Most but not all Kokkos-enabled pair_styles support pre-processor flag. Most but not all Kokkos-enabled pair_styles support
data duplication. Alternatively, full neighbor lists avoid the need for data duplication. Alternatively, full neighbor lists avoid the need for
duplication or atomic operations but require more compute operations per duplication or atomic operations but require more compute operations per
@ -190,10 +199,13 @@ they do not migrate during a simulation.
If you are not certain MPI tasks are being bound (check the defaults If you are not certain MPI tasks are being bound (check the defaults
for your MPI installation), binding can be forced with these flags: for your MPI installation), binding can be forced with these flags:
.. parsed-literal:: .. code-block:: bash
OpenMPI 1.8: mpirun -np 2 --bind-to socket --map-by socket ./lmp_openmpi ... # OpenMPI 1.8
Mvapich2 2.0: mpiexec -np 2 --bind-to socket --map-by socket ./lmp_mvapich ... mpirun -np 2 --bind-to socket --map-by socket ./lmp_openmpi ...
# Mvapich2 2.0
mpiexec -np 2 --bind-to socket --map-by socket ./lmp_mvapich ...
For binding threads with KOKKOS OpenMP, use thread affinity environment For binding threads with KOKKOS OpenMP, use thread affinity environment
variables to force binding. With OpenMP 3.1 (gcc 4.7 or later, intel 12 variables to force binding. With OpenMP 3.1 (gcc 4.7 or later, intel 12
@ -222,15 +234,24 @@ Examples of mpirun commands that follow these rules are shown below.
.. code-block:: bash .. code-block:: bash
# Running on an Intel KNL node with 68 cores (272 threads/node via 4x hardware threading): # Running on an Intel KNL node with 68 cores
mpirun -np 64 lmp_kokkos_phi -k on t 4 -sf kk -in in.lj # 1 node, 64 MPI tasks/node, 4 threads/task # (272 threads/node via 4x hardware threading):
mpirun -np 66 lmp_kokkos_phi -k on t 4 -sf kk -in in.lj # 1 node, 66 MPI tasks/node, 4 threads/task
mpirun -np 32 lmp_kokkos_phi -k on t 8 -sf kk -in in.lj # 1 node, 32 MPI tasks/node, 8 threads/task
mpirun -np 512 -ppn 64 lmp_kokkos_phi -k on t 4 -sf kk -in in.lj # 8 nodes, 64 MPI tasks/node, 4 threads/task
The -np setting of the mpirun command sets the number of MPI # 1 node, 64 MPI tasks/node, 4 threads/task
tasks/node. The "-k on t Nt" command-line switch sets the number of mpirun -np 64 lmp_kokkos_phi -k on t 4 -sf kk -in in.lj
threads/task as Nt. The product of these two values should be N, i.e.
# 1 node, 66 MPI tasks/node, 4 threads/task
mpirun -np 66 lmp_kokkos_phi -k on t 4 -sf kk -in in.lj
# 1 node, 32 MPI tasks/node, 8 threads/task
mpirun -np 32 lmp_kokkos_phi -k on t 8 -sf kk -in in.lj
# 8 nodes, 64 MPI tasks/node, 4 threads/task
mpirun -np 512 -ppn 64 lmp_kokkos_phi -k on t 4 -sf kk -in in.lj
The ``-np`` setting of the mpirun command sets the number of MPI
tasks/node. The ``-k on t Nt`` command-line switch sets the number of
threads/task as ``Nt``. The product of these two values should be N, i.e.
256 or 264. 256 or 264.
.. note:: .. note::
@ -240,7 +261,7 @@ threads/task as Nt. The product of these two values should be N, i.e.
flag to "on" for both pairwise and bonded interactions. This will flag to "on" for both pairwise and bonded interactions. This will
typically be best for many-body potentials. For simpler pairwise typically be best for many-body potentials. For simpler pairwise
potentials, it may be faster to use a "full" neighbor list with potentials, it may be faster to use a "full" neighbor list with
Newton flag to "off". Use the "-pk kokkos" :doc:`command-line switch Newton flag to "off". Use the ``-pk kokkos`` :doc:`command-line switch
<Run_options>` to change the default :doc:`package kokkos <package>` <Run_options>` to change the default :doc:`package kokkos <package>`
options. See its documentation page for details and default options. See its documentation page for details and default
settings. Experimenting with its options can provide a speed-up for settings. Experimenting with its options can provide a speed-up for
@ -248,8 +269,12 @@ threads/task as Nt. The product of these two values should be N, i.e.
.. code-block:: bash .. code-block:: bash
mpirun -np 64 lmp_kokkos_phi -k on t 4 -sf kk -pk kokkos comm host -in in.reax # Newton on, half neighbor list, threaded comm # Newton on, half neighbor list, threaded comm
mpirun -np 64 lmp_kokkos_phi -k on t 4 -sf kk -pk kokkos newton off neigh full comm no -in in.lj # Newton off, full neighbor list, non-threaded comm mpirun -np 64 lmp_kokkos_phi -k on t 4 -sf kk -pk kokkos comm host -in in.reax
# Newton off, full neighbor list, non-threaded comm
mpirun -np 64 lmp_kokkos_phi -k on t 4 -sf kk \
-pk kokkos newton off neigh full comm no -in in.lj
.. note:: .. note::
@ -266,8 +291,8 @@ threads/task as Nt. The product of these two values should be N, i.e.
Running on GPUs Running on GPUs
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
Use the "-k" :doc:`command-line switch <Run_options>` to specify the Use the ``-k`` :doc:`command-line switch <Run_options>` to specify the
number of GPUs per node. Typically the -np setting of the mpirun command number of GPUs per node. Typically the ``-np`` setting of the ``mpirun`` command
should set the number of MPI tasks/node to be equal to the number of should set the number of MPI tasks/node to be equal to the number of
physical GPUs on the node. You can assign multiple MPI tasks to the same physical GPUs on the node. You can assign multiple MPI tasks to the same
GPU with the KOKKOS package, but this is usually only faster if some GPU with the KOKKOS package, but this is usually only faster if some
@ -290,8 +315,11 @@ one or more nodes, each with two GPUs:
.. code-block:: bash .. code-block:: bash
mpirun -np 2 lmp_kokkos_cuda_openmpi -k on g 2 -sf kk -in in.lj # 1 node, 2 MPI tasks/node, 2 GPUs/node # 1 node, 2 MPI tasks/node, 2 GPUs/node
mpirun -np 32 -ppn 2 lmp_kokkos_cuda_openmpi -k on g 2 -sf kk -in in.lj # 16 nodes, 2 MPI tasks/node, 2 GPUs/node (32 GPUs total) mpirun -np 2 lmp_kokkos_cuda_openmpi -k on g 2 -sf kk -in in.lj
# 16 nodes, 2 MPI tasks/node, 2 GPUs/node (32 GPUs total)
mpirun -np 32 -ppn 2 lmp_kokkos_cuda_openmpi -k on g 2 -sf kk -in in.lj
.. note:: .. note::
@ -303,7 +331,7 @@ one or more nodes, each with two GPUs:
neighbor lists and setting the Newton flag to "on" may be faster. For neighbor lists and setting the Newton flag to "on" may be faster. For
many pair styles, setting the neighbor binsize equal to twice the CPU many pair styles, setting the neighbor binsize equal to twice the CPU
default value will give speedup, which is the default when running on default value will give speedup, which is the default when running on
GPUs. Use the "-pk kokkos" :doc:`command-line switch <Run_options>` GPUs. Use the ``-pk kokkos`` :doc:`command-line switch <Run_options>`
to change the default :doc:`package kokkos <package>` options. See to change the default :doc:`package kokkos <package>` options. See
its documentation page for details and default its documentation page for details and default
settings. Experimenting with its options can provide a speed-up for settings. Experimenting with its options can provide a speed-up for
@ -311,7 +339,9 @@ one or more nodes, each with two GPUs:
.. code-block:: bash .. code-block:: bash
mpirun -np 2 lmp_kokkos_cuda_openmpi -k on g 2 -sf kk -pk kokkos newton on neigh half binsize 2.8 -in in.lj # Newton on, half neighbor list, set binsize = neighbor ghost cutoff # Newton on, half neighbor list, set binsize = neighbor ghost cutoff
mpirun -np 2 lmp_kokkos_cuda_openmpi -k on g 2 -sf kk \
-pk kokkos newton on neigh half binsize 2.8 -in in.lj
.. note:: .. note::
@ -329,7 +359,7 @@ one or more nodes, each with two GPUs:
more), the creation of the atom map (required for molecular systems) more), the creation of the atom map (required for molecular systems)
on the GPU can slow down significantly or run out of GPU memory and on the GPU can slow down significantly or run out of GPU memory and
thus slow down the whole calculation or cause a crash. You can use thus slow down the whole calculation or cause a crash. You can use
the "-pk kokkos atom/map no" :doc:`command-line switch <Run_options>` the ``-pk kokkos atom/map no`` :doc:`command-line switch <Run_options>`
of the :doc:`package kokkos atom/map no <package>` command to create of the :doc:`package kokkos atom/map no <package>` command to create
the atom map on the CPU instead. the atom map on the CPU instead.
@ -346,20 +376,20 @@ one or more nodes, each with two GPUs:
.. note:: .. note::
To get an accurate timing breakdown between time spend in pair, To get an accurate timing breakdown between time spend in pair,
kspace, etc., you must set the environment variable CUDA_LAUNCH_BLOCKING=1. kspace, etc., you must set the environment variable ``CUDA_LAUNCH_BLOCKING=1``.
However, this will reduce performance and is not recommended for production runs. However, this will reduce performance and is not recommended for production runs.
Run with the KOKKOS package by editing an input script Run with the KOKKOS package by editing an input script
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alternatively the effect of the "-sf" or "-pk" switches can be Alternatively the effect of the ``-sf`` or ``-pk`` switches can be
duplicated by adding the :doc:`package kokkos <package>` or :doc:`suffix kk <suffix>` commands to your input script. duplicated by adding the :doc:`package kokkos <package>` or :doc:`suffix kk <suffix>` commands to your input script.
The discussion above for building LAMMPS with the KOKKOS package, the The discussion above for building LAMMPS with the KOKKOS package, the
``mpirun`` or ``mpiexec`` command, and setting appropriate thread ``mpirun`` or ``mpiexec`` command, and setting appropriate thread
properties are the same. properties are the same.
You must still use the "-k on" :doc:`command-line switch <Run_options>` You must still use the ``-k on`` :doc:`command-line switch <Run_options>`
to enable the KOKKOS package, and specify its additional arguments for to enable the KOKKOS package, and specify its additional arguments for
hardware options appropriate to your system, as documented above. hardware options appropriate to your system, as documented above.
@ -378,7 +408,7 @@ wish to change any of its option defaults, as set by the "-k on"
With the KOKKOS package, both OpenMP multi-threading and GPUs can be With the KOKKOS package, both OpenMP multi-threading and GPUs can be
compiled and used together in a few special cases. In the makefile for compiled and used together in a few special cases. In the makefile for
the conventional build, the KOKKOS_DEVICES variable must include both, the conventional build, the ``KOKKOS_DEVICES`` variable must include both,
"Cuda" and "OpenMP", as is the case for ``/src/MAKE/OPTIONS/Makefile.kokkos_cuda_mpi``. "Cuda" and "OpenMP", as is the case for ``/src/MAKE/OPTIONS/Makefile.kokkos_cuda_mpi``.
.. code-block:: bash .. code-block:: bash
@ -390,14 +420,14 @@ in the ``kokkos-cuda.cmake`` CMake preset file.
.. code-block:: bash .. code-block:: bash
cmake ../cmake -DKokkos_ENABLE_CUDA=yes -DKokkos_ENABLE_OPENMP=yes cmake -DKokkos_ENABLE_CUDA=yes -DKokkos_ENABLE_OPENMP=yes ../cmake
The suffix "/kk" is equivalent to "/kk/device", and for Kokkos CUDA, The suffix "/kk" is equivalent to "/kk/device", and for Kokkos CUDA,
using the "-sf kk" in the command line gives the default CUDA version using the ``-sf kk`` in the command line gives the default CUDA version
everywhere. However, if the "/kk/host" suffix is added to a specific everywhere. However, if the "/kk/host" suffix is added to a specific
style in the input script, the Kokkos OpenMP (CPU) version of that style in the input script, the Kokkos OpenMP (CPU) version of that
specific style will be used instead. Set the number of OpenMP threads specific style will be used instead. Set the number of OpenMP threads
as "t Nt" and the number of GPUs as "g Ng" as ``t Nt`` and the number of GPUs as ``g Ng``
.. parsed-literal:: .. parsed-literal::
@ -409,7 +439,7 @@ For example, the command to run with 1 GPU and 8 OpenMP threads is then:
mpiexec -np 1 lmp_kokkos_cuda_openmpi -in in.lj -k on g 1 t 8 -sf kk mpiexec -np 1 lmp_kokkos_cuda_openmpi -in in.lj -k on g 1 t 8 -sf kk
Conversely, if the "-sf kk/host" is used in the command line and then Conversely, if the ``-sf kk/host`` is used in the command line and then
the "/kk" or "/kk/device" suffix is added to a specific style in your the "/kk" or "/kk/device" suffix is added to a specific style in your
input script, then only that specific style will run on the GPU while input script, then only that specific style will run on the GPU while
everything else will run on the CPU in OpenMP mode. Note that the everything else will run on the CPU in OpenMP mode. Note that the
@ -418,11 +448,11 @@ special case:
A kspace style and/or molecular topology (bonds, angles, etc.) running A kspace style and/or molecular topology (bonds, angles, etc.) running
on the host CPU can overlap with a pair style running on the on the host CPU can overlap with a pair style running on the
GPU. First compile with "--default-stream per-thread" added to CCFLAGS GPU. First compile with ``--default-stream per-thread`` added to ``CCFLAGS``
in the Kokkos CUDA Makefile. Then explicitly use the "/kk/host" in the Kokkos CUDA Makefile. Then explicitly use the "/kk/host"
suffix for kspace and bonds, angles, etc. in the input file and the suffix for kspace and bonds, angles, etc. in the input file and the
"kk" suffix (equal to "kk/device") on the command line. Also make "kk" suffix (equal to "kk/device") on the command line. Also make
sure the environment variable CUDA_LAUNCH_BLOCKING is not set to "1" sure the environment variable ``CUDA_LAUNCH_BLOCKING`` is not set to "1"
so CPU/GPU overlap can occur. so CPU/GPU overlap can occur.
Performance to expect Performance to expect

View File

@ -28,32 +28,39 @@ These examples assume one or more 16-core nodes.
.. code-block:: bash .. code-block:: bash
env OMP_NUM_THREADS=16 lmp_omp -sf omp -in in.script # 1 MPI task, 16 threads according to OMP_NUM_THREADS # 1 MPI task, 16 threads according to OMP_NUM_THREADS
lmp_mpi -sf omp -in in.script # 1 MPI task, no threads, optimized kernels env OMP_NUM_THREADS=16 lmp_omp -sf omp -in in.script
mpirun -np 4 lmp_omp -sf omp -pk omp 4 -in in.script # 4 MPI tasks, 4 threads/task
mpirun -np 32 -ppn 4 lmp_omp -sf omp -pk omp 4 -in in.script # 8 nodes, 4 MPI tasks/node, 4 threads/task # 1 MPI task, no threads, optimized kernels
lmp_mpi -sf omp -in in.script
# 4 MPI tasks, 4 threads/task
mpirun -np 4 lmp_omp -sf omp -pk omp 4 -in in.script
# 8 nodes, 4 MPI tasks/node, 4 threads/task
mpirun -np 32 -ppn 4 lmp_omp -sf omp -pk omp 4 -in in.script
The ``mpirun`` or ``mpiexec`` command sets the total number of MPI tasks The ``mpirun`` or ``mpiexec`` command sets the total number of MPI tasks
used by LAMMPS (one or multiple per compute node) and the number of MPI used by LAMMPS (one or multiple per compute node) and the number of MPI
tasks used per node. E.g. the mpirun command in MPICH does this via tasks used per node. E.g. the mpirun command in MPICH does this via
its -np and -ppn switches. Ditto for OpenMPI via -np and -npernode. its ``-np`` and ``-ppn`` switches. Ditto for OpenMPI via ``-np`` and ``-npernode``.
You need to choose how many OpenMP threads per MPI task will be used You need to choose how many OpenMP threads per MPI task will be used
by the OPENMP package. Note that the product of MPI tasks \* by the OPENMP package. Note that the product of MPI tasks \*
threads/task should not exceed the physical number of cores (on a threads/task should not exceed the physical number of cores (on a
node), otherwise performance will suffer. node), otherwise performance will suffer.
As in the lines above, use the "-sf omp" :doc:`command-line switch <Run_options>`, which will automatically append "omp" to As in the lines above, use the ``-sf omp`` :doc:`command-line switch <Run_options>`, which will automatically append "omp" to
styles that support it. The "-sf omp" switch also issues a default styles that support it. The ``-sf omp`` switch also issues a default
:doc:`package omp 0 <package>` command, which will set the number of :doc:`package omp 0 <package>` command, which will set the number of
threads per MPI task via the OMP_NUM_THREADS environment variable. threads per MPI task via the ``OMP_NUM_THREADS`` environment variable.
You can also use the "-pk omp Nt" :doc:`command-line switch <Run_options>`, to explicitly set Nt = # of OpenMP threads You can also use the ``-pk omp Nt`` :doc:`command-line switch <Run_options>`, to explicitly set ``Nt`` = # of OpenMP threads
per MPI task to use, as well as additional options. Its syntax is the per MPI task to use, as well as additional options. Its syntax is the
same as the :doc:`package omp <package>` command whose page gives same as the :doc:`package omp <package>` command whose page gives
details, including the default values used if it is not specified. It details, including the default values used if it is not specified. It
also gives more details on how to set the number of threads via the also gives more details on how to set the number of threads via the
OMP_NUM_THREADS environment variable. ``OMP_NUM_THREADS`` environment variable.
Or run with the OPENMP package by editing an input script Or run with the OPENMP package by editing an input script
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@ -71,7 +78,7 @@ Use the :doc:`suffix omp <suffix>` command, or you can explicitly add an
You must also use the :doc:`package omp <package>` command to enable the You must also use the :doc:`package omp <package>` command to enable the
OPENMP package. When you do this you also specify how many threads OPENMP package. When you do this you also specify how many threads
per MPI task to use. The command page explains other options and per MPI task to use. The command page explains other options and
how to set the number of threads via the OMP_NUM_THREADS environment how to set the number of threads via the ``OMP_NUM_THREADS`` environment
variable. variable.
Speed-up to expect Speed-up to expect

View File

@ -80,23 +80,30 @@ it provides, follow these general steps. Details vary from package to
package and are explained in the individual accelerator doc pages, package and are explained in the individual accelerator doc pages,
listed above: listed above:
+--------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+ +-----------------------------------------------------------+---------------------------------------------+
| build the accelerator library | only for GPU package | | build the accelerator library | only for GPU package |
+--------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+ +-----------------------------------------------------------+---------------------------------------------+
| install the accelerator package | make yes-opt, make yes-intel, etc | | install the accelerator package | ``make yes-opt``, ``make yes-intel``, etc |
+--------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+ +-----------------------------------------------------------+---------------------------------------------+
| add compile/link flags to Makefile.machine in src/MAKE | only for INTEL, KOKKOS, OPENMP, OPT packages | | add compile/link flags to ``Makefile.machine`` | only for INTEL, KOKKOS, OPENMP, |
+--------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+ | in ``src/MAKE`` | OPT packages |
| re-build LAMMPS | make machine | +-----------------------------------------------------------+---------------------------------------------+
+--------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+ | re-build LAMMPS | ``make machine`` |
| prepare and test a regular LAMMPS simulation | lmp_machine -in in.script; mpirun -np 32 lmp_machine -in in.script | +-----------------------------------------------------------+---------------------------------------------+
+--------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+ | prepare and test a regular LAMMPS simulation | ``lmp_machine -in in.script;`` |
| enable specific accelerator support via '-k on' :doc:`command-line switch <Run_options>`, | only needed for KOKKOS package | | | ``mpirun -np 32 lmp_machine -in in.script`` |
+--------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+ +-----------------------------------------------------------+---------------------------------------------+
| set any needed options for the package via "-pk" :doc:`command-line switch <Run_options>` or :doc:`package <package>` command, | only if defaults need to be changed | | enable specific accelerator support via ``-k on`` | only needed for KOKKOS package |
+--------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+ | :doc:`command-line switch <Run_options>` | |
| use accelerated styles in your input via "-sf" :doc:`command-line switch <Run_options>` or :doc:`suffix <suffix>` command | lmp_machine -in in.script -sf gpu | +-----------------------------------------------------------+---------------------------------------------+
+--------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+ | set any needed options for the package via ``-pk`` | only if defaults need to be changed |
| :doc:`command-line switch <Run_options>` or | |
| :doc:`package <package>` command | |
+-----------------------------------------------------------+---------------------------------------------+
| use accelerated styles in your input via ``-sf`` | ``lmp_machine -in in.script -sf gpu`` |
| :doc:`command-line switch <Run_options>` or | |
| :doc:`suffix <suffix>` command | |
+-----------------------------------------------------------+---------------------------------------------+
Note that the first 4 steps can be done as a single command with Note that the first 4 steps can be done as a single command with
suitable make command invocations. This is discussed on the suitable make command invocations. This is discussed on the

View File

@ -58,6 +58,7 @@ Pre-processing tools
* :ref:`polybond <polybond>` * :ref:`polybond <polybond>`
* :ref:`stl_bin2txt <stlconvert>` * :ref:`stl_bin2txt <stlconvert>`
* :ref:`tabulate <tabulate>` * :ref:`tabulate <tabulate>`
* :ref:`tinker <tinker>`
Post-processing tools Post-processing tools
===================== =====================
@ -97,6 +98,7 @@ Miscellaneous tools
* :ref:`Offline build tool <offline>` * :ref:`Offline build tool <offline>`
* :ref:`singularity/apptainer <singularity_tool>` * :ref:`singularity/apptainer <singularity_tool>`
* :ref:`SWIG interface <swig>` * :ref:`SWIG interface <swig>`
* :ref:`valgrind <valgrind>`
* :ref:`vim <vim>` * :ref:`vim <vim>`
---------- ----------
@ -109,7 +111,7 @@ Tool descriptions
amber2lmp tool amber2lmp tool
-------------------------- --------------------------
The amber2lmp subdirectory contains two Python scripts for converting The amber2lmp subdirectory contains three Python scripts for converting
files back-and-forth between the AMBER MD code and LAMMPS. See the files back-and-forth between the AMBER MD code and LAMMPS. See the
README file in amber2lmp for more information. README file in amber2lmp for more information.
@ -302,7 +304,7 @@ The parameters for Cr were taken from:
Lin Z B, Johnson R A and Zhigilei L V, Phys. Rev. B 77 214108 (2008). Lin Z B, Johnson R A and Zhigilei L V, Phys. Rev. B 77 214108 (2008).
The Python version of the tool was authored by Germain Clavier The Python version of the tool was authored by Germain Clavier
(TU Eindhoven) g.m.g.c.clavier at tue.nl or germain.clavier at gmail.com (Unicaen) germain.clavier at unicaen.fr
.. note:: .. note::
@ -1210,6 +1212,33 @@ included. See the README file for more information.
---------- ----------
.. _tinker:
tinker tool
--------------
The ``tinker`` folder contains Python scripts scripts to convert Tinker input
files to LAMMPS.
See the README file for more information.
Those scripts were written by Steve Plimpton sjplimp at gmail.com
----------
.. _valgrind:
valgrind tool
-------------
The ``valgrind`` folder contains additional suppressions fur LAMMPS when using
valgrind's memcheck tool to search for memory access violation and memory
leaks. These suppressions are automatically invoked when running tests through
CMake "ctest -T memcheck". See the provided README file to add these
suppressions when running LAMMPS.
----------
.. _vim: .. _vim:
vim tool vim tool

View File

@ -49,7 +49,7 @@ angle.
The torque on the dipole can be obtained by differentiating the The torque on the dipole can be obtained by differentiating the
potential using the 'chain rule' as in appendix C.3 of potential using the 'chain rule' as in appendix C.3 of
:ref:`(Allen) <Allen1>`: :ref:`(AllenTildesley) <Allen1>`:
.. math:: .. math::
@ -129,5 +129,5 @@ lipid membranes, PloS ONE 6(12): e28637, 2011.
.. _Allen1: .. _Allen1:
**(Allen)** Allen & Tildesley, Computer Simulation of Liquids, **(AllenTildesley)** Allen & Tildesley, Computer Simulation of Liquids,
Clarendon Press, Oxford, 1987. Clarendon Press, Oxford, 1987.

View File

@ -52,7 +52,7 @@ file; angle coefficients need to be re-specified.
exist between 3 bonded atoms. exist between 3 bonded atoms.
In the formulas listed for each angle style, *theta* is the angle In the formulas listed for each angle style, *theta* is the angle
between the 3 atoms in the angle. between the three atoms in the angle.
---------- ----------

View File

@ -68,7 +68,7 @@ must be set before this command can be invoked.
The table of the angle energy and force data data is created by using a The table of the angle energy and force data data is created by using a
separate, internally created, new LAMMPS instance with a dummy system of separate, internally created, new LAMMPS instance with a dummy system of
3 atoms for which the angle potential energy is computed after 3 atoms for which the angle potential energy is computed after
transferring the angle style and coefficients and arranging the 3 atoms transferring the angle style and coefficients and arranging the three atoms
into the corresponding geometries. The angle force is then determined into the corresponding geometries. The angle force is then determined
from the potential energies through numerical differentiation. As a from the potential energies through numerical differentiation. As a
consequence of this approach, not all angle styles are compatible. The consequence of this approach, not all angle styles are compatible. The

View File

@ -34,7 +34,7 @@ Syntax
- internal_energy : total internal energy (potential + thermal) per unit volume - internal_energy : total internal energy (potential + thermal) per unit volume
- energy : total energy (potential + kinetic) per unit volume - energy : total energy (potential + kinetic) per unit volume
- number_density : number of atoms per unit volume - number_density : number of atoms per unit volume
- eshelby_stress : configurational stress (energy-momentum) tensor defined by [Eshelby]_ - eshelby_stress : configurational stress (energy-momentum) tensor defined by :ref:`(Eshelby) <Eshelby1>`
- vacancy_concentration : volume fraction of vacancy content - vacancy_concentration : volume fraction of vacancy content
- type_concentration : volume fraction of a specific atom type - type_concentration : volume fraction of a specific atom type
@ -83,4 +83,6 @@ By default, no fields are output.
References References
"""""""""" """"""""""
.. [Eshelby] J.D. Eshelby, Philos. Trans. Royal Soc. London A, Math. Phys. Sci., Vol. 244, No. 877 (1951) pp. 87-112; J. Elasticity, Vol. 5, Nos. 3-4 (1975) pp. 321-335] .. _Eshelby1:
**(Eshelby)** J.D. Eshelby, Philos. Trans. Royal Soc. London A, Math. Phys. Sci., Vol. 244, No. 877 (1951) pp. 87-112; J. Elasticity, Vol. 5, Nos. 3-4 (1975) pp. 321-335]

View File

@ -32,7 +32,7 @@ Syntax
- internal_energy : total internal energy (potential + thermal) per unit volume - internal_energy : total internal energy (potential + thermal) per unit volume
- energy : total energy (potential + kinetic) per unit volume - energy : total energy (potential + kinetic) per unit volume
- number_density : number of atoms per unit volume - number_density : number of atoms per unit volume
- eshelby_stress : configurational stress (energy-momentum) tensor defined by [Eshelby]_ - eshelby_stress : configurational stress (energy-momentum) tensor defined by :ref:`(Eshelby) <Eshelby3>`
- vacancy_concentration : volume fraction of vacancy content - vacancy_concentration : volume fraction of vacancy content
- type_concentration : volume fraction of a specific atom type - type_concentration : volume fraction of a specific atom type
@ -72,3 +72,10 @@ Default
""""""" """""""
None. None.
References
""""""""""
.. _Eshelby3:
**(Eshelby)** J.D. Eshelby, Philos. Trans. Royal Soc. London A, Math. Phys. Sci., Vol. 244, No. 877 (1951) pp. 87-112; J. Elasticity, Vol. 5, Nos. 3-4 (1975) pp. 321-335]

View File

@ -32,7 +32,7 @@ Syntax
- internal_energy : total internal energy (potential + thermal) per unit volume - internal_energy : total internal energy (potential + thermal) per unit volume
- energy : total energy (potential + kinetic) per unit volume - energy : total energy (potential + kinetic) per unit volume
- number_density : number of atoms per unit volume - number_density : number of atoms per unit volume
- eshelby_stress : configurational stress (energy-momentum) tensor defined by [Eshelby]_ - eshelby_stress : configurational stress (energy-momentum) tensor defined by :ref:`(Eshelby) <Eshelby2>`
- vacancy_concentration : volume fraction of vacancy content - vacancy_concentration : volume fraction of vacancy content
- type_concentration : volume fraction of a specific atom type - type_concentration : volume fraction of a specific atom type
@ -72,3 +72,10 @@ Default
""""""" """""""
None. None.
References
""""""""""
.. _Eshelby2:
**(Eshelby)** J.D. Eshelby, Philos. Trans. Royal Soc. London A, Math. Phys. Sci., Vol. 244, No. 877 (1951) pp. 87-112; J. Elasticity, Vol. 5, Nos. 3-4 (1975) pp. 321-335]

View File

@ -103,7 +103,7 @@ the Additional Information section below.
.. list-table:: .. list-table::
:header-rows: 1 :header-rows: 1
:widths: auto :widths: 12 28 18 32
* - Atom style * - Atom style
- Attributes - Attributes
@ -419,7 +419,7 @@ showing the use of the *template* atom style versus *molecular*.
<molecule>` that contains multiple molecules, you should ensure the <molecule>` that contains multiple molecules, you should ensure the
atom types, bond types, angle_types, etc in all the molecules are atom types, bond types, angle_types, etc in all the molecules are
consistent. E.g. if one molecule represents H2O and another CO2, consistent. E.g. if one molecule represents H2O and another CO2,
then you probably do not want each molecule file to define 2 atom then you probably do not want each molecule file to define two atom
types and a single bond type, because they will conflict with each types and a single bond type, because they will conflict with each
other when a mixture system of H2O and CO2 molecules is defined, other when a mixture system of H2O and CO2 molecules is defined,
e.g. by the :doc:`read_data <read_data>` command. Rather the H2O e.g. by the :doc:`read_data <read_data>` command. Rather the H2O

View File

@ -19,10 +19,10 @@ Syntax
* N = prepare data for output every this many timesteps * N = prepare data for output every this many timesteps
* attributes = zero or more of the below attributes may be appended * attributes = zero or more of the below attributes may be appended
*id1, id2* = IDs of 2 atoms in the bond *id1, id2* = IDs of two atoms in the bond
*time* = the timestep the bond broke *time* = the timestep the bond broke
*x, y, z* = the center of mass position of the 2 atoms when the bond broke (distance units) *x, y, z* = the center of mass position of the two atoms when the bond broke (distance units)
*x/ref, y/ref, z/ref* = the initial center of mass position of the 2 atoms (distance units) *x/ref, y/ref, z/ref* = the initial center of mass position of the two atoms (distance units)
*overlay/pair* value = *yes* or *no* *overlay/pair* value = *yes* or *no*
bonded particles will still interact with pair forces bonded particles will still interact with pair forces

View File

@ -19,10 +19,10 @@ Syntax
* N = prepare data for output every this many timesteps * N = prepare data for output every this many timesteps
* attributes = zero or more of the below attributes may be appended * attributes = zero or more of the below attributes may be appended
*id1, id2* = IDs of 2 atoms in the bond *id1, id2* = IDs of two atoms in the bond
*time* = the timestep the bond broke *time* = the timestep the bond broke
*x, y, z* = the center of mass position of the 2 atoms when the bond broke (distance units) *x, y, z* = the center of mass position of the two atoms when the bond broke (distance units)
*x/ref, y/ref, z/ref* = the initial center of mass position of the 2 atoms (distance units) *x/ref, y/ref, z/ref* = the initial center of mass position of the two atoms (distance units)
*overlay/pair* value = *yes* or *no* *overlay/pair* value = *yes* or *no*
bonded particles will still interact with pair forces bonded particles will still interact with pair forces

Some files were not shown because too many files have changed in this diff Show More