Merge branch 'master' into atc-doc-to-rst

# Conflicts:
#	doc/src/Errors_messages.rst
This commit is contained in:
Axel Kohlmeyer 2020-03-19 11:28:02 -04:00
commit 84f89134d9
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
494 changed files with 87864 additions and 1058 deletions

View File

@ -51,42 +51,35 @@ check_for_autogen_files(${LAMMPS_SOURCE_DIR})
include(CheckCCompilerFlag)
include(CheckIncludeFileCXX)
# set required compiler flags and compiler/CPU arch specific optimizations
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict")
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4)
set(CMAKE_TUNE_DEFAULT "-xCOMMON-AVX512")
else()
set(CMAKE_TUNE_DEFAULT "-xHost")
endif()
endif()
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
if(NOT ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug"))
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math -ftree-vectorize -fexpensive-optimizations")
endif()
set(CMAKE_TUNE_DEFAULT "-ffast-math -march=native")
endif()
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
set(CMAKE_TUNE_DEFAULT "-ffast-math -march=native")
endif()
# we require C++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# GNU compiler features
# GNU compiler specific features for testing
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
option(ENABLE_COVERAGE "Enable code coverage" OFF)
option(ENABLE_COVERAGE "Enable collecting code coverage data" OFF)
mark_as_advanced(ENABLE_COVERAGE)
if(ENABLE_COVERAGE)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
endif()
option(ENABLE_SANITIZE_ADDRESS "Enable address sanitizer" OFF)
mark_as_advanced(ENABLE_SANITIZE_ADDRESS)
if(ENABLE_SANITIZE_ADDRESS)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
endif()
option(ENABLE_SANITIZE_UNDEFINED "Enable undefined behavior sanitizer" OFF)
mark_as_advanced(ENABLE_SANITIZE_UNDEFINED)
if(ENABLE_SANITIZE_UNDEFINED)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
endif()
option(ENABLE_SANITIZE_THREAD "Enable thread sanitizer" OFF)
mark_as_advanced(ENABLE_SANITIZE_THREAD)
if(ENABLE_SANITIZE_THREAD)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread")
endif()
endif()
########################################################################
@ -255,8 +248,9 @@ if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE)
find_package(LAPACK)
find_package(BLAS)
if(NOT LAPACK_FOUND OR NOT BLAS_FOUND)
if(CMAKE_GENERATOR STREQUAL "Ninja")
status(FATAL_ERROR "Cannot build internal linear algebra library with Ninja build tool due to lack for Fortran support")
include(CheckGeneratorSupport)
if(NOT CMAKE_GENERATOR_SUPPORT_FORTRAN)
status(FATAL_ERROR "Cannot build internal linear algebra library as CMake build tool lacks Fortran support")
endif()
enable_language(Fortran)
file(GLOB LAPACK_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/linalg/[^.]*.[fF])
@ -346,6 +340,11 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
list(APPEND LAMMPS_LINK_LIBS -lwsock32 -lpsapi)
endif()
set(CMAKE_TUNE_FLAGS "${CMAKE_TUNE_DEFAULT}" CACHE STRING "Compiler specific optimization or instrumentation")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_TUNE_FLAGS}")
if(CMAKE_Fortran_FLAGS)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${CMAKE_TUNE_FLAGS}")
endif()
########################################################################
# Basic system tests (standard libraries, headers, functions, types) #
########################################################################
@ -587,14 +586,14 @@ if(BUILD_TOOLS)
add_executable(binary2txt ${LAMMPS_TOOLS_DIR}/binary2txt.cpp)
install(TARGETS binary2txt DESTINATION ${CMAKE_INSTALL_BINDIR})
# ninja-build currently does not support fortran. thus we skip building this tool
if(CMAKE_GENERATOR STREQUAL "Ninja")
message(STATUS "Skipping building 'chain.x' with Ninja build tool due to lack of Fortran support")
else()
include(CheckGeneratorSupport)
if(CMAKE_GENERATOR_SUPPORT_FORTRAN)
enable_language(Fortran)
add_executable(chain.x ${LAMMPS_TOOLS_DIR}/chain.f)
target_link_libraries(chain.x ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
install(TARGETS chain.x DESTINATION ${CMAKE_INSTALL_BINDIR})
else()
message(WARNING "CMake build doesn't support fortran, skipping building 'chain.x'")
endif()
enable_language(C)
@ -686,6 +685,7 @@ feature_summary(DESCRIPTION "The following tools and libraries have been found a
message(STATUS "<<< Build configuration >>>
Build type ${CMAKE_BUILD_TYPE}
Install path ${CMAKE_INSTALL_PREFIX}
Generator ${CMAKE_GENERATOR} using ${CMAKE_MAKE_PROGRAM}
Compilers and Flags:
C++ Compiler ${CMAKE_CXX_COMPILER}
Type ${CMAKE_CXX_COMPILER_ID}
@ -718,7 +718,7 @@ else()
endif()
message(STATUS "Link libraries: ${LAMMPS_LINK_LIBS}")
if(BUILD_MPI)
message(STATUS "Using MPI with headers in ${MPI_CXX_INCLUDE_PATH} and ${MPI_CXX_LIBRARIES}")
message(STATUS "Using MPI with headers in ${MPI_CXX_INCLUDE_PATH} and these libraries: ${MPI_CXX_LIBRARIES};${MPI_Fortran_LIBRARIES}")
endif()
if(PKG_GPU)
message(STATUS "GPU API: ${GPU_API}")

View File

@ -0,0 +1,21 @@
# ninja-build<1.10 does not support fortran.
if(CMAKE_GENERATOR STREQUAL "Ninja")
set(CMAKE_GENERATOR_SUPPORT_FORTRAN FALSE)
execute_process(COMMAND "${CMAKE_MAKE_PROGRAM}" --version
OUTPUT_VARIABLE NINJA_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE _Ninja_version_result
)
if(_Ninja_version_result)
message(WARNING "Unable to determine ninja version: ${_Ninja_version_result}, assuming fortran isn't supported")
elseif(NINJA_VERSION VERSION_LESS "1.10")
message(WARNING "Ninja build tool too old, to compile Fortran code, please install ninja-1.10 or newer")
else()
set(CMAKE_GENERATOR_SUPPORT_FORTRAN TRUE)
endif()
else()
set(CMAKE_GENERATOR_SUPPORT_FORTRAN TRUE)
if(NOT CMAKE_GENERATOR STREQUAL "Unix Makefiles")
message(WARNING "Assuming fortran is supported for ${CMAKE_GENERATOR}")
endif()
endif()

View File

@ -34,26 +34,22 @@ if(PKG_KIM)
endif()
option(DOWNLOAD_KIM "Download KIM-API from OpenKIM instead of using an already installed one" ${DOWNLOAD_KIM_DEFAULT})
if(DOWNLOAD_KIM)
if(CMAKE_GENERATOR STREQUAL "Ninja")
message(FATAL_ERROR "Cannot build downloaded KIM-API library with Ninja build tool")
endif()
message(STATUS "KIM-API download requested - we will build our own")
include(CheckLanguage)
include(ExternalProject)
enable_language(C)
check_language(Fortran)
if(NOT CMAKE_Fortran_COMPILER)
message(FATAL_ERROR "Compiling the KIM-API library requires a Fortran compiler")
endif()
enable_language(Fortran)
ExternalProject_Add(kim_build
URL https://s3.openkim.org/kim-api/kim-api-2.1.3.txz
URL_MD5 6ee829a1bbba5f8b9874c88c4c4ebff8
BINARY_DIR build
CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
CMAKE_ARGS ${CMAKE_REQUEST_PIC}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
BUILD_BYPRODUCTS <INSTALL_DIR>/${CMAKE_INSTALL_LIBDIR}/libkim-api${CMAKE_SHARED_LIBRARY_SUFFIX}
)
ExternalProject_get_property(kim_build INSTALL_DIR)
set(KIM-API_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api)

View File

@ -8,9 +8,6 @@ if(PKG_LATTE)
endif()
option(DOWNLOAD_LATTE "Download the LATTE library instead of using an already installed one" ${DOWNLOAD_LATTE_DEFAULT})
if(DOWNLOAD_LATTE)
if(CMAKE_GENERATOR STREQUAL "Ninja")
message(FATAL_ERROR "Cannot build downloaded LATTE library with Ninja build tool")
endif()
message(STATUS "LATTE download requested - we will build our own")
include(ExternalProject)
ExternalProject_Add(latte_build
@ -21,6 +18,8 @@ if(PKG_LATTE)
-DBLAS_LIBRARIES=${BLAS_LIBRARIES} -DLAPACK_LIBRARIES=${LAPACK_LIBRARIES}
-DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER} -DCMAKE_Fortran_FLAGS=${CMAKE_Fortran_FLAGS}
-DCMAKE_Fortran_FLAGS_${BTYPE}=${CMAKE_Fortran_FLAGS_${BTYPE}} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
BUILD_BYPRODUCTS <INSTALL_DIR>/${CMAKE_INSTALL_LIBDIR}/liblatte.a
)
ExternalProject_get_property(latte_build INSTALL_DIR)
set(LATTE_LIBRARIES ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/liblatte.a)

View File

@ -8,9 +8,6 @@ if(PKG_MSCG)
endif()
option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" ${DOWNLOAD_MSCG_DEFAULT})
if(DOWNLOAD_MSCG)
if(CMAKE_GENERATOR STREQUAL "Ninja")
message(FATAL_ERROR "Cannot build downloaded MSCG library with Ninja build tool")
endif()
include(ExternalProject)
if(NOT LAPACK_FOUND)
set(EXTRA_MSCG_OPTS "-DLAPACK_LIBRARIES=${CMAKE_CURRENT_BINARY_DIR}/liblinalg.a")
@ -19,8 +16,16 @@ if(PKG_MSCG)
URL https://github.com/uchicago-voth/MSCG-release/archive/1.7.3.1.tar.gz
URL_MD5 8c45e269ee13f60b303edd7823866a91
SOURCE_SUBDIR src/CMake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CMAKE_REQUEST_PIC} ${EXTRA_MSCG_OPTS}
BUILD_COMMAND make mscg INSTALL_COMMAND ""
CMAKE_ARGS ${CMAKE_REQUEST_PIC} ${EXTRA_MSCG_OPTS}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
BUILD_COMMAND ${CMAKE_COMMAND} --build . --target mscg
INSTALL_COMMAND ""
BUILD_BYPRODUCTS <BINARY_DIR>/libmscg.a
)
ExternalProject_get_property(mscg_build BINARY_DIR)
set(MSCG_LIBRARIES ${BINARY_DIR}/libmscg.a)

View File

@ -74,11 +74,6 @@ if(PKG_USER-INTEL)
add_definitions(-DLMP_INTEL_OFFLOAD)
else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xCOMMON-AVX512")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHost")
endif()
include(CheckCXXCompilerFlag)
foreach(_FLAG -O2 -fp-model fast=2 -no-prec-div -qoverride-limits -qopt-zmm-usage=high -qno-offload -fno-alias -ansi-alias -restrict)
check_cxx_compiler_flag("${__FLAG}" COMPILER_SUPPORTS${_FLAG})

