diff --git a/SECURITY.md b/SECURITY.md index f06b781d11..7b0ed1f560 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -14,14 +14,14 @@ and tested by the LAMMPS developers, so it is easy to import bad behavior from calling functions in one of those libraries. Thus is is quite easy to crash LAMMPS through malicious input and do all -kinds of filesystem manipulations. And because of that LAMMPS should +kinds of file system manipulations. And because of that LAMMPS should **NEVER** be compiled or **run** as superuser, either from a "root" or "administrator" account directly or indirectly via "sudo" or "su". Therefore what could be seen as a security vulnerability is usually -either a user mistake or a bug in the code. Bugs can be reported in -the LAMMPS project -[issue tracker on GitHub](https://github.com/lammps/lammps/issues). +either a user mistake or a bug in the code. Bugs can be reported in the +LAMMPS project [issue tracker on +GitHub](https://github.com/lammps/lammps/issues). To mitigate issues with using homoglyphs or bidirectional reordering in unicode, which have been demonstrated as a vector to obfuscate and hide @@ -30,10 +30,18 @@ for unicode characters and only all-ASCII source code is accepted. # Version Updates -LAMMPS follows continuous release development model. We aim to keep all -release versions (stable or patch) fully functional and employ a variety -of automatic testing procedures to detect failures of existing -functionality from adding new features before releases are made. Thus -bugfixes and updates are only integrated into the current development -branch and thus the next (patch) release and users are recommended to -update regularly. +LAMMPS follows continuous release development model. We aim to keep to +keep the development version (develop branch) always fully functional +and employ a variety of automatic testing procedures to detect failures +of existing functionality from adding or modifying features. Most of +those tests are run on pull requests *before* merging to the development +branch. The develop branch is protected, so all changes *must* be +submitted as a pull request and thus cannot avoid the automated tests. + +Additional tests are run *after* merging. Before releases are made +*all* tests must have cleared. Then a release tag is applied and the +release branch fast-forwarded to that tag. Bug fixes and updates are +applied to the current development branch and thus will be available in +the next (patch) release. For stable releases, selected bug fixes are +back-ported and occasionally published as update releases. There are +only updates to the latest stable release. diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index aaa0885072..28c3d6c027 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -376,6 +376,7 @@ pkg_depends(DIELECTRIC EXTRA-PAIR) pkg_depends(CG-DNA MOLECULE) pkg_depends(CG-DNA ASPHERE) pkg_depends(ELECTRODE KSPACE) +pkg_depends(EXTRA-MOLECULE MOLECULE) # detect if we may enable OpenMP support by default set(BUILD_OMP_DEFAULT OFF) diff --git a/cmake/Modules/Packages/MDI.cmake b/cmake/Modules/Packages/MDI.cmake index d873c8f6d1..edae4ffcbd 100644 --- a/cmake/Modules/Packages/MDI.cmake +++ b/cmake/Modules/Packages/MDI.cmake @@ -8,8 +8,8 @@ option(DOWNLOAD_MDI "Download and compile the MDI library instead of using an al if(DOWNLOAD_MDI) message(STATUS "MDI download requested - we will build our own") - set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.4.1.tar.gz" CACHE STRING "URL for MDI tarball") - set(MDI_MD5 "f9505fccd4c79301a619f6452dad4ad9" CACHE STRING "MD5 checksum for MDI tarball") + set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.4.12.tar.gz" CACHE STRING "URL for MDI tarball") + set(MDI_MD5 "7a222353ae8e03961d5365e6cd48baee" CACHE STRING "MD5 checksum for MDI tarball") mark_as_advanced(MDI_URL) mark_as_advanced(MDI_MD5) enable_language(C) diff --git a/cmake/Modules/Packages/ML-IAP.cmake b/cmake/Modules/Packages/ML-IAP.cmake index 63f91ba8d3..0e711cde8f 100644 --- a/cmake/Modules/Packages/ML-IAP.cmake +++ b/cmake/Modules/Packages/ML-IAP.cmake @@ -25,16 +25,18 @@ if(MLIAP_ENABLE_PYTHON) endif() set(MLIAP_BINARY_DIR ${CMAKE_BINARY_DIR}/cython) - set(MLIAP_CYTHON_SRC ${LAMMPS_SOURCE_DIR}/ML-IAP/mliap_model_python_couple.pyx) - get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_SRC} NAME_WE) + file(GLOB MLIAP_CYTHON_SRC ${LAMMPS_SOURCE_DIR}/ML-IAP/*.pyx) file(MAKE_DIRECTORY ${MLIAP_BINARY_DIR}) - add_custom_command(OUTPUT ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.cpp ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.h - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${MLIAP_CYTHON_SRC} ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.pyx - COMMAND ${Cythonize_EXECUTABLE} -3 ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.pyx - WORKING_DIRECTORY ${MLIAP_BINARY_DIR} - MAIN_DEPENDENCY ${MLIAP_CYTHON_SRC} - COMMENT "Generating C++ sources with cythonize...") + foreach(MLIAP_CYTHON_FILE ${MLIAP_CYTHON_SRC}) + get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_FILE} NAME_WE) + add_custom_command(OUTPUT ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.cpp ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.h + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${MLIAP_CYTHON_FILE} ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.pyx + COMMAND ${Cythonize_EXECUTABLE} -3 ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.pyx + WORKING_DIRECTORY ${MLIAP_BINARY_DIR} + MAIN_DEPENDENCY ${MLIAP_CYTHON_FILE} + COMMENT "Generating C++ sources with cythonize...") + target_sources(lammps PRIVATE ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.cpp) + endforeach() target_compile_definitions(lammps PRIVATE -DMLIAP_PYTHON) - target_sources(lammps PRIVATE ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.cpp) target_include_directories(lammps PRIVATE ${MLIAP_BINARY_DIR}) endif() diff --git a/cmake/presets/clang.cmake b/cmake/presets/clang.cmake index a0d654ad35..f1964f3e0f 100644 --- a/cmake/presets/clang.cmake +++ b/cmake/presets/clang.cmake @@ -3,6 +3,13 @@ # prefer flang over gfortran, if available find_program(CLANG_FORTRAN NAMES flang gfortran f95) set(ENV{OMPI_FC} ${CLANG_FORTRAN}) +get_filename_component(_tmp_fc ${CLANG_FORTRAN} NAME) +if (_tmp_fc STREQUAL "flang") + set(FC_STD_VERSION "-std=f2018") + set(BUILD_MPI OFF) +else() + set(FC_STD_VERSION "-std=f2003") +endif() set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "" FORCE) set(CMAKE_C_COMPILER "clang" CACHE STRING "" FORCE) @@ -10,9 +17,9 @@ set(CMAKE_Fortran_COMPILER ${CLANG_FORTRAN} CACHE STRING "" FORCE) set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Wextra -g" CACHE STRING "" FORCE) set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE) set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE) -set(CMAKE_Fortran_FLAGS_DEBUG "-Wall -Wextra -g -std=f2003" CACHE STRING "" FORCE) -set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG -std=f2003" CACHE STRING "" FORCE) -set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -DNDEBUG -std=f2003" CACHE STRING "" FORCE) +set(CMAKE_Fortran_FLAGS_DEBUG "-Wall -Wextra -g ${FC_STD_VERSION}" CACHE STRING "" FORCE) +set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG ${FC_STD_VERSION}" CACHE STRING "" FORCE) +set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -DNDEBUG ${FC_STD_VERSION}" CACHE STRING "" FORCE) set(CMAKE_C_FLAGS_DEBUG "-Wall -Wextra -g" CACHE STRING "" FORCE) set(CMAKE_C_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE) set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE) diff --git a/doc/lammps.1 b/doc/lammps.1 index f1a3d0f2f9..e4f0f2a9eb 100644 --- a/doc/lammps.1 +++ b/doc/lammps.1 @@ -1,7 +1,7 @@ -.TH LAMMPS "1" "3 August 2022" "2022-8-3" +.TH LAMMPS "1" "15 September 2022" "2022-9-15" .SH NAME .B LAMMPS -\- Molecular Dynamics Simulator. Version 3 August 2022 +\- Molecular Dynamics Simulator. Version 15 September 2022 .SH SYNOPSIS .B lmp diff --git a/doc/src/Bibliography.rst b/doc/src/Bibliography.rst index 9f3591dcde..2d27d2e6f9 100644 --- a/doc/src/Bibliography.rst +++ b/doc/src/Bibliography.rst @@ -314,7 +314,7 @@ Bibliography Espanol, Revenga, Physical Review E, 67, 026705 (2003). **(Espanol1997)** - Espanol, Europhys Lett, 40(6): 631-636 (1997). DOI: 10.1209/epl/i1997-00515-8 + Espanol, Europhys Lett, 40(6): 631-636 (1997). DOI:10.1209/epl/i1997-00515-8 **(Evans and Morriss)** Evans and Morriss, Phys Rev A, 30, 1528 (1984). @@ -368,7 +368,7 @@ Bibliography Frenkel and Smit, Understanding Molecular Simulation, Academic Press, London, 2002. **(GLE4MD)** - `http://gle4md.org/ `_ + `https://gle4md.org/ `_ **(Gao)** Gao and Weber, Nuclear Instruments and Methods in Physics Research B 191 (2012) 504. @@ -401,13 +401,13 @@ Bibliography Hayre, and Farago, Comp Phys Comm, 185, 524 (2014) **(Groot)** - Groot and Warren, J Chem Phys, 107: 4423-4435 (1997). DOI: 10.1063/1.474784 + Groot and Warren, J Chem Phys, 107: 4423-4435 (1997). DOI:10.1063/1.474784 **(Guenole)** Guenole, Noehring, Vaid, Houlle, Xie, Prakash, Bitzek, Comput Mater Sci, 175, 109584 (2020). **(Gullet)** - Gullet, Wagner, Slepoy, SANDIA Report 2003-8782 (2003). + Gullet, Wagner, Slepoy, SANDIA Report 2003-8782 (2003). DOI:10.2172/918395 **(Guo)** Guo and Thirumalai, Journal of Molecular Biology, 263, 323-43 (1996). @@ -461,7 +461,7 @@ Bibliography Hunt, Mol Simul, 42, 347 (2016). **(IPI)** - `http://epfl-cosmo.github.io/gle4md/index.html?page=ipi `_ + `https://ipi-code.org/ ` **(IPI-CPC)** Ceriotti, More and Manolopoulos, Comp Phys Comm, 185, 1019-1026 (2014). @@ -605,16 +605,16 @@ Bibliography I.\ Leven et al, J. Chem.Theory Comput. 12, 2896-905 (2016). **(Li2013_POF)** - Li, Hu, Wang, Ma, Zhou, Phys Fluids, 25: 072103 (2013). DOI: 10.1063/1.4812366. + Li, Hu, Wang, Ma, Zhou, Phys Fluids, 25: 072103 (2013). DOI:10.1063/1.4812366. **(Li2014_JCP)** - Li, Tang, Lei, Caswell, Karniadakis, J Comput Phys, 265: 113-127 (2014). DOI: 10.1016/j.jcp.2014.02.003. + Li, Tang, Lei, Caswell, Karniadakis, J Comput Phys, 265: 113-127 (2014). DOI:10.1016/j.jcp.2014.02.003. **(Li2015_CC)** - Li, Tang, Li, Karniadakis, Chem Commun, 51: 11038-11040 (2015). DOI: 10.1039/C5CC01684C. + Li, Tang, Li, Karniadakis, Chem Commun, 51: 11038-11040 (2015). DOI:10.1039/C5CC01684C. **(Li2015_JCP)** - Li, Yazdani, Tartakovsky, Karniadakis, J Chem Phys, 143: 014101 (2015). DOI: 10.1063/1.4923254. + Li, Yazdani, Tartakovsky, Karniadakis, J Chem Phys, 143: 014101 (2015). DOI:10.1063/1.4923254. **(Lisal)** M.\ Lisal, J.K. Brennan, J. Bonet Avalos, "Dissipative particle dynamics at isothermal, isobaric, isoenergetic, and isoenthalpic conditions using Shardlow-like splitting algorithms.", @@ -733,8 +733,8 @@ Bibliography **(Mishin)** Mishin, Mehl, and Papaconstantopoulos, Acta Mater, 53, 4029 (2005). -**(Mitchell and Finchham)** - Mitchell, Finchham, J Phys Condensed Matter, 5, 1031-1038 (1993). +**(Mitchell and Fincham)** + Mitchell, Fincham, J Phys Condensed Matter, 5, 1031-1038 (1993). **(Mitchell2011)** Mitchell. A non-local, ordinary-state-based viscoelasticity model for peridynamics. Sandia National Lab Report, 8064:1-28 (2011). @@ -875,7 +875,7 @@ Bibliography G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014) **(Paquay)** - Paquay and Kusters, Biophys. J., 110, 6, (2016). preprint available at `arXiv:1411.3019 `_. + Paquay and Kusters, Biophys. J., 110, 6, (2016). preprint available at `arXiv:1411.3019 `_. **(Park)** Park, Schulten, J. Chem. Phys. 120 (13), 5946 (2004) @@ -1373,7 +1373,7 @@ Bibliography Zhu, Tajkhorshid, and Schulten, Biophys. J. 83, 154 (2002). **(Ziegler)** - J.F. Ziegler, J. P. Biersack and U. Littmark, "The Stopping and Range of Ions in Matter," Volume 1, Pergamon, 1985. + J.F. Ziegler, J. P. Biersack and U. Littmark, "The Stopping and Range of Ions in Matter", Volume 1, Pergamon, 1985. **(Zimmerman2004)** Zimmerman, JA; Webb, EB; Hoyt, JJ;. Jones, RE; Klein, PA; Bammann, DJ, "Calculation of stress in atomistic simulation." Special Issue of Modelling and Simulation in Materials Science and Engineering (2004),12:S319. diff --git a/doc/src/Build_development.rst b/doc/src/Build_development.rst index 66e12a0d69..1644c7ea86 100644 --- a/doc/src/Build_development.rst +++ b/doc/src/Build_development.rst @@ -140,7 +140,7 @@ of the LAMMPS project on GitHub. The unit testing facility is integrated into the CMake build process of the LAMMPS source code distribution itself. It can be enabled by setting ``-D ENABLE_TESTING=on`` during the CMake configuration step. -It requires the `YAML `_ library and development +It requires the `YAML `_ library and development headers (if those are not found locally a recent version will be downloaded and compiled along with LAMMPS and the test program) to compile and will download and compile a specific recent version of the diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index 0f5f5f8064..2535b9010f 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -314,7 +314,7 @@ detailed information is available at: In addition to installing the KIM API, it is also necessary to install the library of KIM models (interatomic potentials). -See `Obtaining KIM Models `_ to +See `Obtaining KIM Models `_ to learn how to install a pre-build binary of the OpenKIM Repository of Models. See the list of all KIM models here: https://openkim.org/browse/models @@ -432,7 +432,7 @@ Enabling the extra unit tests have some requirements, ``EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000``, ``EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005``, and ``LennardJones612_UniversalShifted__MO_959249795837_003`` KIM models. - See `Obtaining KIM Models `_ + See `Obtaining KIM Models `_ to learn how to install a pre-built binary of the OpenKIM Repository of Models or see `Installing KIM Models `_ @@ -1053,7 +1053,7 @@ VORONOI package ----------------------------- To build with this package, you must download and build the -`Voro++ library `_ or install a +`Voro++ library `_ or install a binary package provided by your operating system. .. tabs:: diff --git a/doc/src/Build_manual.rst b/doc/src/Build_manual.rst index d91ac94be5..1ef0a80549 100644 --- a/doc/src/Build_manual.rst +++ b/doc/src/Build_manual.rst @@ -176,7 +176,7 @@ 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/ `_ +installed. `https://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. diff --git a/doc/src/Build_settings.rst b/doc/src/Build_settings.rst index 7e627a052f..2d83908bb1 100644 --- a/doc/src/Build_settings.rst +++ b/doc/src/Build_settings.rst @@ -111,26 +111,25 @@ LAMMPS can use them if they are available on your system. files in its default search path. You must specify ``FFT_LIB`` with the appropriate FFT libraries to include in the link. -The `KISS FFT library `_ is included in the LAMMPS -distribution. It is portable across all platforms. Depending on the size -of the FFTs and the number of processors used, the other libraries listed -here can be faster. +The `KISS FFT library `_ is +included in the LAMMPS distribution. It is portable across all +platforms. Depending on the size of the FFTs and the number of +processors used, the other libraries listed here can be faster. However, note that long-range Coulombics are only a portion of the -per-timestep CPU cost, FFTs are only a portion of long-range -Coulombics, and 1d FFTs are only a portion of the FFT cost (parallel -communication can be costly). A breakdown of these timings is printed -to the screen at the end of a run when using the -:doc:`kspace_style pppm ` command. The -:doc:`Screen and logfile output ` -page gives more details. A more detailed (and time consuming) -report of the FFT performance is generated with the +per-timestep CPU cost, FFTs are only a portion of long-range Coulombics, +and 1d FFTs are only a portion of the FFT cost (parallel communication +can be costly). A breakdown of these timings is printed to the screen +at the end of a run when using the :doc:`kspace_style pppm +` command. The :doc:`Screen and logfile output +` page gives more details. A more detailed (and time +consuming) report of the FFT performance is generated with the :doc:`kspace_modify fftbench yes ` command. FFTW is a fast, portable FFT library that should also work on any -platform and can be faster than the KISS FFT library. You can -download it from `www.fftw.org `_. LAMMPS requires -version 3.X; the legacy version 2.1.X is no longer supported. +platform and can be faster than the KISS FFT library. You can 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 diff --git a/doc/src/Commands_all.rst b/doc/src/Commands_all.rst index 5e309c3ed0..d7b1609619 100644 --- a/doc/src/Commands_all.rst +++ b/doc/src/Commands_all.rst @@ -15,7 +15,9 @@ General commands ================ -An alphabetic list of general LAMMPS commands. +An alphabetic list of general LAMMPS commands. Note that style +commands with many variants, can be more easily accessed via the small +table above. .. table_from_list:: :columns: 5 @@ -61,6 +63,7 @@ An alphabetic list of general LAMMPS commands. * :doc:`kspace_modify ` * :doc:`kspace_style ` * :doc:`label