From ec6d3586ce30a4fd62562272b264c6ad9453c567 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 13 Jun 2020 01:09:30 -0400 Subject: [PATCH 01/27] require at least python 3.5 for building docs and import CMake improvements from progguide branch --- cmake/Modules/Documentation.cmake | 37 ++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/cmake/Modules/Documentation.cmake b/cmake/Modules/Documentation.cmake index 929d6ebd4b..1381e4fef0 100644 --- a/cmake/Modules/Documentation.cmake +++ b/cmake/Modules/Documentation.cmake @@ -2,10 +2,19 @@ # Build documentation ############################################################################### option(BUILD_DOC "Build LAMMPS HTML documentation" OFF) -if(BUILD_DOC) - find_package(PythonInterp 3 REQUIRED) - set(VIRTUALENV ${PYTHON_EXECUTABLE} -m virtualenv) +if(BUILD_DOC) + # Sphinx 3.x requires at least Python 3.5 + if(CMAKE_VERSION VERSION_LESS 3.12) + find_package(PythonInterp 3.5 REQUIRED) + set(VIRTUALENV ${PYTHON_EXECUTABLE} -m virtualenv -p ${PYTHON_EXECUTABLE}) + else() + find_package(Python3 REQUIRED COMPONENTS Interpreter) + if(Python3_VERSION VERSION_LESS 3.5) + message(FATAL_ERROR "Python 3.5 and up is required to build the HTML documentation") + endif() + set(VIRTUALENV ${Python3_EXECUTABLE} -m virtualenv -p ${Python3_EXECUTABLE}) + endif() file(GLOB DOC_SOURCES ${LAMMPS_DOC_DIR}/src/[^.]*.rst) @@ -25,11 +34,10 @@ if(BUILD_DOC) ) # download mathjax distribution and unpack to folder "mathjax" - file(DOWNLOAD "https://github.com/mathjax/MathJax/archive/3.0.5.tar.gz" - "${CMAKE_CURRENT_BINARY_DIR}/mathjax.tar.gz" - EXPECTED_MD5 5d9d3799cce77a1a95eee6be04eb68e7) - - if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/mathjax) + if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/mathjax/es5) + file(DOWNLOAD "https://github.com/mathjax/MathJax/archive/3.0.5.tar.gz" + "${CMAKE_CURRENT_BINARY_DIR}/mathjax.tar.gz" + EXPECTED_MD5 5d9d3799cce77a1a95eee6be04eb68e7) execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf mathjax.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) file(GLOB MATHJAX_VERSION_DIR ${CMAKE_CURRENT_BINARY_DIR}/MathJax-*) execute_process(COMMAND ${CMAKE_COMMAND} -E rename ${MATHJAX_VERSION_DIR} ${CMAKE_CURRENT_BINARY_DIR}/mathjax) @@ -37,11 +45,18 @@ if(BUILD_DOC) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/_static/mathjax) file(COPY ${CMAKE_CURRENT_BINARY_DIR}/mathjax/es5 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/html/_static/mathjax/) + # for increased browser compatibility + if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/html/_static/polyfill.js) + file(DOWNLOAD "https://polyfill.io/v3/polyfill.min.js?features=es6" + "${CMAKE_CURRENT_BINARY_DIR}/html/_static/polyfill.js") + endif() + # note, this may run in parallel with other tasks, so we must not use multiple processes here add_custom_command( OUTPUT html DEPENDS ${DOC_SOURCES} docenv requirements.txt COMMAND ${DOCENV_BINARY_DIR}/sphinx-build -b html -c ${LAMMPS_DOC_DIR}/utils/sphinx-config -d ${CMAKE_BINARY_DIR}/doctrees ${LAMMPS_DOC_DIR}/src html + COMMAND ${CMAKE_COMMAND} -E create_symlink Manual.html ${CMAKE_CURRENT_BINARY_DIR}/html/index.html ) # copy selected image files to html output tree @@ -56,17 +71,17 @@ if(BUILD_DOC) set(HTML_IMAGE_TARGETS "") foreach(_IMG ${HTML_EXTRA_IMAGES}) string(PREPEND _IMG JPG/) - list(APPEND HTML_IMAGE_TARGETS "html/${_IMG}") + list(APPEND HTML_IMAGE_TARGETS "${CMAKE_CURRENT_BINARY_DIR}/html/${_IMG}") add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/${_IMG} - DEPENDS ${LAMMPS_DOC_DIR}/src/${_IMG} html/JPG + DEPENDS ${LAMMPS_DOC_DIR}/src/${_IMG} ${CMAKE_CURRENT_BINARY_DIR}/html/JPG COMMAND ${CMAKE_COMMAND} -E copy ${LAMMPS_DOC_DIR}/src/${_IMG} ${CMAKE_BINARY_DIR}/html/${_IMG} ) endforeach() add_custom_target( doc ALL - DEPENDS html html/_static/mathjax/es5 ${HTML_IMAGE_TARGETS} + DEPENDS html ${CMAKE_CURRENT_BINARY_DIR}/html/_static/mathjax/es5 ${HTML_IMAGE_TARGETS} SOURCES ${LAMMPS_DOC_DIR}/utils/requirements.txt ${DOC_SOURCES} ) From 8d5452d653d47a6bef3d5f09462133e6121fe741 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 12 Jun 2020 23:55:18 -0400 Subject: [PATCH 02/27] must use fabs() instead of abs() on floating point values. update cauchystat example logs --- ...at.g++.1 => log.2Jun2020.cauchystat.g++.1} | 79 +++++++++---------- src/USER-MISC/fix_npt_cauchy.cpp | 2 +- 2 files changed, 40 insertions(+), 41 deletions(-) rename examples/USER/misc/cauchy/{log.9Jan2020.cauchystat.g++.1 => log.2Jun2020.cauchystat.g++.1} (65%) diff --git a/examples/USER/misc/cauchy/log.9Jan2020.cauchystat.g++.1 b/examples/USER/misc/cauchy/log.2Jun2020.cauchystat.g++.1 similarity index 65% rename from examples/USER/misc/cauchy/log.9Jan2020.cauchystat.g++.1 rename to examples/USER/misc/cauchy/log.2Jun2020.cauchystat.g++.1 index 0ca25b1a95..68677ba33e 100644 --- a/examples/USER/misc/cauchy/log.9Jan2020.cauchystat.g++.1 +++ b/examples/USER/misc/cauchy/log.2Jun2020.cauchystat.g++.1 @@ -1,5 +1,4 @@ -LAMMPS (09 Jan 2020) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:93) +LAMMPS (2 Jun 2020) using 1 OpenMP thread(s) per MPI task units metal atom_style atomic @@ -14,11 +13,11 @@ lattice fcc 4.05 Lattice spacing in x,y,z = 4.05 4.05 4.05 region simbox prism 0 5 0 5 0 5 0 0 0 units lattice create_box 2 simbox -Created triclinic box = (0 0 0) to (20.25 20.25 20.25) with tilt (0 0 0) +Created triclinic box = (0.0 0.0 0.0) to (20.25 20.25 20.25) with tilt (0.0 0.0 0.0) 1 by 1 by 1 MPI processor grid create_atoms 2 box Created 500 atoms - create_atoms CPU = 0.000987053 secs + create_atoms CPU = 0.000 seconds # Atomic mass: mass 1 58.69 @@ -93,21 +92,21 @@ Step Temp Pxx Pyy Pzz Pxy Pxz Pyz 700 466.86592 5224.2421 4121.434 4368.4226 230.85768 -65.765274 -1271.8354 800 491.38828 -233.79818 2799.6028 5023.998 919.08469 -411.66796 422.33219 900 473.16465 6486.5426 4028.6955 2503.9771 451.96928 1309.8322 -557.83472 - 1000 472.85932 4303.6923 4674.969 5268.2263 94.551286 1425.2222 -1352.0883 -Loop time of 1.24705 on 1 procs for 1000 steps with 500 atoms + 1000 472.85932 4303.6923 4674.969 5268.2263 94.551283 1425.2222 -1352.0883 +Loop time of 0.667831 on 1 procs for 1000 steps with 500 atoms -Performance: 138.567 ns/day, 0.173 hours/ns, 801.892 timesteps/s -94.0% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 258.748 ns/day, 0.093 hours/ns, 1497.385 timesteps/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 1.112 | 1.112 | 1.112 | 0.0 | 89.17 -Neigh | 0.063329 | 0.063329 | 0.063329 | 0.0 | 5.08 -Comm | 0.01994 | 0.01994 | 0.01994 | 0.0 | 1.60 -Output | 0.0014246 | 0.0014246 | 0.0014246 | 0.0 | 0.11 -Modify | 0.045429 | 0.045429 | 0.045429 | 0.0 | 3.64 -Other | | 0.004881 | | | 0.39 +Pair | 0.60535 | 0.60535 | 0.60535 | 0.0 | 90.64 +Neigh | 0.031207 | 0.031207 | 0.031207 | 0.0 | 4.67 +Comm | 0.0072828 | 0.0072828 | 0.0072828 | 0.0 | 1.09 +Output | 0.00013593 | 0.00013593 | 0.00013593 | 0.0 | 0.02 +Modify | 0.021677 | 0.021677 | 0.021677 | 0.0 | 3.25 +Other | | 0.002176 | | | 0.33 Nlocal: 500 ave 500 max 500 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -130,43 +129,43 @@ Using fix npt/cauchy with alpha=0.001000 run 1000 Per MPI rank memory allocation (min/avg/max) = 4.056 | 4.056 | 4.056 Mbytes Step Temp Pxx Pyy Pzz Pxy Pxz Pyz - 1000 472.85932 4303.6923 4674.969 5268.2263 94.551286 1425.2222 -1352.0883 - 1100 471.04772 5593.1614 5874.9867 3608.9922 -1861.938 459.86813 -813.36882 - 1200 473.34727 2337.4765 2050.4694 4330.2198 -3590.2198 -1285.2197 748.05137 - 1300 465.46145 4909.5722 2880.9183 4995.0091 -2860.6934 -895.40937 -382.07531 - 1400 508.53262 92.57534 3722.1136 557.50974 -3121.7615 349.6147 194.5089 - 1500 498.34579 -5755.2352 -3798.1466 -1445.2047 -3218.0887 1733.9103 -555.96371 - 1600 546.45882 -257.80132 407.73403 -39.803803 -3578.1137 1438.3526 -1710.3139 - 1700 570.72785 -2951.9658 -622.89945 1138.4113 -4573.7982 -984.65235 2906.3144 - 1800 650.75622 6086.1524 1111.2919 1726.5115 -3504.716 1140.9767 414.81284 - 1900 690.32264 2763.2044 -609.41535 289.85307 -3788.8761 -1306.8569 760.00116 - 2000 724.01451 -675.72484 522.04263 -468.58167 -6603.3906 -1712.7317 47.61212 -Loop time of 1.27211 on 1 procs for 1000 steps with 500 atoms + 1000 472.85932 4303.6923 4674.969 5268.2263 94.551283 1425.2222 -1352.0883 + 1100 471.04772 5593.1614 5874.9866 3608.9922 -1861.938 459.86813 -813.36883 + 1200 473.34727 2337.4765 2050.4694 4330.2198 -3590.2197 -1285.2197 748.05138 + 1300 465.46146 4909.5722 2880.9183 4995.0092 -2860.6934 -895.40937 -382.07529 + 1400 508.53262 92.575576 3722.114 557.50955 -3121.7616 349.61453 194.50883 + 1500 498.3458 -5755.2341 -3798.1481 -1445.2041 -3218.0889 1733.9101 -555.96313 + 1600 546.45888 -257.8015 407.74313 -39.808565 -3578.1152 1438.3545 -1710.3112 + 1700 570.72803 -2951.9777 -622.89115 1138.4111 -4573.8049 -984.65144 2906.3201 + 1800 650.7567 6086.093 1111.3418 1726.5919 -3504.6481 1140.9639 414.77939 + 1900 690.31291 2762.9298 -609.22637 289.53512 -3788.5686 -1307.3139 759.83909 + 2000 724.0376 -676.49959 522.5367 -468.29812 -6602.9226 -1712.1389 46.769914 +Loop time of 0.665662 on 1 procs for 1000 steps with 500 atoms -Performance: 135.837 ns/day, 0.177 hours/ns, 786.093 timesteps/s -93.9% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 259.591 ns/day, 0.092 hours/ns, 1502.265 timesteps/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 1.0529 | 1.0529 | 1.0529 | 0.0 | 82.77 -Neigh | 0.13671 | 0.13671 | 0.13671 | 0.0 | 10.75 -Comm | 0.018747 | 0.018747 | 0.018747 | 0.0 | 1.47 -Output | 0.00075722 | 0.00075722 | 0.00075722 | 0.0 | 0.06 -Modify | 0.057984 | 0.057984 | 0.057984 | 0.0 | 4.56 -Other | | 0.00499 | | | 0.39 +Pair | 0.56182 | 0.56182 | 0.56182 | 0.0 | 84.40 +Neigh | 0.069662 | 0.069662 | 0.069662 | 0.0 | 10.47 +Comm | 0.0090612 | 0.0090612 | 0.0090612 | 0.0 | 1.36 +Output | 0.00015483 | 0.00015483 | 0.00015483 | 0.0 | 0.02 +Modify | 0.02264 | 0.02264 | 0.02264 | 0.0 | 3.40 +Other | | 0.00232 | | | 0.35 Nlocal: 500 ave 500 max 500 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 2040 ave 2040 max 2040 min +Nghost: 2044 ave 2044 max 2044 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 23757 ave 23757 max 23757 min +Neighs: 23800 ave 23800 max 23800 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 23757 -Ave neighs/atom = 47.514 -Neighbor list builds = 78 +Total # of neighbors = 23800 +Ave neighs/atom = 47.6 +Neighbor list builds = 77 Dangerous builds = 0 -Total wall time: 0:00:02 +Total wall time: 0:00:01 diff --git a/src/USER-MISC/fix_npt_cauchy.cpp b/src/USER-MISC/fix_npt_cauchy.cpp index 7a4a34bd00..c01d809c15 100644 --- a/src/USER-MISC/fix_npt_cauchy.cpp +++ b/src/USER-MISC/fix_npt_cauchy.cpp @@ -2538,7 +2538,7 @@ void FixNPTCauchy::CauchyStat_init() invH0(2,1)=0.0; invH0(2,2)=h_inv[1]; invH0(2,3)=h_inv[3]; invH0(3,1)=0.0; invH0(3,2)=0.0; invH0(3,3)=h_inv[2]; - CSvol0 = abs(MathExtra::det3(H0)); //find reference volume + CSvol0 = fabs(MathExtra::det3(H0)); //find reference volume #undef H0 #undef invH0 From 00ebbb311aa89339bfe849c6434a4348bc03e633 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 12 Jun 2020 14:28:19 -0400 Subject: [PATCH 03/27] whitespace fixes --- src/GPU/Install.sh | 2 +- src/USER-OMP/pair_born_coul_msm_omp.h | 2 +- src/USER-OMP/pair_buck_coul_msm_omp.h | 2 +- src/USER-OMP/pair_coul_msm_omp.h | 2 +- src/USER-OMP/pair_lj_charmm_coul_msm_omp.h | 2 +- src/USER-OMP/pair_lj_cut_coul_msm_omp.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/GPU/Install.sh b/src/GPU/Install.sh index 419e44e41f..243c15bef2 100755 --- a/src/GPU/Install.sh +++ b/src/GPU/Install.sh @@ -172,7 +172,7 @@ elif (test $1 = 0) then if (test -e ../Makefile.package) then sed -i -e 's/[^ \t]*gpu[^ \t]* //' ../Makefile.package fi - + if (test -e ../Makefile.package.settings) then sed -i -e '/^include.*gpu.*$/d' ../Makefile.package.settings fi diff --git a/src/USER-OMP/pair_born_coul_msm_omp.h b/src/USER-OMP/pair_born_coul_msm_omp.h index 09cd1deacb..ab6c32b0e7 100644 --- a/src/USER-OMP/pair_born_coul_msm_omp.h +++ b/src/USER-OMP/pair_born_coul_msm_omp.h @@ -53,4 +53,4 @@ E: Must use 'kspace_modify pressure/scalar no' with OMP MSM Pair styles The kspace scalar pressure option is not (yet) compatible with OMP MSM Pair styles. -*/ \ No newline at end of file +*/ diff --git a/src/USER-OMP/pair_buck_coul_msm_omp.h b/src/USER-OMP/pair_buck_coul_msm_omp.h index 07fd57b654..990a092911 100644 --- a/src/USER-OMP/pair_buck_coul_msm_omp.h +++ b/src/USER-OMP/pair_buck_coul_msm_omp.h @@ -53,4 +53,4 @@ E: Must use 'kspace_modify pressure/scalar no' with OMP MSM Pair styles The kspace scalar pressure option is not (yet) compatible with OMP MSM Pair styles. -*/ \ No newline at end of file +*/ diff --git a/src/USER-OMP/pair_coul_msm_omp.h b/src/USER-OMP/pair_coul_msm_omp.h index 29e4632c66..41054cd661 100644 --- a/src/USER-OMP/pair_coul_msm_omp.h +++ b/src/USER-OMP/pair_coul_msm_omp.h @@ -53,4 +53,4 @@ E: Must use 'kspace_modify pressure/scalar no' with OMP MSM Pair styles The kspace scalar pressure option is not (yet) compatible with OMP MSM Pair styles. -*/ \ No newline at end of file +*/ diff --git a/src/USER-OMP/pair_lj_charmm_coul_msm_omp.h b/src/USER-OMP/pair_lj_charmm_coul_msm_omp.h index 907912b138..5a153f081e 100644 --- a/src/USER-OMP/pair_lj_charmm_coul_msm_omp.h +++ b/src/USER-OMP/pair_lj_charmm_coul_msm_omp.h @@ -53,4 +53,4 @@ E: Must use 'kspace_modify pressure/scalar no' with OMP MSM Pair styles The kspace scalar pressure option is not (yet) compatible with OMP MSM Pair styles. -*/ \ No newline at end of file +*/ diff --git a/src/USER-OMP/pair_lj_cut_coul_msm_omp.h b/src/USER-OMP/pair_lj_cut_coul_msm_omp.h index 181c4627b8..e496d133f6 100644 --- a/src/USER-OMP/pair_lj_cut_coul_msm_omp.h +++ b/src/USER-OMP/pair_lj_cut_coul_msm_omp.h @@ -53,4 +53,4 @@ E: Must use 'kspace_modify pressure/scalar no' with OMP MSM Pair styles The kspace scalar pressure option is not (yet) compatible with OMP MSM Pair styles. -*/ \ No newline at end of file +*/ From e0062866033ef254b66d88be4c804515cd68eb1d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 12 Jun 2020 12:05:33 -0400 Subject: [PATCH 04/27] rather than forcing tcp communication for OpenMPI, we disable infiniband instead for better stability of tests --- tools/singularity/centos7.def | 4 ++-- tools/singularity/centos8.def | 4 ++-- tools/singularity/fedora32_mingw.def | 4 ++-- tools/singularity/ubuntu16.04.def | 4 ++-- tools/singularity/ubuntu18.04.def | 4 ++-- tools/singularity/ubuntu18.04_amd_rocm.def | 4 ++-- tools/singularity/ubuntu18.04_gpu.def | 4 ++-- tools/singularity/ubuntu18.04_intel_opencl.def | 4 ++-- tools/singularity/ubuntu18.04_nvidia.def | 4 ++-- tools/singularity/ubuntu20.04.def | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tools/singularity/centos7.def b/tools/singularity/centos7.def index 5369c6977b..7cd38af13e 100644 --- a/tools/singularity/centos7.def +++ b/tools/singularity/centos7.def @@ -79,8 +79,8 @@ EOF # load MPI by default . /etc/profile module load mpi - # restrict OpenMPI to shared memory comm by default - OMPI_MCA_btl="tcp,self" + # tell OpenMPI to not try using Infiniband + OMPI_MCA_btl="^openib" # do not warn about unused components as this messes up testing OMPI_MCA_btl_base_warn_component_unused="0" export OMPI_MCA_btl OMPI_MCA_btl_base_warn_component_unused diff --git a/tools/singularity/centos8.def b/tools/singularity/centos8.def index d2eba155ec..930ad5a909 100644 --- a/tools/singularity/centos8.def +++ b/tools/singularity/centos8.def @@ -84,8 +84,8 @@ EOF # load MPI by default . /etc/profile module load mpi - # restrict OpenMPI to shared memory comm by default - OMPI_MCA_btl="tcp,self" + # tell OpenMPI to not try using Infiniband + OMPI_MCA_btl="^openib" # do not warn about unused components as this messes up testing OMPI_MCA_btl_base_warn_component_unused="0" export OMPI_MCA_btl OMPI_MCA_btl_base_warn_component_unused diff --git a/tools/singularity/fedora32_mingw.def b/tools/singularity/fedora32_mingw.def index 6eb1944ec2..3ddb75e14d 100644 --- a/tools/singularity/fedora32_mingw.def +++ b/tools/singularity/fedora32_mingw.def @@ -85,8 +85,8 @@ EOF # load MPI by default . /etc/profile module load mpi - # restrict OpenMPI to shared memory comm by default - OMPI_MCA_btl="tcp,self" + # tell OpenMPI to not try using Infiniband + OMPI_MCA_btl="^openib" # do not warn about unused components as this messes up testing OMPI_MCA_btl_base_warn_component_unused="0" export OMPI_MCA_btl OMPI_MCA_btl_base_warn_component_unused diff --git a/tools/singularity/ubuntu16.04.def b/tools/singularity/ubuntu16.04.def index 7f8e3a6b0d..b6c02f78fa 100644 --- a/tools/singularity/ubuntu16.04.def +++ b/tools/singularity/ubuntu16.04.def @@ -28,8 +28,8 @@ EOF %environment LC_ALL=C export LC_ALL - # restrict OpenMPI to shared memory comm by default - OMPI_MCA_btl="tcp,self" + # tell OpenMPI to not try using Infiniband + OMPI_MCA_btl="^openib" # do not warn about unused components as this messes up testing OMPI_MCA_btl_base_warn_component_unused="0" export OMPI_MCA_btl OMPI_MCA_btl_base_warn_component_unused diff --git a/tools/singularity/ubuntu18.04.def b/tools/singularity/ubuntu18.04.def index bfc598b157..fbff214251 100644 --- a/tools/singularity/ubuntu18.04.def +++ b/tools/singularity/ubuntu18.04.def @@ -103,8 +103,8 @@ EOF LC_ALL=C export LC_ALL export PATH=/usr/lib/ccache:$PATH - # restrict OpenMPI to shared memory comm by default - OMPI_MCA_btl="tcp,self" + # tell OpenMPI to not try using Infiniband + OMPI_MCA_btl="^openib" # do not warn about unused components as this messes up testing OMPI_MCA_btl_base_warn_component_unused="0" export OMPI_MCA_btl OMPI_MCA_btl_base_warn_component_unused diff --git a/tools/singularity/ubuntu18.04_amd_rocm.def b/tools/singularity/ubuntu18.04_amd_rocm.def index 538d9ee772..df7d5be062 100644 --- a/tools/singularity/ubuntu18.04_amd_rocm.def +++ b/tools/singularity/ubuntu18.04_amd_rocm.def @@ -89,8 +89,8 @@ EOF %environment LC_ALL=C export LC_ALL - # restrict OpenMPI to shared memory comm by default - OMPI_MCA_btl="tcp,self" + # tell OpenMPI to not try using Infiniband + OMPI_MCA_btl="^openib" # do not warn about unused components as this messes up testing OMPI_MCA_btl_base_warn_component_unused="0" export OMPI_MCA_btl OMPI_MCA_btl_base_warn_component_unused diff --git a/tools/singularity/ubuntu18.04_gpu.def b/tools/singularity/ubuntu18.04_gpu.def index b06cb08b74..e08e5b5f84 100644 --- a/tools/singularity/ubuntu18.04_gpu.def +++ b/tools/singularity/ubuntu18.04_gpu.def @@ -116,8 +116,8 @@ EOF %environment LC_ALL=C export LC_ALL - # restrict OpenMPI to shared memory comm by default - OMPI_MCA_btl="tcp,self" + # tell OpenMPI to not try using Infiniband + OMPI_MCA_btl="^openib" # do not warn about unused components as this messes up testing OMPI_MCA_btl_base_warn_component_unused="0" export OMPI_MCA_btl OMPI_MCA_btl_base_warn_component_unused diff --git a/tools/singularity/ubuntu18.04_intel_opencl.def b/tools/singularity/ubuntu18.04_intel_opencl.def index 39842764c4..b60da61b91 100644 --- a/tools/singularity/ubuntu18.04_intel_opencl.def +++ b/tools/singularity/ubuntu18.04_intel_opencl.def @@ -82,8 +82,8 @@ EOF %environment LC_ALL=C export LC_ALL - # restrict OpenMPI to shared memory comm by default - OMPI_MCA_btl="tcp,self" + # tell OpenMPI to not try using Infiniband + OMPI_MCA_btl="^openib" # do not warn about unused components as this messes up testing OMPI_MCA_btl_base_warn_component_unused="0" export OMPI_MCA_btl OMPI_MCA_btl_base_warn_component_unused diff --git a/tools/singularity/ubuntu18.04_nvidia.def b/tools/singularity/ubuntu18.04_nvidia.def index 02162954c3..4356ddf7e1 100644 --- a/tools/singularity/ubuntu18.04_nvidia.def +++ b/tools/singularity/ubuntu18.04_nvidia.def @@ -81,8 +81,8 @@ EOF %environment LC_ALL=C export LC_ALL - # restrict OpenMPI to shared memory comm by default - OMPI_MCA_btl="tcp,self" + # tell OpenMPI to not try using Infiniband + OMPI_MCA_btl="^openib" # do not warn about unused components as this messes up testing OMPI_MCA_btl_base_warn_component_unused="0" export OMPI_MCA_btl OMPI_MCA_btl_base_warn_component_unused diff --git a/tools/singularity/ubuntu20.04.def b/tools/singularity/ubuntu20.04.def index ed7a67bbe0..3b2c19e920 100644 --- a/tools/singularity/ubuntu20.04.def +++ b/tools/singularity/ubuntu20.04.def @@ -99,8 +99,8 @@ EOF LC_ALL=C export LC_ALL export PATH=/usr/lib/ccache:$PATH - # restrict OpenMPI to shared memory comm by default - OMPI_MCA_btl="tcp,self" + # tell OpenMPI to not try using Infiniband + OMPI_MCA_btl="^openib" # do not warn about unused components as this messes up testing OMPI_MCA_btl_base_warn_component_unused="0" export OMPI_MCA_btl OMPI_MCA_btl_base_warn_component_unused From 0e708469b6f8f676dd8e50eb71432e04b69bbcf6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 13 Jun 2020 02:49:12 -0400 Subject: [PATCH 05/27] add unittest for ErrorStats class --- unittest/force-styles/CMakeLists.txt | 5 +++ unittest/force-styles/test_error_stats.cpp | 41 ++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 unittest/force-styles/test_error_stats.cpp diff --git a/unittest/force-styles/CMakeLists.txt b/unittest/force-styles/CMakeLists.txt index 1cb40038a7..1db4298b29 100644 --- a/unittest/force-styles/CMakeLists.txt +++ b/unittest/force-styles/CMakeLists.txt @@ -15,6 +15,11 @@ else() target_link_libraries(style_tests PUBLIC mpi_stubs) endif() +# unit test for error stats class +add_executable(test_error_stats test_error_stats.cpp) +target_link_libraries(test_error_stats PRIVATE GTest::GTestMain GTest::GTest) +add_test(NAME ErrorStats COMMAND test_error_stats) + # pair style tester add_executable(pair_style pair_style.cpp) target_link_libraries(pair_style PRIVATE lammps style_tests) diff --git a/unittest/force-styles/test_error_stats.cpp b/unittest/force-styles/test_error_stats.cpp new file mode 100644 index 0000000000..ea0b36cbf7 --- /dev/null +++ b/unittest/force-styles/test_error_stats.cpp @@ -0,0 +1,41 @@ + +#include "gtest/gtest.h" +#include +#include + +// include the implementation since ErrorStats is a standalone class +// this way we don't have to link against the style_tests and lammps libs + +#include "error_stats.cpp" + +TEST(ErrorStats, test) +{ + ErrorStats stats; + + stats.add(0.5); + stats.add(0.1); + stats.add(2.0); + stats.add(0.3); + stats.add(0); + + ASSERT_DOUBLE_EQ(stats.avg(), 0.58); + ASSERT_DOUBLE_EQ(stats.dev(), 0.73047929470998685); + ASSERT_DOUBLE_EQ(stats.max(), 2.0); + ASSERT_EQ(stats.idx(), 3); + + std::stringstream out; + out << stats; + ASSERT_EQ(out.str(), " Average: 5.800e-01 StdDev: 7.305e-01 MaxErr: 2.000e+00 @ item: 3"); + + stats.reset(); + ASSERT_DOUBLE_EQ(stats.avg(), 0.0); + ASSERT_DOUBLE_EQ(stats.dev(), 0.0); + ASSERT_DOUBLE_EQ(stats.max(), 0.0); + ASSERT_EQ(stats.idx(), -1); + + stats.add(1.0); + ASSERT_DOUBLE_EQ(stats.avg(), 1.0); + ASSERT_DOUBLE_EQ(stats.dev(), 0.0); + ASSERT_DOUBLE_EQ(stats.max(), 1.0); + ASSERT_EQ(stats.idx(), 1); +} From 873906759310dba268facff61110248e2f9f5cee Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 13 Jun 2020 11:19:56 -0400 Subject: [PATCH 06/27] implement method to pass command line flags to test programs when run through ctest based on the suggestion at: https://stackoverflow.com/questions/28812533/how-to-pass-command-line-arguments-in-ctest-at-runtime but customized for the force-style tests --- unittest/force-styles/CMakeLists.txt | 21 +++++++++++++++------ unittest/force-styles/TestRunner.cmake | 8 ++++++++ 2 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 unittest/force-styles/TestRunner.cmake diff --git a/unittest/force-styles/CMakeLists.txt b/unittest/force-styles/CMakeLists.txt index 1db4298b29..7c69ab8087 100644 --- a/unittest/force-styles/CMakeLists.txt +++ b/unittest/force-styles/CMakeLists.txt @@ -28,7 +28,9 @@ target_link_libraries(pair_style PRIVATE lammps style_tests) file(GLOB MOL_PAIR_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/mol-pair-*.yaml) foreach(TEST ${MOL_PAIR_TESTS}) string(REGEX REPLACE "^.*mol-pair-(.*)\.yaml" "MolPairStyle:\\1" TNAME ${TEST}) - add_test(NAME ${TNAME} COMMAND pair_style ${TEST} + add_test(NAME ${TNAME} + COMMAND ${CMAKE_COMMAND} -DTEST_EXECUTABLE=$ + -DTEST_INPUT=${TEST} -DTEST_NAME=${TNAME} -P ${CMAKE_CURRENT_SOURCE_DIR}/TestRunner.cmake WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) endforeach() @@ -36,7 +38,9 @@ endforeach() file(GLOB ATOMIC_PAIR_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/atomic-pair-*.yaml) foreach(TEST ${ATOMIC_PAIR_TESTS}) string(REGEX REPLACE "^.*atomic-pair-(.*)\.yaml" "AtomicPairStyle:\\1" TNAME ${TEST}) - add_test(NAME ${TNAME} COMMAND pair_style ${TEST} + add_test(NAME ${TNAME} + COMMAND ${CMAKE_COMMAND} -DTEST_EXECUTABLE=$ + -DTEST_INPUT=${TEST} -DTEST_NAME=${TNAME} -P ${CMAKE_CURRENT_SOURCE_DIR}/TestRunner.cmake WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) set_tests_properties(${TNAME} PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS_DIR}") endforeach() @@ -45,7 +49,9 @@ endforeach() file(GLOB MANYBODY_PAIR_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/manybody-pair-*.yaml) foreach(TEST ${MANYBODY_PAIR_TESTS}) string(REGEX REPLACE "^.*manybody-pair-(.*)\.yaml" "ManybodyPairStyle:\\1" TNAME ${TEST}) - add_test(NAME ${TNAME} COMMAND pair_style ${TEST} + add_test(NAME ${TNAME} + COMMAND ${CMAKE_COMMAND} -DTEST_EXECUTABLE=$ + -DTEST_INPUT=${TEST} -DTEST_NAME=${TNAME} -P ${CMAKE_CURRENT_SOURCE_DIR}/TestRunner.cmake WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) set_tests_properties(${TNAME} PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS_DIR}") endforeach() @@ -57,7 +63,9 @@ target_link_libraries(bond_style PRIVATE lammps style_tests) file(GLOB BOND_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/bond-*.yaml) foreach(TEST ${BOND_TESTS}) string(REGEX REPLACE "^.*bond-(.*)\.yaml" "BondStyle:\\1" TNAME ${TEST}) - add_test(NAME ${TNAME} COMMAND bond_style ${TEST} + add_test(NAME ${TNAME} + COMMAND ${CMAKE_COMMAND} -DTEST_EXECUTABLE=$ + -DTEST_INPUT=${TEST} -DTEST_NAME=${TNAME} -P ${CMAKE_CURRENT_SOURCE_DIR}/TestRunner.cmake WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) endforeach() @@ -68,7 +76,8 @@ target_link_libraries(angle_style PRIVATE lammps style_tests) file(GLOB ANGLE_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/angle-*.yaml) foreach(TEST ${ANGLE_TESTS}) string(REGEX REPLACE "^.*angle-(.*)\.yaml" "AngleStyle:\\1" TNAME ${TEST}) - add_test(NAME ${TNAME} COMMAND angle_style ${TEST} + add_test(NAME ${TNAME} + COMMAND ${CMAKE_COMMAND} -DTEST_EXECUTABLE=$ + -DTEST_INPUT=${TEST} -DTEST_NAME=${TNAME} -P ${CMAKE_CURRENT_SOURCE_DIR}/TestRunner.cmake WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) endforeach() - diff --git a/unittest/force-styles/TestRunner.cmake b/unittest/force-styles/TestRunner.cmake new file mode 100644 index 0000000000..325704137c --- /dev/null +++ b/unittest/force-styles/TestRunner.cmake @@ -0,0 +1,8 @@ +# workaround to allow passing extra arguments to test runs +# through ctest via a TEST_ARGS environment variable +# This can be used to, e.g. reset reference data for individual +# tests from the build folder with "env TEST_ARGS=-u ctest -R sometest" +execute_process(COMMAND ${TEST_EXECUTABLE} ${TEST_INPUT} $ENV{TEST_ARGS} RESULT_VARIABLE rv) +if(NOT "${rv}" STREQUAL "0") + message(FATAL_ERROR "Test ${TEST_NAME} failed with status ${rv}") +endif() From daae6ea97f3b54215eb993bc1957246635872a45 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 13 Jun 2020 11:24:17 -0400 Subject: [PATCH 07/27] whitespace fix --- src/atom.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/atom.cpp b/src/atom.cpp index d5103dc880..54707ad8c1 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -2272,7 +2272,7 @@ void Atom::add_callback(int flag) } extra_grow[nextra_grow] = ifix; nextra_grow++; - std::sort(extra_grow, extra_grow + nextra_grow); + std::sort(extra_grow, extra_grow + nextra_grow); } else if (flag == 1) { if (nextra_restart == nextra_restart_max) { nextra_restart_max += DELTA; @@ -2280,7 +2280,7 @@ void Atom::add_callback(int flag) } extra_restart[nextra_restart] = ifix; nextra_restart++; - std::sort(extra_restart, extra_restart + nextra_restart); + std::sort(extra_restart, extra_restart + nextra_restart); } else if (flag == 2) { if (nextra_border == nextra_border_max) { nextra_border_max += DELTA; @@ -2288,7 +2288,7 @@ void Atom::add_callback(int flag) } extra_border[nextra_border] = ifix; nextra_border++; - std::sort(extra_border, extra_border + nextra_border); + std::sort(extra_border, extra_border + nextra_border); } } From 9b0213f1ab697a9d2abbca06f8cad9052f821452 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 13 Jun 2020 12:03:50 -0400 Subject: [PATCH 08/27] small CMake tweaks from progguide branch --- cmake/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 2407d03a80..3d3d8469b4 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -625,6 +625,8 @@ install( ############################################################################### if(BUILD_SHARED_LIBS) if(CMAKE_VERSION VERSION_LESS 3.12) + # adjust so we find Python 3 versions before Python 2 on old systems with old CMake + set(Python_ADDITIONAL_VERSIONS 3.8 3.7 3.6 3.5) find_package(PythonInterp) # Deprecated since version 3.12 if(PYTHONINTERP_FOUND) set(Python_EXECUTABLE ${PYTHON_EXECUTABLE}) @@ -780,3 +782,6 @@ if(PKG_KSPACE) endif() endif() endif() +if(BUILD_DOC) + message(STATUS "<<< Building HTML Manual >>>") +endif() From 7077db7eec75c7fa086831ba95f313c140218797 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Jun 2020 08:16:51 -0400 Subject: [PATCH 09/27] update contributing guidelines to mention creating unit tests and regression test data. add checkbox to pull request template --- .github/CONTRIBUTING.md | 4 +++- .github/PULL_REQUEST_TEMPLATE.md | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 08522c6d15..b61a753518 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -75,7 +75,9 @@ Here is a checklist of steps you need to follow to submit a single file or user * Your new source files need to have the LAMMPS copyright, GPL notice, and your name and email address at the top, like other user-contributed LAMMPS source files. They need to create a class that is inside the LAMMPS namespace. If the file is for one of the USER packages, including USER-MISC, then we are not as picky about the coding style (see above). I.e. the files do not need to be in the same stylistic format and syntax as other LAMMPS files, though that would be nice for developers as well as users who try to read your code. * You **must** also create or extend a documentation file for each new command or style you are adding to LAMMPS. For simplicity and convenience, the documentation of groups of closely related commands or styles may be combined into a single file. This will be one file for a single-file feature. For a package, it might be several files. These are files in the [reStructuredText](https://docutils.sourceforge.io/rst.html) markup language, that are then converted to HTML and PDF. The tools for this conversion are included in the source distribution, and the translation can be as simple as doing "make html pdf" in the doc folder. Thus the documentation source files must be in the same format and style as other `.rst` files in the lammps/doc/src directory for similar commands and styles; use one or more of them as a starting point. An introduction to reStructuredText can be found at [https://docutils.sourceforge.io/docs/user/rst/quickstart.html](https://docutils.sourceforge.io/docs/user/rst/quickstart.html). The text files can include mathematical expressions and symbol in ".. math::" sections or ":math:" expressions or figures (see doc/JPG for examples), or even additional PDF files with further details (see doc/PDF for examples). The doc page should also include literature citations as appropriate; see the bottom of doc/fix_nh.rst for examples and the earlier part of the same file for how to format the cite itself. The "Restrictions" section of the doc page should indicate that your command is only available if LAMMPS is built with the appropriate USER-MISC or USER-FOO package. See other user package doc files for examples of how to do this. The prerequisite for building the HTML format files are Python 3.x and virtualenv. Please run at least `make html`, `make pdf` and `make spelling` and carefully inspect and proofread the resulting HTML format doc page as well as the output produced to the screen. Make sure that all spelling errors are fixed or the necessary false positives are added to the `doc/utils/sphinx-config/false_positives.txt` file. For new styles, those usually also need to be added to lists on the respective overview pages. This can be checked for also with `make style_check`. * For a new package (or even a single command) you should include one or more example scripts demonstrating its use. These should run in no more than a couple minutes, even on a single processor, and not require large data files as input. See directories under examples/USER for examples of input scripts other users provided for their packages. These example inputs are also required for validating memory accesses and testing for memory leaks with valgrind -* If there is a paper of yours describing your feature (either the algorithm/science behind the feature itself, or its initial usage, or its implementation in LAMMPS), you can add the citation to the *.cpp source file. See src/USER-EFF/atom_vec_electron.cpp for an example. A LaTeX citation is stored in a variable at the top of the file and a single line of code that references the variable is added to the constructor of the class. Whenever a user invokes your feature from their input script, this will cause LAMMPS to output the citation to a log.cite file and prompt the user to examine the file. Note that you should only use this for a paper you or your group authored. E.g. adding a cite in the code for a paper by Nose and Hoover if you write a fix that implements their integrator is not the intended usage. That kind of citation should just be in the doc page you provide. +* For new utility functions or class (i.e. anything that does not depend on a LAMMPS object), new unit tests should be added to the unittest tree. +* When adding a new LAMMPS style, a .yaml file with a test configuration and reference data should be added for the styles where a suitable tester program already exists (e.g. pair styles, bond styles, etc.). +* If there is a paper of yours describing your feature (either the algorithm/science behind the feature itself, or its initial usage, or its implementation in LAMMPS), you can add the citation to the .cpp source file. See src/USER-EFF/atom_vec_electron.cpp for an example. A LaTeX citation is stored in a variable at the top of the file and a single line of code that references the variable is added to the constructor of the class. Whenever a user invokes your feature from their input script, this will cause LAMMPS to output the citation to a log.cite file and prompt the user to examine the file. Note that you should only use this for a paper you or your group authored. E.g. adding a cite in the code for a paper by Nose and Hoover if you write a fix that implements their integrator is not the intended usage. That kind of citation should just be in the doc page you provide. Finally, as a general rule-of-thumb, the more clear and self-explanatory you make your documentation and README files, and the easier you make it for people to get started, e.g. by providing example scripts, the more likely it is that users will try out your new feature. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6ef945d8d4..921295f6e6 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -34,6 +34,7 @@ By submitting this pull request, I agree, that my contribution will be included - [ ] The added/updated documentation is integrated and tested with the documentation build system - [ ] The feature has been verified to work with the conventional build system - [ ] The feature has been verified to work with the CMake based build system +- [ ] Suitable tests have been added to the unittest tree. - [ ] A package specific README file has been included or updated - [ ] One or more example input decks are included From 03bf678e701c30d7a18cf19e3441752e921ca2de Mon Sep 17 00:00:00 2001 From: aatxutegi Date: Sun, 14 Jun 2020 16:02:50 +0200 Subject: [PATCH 10/27] Small type at the Z rotation matrix member --- src/math_extra.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/math_extra.cpp b/src/math_extra.cpp index 749736ef27..b04414a300 100644 --- a/src/math_extra.cpp +++ b/src/math_extra.cpp @@ -638,7 +638,7 @@ void BuildRyMatrix(double R[3][3], const double angle) } /* ---------------------------------------------------------------------- - Build rotation matrix for a small angle rotation around the Y axis + Build rotation matrix for a small angle rotation around the Z axis ------------------------------------------------------------------------- */ void BuildRzMatrix(double R[3][3], const double angle) From 083fe85b685a0ce9375df7c532a4f23535b4c5ce Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Jun 2020 11:25:02 -0400 Subject: [PATCH 11/27] import updates to the manual from the progguide branch --- doc/src/Build_basics.rst | 2 +- doc/src/Build_development.rst | 10 +- doc/src/Build_link.rst | 88 ++++++-------- doc/src/Build_settings.rst | 19 +++- doc/src/Commands_input.rst | 6 +- doc/src/Commands_pair.rst | 2 +- doc/src/Developer/developer.tex | 2 +- doc/src/Errors_debug.rst | 18 +-- doc/src/Errors_messages.rst | 22 ++-- doc/src/Errors_warnings.rst | 8 +- doc/src/Examples.rst | 2 +- doc/src/Howto_chunk.rst | 2 +- doc/src/Howto_cmake.rst | 32 +++--- doc/src/Howto_coreshell.rst | 2 +- doc/src/Howto_multiple.rst | 2 +- doc/src/Howto_restart.rst | 2 +- doc/src/Howto_triclinic.rst | 6 +- doc/src/Intro_nonfeatures.rst | 2 +- doc/src/Manual.rst | 3 +- doc/src/Manual_build.rst | 177 ++++++++++++++++++++--------- doc/src/Modify_fix.rst | 2 +- doc/src/Modify_kspace.rst | 18 +-- doc/src/Packages_details.rst | 2 +- doc/src/Python_library.rst | 9 -- doc/src/Python_test.rst | 2 +- doc/src/Run_options.rst | 8 +- doc/src/angle_charmm.rst | 2 +- doc/src/angle_coeff.rst | 4 +- doc/src/angle_table.rst | 10 +- doc/src/atc_control_momentum.rst | 4 +- doc/src/atc_control_thermal.rst | 2 +- doc/src/atc_hardy_fields.rst | 6 +- doc/src/atc_hardy_gradients.rst | 4 +- doc/src/atc_hardy_kernel.rst | 2 +- doc/src/atc_hardy_rates.rst | 4 +- doc/src/atc_remove_species.rst | 2 +- doc/src/atc_set_reference_pe.rst | 2 +- doc/src/atc_time_integration.rst | 18 +-- doc/src/bond_coeff.rst | 4 +- doc/src/bond_fene.rst | 4 +- doc/src/bond_fene_expand.rst | 4 +- doc/src/bond_table.rst | 8 +- doc/src/boundary.rst | 4 +- doc/src/box.rst | 2 +- doc/src/compute_adf.rst | 8 +- doc/src/compute_chunk_atom.rst | 6 +- doc/src/compute_coord_atom.rst | 2 +- doc/src/compute_displace_atom.rst | 2 +- doc/src/compute_fep.rst | 2 +- doc/src/compute_group_group.rst | 2 +- doc/src/compute_msd.rst | 2 +- doc/src/compute_msd_chunk.rst | 2 +- doc/src/compute_msd_nongauss.rst | 4 +- doc/src/compute_property_chunk.rst | 2 +- doc/src/compute_rdf.rst | 6 +- doc/src/compute_temp_cs.rst | 2 +- doc/src/compute_ti.rst | 2 +- doc/src/compute_vacf.rst | 2 +- doc/src/dihedral_charmm.rst | 6 +- doc/src/dihedral_coeff.rst | 4 +- doc/src/dihedral_table.rst | 16 +-- doc/src/dihedral_table_cut.rst | 16 +-- doc/src/dump_image.rst | 22 ++-- doc/src/dump_modify.rst | 6 +- doc/src/dynamical_matrix.rst | 2 +- doc/src/fix_adapt.rst | 2 +- doc/src/fix_adapt_fep.rst | 2 +- doc/src/fix_ave_chunk.rst | 2 +- doc/src/fix_ave_correlate.rst | 2 +- doc/src/fix_ave_histo.rst | 6 +- doc/src/fix_bond_create.rst | 12 +- doc/src/fix_box_relax.rst | 2 +- doc/src/fix_cmap.rst | 2 +- doc/src/fix_deform.rst | 6 +- doc/src/fix_eos_table.rst | 6 +- doc/src/fix_eos_table_rx.rst | 6 +- doc/src/fix_external.rst | 30 ++++- doc/src/fix_nh.rst | 8 +- doc/src/fix_npt_cauchy.rst | 8 +- doc/src/fix_poems.rst | 6 +- doc/src/fix_precession_spin.rst | 2 +- doc/src/fix_recenter.rst | 2 +- doc/src/fix_restrain.rst | 2 +- doc/src/fix_rigid.rst | 4 +- doc/src/fix_rigid_meso.rst | 2 +- doc/src/fix_rx.rst | 10 +- doc/src/fix_saed_vtk.rst | 6 +- doc/src/fix_smd.rst | 2 +- doc/src/fix_spring.rst | 2 +- doc/src/fix_tmd.rst | 4 +- doc/src/group.rst | 10 +- doc/src/improper_class2.rst | 4 +- doc/src/improper_coeff.rst | 4 +- doc/src/improper_hybrid.rst | 2 +- doc/src/jump.rst | 2 +- doc/src/kspace_style.rst | 2 +- doc/src/mass.rst | 4 +- doc/src/message.rst | 2 +- doc/src/minimize.rst | 2 +- doc/src/molecule.rst | 8 +- doc/src/neb.rst | 2 +- doc/src/newton.rst | 4 +- doc/src/next.rst | 2 +- doc/src/package.rst | 2 +- doc/src/pair_adp.rst | 4 +- doc/src/pair_airebo.rst | 10 +- doc/src/pair_atm.rst | 2 +- doc/src/pair_bop.rst | 4 +- doc/src/pair_charmm.rst | 2 +- doc/src/pair_coeff.rst | 4 +- doc/src/pair_comb.rst | 10 +- doc/src/pair_e3b.rst | 2 +- doc/src/pair_eam.rst | 8 +- doc/src/pair_eff.rst | 8 +- doc/src/pair_eim.rst | 4 +- doc/src/pair_exp6_rx.rst | 8 +- doc/src/pair_gran.rst | 2 +- doc/src/pair_granular.rst | 2 +- doc/src/pair_gw.rst | 2 +- doc/src/pair_hbond_dreiding.rst | 4 +- doc/src/pair_hybrid.rst | 4 +- doc/src/pair_lcbop.rst | 4 +- doc/src/pair_lj_smooth.rst | 6 +- doc/src/pair_meam_spline.rst | 4 +- doc/src/pair_meam_sw_spline.rst | 2 +- doc/src/pair_meamc.rst | 20 ++-- doc/src/pair_multi_lucy.rst | 8 +- doc/src/pair_multi_lucy_rx.rst | 8 +- doc/src/pair_nb3b_harmonic.rst | 4 +- doc/src/pair_polymorphic.rst | 4 +- doc/src/pair_snap.rst | 4 +- doc/src/pair_style.rst | 2 +- doc/src/pair_sw.rst | 8 +- doc/src/pair_table.rst | 10 +- doc/src/pair_table_rx.rst | 10 +- doc/src/pair_tersoff.rst | 12 +- doc/src/pair_tersoff_mod.rst | 4 +- doc/src/pair_tersoff_zbl.rst | 12 +- doc/src/pair_vashishta.rst | 8 +- doc/src/partition.rst | 2 +- doc/src/read_data.rst | 10 +- doc/src/restart.rst | 6 +- doc/src/run.rst | 4 +- doc/src/run_style.rst | 18 +-- doc/src/special_bonds.rst | 20 ++-- doc/src/temper.rst | 4 +- doc/src/thermo_modify.rst | 2 +- doc/src/variable.rst | 8 +- doc/src/write_restart.rst | 2 +- 149 files changed, 599 insertions(+), 523 deletions(-) diff --git a/doc/src/Build_basics.rst b/doc/src/Build_basics.rst index 335c1a5189..e6d9fff373 100644 --- a/doc/src/Build_basics.rst +++ b/doc/src/Build_basics.rst @@ -225,7 +225,7 @@ A few example command lines are: For compiling with the Clang/LLVM compilers a CMake preset is provided that can be loaded with `-C ../cmake/presets/clang.cmake`. Similarly, -`-C ../cmake/presets/intel.cmake` should switch the +`-C ../cmake/presets/intel.cmake` should switch the In addition you can set ``CMAKE_TUNE_FLAGS`` to specifically add compiler flags to tune for optimal performance on given hosts. By diff --git a/doc/src/Build_development.rst b/doc/src/Build_development.rst index 94b78a4a9c..be86037f61 100644 --- a/doc/src/Build_development.rst +++ b/doc/src/Build_development.rst @@ -126,7 +126,7 @@ in the next section. .. note:: - This unit test framework is new and still under development. + The unit test framework is new and still under development. The coverage is only minimal and will be expanded over time. Tests styles of the same kind of style (e.g. pair styles or bond styles) are performed with the same executable using @@ -237,12 +237,12 @@ and working. performed with automatically rescaled epsilon to account for additional loss of precision from code optimizations and different summation orders. - - When compiling with aggressive compiler optimization, some tests + - When compiling with (aggressive) compiler optimization, some tests are likely to fail. It is recommended to inspect the individual - tests in detail to decide whether the specific error for a specific + tests in detail to decide, whether the specific error for a specific property is acceptable (it often is), or this may be an indication - of mis-compiled code (or undesired large of precision due to - reordering of operations). + of mis-compiled code (or an undesired large loss of precision due + to significant reordering of operations and thus less error cancellation). Collect and visualize code coverage metrics ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/src/Build_link.rst b/doc/src/Build_link.rst index 39fc4fe40a..914142b3ce 100644 --- a/doc/src/Build_link.rst +++ b/doc/src/Build_link.rst @@ -1,12 +1,12 @@ Link LAMMPS as a library to another code ======================================== -LAMMPS is designed as a library of C++ objects and can thus be +LAMMPS is designed as a library of C++ objects that can be integrated into other applications including Python scripts. The files ``src/library.cpp`` and ``src/library.h`` define a C-style API for using LAMMPS as a library. See the :doc:`Howto -library ` doc page for a description of the interface -and how to extend it for your needs. +library ` page for a description of the interface +and how to use it for your needs. The :doc:`Build basics ` doc page explains how to build LAMMPS as either a shared or static library. This results in a file @@ -31,18 +31,18 @@ the suffix ``.so.0`` (or some other number). communicator with a subset of MPI ranks to the function creating the LAMMPS instance. ----------- - -**Link with LAMMPS as a static library**\ : +Link with LAMMPS as a static library +------------------------------------ The calling application can link to LAMMPS as a static library with compilation and link commands as in the examples shown below. These -are examples for a code written in C in the file *caller.c*. +are examples for a code written in C in the file ``caller.c``. The benefit of linking to a static library is, that the resulting executable is independent of that library since all required executable code from the library is copied into the calling executable. -*CMake build*\ : +CMake build +^^^^^^^^^^^ This assumes that LAMMPS has been configured without setting a ``LAMMPS_MACHINE`` name, installed with "make install", and the @@ -55,7 +55,8 @@ The commands to compile and link a coupled executable are then: mpicc -c -O $(pkgconf liblammps --cflags) caller.c mpicxx -o caller caller.o -$(pkgconf liblammps --libs) -*Traditional make*\ : +Traditional make +^^^^^^^^^^^^^^^^ This assumes that LAMMPS has been compiled in the folder ``${HOME}/lammps/src`` with "make mpi". The commands to compile and link @@ -83,20 +84,20 @@ LAMMPS library without any optional packages that depend on libraries need to include all flags, libraries, and paths for the coupled executable, that are also required to link the LAMMPS executable. -*CMake build*\ : +CMake build +^^^^^^^^^^^ When using CMake, additional libraries with sources in the lib folder are built, but not included in ``liblammps.a`` and (currently) not -installed with "make install" and not included in the *pkgconfig* +installed with ``make install`` and not included in the ``pkgconfig`` configuration file. They can be found in the top level build folder, but you have to determine the necessary link flags manually. It is therefore recommended to either use the traditional make procedure to build and link with a static library or build and link with a shared library instead. -.. TODO: this needs to be updated to reflect that latest CMake changes after they are complete. - -*Traditional make*\ : +Traditional make +^^^^^^^^^^^^^^^^ After you have compiled a static LAMMPS library using the conventional build system for example with "make mode=static serial". And you also @@ -110,10 +111,10 @@ change to: g++ -o caller caller.o -L${HOME}/lammps/lib/poems \ -L${HOME}/lammps/src/STUBS -L${HOME}/lammps/src -llammps_serial -lpoems -lmpi_stubs -Note, that you need to link with "g++" instead of "gcc", since the -LAMMPS library is C++ code. You can display the currently applied -settings for building LAMMPS for the "serial" machine target by using -the command: +Note, that you need to link with ``g++`` instead of ``gcc`` even if you have +written your code in C, since LAMMPS itself is C++ code. You can display the +currently applied settings for building LAMMPS for the "serial" machine target +by using the command: .. code-block:: bash @@ -123,25 +124,24 @@ Which should output something like: .. code-block:: bash - # Compiler: + # Compiler: CXX=g++ - # Linker: + # Linker: LD=g++ - # Compilation: + # Compilation: CXXFLAGS=-g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -I${HOME}/compile/lammps/lib/poems -I${HOME}/compile/lammps/src/STUBS - # Linking: + # Linking: LDFLAGS=-g -O - # Libraries: + # Libraries: LDLIBS=-L${HOME}/compile/lammps/src -llammps_serial -L${HOME}/compile/lammps/lib/poems -L${HOME}/compile/lammps/src/STUBS -lpoems -lmpi_stubs From this you can gather the necessary paths and flags. With makefiles for other *machine* configurations you need to do the -equivalent and replace "serial" with the corresponding *machine* name +equivalent and replace "serial" with the corresponding "machine" name of the makefile. ----------- - -**Link with LAMMPS as a shared library**\ : +Link with LAMMPS as a shared library +------------------------------------ When linking to LAMMPS built as a shared library, the situation becomes much simpler, as all dependent libraries and objects are either included @@ -151,7 +151,8 @@ linking the calling executable. Only the *-I* flags are needed. So the example case from above of the serial version static LAMMPS library with the POEMS package installed becomes: -*CMake build*\ : +CMake build +^^^^^^^^^^^ The commands with a shared LAMMPS library compiled with the CMake build process are the same as for the static library. @@ -161,10 +162,11 @@ build process are the same as for the static library. mpicc -c -O $(pkgconf liblammps --cflags) caller.c mpicxx -o caller caller.o -$(pkgconf --libs) -*Traditional make*\ : +Traditional make +^^^^^^^^^^^^^^^^ The commands with a shared LAMMPS library compiled with the -traditional make build using "make mode=shared serial" becomes: +traditional make build using ``make mode=shared serial`` becomes: .. code-block:: bash @@ -231,29 +233,3 @@ If a required library is missing, you would get a 'not found' entry: libc.so.6 => /usr/lib64/libc.so.6 (0x00007fb7c7b5d000) /lib64/ld-linux-x86-64.so.2 (0x00007fb7c80a2000) ----------- - -**Calling the LAMMPS library**\ : - -Either flavor of library (static or shared) allows one or more LAMMPS -objects to be instantiated from the calling program. When used from a -C++ program, most of the symbols and functions in LAMMPS are wrapped -in a ``LAMMPS_NS`` namespace; you can safely use any of its classes and -methods from within the calling code, as needed, and you will not incur -conflicts with functions and variables in your code that share the name. -This, however, does not extend to all additional libraries bundled with -LAMMPS in the lib folder and some of the low-level code of some packages. - -To be compatible with C, Fortran, Python programs, the library has a simple -C-style interface, provided in ``src/library.cpp`` and ``src/library.h``. - -See the :doc:`Python library ` doc page for a -description of the Python interface to LAMMPS, which wraps the C-style -interface from a shared library through the `ctypes python module `_. - -See the sample codes in ``examples/COUPLE/simple`` for examples of C++ and -C and Fortran codes that invoke LAMMPS through its library interface. -Other examples in the COUPLE directory use coupling ideas discussed on -the :doc:`Howto couple ` doc page. - -.. _ctypes: https://docs.python.org/3/library/ctypes.html diff --git a/doc/src/Build_settings.rst b/doc/src/Build_settings.rst index 01792507e7..58b61c993c 100644 --- a/doc/src/Build_settings.rst +++ b/doc/src/Build_settings.rst @@ -169,12 +169,12 @@ ARRAY mode. .. _size: -Size of LAMMPS data types +Size of LAMMPS integer types ------------------------------------ -LAMMPS has a few integer data types which can be defined as 4-byte or -8-byte integers. The default setting of "smallbig" is almost always -adequate. +LAMMPS has a few integer data types which can be defined as either +4-byte (= 32-bit) or 8-byte (= 64-bit) integers at compile time. +The default setting of "smallbig" is almost always adequate. **CMake variable**\ : @@ -420,8 +420,8 @@ Exception handling when using LAMMPS as a library This setting is useful when external codes drive LAMMPS as a library. With this option enabled, LAMMPS errors do not kill the calling code. Instead, the call stack is unwound and control returns to the caller, -e.g. to Python. Of course the calling code has to be set up to -*catch* exceptions from within LAMMPS. +e.g. to Python. Of course, the calling code has to be set up to +*catch* exceptions thrown from within LAMMPS. **CMake variable**\ : @@ -434,3 +434,10 @@ e.g. to Python. Of course the calling code has to be set up to .. code-block:: make LMP_INC = -DLAMMPS_EXCEPTIONS + +.. note:: + + When LAMMPS is running in parallel, it is not always possible to + cleanly recover from an exception since not all parallel ranks may + throw an exception and thus other MPI ranks may get stuck waiting for + messages from the ones with errors. diff --git a/doc/src/Commands_input.rst b/doc/src/Commands_input.rst index f8de98c1a2..8fc658a215 100644 --- a/doc/src/Commands_input.rst +++ b/doc/src/Commands_input.rst @@ -31,9 +31,9 @@ does something different than this sequence: run 100 In the first case, the specified timestep (0.5 fs) is used for two -simulations of 100 timesteps each. In the 2nd case, the default -timestep (1.0 fs) is used for the 1st 100 step simulation and a 0.5 fs -timestep is used for the 2nd one. +simulations of 100 timesteps each. In the second case, the default +timestep (1.0 fs) is used for the first 100 step simulation and a 0.5 fs +timestep is used for the second one. (2) Some commands are only valid when they follow other commands. For example you cannot set the temperature of a group of atoms until atoms diff --git a/doc/src/Commands_pair.rst b/doc/src/Commands_pair.rst index eac38af668..d91624e17a 100644 --- a/doc/src/Commands_pair.rst +++ b/doc/src/Commands_pair.rst @@ -78,7 +78,7 @@ OPT. * :doc:`coul/long/soft (o) ` * :doc:`coul/msm (o) ` * :doc:`coul/slater/cut ` - * :doc:`coul/slater/long ` + * :doc:`coul/slater/long ` * :doc:`coul/shield ` * :doc:`coul/streitz ` * :doc:`coul/wolf (ko) ` diff --git a/doc/src/Developer/developer.tex b/doc/src/Developer/developer.tex index 15fd3a4ce5..c7f619c84f 100644 --- a/doc/src/Developer/developer.tex +++ b/doc/src/Developer/developer.tex @@ -142,7 +142,7 @@ follows: minimize. \item The Special class walks the bond topology of a molecular system - to find 1st, 2nd, 3rd neighbors of each atom. It is invoked by + to find first, second, third neighbors of each atom. It is invoked by several commands, like read\_data, read\_restart, and replicate. \item The Atom class stores all per-atom arrays. More precisely, they diff --git a/doc/src/Errors_debug.rst b/doc/src/Errors_debug.rst index 1e7e678602..9b11974cf4 100644 --- a/doc/src/Errors_debug.rst +++ b/doc/src/Errors_debug.rst @@ -23,7 +23,7 @@ We use it to show how to identify the origin of a segmentation fault. double *special_lj = force->special_lj; int newton_pair = force->newton_pair; + double comx = 0.0; - + inum = list->inum; ilist = list->ilist; @@ -134,8 +135,10 @@ void PairLJCut::compute(int eflag, int vflag) @@ -31,7 +31,7 @@ We use it to show how to identify the origin of a segmentation fault. } } - } - + + comx += atom->rmass[i]*x[i][0]; /* BUG */ + } + printf("comx = %g\n",comx); @@ -42,7 +42,7 @@ After recompiling LAMMPS and running the input you should get something like thi .. code-block: - $ ./lmp -in in.melt + $ ./lmp -in in.melt LAMMPS (19 Mar 2020) OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:94) using 1 OpenMP thread(s) per MPI task @@ -98,11 +98,11 @@ drop back to the GDB prompt. Unit style : lj Current step : 0 Time step : 0.005 - + Program received signal SIGSEGV, Segmentation fault. 0x00000000006653ab in LAMMPS_NS::PairLJCut::compute (this=0x829740, eflag=1, vflag=) at /home/akohlmey/compile/lammps/src/pair_lj_cut.cpp:139 139 comx += atom->rmass[i]*x[i][0]; /* BUG */ - (gdb) + (gdb) Now typing the command "where" will show the stack of functions starting from the current function back to "main()". @@ -119,7 +119,7 @@ the current function back to "main()". #4 0x0000000000410ad3 in LAMMPS_NS::Input::execute_command (this=0x7d1410) at /home/akohlmey/compile/lammps/src/input.cpp:864 #5 0x00000000004111fb in LAMMPS_NS::Input::file (this=0x7d1410) at /home/akohlmey/compile/lammps/src/input.cpp:229 #6 0x000000000040933a in main (argc=, argv=) at /home/akohlmey/compile/lammps/src/main.cpp:65 - (gdb) + (gdb) You can also print the value of variables and see if there is anything unexpected. Segmentation faults, for example, commonly happen when a @@ -189,12 +189,12 @@ the console are not mixed. .. code-block:: - $ valgrind ./lmp -in in.melt + $ valgrind ./lmp -in in.melt ==1933642== Memcheck, a memory error detector ==1933642== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==1933642== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info ==1933642== Command: ./lmp -in in.melt - ==1933642== + ==1933642== LAMMPS (19 Mar 2020) OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:94) using 1 OpenMP thread(s) per MPI task @@ -228,7 +228,7 @@ the console are not mixed. ==1933642== by 0x4111FA: LAMMPS_NS::Input::file() (input.cpp:229) ==1933642== by 0x409339: main (main.cpp:65) ==1933642== Address 0x0 is not stack'd, malloc'd or (recently) free'd - ==1933642== + ==1933642== As you can see, the stack trace information is similar to that obtained from GDB. In addition you get a more specific hint about what cause the diff --git a/doc/src/Errors_messages.rst b/doc/src/Errors_messages.rst index 2140719253..f3be94a239 100644 --- a/doc/src/Errors_messages.rst +++ b/doc/src/Errors_messages.rst @@ -381,7 +381,7 @@ Doc page with :doc:`WARNING messages ` are defined. *Bond atom missing in box size check* - The 2nd atoms needed to compute a particular bond is missing on this + The second atom needed to compute a particular bond is missing on this processor. Typically this is because the pairwise cutoff is set too short or the bond has blown apart and an atom is too far away. @@ -391,7 +391,7 @@ Doc page with :doc:`WARNING messages ` the atoms are too far apart to make a valid bond. *Bond atom missing in image check* - The 2nd atom in a particular bond is missing on this processor. + The second atom in a particular bond is missing on this processor. Typically this is because the pairwise cutoff is set too short or the bond has blown apart and an atom is too far away. @@ -401,12 +401,12 @@ Doc page with :doc:`WARNING messages ` are too far apart to make a valid bond. *Bond atoms %d %d missing on proc %d at step %ld* - The 2nd atom needed to compute a particular bond is missing on this + The second atom needed to compute a particular bond is missing on this processor. Typically this is because the pairwise cutoff is set too short or the bond has blown apart and an atom is too far away. *Bond atoms missing on proc %d at step %ld* - The 2nd atom needed to compute a particular bond is missing on this + The second atom needed to compute a particular bond is missing on this processor. Typically this is because the pairwise cutoff is set too short or the bond has blown apart and an atom is too far away. @@ -1374,7 +1374,7 @@ Doc page with :doc:`WARNING messages ` template does not qualify. *Cannot use fix box/relax on a 2nd non-periodic dimension* - When specifying an off-diagonal pressure component, the 2nd of the two + When specifying an off-diagonal pressure component, the second of the two dimensions must be periodic. E.g. if the xy component is specified, then the y dimension must be periodic. @@ -1388,7 +1388,7 @@ Doc page with :doc:`WARNING messages ` also keyword tri or xy, this is wrong. *Cannot use fix box/relax with tilt factor scaling on a 2nd non-periodic dimension* - When specifying scaling on a tilt factor component, the 2nd of the two + When specifying scaling on a tilt factor component, the second of the two dimensions must be periodic. E.g. if the xy component is specified, then the y dimension must be periodic. @@ -1429,7 +1429,7 @@ Doc page with :doc:`WARNING messages ` This would be changing the same box dimension twice. *Cannot use fix nvt/npt/nph on a 2nd non-periodic dimension* - When specifying an off-diagonal pressure component, the 2nd of the two + When specifying an off-diagonal pressure component, the second of the two dimensions must be periodic. E.g. if the xy component is specified, then the y dimension must be periodic. @@ -1447,13 +1447,13 @@ Doc page with :doc:`WARNING messages ` Self-explanatory. *Cannot use fix nvt/npt/nph with xy scaling when y is non-periodic dimension* - The 2nd dimension in the barostatted tilt factor must be periodic. + The second dimension in the barostatted tilt factor must be periodic. *Cannot use fix nvt/npt/nph with xz scaling when z is non-periodic dimension* - The 2nd dimension in the barostatted tilt factor must be periodic. + The second dimension in the barostatted tilt factor must be periodic. *Cannot use fix nvt/npt/nph with yz scaling when z is non-periodic dimension* - The 2nd dimension in the barostatted tilt factor must be periodic. + The second dimension in the barostatted tilt factor must be periodic. *Cannot use fix pour rigid and not molecule* Self-explanatory. @@ -7192,7 +7192,7 @@ keyword to allow for additional bonds to be formed does not exist. *Replacing a fix, but new style != old style* - A fix ID can be used a 2nd time, but only if the style matches the + A fix ID can be used a second time, but only if the style matches the previous fix. In this case it is assumed you with to reset a fix's parameters. This error may mean you are mistakenly re-using a fix ID when you do not intend to. diff --git a/doc/src/Errors_warnings.rst b/doc/src/Errors_warnings.rst index dbe830c8bf..ceccc0b74c 100644 --- a/doc/src/Errors_warnings.rst +++ b/doc/src/Errors_warnings.rst @@ -43,17 +43,17 @@ Doc page with :doc:`ERROR messages ` Self-explanatory. *Bond atom missing in box size check* - The 2nd atoms needed to compute a particular bond is missing on this + The second atom needed to compute a particular bond is missing on this processor. Typically this is because the pairwise cutoff is set too short or the bond has blown apart and an atom is too far away. *Bond atom missing in image check* - The 2nd atom in a particular bond is missing on this processor. + The second atom in a particular bond is missing on this processor. Typically this is because the pairwise cutoff is set too short or the bond has blown apart and an atom is too far away. *Bond atoms missing at step %ld* - The 2nd atom needed to compute a particular bond is missing on this + The second atom needed to compute a particular bond is missing on this processor. Typically this is because the pairwise cutoff is set too short or the bond has blown apart and an atom is too far away. @@ -486,7 +486,7 @@ This will most likely cause errors in kinetic fluctuations. a new style. *No Kspace calculation with verlet/split* - The 2nd partition performs a kspace calculation so the kspace_style + The second partition performs a kspace calculation so the kspace_style command must be used. *No automatic unit conversion to XTC file format conventions possible for units lj* diff --git a/doc/src/Examples.rst b/doc/src/Examples.rst index b94db208d9..dc122f2c78 100644 --- a/doc/src/Examples.rst +++ b/doc/src/Examples.rst @@ -163,7 +163,7 @@ Here is how you can run and visualize one of the sample problems: Running the simulation produces the files *dump.indent* and *log.lammps*\ . You can visualize the dump file of snapshots with a -variety of 3rd-party tools highlighted on the +variety of third-party tools highlighted on the `Visualization `_ page of the LAMMPS web site. diff --git a/doc/src/Howto_chunk.rst b/doc/src/Howto_chunk.rst index cdc0c30d9b..75fb30815b 100644 --- a/doc/src/Howto_chunk.rst +++ b/doc/src/Howto_chunk.rst @@ -197,7 +197,7 @@ compress individual polymer chains (molecules) in a mixture, is explained on the :doc:`compute chunk/spread/atom ` command doc page. (7) An example for using one set of per-chunk values for molecule -chunks, to create a 2nd set of micelle-scale chunks (clustered +chunks, to create a second set of micelle-scale chunks (clustered molecules, due to hydrophobicity), is explained on the :doc:`compute chunk/reduce ` command doc page. (8) An example for using one set of per-chunk values (dipole moment diff --git a/doc/src/Howto_cmake.rst b/doc/src/Howto_cmake.rst index 9028893ddb..490de635b5 100644 --- a/doc/src/Howto_cmake.rst +++ b/doc/src/Howto_cmake.rst @@ -114,19 +114,19 @@ summary screen will look like this: -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done - -- Found Git: /usr/bin/git (found version "2.25.2") + -- Found Git: /usr/bin/git (found version "2.25.2") -- Running check for auto-generated files from make-based build system - -- Found MPI_CXX: /usr/lib64/mpich/lib/libmpicxx.so (found version "3.1") - -- Found MPI: TRUE (found version "3.1") + -- Found MPI_CXX: /usr/lib64/mpich/lib/libmpicxx.so (found version "3.1") + -- Found MPI: TRUE (found version "3.1") -- Looking for C++ include omp.h -- Looking for C++ include omp.h - found - -- Found OpenMP_CXX: -fopenmp (found version "4.5") - -- Found OpenMP: TRUE (found version "4.5") - -- Found JPEG: /usr/lib64/libjpeg.so (found version "62") - -- Found PNG: /usr/lib64/libpng.so (found version "1.6.37") - -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") - -- Found GZIP: /usr/bin/gzip - -- Found FFMPEG: /usr/bin/ffmpeg + -- Found OpenMP_CXX: -fopenmp (found version "4.5") + -- Found OpenMP: TRUE (found version "4.5") + -- Found JPEG: /usr/lib64/libjpeg.so (found version "62") + -- Found PNG: /usr/lib64/libpng.so (found version "1.6.37") + -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") + -- Found GZIP: /usr/bin/gzip + -- Found FFMPEG: /usr/bin/ffmpeg -- Performing Test COMPILER_SUPPORTS-ffast-math -- Performing Test COMPILER_SUPPORTS-ffast-math - Success -- Performing Test COMPILER_SUPPORTS-march=native @@ -143,7 +143,7 @@ summary screen will look like this: * JPEG * PNG * ZLIB - + -- <<< Build configuration >>> Build type: RelWithDebInfo Install path: /home/akohlmey/.local @@ -157,7 +157,7 @@ summary screen will look like this: Options: -ffast-math;-march=native -- <<< Linker flags: >>> -- Executable name: lmp - -- Static library flags: + -- Static library flags: -- <<< MPI flags >>> -- MPI includes: /usr/include/mpich-x86_64 -- MPI libraries: /usr/lib64/mpich/lib/libmpicxx.so;/usr/lib64/mpich/lib/libmpi.so; @@ -291,7 +291,7 @@ Some common CMake variables .. list-table:: :header-rows: 1 - + * - Variable - Description * - ``CMAKE_INSTALL_PREFIX`` @@ -313,13 +313,13 @@ Some common CMake variables - Fortran compiler to be used for compilation (default: system specific, ``gfortran`` on Linux) * - ``CXX_COMPILER_LAUNCHER`` - tool to launch the C++ compiler, e.g. ``ccache`` or ``distcc`` for faster compilation (default: empty) - + Some common LAMMPS specific variables ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. list-table:: :header-rows: 1 - + * - Variable - Description * - ``BUILD_MPI`` @@ -438,7 +438,7 @@ the target name to the command. Example: ``cmake --build . --target all`` or * - ``clean`` - remove all generated files - + Choosing generators ------------------- diff --git a/doc/src/Howto_coreshell.rst b/doc/src/Howto_coreshell.rst index 94fb5b7b42..0c1fc924ac 100644 --- a/doc/src/Howto_coreshell.rst +++ b/doc/src/Howto_coreshell.rst @@ -119,7 +119,7 @@ non-polarized ions (ions without an attached satellite particle). The groups, one for the core atoms, another for the shell atoms. Non-polarized ions which might also be included in the treated system should not be included into either of these groups, they are taken -into account by the *group-ID* (2nd argument) of the compute. The +into account by the *group-ID* (second argument) of the compute. The groups can be defined using the :doc:`group *type*\ ` command. Note that to perform thermostatting using this definition of temperature, the :doc:`fix modify temp ` command should be diff --git a/doc/src/Howto_multiple.rst b/doc/src/Howto_multiple.rst index ec2729acf0..f86bcccca4 100644 --- a/doc/src/Howto_multiple.rst +++ b/doc/src/Howto_multiple.rst @@ -91,4 +91,4 @@ With these modifications, the 8 simulations of each script would run on the 3 partitions one after the other until all were finished. Initially, 3 simulations would be started simultaneously, one on each partition. When one finished, that partition would then start -the 4th simulation, and so forth, until all 8 were completed. +the fourth simulation, and so forth, until all 8 were completed. diff --git a/doc/src/Howto_restart.rst b/doc/src/Howto_restart.rst index 6323ba4158..25f311f5a7 100644 --- a/doc/src/Howto_restart.rst +++ b/doc/src/Howto_restart.rst @@ -28,7 +28,7 @@ scripts are based on. If that script had the line added to it, it would produce 2 binary restart files (tmp.restart.50 and tmp.restart.100) as it ran. -This script could be used to read the 1st restart file and re-run the +This script could be used to read the first restart file and re-run the last 50 timesteps: .. code-block:: LAMMPS diff --git a/doc/src/Howto_triclinic.rst b/doc/src/Howto_triclinic.rst index 632d0364d5..13383f44df 100644 --- a/doc/src/Howto_triclinic.rst +++ b/doc/src/Howto_triclinic.rst @@ -85,7 +85,7 @@ where *V* is the volume of the box, **X** is the original vector quantity and **x** is the vector in the LAMMPS basis. There is no requirement that a triclinic box be periodic in any -dimension, though it typically should be in at least the 2nd dimension +dimension, though it typically should be in at least the second dimension of the tilt (y in xy) if you want to enforce a shift in periodic boundary conditions across that boundary. Some commands that work with triclinic boxes, e.g. the :doc:`fix deform ` and :doc:`fix npt ` commands, require periodicity or non-shrink-wrap @@ -120,7 +120,7 @@ The 9 parameters, as well as lx,ly,lz, can be output via the To avoid extremely tilted boxes (which would be computationally inefficient), LAMMPS normally requires that no tilt factor can skew the box more than half the distance of the parallel box length, which -is the 1st dimension in the tilt factor (x for xz). This is required +is the first dimension in the tilt factor (x for xz). This is required both when the simulation box is created, e.g. via the :doc:`create_box ` or :doc:`read_data ` commands, as well as when the box shape changes dynamically during a simulation, @@ -137,7 +137,7 @@ limit during a dynamics run (e.g. via the :doc:`fix deform ` command), then the box is "flipped" to an equivalent shape with a tilt factor within the bounds, so the run can continue. See the :doc:`fix deform ` doc page for further details. -One exception to this rule is if the 1st dimension in the tilt +One exception to this rule is if the first dimension in the tilt factor (x for xy) is non-periodic. In that case, the limits on the tilt factor are not enforced, since flipping the box in that dimension does not change the atom positions due to non-periodicity. In this diff --git a/doc/src/Intro_nonfeatures.rst b/doc/src/Intro_nonfeatures.rst index feb35c7198..fb41b9a054 100644 --- a/doc/src/Intro_nonfeatures.rst +++ b/doc/src/Intro_nonfeatures.rst @@ -34,7 +34,7 @@ Here are suggestions on how to perform these tasks: molecular builder that will generate complex molecular models. See the :doc:`Tools ` doc page for details on tools packaged with LAMMPS. The `Pre/post processing page `_ of the LAMMPS website - describes a variety of 3rd party tools for this task. Furthermore, + describes a variety of third party tools for this task. Furthermore, some LAMMPS internal commands allow to reconstruct, or selectively add topology information, as well as provide the option to insert molecule templates instead of atoms for building bulk molecular systems. diff --git a/doc/src/Manual.rst b/doc/src/Manual.rst index a9afb122ad..773a5fbd75 100644 --- a/doc/src/Manual.rst +++ b/doc/src/Manual.rst @@ -32,11 +32,12 @@ a brief description of the basic code structure of LAMMPS. ---------- -Once you are familiar with LAMMPS, you may want to bookmark :doc:`this page ` since it gives quick access to a doc page for +Once you are familiar with LAMMPS, you may want to bookmark :doc:`this page ` since it gives quick access to a doc page for every LAMMPS command. .. _lws: https://lammps.sandia.gov +.. _user_documentation: .. toctree:: :maxdepth: 2 :numbered: 3 diff --git a/doc/src/Manual_build.rst b/doc/src/Manual_build.rst index 5d5b749678..972f38bf2e 100644 --- a/doc/src/Manual_build.rst +++ b/doc/src/Manual_build.rst @@ -1,60 +1,62 @@ Building the LAMMPS manual ************************** -Depending on how you obtained LAMMPS, the doc directory has up -to 6 sub-directories, 2 Nroff files, and optionally 2 PDF files -plus 2 e-book format files: +Depending on how you obtained LAMMPS and whether you have built the +manual yourself, this directory has a number of sub-directories and +files. Here is a list with descriptions: .. code-block:: bash - src # content files for LAMMPS documentation - html # HTML version of the LAMMPS manual (see html/Manual.html) - utils # tools and settings for building the documentation - docenv # virtualenv for processing the manual sources - doctrees # temporary data from processing the manual - mathjax # code and fonts for rendering math in html - Manual.pdf # large PDF version of entire manual - Developer.pdf # small PDF with info about how LAMMPS is structured - LAMMPS.epub # Manual in ePUB e-book format - LAMMPS.mobi # Manual in MOBI e-book format - lammps.1 # man page for the lammps command - msi2lmp.1 # man page for the msi2lmp command + README # brief info about the documentation + src # content files for LAMMPS documentation + html # HTML version of the LAMMPS manual (see html/Manual.html) + utils # tools and settings for building the documentation + lammps.1 # man page for the lammps command + msi2lmp.1 # man page for the msi2lmp command + Manual.pdf # large PDF version of entire manual + Developer.pdf # small PDF with info about how LAMMPS is structured + LAMMPS.epub # Manual in ePUB e-book format + LAMMPS.mobi # Manual in MOBI e-book format + docenv # virtualenv folder for processing the manual sources + doctrees # temporary data from processing the manual + mathjax # code and fonts for rendering math in html + doxygen # doxygen configuration and output + .gitignore # list of files and folders to be ignored by git + doxygen-warn.log # logfile with warnings from running doxygen + github-development-workflow.md # notes on the LAMMPS development workflow + include-file-conventions.md # notes on LAMMPS' include file conventions -If you downloaded LAMMPS as a tarball from the web site, the html folder -and the PDF files should be included. +If you downloaded LAMMPS as a tarball from `the LAMMPS website `_, +the html folder and the PDF files should be included. If you downloaded LAMMPS from the public git repository, then the HTML and PDF files are not included. Instead you need to create them, in one of two ways: a. You can "fetch" the current HTML and PDF files from the LAMMPS web - site. Just type "make fetch". This should download a html_www + site. Just type ``make fetch``. This should download a html_www directory and Manual_www.pdf/Developer_www.pdf files. Note that if new LAMMPS features have been added more recently than the date of your LAMMPS version, the fetched documentation will include those changes (but your source code will not, unless you update your local repository). -b. You can build the HTML or PDF files yourself, by typing "make html" - or "make pdf". This requires various tools including Sphinx, git, - and the MathJax javascript library, which the build process will attempt - to download automatically into a virtual environment in the folder - doc/docenv and the folder mathjax, respectively, if not already available. - This download is required only once, unless you type "make clean-all". - After that, viewing and processing of the documentation can be done - without internet access. To generate the PDF version of the manual, - the PDFLaTeX software and several LaTeX packages are required as well. - However, those cannot be installed automatically at the moment. +b. You can build the HTML or PDF files yourself, by typing ``make html`` + or ``make pdf``. This requires various tools and files. Some of them + have to be installed (more on that below). For the rest the build + process will attempt to download and install them into a python + virtual environment and local folders. This download is required + only once, unless you type ``make clean-all``. After that, viewing and + processing of the documentation can be done without internet access. ---------- -The generation of all documentation is managed by the Makefile in -the doc directory. +The generation of all documentation is managed by the Makefile in the +doc directory. The following documentation related make commands are +available: .. code-block:: bash - Documentation Build Options: - make html # generate HTML in html dir using Sphinx make pdf # generate 2 PDF files (Manual.pdf,Developer.pdf) # in doc dir via htmldoc and pdflatex @@ -62,8 +64,10 @@ the doc directory. # as a tarball and unpack into html dir and 2 PDFs make epub # generate LAMMPS.epub in ePUB format using Sphinx make mobi # generate LAMMPS.mobi in MOBI format using ebook-convert + make clean # remove intermediate RST files created by HTML build make clean-all # remove entire build folder and any cached data + make anchor_check # check for duplicate anchor labels make style_check # check for complete and consistent style lists make package_check # check for complete and consistent package lists @@ -74,29 +78,30 @@ the doc directory. Installing prerequisites for HTML build ======================================= -To run the HTML documentation build toolchain, Python 3 and virtualenv -have to be installed. Here are instructions for common setups: +To run the HTML documentation build toolchain, python 3, git, doxygen, +and virtualenv have to be installed locally. Here are instructions for +common setups: Ubuntu ------ .. code-block:: bash - sudo apt-get install python-virtualenv + sudo apt-get install python-virtualenv git doxygen Fedora (up to version 21) and Red Hat Enterprise Linux or CentOS (up to version 7.x) ------------------------------------------------------------------------------------ .. code-block:: bash - sudo yum install python3-virtualenv + sudo yum install python3-virtualenv git doxygen Fedora (since version 22) ------------------------- .. code-block:: bash - sudo dnf install python3-virtualenv + sudo dnf install python3-virtualenv git doxygen MacOS X ------- @@ -120,22 +125,92 @@ Once Python 3 is installed, open a Terminal and type This will install virtualenv from the Python Package Index. ----------- +Installing prerequisites for PDF build +====================================== -Installing prerequisites for epub build -======================================= +In addition to the tools needed for building the HTML format manual, +a working LaTeX installation with support for PDFLaTeX and a selection +of LaTeX styles/packages are required. -ePUB ----- +Installing prerequisites for e-book reader builds +================================================= -Same as for HTML. This uses mostly the same tools and configuration -files as the HTML tree. In addition it uses LaTeX to convert embedded +In addition to the tools needed for building the HTML format manual, +a working LaTeX installation with a few add-on LaTeX packages +as well as the ``dvipng`` tool are required to convert embedded math expressions transparently into embedded images. -For converting the generated ePUB file to a MOBI format file -(for e-book readers, like Kindle, that cannot read ePUB), you -also need to have the 'ebook-convert' tool from the "calibre" -software installed. `http://calibre-ebook.com/ `_ -You first create the ePUB file and then convert it with 'make mobi' -On the Kindle readers in particular, you also have support for -PDF files, so you could download and view the PDF version as an alternative. +For converting the generated ePUB file to a MOBI format file (for e-book +readers, like Kindle, that cannot read ePUB), you also need to have the +``ebook-convert`` tool from the "calibre" software +installed. `http://calibre-ebook.com/ `_ +Typing ``make mobi`` will first create the ePUB file and then convert +it. On the Kindle readers in particular, you also have support for PDF +files, so you could download and view the PDF version as an alternative. + + +Instructions for Developers +=========================== + +When adding new styles or options to the LAMMPS code, corresponding +documentation is required and either existing files in the ``src`` +folder need to be updated or new files added. These files are written +in `reStructuredText `_ markup for translation with the Sphinx tool. + +Before contributing any documentation, please check that both the HTML +and the PDF format documentation can translate without errors. Please also +check the output to the console for any warnings or problems. There will +be multiple tests run automatically: + +- A test for correctness of all anchor labels and their references + +- A test that all LAMMPS packages (= folders with sources in + ``lammps/src``) are documented and listed. A typical warning shows + the name of the folder with the suspected new package code and the + documentation files where they need to be listed: + + .. parsed-literal:: + + Found 33 standard and 41 user packages + Standard package NEWPACKAGE missing in Packages_standard.rst + Standard package NEWPACKAGE missing in Packages_details.rst + +- A test that only standard, printable ASCII text characters are used. + This runs the command ``env LC_ALL=C grep -n '[^ -~]' src/*.rst`` and + thus prints all offending lines with filename and line number + prepended to the screen. Special characters like the Angstrom + :math:`\mathrm{\mathring{A}}` should be typeset with embedded math + (like this ``:math:`\mathrm{\mathring{A}}```\ ). + +- A test whether all styles are documented and listed in their + respective overview pages. A typical output with warnings looks like this: + + .. parsed-literal:: + + Parsed style names w/o suffixes from C++ tree in ../src: + Angle styles: 21 Atom styles: 24 + Body styles: 3 Bond styles: 17 + Command styles: 41 Compute styles: 143 + Dihedral styles: 16 Dump styles: 26 + Fix styles: 223 Improper styles: 13 + Integrate styles: 4 Kspace styles: 15 + Minimize styles: 9 Pair styles: 234 + Reader styles: 4 Region styles: 8 + Compute style entry newcomp is missing or incomplete in Commands_compute.rst + Compute style entry newcomp is missing or incomplete in compute.rst + Fix style entry newfix is missing or incomplete in Commands_fix.rst + Fix style entry newfix is missing or incomplete in fix.rst + Pair style entry new is missing or incomplete in Commands_pair.rst + Pair style entry new is missing or incomplete in pair_style.rst + Found 6 issue(s) with style lists + + +In addition, there is the option to run a spellcheck on the entire +manual with ``make spelling``. This requires `a library called enchant +`_. To avoid printing out *false +positives* (e.g. keywords, names, abbreviations) those can be added to +the file ``lammps/doc/utils/sphinx-config/false_positives.txt``. + +.. _rst: https://docutils.readthedocs.io/en/sphinx-docs/user/rst/quickstart.html + +.. _lws: https://lammps.sandia.gov diff --git a/doc/src/Modify_fix.rst b/doc/src/Modify_fix.rst index 9a97e30fbe..556c858735 100644 --- a/doc/src/Modify_fix.rst +++ b/doc/src/Modify_fix.rst @@ -27,7 +27,7 @@ derived class. See fix.h for details. +---------------------------+--------------------------------------------------------------------------------------------+ | setup_pre_force | called before force computation in setup (optional) | +---------------------------+--------------------------------------------------------------------------------------------+ -| setup | called immediately before the 1st timestep and after forces are computed (optional) | +| setup | called immediately before the first timestep and after forces are computed (optional) | +---------------------------+--------------------------------------------------------------------------------------------+ | min_setup_pre_force | like setup_pre_force, but for minimizations instead of MD runs (optional) | +---------------------------+--------------------------------------------------------------------------------------------+ diff --git a/doc/src/Modify_kspace.rst b/doc/src/Modify_kspace.rst index e1b10eac8d..b4f92e4116 100644 --- a/doc/src/Modify_kspace.rst +++ b/doc/src/Modify_kspace.rst @@ -10,12 +10,12 @@ Ewald.cpp is an example of computing K-space interactions. Here is a brief description of methods you define in your new derived class. See kspace.h for details. -+---------------+----------------------------------------------+ -| init | initialize the calculation before a run | -+---------------+----------------------------------------------+ -| setup | computation before the 1st timestep of a run | -+---------------+----------------------------------------------+ -| compute | every-timestep computation | -+---------------+----------------------------------------------+ -| memory_usage | tally of memory usage | -+---------------+----------------------------------------------+ ++---------------+------------------------------------------------+ +| init | initialize the calculation before a run | ++---------------+------------------------------------------------+ +| setup | computation before the first timestep of a run | ++---------------+------------------------------------------------+ +| compute | every-timestep computation | ++---------------+------------------------------------------------+ +| memory_usage | tally of memory usage | ++---------------+------------------------------------------------+ diff --git a/doc/src/Packages_details.rst b/doc/src/Packages_details.rst index 2353df777f..cc9f675e26 100644 --- a/doc/src/Packages_details.rst +++ b/doc/src/Packages_details.rst @@ -489,7 +489,7 @@ interactions. These include Ewald, particle-particle particle-mesh Building with this package requires a 1d FFT library be present on your system for use by the PPPM solvers. This can be the KISS FFT -library provided with LAMMPS, 3rd party libraries like FFTW, or a +library provided with LAMMPS, third party libraries like FFTW, or a vendor-supplied FFT library. See the :doc:`Build settings ` doc page for details on how to select different FFT options for your LAMPMS build. diff --git a/doc/src/Python_library.rst b/doc/src/Python_library.rst index 2100074c4e..370c67b3f8 100644 --- a/doc/src/Python_library.rst +++ b/doc/src/Python_library.rst @@ -254,12 +254,3 @@ following steps: * You should now be able to invoke the new interface function from a Python script. ----------- - -.. autoclass:: lammps.lammps - :members: - :no-undoc-members: - -.. autoclass:: lammps.NeighList - :members: - :no-undoc-members: diff --git a/doc/src/Python_test.rst b/doc/src/Python_test.rst index 55a1c0a2d3..1f7f9d46e8 100644 --- a/doc/src/Python_test.rst +++ b/doc/src/Python_test.rst @@ -10,7 +10,7 @@ and type: >>> lmp = lammps() If you get no errors, you're ready to use LAMMPS from Python. If the -2nd command fails, the most common error to see is +second command fails, the most common error to see is .. parsed-literal:: diff --git a/doc/src/Run_options.rst b/doc/src/Run_options.rst index afdae20376..054ed66d57 100644 --- a/doc/src/Run_options.rst +++ b/doc/src/Run_options.rst @@ -324,17 +324,17 @@ physical processors is done by MPI before LAMMPS begins. It may be useful in some cases to alter the rank order. E.g. to insure that cores within each node are ranked in a desired order. Or when using the :doc:`run_style verlet/split ` command with 2 partitions -to insure that a specific Kspace processor (in the 2nd partition) is -matched up with a specific set of processors in the 1st partition. +to insure that a specific Kspace processor (in the second partition) is +matched up with a specific set of processors in the first partition. See the :doc:`Speed tips ` doc page for more details. If the keyword *nth* is used with a setting *N*\ , then it means every Nth processor will be moved to the end of the ranking. This is useful when using the :doc:`run_style verlet/split ` command with 2 partitions via the -partition command-line switch. The first set of -processors will be in the first partition, the 2nd set in the 2nd +processors will be in the first partition, the second set in the second partition. The -reorder command-line switch can alter this so that -the 1st N procs in the 1st partition and one proc in the 2nd 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. This can boost performance. For example, if you use "-reorder nth 4" and "-partition 9 3" and you are running on 12 processors, the diff --git a/doc/src/angle_charmm.rst b/doc/src/angle_charmm.rst index a8c227c765..98b2f468a8 100644 --- a/doc/src/angle_charmm.rst +++ b/doc/src/angle_charmm.rst @@ -37,7 +37,7 @@ The *charmm* angle style uses the potential E = K (\theta - \theta_0)^2 + K_{ub} (r - r_{ub})^2 with an additional Urey_Bradley term based on the distance :math:`r` between -the 1st and 3rd atoms in the angle. :math:`K`, :math:`\theta_0`, +the first and third atoms in the angle. :math:`K`, :math:`\theta_0`, :math:`K_{ub}`, and :math:`R_{ub}` are coefficients defined for each angle type. diff --git a/doc/src/angle_coeff.rst b/doc/src/angle_coeff.rst index 9066b45462..565d094d4d 100644 --- a/doc/src/angle_coeff.rst +++ b/doc/src/angle_coeff.rst @@ -31,7 +31,7 @@ Angle coefficients can also be set in the data file read by the :doc:`read_data ` command or in a restart file. N can be specified in one of two ways. An explicit numeric value can -be used, as in the 1st example above. Or a wild-card asterisk can be +be used, as in the first example above. Or a wild-card asterisk can be used to set the coefficients for multiple angle types. This takes the form "\*" or "\*n" or "n\*" or "m\*n". If N = the number of angle types, then an asterisk with no numeric values means all types from 1 to N. A @@ -53,7 +53,7 @@ same format as the arguments of the :doc:`angle_coeff ` command in script, except that wild-card asterisks should not be used since coefficients for all N types must be listed in the file. For example, under the "Angle Coeffs" section of a data file, the line that -corresponds to the 1st example above would be listed as +corresponds to the first example above would be listed as .. parsed-literal:: diff --git a/doc/src/angle_table.rst b/doc/src/angle_table.rst index 729d890d67..77fbf73047 100644 --- a/doc/src/angle_table.rst +++ b/doc/src/angle_table.rst @@ -75,7 +75,7 @@ parenthesized comments): ... 181 180.0 0.0 0.0 -A section begins with a non-blank line whose 1st character is not a +A section begins with a non-blank line whose first character is not a "#"; blank lines or lines starting with "#" can be used as comments between sections. The first line begins with a keyword which identifies the section. The line can contain additional text, but the @@ -99,7 +99,7 @@ is in the tabulated file (with effectively no preliminary interpolation), you should set Ntable = Nfile. The "FP" parameter is optional. If used, it is followed by two values -fplo and fphi, which are the 2nd derivatives at the innermost and +fplo and fphi, which are the second derivatives at the innermost and outermost angle settings. These values are needed by the spline construction routines. If not specified by the "FP" parameter, they are estimated (less accurately) by the first two and last two @@ -110,9 +110,9 @@ equilibrium angle value, which is used, for example, by the :doc:`fix shake ` instance * control = name of the AtC sub-command * physics_type = *thermal* or *momentum* @@ -52,7 +52,7 @@ the finite element temperature. *flux* is a similar mode, but rather adds energy to the atoms based on conservation of energy. *correction_max_iterations* sets the maximum number of iterations to -compute the 2nd order in time correction term for lambda with the +compute the second order in time correction term for lambda with the fractional step method. The method uses the same tolerance as the controller's matrix solver. diff --git a/doc/src/atc_control_thermal.rst b/doc/src/atc_control_thermal.rst index dc3f28f8eb..d6d6c25405 100644 --- a/doc/src/atc_control_thermal.rst +++ b/doc/src/atc_control_thermal.rst @@ -56,7 +56,7 @@ adds energy to the atoms based on conservation of energy. *hoover* and atoms. *correction_max_iterations* sets the maximum number of iterations to -compute the 2nd order in time correction term for lambda with the +compute the second order in time correction term for lambda with the fractional step method. The method uses the same tolerance as the controller's matrix solver. diff --git a/doc/src/atc_hardy_fields.rst b/doc/src/atc_hardy_fields.rst index 70f3360af8..bef051bbe8 100644 --- a/doc/src/atc_hardy_fields.rst +++ b/doc/src/atc_hardy_fields.rst @@ -25,8 +25,8 @@ Syntax - temperature : temperature derived from the relative atomic kinetic energy - kinetic_temperature : temperature derived from the full kinetic energy - number_density : simple kernel estimation of number of atoms per unit volume - - stress : Cauchy stress tensor for eulerian analysis (atom_element_map), or 1st Piola-Kirchhoff stress tensor for lagrangian analysis - - transformed_stress : 1st Piola-Kirchhoff stress tensor for eulerian analysis (atom_element_map), or Cauchy stress tensor for lagrangian analysis + - stress : Cauchy stress tensor for eulerian analysis (atom_element_map), or first Piola-Kirchhoff stress tensor for lagrangian analysis + - transformed_stress : first Piola-Kirchhoff stress tensor for eulerian analysis (atom_element_map), or Cauchy stress tensor for lagrangian analysis - heat_flux : spatial heat flux vector for eulerian, or referential heat flux vector for lagrangian - potential_energy : potential energy per unit volume - kinetic_energy : kinetic energy per unit volume @@ -37,7 +37,7 @@ Syntax - eshelby_stress : configurational stress (energy-momentum) tensor defined by [Eshelby]_ - vacancy_concentration : volume fraction of vacancy content - type_concentration : volume fraction of a specific atom type - + Examples """""""" diff --git a/doc/src/atc_hardy_gradients.rst b/doc/src/atc_hardy_gradients.rst index 36fad76afe..2e7649d73c 100644 --- a/doc/src/atc_hardy_gradients.rst +++ b/doc/src/atc_hardy_gradients.rst @@ -23,8 +23,8 @@ Syntax - temperature : temperature derived from the relative atomic kinetic energy - kinetic_temperature : temperature derived from the full kinetic energy - number_density : simple kernel estimation of number of atoms per unit volume - - stress : Cauchy stress tensor for eulerian analysis (atom_element_map), or 1st Piola-Kirchhoff stress tensor for lagrangian analysis - - transformed_stress : 1st Piola-Kirchhoff stress tensor for eulerian analysis (atom_element_map), or Cauchy stress tensor for lagrangian analysis + - stress : Cauchy stress tensor for eulerian analysis (atom_element_map), or first Piola-Kirchhoff stress tensor for lagrangian analysis + - transformed_stress : first Piola-Kirchhoff stress tensor for eulerian analysis (atom_element_map), or Cauchy stress tensor for lagrangian analysis - heat_flux : spatial heat flux vector for eulerian, or referential heat flux vector for lagrangian - potential_energy : potential energy per unit volume - kinetic_energy : kinetic energy per unit volume diff --git a/doc/src/atc_hardy_kernel.rst b/doc/src/atc_hardy_kernel.rst index a52f2a9968..74316ec8b2 100644 --- a/doc/src/atc_hardy_kernel.rst +++ b/doc/src/atc_hardy_kernel.rst @@ -25,7 +25,7 @@ Syntax - *quartic_bar* : - *quartic_cylinder* : - *quartic_sphere* : - + Examples diff --git a/doc/src/atc_hardy_rates.rst b/doc/src/atc_hardy_rates.rst index 890ada0c47..56166087d7 100644 --- a/doc/src/atc_hardy_rates.rst +++ b/doc/src/atc_hardy_rates.rst @@ -23,8 +23,8 @@ Syntax - temperature : temperature derived from the relative atomic kinetic energy - kinetic_temperature : temperature derived from the full kinetic energy - number_density : simple kernel estimation of number of atoms per unit volume - - stress : Cauchy stress tensor for eulerian analysis (atom_element_map), or 1st Piola-Kirchhoff stress tensor for lagrangian analysis - - transformed_stress : 1st Piola-Kirchhoff stress tensor for eulerian analysis (atom_element_map), or Cauchy stress tensor for lagrangian analysis + - stress : Cauchy stress tensor for eulerian analysis (atom_element_map), or first Piola-Kirchhoff stress tensor for lagrangian analysis + - transformed_stress : first Piola-Kirchhoff stress tensor for eulerian analysis (atom_element_map), or Cauchy stress tensor for lagrangian analysis - heat_flux : spatial heat flux vector for eulerian, or referential heat flux vector for lagrangian - potential_energy : potential energy per unit volume - kinetic_energy : kinetic energy per unit volume diff --git a/doc/src/atc_remove_species.rst b/doc/src/atc_remove_species.rst index 20e1f6a742..5c4fd771ba 100644 --- a/doc/src/atc_remove_species.rst +++ b/doc/src/atc_remove_species.rst @@ -38,7 +38,7 @@ Related AtC commands - :doc:`fix_modify AtC add_species ` - :doc:`fix_modify AtC add_molecule ` - :doc:`fix_modify AtC remove_molecule ` - + Default """"""" diff --git a/doc/src/atc_set_reference_pe.rst b/doc/src/atc_set_reference_pe.rst index ff4d95526f..8053a1df98 100644 --- a/doc/src/atc_set_reference_pe.rst +++ b/doc/src/atc_set_reference_pe.rst @@ -22,7 +22,7 @@ Examples fix_modify AtC set reference_potential_energy fix_modify AtC set reference_potential_energy -0.05 - fix_modify AtC set reference_potential_energy myPEvalues + fix_modify AtC set reference_potential_energy myPEvalues Description """"""""""" diff --git a/doc/src/atc_time_integration.rst b/doc/src/atc_time_integration.rst index 580be0430c..cf746dde0d 100644 --- a/doc/src/atc_time_integration.rst +++ b/doc/src/atc_time_integration.rst @@ -33,11 +33,11 @@ Command to select the thermal or momentum time integration. Options for thermal time integration: *gear* - atomic velocity update with 2nd order Verlet, nodal temperature update - with 3rd or 4th order Gear, thermostats based on controlling power + atomic velocity update with second order Verlet, nodal temperature update + with third or fourth order Gear, thermostats based on controlling power *fractional_step* - atomic velocity update with 2nd order Verlet, mixed nodal temperature + atomic velocity update with second order Verlet, mixed nodal temperature update, 3/4 Gear for continuum and 2 Verlet for atomic contributions, thermostats based on controlling discrete energy changes @@ -46,18 +46,18 @@ Options for thermal time integration: Options for momentum time integration: *verlet* - atomic velocity update with 2nd order Verlet, nodal temperature update - with 2nd order Verlet, kinetostats based on controlling force + atomic velocity update with second order Verlet, nodal temperature update + with second order Verlet, kinetostats based on controlling force *fractional_step* - atomic velocity update with 2nd order Verlet, mixed nodal momentum - update, 2nd order Verlet for continuum and exact 2nd order Verlet for + atomic velocity update with second order Verlet, mixed nodal momentum + update, second order Verlet for continuum and exact second order Verlet for atomic contributions, kinetostats based on controlling discrete momentum changes *gear* - atomic velocity update with 2nd order Verlet, nodal temperature update - with 3rd or 4th order Gear, kinetostats based on controlling power. + atomic velocity update with second order Verlet, nodal temperature update + with third or fourth order Gear, kinetostats based on controlling power. --------- diff --git a/doc/src/bond_coeff.rst b/doc/src/bond_coeff.rst index 416190a367..39d1bbcd17 100644 --- a/doc/src/bond_coeff.rst +++ b/doc/src/bond_coeff.rst @@ -32,7 +32,7 @@ Bond coefficients can also be set in the data file read by the :doc:`read_data ` command or in a restart file. N can be specified in one of two ways. An explicit numeric value can -be used, as in the 1st example above. Or a wild-card asterisk can be +be used, as in the first example above. Or a wild-card asterisk can be used to set the coefficients for multiple bond types. This takes the form "\*" or "\*n" or "n\*" or "m\*n". If N = the number of bond types, then an asterisk with no numeric values means all types from 1 to N. A @@ -54,7 +54,7 @@ same format as the arguments of the bond_coeff command in an input script, except that wild-card asterisks should not be used since coefficients for all N types must be listed in the file. For example, under the "Bond Coeffs" section of a data file, the line that -corresponds to the 1st example above would be listed as +corresponds to the first example above would be listed as .. parsed-literal:: diff --git a/doc/src/bond_fene.rst b/doc/src/bond_fene.rst index 3ba9672294..3929665b4f 100644 --- a/doc/src/bond_fene.rst +++ b/doc/src/bond_fene.rst @@ -38,8 +38,8 @@ The *fene* bond style uses the potential to define a finite extensible nonlinear elastic (FENE) potential :ref:`(Kremer) `, used for bead-spring polymer models. The first -term is attractive, the 2nd Lennard-Jones term is repulsive. The -first term extends to :math:`R_0`, the maximum extent of the bond. The 2nd +term is attractive, the second Lennard-Jones term is repulsive. The +first term extends to :math:`R_0`, the maximum extent of the bond. The second term is cutoff at :math:`2^\frac{1}{6} \sigma`, the minimum of the LJ potential. The following coefficients must be defined for each bond type via the diff --git a/doc/src/bond_fene_expand.rst b/doc/src/bond_fene_expand.rst index 032b726121..0eef1711d5 100644 --- a/doc/src/bond_fene_expand.rst +++ b/doc/src/bond_fene_expand.rst @@ -32,12 +32,12 @@ The *fene/expand* bond style uses the potential to define a finite extensible nonlinear elastic (FENE) potential :ref:`(Kremer) `, used for bead-spring polymer models. The first -term is attractive, the 2nd Lennard-Jones term is repulsive. +term is attractive, the second Lennard-Jones term is repulsive. The *fene/expand* bond style is similar to *fene* except that an extra shift factor of :math:`\Delta` (positive or negative) is added to :math:`r` to effectively change the bead size of the bonded atoms. The first term -now extends to :math:`R_0 + \Delta` and the 2nd term is cutoff at :math:`2^\frac{1}{6} \sigma + \Delta`. +now extends to :math:`R_0 + \Delta` and the second term is cutoff at :math:`2^\frac{1}{6} \sigma + \Delta`. The following coefficients must be defined for each bond type via the :doc:`bond_coeff ` command as in the example above, or in diff --git a/doc/src/bond_table.rst b/doc/src/bond_table.rst index 445face231..d5bbeb7790 100644 --- a/doc/src/bond_table.rst +++ b/doc/src/bond_table.rst @@ -74,7 +74,7 @@ parenthesized comments): ... 101 1.00 338.0000 -1352.0000 -A section begins with a non-blank line whose 1st character is not a +A section begins with a non-blank line whose first character is not a "#"; blank lines or lines starting with "#" can be used as comments between sections. The first line begins with a keyword which identifies the section. The line can contain additional text, but the @@ -109,9 +109,9 @@ equilibrium bond length, which is used, for example, by the :doc:`fix shake ` do boxes in LAMMPS. LAMMPS normally requires that no tilt factor can skew the box more -than half the distance of the parallel box length, which is the 1st +than half the distance of the parallel box length, which is the first dimension in the tilt factor (x for xz). If *tilt* is set to *small*\ , which is the default, then an error will be generated if a box is created which exceeds this limit. If *tilt* diff --git a/doc/src/compute_adf.rst b/doc/src/compute_adf.rst index a9375fa038..08e7dcfd35 100644 --- a/doc/src/compute_adf.rst +++ b/doc/src/compute_adf.rst @@ -82,9 +82,9 @@ neighbor atom in each requested ADF. is what is specified with the :doc:`neighbor ` command. The *itypeN*\ ,\ *jtypeN*\ ,\ *ktypeN* settings can be specified in one of two -ways. An explicit numeric value can be used, as in the 1st example +ways. An explicit numeric value can be used, as in the first example above. Or a wild-card asterisk can be used to specify a range of atom -types as in the 2nd example above. +types as in the second example above. This takes the form "\*" or "\*n" or "n\*" or "m\*n". If N = the number of atom types, then an asterisk with no numeric values means all types from 1 to N. A leading asterisk means all types from 1 to n @@ -92,12 +92,12 @@ all types from 1 to N. A leading asterisk means all types from 1 to n (inclusive). A middle asterisk means all types from m to n (inclusive). -If *itypeN*\ , *jtypeN*\ , and *ktypeN* are single values, as in the 1st example +If *itypeN*\ , *jtypeN*\ , and *ktypeN* are single values, as in the first example above, this means that the ADF is computed where atoms of type *itypeN* are the central atom, and neighbor atoms of type *jtypeN* and *ktypeN* are forming the angle. If any of *itypeN*\ , *jtypeN*\ , or *ktypeN* represent a range of values via -the wild-card asterisk, as in the 2nd example above, this means that the +the wild-card asterisk, as in the second example above, this means that the ADF is computed where atoms of any of the range of types represented by *itypeN* are the central atom, and the angle is formed by two neighbors, one neighbor in the range of types represented by *jtypeN* and another neighbor diff --git a/doc/src/compute_chunk_atom.rst b/doc/src/compute_chunk_atom.rst index ead17e3f7c..2ea12fb90c 100644 --- a/doc/src/compute_chunk_atom.rst +++ b/doc/src/compute_chunk_atom.rst @@ -218,8 +218,8 @@ into ellipses. The created bins (and hence the chunk IDs) are numbered consecutively from 1 to the number of bins = *Nchunk*\ . For *bin2d* and *bin3d*\ , the numbering varies most rapidly in the first dimension (which could be -x, y, or z), next rapidly in the 2nd dimension, and most slowly in the -3rd dimension. For *bin/sphere*\ , the bin with smallest radii is chunk +x, y, or z), next rapidly in the second dimension, and most slowly in the +third dimension. For *bin/sphere*\ , the bin with smallest radii is chunk 1 and the bni with largest radii is chunk Nchunk = *ncbin*\ . For *bin/cylinder*\ , the numbering varies most rapidly in the dimension along the cylinder axis and most slowly in the radial direction. @@ -614,7 +614,7 @@ Note that for the *bin/sphere* style, the radii *srmin* and *srmax* are scaled by the lattice spacing or reduced value of the *x* dimension. Note that for the *bin/cylinder* style, the radii *crmin* and *crmax* -are scaled by the lattice spacing or reduced value of the 1st +are scaled by the lattice spacing or reduced value of the first dimension perpendicular to the cylinder axis. E.g. y for an x-axis cylinder, x for a y-axis cylinder, and x for a z-axis cylinder. diff --git a/doc/src/compute_coord_atom.rst b/doc/src/compute_coord_atom.rst index b8f2b9e8ee..6a7cf7cb4a 100644 --- a/doc/src/compute_coord_atom.rst +++ b/doc/src/compute_coord_atom.rst @@ -63,7 +63,7 @@ keywords are listed, a single coordination number is calculated, which includes atoms of all types (same as the "\*" format, see below). The *typeN* keywords can be specified in one of two ways. An explicit -numeric value can be used, as in the 2nd example above. Or a +numeric value can be used, as in the second example above. Or a wild-card asterisk can be used to specify a range of atom types. This takes the form "\*" or "\*n" or "n\*" or "m\*n". If N = the number of atom types, then an asterisk with no numeric values means all types diff --git a/doc/src/compute_displace_atom.rst b/doc/src/compute_displace_atom.rst index 9e1488cdf1..cb44d153ac 100644 --- a/doc/src/compute_displace_atom.rst +++ b/doc/src/compute_displace_atom.rst @@ -36,7 +36,7 @@ all effects due to atoms passing through periodic boundaries. A vector of four quantities per atom is calculated by this compute. The first 3 elements of the vector are the dx,dy,dz displacements. -The 4th component is the total displacement, i.e. sqrt(dx\*dx + dy\*dy + +The fourth component is the total displacement, i.e. sqrt(dx\*dx + dy\*dy + dz\*dz). The displacement of an atom is from its original position at the time diff --git a/doc/src/compute_fep.rst b/doc/src/compute_fep.rst index 4700817609..c2e0271ee8 100644 --- a/doc/src/compute_fep.rst +++ b/doc/src/compute_fep.rst @@ -224,7 +224,7 @@ the pair\_\*.cpp file associated with the potential. Similar to the :doc:`pair_coeff ` command, I and J can be specified in one of two ways. Explicit numeric values can be used for -each, as in the 1st example above. I <= J is required. LAMMPS sets +each, as in the first example above. I <= J is required. LAMMPS sets the coefficients for the symmetric J,I interaction to the same values. A wild-card asterisk can be used in place of or in conjunction with the I,J arguments to set the coefficients for multiple pairs of diff --git a/doc/src/compute_group_group.rst b/doc/src/compute_group_group.rst index ba29090d5e..03ae693b56 100644 --- a/doc/src/compute_group_group.rst +++ b/doc/src/compute_group_group.rst @@ -64,7 +64,7 @@ If the *kspace* keyword is set to *yes*\ , which is not the default, and if a :doc:`kspace_style ` is defined, then the interaction energy will include a Kspace component which is the long-range Coulombic energy between all the atoms in the first group and all the -atoms in the 2nd group. Likewise, the interaction force calculated by +atoms in the second group. Likewise, the interaction force calculated by this compute will include the force on the compute group atoms due to long-range Coulombic interactions with atoms in the specified group2. diff --git a/doc/src/compute_msd.rst b/doc/src/compute_msd.rst index 94ab6a1579..f88e960802 100644 --- a/doc/src/compute_msd.rst +++ b/doc/src/compute_msd.rst @@ -38,7 +38,7 @@ parameter of mean-squared displacement, see the :doc:`compute msd/nongauss `, the second is in distance\^4 units, and -the 3rd is dimensionless. +the third is dimensionless. Restrictions """""""""""" diff --git a/doc/src/compute_property_chunk.rst b/doc/src/compute_property_chunk.rst index ed49833a48..e567c96a80 100644 --- a/doc/src/compute_property_chunk.rst +++ b/doc/src/compute_property_chunk.rst @@ -63,7 +63,7 @@ chunkID. This means that the original chunk IDs (e.g. molecule IDs) will have been compressed to remove chunk IDs with no atoms assigned to them. Thus a compressed chunk ID of 3 may correspond to an original chunk ID (molecule ID in this case) of 415. The *id* attribute will -then be 415 for the 3rd chunk. +then be 415 for the third chunk. The *coordN* attributes can only be used if a *binning* style was used in the :doc:`compute chunk/atom ` command referenced diff --git a/doc/src/compute_rdf.rst b/doc/src/compute_rdf.rst index 0aedfe09aa..9f292accd1 100644 --- a/doc/src/compute_rdf.rst +++ b/doc/src/compute_rdf.rst @@ -97,7 +97,7 @@ listed, then a separate histogram is generated for each *itype*\ ,\ *jtype* pair. The *itypeN* and *jtypeN* settings can be specified in one of two -ways. An explicit numeric value can be used, as in the 4th example +ways. An explicit numeric value can be used, as in the fourth example above. Or a wild-card asterisk can be used to specify a range of atom types. This takes the form "\*" or "\*n" or "n\*" or "m\*n". If N = the number of atom types, then an asterisk with no numeric values means @@ -106,11 +106,11 @@ all types from 1 to N. A leading asterisk means all types from 1 to n (inclusive). A middle asterisk means all types from m to n (inclusive). -If both *itypeN* and *jtypeN* are single values, as in the 4th example +If both *itypeN* and *jtypeN* are single values, as in the fourth example above, this means that a g(r) is computed where atoms of type *itypeN* are the central atom, and atoms of type *jtypeN* are the distribution atom. If either *itypeN* and *jtypeN* represent a range of values via -the wild-card asterisk, as in the 5th example above, this means that a +the wild-card asterisk, as in the fifth example above, this means that a g(r) is computed where atoms of any of the range of types represented by *itypeN* are the central atom, and atoms of any of the range of types represented by *jtypeN* are the distribution atom. diff --git a/doc/src/compute_temp_cs.rst b/doc/src/compute_temp_cs.rst index f3c82c2b1a..edd1d0b139 100644 --- a/doc/src/compute_temp_cs.rst +++ b/doc/src/compute_temp_cs.rst @@ -49,7 +49,7 @@ respective group IDs, which can be defined using the must be the same and there should be one bond defined between a pair of atoms in the two groups. Non-polarized ions which might also be included in the treated system should not be included into either of -these groups, they are taken into account by the *group-ID* (2nd +these groups, they are taken into account by the *group-ID* (second argument) of the compute. The temperature is calculated by the formula KE = dim/2 N k T, where diff --git a/doc/src/compute_ti.rst b/doc/src/compute_ti.rst index 79fc56178c..30ea9f7057 100644 --- a/doc/src/compute_ti.rst +++ b/doc/src/compute_ti.rst @@ -76,7 +76,7 @@ with respect to *lambda*\ . To perform this calculation, you provide one or more atom types as *atype*\ . *Atype* can be specified in one of two ways. An explicit -numeric values can be used, as in the 1st example above. Or a +numeric values can be used, as in the first example above. Or a wildcard asterisk can be used in place of or in conjunction with the *atype* argument to select multiple atom types. This takes the form "\*" or "\*n" or "n\*" or "m\*n". If N = the number of atom types, then diff --git a/doc/src/compute_vacf.rst b/doc/src/compute_vacf.rst index ce2757c115..1ca69e104a 100644 --- a/doc/src/compute_vacf.rst +++ b/doc/src/compute_vacf.rst @@ -33,7 +33,7 @@ A vector of four quantities is calculated by this compute. The first 3 elements of the vector are vx \* vx0 (and similarly for the y and z components), summed and averaged over atoms in the group. Vx is the current x-component of velocity for the atom, vx0 is the initial -x-component of velocity for the atom. The 4th element of the vector +x-component of velocity for the atom. The fourth element of the vector is the total VACF, i.e. (vx\*vx0 + vy\*vy0 + vz\*vz0), summed and averaged over atoms in the group. diff --git a/doc/src/dihedral_charmm.rst b/doc/src/dihedral_charmm.rst index 38cb18d172..d3f164e369 100644 --- a/doc/src/dihedral_charmm.rst +++ b/doc/src/dihedral_charmm.rst @@ -73,7 +73,7 @@ or :doc:`read_restart ` commands: The weighting factor is required to correct for double counting pairwise non-bonded Lennard-Jones interactions in cyclic systems or when using the CHARMM dihedral style with non-CHARMM force fields. -With the CHARMM dihedral style, interactions between the 1st and 4th +With the CHARMM dihedral style, interactions between the first and fourth atoms in a dihedral are skipped during the normal non-bonded force computation and instead evaluated as part of the dihedral using special epsilon and sigma values specified with the @@ -93,7 +93,7 @@ which applies to all 1-4 interactions in the system. For CHARMM force fields, the special_bonds 1-4 interaction scaling factor should be set to 0.0. Since the corresponding 1-4 non-bonded interactions are computed with the dihedral. This means that if any of the weighting -factors defined as dihedral coefficients (4th coeff above) are +factors defined as dihedral coefficients (fourth coeff above) are non-zero, then you must use a pair style with "lj/charmm" and set the special_bonds 1-4 scaling factor to 0.0 (which is the default). Otherwise 1-4 non-bonded interactions in dihedrals will be @@ -115,7 +115,7 @@ details. Note that for AMBER force fields, which use pair styles with "lj/cut", the special_bonds 1-4 scaling factor should be set to the AMBER -defaults (1/2 and 5/6) and all the dihedral weighting factors (4th +defaults (1/2 and 5/6) and all the dihedral weighting factors (fourth coeff above) must be set to 0.0. In this case, you can use any pair style you wish, since the dihedral does not need any Lennard-Jones parameter information and will not compute any 1-4 non-bonded diff --git a/doc/src/dihedral_coeff.rst b/doc/src/dihedral_coeff.rst index d72a299416..71bd931c5f 100644 --- a/doc/src/dihedral_coeff.rst +++ b/doc/src/dihedral_coeff.rst @@ -31,7 +31,7 @@ Dihedral coefficients can also be set in the data file read by the :doc:`read_data ` command or in a restart file. N can be specified in one of two ways. An explicit numeric value can -be used, as in the 1st example above. Or a wild-card asterisk can be +be used, as in the first example above. Or a wild-card asterisk can be used to set the coefficients for multiple dihedral types. This takes the form "\*" or "\*n" or "n\*" or "m\*n". If N = the number of dihedral types, then an asterisk with no numeric values means all types from 1 to N. A @@ -53,7 +53,7 @@ same format as the arguments of the dihedral_coeff command in an input script, except that wild-card asterisks should not be used since coefficients for all N types must be listed in the file. For example, under the "Dihedral Coeffs" section of a data file, the line that -corresponds to the 1st example above would be listed as +corresponds to the first example above would be listed as .. parsed-literal:: diff --git a/doc/src/dihedral_table.rst b/doc/src/dihedral_table.rst index 112716a240..748aadbdbe 100644 --- a/doc/src/dihedral_table.rst +++ b/doc/src/dihedral_table.rst @@ -92,7 +92,7 @@ or blank lines. ... 30 180.0 -0.707106781187 -A section begins with a non-blank line whose 1st character is not a +A section begins with a non-blank line whose first character is not a "#"; blank lines or lines starting with "#" can be used as comments between sections. The first line begins with a keyword which identifies the section. The line can contain additional text, but the @@ -102,10 +102,10 @@ any order) one or more parameters for the table. Each parameter is a keyword followed by one or more numeric values. Following a blank line, the next N lines list the tabulated values. On -each line, the 1st value is the index from 1 to N, the 2nd value is -the angle value, the 3rd value is the energy (in energy units), and -the 4th is -dE/d(phi) also in energy units). The 3rd term is the -energy of the 4-atom configuration for the specified angle. The 4th +each line, the first value is the index from 1 to N, the second value is +the angle value, the third value is the energy (in energy units), and +the fourth is -dE/d(phi) also in energy units). The third term is the +energy of the 4-atom configuration for the specified angle. The fourth term (when present) is the negative derivative of the energy with respect to the angle (in degrees, or radians depending on whether the user selected DEGREES or RADIANS). Thus the units of the last term @@ -147,9 +147,9 @@ choice of angle units). The optional "NOF" keyword allows the user to omit the forces (negative energy derivatives) from the table file (normally located in -the 4th column). In their place, forces will be calculated +the fourth column). In their place, forces will be calculated automatically by differentiating the potential energy function -indicated by the 3rd column of the table (using either linear or +indicated by the third column of the table (using either linear or spline interpolation). The optional "DEGREES" keyword allows the user to specify angles in @@ -157,7 +157,7 @@ degrees instead of radians (default). The optional "RADIANS" keyword allows the user to specify angles in radians instead of degrees. (Note: This changes the way the forces -are scaled in the 4th column of the data file.) +are scaled in the fourth column of the data file.) The optional "CHECKU" keyword is followed by a filename. This allows the user to save all of the *Ntable* different entries in the diff --git a/doc/src/dihedral_table_cut.rst b/doc/src/dihedral_table_cut.rst index ae2fcd1f77..34e604088b 100644 --- a/doc/src/dihedral_table_cut.rst +++ b/doc/src/dihedral_table_cut.rst @@ -113,7 +113,7 @@ or blank lines. ... 30 180.0 -0.707106781187 -A section begins with a non-blank line whose 1st character is not a +A section begins with a non-blank line whose first character is not a "#"; blank lines or lines starting with "#" can be used as comments between sections. The first line begins with a keyword which identifies the section. The line can contain additional text, but the @@ -123,10 +123,10 @@ any order) one or more parameters for the table. Each parameter is a keyword followed by one or more numeric values. Following a blank line, the next N lines list the tabulated values. On -each line, the 1st value is the index from 1 to N, the 2nd value is -the angle value, the 3rd value is the energy (in energy units), and -the 4th is -dE/d(phi) also in energy units). The 3rd term is the -energy of the 4-atom configuration for the specified angle. The 4th +each line, the first value is the index from 1 to N, the second value is +the angle value, the third value is the energy (in energy units), and +the fourth is -dE/d(phi) also in energy units). The third term is the +energy of the 4-atom configuration for the specified angle. The fourth term (when present) is the negative derivative of the energy with respect to the angle (in degrees, or radians depending on whether the user selected DEGREES or RADIANS). Thus the units of the last term @@ -168,9 +168,9 @@ choice of angle units). The optional "NOF" keyword allows the user to omit the forces (negative energy derivatives) from the table file (normally located in -the 4th column). In their place, forces will be calculated +the fourth column). In their place, forces will be calculated automatically by differentiating the potential energy function -indicated by the 3rd column of the table (using either linear or +indicated by the third column of the table (using either linear or spline interpolation). The optional "DEGREES" keyword allows the user to specify angles in @@ -178,7 +178,7 @@ degrees instead of radians (default). The optional "RADIANS" keyword allows the user to specify angles in radians instead of degrees. (Note: This changes the way the forces -are scaled in the 4th column of the data file.) +are scaled in the fourth column of the data file.) The optional "CHECKU" keyword is followed by a filename. This allows the user to save all of the *Ntable* different entries in the diff --git a/doc/src/dump_image.rst b/doc/src/dump_image.rst index 0477e5d718..d222c208ac 100644 --- a/doc/src/dump_image.rst +++ b/doc/src/dump_image.rst @@ -134,17 +134,23 @@ Only atoms in the specified group are rendered in the image. The alter what atoms are included in the image. The filename suffix determines whether a JPEG, PNG, or PPM file is created with the *image* dump style. If the suffix is ".jpg" or -".jpeg", then a JPEG format file is created, if the suffix is ".png", -then a PNG format is created, else a PPM (aka NETPBM) format file is -created. The JPEG and PNG files are binary; PPM has a text mode -header followed by binary data. JPEG images have lossy compression; -PNG has lossless compression; and PPM files are uncompressed but can -be compressed with gzip, if LAMMPS has been compiled with --DLAMMPS_GZIP and a ".gz" suffix is used. +".jpeg", then a `JPEG format `_ file is created, if the +suffix is ".png", then a `PNG format `_ is created, else +a `PPM (aka NETPBM) format `_ file is created. +The JPEG and PNG files are binary; PPM has a text mode header followed +by binary data. JPEG images have lossy compression, PNG has lossless +compression, and PPM files are uncompressed but can be compressed with +gzip, if LAMMPS has been compiled with -DLAMMPS_GZIP and a ".gz" suffix +is used. + +.. _jpeg_format: https://jpeg.org/jpeg/ +.. _png_format: https://en.wikipedia.org/wiki/Portable_Network_Graphics +.. _ppm_format: https://en.wikipedia.org/wiki/Netpbm Similarly, the format of the resulting movie is chosen with the *movie* dump style. This is handled by the underlying FFmpeg converter -and thus details have to be looked up in the FFmpeg documentation. +and thus details have to be looked up in the `FFmpeg documentation +`_. Typical examples are: .avi, .mpg, .m4v, .mp4, .mkv, .flv, .mov, .gif Additional settings of the movie compression like bitrate and framerate can be set using the :doc:`dump_modify ` command. diff --git a/doc/src/dump_modify.rst b/doc/src/dump_modify.rst index ce0ade4789..6c7d4eb0f5 100644 --- a/doc/src/dump_modify.rst +++ b/doc/src/dump_modify.rst @@ -306,7 +306,7 @@ must enclose in quotes if it is more than one field. The *int* and *float* keywords take a single format argument and are applied to all integer or floating-point quantities output. The setting for *M string* also takes a single format argument which is used for the Mth -value output in each line, e.g. the 5th column is output in high +value output in each line, e.g. the fifth column is output in high precision for "format 5 %20.15g". .. note:: @@ -419,7 +419,7 @@ be written, by processors 0,25,50,75. Each will collect information from itself and the next 24 processors and write it to a dump file. For the *fileper* keyword, the specified value of Np means write one -file for every Np processors. For example, if Np = 4, every 4th +file for every Np processors. For example, if Np = 4, every fourth processor (0,4,8,12,etc) will collect information from itself and the next 3 processors and write it to a dump file. @@ -790,7 +790,7 @@ for the sequential style; otherwise the value is ignored. It specifies the bin size to use within the range for assigning consecutive colors to. For example, if the range is from -10.0 to 10.0 and a *delta* of 1.0 is used, then 20 colors will be assigned to -the range. The first will be from -10.0 <= color1 < -9.0, then 2nd +the range. The first will be from -10.0 <= color1 < -9.0, then second from -9.0 <= color2 < -8.0, etc. The *N* setting is how many entries follow. The format of the entries diff --git a/doc/src/dynamical_matrix.rst b/doc/src/dynamical_matrix.rst index 01981732da..9c4530eade 100644 --- a/doc/src/dynamical_matrix.rst +++ b/doc/src/dynamical_matrix.rst @@ -70,7 +70,7 @@ See the :doc:`Build package ` doc page for more info. Related commands """""""""""""""" -:doc:`fix phonon `, :doc:`fix numdiff `, +:doc:`fix phonon `, :doc:`fix numdiff `, :doc:`compute hma ` uses an analytic formulation of the Hessian provided by a pair_style's Pair::single_hessian() function, diff --git a/doc/src/fix_adapt.rst b/doc/src/fix_adapt.rst index fbc4aa4661..78677a0e2d 100644 --- a/doc/src/fix_adapt.rst +++ b/doc/src/fix_adapt.rst @@ -229,7 +229,7 @@ specified, but are ignored. Similar to the :doc:`pair_coeff command `, I and J can be specified in one of two ways. Explicit numeric values can be used for -each, as in the 1st example above. I <= J is required. LAMMPS sets +each, as in the first example above. I <= J is required. LAMMPS sets the coefficients for the symmetric J,I interaction to the same values. A wild-card asterisk can be used in place of or in conjunction with diff --git a/doc/src/fix_adapt_fep.rst b/doc/src/fix_adapt_fep.rst index ee44d8904f..3e5d419353 100644 --- a/doc/src/fix_adapt_fep.rst +++ b/doc/src/fix_adapt_fep.rst @@ -199,7 +199,7 @@ specified, but are ignored. Similar to the :doc:`pair_coeff command `, I and J can be specified in one of two ways. Explicit numeric values can be used for -each, as in the 1st example above. I <= J is required. LAMMPS sets +each, as in the first example above. I <= J is required. LAMMPS sets the coefficients for the symmetric J,I interaction to the same values. A wild-card asterisk can be used in place of or in conjunction with diff --git a/doc/src/fix_ave_chunk.rst b/doc/src/fix_ave_chunk.rst index b19cce417c..91331502c3 100644 --- a/doc/src/fix_ave_chunk.rst +++ b/doc/src/fix_ave_chunk.rst @@ -435,7 +435,7 @@ column is only used if the *compress* keyword was set to *yes* for the the original chunk IDs (e.g. molecule IDs) will have been compressed to remove chunk IDs with no atoms assigned to them. Thus a compressed chunk ID of 3 may correspond to an original chunk ID or molecule ID of -415. The OrigID column will list 415 for the 3rd chunk. +415. The OrigID column will list 415 for the third chunk. The CoordN columns only appear if a *binning* style was used in the :doc:`compute chunk/atom ` command. For *bin/1d*\ , diff --git a/doc/src/fix_ave_correlate.rst b/doc/src/fix_ave_correlate.rst index c42159e89b..d6a74e8a32 100644 --- a/doc/src/fix_ave_correlate.rst +++ b/doc/src/fix_ave_correlate.rst @@ -321,7 +321,7 @@ accessed on timesteps that are multiples of *Nfreq* since that is when averaging is performed. The global array has # of rows = *Nrepeat* and # of columns = Npair+2. The first column has the time delta (in timesteps) between the pairs of input values used to calculate the -correlation, as described above. The 2nd column has the number of +correlation, as described above. The second column has the number of samples contributing to the correlation average, as described above. The remaining Npair columns are for I,J pairs of the N input values, as determined by the *type* keyword, as described above. diff --git a/doc/src/fix_ave_histo.rst b/doc/src/fix_ave_histo.rst index 158f259695..353077d667 100644 --- a/doc/src/fix_ave_histo.rst +++ b/doc/src/fix_ave_histo.rst @@ -346,10 +346,10 @@ values: * 4 = max value of all input values, including ones not histogrammed The global array has # of rows = Nbins and # of columns = 3. The -first column has the bin coordinate, the 2nd column has the count of -values in that histogram bin, and the 3rd column has the bin count +first column has the bin coordinate, the second column has the count of +values in that histogram bin, and the third column has the bin count divided by the total count (not including missing counts), so that the -values in the 3rd column sum to 1.0. +values in the third column sum to 1.0. The vector and array values calculated by this fix are all treated as intensive. If this is not the case, e.g. due to histogramming diff --git a/doc/src/fix_bond_create.rst b/doc/src/fix_bond_create.rst index 0c48a800c9..bbe3120f29 100644 --- a/doc/src/fix_bond_create.rst +++ b/doc/src/fix_bond_create.rst @@ -154,13 +154,13 @@ of type *angletype*\ , with parameters assigned by the corresponding .. note:: LAMMPS stores and maintains a data structure with a list of the - 1st, 2nd, and 3rd neighbors of each atom (within the bond topology of + first, second, and third neighbors of each atom (within the bond topology of the system) for use in weighting pairwise interactions for bonded - atoms. Note that adding a single bond always adds a new 1st neighbor - but may also induce \*many\* new 2nd and 3rd neighbors, depending on the + atoms. Note that adding a single bond always adds a new first neighbor + but may also induce \*many\* new second and third neighbors, depending on the molecular topology of your system. The "extra special per atom" parameter must typically be set to allow for the new maximum total - size (1st + 2nd + 3rd neighbors) of this per-atom list. There are 2 + size (first + second + third neighbors) of this per-atom list. There are 2 ways to do this. See the :doc:`read_data ` or :doc:`create_box ` commands for details. @@ -172,12 +172,12 @@ of type *angletype*\ , with parameters assigned by the corresponding considered for pairwise interactions, using the weighting rules set by the :doc:`special_bonds ` command. Consider a new bond created between atoms I,J. If J has a bonded neighbor K, then K - becomes a 2nd neighbor of I. Even if the *atype* keyword is not used + becomes a second neighbor of I. Even if the *atype* keyword is not used to create angle I-J-K, the pairwise interaction between I and K will be potentially turned off or weighted by the 1-3 weighting specified by the :doc:`special_bonds ` command. This is the case even if the "angle yes" option was used with that command. The same - is true for 3rd neighbors (1-4 interactions), the *dtype* keyword, and + is true for third neighbors (1-4 interactions), the *dtype* keyword, and the "dihedral yes" option used with the :doc:`special_bonds ` command. diff --git a/doc/src/fix_box_relax.rst b/doc/src/fix_box_relax.rst index 7786a8faef..71708165dd 100644 --- a/doc/src/fix_box_relax.rst +++ b/doc/src/fix_box_relax.rst @@ -371,7 +371,7 @@ the meaning of the xy,xz,yz tilt factors. The *scaleyz yes* and *scalexz yes* keyword/value pairs can not be used for 2D simulations. *scaleyz yes*\ , *scalexz yes*\ , and *scalexy yes* options -can only be used if the 2nd dimension in the keyword is periodic, +can only be used if the second dimension in the keyword is periodic, and if the tilt factor is not coupled to the barostat via keywords *tri*\ , *yz*\ , *xz*\ , and *xy*\ . diff --git a/doc/src/fix_cmap.rst b/doc/src/fix_cmap.rst index 6f68d97c59..a968eb910e 100644 --- a/doc/src/fix_cmap.rst +++ b/doc/src/fix_cmap.rst @@ -66,7 +66,7 @@ in the body of the data file like this with N lines: N 3 314 315 317 318 330 The first column is an index from 1 to N to enumerate the CMAP terms; -it is ignored by LAMMPS. The 2nd column is the "type" of the +it is ignored by LAMMPS. The second column is the "type" of the interaction; it is an index into the CMAP force field file. The remaining 5 columns are the atom IDs of the atoms in the two 4-atom dihedrals that overlap to create the CMAP 5-body interaction. Note diff --git a/doc/src/fix_deform.rst b/doc/src/fix_deform.rst index f5511be692..ab07c32560 100644 --- a/doc/src/fix_deform.rst +++ b/doc/src/fix_deform.rst @@ -104,7 +104,7 @@ can be modeled using the :ref:`USER-UEF package ` and its :doc:`fi For the *x*\ , *y*\ , *z* parameters, the associated dimension cannot be shrink-wrapped. For the *xy*\ , *yz*\ , *xz* parameters, the associated -2nd dimension cannot be shrink-wrapped. Dimensions not varied by this +second dimension cannot be shrink-wrapped. Dimensions not varied by this command can be periodic or non-periodic. Dimensions corresponding to unspecified parameters can also be controlled by a :doc:`fix npt ` or :doc:`fix nph ` command. @@ -463,7 +463,7 @@ and the final tilt factor at the end of the simulation would be 0.0. During each flip event, atoms are remapped into the new box in the appropriate manner. -The one exception to this rule is if the 1st dimension in the tilt +The one exception to this rule is if the first dimension in the tilt factor (x for xy) is non-periodic. In that case, the limits on the tilt factor are not enforced, since flipping the box in that dimension does not change the atom positions due to non-periodicity. In this @@ -601,7 +601,7 @@ Restrictions You cannot apply x, y, or z deformations to a dimension that is shrink-wrapped via the :doc:`boundary ` command. -You cannot apply xy, yz, or xz deformations to a 2nd dimension (y in +You cannot apply xy, yz, or xz deformations to a second dimension (y in xy) that is shrink-wrapped via the :doc:`boundary ` command. Related commands diff --git a/doc/src/fix_eos_table.rst b/doc/src/fix_eos_table.rst index 3800aa0c53..57cacc0da5 100644 --- a/doc/src/fix_eos_table.rst +++ b/doc/src/fix_eos_table.rst @@ -66,7 +66,7 @@ parenthesized comments): ... 500 10.0 0.500 -A section begins with a non-blank line whose 1st character is not a +A section begins with a non-blank line whose first character is not a "#"; blank lines or lines starting with "#" can be used as comments between sections. The first line begins with a keyword which identifies the section. The line can contain additional text, but the @@ -86,8 +86,8 @@ to match exactly what is in the tabulated file (with effectively no preliminary interpolation), you should set Ntable = Nfile. Following a blank line, the next N lines list the tabulated values. -On each line, the 1st value is the index from 1 to N, the 2nd value is -the internal temperature (in temperature units), the 3rd value is the +On each line, the first value is the index from 1 to N, the second value is +the internal temperature (in temperature units), the third value is the internal energy (in energy units). Note that the internal temperature and internal energy values must diff --git a/doc/src/fix_eos_table_rx.rst b/doc/src/fix_eos_table_rx.rst index e3cd4e8ce8..1db81a4a2b 100644 --- a/doc/src/fix_eos_table_rx.rst +++ b/doc/src/fix_eos_table_rx.rst @@ -106,7 +106,7 @@ parenthesized comments): ... 500 10.0 0.500 ... 1.0000 -A section begins with a non-blank line whose 1st character is not a +A section begins with a non-blank line whose first character is not a "#"; blank lines or lines starting with "#" can be used as comments between sections. The first line begins with a keyword which identifies the section. The line can contain additional text, but the @@ -121,8 +121,8 @@ What LAMMPS does is a preliminary interpolation by creating splines using the Nfile tabulated values as nodal points. Following a blank line, the next N lines list the tabulated values. -On each line, the 1st value is the index from 1 to N, the 2nd value is -the internal temperature (in temperature units), the 3rd value until +On each line, the first value is the index from 1 to N, the second value is +the internal temperature (in temperature units), the third value until the *m+3* value are the internal energies of the m species (in energy units). Note that all internal temperature and internal energy values must diff --git a/doc/src/fix_external.rst b/doc/src/fix_external.rst index a77545d294..58f40406da 100644 --- a/doc/src/fix_external.rst +++ b/doc/src/fix_external.rst @@ -109,20 +109,42 @@ etc. To use this fix during energy minimization, the energy corresponding to the added forces must also be set so as to be consistent with the added forces. Otherwise the minimization will not converge correctly. +Correspondingly, the global virial needs to be updated to be use this +fix with variable cell calculations (e.g. :doc:`fix box/relax ` +or :doc:`fix npt `). -This can be done from the external driver by calling this public -method of the FixExternal class: +This can be done from the external driver by calling these public +methods of the FixExternal class: .. code-block:: c++ - void set_energy(double eng); + void set_energy_global(double eng); + void set_virial_global(double *virial); -where eng is the potential energy. Eng is an extensive quantity, +where *eng* is the potential energy, and *virial* an array of the 6 +stress tensor components. Eng is an extensive quantity, meaning it should be the sum over per-atom energies of all affected atoms. It should also be provided in :doc:`energy units ` consistent with the simulation. See the details below for how to insure this energy setting is used appropriately in a minimization. +Additional public methods that the caller can use to update system +properties are: + +.. code-block:: c++ + + void set_energy_peratom(double *eng); + void set_virial_peratom(double **virial); + void set_vector_length(int n); + void set_vector(int idx, double val); + +These allow to set per-atom energy contributions, per-atom stress +contributions, the length and individual values of a global vector +of properties that the caller code may want to communicate to LAMMPS +(e.g. for use in :doc:`fix ave/time ` or in +:doc:`equal-style variables ` or for +:doc:`custom thermo output `. + ---------- **Restart, fix_modify, output, run start/stop, minimize info:** diff --git a/doc/src/fix_nh.rst b/doc/src/fix_nh.rst index 9b73a8b4ed..83c2b5a728 100644 --- a/doc/src/fix_nh.rst +++ b/doc/src/fix_nh.rst @@ -432,7 +432,7 @@ equilibrium liquids can not support a shear stress and that equilibrium solids can not support shear stresses that exceed the yield stress. -One exception to this rule is if the 1st dimension in the tilt factor +One exception to this rule is if the first dimension in the tilt factor (x for xy) is non-periodic. In that case, the limits on the tilt factor are not enforced, since flipping the box in that dimension does not change the atom positions due to non-periodicity. In this mode, @@ -673,7 +673,7 @@ Restrictions *X*\ , *y*\ , *z* cannot be barostatted if the associated dimension is not periodic. *Xy*\ , *xz*\ , and *yz* can only be barostatted if the -simulation domain is triclinic and the 2nd dimension in the keyword +simulation domain is triclinic and the second dimension in the keyword (\ *y* dimension in *xy*\ ) is periodic. *Z*\ , *xz*\ , and *yz*\ , cannot be barostatted for 2D simulations. The :doc:`create_box `, :doc:`read data `, and :doc:`read_restart ` @@ -687,7 +687,7 @@ is not allowed in the Nose/Hoover formulation. The *scaleyz yes* and *scalexz yes* keyword/value pairs can not be used for 2D simulations. *scaleyz yes*\ , *scalexz yes*\ , and *scalexy yes* options -can only be used if the 2nd dimension in the keyword is periodic, +can only be used if the second dimension in the keyword is periodic, and if the tilt factor is not coupled to the barostat via keywords *tri*\ , *yz*\ , *xz*\ , and *xy*\ . @@ -710,7 +710,7 @@ Default The keyword defaults are tchain = 3, pchain = 3, mtk = yes, tloop = 1, ploop = 1, nreset = 0, drag = 0.0, dilate = all, couple = none, -flip = yes, scaleyz = scalexz = scalexy = yes if periodic in 2nd +flip = yes, scaleyz = scalexz = scalexy = yes if periodic in second dimension and not coupled to barostat, otherwise no. ---------- diff --git a/doc/src/fix_npt_cauchy.rst b/doc/src/fix_npt_cauchy.rst index 14ad1e7715..480e2e5314 100644 --- a/doc/src/fix_npt_cauchy.rst +++ b/doc/src/fix_npt_cauchy.rst @@ -354,7 +354,7 @@ equilibrium liquids can not support a shear stress and that equilibrium solids can not support shear stresses that exceed the yield stress. -One exception to this rule is if the 1st dimension in the tilt factor +One exception to this rule is if the first dimension in the tilt factor (x for xy) is non-periodic. In that case, the limits on the tilt factor are not enforced, since flipping the box in that dimension does not change the atom positions due to non-periodicity. In this mode, @@ -555,7 +555,7 @@ LAMMPS was built with that package. See the :doc:`Build package *X*\ , *y*\ , *z* cannot be barostatted if the associated dimension is not periodic. *Xy*\ , *xz*\ , and *yz* can only be barostatted if the -simulation domain is triclinic and the 2nd dimension in the keyword +simulation domain is triclinic and the second dimension in the keyword (\ *y* dimension in *xy*\ ) is periodic. *Z*\ , *xz*\ , and *yz*\ , cannot be barostatted for 2D simulations. The :doc:`create_box `, :doc:`read data `, and :doc:`read_restart ` @@ -569,7 +569,7 @@ is not allowed in the Nose/Hoover formulation. The *scaleyz yes* and *scalexz yes* keyword/value pairs can not be used for 2D simulations. *scaleyz yes*\ , *scalexz yes*\ , and *scalexy yes* options -can only be used if the 2nd dimension in the keyword is periodic, +can only be used if the second dimension in the keyword is periodic, and if the tilt factor is not coupled to the barostat via keywords *tri*\ , *yz*\ , *xz*\ , and *xy*\ . @@ -626,7 +626,7 @@ Default The keyword defaults are tchain = 3, pchain = 3, mtk = yes, tloop = ploop = 1, nreset = 0, drag = 0.0, dilate = all, couple = none, cauchystat = no, -scaleyz = scalexz = scalexy = yes if periodic in 2nd dimension and +scaleyz = scalexz = scalexy = yes if periodic in second dimension and not coupled to barostat, otherwise no. ---------- diff --git a/doc/src/fix_poems.rst b/doc/src/fix_poems.rst index f9a0e72b3d..5e84188154 100644 --- a/doc/src/fix_poems.rst +++ b/doc/src/fix_poems.rst @@ -39,7 +39,7 @@ useful for treating a large biomolecule as a collection of connected, coarse-grained particles. The coupling, associated motion constraints, and time integration is -performed by the software package `Parallelizable Open source Efficient Multibody Software (POEMS) `_ which computes the +performed by the software package `Parallelizable Open source Efficient Multibody Software (POEMS)` which computes the constrained rigid-body motion of articulated (jointed) multibody systems :ref:`(Anderson) `. POEMS was written and is distributed by Prof Kurt Anderson, his graduate student Rudranarayan Mukherjee, @@ -48,8 +48,6 @@ and other members of his group at Rensselaer Polytechnic Institute copyright information on POEMS and other details, please refer to the documents in the poems directory distributed with LAMMPS. -.. _poems: http://www.rpi.edu/~anderk5/lab - This fix updates the positions and velocities of the rigid atoms with a constant-energy time integration, so you should not update the same atoms via other fixes (e.g. nve, nvt, npt, temp/rescale, langevin). @@ -123,7 +121,7 @@ command. This fix is not invoked during :doc:`energy minimization `. Restrictions """""""""""" -This fix is part of the POEMS package. It is only enabled if LAMMPS +This fix is part of the :ref:`POEMS ` package. It is only enabled if LAMMPS was built with that package, which also requires the POEMS library be built and linked with LAMMPS. See the :doc:`Build package ` doc page for more info. diff --git a/doc/src/fix_precession_spin.rst b/doc/src/fix_precession_spin.rst index 783963af72..99dffc61dd 100644 --- a/doc/src/fix_precession_spin.rst +++ b/doc/src/fix_precession_spin.rst @@ -158,7 +158,7 @@ atom_style "spin" was declared. See the :doc:`Build package ` do The *precession/spin* style can only be declared once. If more than one precession type (for example combining an anisotropy and a Zeeman interactions) has to be declared, they have to be chained in the same command -line (as shown in the examples above). +line (as shown in the examples above). Related commands """""""""""""""" diff --git a/doc/src/fix_recenter.rst b/doc/src/fix_recenter.rst index eec224c67d..a1c215e9a7 100644 --- a/doc/src/fix_recenter.rst +++ b/doc/src/fix_recenter.rst @@ -116,7 +116,7 @@ Restrictions """""""""""" This fix should not be used with an x,y,z setting that causes a large -shift in the system on the 1st timestep, due to the requested COM +shift in the system on the first timestep, due to the requested COM being very different from the initial COM. This could cause atoms to be lost, especially in parallel. Instead, use the :doc:`displace_atoms ` command, which can be used to diff --git a/doc/src/fix_restrain.rst b/doc/src/fix_restrain.rst index 692336bec6..d3cdecd46a 100644 --- a/doc/src/fix_restrain.rst +++ b/doc/src/fix_restrain.rst @@ -162,7 +162,7 @@ the restraint is .. math:: E = 0 \qquad\quad\quad ,if\;r \ge r_0 - + with the following coefficients: * :math:`K` (energy/distance\^2) diff --git a/doc/src/fix_rigid.rst b/doc/src/fix_rigid.rst index 6fbd692f6a..0af009316c 100644 --- a/doc/src/fix_rigid.rst +++ b/doc/src/fix_rigid.rst @@ -248,7 +248,7 @@ differences may accumulate to produce divergent trajectories. will be built only at the very first *run* command and maintained for as long as the rigid fix is defined. For example, you might think you could displace the atoms in a body or add a large velocity to each atom - in a body to make it move in a desired direction before a 2nd run is + in a body to make it move in a desired direction before a second run is performed, using the :doc:`set ` or :doc:`displace_atoms ` or :doc:`velocity ` commands. But these commands will not affect the internal attributes @@ -727,7 +727,7 @@ In all case, the rigid bodies and non-rigid particles both contribute to the global pressure and the box is scaled the same by any of the barostatting fixes. -You could even use the 2nd and 3rd options for a non-hybrid simulation +You could even use the second and third options for a non-hybrid simulation consisting of only rigid bodies, assuming you give :doc:`fix npt ` an empty group, though it's an odd thing to do. The barostatting fixes (:doc:`fix npt ` and :doc:`fix press/berensen `) will monitor the pressure and change the box dimensions, but not time integrate any particles. diff --git a/doc/src/fix_rigid_meso.rst b/doc/src/fix_rigid_meso.rst index 9961a871dc..ec05fd170a 100644 --- a/doc/src/fix_rigid_meso.rst +++ b/doc/src/fix_rigid_meso.rst @@ -108,7 +108,7 @@ internal energy and extrapolated velocity are also updated. will be built only at the very first *run* command and maintained for as long as the rigid fix is defined. For example, you might think you could displace the particles in a body or add a large velocity to each particle - in a body to make it move in a desired direction before a 2nd run is + in a body to make it move in a desired direction before a second run is performed, using the :doc:`set ` or :doc:`displace_atoms ` or :doc:`velocity ` commands. But these commands will not affect the internal attributes diff --git a/doc/src/fix_rx.rst b/doc/src/fix_rx.rst index 0d8af574c1..8281c744d4 100644 --- a/doc/src/fix_rx.rst +++ b/doc/src/fix_rx.rst @@ -18,7 +18,7 @@ Syntax * file = filename containing the reaction kinetic equations and Arrhenius parameters * localTemp = *none,lucy* = no local temperature averaging or local temperature defined through Lucy weighting function * matrix = *sparse, dense* format for the stoichiometric matrix -* solver = *lammps_rk4,rkf45* = rk4 is an explicit 4th order Runge-Kutta method; rkf45 is an adaptive 4th-order Runge-Kutta-Fehlberg method +* solver = *lammps_rk4,rkf45* = rk4 is an explicit fourth order Runge-Kutta method; rkf45 is an adaptive fourth-order Runge-Kutta-Fehlberg method * minSteps = # of steps for rk4 solver or minimum # of steps for rkf45 (rk4 or rkf45) * maxSteps = maximum number of steps for the rkf45 solver (rkf45 only) * relTol = relative tolerance for the rkf45 solver (rkf45 only) @@ -61,9 +61,9 @@ of *m* ordinary differential equations (ODEs) that describe the change in concentration of a given species as a function of time are then constructed based on the *n* reaction rate equations. -The ODE systems are solved over the full DPD timestep *dt* using either a 4th +The ODE systems are solved over the full DPD timestep *dt* using either a fourth order Runge-Kutta *rk4* method with a fixed step-size *h*\ , specified -by the *lammps_rk4* keyword, or a 4th order Runge-Kutta-Fehlberg (rkf45) method +by the *lammps_rk4* keyword, or a fourth order Runge-Kutta-Fehlberg (rkf45) method with an adaptive step-size for *h*\ . The number of ODE steps per DPD timestep for the rk4 method is optionally specified immediately after the rk4 keyword. The ODE step-size is set as *dt/num_steps*. Smaller @@ -76,7 +76,7 @@ can be specified by the user or estimated internally. It is recommended that the specify *h0* since this will generally reduced the number of ODE integration steps required. *h0* is defined as *dt / min_steps* if min_steps >= 1. If min_steps == 0, *h0* is estimated such that an explicit Euler method would likely produce -an acceptable solution. This is generally overly conservative for the 4th-order +an acceptable solution. This is generally overly conservative for the fourth-order method and users are advised to specify *h0* as some fraction of the DPD timestep. For small DPD timesteps, only one step may be necessary depending upon the tolerances. Note that more than min_steps ODE steps may be taken depending upon the ODE stiffness @@ -172,7 +172,7 @@ parenthesized comments): ... 1.0 no + 1.0 co = 0.5 n2 + 1.0 co2 1.66E+06 0.0 0.69 -A section begins with a non-blank line whose 1st character is not a +A section begins with a non-blank line whose first character is not a "#"; blank lines or lines starting with "#" can be used as comments between sections. diff --git a/doc/src/fix_saed_vtk.rst b/doc/src/fix_saed_vtk.rst index 818d14cc60..145a10c93a 100644 --- a/doc/src/fix_saed_vtk.rst +++ b/doc/src/fix_saed_vtk.rst @@ -45,7 +45,7 @@ Description """"""""""" Time average computed intensities from :doc:`compute saed ` and -write output to a file in the 3rd generation vtk image data format for +write output to a file in the third generation vtk image data format for visualization directly in parallelized visualization software packages like ParaView and VisIt. Note that if no time averaging is done, this command can be used as a convenient way to simply output diffraction @@ -92,7 +92,7 @@ averaging is done; values are simply generated on timesteps ---------- -The output for fix ave/time/saed is a file written with the 3rd generation +The output for fix ave/time/saed is a file written with the third generation vtk image data formatting. The filename assigned by the *file* keyword is appended with _N.vtk where N is an index (0,1,2...) to account for multiple diffraction intensity outputs. @@ -156,7 +156,7 @@ running or windowed average. The *file* keyword allows a filename to be specified. Every *Nfreq* steps, the vector of saed intensity data is written to a new file using -the 3rd generation vtk format. The base of each file is assigned by +the third generation vtk format. The base of each file is assigned by the *file* keyword and this string is appended with _N.vtk where N is an index (0,1,2...) to account for situations with multiple diffraction intensity outputs. diff --git a/doc/src/fix_smd.rst b/doc/src/fix_smd.rst index b303114887..1a24154b49 100644 --- a/doc/src/fix_smd.rst +++ b/doc/src/fix_smd.rst @@ -126,7 +126,7 @@ displacement). The force is the total force on the group of atoms by the spring. In the case of the *couple* style, it is the force on the fix group -(group-ID) or the negative of the force on the 2nd group (group-ID2). +(group-ID) or the negative of the force on the second group (group-ID2). The vector values calculated by this fix are "extensive". No parameter of this fix can be used with the *start/stop* keywords of diff --git a/doc/src/fix_spring.rst b/doc/src/fix_spring.rst index 518b4d2302..527e6325f4 100644 --- a/doc/src/fix_spring.rst +++ b/doc/src/fix_spring.rst @@ -118,7 +118,7 @@ various :doc:`output commands `. The first 3 quantities in the vector are xyz components of the total force added to the group of atoms by the spring. In the case of the *couple* style, it is the force on the fix group (group-ID) or the negative of the force on the -2nd group (group-ID2). The 4th quantity in the vector is the +second group (group-ID2). The fourth quantity in the vector is the magnitude of the force added by the spring, as a positive value if (r-R0) > 0 and a negative value if (r-R0) < 0. This sign convention can be useful when using the spring force to compute a potential of diff --git a/doc/src/fix_tmd.rst b/doc/src/fix_tmd.rst index bbc99d3ba2..521da5ecb2 100644 --- a/doc/src/fix_tmd.rst +++ b/doc/src/fix_tmd.rst @@ -55,8 +55,8 @@ a .gz suffix). The format of the target file1 is as follows: The first 3 lines may or may not be needed, depending on the format of the atoms to follow. If image flags are included with the atoms, the -1st 3 lo/hi lines must appear in the file. If image flags are not -included, the 1st 3 lines should not appear. The 3 lines contain the +first 3 lo/hi lines must appear in the file. If image flags are not +included, the first 3 lines should not appear. The 3 lines contain the simulation box dimensions for the atom coordinates, in the same format as in a LAMMPS data file (see the :doc:`read_data ` command). diff --git a/doc/src/group.rst b/doc/src/group.rst index 42e1d29a85..6371a030ee 100644 --- a/doc/src/group.rst +++ b/doc/src/group.rst @@ -118,7 +118,7 @@ specified atom types, atom IDs, or molecule IDs into the group. These 3 styles can use arguments specified in one of two formats. The first format is a list of values (types or IDs). For example, the -2nd command in the examples above puts all atoms of type 3 or 4 into +second command in the examples above puts all atoms of type 3 or 4 into the group named *water*\ . Each entry in the list can be a colon-separated sequence A:B or A:B:C, as in two of the examples above. A "sequence" generates a sequence of values (types or IDs), @@ -131,9 +131,9 @@ uses an increment of 10 and would thus would add atoms IDs The second format is a *logical* followed by one or two values (type or ID). The 7 valid logicals are listed above. All the logicals -except <> take a single argument. The 3rd example above adds all +except <> take a single argument. The third example above adds all atoms with IDs from 1 to 150 to the group named *sub*\ . The logical <> -means "between" and takes 2 arguments. The 4th example above adds all +means "between" and takes 2 arguments. The fourth example above adds all atoms belonging to molecules with IDs from 50 to 250 (inclusive) to the group named polyA. @@ -192,7 +192,7 @@ this operation is useful is if the *region* style has been used previously to add atoms to a group that are within a geometric region. If molecules straddle the region boundary, then atoms outside the region that are part of molecules with atoms inside the region will -not be in the group. Using the group command a 2nd time with *include +not be in the group. Using the group command a second time with *include molecule* will add those atoms that are outside the region to the group. @@ -207,7 +207,7 @@ group. atoms, and P is the number of processors. The *subtract* style takes a list of two or more existing group names -as arguments. All atoms that belong to the 1st group, but not to any +as arguments. All atoms that belong to the first group, but not to any of the other groups are added to the specified group. The *union* style takes a list of one or more existing group names as diff --git a/doc/src/improper_class2.rst b/doc/src/improper_class2.rst index 5affc0d4bb..be50a18299 100644 --- a/doc/src/improper_class2.rst +++ b/doc/src/improper_class2.rst @@ -48,7 +48,7 @@ the :doc:`read_data ` command) are ordered I,J,K,L. the plane of J,K,L, and the bond JK lies in both planes. Similarly for :math:`\chi_{kjli}` and :math:`\chi_{ljik}`. Note that atom J appears in the common bonds (JI, JK, JL) of all 3 X -terms. Thus J (the 2nd atom in the quadruplet) is the atom of +terms. Thus J (the second atom in the quadruplet) is the atom of symmetry in the 3 :math:`\chi` angles. The subscripts on the various :math:`\theta`\ s refer to different @@ -56,7 +56,7 @@ combinations of 3 atoms (I,J,K,L) used to form a particular angle. E.g. :math:`\theta_{ijl}` is the angle formed by atoms I,J,L with J in the middle. :math:`\theta_1`, :math:`\theta_2`, :math:`\theta_3` are the equilibrium positions of those angles. Again, -atom J (the 2nd atom in the quadruplet) is the atom of symmetry in the +atom J (the second atom in the quadruplet) is the atom of symmetry in the theta angles, since it is always the center atom. Since atom J is the atom of symmetry, normally the bonds J-I, J-K, J-L diff --git a/doc/src/improper_coeff.rst b/doc/src/improper_coeff.rst index 3d2878c517..8fd8269fd5 100644 --- a/doc/src/improper_coeff.rst +++ b/doc/src/improper_coeff.rst @@ -32,7 +32,7 @@ file read by the :doc:`read_data ` command or in a restart file. N can be specified in one of two ways. An explicit numeric value can -be used, as in the 1st example above. Or a wild-card asterisk can be +be used, as in the first example above. Or a wild-card asterisk can be used to set the coefficients for multiple improper types. This takes the form "\*" or "\*n" or "n\*" or "m\*n". If N = the number of improper types, then an asterisk with no numeric values means all types from 1 @@ -55,7 +55,7 @@ exact same format as the arguments of the improper_coeff command in an input script, except that wild-card asterisks should not be used since coefficients for all N types must be listed in the file. For example, under the "Improper Coeffs" section of a data file, the line that -corresponds to the 1st example above would be listed as +corresponds to the first example above would be listed as .. parsed-literal:: diff --git a/doc/src/improper_hybrid.rst b/doc/src/improper_hybrid.rst index 9d5c4c696d..a36d05e719 100644 --- a/doc/src/improper_hybrid.rst +++ b/doc/src/improper_hybrid.rst @@ -48,7 +48,7 @@ to other hybrid styles, use the style name (e.g. "harmonic") appropriate to that style. The AngleAngle coeffs for that improper type will then be ignored. -An improper style of *none* can be specified as the 2nd argument to +An improper style of *none* can be specified as the second argument to the improper_coeff command, if you desire to turn off certain improper types. diff --git a/doc/src/jump.rst b/doc/src/jump.rst index d597b336d3..bad13630ab 100644 --- a/doc/src/jump.rst +++ b/doc/src/jump.rst @@ -60,7 +60,7 @@ of SELF, e.g. lmp_g++ -var fname in.script < in.script -The 2nd argument to the jump command is optional. If specified, it is +The second argument to the jump command is optional. If specified, it is treated as a label and the new file is scanned (without executing commands) until the label is found, and commands are executed from that point forward. This can be used to loop over a portion of the diff --git a/doc/src/kspace_style.rst b/doc/src/kspace_style.rst index 57cd51d549..4b28c0a3c3 100644 --- a/doc/src/kspace_style.rst +++ b/doc/src/kspace_style.rst @@ -163,7 +163,7 @@ The *pppm/dipole/spin* style invokes a particle-particle particle-mesh solver for magnetic dipole-dipole interactions between magnetic spins. The *pppm/tip4p* style is identical to the *pppm* style except that it -adds a charge at the massless 4th site in each TIP4P water molecule. +adds a charge at the massless fourth site in each TIP4P water molecule. It should be used with :doc:`pair styles ` with a *tip4p/long* in their style name. diff --git a/doc/src/mass.rst b/doc/src/mass.rst index 55ba9c61bf..d43f239112 100644 --- a/doc/src/mass.rst +++ b/doc/src/mass.rst @@ -31,7 +31,7 @@ using the "Masses" keyword. See the :doc:`units ` command for what mass units to use. The I index can be specified in one of two ways. An explicit numeric -value can be used, as in the 1st example above. Or a wild-card +value can be used, as in the first example above. Or a wild-card asterisk can be used to set the mass for multiple atom types. This takes the form "\*" or "\*n" or "n\*" or "m\*n". If N = the number of atom types, then an asterisk with no numeric values means all types @@ -44,7 +44,7 @@ A line in a :doc:`data file ` that follows the "Masses" keyword specifies mass using the same format as the arguments of the mass command in an input script, except that no wild-card asterisk can be used. For example, under the "Masses" section of a data file, the -line that corresponds to the 1st example above would be listed as +line that corresponds to the first example above would be listed as .. parsed-literal:: diff --git a/doc/src/message.rst b/doc/src/message.rst index f4ca5735e0..a727064ded 100644 --- a/doc/src/message.rst +++ b/doc/src/message.rst @@ -178,7 +178,7 @@ processing the rest of its input script after client/server communication terminates. If both codes cooperate in this manner, a new round of client/server -messaging can be initiated after termination by re-using a 2nd message +messaging can be initiated after termination by re-using a second message command in your LAMMPS input script, followed by a new fix client or server command, followed by another message quit command (if LAMMPS is the client). As an example, this can be performed in a loop to use a diff --git a/doc/src/minimize.rst b/doc/src/minimize.rst index 81234ae80e..d14d988555 100644 --- a/doc/src/minimize.rst +++ b/doc/src/minimize.rst @@ -95,7 +95,7 @@ coordinates: where the first term is the sum of all non-bonded :doc:`pairwise interactions ` including :doc:`long-range Coulombic -interactions `, the 2nd through 5th terms are :doc:`bond +interactions `, the second through fifth terms are :doc:`bond `, :doc:`angle `, :doc:`dihedral `, and :doc:`improper ` interactions respectively, and the last term is energy due to :doc:`fixes ` diff --git a/doc/src/molecule.rst b/doc/src/molecule.rst index aa00949990..7b316b9d24 100644 --- a/doc/src/molecule.rst +++ b/doc/src/molecule.rst @@ -458,7 +458,7 @@ If flag = 0, no a,b,c values are listed on the line, just the If flag = 1, a,b,c are listed, where a = bondtype of the bond between the central atom and the first non-central atom (value b in the Shake Atoms section), b = bondtype of the bond between the central atom and -the 2nd non-central atom (value c in the Shake Atoms section), and c = +the second non-central atom (value c in the Shake Atoms section), and c = the angle type (1 to Nangletypes) of the angle between the 3 atoms. If flag = 2, only a is listed, where a = bondtype of the bond between @@ -467,13 +467,13 @@ the 2 atoms in the cluster. If flag = 3, a,b are listed, where a = bondtype of the bond between the central atom and the first non-central atom (value b in the Shake Atoms section), and b = bondtype of the bond between the central atom -and the 2nd non-central atom (value c in the Shake Atoms section). +and the second non-central atom (value c in the Shake Atoms section). If flag = 4, a,b,c are listed, where a = bondtype of the bond between the central atom and the first non-central atom (value b in the Shake Atoms section), b = bondtype of the bond between the central atom and -the 2nd non-central atom (value c in the Shake Atoms section), and c = -bondtype of the bond between the central atom and the 3rd non-central +the second non-central atom (value c in the Shake Atoms section), and c = +bondtype of the bond between the central atom and the third non-central atom (value d in the Shake Atoms section). See the :doc:`fix shake ` doc page for a further description diff --git a/doc/src/neb.rst b/doc/src/neb.rst index acb157e2ec..e2c7fac51b 100644 --- a/doc/src/neb.rst +++ b/doc/src/neb.rst @@ -123,7 +123,7 @@ interpolated manner. This is done by using the current position of the atom as the starting point and the read-in position as the final point. The distance between them is calculated, and the new position is assigned to be a fraction of the distance. E.g. if there are 10 -replicas, the 2nd replica will assign a position that is 10% of the +replicas, the second replica will assign a position that is 10% of the distance along a line between the starting and final point, and the 9th replica will assign a position that is 90% of the distance along the line. Note that for this procedure to produce consistent diff --git a/doc/src/newton.rst b/doc/src/newton.rst index df1298a9e4..c1a015c3e6 100644 --- a/doc/src/newton.rst +++ b/doc/src/newton.rst @@ -26,8 +26,8 @@ Examples Description """"""""""" -This command turns Newton's 3rd law *on* or *off* for pairwise and -bonded interactions. For most problems, setting Newton's 3rd law to +This command turns Newton's third law *on* or *off* for pairwise and +bonded interactions. For most problems, setting Newton's third law to *on* means a modest savings in computation at the cost of two times more communication. Whether this is faster depends on problem size, force cutoff lengths, a machine's compute/communication ratio, and how diff --git a/doc/src/next.rst b/doc/src/next.rst index fd62e29ffe..3032a36921 100644 --- a/doc/src/next.rst +++ b/doc/src/next.rst @@ -96,7 +96,7 @@ directories run1 through run8. If the variable "d" were of style *universe*\ , and the same in.polymer input script were run on 3 partitions of processors, then the first 3 simulations would begin, one on each set of processors. Whichever -partition finished first, it would assign variable "d" the 4th value +partition finished first, it would assign variable "d" the fourth value and run another simulation, and so forth until all 8 simulations were finished. diff --git a/doc/src/package.rst b/doc/src/package.rst index a6a2353087..0761c2b573 100644 --- a/doc/src/package.rst +++ b/doc/src/package.rst @@ -577,7 +577,7 @@ All three of these examples use a total of 4 CPU cores. Note that different MPI implementations have different ways of passing the OMP_NUM_THREADS environment variable to all MPI processes. The -2nd example line above is for MPICH; the 3rd example line with -x is +second example line above is for MPICH; the third example line with -x is for OpenMPI. Check your MPI documentation for additional details. What combination of threads and MPI tasks gives the best performance diff --git a/doc/src/pair_adp.rst b/doc/src/pair_adp.rst index bbfd98f677..ddde4cc344 100644 --- a/doc/src/pair_adp.rst +++ b/doc/src/pair_adp.rst @@ -79,14 +79,14 @@ As an example, the potentials/AlCu.adp file, included in the potentials directory of the LAMMPS distribution, is an extended *setfl* file which has tabulated ADP values for w elements and their alloy interactions: Cu and Al. If your LAMMPS simulation has 4 atoms types -and you want the 1st 3 to be Al, and the 4th to be Cu, you would use +and you want the first 3 to be Al, and the fourth to be Cu, you would use the following pair_coeff command: .. code-block:: LAMMPS pair_coeff * * AlCu.adp Al Al Al Cu -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Al arguments map LAMMPS atom types 1,2,3 to the Al element in the extended *setfl* file. The final Cu argument maps LAMMPS atom type 4 to the Al element in the extended *setfl* file. diff --git a/doc/src/pair_airebo.rst b/doc/src/pair_airebo.rst index b6d1af2a79..8aad39f877 100644 --- a/doc/src/pair_airebo.rst +++ b/doc/src/pair_airebo.rst @@ -73,8 +73,8 @@ and its parameterization are given in :ref:`(O'Conner) `. The *rebo* pair style computes the Reactive Empirical Bond Order (REBO) Potential of :ref:`(Brenner) `. Note that this is the so-called -2nd generation REBO from 2002, not the original REBO from 1990. -As discussed below, 2nd generation REBO is closely related to the +second generation REBO from 2002, not the original REBO from 1990. +As discussed below, second generation REBO is closely related to the initial AIREBO; it is just a subset of the potential energy terms with a few slightly different parameters @@ -90,7 +90,7 @@ By default, all three terms are included. For the *airebo* style, if the first two optional flag arguments to the pair_style command are included, the LJ and torsional terms can be turned off. Note that both or neither of the flags must be included. If both of the LJ an -torsional terms are turned off, it becomes the 2nd-generation REBO +torsional terms are turned off, it becomes the second-generation REBO potential, with a small caveat on the spline fitting procedure mentioned below. This can be specified directly as pair_style *rebo* with no additional arguments. @@ -150,14 +150,14 @@ See the :doc:`pair_coeff ` doc page for alternate ways to specify the path for the potential file. As an example, if your LAMMPS simulation has 4 atom types and you want -the 1st 3 to be C, and the 4th to be H, you would use the following +the first 3 to be C, and the fourth to be H, you would use the following pair_coeff command: .. code-block:: LAMMPS pair_coeff * * CH.airebo C C C H -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three C arguments map LAMMPS atom types 1,2,3 to the C element in the AIREBO file. The final H argument maps LAMMPS atom type 4 to the H element in the SW file. If a mapping value is diff --git a/doc/src/pair_atm.rst b/doc/src/pair_atm.rst index 902e07a80d..5017f101cd 100644 --- a/doc/src/pair_atm.rst +++ b/doc/src/pair_atm.rst @@ -71,7 +71,7 @@ above, or in the restart files read by the * :math:`\nu` = prefactor (energy/distance\^9 units) :math:`K` can be specified in one of two ways. An explicit numeric value can -be used, as in the 2nd example above. :math:`J \leq K` is required. LAMMPS +be used, as in the second example above. :math:`J \leq K` is required. LAMMPS sets the coefficients for the other 5 symmetric interactions to the same values. E.g. if :math:`I = 1`, :math:`J = 2`, :math:`K = 3`, then these 6 values are set to the specified :math:`\nu`: :math:`\nu_{123}`, diff --git a/doc/src/pair_bop.rst b/doc/src/pair_bop.rst index 5cd045931a..5194387e41 100644 --- a/doc/src/pair_bop.rst +++ b/doc/src/pair_bop.rst @@ -129,14 +129,14 @@ where N is the number of LAMMPS atom types: As an example, imagine the CdTe.bop file has BOP values for Cd and Te. If your LAMMPS simulation has 4 atoms types and you want the -1st 3 to be Cd, and the 4th to be Te, you would use the following +first 3 to be Cd, and the fourth to be Te, you would use the following pair_coeff command: .. code-block:: LAMMPS pair_coeff * * CdTe Cd Cd Cd Te -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Cd arguments map LAMMPS atom types 1,2,3 to the Cd element in the BOP file. The final Te argument maps LAMMPS atom type 4 to the Te element in the BOP file. diff --git a/doc/src/pair_charmm.rst b/doc/src/pair_charmm.rst index 031e6e6717..1c8bb2a665 100644 --- a/doc/src/pair_charmm.rst +++ b/doc/src/pair_charmm.rst @@ -127,7 +127,7 @@ name are the older, original LAMMPS implementations. They compute the LJ and Coulombic interactions with an energy switching function (esw, shown in the formula below as S(r)), which ramps the energy smoothly to zero between the inner and outer cutoff. This can cause -irregularities in pair-wise forces (due to the discontinuous 2nd +irregularities in pair-wise forces (due to the discontinuous second derivative of energy at the boundaries of the switching region), which in some cases can result in detectable artifacts in an MD simulation. diff --git a/doc/src/pair_coeff.rst b/doc/src/pair_coeff.rst index 1886ce1118..17669a238b 100644 --- a/doc/src/pair_coeff.rst +++ b/doc/src/pair_coeff.rst @@ -35,7 +35,7 @@ pair style. Pair coefficients can also be set in the data file read by the :doc:`read_data ` command or in a restart file. I and J can be specified in one of two ways. Explicit numeric values -can be used for each, as in the 1st example above. I <= J is +can be used for each, as in the first example above. I <= J is required. LAMMPS sets the coefficients for the symmetric J,I interaction to the same values. @@ -66,7 +66,7 @@ specified, which sets the coefficients for type I interacting with type I. This is because the section has exactly N lines, where N = the number of atom types. For this reason, the wild-card asterisk should also not be used as part of the I argument. Thus in a data -file, the line corresponding to the 1st example above would be listed +file, the line corresponding to the first example above would be listed as .. parsed-literal:: diff --git a/doc/src/pair_comb.rst b/doc/src/pair_comb.rst index 247f539ab5..6d65ff7753 100644 --- a/doc/src/pair_comb.rst +++ b/doc/src/pair_comb.rst @@ -37,7 +37,7 @@ Examples Description """"""""""" -Style *comb* computes the second-generation variable charge COMB +Style *comb* computes the second generation variable charge COMB (Charge-Optimized Many-Body) potential. Style *comb3* computes the third-generation COMB potential. These COMB potentials are described in :ref:`(COMB) ` and :ref:`(COMB3) `. Briefly, the @@ -74,8 +74,8 @@ N additional arguments after the potential file in the pair_coeff command, where N is the number of LAMMPS atom types. For example, if your LAMMPS simulation of a Si/SiO2/ -HfO2 interface has 4 atom types, and you want the 1st and -last to be Si, the 2nd to be Hf, and the 3rd to be O, and you would +HfO2 interface has 4 atom types, and you want the first and +last to be Si, the second to be Hf, and the third to be O, and you would use the following pair_coeff command: .. code-block:: LAMMPS @@ -93,10 +93,10 @@ This can be used when a *comb* potential is used as part of the that will be used with other potentials. For style *comb*\ , the provided potential file *ffield.comb* contains -all currently-available 2nd generation COMB parameterizations: for Si, +all currently-available second generation COMB parameterizations: for Si, Cu, Hf, Ti, O, their oxides and Zr, Zn and U metals. For style *comb3*\ , the potential file *ffield.comb3* contains all -currently-available 3rd generation COMB parameterizations: O, Cu, N, C, +currently-available third generation COMB parameterizations: O, Cu, N, C, H, Ti, Zn and Zr. The status of the optimization of the compounds, for example Cu2O, TiN and hydrocarbons, are given in the following table: diff --git a/doc/src/pair_e3b.rst b/doc/src/pair_e3b.rst index 68f8708b27..cb9a7c1358 100644 --- a/doc/src/pair_e3b.rst +++ b/doc/src/pair_e3b.rst @@ -80,7 +80,7 @@ The two-body interactions are cut off sharply at Rc2, because K3 is typically si See :ref:`(Kumar 2008) ` for more details. Only a single *pair_coeff* command is used with the *e3b* style. -The 1st two arguments must be \* \*. +The first two arguments must be \* \*. The oxygen atom type for the pair style is passed as the only argument to the *pair_style* command, not in the *pair_coeff* command. The hydrogen atom type is inferred by the ordering of the atoms. diff --git a/doc/src/pair_eam.rst b/doc/src/pair_eam.rst index c93c694833..50b55084c2 100644 --- a/doc/src/pair_eam.rst +++ b/doc/src/pair_eam.rst @@ -262,15 +262,15 @@ As an example, the potentials/NiAlH_jea.eam.alloy file is a *setfl* file which has tabulated EAM values for 3 elements and their alloy interactions: Ni, Al, and H. See the :doc:`pair_coeff ` doc page for alternate ways to specify the path for the potential file. -If your LAMMPS simulation has 4 atoms types and you want the 1st 3 to -be Ni, and the 4th to be Al, you would use the following pair_coeff +If your LAMMPS simulation has 4 atoms types and you want the first 3 to +be Ni, and the fourth to be Al, you would use the following pair_coeff command: .. code-block:: LAMMPS pair_coeff * * NiAlH_jea.eam.alloy Ni Ni Ni Al -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Ni arguments map LAMMPS atom types 1,2,3 to the Ni element in the *setfl* file. The final Al argument maps LAMMPS atom type 4 to the Al element in the *setfl* file. Note that there is no @@ -309,7 +309,7 @@ element, each with the following format: As with the *funcfl* files, only the mass (in mass :doc:`units `, e.g. mass number or grams/mole for metal units) is used by LAMMPS from -the 1st line. The cubic lattice constant is in Angstroms. The F and +the first line. The cubic lattice constant is in Angstroms. The F and rho arrays are unique to a single element and have the same format and units as in a *funcfl* file. diff --git a/doc/src/pair_eff.rst b/doc/src/pair_eff.rst index f163e5afaa..0dc2aba510 100644 --- a/doc/src/pair_eff.rst +++ b/doc/src/pair_eff.rst @@ -44,7 +44,7 @@ Field (eFF) potential currently under development at Caltech, as described in :ref:`(Jaramillo-Botero) `. The eFF for Z<6 was first introduced by :ref:`(Su) ` in 2007. It has been extended to higher Zs by using effective core potentials (ECPs) that now cover up -to 2nd and 3rd row p-block elements of the periodic table. +to second and third row p-block elements of the periodic table. eFF can be viewed as an approximation to QM wave packet dynamics and Fermionic molecular dynamics, combining the ability of electronic @@ -210,7 +210,7 @@ representations, after the "ecp" keyword. for systems containing nuclei from Z = 1-6 in "all electron" representations. For systems with increasingly non-spherical electrons, Users should use the ECP representations. ECPs are now - supported and validated for most of the 2nd and 3rd row elements of + supported and validated for most of the second and third row elements of the p-block. Predefined parameters are provided for C, N, O, Al, and Si. The ECP captures the orbital overlap between the core and valence electrons (i.e. Pauli repulsion) with one of the functional forms: @@ -220,8 +220,8 @@ representations, after the "ecp" keyword. E_{Pauli(ECP_s)} = & p_1\exp\left(-\frac{p_2r^2}{p_3+s^2} \right) \\ E_{Pauli(ECP_p)} = & p_1\left( \frac{2}{p_2/s+s/p_2} \right)\left( r-p_3s\right)^2\exp \left[ -\frac{p_4\left( r-p_3s \right)^2}{p_5+s^2} \right] -Where the 1st form correspond to core interactions with s-type valence -electrons and the 2nd to core interactions with p-type valence +Where the first form correspond to core interactions with s-type valence +electrons and the second to core interactions with p-type valence electrons. The current version adds full support for models with fixed-core and diff --git a/doc/src/pair_eim.rst b/doc/src/pair_eim.rst index bb09e10ed2..1cea2f0993 100644 --- a/doc/src/pair_eim.rst +++ b/doc/src/pair_eim.rst @@ -110,14 +110,14 @@ to specify the path for the potential file. As an example like one of those above, suppose you want to model a system with Na and Cl atoms. If your LAMMPS simulation has 4 atoms -types and you want the 1st 3 to be Na, and the 4th to be Cl, you would +types and you want the first 3 to be Na, and the fourth to be Cl, you would use the following pair_coeff command: .. code-block:: LAMMPS pair_coeff * * Na Cl ffield.eim Na Na Na Cl -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The filename is the EIM potential file. The Na and Cl arguments (before the file name) are the two elements for which info will be extracted from the potential file. The first three trailing Na diff --git a/doc/src/pair_exp6_rx.rst b/doc/src/pair_exp6_rx.rst index 7f2be1817a..cff706d26b 100644 --- a/doc/src/pair_exp6_rx.rst +++ b/doc/src/pair_exp6_rx.rst @@ -123,15 +123,15 @@ parenthesized comments): epsilon 0.0000 0.00478 -0.06283 0.24486 -0.33737 2.60097 rm 0.0001 -0.00118 -0.00253 0.05812 -0.00509 1.50106 -A section begins with a non-blank line whose 1st character is not a +A section begins with a non-blank line whose first character is not a "#"; blank lines or lines starting with "#" can be used as comments between sections. Following a blank line, the next N lines list the species and their corresponding parameters. The first argument is the species tag, the -second argument is the exp6 tag, the 3rd argument is the :math:`\alpha` -parameter (energy units), the 4th argument is the :math:`\epsilon` parameter -(energy-distance\^6 units), and the 5th argument is the :math:`R_m` parameter +second argument is the exp6 tag, the third argument is the :math:`\alpha` +parameter (energy units), the fourth argument is the :math:`\epsilon` parameter +(energy-distance\^6 units), and the fifth argument is the :math:`R_m` parameter (distance units). If a species tag of "1fluid" is listed as a pair coefficient, a one-fluid approximation is specified where a concentration-dependent combination of the parameters is computed diff --git a/doc/src/pair_gran.rst b/doc/src/pair_gran.rst index 3cfe946e41..49ae84d673 100644 --- a/doc/src/pair_gran.rst +++ b/doc/src/pair_gran.rst @@ -248,7 +248,7 @@ dissipative potentials. It also returns only the normal component of the pairwise interaction force. However, the single() function also calculates 10 extra pairwise quantities. The first 3 are the components of the tangential force between particles I and J, acting -on particle I. The 4th is the magnitude of this tangential force. +on particle I. The fourth is the magnitude of this tangential force. The next 3 (5-7) are the components of the relative velocity in the normal direction (along the line joining the 2 sphere centers). The last 3 (8-10) the components of the relative velocity in the diff --git a/doc/src/pair_granular.rst b/doc/src/pair_granular.rst index f581c502f3..ee90d1537a 100644 --- a/doc/src/pair_granular.rst +++ b/doc/src/pair_granular.rst @@ -655,7 +655,7 @@ dissipative potentials. It also returns only the normal component of the pairwise interaction force. However, the single() function also calculates 12 extra pairwise quantities. The first 3 are the components of the tangential force between particles I and J, acting -on particle I. The 4th is the magnitude of this tangential force. +on particle I. The fourth is the magnitude of this tangential force. The next 3 (5-7) are the components of the rolling torque acting on particle I. The next entry (8) is the magnitude of the rolling torque. The next entry (9) is the magnitude of the twisting torque acting diff --git a/doc/src/pair_gw.rst b/doc/src/pair_gw.rst index 7564252459..82d99f8785 100644 --- a/doc/src/pair_gw.rst +++ b/doc/src/pair_gw.rst @@ -55,7 +55,7 @@ to specify the path for the potential file. As an example, imagine a file SiC.gw has Gao-Weber values for Si and C. If your LAMMPS simulation has 4 atoms types and you want the first 3 to -be Si, and the 4th to be C, you would use the following pair_coeff command: +be Si, and the fourth to be C, you would use the following pair_coeff command: .. code-block:: LAMMPS diff --git a/doc/src/pair_hbond_dreiding.rst b/doc/src/pair_hbond_dreiding.rst index 0f5470d5f9..ec705a649b 100644 --- a/doc/src/pair_hbond_dreiding.rst +++ b/doc/src/pair_hbond_dreiding.rst @@ -72,7 +72,7 @@ hydrogen (H) and the donor atoms: These 3-body interactions can be defined for pairs of acceptor and donor atoms, based on atom types. For each donor/acceptor atom pair, -the 3rd atom in the interaction is a hydrogen permanently bonded to +the third atom in the interaction is a hydrogen permanently bonded to the donor atom, e.g. in a bond list read in from a data file via the :doc:`read_data ` command. The atom types of possible hydrogen atoms for each donor/acceptor type pair are specified by the @@ -188,7 +188,7 @@ hydrogen bond potential based on a Morse functional form. The last 3 coefficients for both styles are optional. If not specified, the global n, distance cutoff, and angle cutoff specified in the pair_style command are used. If you wish to only override the -2nd or 3rd optional parameter, you must also specify the preceding +second or third optional parameter, you must also specify the preceding optional parameters. ---------- diff --git a/doc/src/pair_hybrid.rst b/doc/src/pair_hybrid.rst index 8e40466faf..da32a0ee45 100644 --- a/doc/src/pair_hybrid.rst +++ b/doc/src/pair_hybrid.rst @@ -51,7 +51,7 @@ be used for a simulation of a metal droplet on a LJ surface. The metal atoms interact with each other via an *eam* potential, the surface atoms interact with each other via a *lj/cut* potential, and the metal/surface interaction is also computed via a *lj/cut* -potential. The *hybrid/overlay* style could be used as in the 2nd +potential. The *hybrid/overlay* style could be used as in the second example above, where multiple potentials are superposed in an additive fashion to compute the interaction between atoms. In this example, using *lj/cut* and *coul/long* together gives the same result as if @@ -72,7 +72,7 @@ sub-style. For efficiency this should only be done if your model requires it. E.g. if you have different regions of Si and C atoms and wish to use a Tersoff potential for pure Si for one set of atoms, and a Tersoff potential for pure C for the other set (presumably with some -3rd potential for Si-C interactions), then the sub-style *tersoff* +third potential for Si-C interactions), then the sub-style *tersoff* could be listed twice. But if you just want to use a Lennard-Jones or other pairwise potential for several different atom type pairs in your model, then you should just list the sub-style once and use the diff --git a/doc/src/pair_lcbop.rst b/doc/src/pair_lcbop.rst index ef26556c69..24445ee485 100644 --- a/doc/src/pair_lcbop.rst +++ b/doc/src/pair_lcbop.rst @@ -38,13 +38,13 @@ See the :doc:`pair_coeff ` doc page for alternate ways to specify the path for the potential file. As an example, if your LAMMPS simulation has 4 atom types and you want -the 1st 3 to be C you would use the following pair_coeff command: +the first 3 to be C you would use the following pair_coeff command: .. code-block:: LAMMPS pair_coeff * * C.lcbop C C C NULL -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The first C argument maps LAMMPS atom type 1 to the C element in the LCBOP file. If a mapping value is specified as NULL, the mapping is not performed. This can be used when a *lcbop* potential is used as diff --git a/doc/src/pair_lj_smooth.rst b/doc/src/pair_lj_smooth.rst index b2cf6f7493..16c1973883 100644 --- a/doc/src/pair_lj_smooth.rst +++ b/doc/src/pair_lj_smooth.rst @@ -43,14 +43,14 @@ The polynomial coefficients C1, C2, C3, C4 are computed by LAMMPS to cause the force to vary smoothly from the inner cutoff :math:`r_{in}` to the outer cutoff :math:`r_c`. -At the inner cutoff the force and its 1st derivative +At the inner cutoff the force and its first derivative will match the non-smoothed LJ formula. At the outer cutoff the force -and its 1st derivative will be 0.0. The inner cutoff cannot be 0.0. +and its first derivative will be 0.0. The inner cutoff cannot be 0.0. .. note:: this force smoothing causes the energy to be discontinuous both - in its values and 1st derivative. This can lead to poor energy + in its values and first derivative. This can lead to poor energy conservation and may require the use of a thermostat. Plot the energy and force resulting from this formula via the :doc:`pair_write ` command to see the effect. diff --git a/doc/src/pair_meam_spline.rst b/doc/src/pair_meam_spline.rst index 6c4da24625..a1b6709867 100644 --- a/doc/src/pair_meam_spline.rst +++ b/doc/src/pair_meam_spline.rst @@ -93,7 +93,7 @@ command: pair_coeff * * Ti.meam.spline Ti Ti Ti -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The three Ti arguments map LAMMPS atom types 1,2,3 to the Ti element in the potential file. If a mapping value is specified as NULL, the mapping is not performed. This can be used when a *meam/spline* @@ -109,7 +109,7 @@ the command pair_coeff * * TiO.meam.spline Ti O -will map the 1st atom type to Ti and the second atom type to O. Note +will map the first atom type to Ti and the second atom type to O. Note in this case that the species names need to match exactly with the names of the elements in the TiO.meam.spline file; otherwise an error will be raised. This behavior is different than the old style diff --git a/doc/src/pair_meam_sw_spline.rst b/doc/src/pair_meam_sw_spline.rst index 0cf4c57975..6400f7eadd 100644 --- a/doc/src/pair_meam_sw_spline.rst +++ b/doc/src/pair_meam_sw_spline.rst @@ -79,7 +79,7 @@ command: pair_coeff * * Ti.meam.sw.spline Ti Ti Ti -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The three Ti arguments map LAMMPS atom types 1,2,3 to the Ti element in the potential file. If a mapping value is specified as NULL, the mapping is not performed. This can be used when a *meam/sw/spline* diff --git a/doc/src/pair_meamc.rst b/doc/src/pair_meamc.rst index f227af8b45..7a0b0ca12b 100644 --- a/doc/src/pair_meamc.rst +++ b/doc/src/pair_meamc.rst @@ -71,7 +71,7 @@ the MEAM potential files themselves. Only a single pair_coeff command is used with the *meam* style which specifies two MEAM files and the element(s) to extract information for. The MEAM elements are mapped to LAMMPS atom types by specifying -N additional arguments after the 2nd filename in the pair_coeff +N additional arguments after the second filename in the pair_coeff command, where N is the number of LAMMPS atom types: * MEAM library file @@ -85,14 +85,14 @@ to specify the path for the potential files. As an example, the potentials/library.meam file has generic MEAM settings for a variety of elements. The potentials/SiC.meam file has specific parameter settings for a Si and C alloy system. If your -LAMMPS simulation has 4 atoms types and you want the 1st 3 to be Si, -and the 4th to be C, you would use the following pair_coeff command: +LAMMPS simulation has 4 atoms types and you want the first 3 to be Si, +and the fourth to be C, you would use the following pair_coeff command: .. code-block:: LAMMPS pair_coeff * * library.meam Si C sic.meam Si Si Si C -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The first filename is the element library file. The list of elements following it extracts lines from the library file and assigns numeric indices to these elements. The second filename is the alloy parameter file, which refers to @@ -101,7 +101,7 @@ The arguments after the parameter file map LAMMPS atom types to elements, i.e. LAMMPS atom types 1,2,3 to the MEAM Si element. The final C argument maps LAMMPS atom type 4 to the MEAM C element. -If the 2nd filename is specified as NULL, no parameter file is read, +If the second filename is specified as NULL, no parameter file is read, which simply means the generic parameters in the library file are used. Use of the NULL specification for the parameter file is discouraged for systems with more than a single element type @@ -116,14 +116,14 @@ that will be used with other potentials. .. note:: - If the 2nd filename is NULL, the element names between the two + If the second filename is NULL, the element names between the two filenames can appear in any order, e.g. "Si C" or "C Si" in the - example above. However, if the 2nd filename is not NULL (as in the + example above. However, if the second filename is not NULL (as in the example above), it contains settings that are Fortran-indexed for the elements that precede it. Thus you need to insure you list the elements between the filenames in an order consistent with how the - values in the 2nd filename are indexed. See details below on the - syntax for settings in the 2nd file. + values in the second filename are indexed. See details below on the + syntax for settings in the second file. The MEAM library file provided with LAMMPS has the name potentials/library.meam. It is the "meamf" file used by other MD @@ -299,7 +299,7 @@ Thus these lines rho0(2) = 2.25 alpha(1,2) = 4.37 -set rho0 for the 2nd element to the value 2.25 and set alpha for the +set rho0 for the second element to the value 2.25 and set alpha for the alloy interaction between elements 1 and 2 to 4.37. The augt1 parameter is related to modifications in the MEAM diff --git a/doc/src/pair_multi_lucy.rst b/doc/src/pair_multi_lucy.rst index 37da1ab965..a8d40cfe08 100644 --- a/doc/src/pair_multi_lucy.rst +++ b/doc/src/pair_multi_lucy.rst @@ -106,7 +106,7 @@ defined as follows (without the parenthesized comments): ... 500 10.0 0.001 0.003 -A section begins with a non-blank line whose 1st character is not a +A section begins with a non-blank line whose first character is not a "#"; blank lines or lines starting with "#" can be used as comments between sections. The first line begins with a keyword which identifies the section. The line can contain additional text, but the @@ -157,9 +157,9 @@ between *rlo\*rlo* and *rhi\*rhi* are computed. warn if this is occurring. Following a blank line, the next N lines list the tabulated values. -On each line, the 1st value is the index from 1 to N, the 2nd value is -r (in density units), the 3rd value is the density-dependent function value -(in energy units / length\^4), and the 4th is the force (in force units). The +On each line, the first value is the index from 1 to N, the second value is +r (in density units), the third value is the density-dependent function value +(in energy units / length\^4), and the fourth is the force (in force units). The density values must increase from one line to the next. Note that one file can contain many sections, each with a tabulated diff --git a/doc/src/pair_multi_lucy_rx.rst b/doc/src/pair_multi_lucy_rx.rst index 3824ca96cf..4397f25894 100644 --- a/doc/src/pair_multi_lucy_rx.rst +++ b/doc/src/pair_multi_lucy_rx.rst @@ -134,7 +134,7 @@ defined as follows (without the parenthesized comments): ... 500 10.0 0.001 0.003 -A section begins with a non-blank line whose 1st character is not a +A section begins with a non-blank line whose first character is not a "#"; blank lines or lines starting with "#" can be used as comments between sections. The first line begins with a keyword which identifies the section. The line can contain additional text, but the @@ -185,9 +185,9 @@ uniformly spaced between *rlo\*rlo* and *rhi\*rhi* are computed. this is occurring. Following a blank line, the next N lines list the tabulated values. -On each line, the 1st value is the index from 1 to N, the 2nd value is -r (in density units), the 3rd value is the density-dependent function -value (in energy units / length\^4), and the 4th is the force (in force +On each line, the first value is the index from 1 to N, the second value is +r (in density units), the third value is the density-dependent function +value (in energy units / length\^4), and the fourth is the force (in force units). The density values must increase from one line to the next. Note that one file can contain many sections, each with a tabulated diff --git a/doc/src/pair_nb3b_harmonic.rst b/doc/src/pair_nb3b_harmonic.rst index 9d63df65d5..95de93ba2e 100644 --- a/doc/src/pair_nb3b_harmonic.rst +++ b/doc/src/pair_nb3b_harmonic.rst @@ -47,14 +47,14 @@ to specify the path for the potential file. As an example, imagine a file SiC.nb3b.harmonic has potential values for Si and C. If your LAMMPS simulation has 4 atoms types and you -want the 1st 3 to be Si, and the 4th to be C, you would use the +want the first 3 to be Si, and the fourth to be C, you would use the following pair_coeff command: .. code-block:: LAMMPS pair_coeff * * SiC.nb3b.harmonic Si Si Si C -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Si arguments map LAMMPS atom types 1,2,3 to the Si element in the potential file. The final C argument maps LAMMPS atom type 4 to the C element in the potential file. If a mapping value is diff --git a/doc/src/pair_polymorphic.rst b/doc/src/pair_polymorphic.rst index a23a9f12f9..d2ce98b7d5 100644 --- a/doc/src/pair_polymorphic.rst +++ b/doc/src/pair_polymorphic.rst @@ -201,8 +201,8 @@ included in the potentials directory of the LAMMPS distribution. They have a "poly" suffix. As an example, imagine the GaN_tersoff.poly file has tabulated functions -for Ga-N tersoff potential. If your LAMMPS simulation has 4 atoms types -and you want the 1st 3 to be Ga, and the 4th to be N, you would use the +for Ga-N tersoff potential. If your LAMMPS simulation has 4 atom types and +you want the first 3 to be Ga, and the fourth to be N, you would use the following pair_coeff command: .. code-block:: LAMMPS diff --git a/doc/src/pair_snap.rst b/doc/src/pair_snap.rst index 06ed748a07..0770b5a675 100644 --- a/doc/src/pair_snap.rst +++ b/doc/src/pair_snap.rst @@ -64,14 +64,14 @@ LAMMPS atom types: * N element names = mapping of SNAP elements to atom types As an example, if a LAMMPS indium phosphide simulation has 4 atoms -types, with the first two being indium and the 3rd and 4th being +types, with the first two being indium and the third and fourth being phophorous, the pair_coeff command would look like this: .. code-block:: LAMMPS pair_coeff * * snap InP.snapcoeff InP.snapparam In In P P -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The two filenames are for the coefficient and parameter files, respectively. The two trailing 'In' arguments map LAMMPS atom types 1 and 2 to the SNAP 'In' element. The two trailing 'P' arguments map LAMMPS atom types diff --git a/doc/src/pair_style.rst b/doc/src/pair_style.rst index 48dd2dde0f..f45c759b17 100644 --- a/doc/src/pair_style.rst +++ b/doc/src/pair_style.rst @@ -282,7 +282,7 @@ accelerated styles exist. * :doc:`python ` - * :doc:`quip ` - * :doc:`reax/c ` - ReaxFF potential in C -* :doc:`rebo ` - 2nd generation REBO potential of Brenner +* :doc:`rebo ` - second generation REBO potential of Brenner * :doc:`resquared ` - Everaers RE-Squared ellipsoidal potential * :doc:`sdpd/taitwater/isothermal ` - smoothed dissipative particle dynamics for water at isothermal conditions * :doc:`smd/hertz ` - diff --git a/doc/src/pair_sw.rst b/doc/src/pair_sw.rst index b4fddc6867..e38629f95b 100644 --- a/doc/src/pair_sw.rst +++ b/doc/src/pair_sw.rst @@ -68,14 +68,14 @@ to specify the path for the potential file. As an example, imagine a file SiC.sw has Stillinger-Weber values for Si and C. If your LAMMPS simulation has 4 atoms types and you want -the 1st 3 to be Si, and the 4th to be C, you would use the following +the first 3 to be Si, and the fourth to be C, you would use the following pair_coeff command: .. code-block:: LAMMPS pair_coeff * * SiC.sw Si Si Si C -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Si arguments map LAMMPS atom types 1,2,3 to the Si element in the SW file. The final C argument maps LAMMPS atom type 4 to the C element in the SW file. If a mapping value is specified as @@ -140,7 +140,7 @@ entries would be required, etc. As annotated above, the first element in the entry is the center atom in a three-body interaction. Thus an entry for SiCC means a Si atom with 2 C atoms as neighbors. The parameter values used for the -two-body interaction come from the entry where the 2nd and 3rd +two-body interaction come from the entry where the second and third elements are the same. Thus the two-body parameters for Si interacting with C, comes from the SiCC entry. The three-body parameters can in principle be specific to the three elements of the @@ -158,7 +158,7 @@ order of the two neighbors is arbitrary, the three-body parameters for entries CSiC and CCSi should be the same. Similarly, the two-body parameters for entries SiCC and CSiSi should also be the same. The parameters used only for two-body interactions (A, B, p, and q) in -entries whose 2nd and 3rd element are different (e.g. SiCSi) are not +entries whose second and third element are different (e.g. SiCSi) are not used for anything and can be set to 0.0 if desired. This is also true for the parameters in :math:`\phi_3` that are taken from the ij and ik pairs (:math:`\sigma`, *a*\ , :math:`\gamma`) diff --git a/doc/src/pair_table.rst b/doc/src/pair_table.rst index 9d1a21f1dc..5638664518 100644 --- a/doc/src/pair_table.rst +++ b/doc/src/pair_table.rst @@ -139,7 +139,7 @@ defined as follows (without the parenthesized comments): ... 500 10.0 0.001 0.003 -A section begins with a non-blank line whose 1st character is not a +A section begins with a non-blank line whose first character is not a "#"; blank lines or lines starting with "#" can be used as comments between sections. The first line begins with a keyword which identifies the section. The line can contain additional text, but the @@ -196,7 +196,7 @@ file is typically produced by the :doc:`pair_write ` command with its *bitmap* option. When the table is in BITMAP format, the "N" parameter in the file must be equal to 2\^M where M is the value specified in the pair_style command. Also, a cutoff parameter cannot -be used as an optional 3rd argument in the pair_coeff command; the +be used as an optional third argument in the pair_coeff command; the entire table extent as specified in the file must be used. If used, the parameter "FPRIME" is followed by 2 values *fplo* and @@ -208,9 +208,9 @@ last 2 force values in the table. This parameter is not used by BITMAP tables. Following a blank line, the next N lines list the tabulated values. -On each line, the 1st value is the index from 1 to N, the 2nd value is -r (in distance units), the 3rd value is the energy (in energy units), -and the 4th is the force (in force units). The r values must increase +On each line, the first value is the index from 1 to N, the second value is +r (in distance units), the third value is the energy (in energy units), +and the fourth is the force (in force units). The r values must increase from one line to the next (unless the BITMAP parameter is specified). Note that one file can contain many sections, each with a tabulated diff --git a/doc/src/pair_table_rx.rst b/doc/src/pair_table_rx.rst index 32863cbd29..cc9e66f906 100644 --- a/doc/src/pair_table_rx.rst +++ b/doc/src/pair_table_rx.rst @@ -133,7 +133,7 @@ defined as follows (without the parenthesized comments): ... 500 10.0 0.001 0.003 -A section begins with a non-blank line whose 1st character is not a +A section begins with a non-blank line whose first character is not a "#"; blank lines or lines starting with "#" can be used as comments between sections. The first line begins with a keyword which identifies the section. The line can contain additional text, but the @@ -180,7 +180,7 @@ file is typically produced by the :doc:`pair_write ` command with its *bitmap* option. When the table is in BITMAP format, the "N" parameter in the file must be equal to 2\^M where M is the value specified in the pair_style command. Also, a cutoff parameter cannot -be used as an optional 3rd argument in the pair_coeff command; the +be used as an optional third argument in the pair_coeff command; the entire table extent as specified in the file must be used. If used, the parameter "FPRIME" is followed by 2 values *fplo* and @@ -192,9 +192,9 @@ last 2 force values in the table. This parameter is not used by BITMAP tables. Following a blank line, the next N lines list the tabulated values. -On each line, the 1st value is the index from 1 to N, the 2nd value is -r (in distance units), the 3rd value is the energy (in energy units), -and the 4th is the force (in force units). The r values must increase +On each line, the first value is the index from 1 to N, the second value is +r (in distance units), the third value is the energy (in energy units), +and the fourth is the force (in force units). The r values must increase from one line to the next (unless the BITMAP parameter is specified). Note that one file can contain many sections, each with a tabulated diff --git a/doc/src/pair_tersoff.rst b/doc/src/pair_tersoff.rst index 050b1367f3..dfa35bf4bd 100644 --- a/doc/src/pair_tersoff.rst +++ b/doc/src/pair_tersoff.rst @@ -90,14 +90,14 @@ to specify the path for the potential file. As an example, imagine the SiC.tersoff file has Tersoff values for Si and C. If your LAMMPS simulation has 4 atoms types and you want the -1st 3 to be Si, and the 4th to be C, you would use the following +first 3 to be Si, and the fourth to be C, you would use the following pair_coeff command: .. code-block:: LAMMPS pair_coeff * * SiC.tersoff Si Si Si C -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Si arguments map LAMMPS atom types 1,2,3 to the Si element in the Tersoff file. The final C argument maps LAMMPS atom type 4 to the C element in the Tersoff file. If a mapping value is @@ -151,12 +151,12 @@ interacting in three-body configurations. Thus for 3 elements, 27 entries would be required, etc. As annotated above, the first element in the entry is the center atom -in a three-body interaction and it is bonded to the 2nd atom and the -bond is influenced by the 3rd atom. Thus an entry for SiCC means Si +in a three-body interaction and it is bonded to the second atom and the +bond is influenced by the third atom. Thus an entry for SiCC means Si bonded to a C with another C atom influencing the bond. Thus three-body parameters for SiCSi and SiSiC entries will not, in general, be the same. The parameters used for the two-body -interaction come from the entry where the 2nd element is repeated. +interaction come from the entry where the second element is repeated. Thus the two-body parameters for Si interacting with C, comes from the SiCC entry. @@ -164,7 +164,7 @@ The parameters used for a particular three-body interaction come from the entry with the corresponding three elements. The parameters used only for two-body interactions (n, :math:`\beta`, :math:`\lambda_2`, B, :math:`\lambda_1`, and A) -in entries whose 2nd and 3rd +in entries whose second and third element are different (e.g. SiCSi) are not used for anything and can be set to 0.0 if desired. diff --git a/doc/src/pair_tersoff_mod.rst b/doc/src/pair_tersoff_mod.rst index 1761a0b9fb..7c969ad490 100644 --- a/doc/src/pair_tersoff_mod.rst +++ b/doc/src/pair_tersoff_mod.rst @@ -104,7 +104,7 @@ pair_coeff command: pair_coeff * * Si.tersoff_mod Si Si Si -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The three Si arguments map LAMMPS atom types 1,2,3 to the Si element in the Tersoff/MOD file. If a mapping value is specified as NULL, the mapping is not performed. This can be used when a *tersoff/mod* @@ -156,7 +156,7 @@ ignores those entries. For a single-element simulation, only a single entry is required (e.g. SiSiSi). As annotated above, the first element in the entry is the center atom in a three-body interaction and it is bonded to the -2nd atom and the bond is influenced by the 3rd atom. Thus an entry +second atom and the bond is influenced by the third atom. Thus an entry for SiSiSi means Si bonded to a Si with another Si atom influencing the bond. ---------- diff --git a/doc/src/pair_tersoff_zbl.rst b/doc/src/pair_tersoff_zbl.rst index 57dc3db51e..ee6c9ab508 100644 --- a/doc/src/pair_tersoff_zbl.rst +++ b/doc/src/pair_tersoff_zbl.rst @@ -99,14 +99,14 @@ to specify the path for the potential file. As an example, imagine the SiC.tersoff.zbl file has Tersoff/ZBL values for Si and C. If your LAMMPS simulation has 4 atoms types and you -want the 1st 3 to be Si, and the 4th to be C, you would use the +want the first 3 to be Si, and the fourth to be C, you would use the following pair_coeff command: .. code-block:: LAMMPS pair_coeff * * SiC.tersoff Si Si Si C -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Si arguments map LAMMPS atom types 1,2,3 to the Si element in the Tersoff/ZBL file. The final C argument maps LAMMPS atom type 4 to the C element in the Tersoff/ZBL file. If a mapping @@ -167,12 +167,12 @@ interacting in three-body configurations. Thus for 3 elements, 27 entries would be required, etc. As annotated above, the first element in the entry is the center atom -in a three-body interaction and it is bonded to the 2nd atom and the -bond is influenced by the 3rd atom. Thus an entry for SiCC means Si +in a three-body interaction and it is bonded to the second atom and the +bond is influenced by the third atom. Thus an entry for SiCC means Si bonded to a C with another C atom influencing the bond. Thus three-body parameters for SiCSi and SiSiC entries will not, in general, be the same. The parameters used for the two-body -interaction come from the entry where the 2nd element is repeated. +interaction come from the entry where the second element is repeated. Thus the two-body parameters for Si interacting with C, comes from the SiCC entry. @@ -180,7 +180,7 @@ The parameters used for a particular three-body interaction come from the entry with the corresponding three elements. The parameters used only for two-body interactions (n, :math:`\beta`, :math:`\lambda_2`, B, :math:`\lambda_1`, and A) -in entries whose 2nd and 3rd +in entries whose second and third element are different (e.g. SiCSi) are not used for anything and can be set to 0.0 if desired. diff --git a/doc/src/pair_vashishta.rst b/doc/src/pair_vashishta.rst index 6fc5cfe015..19ac02872e 100644 --- a/doc/src/pair_vashishta.rst +++ b/doc/src/pair_vashishta.rst @@ -101,14 +101,14 @@ to specify the path for the potential file. As an example, imagine a file SiC.vashishta has parameters for Si and C. If your LAMMPS simulation has 4 atoms types and you want -the 1st 3 to be Si, and the 4th to be C, you would use the following +the first 3 to be Si, and the fourth to be C, you would use the following pair_coeff command: .. code-block:: LAMMPS pair_coeff * * SiC.vashishta Si Si Si C -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. +The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Si arguments map LAMMPS atom types 1,2,3 to the Si element in the file. The final C argument maps LAMMPS atom type 4 to the C element in the file. If a mapping value is specified as @@ -176,14 +176,14 @@ and K are taken from the IJK entry. Note that even though three-body parameters do not depend on the order of J and K, LAMMPS stores three-body parameters for both IJK and IKJ. The user must ensure that these values are equal. Two-body parameters for an atom I interacting -with atom J are taken from the IJJ entry, where the 2nd and 3rd +with atom J are taken from the IJJ entry, where the second and third elements are the same. Thus the two-body parameters for Si interacting with C come from the SiCC entry. Note that even though two-body parameters (except possibly gamma and r0 in U3) do not depend on the order of the two elements, LAMMPS will get the Si-C value from the SiCC entry and the C-Si value from the CSiSi entry. The user must ensure that these values are equal. Two-body parameters appearing in -entries where the 2nd and 3rd elements are different are stored but +entries where the second and third elements are different are stored but never used. It is good practice to enter zero for these values. Note that the three-body function U3 above contains the two-body parameters :math:`\gamma` and :math:`r_0`. So U3 for a central C atom bonded to diff --git a/doc/src/partition.rst b/doc/src/partition.rst index be0e1152f5..418d75af86 100644 --- a/doc/src/partition.rst +++ b/doc/src/partition.rst @@ -51,7 +51,7 @@ Partitions are numbered from 1 to Np, where Np is the number of partitions specified by the :doc:`-partition command-line switch `. *N* can be specified in one of two ways. An explicit numeric value -can be used, as in the 1st example above. Or a wild-card asterisk can +can be used, as in the first example above. Or a wild-card asterisk can be used to span a range of partition numbers. This takes the form "\*" or "\*n" or "n\*" or "m\*n". An asterisk with no numeric values means all partitions from 1 to Np. A leading asterisk means all partitions diff --git a/doc/src/read_data.rst b/doc/src/read_data.rst index 79f0e08fcb..74333abecb 100644 --- a/doc/src/read_data.rst +++ b/doc/src/read_data.rst @@ -530,7 +530,7 @@ input script. ID = number of angle (1-Nangles) type = angle type (1-Nangletype) - atom1,atom2,atom3 = IDs of 1st,2nd,3rd atoms in angle + atom1,atom2,atom3 = IDs of 1st,2nd,3rd atom in angle example: @@ -673,7 +673,7 @@ not used (e.g. an atomic system with no bonds), and you don't care if unique atom IDs appear in dump files, then the atom-IDs can all be set to 0. -The molecule ID is a 2nd identifier attached to an atom. Normally, it +The molecule ID is a second identifier attached to an atom. Normally, it is a number from 1 to N, identifying which molecule the atom belongs to. It can be 0 if it is a non-bonded atom or if you don't care to keep track of molecule assignments. @@ -928,7 +928,7 @@ script. ID = bond number (1-Nbonds) type = bond type (1-Nbondtype) - atom1,atom2 = IDs of 1st,2nd atoms in bond + atom1,atom2 = IDs of 1st,2nd atom in bond * example: @@ -974,7 +974,7 @@ Coefficients can also be set via the ID = number of dihedral (1-Ndihedrals) type = dihedral type (1-Ndihedraltype) - atom1,atom2,atom3,atom4 = IDs of 1st,2nd,3rd,4th atoms in dihedral + atom1,atom2,atom3,atom4 = IDs of 1st,2nd,3rd,4th atom in dihedral * example: @@ -1075,7 +1075,7 @@ Coefficients can also be set via the ID = number of improper (1-Nimpropers) type = improper type (1-Nimpropertype) - atom1,atom2,atom3,atom4 = IDs of 1st,2nd,3rd,4th atoms in improper + atom1,atom2,atom3,atom4 = IDs of 1st,2nd,3rd,4th atom in improper * example: diff --git a/doc/src/restart.rst b/doc/src/restart.rst index fd4c1e9e24..e0958d4bb1 100644 --- a/doc/src/restart.rst +++ b/doc/src/restart.rst @@ -62,10 +62,10 @@ two wild-card characters. If a "\*" appears in the single filename, it is replaced with the current timestep value. This is only recognized when a single -filename is used (not when toggling back and forth). Thus, the 3rd +filename is used (not when toggling back and forth). Thus, the third example above creates restart files as follows: restart.1000.equil, restart.2000.equil, etc. If a single filename is used with no "\*", -then the timestep value is appended. E.g. the 2nd example above +then the timestep value is appended. E.g. the second example above creates restart files as follows: poly.restart.1000, poly.restart.2000, etc. @@ -160,7 +160,7 @@ be written, by processors 0,25,50,75. Each will collect information from itself and the next 24 processors and write it to a restart file. For the *fileper* keyword, the specified value of Np means write one -file for every Np processors. For example, if Np = 4, every 4th +file for every Np processors. For example, if Np = 4, every fourth processor (0,4,8,12,etc) will collect information from itself and the next 3 processors and write it to a restart file. diff --git a/doc/src/run.rst b/doc/src/run.rst index f36fb73187..6c47721e91 100644 --- a/doc/src/run.rst +++ b/doc/src/run.rst @@ -97,7 +97,7 @@ just a continuation of a previous run (i.e. no settings are changed), the initial computation is not necessary; the old neighbor list is still valid as are the forces. So if *pre* is specified as "no" then the initial setup is skipped, except for printing thermodynamic info. -Note that if *pre* is set to "no" for the very 1st run LAMMPS +Note that if *pre* is set to "no" for the very first run LAMMPS performs, then it is overridden, since the initial setup computations must be done. @@ -178,7 +178,7 @@ command: "print 'Press = $d'" If the *pre* and *post* options are set to "no" when used with the -*every* keyword, then the 1st run will do the full setup and the last +*every* keyword, then the first run will do the full setup and the last run will print the full timing summary, but these operations will be skipped for intermediate runs. diff --git a/doc/src/run_style.rst b/doc/src/run_style.rst index 7bddb0efcd..713fedae70 100644 --- a/doc/src/run_style.rst +++ b/doc/src/run_style.rst @@ -77,17 +77,17 @@ processors. See the :doc:`-partition command-line switch ` for info on how to run LAMMPS with multiple partitions. Specifically, this style performs all computation except the -:doc:`kspace_style ` portion of the force field on the 1st +:doc:`kspace_style ` portion of the force field on the first partition. This include the :doc:`pair style `, :doc:`bond style `, :doc:`neighbor list building `, :doc:`fixes ` including time integration, and output. The :doc:`kspace_style ` portion of the calculation is -performed on the 2nd partition. +performed on the second partition. This is most useful for the PPPM kspace_style when its performance on a large number of processors degrades due to the cost of communication in its 3d FFTs. In this scenario, splitting your P total processors -into 2 subsets of processors, P1 in the 1st partition and P2 in the -2nd partition, can enable your simulation to run faster. This is +into 2 subsets of processors, P1 in the first partition and P2 in the +second partition, can enable your simulation to run faster. This is because the long-range forces in PPPM can be calculated at the same time as pair-wise and bonded forces are being calculated, and the FFTs can actually speed up when running on fewer processors. @@ -99,8 +99,8 @@ following sense. If P1 is a Px1 by Py1 by Pz1 grid, and P2 = Px2 by Py2 by Pz2, then Px1 must be an integer multiple of Px2, and similarly for Py1 a multiple of Py2, and Pz1 a multiple of Pz2. -Typically the best way to do this is to let the 1st partition choose -its onn optimal layout, then require the 2nd partition's layout to +Typically the best way to do this is to let the first partition choose +its onn optimal layout, then require the second partition's layout to match the integer multiple constraint. See the :doc:`processors ` command with its *part* keyword for a way to control this, e.g. @@ -120,10 +120,10 @@ of 60 and 15 processors each: When you run in 2-partition mode with the *verlet/split* style, the thermodynamic data for the entire simulation will be output to the log -and screen file of the 1st partition, which are log.lammps.0 and +and screen file of the first partition, which are log.lammps.0 and screen.0 by default; see the :doc:`-plog and -pscreen command-line switches ` to change this. The log and screen file -for the 2nd partition will not contain thermodynamic output beyond the -1st timestep of the run. +for the second partition will not contain thermodynamic output beyond the +first timestep of the run. See the :doc:`Speed packages ` doc page for performance details of the speed-up offered by the *verlet/split* style. One diff --git a/doc/src/special_bonds.rst b/doc/src/special_bonds.rst index 35b870442b..779056f87a 100644 --- a/doc/src/special_bonds.rst +++ b/doc/src/special_bonds.rst @@ -92,12 +92,12 @@ pre-factor on the energy and force between the pair of atoms. A value of 1.0 means include the full interaction; a value of 0.0 means exclude it completely. -The 1st of the 3 coefficients (LJ or Coulombic) is the weighting +The first of the 3 coefficients (LJ or Coulombic) is the weighting factor on 1-2 atom pairs, which are pairs of atoms directly bonded to -each other. The 2nd coefficient is the weighting factor on 1-3 atom +each other. The second coefficient is the weighting factor on 1-3 atom pairs which are those separated by 2 bonds (e.g. the two H atoms in a -water molecule). The 3rd coefficient is the weighting factor on 1-4 -atom pairs which are those separated by 3 bonds (e.g. the 1st and 4th +water molecule). The third coefficient is the weighting factor on 1-4 +atom pairs which are those separated by 3 bonds (e.g. the first and fourth atoms in a dihedral interaction). Thus if the 1-2 coefficient is set to 0.0, then the pairwise interaction is effectively turned off for all pairs of atoms bonded to each other. If it is set to 1.0, then @@ -189,14 +189,14 @@ default, then the 2,5 interaction will also be weighted by 0.5. .. note:: LAMMPS stores and maintains a data structure with a list of the - 1st, 2nd, and 3rd neighbors of each atom (within the bond topology of + first, second, and third neighbors of each atom (within the bond topology of the system). If new bonds are created (or molecules added containing atoms with more special neighbors), the size of this list needs to - grow. Note that adding a single bond always adds a new 1st neighbor - but may also induce \*many\* new 2nd and 3rd neighbors, depending on the + grow. Note that adding a single bond always adds a new first neighbor + but may also induce \*many\* new second and third neighbors, depending on the molecular topology of your system. Using the *extra/special/per/atom* keyword to either :doc:`read_data ` or :doc:`create_box ` - reserves empty space in the list for this N additional 1st, 2nd, or 3rd + reserves empty space in the list for this N additional first, second, or third neighbors to be added. If you do not do this, you may get an error when bonds (or molecules) are added. @@ -205,7 +205,7 @@ default, then the 2,5 interaction will also be weighted by 0.5. .. note:: If you reuse this command in an input script, you should set all - the options you need each time. This command cannot be used a 2nd + the options you need each time. This command cannot be used a second time incrementally. E.g. these two commands: .. code-block:: LAMMPS @@ -219,7 +219,7 @@ are not the same as special_bonds lj 0.0 1.0 1.0 coul 0.0 0.0 1.0 -In the first case you end up with (after the 2nd command): +In the first case you end up with (after the second command): .. parsed-literal:: diff --git a/doc/src/temper.rst b/doc/src/temper.rst index bb470f0cc0..9f09a864a2 100644 --- a/doc/src/temper.rst +++ b/doc/src/temper.rst @@ -92,8 +92,8 @@ output timestep. E.g. for a simulation with 16 replicas: The column headings T0 to TN-1 mean which temperature is currently assigned to the replica 0 to N-1. Thus the columns represent replicas and the value in each column is its temperature (also numbered 0 to -N-1). For example, a 0 in the 4th column (column T3, step 2500) means -that the 4th replica is assigned temperature 0, i.e. the lowest +N-1). For example, a 0 in the fourth column (column T3, step 2500) means +that the fourth replica is assigned temperature 0, i.e. the lowest temperature. You can verify this time sequence of temperature assignments for the Nth replica by comparing the Nth column of screen output to the thermodynamic data in the corresponding log.lammps.N or diff --git a/doc/src/thermo_modify.rst b/doc/src/thermo_modify.rst index 3cec230189..fc8f66b90b 100644 --- a/doc/src/thermo_modify.rst +++ b/doc/src/thermo_modify.rst @@ -116,7 +116,7 @@ is more than one field. The *int* and *float* keywords take a single format argument and are applied to all integer or floating-point quantities output. The setting for *M string* also takes a single format argument which is used for the Mth value output in each line, -e.g. the 5th column is output in high precision for "format 5 +e.g. the fifth column is output in high precision for "format 5 %20.15g". The *format* keyword can be used multiple times. The precedence is diff --git a/doc/src/variable.rst b/doc/src/variable.rst index 0e30efc0ab..322276c93c 100644 --- a/doc/src/variable.rst +++ b/doc/src/variable.rst @@ -136,11 +136,11 @@ commands which set their value directly. variable. See below for a more detailed discussion of this feature. In the discussion that follows, the "name" of the variable is the -arbitrary string that is the 1st argument in the variable command. +arbitrary string that is the first argument in the variable command. This name can only contain alphanumeric characters and underscores. The "string" is one or more of the subsequent arguments. The "string" -can be simple text as in the 1st example above, it can contain other -variables as in the 2nd example, or it can be a formula as in the 3rd +can be simple text as in the first example above, it can contain other +variables as in the second example, or it can be a formula as in the third example. The "value" is the numeric quantity resulting from evaluation of the string. Note that the same string can generate different values when it is evaluated at different times during a @@ -249,7 +249,7 @@ in another input script command, its returned string will then be interpreted as multiple arguments in the expanded command. For the *index* style, one or more strings are specified. Initially, -the 1st string is assigned to the variable. Each time a +the first string is assigned to the variable. Each time a :doc:`next ` command is used with the variable name, the next string is assigned. All processors assign the same string to the variable. diff --git a/doc/src/write_restart.rst b/doc/src/write_restart.rst index bdb77dd4b4..46b6046a15 100644 --- a/doc/src/write_restart.rst +++ b/doc/src/write_restart.rst @@ -103,7 +103,7 @@ be written, by processors 0,25,50,75. Each will collect information from itself and the next 24 processors and write it to a restart file. For the *fileper* keyword, the specified value of Np means write one -file for every Np processors. For example, if Np = 4, every 4th +file for every Np processors. For example, if Np = 4, every fourth processor (0,4,8,12,etc) will collect information from itself and the next 3 processors and write it to a restart file. From b587500b19ed8c6977ea1374b5f0c859a9e62809 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Jun 2020 11:56:24 -0400 Subject: [PATCH 12/27] update false positives --- doc/utils/sphinx-config/false_positives.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index a517ce290d..5eb2ee323e 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -2345,6 +2345,7 @@ precession prefactor prefactors prepend +prepended preprint printf printflag @@ -2753,6 +2754,7 @@ sp spacings Spearot specular +spellcheck Spellmeyer sph SPH From 4042b836c29e81a280b8eb65c3f8a9b99cc7c8db Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Jun 2020 12:18:51 -0400 Subject: [PATCH 13/27] enable full c++11 in colvars, same as LAMMPS --- lib/colvars/Makefile.g++ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/colvars/Makefile.g++ b/lib/colvars/Makefile.g++ index 6fa5131d6f..05be658496 100644 --- a/lib/colvars/Makefile.g++ +++ b/lib/colvars/Makefile.g++ @@ -6,7 +6,7 @@ COLVARS_LIB = libcolvars.a COLVARS_OBJ_DIR = CXX = g++ -CXXFLAGS = -std=c++0x -O2 -g -Wall -fPIC -funroll-loops +CXXFLAGS = -std=c++11 -O2 -g -Wall -fPIC -funroll-loops AR = ar ARFLAGS = -rscv SHELL = /bin/sh From 5abfcde3f70869b922c49a0e61d2de71df4295a9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Jun 2020 12:41:19 -0400 Subject: [PATCH 14/27] make subheaders and typesetting more consistent --- doc/src/Build_basics.rst | 21 +- doc/src/Build_extras.rst | 501 ++++++++++++++++++++----------------- doc/src/Build_settings.rst | 63 +++-- 3 files changed, 330 insertions(+), 255 deletions(-) diff --git a/doc/src/Build_basics.rst b/doc/src/Build_basics.rst index e6d9fff373..815ff583cc 100644 --- a/doc/src/Build_basics.rst +++ b/doc/src/Build_basics.rst @@ -372,7 +372,8 @@ it. The build step will also create generic soft links, named ``liblammps.a`` and ``liblammps.so``\ , which point to the specific ``liblammps_machine.a/so`` files. -**CMake and make info**\ : +CMake and make info +^^^^^^^^^^^^^^^^^^^ Note that for creating a shared library, all the libraries it depends on must be compiled to be compatible with shared libraries. This should be @@ -462,7 +463,8 @@ tool. The actual translation is then done via make commands. .. _rst: https://docutils.readthedocs.io/en/sphinx-docs/user/rst/quickstart.html .. _sphinx: https://sphinx-doc.org -**Documentation make option**\ : +Documentation make option +^^^^^^^^^^^^^^^^^^^^^^^^^ The following make commands can be issued in the doc folder of the LAMMPS source distribution. @@ -489,7 +491,8 @@ your system. current LAMMPS version (HTML and PDF files), from the website `download page `_. -**CMake build option**\ : +CMake build option +^^^^^^^^^^^^^^^^^^ It is also possible to create the HTML version of the manual within the :doc:`CMake build directory `. The reason for this @@ -512,7 +515,8 @@ Build LAMMPS tools Some tools described in :doc:`Auxiliary tools ` can be built directly using CMake or Make. -**CMake build3**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash @@ -521,7 +525,8 @@ using CMake or Make. The generated binaries will also become part of the LAMMPS installation (see below). -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ .. code-block:: bash @@ -545,7 +550,8 @@ a globally visible place on your system, for others to access. Note that you may need super-user privileges (e.g. sudo) if the directory you want to copy files to is protected. -**CMake build**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash @@ -553,7 +559,8 @@ you want to copy files to is protected. make # perform make after CMake command make install # perform the installation into prefix -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ There is no "install" option in the ``src/Makefile`` for LAMMPS. If you wish to do this you will need to first build LAMMPS, then manually diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index fe974278eb..a94a92e5d8 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -59,12 +59,13 @@ This is the list of packages that may require additional steps. .. _compress: COMPRESS package -------------------------------- +---------------- To build with this package you must have the zlib compression library available on your system. -**CMake build**\ : +CMake build +^^^^^^^^^^^ If CMake cannot find the library, you can set these variables: @@ -73,10 +74,11 @@ If CMake cannot find the library, you can set these variables: -D ZLIB_INCLUDE_DIR=path # path to zlib.h header file -D ZLIB_LIBRARIES=path # path to libz.a (.so) file -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ If make cannot find the library, you can edit the file -lib/compress/Makefile.lammps to specify the paths and library +``lib/compress/Makefile.lammps`` to specify the paths and library name. ---------- @@ -90,7 +92,8 @@ To build with this package, you must choose options for precision and which GPU hardware to build for. The GPU package currently supports three different types of backends: OpenCL, CUDA and HIP. -**CMake build**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash @@ -158,7 +161,8 @@ and the linker to work correctly. cmake -D PKG_GPU=on -D GPU_API=HIP -D HIP_ARCH=sm_70 .. make -j 4 -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ Before building LAMMPS, you must build the GPU library in ``lib/gpu``\ . You can do this manually if you prefer; follow the instructions in @@ -207,10 +211,10 @@ your machine are not correct, the LAMMPS build will fail, and .. note:: - If you re-build the GPU library in lib/gpu, you should always - un-install the GPU package in lammps/src, then re-install it and + If you re-build the GPU library in ``lib/gpu``, you should always + un-install the GPU package in ``lammps/src``, then re-install it and re-build LAMMPS. This is because the compilation of files in the GPU - package uses the library settings from the lib/gpu/Makefile.machine + package uses the library settings from the ``lib/gpu/Makefile.machine`` used to build the GPU library. ---------- @@ -249,7 +253,8 @@ See the list of all KIM models here: https://openkim.org/browse/models the KIM API library with all its models, may take a long time (tens of minutes to hours) to build. Of course you only need to do that once.) -**CMake build**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash @@ -281,7 +286,8 @@ As an alternative, you can specify your own CA cert path by setting the environment variable ``CURL_CA_BUNDLE`` to the path of your choice. A call to the KIM web query would get this value from the environmental variable. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ You can download and build the KIM library manually if you prefer; follow the instructions in ``lib/kim/README``\ . You can also do it in one @@ -299,7 +305,7 @@ invoke the ``lib/kim/Install.py`` script with the specified args. $ make lib-kim args="-p /usr/local -a EAM_Dynamo_Ackland_W__MO_141627196590_002" # ditto but add one model or driver Settings for OpenKIM web queries discussed above need to be applied by adding -them to the ``LMP_INC`` variable through editing the Makefile.machine you are +them to the ``LMP_INC`` variable through editing the ``Makefile.machine`` you are using. For example: .. code-block:: make @@ -604,7 +610,8 @@ LATTE package To build with this package, you must download and build the LATTE library. -**CMake build**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash @@ -617,7 +624,8 @@ already on your system (in a location CMake cannot find it), ``LATTE_LIBRARY`` is the filename (plus path) of the LATTE library file, not the directory the library file is in. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ You can download and build the LATTE library manually if you prefer; follow the instructions in ``lib/latte/README``\ . You can also do it in @@ -633,11 +641,12 @@ args: $ make lib-latte args="-b -m gfortran" # download and build in lib/latte and # copy Makefile.lammps.gfortran to Makefile.lammps -Note that 3 symbolic (soft) links, "includelink" and "liblink" and -"filelink.o", are created in lib/latte to point into the LATTE home -dir. When LAMMPS itself is built it will use these links. You should -also check that the Makefile.lammps file you create is appropriate for -the compiler you use on your system to build LATTE. +Note that 3 symbolic (soft) links, ``includelink`` and ``liblink`` and +``filelink.o``, are created in ``lib/latte`` to point to required +folders and files in the LATTE home directory. When LAMMPS itself is +built it will use these links. You should also check that the +``Makefile.lammps`` file you create is appropriate for the compiler you +use on your system to build LATTE. ---------- @@ -650,7 +659,8 @@ This package can optionally include support for messaging via sockets, using the open-source `ZeroMQ library `_, which must be installed on your system. -**CMake build**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash @@ -658,7 +668,8 @@ be installed on your system. -D ZMQ_LIBRARY=path # ZMQ library file (only needed if a custom location) -D ZMQ_INCLUDE_DIR=path # ZMQ include directory (only needed if a custom location) -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ Before building LAMMPS, you must build the CSlib library in ``lib/message``\ . You can build the CSlib library manually if you prefer; @@ -673,8 +684,8 @@ simply invoke the ``lib/message/Install.py`` script with the specified args: $ make lib-message args="-s" # build as serial lib with no ZMQ support The build should produce two files: ``lib/message/cslib/src/libmessage.a`` -and ``lib/message/Makefile.lammps``\ . The latter is copied from an -existing ``Makefile.lammps.\*`` and has settings to link with the ZeroMQ +and ``lib/message/Makefile.lammps``. The latter is copied from an +existing ``Makefile.lammps.*`` and has settings to link with the ZeroMQ library if requested in the build. ---------- @@ -690,7 +701,8 @@ library. Building the MS-CG library requires that the GSL machine. See the ``lib/mscg/README`` and ``MSCG/Install`` files for more details. -**CMake build**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash @@ -705,7 +717,8 @@ filename (plus path) of the MSCG library file, not the directory the library file is in. ``MSCG_INCLUDE_DIR`` is the directory the MSCG include file is in. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ You can download and build the MS-CG library manually if you prefer; follow the instructions in ``lib/mscg/README``\ . You can also do it in one @@ -733,16 +746,18 @@ not need to edit the ``lib/mscg/Makefile.lammps`` file. OPT package --------------------- -**CMake build**\ : +CMake build +^^^^^^^^^^^ No additional settings are needed besides ``-D PKG_OPT=yes`` -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ -The compile flag "-restrict" must be used to build LAMMPS with the OPT +The compile flag ``-restrict`` must be used to build LAMMPS with the OPT package when using Intel compilers. It should be added to the CCFLAGS -line of your Makefile.machine. See src/MAKE/OPTIONS/Makefile.opt for -an example. +line of your ``Makefile.machine``. See +``src/MAKE/OPTIONS/Makefile.opt`` for an example. ---------- @@ -751,11 +766,13 @@ an example. POEMS package ------------------------- -**CMake build**\ : +CMake build +^^^^^^^^^^^ No additional settings are needed besides ``-D PKG_OPT=yes`` -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ Before building LAMMPS, you must build the POEMS library in ``lib/poems``\ . You can do this manually if you prefer; follow the instructions in @@ -771,8 +788,8 @@ dir, using a command like these, which simply invoke the $ make lib-poems args="-m icc" # build with Intel icc compiler The build should produce two files: ``lib/poems/libpoems.a`` and -``lib/poems/Makefile.lammps``\ . The latter is copied from an existing -``Makefile.lammps.\*`` and has settings needed to build LAMMPS with the +``lib/poems/Makefile.lammps``. The latter is copied from an existing +``Makefile.lammps.*`` and has settings needed to build LAMMPS with the POEMS library (though typically the settings are just blank). If necessary, you can edit/create a new ``lib/poems/Makefile.machine`` file for your system, which should define an ``EXTRAMAKE`` variable to specify @@ -790,7 +807,8 @@ library available on your system, which needs to be a Python 2.7 version or a Python 3.x version. See ``lib/python/README`` for more details. -**CMake build**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash @@ -803,11 +821,12 @@ PYTHON_EXECUTABLE variable to specify which Python interpreter should be used. Note note that you will also need to have the development headers installed for this version, e.g. python2-devel. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ The build uses the ``lib/python/Makefile.lammps`` file in the compile/link process to find Python. You should only need to create a new -``Makefile.lammps.\*`` file (and copy it to ``Makefile.lammps``\ ) if +``Makefile.lammps.*`` file (and copy it to ``Makefile.lammps``) if the LAMMPS build fails. ---------- @@ -821,7 +840,8 @@ To build with this package, you must download and build the `Voro++ library `_, -version 2.3.1 or newer. Make sure that you have ADIOS built either with or -without MPI to match if you build LAMMPS with or without MPI. -ADIOS compilation settings for LAMMPS are automatically detected, if the PATH -and LD_LIBRARY_PATH environment variables have been updated for the local ADIOS -installation and the instructions below are followed for the respective build systems. +The USER-ADIOS package requires the `ADIOS I/O library +`_, version 2.3.1 or newer. Make +sure that you have ADIOS built either with or without MPI to match if +you build LAMMPS with or without MPI. ADIOS compilation settings for +LAMMPS are automatically detected, if the PATH and LD_LIBRARY_PATH +environment variables have been updated for the local ADIOS installation +and the instructions below are followed for the respective build +systems. -**CMake build**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash -D ADIOS2_DIR=path # path is where ADIOS 2.x is installed -D PKG_USER-ADIOS=yes -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ -Turn on the USER-ADIOS package before building LAMMPS. If the ADIOS 2.x software is installed in PATH, there is nothing else to do: +Turn on the USER-ADIOS package before building LAMMPS. If the ADIOS 2.x +software is installed in PATH, there is nothing else to do: .. code-block:: bash @@ -900,18 +926,20 @@ USER-ATC package The USER-ATC package requires the MANYBODY package also be installed. -**CMake build**\ : +CMake build +^^^^^^^^^^^ No additional settings are needed besides "-D PKG_USER-ATC=yes" and "-D PKG_MANYBODY=yes". -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ -Before building LAMMPS, you must build the ATC library in lib/atc. +Before building LAMMPS, you must build the ATC library in ``lib/atc``. You can do this manually if you prefer; follow the instructions in -lib/atc/README. You can also do it in one step from the lammps/src -dir, using a command like these, which simply invoke the -lib/atc/Install.py script with the specified args: +``lib/atc/README``. You can also do it in one step from the +``lammps/src`` dir, using a command like these, which simply invoke the +``lib/atc/Install.py`` script with the specified args: .. code-block:: bash @@ -920,19 +948,19 @@ lib/atc/Install.py script with the specified args: $ 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 -The build should produce two files: lib/atc/libatc.a and -lib/atc/Makefile.lammps. The latter is copied from an existing -Makefile.lammps.\* and has settings needed to build LAMMPS with the ATC -library. If necessary, you can edit/create a new -lib/atc/Makefile.machine file for your system, which should define an -EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine -file. +The build should produce two files: ``lib/atc/libatc.a`` and +``lib/atc/Makefile.lammps``. The latter is copied from an existing +``Makefile.lammps.*`` and has settings needed to build LAMMPS with the +ATC library. If necessary, you can edit/create a new +``lib/atc/Makefile.machine`` file for your system, which should define +an ``EXTRAMAKE`` variable to specify a corresponding +``Makefile.lammps.`` file. Note that the Makefile.lammps file has settings for the BLAS and -LAPACK linear algebra libraries. As explained in lib/atc/README these +LAPACK linear algebra libraries. As explained in ``lib/atc/README`` these can either exist on your system, or you can use the files provided in -lib/linalg. In the latter case you also need to build the library in -lib/linalg with a command like these: +``lib/linalg``. In the latter case you also need to build the library in +``lib/linalg`` with a command like these: .. code-block:: bash @@ -946,19 +974,21 @@ lib/linalg with a command like these: .. _user-awpmd: USER-AWPMD package ------------------------------------ +------------------ -**CMake build**\ : +CMake build +^^^^^^^^^^^ -No additional settings are needed besides "-D PKG_USER-AQPMD=yes". +No additional settings are needed besides ``-D PKG_USER-AQPMD=yes``. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ -Before building LAMMPS, you must build the AWPMD library in lib/awpmd. +Before building LAMMPS, you must build the AWPMD library in ``lib/awpmd``. You can do this manually if you prefer; follow the instructions in -lib/awpmd/README. You can also do it in one step from the lammps/src +``lib/awpmd/README``. You can also do it in one step from the ``lammps/src`` dir, using a command like these, which simply invoke the -lib/awpmd/Install.py script with the specified args: +``lib/awpmd/Install.py`` script with the specified args: .. code-block:: bash @@ -967,19 +997,19 @@ lib/awpmd/Install.py script with the specified args: $ 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 -The build should produce two files: lib/awpmd/libawpmd.a and -lib/awpmd/Makefile.lammps. The latter is copied from an existing -Makefile.lammps.\* and has settings needed to build LAMMPS with the +The build should produce two files: ``lib/awpmd/libawpmd.a`` and +``lib/awpmd/Makefile.lammps``. The latter is copied from an existing +``Makefile.lammps.*`` and has settings needed to build LAMMPS with the AWPMD library. If necessary, you can edit/create a new -lib/awpmd/Makefile.machine file for your system, which should define -an EXTRAMAKE variable to specify a corresponding -Makefile.lammps.machine file. +``lib/awpmd/Makefile.machine`` file for your system, which should define +an ``EXTRAMAKE`` variable to specify a corresponding +``Makefile.lammps.`` file. -Note that the Makefile.lammps file has settings for the BLAS and -LAPACK linear algebra libraries. As explained in lib/awpmd/README +Note that the ``Makefile.lammps`` file has settings for the BLAS and +LAPACK linear algebra libraries. As explained in ``lib/awpmd/README`` these can either exist on your system, or you can use the files -provided in lib/linalg. In the latter case you also need to build the -library in lib/linalg with a command like these: +provided in ``lib/linalg``. In the latter case you also need to build the +library in ``lib/linalg`` with a command like these: .. code-block:: bash @@ -998,36 +1028,26 @@ USER-COLVARS package This package includes into the LAMMPS distribution the Colvars library, which can be built for the most part with all major versions of the C++ language. -A few of the most recent features require C++11 support. In particular, the -library is optionally built together with the -`Lepton `_ library, a copy of which is also -included in the LAMMPS distribution. Lepton implements the -`customFunction `_ -feature, and requires C++11 support. -See `here `_ for a detailed list of -C++11-only features. - -**CMake build**\ : +CMake build +^^^^^^^^^^^ This is the recommended build recipe: no additional settings are normally -needed besides "-D PKG_USER-COLVARS=yes". +needed besides ``-D PKG_USER-COLVARS=yes``. -Building and linking of Lepton (or other C++11-only features) is enabled -automatically when compilation is carried out with C++11 support, and disabled -otherwise. Optionally, Lepton build may be manually controlled with the flag -"-D COLVARS_LEPTON=yes\|no". - -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ Before building LAMMPS, one must build the Colvars library in lib/colvars. -This can be done manually in the same folder by using or adapting one of the -provided Makefiles: for example, Makefile.g++ for the GNU compiler. +This can be done manually in the same folder by using or adapting one of +the provided Makefiles: for example, ``Makefile.g++`` for the GNU C++ +compiler. C++11 compatibility may need to be enabled for some older +compilers (as is done in the example makefile). In general, it is safer to use build setting consistent with the rest of LAMMPS. This is best carried out from the LAMMPS src directory using a -command like these, which simply invoke the lib/colvars/Install.py script with +command like these, which simply invoke the ``lib/colvars/Install.py`` script with the specified args: .. code-block:: bash @@ -1038,7 +1058,7 @@ the specified args: $ make lib-colvars args="-m g++-debug" # build with GNU g++ compiler and colvars debugging enabled The "machine" argument of the "-m" flag is used to find a Makefile.machine to -use as build recipe. If it does not already exist in lib/colvars, it will be +use as build recipe. If it does not already exist in ``lib/colvars``, it will be auto-generated by using compiler flags consistent with those parsed from the core LAMMPS makefiles. @@ -1049,9 +1069,9 @@ Optional flags may be specified as environment variables: $ COLVARS_DEBUG=yes make lib-colvars args="-m machine" # Build with debug code (much slower) $ COLVARS_LEPTON=no make lib-colvars args="-m machine" # Build without Lepton (included otherwise) -The build should produce two files: the library lib/colvars/libcolvars.a +The build should produce two files: the library ``lib/colvars/libcolvars.a`` (which also includes Lepton objects if enabled) and the specification file -lib/colvars/Makefile.lammps. The latter is auto-generated, and normally does +``lib/colvars/Makefile.lammps``. The latter is auto-generated, and normally does not need to be edited. ---------- @@ -1098,12 +1118,14 @@ try a different one, switch to a different build system, consider a global PLUMED installation or consider downloading PLUMED during the LAMMPS build. -**CMake build**\ : +CMake build +^^^^^^^^^^^ -When the "-D PKG_USER-PLUMED" flag is included in the cmake command you -must ensure that GSL is installed in locations that are specified in -your environment. There are then two additional commands that control -the manner in which PLUMED is obtained and linked into LAMMPS. +When the ``-D PKG_USER-PLUMED=yes`` flag is included in the cmake +command you must ensure that GSL is installed in locations that are +specified in your environment. There are then two additional variables +that control the manner in which PLUMED is obtained and linked into +LAMMPS. .. code-block:: bash @@ -1113,21 +1135,22 @@ the manner in which PLUMED is obtained and linked into LAMMPS. If DOWNLOAD_PLUMED is set to "yes", the PLUMED library will be downloaded (the version of PLUMED that will be downloaded is hard-coded to a vetted version of PLUMED, usually a recent stable release version) -and built inside the CMake build directory. If DOWNLOAD_PLUMED is set -to "no" (the default), CMake will try 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 the pkg-config tool can find it or the -PKG_CONFIG_PATH environment variable has to be set up accordingly. -PLUMED should be installed in such a location if you compile it using -the default make; make install commands. +and built inside the CMake build directory. If ``DOWNLOAD_PLUMED`` is +set to "no" (the default), CMake will try 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 the ``pkg-config`` tool can find +it or the PKG_CONFIG_PATH environment variable has to be set up +accordingly. PLUMED should be installed in such a location if you +compile it using the default make; make install commands. -The PLUMED_MODE setting determines the linkage mode for the PLUMED +The ``PLUMED_MODE`` setting determines the linkage mode for the PLUMED library. The allowed values for this flag are "static" (default), "shared", or "runtime". For a discussion of PLUMED linkage modes, -please see above. When DOWNLOAD_PLUMED is enabled the static linkage -mode is recommended. +please see above. When ``DOWNLOAD_PLUMED`` is enabled the static +linkage mode is recommended. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ PLUMED needs to be installed before the USER-PLUMED package is installed so that LAMMPS can find the right settings when compiling and linking @@ -1148,9 +1171,9 @@ from the src folder through the following make args: $ 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" are +Note that 2 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 created with settings +use. A new file ``lib/plumed/Makefile.lammps`` is also created with settings suitable for LAMMPS to compile and link PLUMED using the desired linkage mode. After this step is completed, you can install the USER-PLUMED package and compile LAMMPS in the usual manner: @@ -1185,9 +1208,10 @@ To build with this package you must have the HDF5 software package installed on your system, which should include the h5cc compiler and the HDF5 library. -**CMake build**\ : +CMake build +^^^^^^^^^^^ -No additional settings are needed besides "-D PKG_USER-H5MD=yes". +No additional settings are needed besides ``-D PKG_USER-H5MD=yes``. This should auto-detect the H5MD library on your system. Several advanced CMake H5MD options exist if you need to specify where it is @@ -1195,26 +1219,27 @@ installed. Use the ccmake (terminal window) or cmake-gui (graphical) tools to see these options and set them interactively from their user interfaces. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ -Before building LAMMPS, you must build the CH5MD library in lib/h5md. -You can do this manually if you prefer; follow the instructions in -lib/h5md/README. You can also do it in one step from the lammps/src -dir, using a command like these, which simply invoke the -lib/h5md/Install.py script with the specified args: +Before building LAMMPS, you must build the CH5MD library in +``lib/h5md``. You can do this manually if you prefer; follow the +instructions in ``lib/h5md/README``. You can also do it in one step +from the ``lammps/src`` dir, using a command like these, which simply +invoke the ``lib/h5md/Install.py`` script with the specified args: .. code-block:: bash $ make lib-h5md # print help message $ make lib-h5md args="-m h5cc" # build with h5cc compiler -The build should produce two files: lib/h5md/libch5md.a and -lib/h5md/Makefile.lammps. The latter is copied from an existing -Makefile.lammps.\* and has settings needed to build LAMMPS with the +The build should produce two files: ``lib/h5md/libch5md.a`` and +``lib/h5md/Makefile.lammps``. The latter is copied from an existing +``Makefile.lammps.*`` and has settings needed to build LAMMPS with the system HDF5 library. If necessary, you can edit/create a new -lib/h5md/Makefile.machine file for your system, which should define an -EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine -file. +``lib/h5md/Makefile.machine`` file for your system, which should define +an EXTRAMAKE variable to specify a corresponding +``Makefile.lammps.`` file. ---------- @@ -1229,7 +1254,8 @@ also typically :ref:`install the USER-OMP package `, as it can be used in tandem with the USER-INTEL package to good effect, as explained on the :doc:`Speed intel ` doc page. -**CMake build**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash @@ -1248,11 +1274,12 @@ Best performance is achieved with Intel hardware, Intel compilers, as well as the Intel TBB and MKL libraries. However, the code also compiles, links, and runs with other compilers and without TBB and MKL. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ Choose which hardware to compile for in Makefile.machine via the -following settings. See src/MAKE/OPTIONS/Makefile.intel_cpu\* and -Makefile.knl files for examples. and src/USER-INTEL/README for +following settings. See ``src/MAKE/OPTIONS/Makefile.intel_cpu*`` and +``Makefile.knl`` files for examples. and ``src/USER-INTEL/README`` for additional information. For CPUs: @@ -1280,7 +1307,8 @@ For KNLs: USER-MOLFILE package --------------------------------------- -**CMake build**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash @@ -1295,13 +1323,14 @@ folder of the local VMD installation in use. LAMMPS ships with a couple of default header files that correspond to a popular VMD version, usually the latest release. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ -The lib/molfile/Makefile.lammps file has a setting for a dynamic +The ``lib/molfile/Makefile.lammps`` file has a setting for a dynamic loading library libdl.a that is typically present on all systems. It is required for LAMMPS to link with this package. If the setting is not valid for your system, you will need to edit the Makefile.lammps -file. See lib/molfile/README and lib/molfile/Makefile.lammps for +file. See ``lib/molfile/README`` and ``lib/molfile/Makefile.lammps`` for details. It is also possible to configure a different folder with the VMD molfile plugin header files. LAMMPS ships with a couple of default headers, but these are not compatible with all VMD versions, @@ -1318,22 +1347,24 @@ USER-NETCDF package To build with this package you must have the NetCDF library installed on your system. -**CMake build**\ : +CMake build +^^^^^^^^^^^ -No additional settings are needed besides "-D PKG_USER-NETCDF=yes". +No additional settings are needed besides ``-D PKG_USER-NETCDF=yes``. This should auto-detect the NETCDF library if it is installed on your system at standard locations. Several advanced CMake NETCDF options -exist if you need to specify where it was installed. Use the ccmake -(terminal window) or cmake-gui (graphical) tools to see these options -and set them interactively from their user interfaces. +exist if you need to specify where it was installed. Use the ``ccmake`` +(terminal window) or ``cmake-gui`` (graphical) tools to see these +options and set them interactively from their user interfaces. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ -The lib/netcdf/Makefile.lammps file has settings for NetCDF include +The ``lib/netcdf/Makefile.lammps`` file has settings for NetCDF include and library files which LAMMPS needs to build with this package. If the settings are not valid for your system, you will need to edit the -Makefile.lammps file. See lib/netcdf/README for details. +``Makefile.lammps`` file. See ``lib/netcdf/README`` for details. ---------- @@ -1342,18 +1373,20 @@ Makefile.lammps file. See lib/netcdf/README for details. USER-OMP package ------------------------------- -**CMake build**\ : +CMake build +^^^^^^^^^^^ -No additional settings are required besides "-D PKG_USER-OMP=yes". If +No additional settings are required besides ``-D PKG_USER-OMP=yes``. If CMake detects OpenMP support, the USER-OMP code will be compiled with multi-threading support enabled, otherwise as optimized serial code. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ To enable multi-threading support in the USER-OMP package (and other -styles supporting OpenMP) the following compile and link flags must -be added to your Makefile.machine file. -See src/MAKE/OPTIONS/Makefile.omp for an example. +styles supporting OpenMP) the following compile and link flags must be +added to your Makefile.machine file. See +``src/MAKE/OPTIONS/Makefile.omp`` for an example. .. parsed-literal:: @@ -1363,8 +1396,7 @@ See src/MAKE/OPTIONS/Makefile.omp for an example. LINKFLAGS: -qopenmp # for Intel compilers on Linux For other platforms and compilers, please consult the documentation -about OpenMP support for your compiler. Please see the note about -how to address compatibility :ref:`issues with the 'default(none)' directive ` of some compilers. +about OpenMP support for your compiler. ---------- @@ -1374,19 +1406,20 @@ USER-QMMM package --------------------------------- For using LAMMPS to do QM/MM simulations via the USER-QMMM package you -need to build LAMMPS as a library. A LAMMPS executable with fix qmmm -included can be built, but will not be able to do a QM/MM simulation -on as such. You must also build a QM code - currently only Quantum -ESPRESSO (QE) is supported - and create a new executable which links -LAMMPS and the QM code together. Details are given in the -lib/qmmm/README file. It is also recommended to read the instructions -for :doc:`linking with LAMMPS as a library ` for -background information. This requires compatible Quantum Espresso -and LAMMPS versions. The current interface and makefiles have last -been verified to work in February 2020 with Quantum Espresso versions -6.3 to 6.5. +need to build LAMMPS as a library. A LAMMPS executable with :doc:`fix +qmmm ` included can be built, but will not be able to do a +QM/MM simulation on as such. You must also build a QM code - currently +only Quantum ESPRESSO (QE) is supported - and create a new executable +which links LAMMPS and the QM code together. Details are given in the +``lib/qmmm/README`` file. It is also recommended to read the +instructions for :doc:`linking with LAMMPS as a library ` +for background information. This requires compatible Quantum Espresso +and LAMMPS versions. The current interface and makefiles have last been +verified to work in February 2020 with Quantum Espresso versions 6.3 to +6.5. -**CMake build**\ : +CMake build +^^^^^^^^^^^ When using CMake, building a LAMMPS library is required and it is recommended to build a shared library, since any libraries built from @@ -1403,17 +1436,18 @@ would be: After completing the LAMMPS build and also configuring and compiling Quantum ESPRESSO with external library support (via "make couple"), -go back to the lib/qmmm folder and follow the instructions on the +go back to the ``lib/qmmm` folder and follow the instructions on the README file to build the combined LAMMPS/QE QM/MM executable -(pwqmmm.x) in the lib/qmmm folder. You need to make certain, that +(pwqmmm.x) in the ``lib/qmmm`` folder. You need to make certain, that -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ -Before building LAMMPS, you must build the QMMM library in lib/qmmm. +Before building LAMMPS, you must build the QMMM library in ``lib/qmmm``. You can do this manually if you prefer; follow the first two steps -explained in lib/qmmm/README. You can also do it in one step from the -lammps/src dir, using a command like these, which simply invoke the -lib/qmmm/Install.py script with the specified args: +explained in ``lib/qmmm/README``. You can also do it in one step from +the ``lammps/src`` dir, using a command like these, which simply invoke +the ``lib/qmmm/Install.py`` script with the specified args: .. code-block:: bash @@ -1422,18 +1456,18 @@ lib/qmmm/Install.py script with the specified args: $ 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 -The build should produce two files: lib/qmmm/libqmmm.a and -lib/qmmm/Makefile.lammps. The latter is copied from an existing -Makefile.lammps.\* and has settings needed to build LAMMPS with the +The build should produce two files: ``lib/qmmm/libqmmm.a`` and +``lib/qmmm/Makefile.lammps``. The latter is copied from an existing +``Makefile.lammps.*`` and has settings needed to build LAMMPS with the QMMM library (though typically the settings are just blank). If -necessary, you can edit/create a new lib/qmmm/Makefile.machine file -for your system, which should define an EXTRAMAKE variable to specify -a corresponding Makefile.lammps.machine file. +necessary, you can edit/create a new ``lib/qmmm/Makefile.`` file +for your system, which should define an ``EXTRAMAKE`` variable to +specify a corresponding ``Makefile.lammps.`` file. You can then install QMMM package and build LAMMPS in the usual manner. After completing the LAMMPS build and compiling Quantum ESPRESSO with external library support (via "make couple"), go back to -the lib/qmmm folder and follow the instructions in the README file to +the ``lib/qmmm`` folder and follow the instructions in the README file to build the combined LAMMPS/QE QM/MM executable (pwqmmm.x) in the lib/qmmm folder. @@ -1448,26 +1482,28 @@ To build with this package, you must download and build the QUIP library. It can be obtained from GitHub. For support of GAP potentials, additional files with specific licensing conditions need to be downloaded and configured. See step 1 and step 1.1 in the -lib/quip/README file for details on how to do this. +``lib/quip/README`` file for details on how to do this. -**CMake build**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash -D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location) CMake will not download and build the QUIP library. But once you have -done that, a CMake build of LAMMPS with "-D PKG_USER-QUIP=yes" should +done that, a CMake build of LAMMPS with ``-D PKG_USER-QUIP=yes`` should work. Set QUIP_LIBRARY if CMake cannot find the QUIP library. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ The download/build procedure for the QUIP library, described in -lib/quip/README file requires setting two environment variables, +``lib/quip/README`` file requires setting two environment variables, QUIP_ROOT and QUIP_ARCH. These are accessed by the lib/quip/Makefile.lammps file which is used when you compile and link LAMMPS with this package. You should only need to edit -Makefile.lammps if the LAMMPS build can not use its settings to +``Makefile.lammps`` if the LAMMPS build can not use its settings to successfully build on your system. ---------- @@ -1477,11 +1513,13 @@ successfully build on your system. USER-SCAFACOS package ----------------------------------------- -To build with this package, you must download and build the `ScaFaCoS Coulomb solver library `_ +To build with this package, you must download and build the `ScaFaCoS +Coulomb solver library `_ .. _scafacos-home: http://www.scafacos.de -**CMake build**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash @@ -1496,22 +1534,23 @@ SCAFACOS_LIBRARY is the filename (plus path) of the ScaFaCoS library file, not the directory the library file is in. SCAFACOS_INCLUDE_DIR is the directory the ScaFaCoS include file is in. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ You can download and build the ScaFaCoS library manually if you -prefer; follow the instructions in lib/scafacos/README. You can also -do it in one step from the lammps/src dir, using a command like these, -which simply invoke the lib/scafacos/Install.py script with the +prefer; follow the instructions in ``lib/scafacos/README``. You can also +do it in one step from the ``lammps/src`` dir, using a command like these, +which simply invoke the ``lib/scafacos/Install.py`` script with the specified args: make lib-scafacos # print help message make lib-scafacos args="-b" # download and build in lib/scafacos/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 -created in lib/scafacos to point to the ScaFaCoS src dir. When LAMMPS +Note that 2 symbolic (soft) links, ``includelink`` and ``liblink``, are +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 -the lib/scafacos/Makefile.lammps file. +the ``lib/scafacos/Makefile.lammps`` file. ---------- @@ -1523,24 +1562,26 @@ USER-SMD package To build with this package, you must download the Eigen3 library. Eigen3 is a template library, so you do not need to build it. -**CMake build**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash -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) -If DOWNLOAD_EIGEN3 is set, the Eigen3 library will be downloaded and +If ``DOWNLOAD_EIGEN3`` is set, the Eigen3 library will be downloaded and inside the CMake build directory. If the Eigen3 library is already on -your system (in a location CMake cannot find it), EIGEN3_INCLUDE_DIR +your system (in a location CMake cannot find it), ``EIGEN3_INCLUDE_DIR`` is the directory the Eigen3++ include file is in. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ You can download the Eigen3 library manually if you prefer; follow the -instructions in lib/smd/README. You can also do it in one step from -the lammps/src dir, using a command like these, which simply invoke -the lib/smd/Install.py script with the specified args: +instructions in ``lib/smd/README``. You can also do it in one step from +the ``lammps/src`` dir, using a command like these, which simply invoke +the ``lib/smd/Install.py`` script with the specified args: .. code-block:: bash @@ -1548,9 +1589,9 @@ the lib/smd/Install.py script with the specified args: $ make lib-smd args="-b" # download to lib/smd/eigen3 $ make lib-smd args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3 -Note that a symbolic (soft) link named "includelink" is created in -lib/smd to point to the Eigen dir. When LAMMPS builds it will use -this link. You should not need to edit the lib/smd/Makefile.lammps +Note that a symbolic (soft) link named ``includelink`` is created in +``lib/smd`` to point to the Eigen dir. When LAMMPS builds it will use +this link. You should not need to edit the ``lib/smd/Makefile.lammps`` file. ---------- @@ -1563,21 +1604,23 @@ USER-VTK package To build with this package you must have the VTK library installed on your system. -**CMake build**\ : +CMake build +^^^^^^^^^^^ -No additional settings are needed besides "-D PKG_USER-VTK=yes". +No additional settings are needed besides ``-D PKG_USER-VTK=yes``. This should auto-detect the VTK library if it is installed on your system at standard locations. Several advanced VTK options exist if -you need to specify where it was installed. Use the ccmake (terminal -window) or cmake-gui (graphical) tools to see these options and set +you need to specify where it was installed. Use the ``ccmake`` (terminal +window) or ``cmake-gui`` (graphical) tools to see these options and set them interactively from their user interfaces. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ -The lib/vtk/Makefile.lammps file has settings for accessing VTK files +The ``lib/vtk/Makefile.lammps`` file has settings for accessing VTK files and its library, which LAMMPS needs to build with this package. If the settings are not valid for your system, check if one of the other -lib/vtk/Makefile.lammps.\* files is compatible and copy it to +``lib/vtk/Makefile.lammps.*`` files is compatible and copy it to Makefile.lammps. If none of the provided files work, you will need to -edit the Makefile.lammps file. See lib/vtk/README for details. +edit the ``Makefile.lammps`` file. See ``lib/vtk/README`` for details. diff --git a/doc/src/Build_settings.rst b/doc/src/Build_settings.rst index 58b61c993c..859bec9889 100644 --- a/doc/src/Build_settings.rst +++ b/doc/src/Build_settings.rst @@ -44,7 +44,8 @@ require use of an FFT library to compute 1d FFTs. The KISS FFT library is included with LAMMPS but other libraries can be faster. LAMMPS can use them if they are available on your system. -**CMake variables**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash @@ -74,7 +75,12 @@ to assist: -D FFT_MKL_THREADS=on # enable using threaded FFTs with MKL libraries -D MKL_LIBRARIES=path -**Makefile.machine settings**\ : +Traditional make +^^^^^^^^^^^^^^^^ + +To change the FFT library to be used and its options, you have to edit +your machine Makefile. Below are examples how the makefile variables +could be changed. .. code-block:: make @@ -104,7 +110,8 @@ 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 files in its default search path. You must specify ``FFT_LIB`` with the appropriate FFT libraries to include in the link. -**CMake and make info**\ : +CMake build +^^^^^^^^^^^ The `KISS FFT library `_ is included in the LAMMPS distribution. It is portable across all platforms. Depending on the size @@ -127,7 +134,7 @@ download it from `www.fftw.org `_. LAMMPS requires version 3.X; the legacy version 2.1.X is no longer supported. 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 the "--prefix" option of configure. Type ``./configure --help`` to see various options. @@ -176,13 +183,18 @@ LAMMPS has a few integer data types which can be defined as either 4-byte (= 32-bit) or 8-byte (= 64-bit) integers at compile time. The default setting of "smallbig" is almost always adequate. -**CMake variable**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash -D LAMMPS_SIZES=value # smallbig (default) or bigbig or smallsmall -**Makefile.machine setting**\ : +Traditional build +^^^^^^^^^^^^^^^^^ + +If you want a setting different from the default, you need to edit your +machine Makefile. .. code-block:: make @@ -190,7 +202,8 @@ The default setting of "smallbig" is almost always adequate. The default setting is ``-DLAMMPS_SMALLBIG`` if nothing is specified -**CMake and make info**\ : +CMake and make info +^^^^^^^^^^^^^^^^^^^ The default "smallbig" setting allows for simulations with: @@ -251,7 +264,8 @@ PNG image files. Likewise the :doc:`dump movie ` command outputs movie files in MPEG format. Using these options requires the following settings: -**CMake variables**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash @@ -276,7 +290,8 @@ variables: -D ZLIB_LIBRARIES=path # path to libz.a (.so) file -D FFMPEG_EXECUTABLE=path # path to ffmpeg executable -**Makefile.machine settings**\ : +Traditional make +^^^^^^^^^^^^^^^^ .. code-block:: make @@ -295,7 +310,8 @@ with a list of graphics libraries to include in the link. You must insure ffmpeg is in a directory where LAMMPS can find it at runtime, that is a directory in your PATH environment variable. -**CMake and make info**\ : +CMake and make info +^^^^^^^^^^^^^^^^^^^ Using ``ffmpeg`` to output movie files requires that your machine supports the "popen" function in the standard runtime library. @@ -318,7 +334,8 @@ If this option is enabled, large files can be read or written with gzip compression by several LAMMPS commands, including :doc:`read_data `, :doc:`rerun `, and :doc:`dump `. -**CMake variables**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash @@ -326,13 +343,15 @@ gzip compression by several LAMMPS commands, including # default is yes if CMake can find gzip, else no -D GZIP_EXECUTABLE=path # path to gzip executable if CMake cannot find it -**Makefile.machine setting**\ : +Traditional make +^^^^^^^^^^^^^^^^ .. code-block:: make LMP_INC = -DLAMMPS_GZIP -**CMake and make info**\ : +CMake and make info +^^^^^^^^^^^^^^^^^^^ This option requires that your machine supports the "popen()" function in the standard runtime library and that a gzip executable can be @@ -363,7 +382,8 @@ pointers that are aligned to 16-byte boundaries. Using SSE vector instructions efficiently, however, requires memory blocks being aligned on 64-byte boundaries. -**CMake variable**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash @@ -374,7 +394,8 @@ and revert to using the malloc() C-library function instead. When compiling LAMMPS for Windows systems, malloc() will always be used and this setting ignored. -**Makefile.machine setting**\ : +Traditional make +^^^^^^^^^^^^^^^^ .. code-block:: make @@ -398,13 +419,15 @@ types, the following setting will be needed. It converts "long long" to a "long" data type, which should be the desired 8-byte integer on those systems: -**CMake variable**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash -D LAMMPS_LONGLONG_TO_LONG=value # yes or no (default) -**Makefile.machine setting**\ : +Traditional make +^^^^^^^^^^^^^^^^ .. code-block:: make @@ -423,13 +446,15 @@ Instead, the call stack is unwound and control returns to the caller, e.g. to Python. Of course, the calling code has to be set up to *catch* exceptions thrown from within LAMMPS. -**CMake variable**\ : +CMake build +^^^^^^^^^^^ .. code-block:: bash -D LAMMPS_EXCEPTIONS=value # yes or no (default) -**Makefile.machine setting**\ : +Traditional make +^^^^^^^^^^^^^^^^ .. code-block:: make From 7d9e0076c76581bbc9739a7879dd7c311d89cd08 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Jun 2020 17:01:28 -0400 Subject: [PATCH 15/27] update some test yaml files --- .../tests/angle-table_linear.yaml | 80 ++++++++-------- .../tests/angle-table_spline.yaml | 78 +++++++-------- .../force-styles/tests/mol-pair-coul_dsf.yaml | 94 +++++++++---------- 3 files changed, 126 insertions(+), 126 deletions(-) diff --git a/unittest/force-styles/tests/angle-table_linear.yaml b/unittest/force-styles/tests/angle-table_linear.yaml index 1ad625b9f3..76cab56212 100644 --- a/unittest/force-styles/tests/angle-table_linear.yaml +++ b/unittest/force-styles/tests/angle-table_linear.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 5 May 2020 -date_generated: Sat May 30 21:05:53 202 +lammps_version: 2 Jun 2020 +date_generated: Sun Jun 14 14:43:01 202 epsilon: 2.5e-13 prerequisites: ! | atom full @@ -19,7 +19,7 @@ extract: ! "" natoms: 29 init_energy: 41.5339263499027 init_stress: ! |2- - 8.9723357320869255e+01 -8.7188643750026586e+01 -2.5347135708426785e+00 9.2043419883119654e+01 -2.8187238090404918e+01 -1.5291148024925572e+00 + 8.9723357320869255e+01 -8.7188643750026586e+01 -2.5347135708426856e+00 9.2043419883119654e+01 -2.8187238090404925e+01 -1.5291148024925465e+00 init_forces: ! |2 21 3.4186149299343822e+00 4.2795410364249564e+00 -1.2789555411020675e+01 22 -6.0875600315279801e+00 -4.1504951869796685e+00 4.5212856070195855e+00 @@ -27,60 +27,60 @@ init_forces: ! |2 19 -1.9328033033421668e+00 -2.4078805870919702e+00 2.8669575541313530e+00 18 1.5785371874873322e-01 1.6495665212200166e+00 -6.6944747776990425e+00 20 1.7749495845934335e+00 7.5831406587195360e-01 3.8275172235676891e+00 - 28 -6.2799575211499337e-01 -1.4097313073755626e+00 3.2747938980615898e-02 - 4 -1.6032230038990633e+01 -2.4560529343731371e+01 1.2891625920422312e+01 + 28 -6.2799575211499314e-01 -1.4097313073755624e+00 3.2747938980615898e-02 + 4 -1.6032230038990630e+01 -2.4560529343731371e+01 1.2891625920422312e+01 10 9.9863759179365168e+00 4.1873540105704564e+01 -6.6085640966037303e+01 11 -2.0441876158908627e+01 -6.5186824168985842e+00 9.0023620309811001e+00 - 12 -1.0772126658369586e+01 -1.0807367300158258e+01 -9.6049647456797853e+00 + 12 -1.0772126658369590e+01 -1.0807367300158258e+01 -9.6049647456797800e+00 14 1.5267407478336397e+01 -9.4754911480231616e+00 -6.6307012925544209e+00 3 -5.9057050592858733e+00 5.3263619873546141e+01 5.2353380124691299e+01 - 6 4.7083124388174781e+01 -9.5212933434476170e+00 -3.2526392870546800e+01 + 6 4.7083124388174781e+01 -9.5212933434476099e+00 -3.2526392870546793e+01 7 -1.6208182775476292e+01 1.4458587960739091e+01 -3.5314745459502683e+00 - 15 1.2402914209534778e+01 -6.2644630791613922e+00 1.8484576795819923e+01 - 8 -6.5664612141880827e+00 -2.5126850154274230e+01 8.2187944731423272e+01 - 9 -1.5504395262358326e+01 1.6121044185227845e+01 -4.2007069622478044e-01 - 16 3.8927757686510223e-01 1.0690061587911153e+01 6.1542759189377412e+00 + 15 1.2402914209534778e+01 -6.2644630791613931e+00 1.8484576795819923e+01 + 8 -6.5664612141880756e+00 -2.5126850154274244e+01 8.2187944731423272e+01 + 9 -1.5504395262358333e+01 1.6121044185227852e+01 -4.2007069622478133e-01 + 16 3.8927757686510400e-01 1.0690061587911154e+01 6.1542759189377394e+00 17 1.4664194297570774e+00 -1.9971277376602408e+00 1.0776844613215992e+00 5 -4.4802331573497604e+01 -4.8300919461089265e+01 -2.3310767889219282e+01 13 2.8847886813946344e+00 7.2973241014859340e+00 -1.0414233993843336e-01 2 -1.1124882516177403e+00 -9.0075464203887918e+00 -7.2431691227364867e+00 1 4.7865489310693469e+01 7.8760925902181818e+00 -3.2694525514709696e+01 - 27 -2.8720725187343266e-01 2.3577465459556737e+00 -8.0312673032167525e-01 - 29 9.1520300398842602e-01 -9.4801523858011116e-01 7.7037879134105935e-01 - 24 -1.3053945393770574e+00 5.0741459325183227e+00 -3.0209518576072991e+00 - 25 -1.0471133765834275e+00 -3.5082261409793829e+00 5.7374874908501183e-01 - 26 2.3525079159604849e+00 -1.5659197915389398e+00 2.4472031085222872e+00 + 27 -2.8720725187343266e-01 2.3577465459556737e+00 -8.0312673032167514e-01 + 29 9.1520300398842580e-01 -9.4801523858011116e-01 7.7037879134105924e-01 + 24 -1.3053945393770572e+00 5.0741459325183218e+00 -3.0209518576072987e+00 + 25 -1.0471133765834273e+00 -3.5082261409793825e+00 5.7374874908501183e-01 + 26 2.3525079159604845e+00 -1.5659197915389398e+00 2.4472031085222867e+00 run_energy: 29.2317863480852 run_stress: ! |2- - 6.7161703985479718e+01 -7.4680138065367373e+01 7.5184340798876619e+00 5.7521437901240908e+01 -2.7304190748521801e+01 -1.4932945649428698e+01 + 6.7161703985479718e+01 -7.4680138065367359e+01 7.5184340798876548e+00 5.7521437901240908e+01 -2.7304190748521801e+01 -1.4932945649428691e+01 run_forces: ! |2 - 21 6.0524643645662701e-01 7.0314728523699277e-01 -2.2349906198624629e+00 - 22 -1.0299517357238868e+00 -6.7850914711871457e-01 8.1029011311054400e-01 - 23 4.2470529926725975e-01 -2.4638138118278224e-02 1.4247005067519189e+00 - 19 9.8256914435042153e-01 1.2515894863018675e+00 -1.5372413162209080e+00 - 18 -1.1709942604030232e-01 -8.9468235295759801e-01 3.5008479949198072e+00 - 20 -8.6546971831011921e-01 -3.5690713334426949e-01 -1.9636066786988995e+00 - 28 -2.8257906393443950e-02 -6.6089589395111545e-02 5.7412954785172367e-04 - 4 -1.1598618479874556e+01 -1.4069946914275876e+01 1.1631964860700622e+01 - 10 1.1736432849972310e+01 3.5147252452549331e+01 -4.9691358934493351e+01 - 11 -1.9930599656448695e+01 -3.2836744898198669e+00 7.6150969595859648e+00 - 12 -5.8293065548538623e+00 -1.3423749355667571e+01 -5.2738511429384243e+00 + 21 6.0524643645662701e-01 7.0314728523699266e-01 -2.2349906198624625e+00 + 22 -1.0299517357238868e+00 -6.7850914711871446e-01 8.1029011311054377e-01 + 23 4.2470529926725969e-01 -2.4638138118278197e-02 1.4247005067519189e+00 + 19 9.8256914435042142e-01 1.2515894863018673e+00 -1.5372413162209075e+00 + 18 -1.1709942604030243e-01 -8.9468235295759790e-01 3.5008479949198064e+00 + 20 -8.6546971831011899e-01 -3.5690713334426938e-01 -1.9636066786988988e+00 + 28 -2.8257906393443971e-02 -6.6089589395111600e-02 5.7412954785172193e-04 + 4 -1.1598618479874556e+01 -1.4069946914275876e+01 1.1631964860700624e+01 + 10 1.1736432849972303e+01 3.5147252452549331e+01 -4.9691358934493358e+01 + 11 -1.9930599656448692e+01 -3.2836744898198695e+00 7.6150969595859648e+00 + 12 -5.8293065548538641e+00 -1.3423749355667574e+01 -5.2738511429384252e+00 14 1.2984672111772394e+01 -7.2763363322055064e-01 -4.8588140465034968e+00 - 3 -7.1131175159873807e+00 3.1523130842685656e+01 3.9133327910920094e+01 - 6 4.3880849952881213e+01 -6.1732167988806506e+00 -2.6034788339533918e+01 + 3 -7.1131175159873807e+00 3.1523130842685656e+01 3.9133327910920087e+01 + 6 4.3880849952881213e+01 -6.1732167988806488e+00 -2.6034788339533911e+01 7 -1.4366916728367732e+01 1.3135040103127022e+01 -3.0387136809768114e+00 - 15 7.4743142834562484e+00 -3.4640965582760916e+00 9.4855052919847438e+00 - 8 -8.5333281419768188e+00 -2.4737111100998334e+01 6.5176870591189896e+01 - 9 -1.2996571868203622e+01 1.3674206710496632e+01 -6.7871105914534136e-01 - 16 3.6043562512330491e+00 8.0382102532623296e+00 4.0048096667552056e+00 + 15 7.4743142834562475e+00 -3.4640965582760912e+00 9.4855052919847456e+00 + 8 -8.5333281419768152e+00 -2.4737111100998341e+01 6.5176870591189896e+01 + 9 -1.2996571868203626e+01 1.3674206710496637e+01 -6.7871105914534136e-01 + 16 3.6043562512330527e+00 8.0382102532623314e+00 4.0048096667552047e+00 17 5.4695804680835325e-01 -7.5537048761029524e-01 4.0487452808956131e-01 5 -3.5092143924598346e+01 -3.4761325046913385e+01 -2.1062123798094682e+01 - 13 7.7658418286979880e-01 2.0512357329016995e+00 1.8932242747136030e+00 + 13 7.7658418286979858e-01 2.0512357329016981e+00 1.8932242747136030e+00 2 -1.7637583558697996e+00 -1.3758538851839569e+01 -1.1469071109412802e+01 1 3.6220193547187456e+01 1.1585587142479525e+01 -1.7238241972840854e+01 - 27 -1.4554421797121776e-02 1.1056084388026387e-01 -3.5467198058463649e-02 - 29 4.2812328190565727e-02 -4.4471254485152323e-02 3.4893068510611927e-02 - 24 4.1516966455942850e-01 -1.5912776575034657e+00 9.3767616296742551e-01 - 25 3.0070697634260091e-01 1.0957067953103119e+00 -1.8209981159009136e-01 - 26 -7.1587664090202940e-01 4.9557086219315372e-01 -7.5557635137733414e-01 + 27 -1.4554421797121797e-02 1.1056084388026395e-01 -3.5467198058463670e-02 + 29 4.2812328190565768e-02 -4.4471254485152351e-02 3.4893068510611948e-02 + 24 4.1516966455942839e-01 -1.5912776575034653e+00 9.3767616296742518e-01 + 25 3.0070697634260080e-01 1.0957067953103117e+00 -1.8209981159009125e-01 + 26 -7.1587664090202918e-01 4.9557086219315349e-01 -7.5557635137733392e-01 ... diff --git a/unittest/force-styles/tests/angle-table_spline.yaml b/unittest/force-styles/tests/angle-table_spline.yaml index c6b1888735..54a5f6cf56 100644 --- a/unittest/force-styles/tests/angle-table_spline.yaml +++ b/unittest/force-styles/tests/angle-table_spline.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 5 May 2020 -date_generated: Sat May 30 21:05:47 202 +lammps_version: 2 Jun 2020 +date_generated: Sun Jun 14 14:43:02 202 epsilon: 2.5e-13 prerequisites: ! | atom full @@ -19,7 +19,7 @@ extract: ! "" natoms: 29 init_energy: 41.530817896491 init_stress: ! |2- - 8.9723357320869255e+01 -8.7188643750026586e+01 -2.5347135708426856e+00 9.2043419883119654e+01 -2.8187238090404925e+01 -1.5291148024925572e+00 + 8.9723357320869255e+01 -8.7188643750026586e+01 -2.5347135708426856e+00 9.2043419883119654e+01 -2.8187238090404925e+01 -1.5291148024925465e+00 init_forces: ! |2 21 3.4186149299343822e+00 4.2795410364249564e+00 -1.2789555411020675e+01 22 -6.0875600315279801e+00 -4.1504951869796685e+00 4.5212856070195855e+00 @@ -27,60 +27,60 @@ init_forces: ! |2 19 -1.9328033033421659e+00 -2.4078805870919697e+00 2.8669575541313526e+00 18 1.5785371874873277e-01 1.6495665212200161e+00 -6.6944747776990408e+00 20 1.7749495845934331e+00 7.5831406587195349e-01 3.8275172235676886e+00 - 28 -6.2799575211499337e-01 -1.4097313073755626e+00 3.2747938980615898e-02 - 4 -1.6032230038990633e+01 -2.4560529343731371e+01 1.2891625920422312e+01 + 28 -6.2799575211499314e-01 -1.4097313073755624e+00 3.2747938980615898e-02 + 4 -1.6032230038990630e+01 -2.4560529343731371e+01 1.2891625920422312e+01 10 9.9863759179365168e+00 4.1873540105704564e+01 -6.6085640966037303e+01 11 -2.0441876158908627e+01 -6.5186824168985842e+00 9.0023620309811001e+00 - 12 -1.0772126658369586e+01 -1.0807367300158258e+01 -9.6049647456797853e+00 + 12 -1.0772126658369590e+01 -1.0807367300158258e+01 -9.6049647456797800e+00 14 1.5267407478336397e+01 -9.4754911480231616e+00 -6.6307012925544209e+00 3 -5.9057050592858733e+00 5.3263619873546141e+01 5.2353380124691299e+01 - 6 4.7083124388174781e+01 -9.5212933434476064e+00 -3.2526392870546800e+01 + 6 4.7083124388174781e+01 -9.5212933434476028e+00 -3.2526392870546793e+01 7 -1.6208182775476288e+01 1.4458587960739088e+01 -3.5314745459502666e+00 15 1.2402914209534778e+01 -6.2644630791613913e+00 1.8484576795819923e+01 - 8 -6.5664612141880792e+00 -2.5126850154274237e+01 8.2187944731423272e+01 - 9 -1.5504395262358329e+01 1.6121044185227849e+01 -4.2007069622478133e-01 - 16 3.8927757686510223e-01 1.0690061587911153e+01 6.1542759189377412e+00 + 8 -6.5664612141880756e+00 -2.5126850154274251e+01 8.2187944731423272e+01 + 9 -1.5504395262358333e+01 1.6121044185227852e+01 -4.2007069622478133e-01 + 16 3.8927757686510400e-01 1.0690061587911154e+01 6.1542759189377394e+00 17 1.4664194297570774e+00 -1.9971277376602408e+00 1.0776844613215992e+00 5 -4.4802331573497604e+01 -4.8300919461089265e+01 -2.3310767889219282e+01 13 2.8847886813946353e+00 7.2973241014859322e+00 -1.0414233993843336e-01 2 -1.1124882516177403e+00 -9.0075464203887918e+00 -7.2431691227364867e+00 1 4.7865489310693469e+01 7.8760925902181818e+00 -3.2694525514709696e+01 - 27 -2.8720725187343266e-01 2.3577465459556737e+00 -8.0312673032167525e-01 - 29 9.1520300398842602e-01 -9.4801523858011116e-01 7.7037879134105935e-01 - 24 -1.3053945393770574e+00 5.0741459325183227e+00 -3.0209518576072991e+00 - 25 -1.0471133765834275e+00 -3.5082261409793829e+00 5.7374874908501183e-01 - 26 2.3525079159604849e+00 -1.5659197915389398e+00 2.4472031085222872e+00 + 27 -2.8720725187343266e-01 2.3577465459556737e+00 -8.0312673032167514e-01 + 29 9.1520300398842580e-01 -9.4801523858011116e-01 7.7037879134105924e-01 + 24 -1.3053945393770572e+00 5.0741459325183218e+00 -3.0209518576072987e+00 + 25 -1.0471133765834273e+00 -3.5082261409793825e+00 5.7374874908501183e-01 + 26 2.3525079159604845e+00 -1.5659197915389398e+00 2.4472031085222867e+00 run_energy: 29.2286477697792 run_stress: ! |2- - 6.7161703985479718e+01 -7.4680138065367373e+01 7.5184340798876583e+00 5.7521437901240908e+01 -2.7304190748521801e+01 -1.4932945649428698e+01 + 6.7161703985479718e+01 -7.4680138065367373e+01 7.5184340798876477e+00 5.7521437901240908e+01 -2.7304190748521808e+01 -1.4932945649428691e+01 run_forces: ! |2 - 21 6.0524643645662701e-01 7.0314728523699277e-01 -2.2349906198624629e+00 - 22 -1.0299517357238868e+00 -6.7850914711871457e-01 8.1029011311054400e-01 - 23 4.2470529926725975e-01 -2.4638138118278224e-02 1.4247005067519189e+00 - 19 9.8256914435042153e-01 1.2515894863018675e+00 -1.5372413162209080e+00 - 18 -1.1709942604030232e-01 -8.9468235295759801e-01 3.5008479949198072e+00 - 20 -8.6546971831011921e-01 -3.5690713334426949e-01 -1.9636066786988995e+00 - 28 -2.8257906393443954e-02 -6.6089589395111559e-02 5.7412954785172193e-04 - 4 -1.1598618479874556e+01 -1.4069946914275876e+01 1.1631964860700622e+01 - 10 1.1736432849972310e+01 3.5147252452549331e+01 -4.9691358934493351e+01 - 11 -1.9930599656448695e+01 -3.2836744898198669e+00 7.6150969595859648e+00 - 12 -5.8293065548538658e+00 -1.3423749355667571e+01 -5.2738511429384243e+00 + 21 6.0524643645662701e-01 7.0314728523699266e-01 -2.2349906198624625e+00 + 22 -1.0299517357238868e+00 -6.7850914711871446e-01 8.1029011311054377e-01 + 23 4.2470529926725969e-01 -2.4638138118278197e-02 1.4247005067519189e+00 + 19 9.8256914435042142e-01 1.2515894863018673e+00 -1.5372413162209075e+00 + 18 -1.1709942604030243e-01 -8.9468235295759790e-01 3.5008479949198064e+00 + 20 -8.6546971831011899e-01 -3.5690713334426938e-01 -1.9636066786988988e+00 + 28 -2.8257906393443971e-02 -6.6089589395111600e-02 5.7412954785172193e-04 + 4 -1.1598618479874556e+01 -1.4069946914275876e+01 1.1631964860700624e+01 + 10 1.1736432849972303e+01 3.5147252452549331e+01 -4.9691358934493351e+01 + 11 -1.9930599656448692e+01 -3.2836744898198695e+00 7.6150969595859648e+00 + 12 -5.8293065548538676e+00 -1.3423749355667578e+01 -5.2738511429384261e+00 14 1.2984672111772397e+01 -7.2763363322054886e-01 -4.8588140465034968e+00 - 3 -7.1131175159873807e+00 3.1523130842685656e+01 3.9133327910920094e+01 - 6 4.3880849952881213e+01 -6.1732167988806488e+00 -2.6034788339533911e+01 + 3 -7.1131175159873807e+00 3.1523130842685656e+01 3.9133327910920080e+01 + 6 4.3880849952881213e+01 -6.1732167988806470e+00 -2.6034788339533911e+01 7 -1.4366916728367732e+01 1.3135040103127022e+01 -3.0387136809768114e+00 - 15 7.4743142834562484e+00 -3.4640965582760916e+00 9.4855052919847438e+00 - 8 -8.5333281419768188e+00 -2.4737111100998334e+01 6.5176870591189896e+01 - 9 -1.2996571868203622e+01 1.3674206710496632e+01 -6.7871105914534136e-01 - 16 3.6043562512330491e+00 8.0382102532623296e+00 4.0048096667552064e+00 + 15 7.4743142834562475e+00 -3.4640965582760912e+00 9.4855052919847456e+00 + 8 -8.5333281419768152e+00 -2.4737111100998341e+01 6.5176870591189896e+01 + 9 -1.2996571868203626e+01 1.3674206710496637e+01 -6.7871105914534136e-01 + 16 3.6043562512330527e+00 8.0382102532623314e+00 4.0048096667552056e+00 17 5.4695804680835325e-01 -7.5537048761029524e-01 4.0487452808956131e-01 5 -3.5092143924598346e+01 -3.4761325046913385e+01 -2.1062123798094682e+01 - 13 7.7658418286979880e-01 2.0512357329016995e+00 1.8932242747136030e+00 + 13 7.7658418286979880e-01 2.0512357329016990e+00 1.8932242747136030e+00 2 -1.7637583558697996e+00 -1.3758538851839569e+01 -1.1469071109412802e+01 1 3.6220193547187456e+01 1.1585587142479525e+01 -1.7238241972840854e+01 - 27 -1.4554421797121787e-02 1.1056084388026388e-01 -3.5467198058463649e-02 - 29 4.2812328190565740e-02 -4.4471254485152323e-02 3.4893068510611927e-02 - 24 4.1516966455942844e-01 -1.5912776575034655e+00 9.3767616296742529e-01 - 25 3.0070697634260085e-01 1.0957067953103119e+00 -1.8209981159009131e-01 - 26 -7.1587664090202929e-01 4.9557086219315361e-01 -7.5557635137733403e-01 + 27 -1.4554421797121797e-02 1.1056084388026395e-01 -3.5467198058463670e-02 + 29 4.2812328190565768e-02 -4.4471254485152351e-02 3.4893068510611948e-02 + 24 4.1516966455942839e-01 -1.5912776575034653e+00 9.3767616296742518e-01 + 25 3.0070697634260080e-01 1.0957067953103117e+00 -1.8209981159009125e-01 + 26 -7.1587664090202918e-01 4.9557086219315349e-01 -7.5557635137733392e-01 ... diff --git a/unittest/force-styles/tests/mol-pair-coul_dsf.yaml b/unittest/force-styles/tests/mol-pair-coul_dsf.yaml index 98f2a64d3c..496e5997ca 100644 --- a/unittest/force-styles/tests/mol-pair-coul_dsf.yaml +++ b/unittest/force-styles/tests/mol-pair-coul_dsf.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 5 May 2020 -date_generated: Sun May 31 08:50:20 202 +lammps_version: 2 Jun 2020 +date_generated: Sun Jun 14 14:42:09 202 epsilon: 2e-13 prerequisites: ! | atom full @@ -18,69 +18,69 @@ natoms: 29 init_vdwl: 0 init_coul: -116.262344977046 init_stress: ! |- - -2.3416666017056336e+01 -4.4252820375731041e+01 -4.0981374031114207e+01 5.0914225713900922e+00 -6.2469377303827871e+00 1.0436683936455257e+01 + -2.3416666017056318e+01 -4.4252820375731034e+01 -4.0981374031114207e+01 5.0914225713900896e+00 -6.2469377303827818e+00 1.0436683936455253e+01 init_forces: ! |2 21 1.9112474046104266e+00 4.8417407815717759e+00 -9.3759680765329030e+00 - 22 1.7853414317413774e+00 -7.3559799140614279e-01 6.1914854783708497e+00 - 23 -4.1654076054815068e+00 -3.6136236513685889e+00 3.7414660563698723e+00 - 19 1.9223522429094917e+00 -1.0874791933126853e+00 5.9213984285054169e+00 - 18 5.6629443346318509e-01 5.5114669175596189e+00 -8.5038531339265795e+00 + 22 1.7853414317413769e+00 -7.3559799140614290e-01 6.1914854783708497e+00 + 23 -4.1654076054815059e+00 -3.6136236513685889e+00 3.7414660563698723e+00 + 19 1.9223522429094926e+00 -1.0874791933126853e+00 5.9213984285054169e+00 + 18 5.6629443346318564e-01 5.5114669175596189e+00 -8.5038531339265795e+00 20 -2.9948959306877661e+00 -4.2795516789468309e+00 4.4740158818005638e+00 28 4.4993862952213046e+00 -4.6997333684039182e+00 3.7669887588771984e+00 - 4 -2.5219315359688230e-02 3.0309526659841789e-02 -2.9769487487567103e-01 - 10 -2.6059733896388565e-01 4.0374234866477526e-01 -2.6882081998003343e-01 - 11 -9.3452413327208794e-01 1.0981228753242860e+00 -6.2048553626815739e-01 + 4 -2.5219315359688368e-02 3.0309526659841740e-02 -2.9769487487567103e-01 + 10 -2.6059733896388571e-01 4.0374234866477510e-01 -2.6882081998003343e-01 + 11 -9.3452413327208783e-01 1.0981228753242860e+00 -6.2048553626815739e-01 12 3.0289824218892547e+00 -7.0584469663939209e-01 1.5673626972022834e+00 - 14 -1.1259265389059085e+00 4.2835883424523402e-01 -1.2316842057556550e-01 - 3 1.1433567764849370e-03 -8.8562848757978180e-02 3.0402724498996142e-02 - 6 1.7378167148848647e+00 -3.6599230719052009e+00 -3.0956288859449694e+00 - 7 -2.4818898768149031e-01 6.9671485520741849e-01 4.1506463954834212e+00 - 15 3.0417015262684377e-01 -1.4761811395871408e-01 -1.0573173173399657e+00 - 8 -1.6279299647708818e+00 4.2103908568001325e+00 2.7079642831897281e+00 - 9 1.7272326433954603e+00 -5.6447359929320999e+00 1.3872641826024821e+00 - 16 -7.8395233635119432e-01 -3.8508448256930494e-01 2.0787838068368281e+00 - 17 -2.4462783714890128e+00 6.0431681950701073e+00 -7.0212734555132164e+00 - 5 -4.8954255682290054e-01 7.0567047704308328e-01 -1.0180432764958669e-01 - 13 -1.1409180725718307e-01 4.6160568581866790e-02 -2.0281256074310733e-01 - 2 -1.4002700224307024e-01 -3.0237065232357323e+00 -1.4873551844284634e+00 - 1 2.5252338884017758e+00 -3.7481482799833787e-01 5.3263120696933997e-01 - 27 -2.3002613448192655e+00 1.0948950253430690e+01 -4.0945292419163515e+00 + 14 -1.1259265389059085e+00 4.2835883424523424e-01 -1.2316842057556553e-01 + 3 1.1433567764849162e-03 -8.8562848757978152e-02 3.0402724498996149e-02 + 6 1.7378167148848647e+00 -3.6599230719052009e+00 -3.0956288859449699e+00 + 7 -2.4818898768149225e-01 6.9671485520741783e-01 4.1506463954834221e+00 + 15 3.0417015262684405e-01 -1.4761811395871413e-01 -1.0573173173399659e+00 + 8 -1.6279299647708820e+00 4.2103908568001325e+00 2.7079642831897281e+00 + 9 1.7272326433954595e+00 -5.6447359929320982e+00 1.3872641826024810e+00 + 16 -7.8395233635119477e-01 -3.8508448256930500e-01 2.0787838068368281e+00 + 17 -2.4462783714890119e+00 6.0431681950701046e+00 -7.0212734555132146e+00 + 5 -4.8954255682290032e-01 7.0567047704308328e-01 -1.0180432764958669e-01 + 13 -1.1409180725718290e-01 4.6160568581866790e-02 -2.0281256074310722e-01 + 2 -1.4002700224307035e-01 -3.0237065232357319e+00 -1.4873551844284634e+00 + 1 2.5252338884017749e+00 -3.7481482799833821e-01 5.3263120696933852e-01 + 27 -2.3002613448192655e+00 1.0948950253430692e+01 -4.0945292419163515e+00 29 -1.7919023403128935e+00 -6.2865597340851354e+00 3.1996268167139896e-01 24 -1.6528956791857214e+00 1.0024315245684805e+01 -5.3938678250665664e+00 - 25 3.1365575223177720e+00 -3.3071660587656599e+00 3.5918774653753394e+00 - 26 -2.0441172546337874e+00 -6.9491095015579134e+00 1.1823296130074223e+00 + 25 3.1365575223177720e+00 -3.3071660587656599e+00 3.5918774653753403e+00 + 26 -2.0441172546337865e+00 -6.9491095015579116e+00 1.1823296130074226e+00 run_vdwl: 0 run_coul: -117.261868355649 run_stress: ! |- - -2.4835437251658870e+01 -4.4541508533251601e+01 -4.0539173849400385e+01 4.4718873975737266e+00 -7.2757946935143565e+00 9.6680925269162987e+00 + -2.4835437251658863e+01 -4.4541508533251616e+01 -4.0539173849400385e+01 4.4718873975737230e+00 -7.2757946935143565e+00 9.6680925269163058e+00 run_forces: ! |2 21 2.0495708863658444e+00 4.6441219130208005e+00 -9.4697355025312433e+00 - 22 2.1031543652318185e+00 -5.0227443858874687e-01 6.3379751524503112e+00 + 22 2.1031543652318185e+00 -5.0227443858874676e-01 6.3379751524503112e+00 23 -4.6112536769802821e+00 -3.6693539959050474e+00 3.6768985211164438e+00 - 19 2.3419855554035678e+00 -7.3442231652208301e-01 6.0994037191234867e+00 + 19 2.3419855554035678e+00 -7.3442231652208279e-01 6.0994037191234867e+00 18 1.1361459605497989e-01 5.0270725613929717e+00 -8.2174283291267187e+00 20 -2.9518304935422548e+00 -4.1534972920682582e+00 3.9962641207541236e+00 28 4.8077230678349530e+00 -4.7963868170060717e+00 3.8416539656252633e+00 - 4 -1.5581543977693048e-02 2.7348490345169479e-02 -3.0157314588147177e-01 - 10 -2.6316779350407582e-01 3.9689045331236816e-01 -2.7650652507928292e-01 - 11 -9.3411964246483470e-01 1.1019014779925247e+00 -6.0367081113757215e-01 - 12 3.0199259101956861e+00 -6.8575303259281761e-01 1.5805470950435245e+00 - 14 -1.1276376313960277e+00 4.3647116924972529e-01 -1.1549603587311821e-01 - 3 7.8557998538626717e-05 -9.0782772520745736e-02 2.8647471657112934e-02 - 6 1.6933640937840126e+00 -3.6363991593382541e+00 -2.9943331090047010e+00 - 7 -2.0589895105213518e-01 6.8253707845726186e-01 4.0359957762514922e+00 - 15 3.1919490371467274e-01 -1.7075524156810842e-01 -1.0791969234575227e+00 - 8 -1.5353789959160238e+00 4.1710482036532808e+00 2.6915009267303547e+00 - 9 1.7087994127140180e+00 -5.7243484166606589e+00 1.4839205236071202e+00 - 16 -7.9425558761612869e-01 -3.9123467534596640e-01 2.1007542237885417e+00 - 17 -2.4727234591692806e+00 6.1784821009411228e+00 -7.1232388356230096e+00 - 5 -4.7638630379957447e-01 7.0484642826088451e-01 -1.0673629414733558e-01 - 13 -1.2328524349057049e-01 3.6130355311534329e-02 -2.0249625811993407e-01 + 4 -1.5581543977692826e-02 2.7348490345169479e-02 -3.0157314588147172e-01 + 10 -2.6316779350407588e-01 3.9689045331236816e-01 -2.7650652507928281e-01 + 11 -9.3411964246483492e-01 1.1019014779925247e+00 -6.0367081113757226e-01 + 12 3.0199259101956861e+00 -6.8575303259281783e-01 1.5805470950435241e+00 + 14 -1.1276376313960275e+00 4.3647116924972529e-01 -1.1549603587311816e-01 + 3 7.8557998538647533e-05 -9.0782772520745819e-02 2.8647471657112955e-02 + 6 1.6933640937840126e+00 -3.6363991593382532e+00 -2.9943331090047010e+00 + 7 -2.0589895105213518e-01 6.8253707845726119e-01 4.0359957762514922e+00 + 15 3.1919490371467302e-01 -1.7075524156810862e-01 -1.0791969234575223e+00 + 8 -1.5353789959160238e+00 4.1710482036532825e+00 2.6915009267303547e+00 + 9 1.7087994127140180e+00 -5.7243484166606571e+00 1.4839205236071202e+00 + 16 -7.9425558761612802e-01 -3.9123467534596695e-01 2.1007542237885417e+00 + 17 -2.4727234591692810e+00 6.1784821009411228e+00 -7.1232388356230096e+00 + 5 -4.7638630379957447e-01 7.0484642826088451e-01 -1.0673629414733561e-01 + 13 -1.2328524349057027e-01 3.6130355311534329e-02 -2.0249625811993430e-01 2 -2.1644835351460373e-01 -3.0494016245517774e+00 -1.4761763741851357e+00 - 1 2.5264739936457783e+00 -3.5349115107621698e-01 5.2968492668371248e-01 + 1 2.5264739936457774e+00 -3.5349115107621693e-01 5.2968492668371270e-01 27 -2.5160754653215793e+00 1.1212553676515755e+01 -4.0078310113253046e+00 - 29 -1.9020778645871468e+00 -6.4557026362164613e+00 1.5514591220109056e-01 - 24 -1.8961506392790932e+00 1.0361933129644497e+01 -5.6412783530701089e+00 + 29 -1.9020778645871468e+00 -6.4557026362164613e+00 1.5514591220109011e-01 + 24 -1.8961506392790932e+00 1.0361933129644495e+01 -5.6412783530701089e+00 25 3.6317311911578263e+00 -3.2477861735091622e+00 4.0176691355235707e+00 26 -2.2733448884903922e+00 -7.3197472946275193e+00 1.0396360380063099e+00 ... From 2a25fe16e73e67975cf872d5cc205c96db4f2944 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Jun 2020 17:15:45 -0400 Subject: [PATCH 16/27] fix delete[] vs. free() issue with pair styles eam/fs, eam/alloy, eim --- src/MANYBODY/pair_eam.cpp | 4 ++-- src/MANYBODY/pair_eim.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MANYBODY/pair_eam.cpp b/src/MANYBODY/pair_eam.cpp index 984075d407..53f1b7a328 100644 --- a/src/MANYBODY/pair_eam.cpp +++ b/src/MANYBODY/pair_eam.cpp @@ -110,7 +110,7 @@ PairEAM::~PairEAM() if (setfl) { for (int i = 0; i < setfl->nelements; i++) delete [] setfl->elements[i]; delete [] setfl->elements; - delete [] setfl->mass; + memory->destroy(setfl->mass); memory->destroy(setfl->frho); memory->destroy(setfl->rhor); memory->destroy(setfl->z2r); @@ -121,7 +121,7 @@ PairEAM::~PairEAM() if (fs) { for (int i = 0; i < fs->nelements; i++) delete [] fs->elements[i]; delete [] fs->elements; - delete [] fs->mass; + memory->destroy(fs->mass); memory->destroy(fs->frho); memory->destroy(fs->rhor); memory->destroy(fs->z2r); diff --git a/src/MANYBODY/pair_eim.cpp b/src/MANYBODY/pair_eim.cpp index f3f965a231..bdc08662f3 100644 --- a/src/MANYBODY/pair_eim.cpp +++ b/src/MANYBODY/pair_eim.cpp @@ -642,7 +642,7 @@ void PairEIM::file2array() delete [] negativity; delete [] q0; - delete [] cutforcesq; + memory->destroy(cutforcesq); negativity = new double[ntypes+1]; q0 = new double[ntypes+1]; memory->create(cutforcesq,ntypes+1,ntypes+1,"pair:cutforcesq"); From 2f5587da53f186509547ea5b1a49b8435b808b6a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Jun 2020 17:25:20 -0400 Subject: [PATCH 17/27] use std::string.empty() instead of comparing to "" --- src/library.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/library.cpp b/src/library.cpp index 1cacf9e7d8..b6e2bb469b 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -1708,7 +1708,7 @@ int lammps_config_has_exceptions() { int lammps_has_error(void *ptr) { LAMMPS *lmp = (LAMMPS *)ptr; Error *error = lmp->error; - return (error->get_last_error() != "") ? 1 : 0; + return (error->get_last_error().empty()) ? 0 : 1; } /* ---------------------------------------------------------------------- @@ -1722,7 +1722,7 @@ int lammps_get_last_error_message(void *ptr, char * buffer, int buffer_size) { LAMMPS *lmp = (LAMMPS *)ptr; Error *error = lmp->error; - if(error->get_last_error() != "") { + if(!error->get_last_error().empty()) { int error_type = error->get_last_error_type(); strncpy(buffer, error->get_last_error().c_str(), buffer_size-1); error->set_last_error(NULL, ERROR_NONE); From 149571873fbf10e73c2c4337b3a9b1a4e66995a1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Jun 2020 19:35:09 -0400 Subject: [PATCH 18/27] avoid illegal read after delete --- unittest/force-styles/pair_style.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittest/force-styles/pair_style.cpp b/unittest/force-styles/pair_style.cpp index 0ef67de959..6d973f815b 100644 --- a/unittest/force-styles/pair_style.cpp +++ b/unittest/force-styles/pair_style.cpp @@ -596,11 +596,11 @@ TEST(PairStyle, plain) { // need to relax error by a large amount with tabulation, since // coul/long styles do not use tabulation in compute_inner() // and compute_middle() so we get a significant deviation. + pair = lmp->force->pair; if (pair->ncoultablebits) epsilon *= 1.0e6; f = lmp->atom->f; tag=lmp->atom->tag; - pair = lmp->force->pair; stats.reset(); for (int i=0; i < nlocal; ++i) { EXPECT_FP_LE_WITH_EPS(f[i][0], f_run[tag[i]].x, 5*epsilon); From b3a99f31659440b33efcb1cd9ef00e3967fefa29 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Jun 2020 19:50:14 -0400 Subject: [PATCH 19/27] add and document new "download" preset --- cmake/presets/download.cmake | 17 +++++++++++++++++ doc/src/Build_package.rst | 29 +++++++++++++++++------------ 2 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 cmake/presets/download.cmake diff --git a/cmake/presets/download.cmake b/cmake/presets/download.cmake new file mode 100644 index 0000000000..84629ce785 --- /dev/null +++ b/cmake/presets/download.cmake @@ -0,0 +1,17 @@ +# preset that turns on packages with automatic downloads of sources of potentials +# compilation of libraries like Plumed or ScaFaCoS can take a considerable amount of time. + +set(ALL_PACKAGES KIM LATTE MSCG VORONOI USER-PLUMED USER-SCAFACOS USER-SMD USER-MESONT) + +foreach(PKG ${ALL_PACKAGES}) + set(PKG_${PKG} ON CACHE BOOL "" FORCE) +endforeach() + +set(DOWNLOAD_KIM ON CACHE BOOL "" FORCE) +set(DOWNLOAD_LATTE ON CACHE BOOL "" FORCE) +set(DOWNLOAD_MSCG ON CACHE BOOL "" FORCE) +set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE) +set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE) +set(DOWNLOAD_PLUMED ON CACHE BOOL "" FORCE) +set(DOWNLOAD_SCAFACOS ON CACHE BOOL "" FORCE) + diff --git a/doc/src/Build_package.rst b/doc/src/Build_package.rst index f2511bb6a4..ce29d39ba6 100644 --- a/doc/src/Build_package.rst +++ b/doc/src/Build_package.rst @@ -45,7 +45,8 @@ packages: The mechanism for including packages is simple but different for CMake versus make. -**CMake build**\ : +CMake build +^^^^^^^^^^^ .. code-block:: csh @@ -72,7 +73,8 @@ once with CMake. invoke cmake. CMake will give an error if that is not the case, indicating how you can un-install all packages in the src dir. -**Traditional make**\ : +Traditional make +^^^^^^^^^^^^^^^^ .. code-block:: bash @@ -108,7 +110,8 @@ once with make. within the same command. You can include or exclude multiple packages in a single make command, e.g. make yes-colloid no-manybody. -**CMake and make info**\ : +CMake and make info +^^^^^^^^^^^^^^^^^^^ Any package can be included or excluded in a LAMMPS build, independent of all other packages. However, some packages include files derived @@ -132,7 +135,7 @@ src directory. .. _cmake_presets: -**CMake shortcuts for installing many packages**\ : +CMake presets for installing many packages Instead of specifying all the CMake options via the command-line, CMake allows initializing its settings cache using script files. @@ -148,13 +151,14 @@ one of them as a starting point and customize it to your needs. .. code-block:: bash - cmake -C ../cmake/presets/minimal.cmake [OPTIONS] ../cmake # enable just a few core packages - cmake -C ../cmake/presets/most.cmake [OPTIONS] ../cmake # enable most packages - cmake -C ../cmake/presets/nolib.cmake [OPTIONS] ../cmake # disable packages that do require extra libraries or tools - cmake -C ../cmake/presets/clang.cmake [OPTIONS] ../cmake # change settings to use the Clang compilers by default - cmake -C ../cmake/presets/intel.cmake [OPTIONS] ../cmake # change settings to use the Intel compilers by default - cmake -C ../cmake/presets/all_on.cmake [OPTIONS] ../cmake # enable all packages - cmake -C ../cmake/presets/all_off.cmake [OPTIONS] ../cmake # disable all packages + cmake -C ../cmake/presets/minimal.cmake [OPTIONS] ../cmake # enable just a few core packages + cmake -C ../cmake/presets/most.cmake [OPTIONS] ../cmake # enable most packages + 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 + cmake -C ../cmake/presets/clang.cmake [OPTIONS] ../cmake # change settings to use the Clang compilers by default + cmake -C ../cmake/presets/intel.cmake [OPTIONS] ../cmake # change settings to use the Intel compilers by default + cmake -C ../cmake/presets/all_on.cmake [OPTIONS] ../cmake # enable all packages + cmake -C ../cmake/presets/all_off.cmake [OPTIONS] ../cmake # disable all packages mingw64-cmake -C ../cmake/presets/mingw-cross.cmake [OPTIONS] ../cmake # compile with MinGW cross compilers .. note:: @@ -184,7 +188,8 @@ one of them as a starting point and customize it to your needs. ---------- -**Make shortcuts for installing many packages**\ : +Make shortcuts for installing many packages +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The following commands are useful for managing package source files and their installation when building LAMMPS via traditional make. From b067880803058435510a997172c1fe04e8830ef0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Jun 2020 20:11:31 -0400 Subject: [PATCH 20/27] update code owners --- .github/CODEOWNERS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c18ac045c0..d05b5d8b00 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -10,6 +10,7 @@ lib/molfile/* @akohlmey lib/qmmm/* @akohlmey lib/vtk/* @rbberger lib/kim/* @ellio167 +lib/mesont/* @iafoss # whole packages src/COMPRESS/* @akohlmey @@ -25,6 +26,7 @@ src/USER-COLVARS/* @giacomofiorin src/USER-INTEL/* @wmbrownintel src/USER-MANIFOLD/* @Pakketeretet2 src/USER-MEAMC/* @martok +src/USER-MESONT/* @iafoss src/USER-MOFFF/* @hheenen src/USER-MOLFILE/* @akohlmey src/USER-NETCDF/* @pastewka @@ -111,6 +113,7 @@ src/fix_nh.* @athomps src/info.* @akohlmey @rbberger src/timer.* @akohlmey src/min* @sjplimp @stanmoore1 +src/utils.* @akohlmey @rbberger # tools tools/msi2lmp/* @akohlmey @@ -123,6 +126,8 @@ unittest/* @akohlmey @rbberger # cmake cmake/* @junghans @rbberger cmake/Modules/Packages/USER-COLVARS.cmake @junghans @rbberger @giacomofiorin +cmake/Modules/Packages/KIM.cmake @junghans @rbberger @ellio167 +cmake/presets/*.cmake @junghans @rbberger @akohlmey # python python/* @rbberger From 59dcf2d7f9216b0e003e3929f68eeb775a7a59b9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Jun 2020 21:40:29 -0400 Subject: [PATCH 21/27] make sure _need_tag in intel buffers is always initialized for all precision settings --- src/USER-INTEL/fix_intel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/USER-INTEL/fix_intel.cpp b/src/USER-INTEL/fix_intel.cpp index c62a6a432a..e479ecb68d 100644 --- a/src/USER-INTEL/fix_intel.cpp +++ b/src/USER-INTEL/fix_intel.cpp @@ -473,14 +473,14 @@ void FixIntel::pair_init_check(const bool cdmessage) char kmode[80]; if (_precision_mode == PREC_MODE_SINGLE) { strcpy(kmode, "single"); - get_single_buffers()->need_tag(need_tag); } else if (_precision_mode == PREC_MODE_MIXED) { strcpy(kmode, "mixed"); - get_mixed_buffers()->need_tag(need_tag); } else { strcpy(kmode, "double"); - get_double_buffers()->need_tag(need_tag); } + get_double_buffers()->need_tag(need_tag); + get_mixed_buffers()->need_tag(need_tag); + get_single_buffers()->need_tag(need_tag); _pair_intel_count++; From a7e2cc33205e01123d4e1d293ce9e7f9d13c7f5c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Jun 2020 23:14:22 -0400 Subject: [PATCH 22/27] initialize _need_tag differently. --- src/USER-INTEL/fix_intel.cpp | 6 +++--- src/USER-INTEL/intel_buffers.cpp | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/USER-INTEL/fix_intel.cpp b/src/USER-INTEL/fix_intel.cpp index e479ecb68d..c62a6a432a 100644 --- a/src/USER-INTEL/fix_intel.cpp +++ b/src/USER-INTEL/fix_intel.cpp @@ -473,14 +473,14 @@ void FixIntel::pair_init_check(const bool cdmessage) char kmode[80]; if (_precision_mode == PREC_MODE_SINGLE) { strcpy(kmode, "single"); + get_single_buffers()->need_tag(need_tag); } else if (_precision_mode == PREC_MODE_MIXED) { strcpy(kmode, "mixed"); + get_mixed_buffers()->need_tag(need_tag); } else { strcpy(kmode, "double"); + get_double_buffers()->need_tag(need_tag); } - get_double_buffers()->need_tag(need_tag); - get_mixed_buffers()->need_tag(need_tag); - get_single_buffers()->need_tag(need_tag); _pair_intel_count++; diff --git a/src/USER-INTEL/intel_buffers.cpp b/src/USER-INTEL/intel_buffers.cpp index ec3c233542..436b2f1085 100644 --- a/src/USER-INTEL/intel_buffers.cpp +++ b/src/USER-INTEL/intel_buffers.cpp @@ -203,6 +203,8 @@ void IntelBuffers::free_nmax() template void IntelBuffers::_grow_nmax(const int offload_end) { + if (lmp->atom->molecular) _need_tag = 1; + else _need_tag = 0; #ifdef _LMP_INTEL_OFFLOAD free_nmax(); int size = lmp->atom->nmax; From 12b379df36be916ac68f26fb2c0acfdc21a2df15 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 Jun 2020 08:16:47 -0400 Subject: [PATCH 23/27] improve MEAM file detection in pair_coeff command, get rid of ERRFMT() --- src/USER-MEAMC/pair_meamc.cpp | 72 ++++++++++++++++++++++++++--------- src/USER-MEAMC/pair_meamc.h | 3 +- 2 files changed, 56 insertions(+), 19 deletions(-) diff --git a/src/USER-MEAMC/pair_meamc.cpp b/src/USER-MEAMC/pair_meamc.cpp index 6cd8ec6136..b344dee10a 100644 --- a/src/USER-MEAMC/pair_meamc.cpp +++ b/src/USER-MEAMC/pair_meamc.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include "meam.h" #include "atom.h" #include "force.h" @@ -29,11 +30,11 @@ #include "memory.h" #include "error.h" #include "utils.h" +#include "fmt/format.h" using namespace LAMMPS_NS; #define MAXLINE 1024 -#define ERRFMT(errfn,format,...) do { char _strbuf[128]; snprintf(_strbuf,sizeof(_strbuf),format,__VA_ARGS__); errfn(FLERR,_strbuf); } while (0) static const int nkeywords = 22; static const char *keywords[] = { @@ -148,9 +149,8 @@ void PairMEAMC::compute(int eflag, int vflag) meam_inst->meam_dens_final(nlocal,eflag_either,eflag_global,eflag_atom, &eng_vdwl,eatom,ntype,type,map,scale,errorflag); - if (errorflag) { - ERRFMT(error->one,"MEAM library error %d",errorflag); - } + if (errorflag) + error->one(FLERR,fmt::format("MEAM library error {}",errorflag)); comm->forward_comm_pair(this); @@ -216,7 +216,35 @@ void PairMEAMC::coeff(int narg, char **arg) if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0) error->all(FLERR,"Incorrect args for pair coefficients"); - // read MEAM element names between 2 filenames + // check for presence of first meam file + + std::string lib_file = utils::get_potential_file_path(arg[2]); + if (lib_file.empty()) + error->all(FLERR,fmt::format("Cannot open MEAM library file {}",lib_file)); + + // find meam parameter file in arguments: + // first word that is a file or "NULL" after the MEAM library file + // we need to extract at least one element, so start from index 4 + + int paridx=-1; + std::string par_file; + for (int i = 4; i < narg; ++i) { + if (strcmp(arg[i],"NULL") == 0) { + par_file = "NULL"; + paridx = i; + break; + } + par_file = utils::get_potential_file_path(arg[i]); + if (!par_file.empty()) { + paridx=i; + break; + } + } + if (paridx < 0) error->all(FLERR,"No MEAM parameter file in pair coefficients"); + if ((narg - paridx - 1) != atom->ntypes) + error->all(FLERR,"Incorrect args for pair coefficients"); + + // MEAM element names between 2 filenames // nelements = # of MEAM elements // elements = list of unique element names @@ -225,11 +253,13 @@ void PairMEAMC::coeff(int narg, char **arg) delete [] elements; delete [] mass; } - nelements = narg - 4 - atom->ntypes; + + nelements = paridx - 3; if (nelements < 1) error->all(FLERR,"Incorrect args for pair coefficients"); if (nelements > maxelt) - ERRFMT(error->all, "Too many elements extracted from MEAM library (current limit: %d)." - " Increase 'maxelt' in meam.h and recompile.", maxelt); + error->all(FLERR,fmt::format("Too many elements extracted from MEAM " + "library (current limit: {}). Increase " + "'maxelt' in meam.h and recompile.", maxelt)); elements = new char*[nelements]; mass = new double[nelements]; @@ -243,7 +273,7 @@ void PairMEAMC::coeff(int narg, char **arg) // pass all parameters to MEAM package // tell MEAM package that setup is done - read_files(arg[2],arg[2+nelements+1]); + read_files(lib_file,par_file); meam_inst->meam_setup_done(&cutmax); // read args that map atom types to MEAM elements @@ -327,15 +357,17 @@ double PairMEAMC::init_one(int i, int j) /* ---------------------------------------------------------------------- */ -void PairMEAMC::read_files(char *globalfile, char *userfile) +void PairMEAMC::read_files(const std::string &globalfile, + const std::string &userfile) { // open global meamf file on proc 0 FILE *fp; if (comm->me == 0) { - fp = force->open_potential(globalfile); + fp = force->open_potential(globalfile.c_str()); if (fp == NULL) - ERRFMT(error->one, "Cannot open MEAM potential file %s", globalfile); + error->one(FLERR,fmt::format("Cannot open MEAM potential file {}", + globalfile)); } // allocate parameter arrays @@ -425,7 +457,8 @@ void PairMEAMC::read_files(char *globalfile, char *userfile) // map lat string to an integer if (!MEAM::str_to_lat(words[1], true, lat[index])) - ERRFMT(error->one, "Unrecognized lattice type in MEAM library file: %s", words[1]); + error->one(FLERR,fmt::format("Unrecognized lattice type in MEAM " + "library file: {}", words[1])); // store parameters @@ -525,14 +558,15 @@ void PairMEAMC::read_files(char *globalfile, char *userfile) // done if user param file is NULL - if (strcmp(userfile,"NULL") == 0) return; + if (userfile == "NULL") return; // open user param file on proc 0 if (comm->me == 0) { - fp = force->open_potential(userfile); + fp = force->open_potential(userfile.c_str()); if (fp == NULL) - ERRFMT(error->one, "Cannot open MEAM potential file %s", userfile); + error->one(FLERR,fmt::format("Cannot open MEAM potential file {}", + userfile)); } // read settings @@ -576,7 +610,8 @@ void PairMEAMC::read_files(char *globalfile, char *userfile) for (which = 0; which < nkeywords; which++) if (strcmp(params[0],keywords[which]) == 0) break; if (which == nkeywords) - ERRFMT(error->all, "Keyword %s in MEAM parameter file not recognized", params[0]); + error->all(FLERR,fmt::format("Keyword {} in MEAM parameter file not " + "recognized", params[0])); nindex = nparams - 2; for (int i = 0; i < nindex; i++) index[i] = atoi(params[i+1]) - 1; @@ -586,7 +621,8 @@ void PairMEAMC::read_files(char *globalfile, char *userfile) if (which == 4) { lattice_t latt; if (!MEAM::str_to_lat(params[nparams-1], false, latt)) - ERRFMT(error->all, "Unrecognized lattice type in MEAM parameter file: %s", params[nparams-1]); + error->all(FLERR, fmt::format("Unrecognized lattice type in MEAM " + "parameter file: {}", params[nparams-1])); value = latt; } else value = atof(params[nparams-1]); diff --git a/src/USER-MEAMC/pair_meamc.h b/src/USER-MEAMC/pair_meamc.h index 315fd2230b..21e44e7ff2 100644 --- a/src/USER-MEAMC/pair_meamc.h +++ b/src/USER-MEAMC/pair_meamc.h @@ -22,6 +22,7 @@ PairStyle(meam,PairMEAMC) #define LMP_PAIR_MEAMC_H #include "pair.h" +#include namespace LAMMPS_NS { @@ -54,7 +55,7 @@ class PairMEAMC : public Pair { double **scale; // scaling factor for adapt void allocate(); - void read_files(char *, char *); + void read_files(const std::string &, const std::string &); void neigh_strip(int, int *, int *, int **); }; From b5ee87697a7078d78c0eb07da66b7d71bf2074a9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 Jun 2020 10:59:32 -0400 Subject: [PATCH 24/27] workaround for GNU Fortran 10 and later when compiling downloaded ScaFaCoS lib --- cmake/Modules/Packages/USER-SCAFACOS.cmake | 29 +++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/cmake/Modules/Packages/USER-SCAFACOS.cmake b/cmake/Modules/Packages/USER-SCAFACOS.cmake index d92a83f7c1..a6851210b2 100644 --- a/cmake/Modules/Packages/USER-SCAFACOS.cmake +++ b/cmake/Modules/Packages/USER-SCAFACOS.cmake @@ -14,6 +14,29 @@ endif() option(DOWNLOAD_SCAFACOS "Download ScaFaCoS library instead of using an already installed one" ${DOWNLOAD_SCAFACOS_DEFAULT}) if(DOWNLOAD_SCAFACOS) message(STATUS "ScaFaCoS download requested - we will build our own") + # create variables to pass our compiler flags along to the subsystem compile + # need to apply -fallow-argument-mismatch, if the fortran compiler supports it + include(CheckFortranCompilerFlag) + check_fortran_compiler_flag("-fallow-argument-mismatch" GNUFortran_ARGUMENT_MISMATCH_FLAG) + if(GNUFortran_ARGUMENT_MISMATCH_FLAG) + set(APPEND_Fortran_FLAG "-fallow-argument-mismatch") + endif() + if(CMAKE_Fortran_FLAGS) + set(SCAFACOS_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${APPEND_Fortran_FLAG}") + else() + set(SCAFACOS_Fortran_FLAGS "${CMAKE_Fortran_${CMAKE_BUILD_TYPE}_FLAGS} ${APPEND_Fortran_FLAG}") + endif() + if(CMAKE_CXX_FLAGS) + set(SCAFACOS_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + else() + set(SCAFACOS_CXX_FLAGS "${CMAKE_CXX_${CMAKE_BUILD_TYPE}_FLAGS}") + endif() + if(CMAKE_C_FLAGS) + set(SCAFACOS_C_FLAGS "${CMAKE_C_FLAGS}") + else() + set(SCAFACOS_C_FLAGS "${CMAKE_C_${CMAKE_BUILD_TYPE}_FLAGS}") + endif() + include(ExternalProject) ExternalProject_Add(scafacos_build URL https://github.com/scafacos/scafacos/releases/download/v1.0.1/scafacos-1.0.1.tar.gz @@ -22,9 +45,9 @@ if(DOWNLOAD_SCAFACOS) --enable-fcs-solvers=fmm,p2nfft,direct,ewald,p3m --with-internal-fftw --with-internal-pfft --with-internal-pnfft ${CONFIGURE_REQUEST_PIC} - FC=${CMAKE_MPI_Fortran_COMPILER} - CXX=${CMAKE_MPI_CXX_COMPILER} - CC=${CMAKE_MPI_C_COMPILER} + FC=${CMAKE_MPI_Fortran_COMPILER} FCFLAGS=${SCAFACOS_Fortran_FLAGS} + CXX=${CMAKE_MPI_CXX_COMPILER} CXXFLAGS=${SCAFACOS_CXX_FLAGS} + CC=${CMAKE_MPI_C_COMPILER} CFLAGS=${SCAFACOS_C_FLAGS} F77= BUILD_BYPRODUCTS /lib/libfcs.a From 71c075e0e493b913a23ae69d8599bd98d1dccf90 Mon Sep 17 00:00:00 2001 From: cjknight Date: Mon, 15 Jun 2020 10:55:18 -0500 Subject: [PATCH 25/27] Update atom_vec_sph.cpp Looks like one 'de' wasn't renamed to 'desph' in recent commit. --- src/USER-SPH/atom_vec_sph.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-SPH/atom_vec_sph.cpp b/src/USER-SPH/atom_vec_sph.cpp index 84a60e44f7..2811c57e6c 100644 --- a/src/USER-SPH/atom_vec_sph.cpp +++ b/src/USER-SPH/atom_vec_sph.cpp @@ -45,7 +45,7 @@ AtomVecSPH::AtomVecSPH(LAMMPS *lmp) : AtomVec(lmp) fields_border_vel = (char *) "rho esph cv vest"; fields_exchange = (char *) "rho esph cv vest"; fields_restart = (char * ) "rho esph cv vest"; - fields_create = (char *) "rho esph cv vest de drho"; + fields_create = (char *) "rho esph cv vest desph drho"; fields_data_atom = (char *) "id type rho esph cv x"; fields_data_vel = (char *) "id v"; From 0199e369fa118ffe31a94b67c619bd6ac3af8d0c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 Jun 2020 13:46:54 -0400 Subject: [PATCH 26/27] work around race condition and minimizing download attemps for transparently downloaded potential files --- cmake/Modules/LAMMPSUtils.cmake | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/cmake/Modules/LAMMPSUtils.cmake b/cmake/Modules/LAMMPSUtils.cmake index c6b4933038..a87c0f567c 100644 --- a/cmake/Modules/LAMMPSUtils.cmake +++ b/cmake/Modules/LAMMPSUtils.cmake @@ -96,9 +96,15 @@ function(FetchPotentials pkgfolder potfolder) math(EXPR plusone "${blank}+1") string(SUBSTRING ${line} 0 ${blank} pot) string(SUBSTRING ${line} ${plusone} -1 sum) - message(STATUS "Checking external potential ${pot} from ${LAMMPS_POTENTIALS_URL}") - file(DOWNLOAD "${LAMMPS_POTENTIALS_URL}/${pot}.${sum}" "${LAMMPS_POTENTIALS_DIR}/${pot}" - EXPECTED_HASH MD5=${sum} SHOW_PROGRESS) + if(EXISTS ${LAMMPS_POTENTIALS_DIR}/${pot}) + file(MD5 "${LAMMPS_POTENTIALS_DIR}/${pot}" oldsum) + endif() + if(NOT sum STREQUAL oldsum) + message(STATUS "Checking external potential ${pot} from ${LAMMPS_POTENTIALS_URL}") + file(DOWNLOAD "${LAMMPS_POTENTIALS_URL}/${pot}.${sum}" "${CMAKE_BINARY_DIR}/${pot}" + EXPECTED_HASH MD5=${sum} SHOW_PROGRESS) + file(COPY "${CMAKE_BINARY_DIR}/${pot}" DESTINATION ${LAMMPS_POTENTIALS_DIR}) + endif() endforeach() endif() endfunction(FetchPotentials) From 0ca7270668d1d161fa211a53e21c7f79a9b20e6a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 Jun 2020 13:47:16 -0400 Subject: [PATCH 27/27] re-enable USER-MESONT package for MinGW cross compilation --- cmake/presets/mingw-cross.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/presets/mingw-cross.cmake b/cmake/presets/mingw-cross.cmake index 61c4bbc45b..588ad04138 100644 --- a/cmake/presets/mingw-cross.cmake +++ b/cmake/presets/mingw-cross.cmake @@ -4,7 +4,7 @@ set(WIN_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-INTEL USER-MANIFOLD USER-MEAMC USER-MESODPD - USER-MISC USER-MGPT USER-MOFFF USER-MOLFILE USER-OMP + USER-MESONT USER-MISC USER-MGPT USER-MOFFF USER-MOLFILE USER-OMP USER-PHONON USER-PTM USER-QTB USER-REACTION USER-REAXC USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-YAFF)