View File

@ -1,6 +1,6 @@
if(PKG_USER-NETCDF)
# USER-NETCDF can use NetCDF, Parallel NetCDF (PNetCDF), or both. At least one necessary.
# NetCDF library enables dump sytle "netcdf", while PNetCDF enables dump style "netcdf/mpiio"
# NetCDF library enables dump style "netcdf", while PNetCDF enables dump style "netcdf/mpiio"
find_package(NetCDF)
if(NETCDF_FOUND)
find_package(PNetCDF)

View File

@ -29,9 +29,6 @@ if(PKG_USER-PLUMED)
option(DOWNLOAD_PLUMED "Download Plumed package instead of using an already installed one" ${DOWNLOAD_PLUMED_DEFAULT})
if(DOWNLOAD_PLUMED)
if(CMAKE_GENERATOR STREQUAL "Ninja")
message(FATAL_ERROR "Cannot build downloaded Plumed library with Ninja build tool")
endif()
if(BUILD_MPI)
set(PLUMED_CONFIG_MPI "--enable-mpi")
set(PLUMED_CONFIG_CC ${CMAKE_MPI_C_COMPILER})
@ -47,6 +44,13 @@ if(PKG_USER-PLUMED)
set(PLUMED_CONFIG_OMP "--disable-openmp")
endif()
message(STATUS "PLUMED download requested - we will build our own")
if(PLUMED_MODE STREQUAL "STATIC")
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/libplumed.a")
elseif(PLUMED_MODE STREQUAL "SHARED")
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/libplumed${CMAKE_SHARED_LIBRARY_SUFFIX};<INSTALL_DIR>/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
elseif(PLUMED_MODE STREQUAL "RUNTIME")
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/libplumedWrapper.a")
endif()
include(ExternalProject)
ExternalProject_Add(plumed_build
URL https://github.com/plumed/plumed2/releases/download/v2.6.0/plumed-src-2.6.0.tgz
@ -59,6 +63,7 @@ if(PKG_USER-PLUMED)
${PLUMED_CONFIG_OMP}
CXX=${PLUMED_CONFIG_CXX}
CC=${PLUMED_CONFIG_CC}
BUILD_BYPRODUCTS ${PLUMED_BUILD_BYPRODUCTS}
)
ExternalProject_get_property(plumed_build INSTALL_DIR)
set(PLUMED_INSTALL_DIR ${INSTALL_DIR})

View File

@ -4,6 +4,7 @@ if(PKG_USER-SCAFACOS)
find_package(GSL REQUIRED)
find_package(PkgConfig QUIET)
find_package(MPI REQUIRED)
set(DOWNLOAD_SCAFACOS_DEFAULT ON)
if(PKG_CONFIG_FOUND)
pkg_check_modules(SCAFACOS QUIET scafacos)
@ -13,9 +14,6 @@ if(PKG_USER-SCAFACOS)
endif()
option(DOWNLOAD_SCAFACOS "Download ScaFaCoS library instead of using an already installed one" ${DOWNLOAD_SCAFACOS_DEFAULT})
if(DOWNLOAD_SCAFACOS)
if(CMAKE_GENERATOR STREQUAL "Ninja")
message(FATAL_ERROR "Cannot build downloaded ScaFaCoS library with Ninja build tool")
endif()
message(STATUS "ScaFaCoS download requested - we will build our own")
include(ExternalProject)
ExternalProject_Add(scafacos_build
@ -29,6 +27,22 @@ if(PKG_USER-SCAFACOS)
CXX=${CMAKE_MPI_CXX_COMPILER}
CC=${CMAKE_MPI_C_COMPILER}
F77=
BUILD_BYPRODUCTS
<INSTALL_DIR>/lib/libfcs.a
<INSTALL_DIR>/lib/libfcs_direct.a
<INSTALL_DIR>/lib/libfcs_ewald.a
<INSTALL_DIR>/lib/libfcs_fmm.a
<INSTALL_DIR>/lib/libfcs_p2nfft.a
<INSTALL_DIR>/lib/libfcs_p3m.a
<INSTALL_DIR>/lib/libfcs_near.a
<INSTALL_DIR>/lib/libfcs_gridsort.a
<INSTALL_DIR>/lib/libfcs_resort.a
<INSTALL_DIR>/lib/libfcs_redist.a
<INSTALL_DIR>/lib/libfcs_common.a
<INSTALL_DIR>/lib/libfcs_pnfft.a
<INSTALL_DIR>/lib/libfcs_pfft.a
<INSTALL_DIR>/lib/libfcs_fftw3_mpi.a
<INSTALL_DIR>/lib/libfcs_fftw3.a
)
ExternalProject_get_property(scafacos_build INSTALL_DIR)
set(SCAFACOS_BUILD_DIR ${INSTALL_DIR})

View File

@ -7,9 +7,6 @@ if(PKG_VORONOI)
endif()
option(DOWNLOAD_VORO "Download and compile the Voro++ library instead of using an already installed one" ${DOWNLOAD_VORO_DEFAULT})
if(DOWNLOAD_VORO)
if(CMAKE_GENERATOR STREQUAL "Ninja")
message(FATAL_ERROR "Cannot build downloaded Voro++ library with Ninja build tool")
endif()
message(STATUS "Voro++ download requested - we will build our own")
include(ExternalProject)
@ -29,6 +26,7 @@ if(PKG_VORONOI)
URL https://download.lammps.org/thirdparty/voro++-0.4.6.tar.gz
URL_MD5 2338b824c3b7b25590e18e8df5d68af9
CONFIGURE_COMMAND "" BUILD_COMMAND make ${VORO_BUILD_OPTIONS} BUILD_IN_SOURCE 1 INSTALL_COMMAND ""
BUILD_BYPRODUCTS <SOURCE_DIR>/src/libvoro++.a
)
ExternalProject_get_property(voro_build SOURCE_DIR)
set(VORO_LIBRARIES ${SOURCE_DIR}/src/libvoro++.a)

View File

@ -217,7 +217,7 @@ cmake -C ../cmake/presets/all_on.cmake -C ../cmake/presets/nolib.cmake -D PKG_GP
</tr>
<tr>
<td><code>CMAKE_VERBOSE_MAKEFILE</code></td>
<td>Enable verbose output from Makefile builds (useful for debugging), the same can be achived by adding `VERBOSE=1` to the `make` call.</td>
<td>Enable verbose output from Makefile builds (useful for debugging), the same can be achieved by adding `VERBOSE=1` to the `make` call.</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
@ -576,7 +576,7 @@ cmake -C ../cmake/presets/all_on.cmake -C ../cmake/presets/nolib.cmake -D PKG_GP
Several fixes and a pair style that have Monte Carlo (MC) or MC-like
attributes. These include fixes for creating, breaking, and swapping bonds,
for performing atomic swaps, and performing grand-canonical MC (GCMC) in
conjuction with dynamics.
conjunction with dynamics.
</td>
<td>
<dl>

View File

@ -13,5 +13,5 @@ set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE)
set(OpenMP_CXX "clang++" CACHE STRING "" FORCE)
set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "" FORCE)
set(OpenMP_CXX_LIB_NAMES "omp" CACHE STRING "" FORCE)
set(OpenMP_omp_LIBRARY "/usr/lib64/libomp.so" CACHE PATH "" FORCE)
set(OpenMP_omp_LIBRARY "libomp.so" CACHE PATH "" FORCE)

17
cmake/presets/intel.cmake Normal file
View File

@ -0,0 +1,17 @@
# preset that will enable clang/clang++ with support for MPI and OpenMP (on Linux boxes)
set(CMAKE_CXX_COMPILER "icpc" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "icc" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "-O3 -DNDEBG" CACHE STRING "" FORCE)
set(MPI_CXX "icpc" CACHE STRING "" FORCE)
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
unset(HAVE_OMP_H_INCLUDE CACHE)
set(OpenMP_C "icc" CACHE STRING "" FORCE)
set(OpenMP_C_FLAGS "-qopenmp" CACHE STRING "" FORCE)
set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE)
set(OpenMP_CXX "icpc" CACHE STRING "" FORCE)
set(OpenMP_CXX_FLAGS "-qopenmp" CACHE STRING "" FORCE)
set(OpenMP_CXX_LIB_NAMES "omp" CACHE STRING "" FORCE)
set(OpenMP_omp_LIBRARY "libiomp5.so" CACHE PATH "" FORCE)

View File

@ -13,3 +13,5 @@ set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
endforeach()
set(BUILD_TOOLS ON CACHE BOOL "" FORCE)

View File

@ -31,7 +31,7 @@ of benzene, you have to provide the files 'benzene.car' and 'benzene.mdf'
in the current working directory.
.B msi2lmp
will then read and process those files according to its remaining settings.
All other settins are optional and have defaults as listed.
All other settings are optional and have defaults as listed.
.TP
\fB\-c <I,1,II,2,O,0>\fR, \fB\-class <I,1,II,2,O,0>\fR
The \-c or \-class option selects the force field class, i.e which pair

View File

@ -10,7 +10,7 @@ LAMMPS</H2>
LAMMPS = Large-scale Atomic/Molecular Massively Parallel Simulator</P>
<P>
This is the documentation for the LAMMPS 2001 version, written in F90,
which has been superceded by more current versions. See the <A
which has been superseded by more current versions. See the <A
HREF="http://www.cs.sandia.gov/~sjplimp/lammps.html">LAMMPS WWW
Site</A> for more information.
<P>

View File

@ -47,7 +47,7 @@ directories: </P>
<P>
The src directory contains the F90 and C source files for LAMMPS as
well as several sample Makefiles for different machines. To make LAMMPS
for a specfic machine, you simply type</P>
for a specific machine, you simply type</P>
<P>
make machine</P>
<P>

View File

@ -1079,7 +1079,7 @@ for style aveforce, average force on the group of fixed atoms is computed,
to new total value -> has effect of applying same force to entire group
of atoms
thermostatting constraints (rescale, hoover/drag, langevin) cannot be used in
conjuction with global &quot;temp control&quot;, since they conflict and will
conjunction with global &quot;temp control&quot;, since they conflict and will
cause atom velocities to be reset twice
thermostatting constraints (rescale, hoover/drag, langevin) cannot be used
when performing a minimization
@ -1089,7 +1089,7 @@ meaning of rescale and Langevin thermostatting coefficients is same as in
&quot;temp control&quot; command
for rescale style, it can be used as a coarse temperature rescaler,
for example &quot;rescale 200.0 300.0 100 10.0 1.0&quot; will ramp the temperature
up during the simulation, resetting it to the target temperatue as needed
up during the simulation, resetting it to the target temperature as needed
for rescale style, it can be used to create an instantaneous
drag force that slowly rescales the temperature without oscillation,
for example &quot;rescale 300.0 300.0 1 0.0 0.0001&quot; will force (or keep)
@ -1952,7 +1952,7 @@ for rescale style, the amount of rescaling is contfolled by the fractional
to halfway between the current and target temperature
for rescale style, it can be used as a coarse temperature rescaler,
for example "rescale 200.0 300.0 100 10.0 1.0" will ramp the temperature
up during the simulation, resetting it to the target temperatue as needed
up during the simulation, resetting it to the target temperature as needed
for rescale style, it can be used to create an instantaneous
drag force that slowly rescales the temperature without oscillation,
for example "rescale 300.0 300.0 1 0.0 0.0001" will force (or keep)

View File

@ -10,7 +10,7 @@ LAMMPS</H2>
LAMMPS = Large-scale Atomic/Molecular Massively Parallel Simulator</P>
<P>
This is the documentation for the LAMMPS 99 version, written in F77,
which has been superceded by more current versions. See the <A
which has been superseded by more current versions. See the <A
HREF="http://www.cs.sandia.gov/~sjplimp/lammps.html">LAMMPS WWW
Site</A> for more information.
<P>

View File

@ -45,7 +45,7 @@ directories: </P>
<P>
The src directory contains the F77 and C source files for LAMMPS as
well as several sample Makefiles for different machines. To make LAMMPS
for a specfic machine, you simply type</P>
for a specific machine, you simply type</P>
<P>
make machine</P>
<P>

View File

@ -430,7 +430,7 @@ accuracy criterion effectively determines how many k-space vectors are used
for PPPM, accuracy criterion determines mesh spacing (see &quot;particle mesh&quot;
command)
for PPPM, must be running on power-of-2 number of processors for FFTs
must use periodic boundary conditions in conjuction with Ewald and PPPM
must use periodic boundary conditions in conjunction with Ewald and PPPM
cannot use any styles other than none with nonbond style = lj/shift or
nonbond style = soft
Coulomb style = smooth should be used with nonbond style = lj/switch,
@ -772,7 +772,7 @@ for style aveforce, average force on the group of fixed atoms is computed,
to new total value -&gt; has effect of applying same force to entire group
of atoms
thermostatting constraints (rescale, langevin, nose/hoover) cannot be used in
conjuction with global &quot;temp control&quot;, since they conflict and will
conjunction with global &quot;temp control&quot;, since they conflict and will
cause atom velocities to be reset twice
if multiple Langevin constraints are specified the Marsaglia RNG will
only use the last RNG seed specified for initialization

View File

@ -213,6 +213,14 @@ A few example command lines are:
For compiling with the Clang/LLVM compilers a special CMake preset is
included that can be loaded with `-C ../cmake/presets/clang.cmake`.
In addition you can set ``CMAKE_TUNE_FLAGS`` to specifically add compiler
flags to tune for optimal performance on given hosts. By default these are
initialized to some compiler specific flags, where known, to optimize the
LAMMPS executable with optimizations and instructions available on the host
where LAMMPS is compiled. For example, for Intel compilers this would be
``-xHost`` and for GNU compilers this would be ``-march=native``. To turn
these flags off, set ``-D CMAKE_TUNE_FLAGS=``.
.. note::
When the cmake command completes, it prints a summary to the screen

View File

@ -22,28 +22,30 @@ Makefile(s). Example:
cd lammps # change to the LAMMPS distribution directory
mkdir build; cd build # create a new directory (folder) for build
cmake [options ...] ../cmake # configuration with (command-line) cmake
make # compilation
cmake --build . # compilation (or type "make")
The cmake command will detect available features, enable selected
The ``cmake`` command will detect available features, enable selected
packages and options, and will generate the build environment. By default
this build environment will be created for "Unix Makefiles" on most
platforms and particularly on Linux. However, alternate build tools
(e.g. Ninja) and project files for Integrated Development Environments
(IDEs) like Eclipse, CodeBlocks, or Kate can be generated, too. This is
selected via the "-G" command line flag. For the rest of the documentation
we will assume that the build environment is generated for makefiles
and thus the make command will be used to compile and link LAMMPS as
indicated above, producing (by default) an executable called "lmp" and
a library called "liblammps.a" in the "build" folder. When generating
a build environment for the "Ninja" build tool, the build command would
be "ninja" instead of "make".
selected via the ``-G`` command line flag. Further details about features
and settings for CMake are in the `CMake online documentation <cmake_doc>`_
If your machine has multiple CPU cores (most do these days), using a
command like "make -jN" (with N being the number of available local
CPU cores) can be much faster. If you plan to do development on
LAMMPS or need to re-compile LAMMPS repeatedly, installation of the
ccache (= Compiler Cache) software may speed up repeated compilation
even more.
.. _cmake_doc: https://cmake.org/documentation/
For the rest of the documentation
we will assume that the build environment is generated for "Unix Makefiles"
and thus the ``make`` command will be used to compile and link LAMMPS as
indicated above, producing (by default) an executable called ``lmp`` and
a library called ``liblammps.a`` in the ``build`` folder.
If your machine has multiple CPU cores (most do these days), you can
compile sources in parallel with a command like ``make -j N`` (with N
being the maximum number of concurrently executed tasks). Also
installation of the ``ccache`` (= Compiler Cache) software may speed
up repeated compilation, e.g. during code development, significantly.
After compilation, you may optionally install the LAMMPS executable into
your system with:
@ -60,9 +62,11 @@ to ${HOME}/.local
----------
.. _cmake_build:
There are 3 variants of the CMake command itself: a command-line version
(*cmake* or *cmake3*), a text mode UI version (*ccmake* or *ccmake3*),
and a graphical GUI version (*cmake-gui*). You can use any of them
(``cmake`` or ``cmake3``), a text mode UI version (``ccmake`` or ``ccmake3``),
and a graphical GUI version (``cmake-gui``). You can use any of them
interchangeably to configure and create the LAMMPS build environment.
On Linux all the versions produce a Makefile as their output by default.
See more details on each below.
@ -75,7 +79,7 @@ the :doc:`Build <Build>` doc page.
You must perform the CMake build system generation and compilation in
a new directory you create. It can be anywhere on your local machine.
In these Build pages we assume that you are building in a directory
called "lammps/build". You can perform separate builds independently
called ``lammps/build``. You can perform separate builds independently
with different options, so long as you perform each of them in a
separate directory you create. All the auxiliary files created by one
build process (executable, object files, log files, etc) are stored in
@ -84,10 +88,10 @@ this directory or sub-directories within it that CMake creates.
.. note::
To perform a CMake build, no packages can be installed or a build
been previously attempted in the LAMMPS src directory by using "make"
been previously attempted in the LAMMPS src directory by using ``make``
commands to :doc:`perform a conventional LAMMPS build <Build_make>`.
CMake detects if this is the case and generates an error, telling you
to type "make no-all purge" in the src directory to un-install all
to type ``make no-all purge`` in the src directory to un-install all
packages. The purge removes all the \*.h files auto-generated by
make.
@ -123,7 +127,7 @@ command-line options. Several useful ones are:
-D CMAKE_INSTALL_PREFIX=path # where to install LAMMPS executable/lib if desired
-D CMAKE_BUILD_TYPE=type # type = RelWithDebInfo (default), Release, MinSizeRel, or Debug
-G output # style of output CMake generates (e.g. "Unix Makefiles" or "Ninja")
-D CMAKE_MAKE_PROGRAM=builder # name of the builder executable (e.g. set to "gmake" instead of "make")
-D CMAKE_MAKE_PROGRAM=builder # name of the builder executable (e.g. when using "gmake" instead of "make")
-DVARIABLE=value # setting for a LAMMPS feature to enable
-D VARIABLE=value # ditto, but cannot come after CMakeLists.txt dir
-C path/to/preset/file # load some CMake settings before configuring
@ -137,7 +141,7 @@ these forms can be used: yes/no, on/off, 1/0.
On Unix/Linux machines, CMake generates a Makefile by default to
perform the LAMMPS build. Alternate forms of build info can be
generated via the -G switch, e.g. Visual Studio on a Windows machine,
Xcode on MacOS, or KDevelop on Linux. Type "cmake --help" to see the
Xcode on MacOS, or KDevelop on Linux. Type ``cmake --help`` to see the
"Generator" styles of output your system supports.
.. note::

View File

@ -2,7 +2,7 @@ Development build options (CMake only)
======================================
The CMake build of LAMMPS has a few extra options which are useful during
development, testing or debugging.
development, testing or debugging.
----------
@ -32,20 +32,27 @@ Another way of doing this without reconfiguration is calling make with variable
Address, Undefined Behavior, and Thread Sanitizer Support
-------------------------------------------------------------------------
Compilers such as GCC and Clang support generating binaries which use different
sanitizers to detect problems in code during run-time. They can detect `memory leaks <https://clang.llvm.org/docs/AddressSanitizer.html>`_,
code that runs into `undefined behavior <https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html>`_ of the
language and `data races <https://clang.llvm.org/docs/ThreadSanitizer.html>`_ in threaded code.
Compilers such as GCC and Clang support generating instrumented binaries
which use different sanitizer libraries to detect problems in code
during run-time. They can detect issues like:
The following settings allow you enable these features if your compiler supports
it. Please note that they come with a performance hit. However, they are
usually faster than using tools like Valgrind.
- `memory leaks <https://clang.llvm.org/docs/AddressSanitizer.html>`_
- `undefined behavior <https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html>`_
- `data races <https://clang.llvm.org/docs/ThreadSanitizer.html>`_
Please note that this kind of instrumentation usually comes with a small
performance hit (much less than using tools like `Valgrind <valgrind_>`_).
The to enable these features additional compiler flags need to be added
to the compilation and linking stages. This is most easily done through
setting the ``CMAKE_TUNE_FLAGS`` variable during configuration. Examples:
.. code-block:: bash
-D ENABLE_SANITIZE_ADDRESS=value # enable Address Sanitizer, value = no (default) or yes
-D ENABLE_SANITIZE_UNDEFINED=value # enable Undefined Behaviour Sanitizer, value = no (default) or yes
-D ENABLE_SANITIZE_THREAD=value # enable Thread Sanitizer, value = no (default) or yes
-D CMAKE_TUNE_FLAGS=-fsanitize=address # enable address sanitizer / memory leak checker
-D CMAKE_TUNE_FLAGS=-fsanitize=undefined # enable undefined behavior sanitizer
-D CMAKE_TUNE_FLAGS=-fsanitize=thread # enable thread sanitizer
.. _valgrind: https://valgrind.org
----------

View File

@ -146,13 +146,14 @@ one of them as a starting point and customize it to your needs.
.. code-block:: bash
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 common 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/mingw.cmake [OPTIONS] ../cmake # enable all packages compatible with MinGW compilers
cmake -C ../cmake/presets/intel.cmake [OPTIONS] ../cmake # change settings to use the Intel compilers by default
cmake -C ../cmake/presets/mingw.cmake [OPTIONS] ../cmake # enable packages compatible with MinGW compilers for Windows
cmake -C ../cmake/presets/all_on.cmake [OPTIONS] ../cmake # enable all packages
cmake -C ../cmake/presets/all_off.cmake [OPTIONS] ../cmake # disable all packages
.. note::

View File

@ -119,6 +119,7 @@ OPT.
* :doc:`npt/eff <fix_nh_eff>`
* :doc:`npt/sphere (o) <fix_npt_sphere>`
* :doc:`npt/uef <fix_nh_uef>`
* :doc:`numdiff <fix_numdiff>`
* :doc:`nve (iko) <fix_nve>`
* :doc:`nve/asphere (i) <fix_nve_asphere>`
* :doc:`nve/asphere/noforce <fix_nve_asphere_noforce>`

View File

@ -77,6 +77,8 @@ OPT.
* :doc:`coul/long/cs (g) <pair_cs>`
* :doc:`coul/long/soft (o) <pair_fep_soft>`
* :doc:`coul/msm (o) <pair_coul>`
* :doc:`coul/slater/cut <pair_coul_slater>`
* :doc:`coul/slater/long <pair_coul_slater>`
* :doc:`coul/shield <pair_coul_shield>`
* :doc:`coul/streitz <pair_coul>`
* :doc:`coul/wolf (ko) <pair_coul>`

View File

@ -1936,6 +1936,9 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
*Compute ID for fix ave/time does not exist*
Self-explanatory.
*Compute ID for fix numdiff does not exist*
Self-explanatory.
*Compute ID for fix store/state does not exist*
Self-explanatory.
@ -2529,6 +2532,9 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
This should not happen unless you explicitly deleted
a secondary fix that fix adapt created internally.
*Could not find fix halt variable name*
Self-explanatory.
*Could not find fix gcmc exclusion group ID*
Self-explanatory.
@ -2878,6 +2884,9 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
The dimension command cannot be used after a read_data,
read_restart, or create_box command.
*Disk limit not supported by OS or illegal path*
Self-explanatory.
*Dispersion PPPMDisp order has been reduced below minorder*
The default minimum order is 2. This can be reset by the
kspace_modify minorder command.
@ -3689,6 +3698,9 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
*Fix gld tau coefficients must be > 0*
Self-explanatory.
*Fix halt variable is not equal-style variable*
Self-explanatory.
*Fix heat group has no atoms*
Self-explanatory.
@ -3774,6 +3786,14 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
Self-explanatory. The change in the box tilt is too extreme
on a short timescale.
*Fix numdiff requires an atom map, see atom_modify*
Self-explanatory. Efficient loop over all atoms for numerical
difference requires an atom map.
*Fix numdiff requires consecutive atom IDs*
Self-explanatory. Efficient loop over all atoms for numerical
difference requires consecutive atom IDs.
*Fix nve/asphere requires extended particles*
This fix can only be used for particles with a shape setting.
@ -4724,6 +4744,12 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
*Invalid Masses section in molecule file*
Self-explanatory.
*Invalid molecule ID in molecule file*
Molecule ID must be a non-zero positive integer.
*Invalid Molecules section in molecule file*
Self-explanatory.
*Invalid REAX atom type*
There is a mis-match between LAMMPS atom types and the elements
listed in the ReaxFF force field file.
@ -4790,6 +4816,9 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
Atom IDs must be positive integers and within range of defined
atoms.
*Invalid atom ID in Fragments section of molecule file*
Self-explanatory.
*Invalid atom ID in Impropers section of data file*
Atom IDs must be positive integers and within range of defined
atoms.
@ -5113,6 +5142,12 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
*Invalid fix box/relax pressure settings*
Settings for coupled dimensions must be the same.
*Invalid fix halt attribute*
Self-explanatory.
*Invalid fix halt operator*
Self-explanatory.
*Invalid fix nvt/npt/nph command for a 2d simulation*
Cannot control z dimension in a 2d model.
@ -7666,7 +7701,7 @@ keyword to allow for additional bonds to be formed
Keywords that refer to time (such as cpu, elapsed) do not
make sense in between runs.
*Threshhold for an atom property that is not allocated*
*Threshold for an atom property that is not allocated*
A dump threshold has been requested on a quantity that is
not defined by the atom style used in this simulation.

View File

@ -187,6 +187,9 @@ Doc page with :doc:`ERROR messages <Errors_messages>`
A FENE bond has stretched dangerously far. It's interaction strength
will be truncated to attempt to prevent the bond from blowing up.
*Fix halt condition for fix-id %s met on step %ld with value %g*
Self explanatory.
*Fix SRD walls overlap but fix srd overlap not set*
You likely want to set this in your input script.

View File

@ -1,7 +1,7 @@
Download an executable for Linux or Mac via Conda
=================================================
Binaries are available for macOS or Linux via `Conda <conda_>`_.
Binaries are available for MacOS or Linux via `Conda <conda_>`_.
First, one must setup the Conda package manager on your system. Follow the
instructions to install `Miniconda <mini_conda_install_>`_, then create a conda

View File

@ -40,33 +40,61 @@ own sub-directories with their own Makefiles and/or README files.
Pre-processing tools
====================
+-----------------------------+------------------------+----------------------+----------------------------------+----------------------------------+-----------------------------+
| :ref:`amber2lmp <amber>` | :ref:`ch2lmp <charmm>` | :ref:`chain <chain>` | :ref:`createatoms <createatoms>` | :ref:`drude <drude>` | :ref:`eam database <eamdb>` |
+-----------------------------+------------------------+----------------------+----------------------------------+----------------------------------+-----------------------------+
| :ref:`eam generate <eamgn>` | :ref:`eff <eff>` | :ref:`ipp <ipp>` | :ref:`micelle2d <micelle>` | :ref:`moltemplate <moltemplate>` | :ref:`msi2lmp <msi>` |
+-----------------------------+------------------------+----------------------+----------------------------------+----------------------------------+-----------------------------+
| :ref:`polybond <polybond>` | | | | | |
+-----------------------------+------------------------+----------------------+----------------------------------+----------------------------------+-----------------------------+
.. table_from_list::
:columns: 6
* :ref:`amber2lmp <amber>`
* :ref:`ch2lmp <charmm>`
* :ref:`chain <chain>`
* :ref:`createatoms <createatoms>`
* :ref:`drude <drude>`
* :ref:`eam database <eamdb>`
* :ref:`eam generate <eamgn>`
* :ref:`eff <eff>`
* :ref:`ipp <ipp>`
* :ref:`micelle2d <micelle>`
* :ref:`moltemplate <moltemplate>`
* :ref:`msi2lmp <msi>`
* :ref:`polybond <polybond>`
Post-processing tools
=====================
+--------------------------+----------------------------+------------------------+--------------------------+-------------------------------+-----------------------------+
| :ref:`amber2lmp <amber>` | :ref:`binary2txt <binary>` | :ref:`ch2lmp <charmm>` | :ref:`colvars <colvars>` | :ref:`eff <eff>` | :ref:`fep <fep>` |
+--------------------------+----------------------------+------------------------+--------------------------+-------------------------------+-----------------------------+
| :ref:`lmp2arc <arc>` | :ref:`lmp2cfg <cfg>` | :ref:`matlab <matlab>` | :ref:`phonon <phonon>` | :ref:`pymol_asphere <pymol>` | :ref:`python <pythontools>` |
+--------------------------+----------------------------+------------------------+--------------------------+-------------------------------+-----------------------------+
| :ref:`reax <reax_tool>` | :ref:`replica <replica>` | :ref:`smd <smd>` | :ref:`spin <spin>` | :ref:`xmgrace <xmgrace>` | |
+--------------------------+----------------------------+------------------------+--------------------------+-------------------------------+-----------------------------+
.. table_from_list::
:columns: 6
* :ref:`amber2lmp <amber>`
* :ref:`binary2txt <binary>`
* :ref:`ch2lmp <charmm>`
* :ref:`colvars <colvars>`
* :ref:`eff <eff>`
* :ref:`fep <fep>`
* :ref:`lmp2arc <arc>`
* :ref:`lmp2cfg <cfg>`
* :ref:`matlab <matlab>`
* :ref:`phonon <phonon>`
* :ref:`pymol_asphere <pymol>`
* :ref:`python <pythontools>`
* :ref:`reax <reax_tool>`
* :ref:`replica <replica>`
* :ref:`smd <smd>`
* :ref:`spin <spin>`
* :ref:`xmgrace <xmgrace>`
Miscellaneous tools
===================
+--------------------------+----------------------+-------------------+--------------------+---------------------------------------+
| :ref:`doxygen <doxygen>` | :ref:`emacs <emacs>` | :ref:`i-pi <ipi>` | :ref:`kate <kate>` | :ref:`singularity <singularity_tool>` |
+--------------------------+----------------------+-------------------+--------------------+---------------------------------------+
| :ref:`vim <vim>` | | | | |
+--------------------------+----------------------+-------------------+--------------------+---------------------------------------+
.. table_from_list::
:columns: 6
* :ref:`CMake <cmake>`
* :ref:`doxygen <doxygen>`
* :ref:`emacs <emacs>`
* :ref:`i-pi <ipi>`
* :ref:`kate <kate>`
* :ref:`singularity <singularity_tool>`
* :ref:`vim <vim>`
----------
@ -157,6 +185,30 @@ See the def.chain or def.chain.ab files in the tools directory for
examples of definition files. This tool was used to create the system
for the :doc:`chain benchmark <Speed_bench>`.
----------
.. _cmake:
CMake tools
-----------
The ``cmbuild`` script is a wrapper around using ``cmake --build <dir>
--target`` and allows compiling LAMMPS in a :ref:`CMake build folder
<cmake_build>` with a make-like syntax regardless of the actual build
tool and the specific name of the program used (e.g. ``ninja-v1.10`` or
``gmake``) when using ``-D CMAKE_MAKE_PROGRAM=<name>``.
.. parsed-literal::
Usage: cmbuild [-v] [-h] [-C <dir>] [-j <num>] [<target>]
Options:
-h print this message
-j <NUM> allow processing of NUM concurrent tasks
-C DIRECTORY execute build in folder DIRECTORY
-v produce verbose output
----------
.. _colvars:

View File

@ -32,7 +32,7 @@ examples</a></h4>
<p><code> fix_modify AtC boundary type ghost_atoms </code> </p>
<h4><a class="anchor" id="description">
description</a></h4>
<p>Command to define the atoms that represent the ficticious boundary internal to the FE mesh. For fully overlapped MD/FE domains with periodic boundary conditions no boundary atoms should be defined. </p>
<p>Command to define the atoms that represent the fictitious boundary internal to the FE mesh. For fully overlapped MD/FE domains with periodic boundary conditions no boundary atoms should be defined. </p>
<h4><a class="anchor" id="restrictions">
restrictions</a></h4>
<h4><a class="anchor" id="default">

View File

@ -38,7 +38,7 @@ examples</a></h4>
</p>
<h4><a class="anchor" id="description">
description</a></h4>
<p>Requests calculation and ouput of gradients of the fields from the transfer class. These gradients will be with regard to spatial or material coordinate for eulerian or lagrangian analysis, respectively, as specified by atom_element_map (see <a class="el" href="man_atom_element_map.html">fix_modify AtC atom_element_map</a> ) </p>
<p>Requests calculation and output of gradients of the fields from the transfer class. These gradients will be with regard to spatial or material coordinate for eulerian or lagrangian analysis, respectively, as specified by atom_element_map (see <a class="el" href="man_atom_element_map.html">fix_modify AtC atom_element_map</a> ) </p>
<h4><a class="anchor" id="restrictions">
restrictions</a></h4>
<p>Must be used with the hardy/field type of AtC fix ( see <a class="el" href="../../fix_atc.html">fix atc command</a> ) </p>

View File

@ -38,7 +38,7 @@ examples</a></h4>
</p>
<h4><a class="anchor" id="description">
description</a></h4>
<p>Requests calculation and ouput of rates (time derivatives) of the fields from the transfer class. For eulerian analysis (see <a class="el" href="man_atom_element_map.html">fix_modify AtC atom_element_map</a> ), these rates are the partial time derivatives of the nodal fields, not the full (material) time derivatives. <br/>
<p>Requests calculation and output of rates (time derivatives) of the fields from the transfer class. For eulerian analysis (see <a class="el" href="man_atom_element_map.html">fix_modify AtC atom_element_map</a> ), these rates are the partial time derivatives of the nodal fields, not the full (material) time derivatives. <br/>
</p>
<h4><a class="anchor" id="restrictions">
restrictions</a></h4>

View File

@ -70,7 +70,7 @@ See the :doc:`Build package <Build_package>` doc page for more info.
Related commands
""""""""""""""""
:doc:`fix phonon <fix_phonon>`
:doc:`fix phonon <fix_phonon>`, :doc:`fix numdiff <fix_numdiff>`,
:doc:`compute hma <compute_hma>` uses an analytic formulation of the
Hessian provided by a pair_style's Pair::single_hessian() function,

View File

@ -262,6 +262,7 @@ accelerated styles exist.
* :doc:`npt/eff <fix_nh_eff>` - NPT for nuclei and electrons in the electron force field model
* :doc:`npt/sphere <fix_npt_sphere>` - NPT for spherical particles
* :doc:`npt/uef <fix_nh_uef>` - NPT style time integration with diagonal flow
* :doc:`numdiff <fix_numdiff>` - compute derivatives of per-atom data from finite differences
* :doc:`nve <fix_nve>` - constant NVE time integration
* :doc:`nve/asphere <fix_nve_asphere>` - NVE for aspherical particles
* :doc:`nve/asphere/noforce <fix_nve_asphere_noforce>` - NVE for aspherical particles without forces

View File

@ -17,19 +17,22 @@ Syntax
.. parsed-literal::
bondmax = length of longest bond in the system
tlimit = elapsed CPU time
bondmax = length of longest bond in the system (in length units)
tlimit = elapsed CPU time (in seconds)
diskfree = free disk space (in megabytes)
v_name = name of :doc:`equal-style variable <variable>`
* operator = "<" or "<=" or ">" or ">=" or "==" or "!=" or "\|\^"
* avalue = numeric value to compare attribute to
* zero or more keyword/value pairs may be appended
* keyword = *error* or *message*
* keyword = *error* or *message* or *path*
.. parsed-literal::
*error* value = *hard* or *soft* or *continue*
*message* value = *yes* or *no*
*path* value = path to check for free space (may be in quotes)
Examples
""""""""
@ -37,22 +40,23 @@ Examples
.. code-block:: LAMMPS
fix 10 all halt 1 bondmax > 1.5
fix 10 all print 10 v_myCheck != 0 error soft
fix 10 all halt 10 v_myCheck != 0 error soft
fix 10 all halt 100 diskfree < 100000.0 path "dump storage/."
Description
"""""""""""
Check a condition every N steps during a simulation run. N must be >=
1. If the condition is met, exit the run immediately. In this
context a "run" can be dynamics or minimization iterations, as
specified by the :doc:`run <run>` or :doc:`minimize <minimize>` command.
Check a condition every N steps during a simulation run. N must be >=1.
If the condition is met, exit the run. In this context a "run" can be
dynamics or minimization iterations, as specified by the :doc:`run
<run>` or :doc:`minimize <minimize>` command.
The specified group-ID is ignored by this fix.
The specified *attribute* can be one of the options listed above,
namely *bondmax* or *tlimit*\ , or an :doc:`equal-style variable <variable>` referenced as *v_name*, where "name" is the
name of a variable that has been defined previously in the input
script.
The specified *attribute* can be one of the options listed above, namely
*bondmax*, *tlimit*\ , *diskfree*\ , or an :doc:`equal-style variable
<variable>` referenced as *v_name*, where "name" is the name of a
variable that has been defined previously in the input script.
The *bondmax* attribute will loop over all bonds in the system,
compute their current lengths, and set *attribute* to the longest bond
@ -76,6 +80,14 @@ a run is performing 1000s of timesteps/sec, the overhead for syncing
the timer frequently across a large number of processors may be
non-negligible.
The *diskfree* attribute will check for available disk space (in
megabytes) on supported operating systems. By default it will
check the file system of the current working directory. This
can be changed with the optional *path* keyword, which will take
the path to a file or folder on the file system to be checked
as argument. This path must be given with single or double quotes,
if it contains blanks or other special characters (like \$).
Equal-style variables evaluate to a numeric value. See the
:doc:`variable <variable>` command for a description. They calculate
formulas which can involve mathematical operations, atom properties,
@ -148,7 +160,7 @@ the :doc:`run <run>` command.
Restrictions
""""""""""""
none
The *diskfree* attribute is currently only supported on Linux and MacOS.
Related commands
""""""""""""""""
@ -158,4 +170,4 @@ Related commands
Default
"""""""
The option defaults are error = hard and message = yes.
The option defaults are error = hard, message = yes, and path = ".".

110
doc/src/fix_numdiff.rst Normal file
View File

@ -0,0 +1,110 @@
.. index:: fix numdiff
fix numdiff command
====================
Syntax
""""""
.. parsed-literal::
fix ID group-ID numdiff Nevery delta
* ID, group-ID are documented in :doc:`fix <fix>` command
* numdiff = style name of this fix command
* Nevery = calculate force by finite difference every this many timesteps
* delta = finite difference displacement length (distance units)
Examples
""""""""
.. code-block:: LAMMPS
fix 1 all numdiff 1 0.0001
fix 1 all numdiff 10 1e-6
fix 1 all numdiff 100 0.01
Description
"""""""""""
Calculate forces through finite difference calculations of energy
versus position. These forces can be compared to analytic forces
computed by pair styles, bond styles, etc. E.g. for debugging
purposes.
The group specified with the command means only atoms within the group
have their averages computed. Results are set to 0.0 for atoms not in
the group.
This fix performs a loop over all atoms (in the group). For each atom
and each component of force it adds *delta* to the position, and
computes the new energy of the entire system. It then subtracts
*delta* from the original position and again computes the new energy
of the system. It then restores the original position. That
component of force is calculated as the difference in energy divided
by two times *delta*.
.. note::
It is important to choose a suitable value for delta, the magnitude of
atom displacements that are used to generate finite difference
approximations to the exact forces. For typical systems, a value in
the range of 1 part in 1e4 to 1e5 of the typical separation distance
between atoms in the liquid or solid state will be sufficient.
However, the best value will depend on a multitude of factors
including the stiffness of the interatomic potential, the thermodynamic
state of the material being probed, and so on. The only way to be sure
that you have made a good choice is to do a sensitivity study on a
representative atomic configuration, sweeping over a wide range of
values of delta. If delta is too small, the output forces will vary
erratically due to truncation effects. If delta is increased beyond a
certain point, the output forces will start to vary smoothly with
delta, due to growing contributions from higher order derivatives. In
between these two limits, the numerical force values should be largely
independent of delta.
.. note::
The cost of each energy evaluation is essentially the cost of an MD
timestep. This invoking this fix once has a cost of 2N timesteps,
where N is the total number of atoms in the system (assuming all atoms
are included in the group). So this fix can be very expensive to use
for large systems.
----------
The *Nevery* argument specifies on what timesteps the force will
be used calculated by finite difference.
The *delta* argument specifies the positional displacement each
atom will undergo.
----------
**Restart, fix_modify, output, run start/stop, minimize info:**
No information about this fix is written to :doc:`binary restart files
<restart>`. None of the :doc:`fix_modify <fix_modify>` options are
relevant to this fix.
This fix produces a per-atom array which can be accessed by various
:doc:`output commands <Howto_output>`, which stores the components of
the force on each atom as calculated by finite difference. The
per-atom values can only be accessed on timesteps that are multiples
of *Nevery* since that is when the finite difference forces are
calculated.
No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command. This fix is invoked during :doc:`energy
minimization <minimize>`.
Restrictions
""""""""""""
none
Related commands
""""""""""""""""
:doc:`dynamical_matrix <dynamical_matrix>`,
**Default:** none

View File

@ -60,6 +60,7 @@ templates include:
* :doc:`fix rigid/small <fix_rigid>`
* :doc:`fix shake <fix_shake>`
* :doc:`fix gcmc <fix_gcmc>`
* :doc:`fix bond/react <fix_bond_react>`
* :doc:`create_atoms <create_atoms>`
* :doc:`atom_style template <atom_style>`
@ -144,6 +145,7 @@ appear if the value(s) are different than the default.
* Na *angles* = # of angles Na in molecule, default = 0
* Nd *dihedrals* = # of dihedrals Nd in molecule, default = 0
* Ni *impropers* = # of impropers Ni in molecule, default = 0
* Nf *fragments* = # of fragments in molecule, default = 0
* Mtotal *mass* = total mass of molecule
* Xc Yc Zc *com* = coordinates of center-of-mass of molecule
* Ixx Iyy Izz Ixy Ixz Iyz *inertia* = 6 components of inertia tensor of molecule
@ -166,7 +168,7 @@ internally.
These are the allowed section keywords for the body of the file.
* *Coords, Types, Charges, Diameters, Masses* = atom-property sections
* *Coords, Types, Molecules, Fragments, Charges, Diameters, Masses* = atom-property sections
* *Bonds, Angles, Dihedrals, Impropers* = molecular topology sections
* *Special Bond Counts, Special Bonds* = special neighbor info
* *Shake Flags, Shake Atoms, Shake Bond Types* = SHAKE info
@ -223,6 +225,26 @@ listed in order from 1 to Nlines, but LAMMPS does not check for this.
----------
*Molecules* section:
* one line per atom
* line syntax: ID molecule-ID
* molecule-ID = molecule ID of atom
----------
*Fragments* section:
* one line per fragment
* line syntax: ID a b c d ...
* a,b,c,d,... = IDs of atoms in fragment
The ID of a fragment can only contain alphanumeric characters and
underscores. The atom IDs should be values from 1 to Natoms, where
Natoms = # of atoms in the molecule.
----------
*Charges* section:
* one line per atom

View File

@ -0,0 +1,116 @@
.. index:: pair_style coul/slater
pair_style coul/slater/cut command
==================================
pair_style coul/slater/long command
===================================
Syntax
""""""
.. code-block:: LAMMPS
pair_style coul/slater/cut lambda cutoff
pair_style coul/slater/long lambda cutoff
lambda = decay length of the charge (distance units)
cutoff = cutoff (distance units)
Examples
""""""""
.. code-block:: LAMMPS
pair_style coul/slater/cut 1.0 3.5
pair_coeff * *
pair_coeff 2 2 2.5
pair_style coul/slater/long 1.0 12.0
pair_coeff * *
pair_coeff 1 1 5.0
Description
"""""""""""
Styles *coul/slater* compute electrostatic interactions in mesoscopic models
which employ potentials without explicit excluded-volume interactions.
The goal is to prevent artificial ionic pair formation by including a charge
distribution in the Coulomb potential, following the formulation of
:ref:`(Melchor) <Melchor>`:
.. math::
E = \frac{Cq_iq_j}{\epsilon r} \left( 1- \left( 1 + \frac{r_{ij}}{\lambda} exp\left( -2r_{ij}/\lambda \right) \right) \right) \qquad r < r_c
where :math:`r_c` is the cutoff distance and :math:`\lambda` is the decay length of the charge.
C is the same Coulomb conversion factor as in the pair_styles coul/cut and coul/long. In this way the Coulomb
interaction between ions is corrected at small distances r.
For the *coul/slater/cut* style, the potential energy for distances larger than the cutoff is zero,
while for the *coul/slater/long*, the long-range interactions are computed either by the Ewald or the PPPM technique.
Phenomena that can be captured at a mesoscopic level using this type of electrostatic
interactions include the formation of polyelectrolyte-surfactant aggregates,
charge stabilization of colloidal suspensions, and the formation of
complexes driven by charged species in biological systems. :ref:`(Vaiwala) <Vaiwala>`.
The cutoff distance is optional. If it is not used,
the default global value specified in the pair_style command is used.
For each pair of atom types, a specific cutoff distance can be defined via the :doc:`pair_coeff <pair_coeff>` command as in the example
above, or in the data file or restart files read by the
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>`
commands:
* :math:`r_c` (distance units)
The global decay length of the charge (:math:`\lambda`) specified in the pair_style command is used for all pairs.
----------
**Mixing, shift, table, tail correction, restart, rRESPA info**\ :
For atom type pairs I,J and I != J, the cutoff distance for the
*coul/slater* styles can be mixed. The default mix value is *geometric*\ .
See the "pair_modify" command for details.
The :doc:`pair_modify <pair_modify>` shift and table options are not relevant
for these pair styles.
These pair styles do not support the :doc:`pair_modify <pair_modify>`
tail option for adding long-range tail corrections to energy and
pressure.
These pair styles write their information to :doc:`binary restart files <restart>`, so pair_style and pair_coeff commands do not need
to be specified in an input script that reads a restart file.
This pair style can only be used via the *pair* keyword of the
:doc:`run_style respa <run_style>` command. It does not support the
*inner*\ , *middle*\ , *outer* keywords.
Restrictions
""""""""""""
The *coul/slater/long* style requires the long-range solvers included in the KSPACE package.
These styles are part of the "USER-MISC" package. They are only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
Related commands
""""""""""""""""
:doc:`pair_coeff <pair_coeff>`, :doc:`pair_style, hybrid/overlay <pair_hybrid>`, :doc:`kspace_style <kspace_style>`
**Default:** none
----------
.. _Melchor:
**(Melchor)** Gonzalez-Melchor, Mayoral, Velazquez, and Alejandre, J Chem Phys, 125, 224107 (2006).
.. _Vaiwala:
**(Vaiwala)** Vaiwala, Jadhav, and Thaokar, J Chem Phys, 146, 124904 (2017).

View File

@ -770,7 +770,7 @@ in contact. J. Appl. Mech., ASME 16, 259-268.
.. _Thornton2013:
**(Thornton et al, 2013)** Thornton, C., Cummins, S. J., & Cleary,
P. W. (2013). An investigation of the comparative behaviour of
P. W. (2013). An investigation of the comparative behavior of
alternative contact force models during inelastic collisions. Powder
Technology, 233, 30-46.

View File

@ -1,5 +1,4 @@
<div role="navigation" aria-label="breadcrumbs navigation">
<div style="text-align: center; margin-bottom: -1.5em; display: block"><b>LAMMPS</b> {{ version }}</div>
<ul class="wy-breadcrumbs">
<li><a href="{{ pathto(master_doc) }}">Docs</a> &raquo;</li>
{% for doc in parents %}
@ -22,7 +21,7 @@
{% endif %}
</li>
</ul>
<hr/>
<hr style="margin-top: 6px; margin-bottom: 6px;" width="100%"/>
{% if next or prev %}
<div class="rst-footer-buttons" style="margin-bottom: 1em" role="navigation" aria-label="footer navigation">
{% if next %}

View File

@ -10,7 +10,7 @@
</div>
{% endif %}
<hr/>
<hr style="margin-top: 6px; margin-bottom: 6px;" width="100%"/>
<div role="contentinfo">
<p>

View File

@ -100,6 +100,8 @@
{% endif %}
</a>
<div class="lammps_version">Version: <b>{{ version }}</b></div>
{% include "searchbox.html" %}
{% endblock %}

View File

@ -4189,8 +4189,7 @@ div[class^='highlight'] pre {
}
}
.wy-affix {
position: fixed;
top: 1.618em;
position: fixed; top: 0.618em;
}
.wy-menu a:hover {
@ -4411,7 +4410,7 @@ div[class^='highlight'] pre {
font-weight: bold;
display: inline-block;
padding: 4px 6px;
margin-bottom: 0.809em;
/*margin-bottom: 0.809em;*/
}
.wy-side-nav-search > a:hover, .wy-side-nav-search .wy-dropdown > a:hover {
background: rgba(255, 255, 255, 0.1);
@ -4540,7 +4539,7 @@ div[class^='highlight'] pre {
}
.wy-nav-content {
padding: 1.618em 3.236em;
padding: 0.5em 1.0em;
height: 100%;
margin: auto;
}
@ -5105,4 +5104,10 @@ span[id*='MathJax-Span'] {
padding: 0;
}
.lammps_version {
text-align: center;
display: block;
margin-bottom: 0.809em;
}
/*# sourceMappingURL=theme.css.map */

View File

@ -202,7 +202,6 @@ bcolor
bdiam
bdw
Beckman
behaviour
Belak
Bellott
benchmarking
@ -1041,6 +1040,7 @@ Gmask
gneb
GNEB
Goldfarb
Gonzalez-Melchor
googlemail
Gordan
GPa
@ -1307,6 +1307,7 @@ Izvekov
izz
Izz
Jacobsen
Jadhav
jagreat
Jalalvand
james
@ -1613,7 +1614,7 @@ Mackay
Mackrodt
Macromolecules
macroparticle
macOS
MacOS
Madura
Magda
Magdeburg
@ -1682,6 +1683,7 @@ maxwell
Maxwellian
maxX
Mayergoyz
Mayoral
mbt
Mbytes
MBytes
@ -1710,6 +1712,7 @@ mediumvioletred
Mees
Mehl
Mei
Melchor
Meloni
Melrose
Mem
@ -2070,6 +2073,7 @@ nucleotides
num
numa
numactl
numdiff
numericalfreedom
numerics
numpy
@ -2283,6 +2287,7 @@ polyA
polybond
polydisperse
polydispersity
polyelectrolyte
polyhedra
popen
Popov
@ -2577,8 +2582,7 @@ Salles
sandia
Sandia
sandybrown
Sanitizer
sanitizers
sanitizer
Sanyal
sc
scafacos
@ -2795,6 +2799,7 @@ superset
supersphere
Supinski
Surblys
surfactant
surfactants
Suter
Sutmann
@ -2857,6 +2862,7 @@ tfmc
tfMC
th
Thakkar
Thaokar
thb
thei
Theodorou
@ -3052,6 +3058,7 @@ uwo
Uzdin
vacf
Vaid
Vaiwala
valent
Valeriu
valgrind
@ -3080,6 +3087,7 @@ Vectorization
vectorized
Vegt
vel
Velázquez
Verlag
verlet
Verlet

View File

@ -1845,7 +1845,7 @@ Translation force removed: ( -0.00000 -0.00000 -0.00000)
Outputing formatted_stress_filename: ./W.vpp2
Outputting formatted_stress_filename: ./W.vpp2
======================

View File

@ -84,7 +84,7 @@ int main(int narg, char **arg)
lmp->input->file(lammps_input);
// make info avaiable to callback function
// make info available to callback function
Info info;
info.me = me;

View File

@ -27,7 +27,7 @@ The real and metal scripts each have a set of variables at the top
which define scale factors for converting quantities like distance,
energy, pressure from reduced LJ units to real or metal units. Once
these are defined the rest of the input script is very similar to the
LJ script. The approprate scale factor is applied to every input.
LJ script. The appropriate scale factor is applied to every input.
Output quantities are printed in both the native real/metal units and
unscaled back to LJ units. So that you can see the outputs are the
same if you examine the log files. Comments about this comparison
@ -49,6 +49,6 @@ identical input script in an alternate set of units. Where
"identical" means it runs the same simulation in a statistical sense.
You can find the full set of scale factors LAMMPS uses internally for
different unit systems it supports, at the top of the src/udpate.cpp
different unit systems it supports, at the top of the src/update.cpp
file. A couple of those values are used in the real and metal
scripts.

View File

@ -68,7 +68,7 @@ elastic:
in.cnt_electrostatic2 - Mechanical response of CNT with self-consistent charge density and electric field
in.cnt_fixed_charge - Mechancial response of CNT with fixed atomic charges in an electric field
in.eam_energy - Quasi-static/quasi-1D coupling and transfer extraction of energy density for EAM gold
in.electron_density - Mechanical response of differnt CNT models with a self-consistent electron density and electric field
in.electron_density - Mechanical response of different CNT models with a self-consistent electron density and electric field
in.electrostatic_bending_dos - Quasi-static bending of a CNT using a quantum density of states model for electron density
in.no_atoms - FE solution of a box subject to an initial displacement condition
in.no_atoms_cb - FE solution of a box subject to an initial displacement condition with a Cauchy-Born material model
@ -149,7 +149,7 @@ elastic:
in.cnt_electrostatic2 - Mechanical response of CNT with self-consistent charge density and electric field
in.cnt_fixed_charge - Mechancial response of CNT with fixed atomic charges in an electric field
in.eam_energy - Quasi-static/quasi-1D coupling and transfer extraction of energy density for EAM gold
in.electron_density - Mechanical response of differnt CNT models with a self-consistent electron density and electric field
in.electron_density - Mechanical response of different CNT models with a self-consistent electron density and electric field
in.electrostatic_bending_dos - Quasi-static bending of a CNT using a quantum density of states model for electron density
in.no_atoms - FE solution of a box subject to an initial displacement condition
in.no_atoms_cb - FE solution of a box subject to an initial displacement condition with a Cauchy-Born material model

View File

@ -85,7 +85,7 @@ fix_modify AtC control localized_lambda on
fix_modify AtC filter type exponential
fix_modify AtC filter scale 1000.0
fix_modify AtC filter on
# ouput commands
# output commands
fix_modify AtC output bar1d_fluidsFE 100 text
#undump D1
#dump D2 all atom 200 dump.bar1d

View File

@ -1,6 +1,6 @@
# simulation of negatively charge liquid argon-positively charged solid/frozen argon
# MAKE this conducting_interface then interface (major difference: non-uniform grid)
# START with extrinsic charges on both and then use an instrinsic charge density for frozen
# START with extrinsic charges on both and then use an intrinsic charge density for frozen
echo both
units real
atom_style full

View File

@ -1,6 +1,6 @@
# simulation of negatively charge liquid argon-positively charged solid/frozen argon
# MAKE this dielectric_interface then interface (major difference: non-uniform grid)
# START with extrinsic charges on both and then use an instrinsic charge density for frozen
# START with extrinsic charges on both and then use an intrinsic charge density for frozen
echo both
units real
atom_style full

View File

@ -75,7 +75,7 @@ fix_modify AtC control localized_lambda on
#fix_modify AtC filter scale 1000.0
#fix_modify AtC filter on
# ouput commands
# output commands
fix_modify AtC output shear_flowFE 100 text #binary
#undump D1
#dump D1 all custom 100 shear_flow.dmp id type xs ys zs vx vy vz

View File

@ -25,7 +25,7 @@ fix_modify AtC reset_time
fix_modify AtC fix velocity y rbc 0.1
fix_modify AtC fix velocity y lbc 0.
# ouput commands
# output commands
fix_modify AtC output shear_no_atomsFE 200 text binary
# set-up non-equilibrium IC
thermo 100

View File

@ -239,7 +239,7 @@ fix_modify AtC output bar1dFE 100 text binary
ATC: Warning : text output can create _LARGE_ files
ATC: output custom names:
# ouput command
# output command
#dump D1 all atom 1000 dump.bar1d
# run with FE
reset_timestep 0

View File

@ -71,7 +71,7 @@ thermo 1
run 100
# set up output, should be before a "run"
fix_modify AtC output bar1dFE 100 text binary
# ouput command
# output command
#dump D1 all atom 1000 dump.bar1d
# run with FE
reset_timestep 0

View File

@ -93,7 +93,7 @@ fix_modify AtC fix_flux temperature lbndy 0.0000000001
fix_modify AtC fix_flux temperature rbndy -0.0000000001
# set up output, should be before a "run"
fix_modify AtC output bar1d_all_atomsFE 200 text binary
# ouput command
# output command
#dump D1 all atom 1000 dump.bar1d
# run with FE
reset_timestep 0

View File

@ -79,7 +79,7 @@ thermo 100
# set up output, should be before a "run"
fix_modify AtC output bar1d_combinedFE 100 text
# ouput command
# output command
#dump D1 all atom 100 dump.bar1d_combined
# run with FE
reset_timestep 0

View File

@ -71,7 +71,7 @@ fix_modify AtC fix temperature rbc 20.
run 100
# set up output, should be before a "run"
fix_modify AtC output bar1d_fluxFE 100 text binary
# ouput command
# output command
#dump D1 all atom 1000 dump.bar1d
# run with FE
reset_timestep 0

View File

@ -72,7 +72,7 @@ fix_modify AtC filter scale 1000.0
fix_modify AtC filter on
# set up output, should be before a "run"
fix_modify AtC output bar1d_frac_stepFE 200 text
# ouput command
# output command
#dump D1 all atom 1000 dump.bar1d
# run with FE
reset_timestep 0

View File

@ -46,7 +46,7 @@ moment of inertia set to the value used in the standalone implementation
of oxDNA (M = I = 1). The masses can be set directly in the input and
data file, whereas the moment of inertia is set via the diameter of the
ellipsoid in the data file and has a value of 3.16227766.
The change of mass and moment of inertia allows direct comparision of
The change of mass and moment of inertia allows direct comparison of
trajectory data or time-dependent observables on a per-timestep basis.
As mentioned above, the stacking and hydrogen-bonding interactions

View File

@ -105,7 +105,7 @@ EXCL_RC2 = 0.335388426126
EXCL_RC3 = 0.52329943261
"""
Define auxillary variables for the construction of a helix
Define auxiliary variables for the construction of a helix
"""
# center of the double strand
COM_CENTRE_DS = POS_BASE + 0.2
@ -127,7 +127,7 @@ number_to_base = {1 : 'A', 2 : 'C', 3 : 'G', 4 : 'T'}
base_to_number = {'A' : 1, 'a' : 1, 'C' : 2, 'c' : 2,
'G' : 3, 'g' : 3, 'T' : 4, 't' : 4}
# auxillary arrays
# auxiliary arrays
positions = []
a1s = []
a3s = []
@ -373,7 +373,7 @@ def generate_strand(bp, sequence=None, start_pos=np.array([0, 0, 0]), \
# if not provided switch off random orientation
if perp is None or perp is False:
v1 = np.random.random_sample(3)
# comment in to suppress randomised base vector
# comment in to suppress randomized base vector
v1 = [1,0,0]
v1 -= dir * (np.dot(dir, v1))
v1 /= np.sqrt(sum(v1*v1))
@ -551,7 +551,7 @@ def read_strands(filename):
smallest_n_bases = n_g
if smallest_n_bases < N_BASE_TYPES:
print('## Not enough occurances of base types in the sequence for ' + str(N_BASE_TYPES))
print('## Not enough occurrences of base types in the sequence for ' + str(N_BASE_TYPES))
print('## unique base types, switching to ' + str(smallest_n_bases) + ' unique types')
else:
smallest_n_bases = N_BASE_TYPES
@ -644,12 +644,12 @@ def read_strands(filename):
# generate random position of the first nucleotide
com = box_offset + np.random.random_sample(3) * box
# comment out to randomise
# comment out to randomize
com = [0,0,0]
# generate the random direction of the helix
axis = np.random.random_sample(3)
# comment out to randomise
# comment out to randomize
axis = [0,0,1]
axis /= np.sqrt(np.dot(axis, axis))
@ -702,12 +702,12 @@ def read_strands(filename):
# generate random position of the first nucleotide
com = box_offset + np.random.random_sample(3) * box
# comment out to randomise
# comment out to randomize
com = [-30,0,0]
# generate the random direction of the helix
axis = np.random.random_sample(3)
# comment out to randomise
# comment out to randomize
axis = [0,0,1]
axis /= np.sqrt(np.dot(axis, axis))

View File

@ -81,7 +81,7 @@ EXCL_RC2 = 0.335388426126
EXCL_RC3 = 0.52329943261
"""
Define auxillary variables for the construction of a helix
Define auxiliary variables for the construction of a helix
"""
# center of the double strand
CM_CENTER_DS = POS_BASE + 0.2
@ -103,7 +103,7 @@ number_to_base = {1 : 'A', 2 : 'C', 3 : 'G', 4 : 'T'}
base_to_number = {'A' : 1, 'a' : 1, 'C' : 2, 'c' : 2,
'G' : 3, 'g' : 3, 'T' : 4, 't' : 4}
# auxillary arrays
# auxiliary arrays
positions = []
a1s = []
a3s = []

View File

@ -1,4 +1,4 @@
This is a simple example of showing the computation of virutal x-ray
This is a simple example of showing the computation of virtual x-ray
and electron diffraction patterns for Ni.
In addition to the LAMMPS output, a simple visualizaiton of the electron

View File

@ -1,2 +1,2 @@
Shows the formation of lithium dendrites during the minimization of a volume expanded lithium cell with particle positions remaped to fit the cell.
Shows the formation of lithium dendrites during the minimization of a volume expanded lithium cell with particle positions remapped to fit the cell.
This depicts the process of electrode replating in lithium batteries, which leads to failure (short-circuit).

View File

@ -1,5 +1,5 @@
#===========================================================================#
# Sytem of 2 pairs of rigid particles moving towards one another. #
# System of 2 pairs of rigid particles moving towards one another. #
# At each timestep, the hydrodynamic force acting on one of these four #
# rigid particles is printed to the screen. #
# #

View File

@ -1,5 +1,5 @@
#===========================================================================#
# Sytem of 2 pairs of rigid particles moving towards one another. #
# System of 2 pairs of rigid particles moving towards one another. #
# At each timestep, the hydrodynamic force acting on one of these four #
# rigid particles is printed to the screen. #
# #

View File

@ -47,7 +47,7 @@ set object 1 rectangle from graph 0,0 to graph 1,1 fillcolor rgb "white" behind
unset key
set grid front
set title 'Short time behaviour' offset 0,-0.8
set title 'Short time behavior' offset 0,-0.8
set ylabel ''
set xrange[0:10]
set yrange[0:40]

View File

@ -5,7 +5,7 @@ Here one may find simple examples showing how "fix wall/ess" and "fix wall/regio
This input uses "Data_region" to setup a system of three particles colliding with a
cubic region which its walls interact with particle with EES potential. To find out details
of how to set parameters of "fix wall/region/ees" see documentaion.
of how to set parameters of "fix wall/region/ees" see documentation.
--in.fix_wall

View File

@ -15,7 +15,7 @@ Averages of the potential energy (#3 and #4) agree although #4 (HMA) is more pre
Averages of the pressure (#5 and #6) agree once the ideal gas
contribution is included; #6 (HMA) is more precise.
The heat capacity can be computed from colume #3 (convential) as
The heat capacity can be computed from colume #3 (conventional) as
Cv = Var(#3)/(k T^2)
With HMA, the heat capacity can be computed from column #4 and #7 as

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,60 @@
# Bulk polyelectrolyte as described in section IV of J. Chem. Phys. 125, 224107 (2006)
boundary p p p
units lj
atom_style charge
region my_sim_box block 0.0 10.0 0.0 10.0 0.0 10.0
create_box 3 my_sim_box
create_atoms 1 random 2804 100 my_sim_box
create_atoms 2 random 98 200 my_sim_box
create_atoms 3 random 98 300 my_sim_box
set type 2 charge -1.0
set type 3 charge 1.0
comm_modify mode single vel yes
mass 1 1.0
mass 2 1.0
mass 3 1.0
pair_style hybrid/overlay dpd 1.0 1.0 245455 coul/slater/long 0.929 3.0
pair_coeff * * dpd 25.0 4.5
pair_coeff * * coul/slater/long
kspace_style ewald 0.00001
dielectric 1.0
neighbor 2.0 bin
neigh_modify every 1 delay 0 check no once no
timestep 0.02
fix 2 all nve
thermo 10
thermo_style custom step spcpu temp press etotal pe ke ecoul elong evdwl
thermo_modify line one
run 100000
write_data data.after_equilibration
compute RDF_1_1 all rdf 50 1 1 cutoff 3.0
compute RDF_1_2 all rdf 50 1 2 cutoff 3.0
compute RDF_1_3 all rdf 50 1 3 cutoff 3.0
compute RDF_2_2 all rdf 50 2 2 cutoff 3.0
compute RDF_2_3 all rdf 50 2 3 cutoff 3.0
compute RDF_3_3 all rdf 50 3 3 cutoff 3.0
fix 11 all ave/time 50 1 50 c_RDF_1_1[*] file tmp_1_1.rdf mode vector
fix 12 all ave/time 50 1 50 c_RDF_1_2[*] file tmp_1_2.rdf mode vector
fix 13 all ave/time 50 1 50 c_RDF_1_3[*] file tmp_1_3.rdf mode vector
fix 14 all ave/time 50 1 50 c_RDF_2_2[*] file tmp_2_2.rdf mode vector
fix 15 all ave/time 50 1 50 c_RDF_2_3[*] file tmp_2_3.rdf mode vector
fix 16 all ave/time 50 1 50 c_RDF_3_3[*] file tmp_3_3.rdf mode vector
run 10000
write_data data.after_production_run

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -48,7 +48,7 @@ PLUMED: [1] The PLUMED consortium, Nat. Methods 16, 670 (2019)
PLUMED: [2] Tribello, Bonomi, Branduardi, Camilloni, and Bussi, Comput. Phys. Commun. 185, 604 (2014)
PLUMED: Please read and cite where appropriate!
PLUMED: Finished setup
PLUMED: Cycles Total Average Minumum Maximum
PLUMED: Cycles Total Average Minimum Maximum
PLUMED: 1 0.010018 0.010018 0.010018 0.010018
PLUMED: 1 Prepare dependencies 102 0.000241 0.000002 0.000001 0.000003
PLUMED: 2 Sharing data 102 0.002132 0.000021 0.000006 0.000151

View File

@ -48,7 +48,7 @@ neigh_modify every 10 delay 0 check no
## This part equilibrates liquid methane to a temperature of ${temperature}(unit temperatureture) with quantum nuclear effects
#Initilization
#Initialization
velocity all create ${temperature} 93 dist gaussian sum no mom yes rot yes loop all
#Setup output

View File

@ -54,7 +54,7 @@ neigh_modify every 10 delay 0 check no
## This part equilibrates liquid methane to a temperature of ${temperature}(unit temperatureture) with quantum nuclear effects
#Initilization
#Initialization
velocity all create ${temperature} 93 dist gaussian sum no mom yes rot yes loop all
#Setup output

View File

@ -17,7 +17,7 @@ pair_style hybrid/overlay lj/cut 8.0 quip
special_bonds lj/coul 0.999999999 0.999999999 0.999999999
# Intermolecular: OPLS (JACS 118 (45), p. 11225 (1996))
# Coulomb interactions ommitted for simplicity
# Coulomb interactions omitted for simplicity
pair_coeff 1 1 lj/cut 0.0028619844 3.5 # CT
pair_coeff 2 2 lj/cut 0.0013009018 2.5 # HC
pair_coeff 1 2 lj/cut 0.0019295487 2.95

View File

@ -39,7 +39,7 @@ special_bonds lj/coul 0.999999999 0.999999999 0.999999999
4 = max # of special neighbors
# Intermolecular: OPLS (JACS 118 (45), p. 11225 (1996))
# Coulomb interactions ommitted for simplicity
# Coulomb interactions omitted for simplicity
pair_coeff 1 1 lj/cut 0.0028619844 3.5 # CT
pair_coeff 2 2 lj/cut 0.0013009018 2.5 # HC
pair_coeff 1 2 lj/cut 0.0019295487 2.95

View File

@ -39,7 +39,7 @@ special_bonds lj/coul 0.999999999 0.999999999 0.999999999
4 = max # of special neighbors
# Intermolecular: OPLS (JACS 118 (45), p. 11225 (1996))
# Coulomb interactions ommitted for simplicity
# Coulomb interactions omitted for simplicity
pair_coeff 1 1 lj/cut 0.0028619844 3.5 # CT
pair_coeff 2 2 lj/cut 0.0013009018 2.5 # HC
pair_coeff 1 2 lj/cut 0.0019295487 2.95

View File

@ -2,7 +2,7 @@
#
# TLSPH example: elongate a 2d strip of aluminum py pulling its ends apart
#
# unit sytem: GPa / mm / ms
# unit system: GPa / mm / ms
#
####################################################################################################
@ -18,7 +18,7 @@ variable q2 equal 0.0 # standard artificial viscosity quadratic coeffici
variable hg equal 10.0 # hourglass control coefficient
variable cp equal 1.0 # heat capacity of material -- not used here
variable JC_A equal 0.3241 # Johnson Cook arameters
variable JC_A equal 0.3241 # Johnson Cook parameters
variable JC_B equal 0.1138
variable JC_N equal 0.42
variable JC_C equal 0 #0.002

View File

@ -4,7 +4,7 @@
#
# A column of water is placed in a container and allowed to collapse unter the
# influence of gravity. Several solid objects are also placed in the container.
# The water flow pushes the solid objects around until the sytem comes to halt due to
# The water flow pushes the solid objects around until the system comes to halt due to
# viscous damping. The solid objects have a lower mass density than water and finally float on
# the water surface.
#
@ -12,7 +12,7 @@
# Total Lagrangian formalism. Contact forces between container, solid bodies, and water prevent
# mutual penetration of these physical entities.
#
# unit sytem: GPa / mm / ms
# unit system: GPa / mm / ms
#
####################################################################################################

View File

@ -5,7 +5,7 @@
# The boundary dump file (see below) can be converted into VTK format using the conversion
# tool dump2vtk_tris from the tools/smd directory.
#
# unit sytem: GPa / mm / ms
# unit system: GPa / mm / ms
#
####################################################################################################

View File

@ -3,7 +3,7 @@
#
# TLSPH example: Two rubber rings impact each other.
#
# unit sytem: GPa / mm / ms
# unit system: GPa / mm / ms
#
####################################################################################################

View File

@ -2,7 +2,7 @@
#
# TLSPH example: elongate a 2d strip of a linear elastic material py pulling its ends apart
#
# unit sytem: GPa / mm / ms
# unit system: GPa / mm / ms
#
####################################################################################################

View File

@ -37,7 +37,7 @@ group hyd type 2
compute epa oxy group/group hyd pair yes kspace no boundary no
# tally pairwise energy between all oygen and all hydrogen
compute c1 oxy pe/tally hyd
# tally pairwise energy beween all atoms to compare with globals
# tally pairwise energy between all atoms to compare with globals
compute c2 all pe/tally all
# collect per atom energies
compute c3 all pe/atom pair

View File

@ -89,7 +89,7 @@ group hyd type 2
compute epa oxy group/group hyd pair yes kspace no boundary no
# tally pairwise energy between all oygen and all hydrogen
compute c1 oxy pe/tally hyd
# tally pairwise energy beween all atoms to compare with globals
# tally pairwise energy between all atoms to compare with globals
compute c2 all pe/tally all
# collect per atom energies
compute c3 all pe/atom pair

View File

@ -89,7 +89,7 @@ group hyd type 2
compute epa oxy group/group hyd pair yes kspace no boundary no
# tally pairwise energy between all oygen and all hydrogen
compute c1 oxy pe/tally hyd
# tally pairwise energy beween all atoms to compare with globals
# tally pairwise energy between all atoms to compare with globals
compute c2 all pe/tally all
# collect per atom energies
compute c3 all pe/atom pair

View File

@ -67,7 +67,7 @@ fix myhug all nphug temp 1.0 1.0 10.0 z 40.0 40.0 70.0 drag 0.0 tchain 1 pchain
fix_modify myhug e0 -6334.0 p0 0.0 v0 680.73519
# Add fix energy to ouput etotal
# Add fix energy to output etotal
fix_modify myhug energy yes
@ -115,7 +115,7 @@ fix myhug all nphug temp 1.0 1.0 1.0 z 40.0 40.0 70.0 drag 200.0 tchain 1 pchain
fix_modify myhug e0 -6334.0 p0 0.0 v0 680.73519
# Add fix energy to ouput etotal
# Add fix energy to output etotal
fix_modify myhug energy yes
@ -153,7 +153,7 @@ fix myhug all nphug temp 1.0 1.0 1.0 z 40.0 40.0 70.0
fix_modify myhug e0 -6334.0 p0 0.0 v0 680.73519
# Add fix energy to ouput etotal
# Add fix energy to output etotal
fix_modify myhug energy yes

View File

@ -129,7 +129,7 @@ fix myhug all nphug temp 1.0 1.0 10.0 z 40.0 40.0 70.0 drag 0.0 tchain 1 pchain
fix_modify myhug e0 -6334.0 p0 0.0 v0 680.73519
# Add fix energy to ouput etotal
# Add fix energy to output etotal
fix_modify myhug energy yes
@ -232,7 +232,7 @@ fix myhug all nphug temp 1.0 1.0 1.0 z 40.0 40.0 70.0 drag 200.0 tchain 1 pchain
fix_modify myhug e0 -6334.0 p0 0.0 v0 680.73519
# Add fix energy to ouput etotal
# Add fix energy to output etotal
fix_modify myhug energy yes
@ -327,7 +327,7 @@ fix myhug all nphug temp 1.0 1.0 1.0 z 40.0 40.0 70.0
fix_modify myhug e0 -6334.0 p0 0.0 v0 680.73519
# Add fix energy to ouput etotal
# Add fix energy to output etotal
fix_modify myhug energy yes

View File

@ -129,7 +129,7 @@ fix myhug all nphug temp 1.0 1.0 10.0 z 40.0 40.0 70.0 drag 0.0 tchain 1 pchain
fix_modify myhug e0 -6334.0 p0 0.0 v0 680.73519
# Add fix energy to ouput etotal
# Add fix energy to output etotal
fix_modify myhug energy yes
@ -232,7 +232,7 @@ fix myhug all nphug temp 1.0 1.0 1.0 z 40.0 40.0 70.0 drag 200.0 tchain 1 pchain
fix_modify myhug e0 -6334.0 p0 0.0 v0 680.73519
# Add fix energy to ouput etotal
# Add fix energy to output etotal
fix_modify myhug energy yes
@ -327,7 +327,7 @@ fix myhug all nphug temp 1.0 1.0 1.0 z 40.0 40.0 70.0
fix_modify myhug e0 -6334.0 p0 0.0 v0 680.73519
# Add fix energy to ouput etotal
# Add fix energy to output etotal
fix_modify myhug energy yes

View File

@ -0,0 +1,13 @@
# LAMMPS FIX NUMDIFF EXAMPLE
## Numerical Difference Fix
This directory contains the ingredients to run an NVE simulation using the numerical difference fix and calculate error in forces.
Example:
```
NP=4 #number of processors
mpirun -np $NP lmp_mpi -in.numdiff
```
## Required LAMMPS packages: MOLECULE package

View File

@ -0,0 +1,33 @@
# Numerical difference calculation of error in forces
units metal
atom_style atomic
atom_modify map yes
lattice fcc 5.358000
region box block 0 6 0 6 0 6
create_box 1 box
create_atoms 1 box
mass 1 39.903
velocity all create 10 2357 mom yes dist gaussian
pair_style lj/cubic
pair_coeff * * 0.0102701 3.42
neighbor 1 bin
timestep 0.001
fix numdiff all numdiff 200 0.0001
fix nve all nve
variable errx atom fx-f_numdiff[1]
variable erry atom fy-f_numdiff[2]
variable errz atom fz-f_numdiff[3]
write_dump all custom tmp.error f_numdiff[1] f_numdiff[2] f_numdiff[3]
dump forces all custom 200 force_error.dump v_errx v_erry v_errz
thermo 200
run 2000

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