diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 92d18f2702..13e1d1539f 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -36,7 +36,6 @@ get_lammps_version(${LAMMPS_SOURCE_DIR}/version.h LAMMPS_VERSION) include(PreventInSourceBuilds) if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS) - #release comes with -O3 by default set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE) endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS) string(TOUPPER "${CMAKE_BUILD_TYPE}" BTYPE) @@ -420,7 +419,7 @@ endforeach() ############################################## # add lib sources of (simple) enabled packages ############################################ -foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD USER-QMMM) +foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD) if(PKG_${SIMPLE_LIB}) string(REGEX REPLACE "^USER-" "" PKG_LIB "${SIMPLE_LIB}") string(TOLOWER "${PKG_LIB}" PKG_LIB) @@ -682,7 +681,7 @@ endforeach() get_directory_property(CPPFLAGS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS) include(FeatureSummary) -feature_summary(DESCRIPTION "The following packages have been found:" WHAT PACKAGES_FOUND) +feature_summary(DESCRIPTION "The following tools and libraries have been found and configured:" WHAT PACKAGES_FOUND) message(STATUS "<<< Build configuration >>> Build type ${CMAKE_BUILD_TYPE} Install path ${CMAKE_INSTALL_PREFIX} @@ -702,7 +701,7 @@ if (${_index} GREATER -1) endif() list (FIND LANGUAGES "C" _index) if (${_index} GREATER -1) - message(STATUS "C Compiler ${CMAKE_C_COMPILER} + message(STATUS "C compiler ${CMAKE_C_COMPILER} Type ${CMAKE_C_COMPILER_ID} Version ${CMAKE_C_COMPILER_VERSION} C Flags ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BTYPE}}") @@ -712,22 +711,22 @@ if(CMAKE_EXE_LINKER_FLAGS) Executable ${CMAKE_EXE_LINKER_FLAGS}") endif() if(BUILD_SHARED_LIBS) - message(STATUS "Shared libraries ${CMAKE_SHARED_LINKER_FLAGS}") + message(STATUS "Shared library flags: ${CMAKE_SHARED_LINKER_FLAGS}") else() - message(STATUS "Static libraries ${CMAKE_STATIC_LINKER_FLAGS}") + message(STATUS "Static library flags: ${CMAKE_STATIC_LINKER_FLAGS}") 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 ${MPI_CXX_LIBRARIES}") endif() if(PKG_GPU) - message(STATUS "GPU Api: ${GPU_API}") + message(STATUS "GPU API: ${GPU_API}") if(GPU_API STREQUAL "CUDA") - message(STATUS "GPU Arch: ${GPU_ARCH}") + message(STATUS "GPU architecture: ${GPU_ARCH}") elseif(GPU_API STREQUAL "OPENCL") - message(STATUS "OCL Tune: ${OCL_TUNE}") + message(STATUS "OpenCL parameter tuning: ${OCL_TUNE}") endif() - message(STATUS "GPU Precision: ${GPU_PREC}") + message(STATUS "GPU precision: ${GPU_PREC}") endif() if(PKG_KOKKOS) message(STATUS "Kokkos Arch: ${KOKKOS_ARCH}") diff --git a/cmake/Modules/FindQE.cmake b/cmake/Modules/FindQE.cmake deleted file mode 100644 index 4484bd4db2..0000000000 --- a/cmake/Modules/FindQE.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# - Find quantum-espresso -# Find the native QE headers and libraries. -# -# QE_INCLUDE_DIRS - where to find quantum-espresso.h, etc. -# QE_LIBRARIES - List of libraries when using quantum-espresso. -# QE_FOUND - True if quantum-espresso found. -# - -find_path(QE_INCLUDE_DIR libqecouple.h PATH_SUFFIXES COUPLE/include) - -find_library(QECOUPLE_LIBRARY NAMES qecouple) -find_library(PW_LIBRARY NAMES pw) -find_library(QEMOD_LIBRARY NAMES qemod) -find_library(QEFFT_LIBRARY NAMES qefft) -find_library(QELA_LIBRARY NAMES qela) -find_library(CLIB_LIBRARY NAMES clib) -find_library(IOTK_LIBRARY NAMES iotk) - - -set(QE_LIBRARIES ${QECOUPLE_LIBRARY} ${PW_LIBRARY} ${QEMOD_LIBRARY} ${QEFFT_LIBRARY} ${QELA_LIBRARY} ${CLIB_LIBRARY} ${IOTK_LIBRARY}) -set(QE_INCLUDE_DIRS ${QE_INCLUDE_DIR}) - -include(FindPackageHandleStandardArgs) -# handle the QUIETLY and REQUIRED arguments and set QE_FOUND to TRUE -# if all listed variables are TRUE - -find_package_handle_standard_args(QE DEFAULT_MSG QECOUPLE_LIBRARY PW_LIBRARY QEMOD_LIBRARY QEFFT_LIBRARY QELA_LIBRARY CLIB_LIBRARY IOTK_LIBRARY QE_INCLUDE_DIR) - -mark_as_advanced(QE_INCLUDE_DIR QECOUPLE_LIBRARY PW_LIBRARY QEMOD_LIBRARY QEFFT_LIBRARY QELA_LIBRARY CLIB_LIBRARY IOTK_LIBRARY) diff --git a/cmake/Modules/Packages/USER-QMMM.cmake b/cmake/Modules/Packages/USER-QMMM.cmake index e0ae1a46dc..544455868e 100644 --- a/cmake/Modules/Packages/USER-QMMM.cmake +++ b/cmake/Modules/Packages/USER-QMMM.cmake @@ -1,9 +1,13 @@ if(PKG_USER-QMMM) - enable_language(Fortran) enable_language(C) - message(WARNING "Building QMMM with CMake is still experimental") - find_package(QE REQUIRED) - include_directories(${QE_INCLUDE_DIRS}) - list(APPEND LAMMPS_LINK_LIBS ${QE_LIBRARIES}) + if(NOT BUILD_LIB) + message(FATAL_ERROR "Building a QM/MM executable with USER-QMMM requires BUILD_LIB=yes") + endif() + if(NOT BUILD_SHARED_LIBS) + message(WARNING "It is recommended to use BUILD_SHARED_LIBS=yes with USER-QMMM") + endif() + add_library(qmmm STATIC ${LAMMPS_LIB_SOURCE_DIR}/qmmm/libqmmm.c) + list(APPEND LAMMPS_LINK_LIBS qmmm) + target_include_directories(qmmm PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/qmmm) endif() diff --git a/doc/.gitignore b/doc/.gitignore index ca450f00f9..55b25960db 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,6 +1,8 @@ /old /html +/html-offline /latex +/mathjax /spelling /LAMMPS.epub /LAMMPS.mobi diff --git a/doc/Makefile b/doc/Makefile index 7fba611361..53907f8465 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -4,6 +4,7 @@ SHELL = /bin/bash BUILDDIR = ${CURDIR} RSTDIR = $(BUILDDIR)/src VENV = $(BUILDDIR)/docenv +MATHJAX = $(BUILDDIR)/mathjax TXT2RST = $(VENV)/bin/txt2rst ANCHORCHECK = $(VENV)/bin/rst_anchor_check @@ -28,50 +29,48 @@ endif SPHINXEXTRA = -j $(shell $(PYTHON) -c 'import multiprocessing;print(multiprocessing.cpu_count())') -.PHONY: help clean-all clean epub mobi rst html pdf venv spelling anchor_check style_check +.PHONY: help clean-all clean clean-spelling epub mobi rst html pdf spelling anchor_check style_check # ------------------------------------------ help: @echo "Please use \`make ' where is one of" - @echo " html create HTML doc pages in html dir" - @echo " pdf create Developer.pdf and Manual.pdf in this dir" - @echo " fetch fetch HTML and PDF files from LAMMPS web site" - @echo " epub create ePUB format manual for e-book readers" - @echo " mobi convert ePUB to MOBI format manual for e-book readers (e.g. Kindle)" + @echo " html create HTML doc pages in html dir" + @echo " pdf create Developer.pdf and Manual.pdf in this dir" + @echo " fetch fetch HTML and PDF files from LAMMPS web site" + @echo " epub create ePUB format manual for e-book readers" + @echo " mobi convert ePUB to MOBI format manual for e-book readers (e.g. Kindle)" @echo " (requires ebook-convert tool from calibre)" - @echo " clean remove all intermediate RST files" - @echo " clean-all reset the entire build environment" + @echo " clean remove all intermediate RST files" + @echo " clean-all reset the entire build environment" @echo " anchor_check scan for duplicate anchor labels" @echo " style_check check for complete and consistent style lists" - @echo " spelling spell-check the manual" + @echo " package_check check for complete and consistent package lists" + @echo " spelling spell-check the manual" # ------------------------------------------ clean-all: clean - rm -rf $(BUILDDIR)/docenv $(BUILDDIR)/doctrees + rm -rf $(BUILDDIR)/docenv $(BUILDDIR)/doctrees $(BUILDDIR)/mathjax -clean: +clean: clean-spelling rm -rf html epub latex - rm -rf spelling clean-spelling: rm -rf spelling -rst: clean $(ANCHORCHECK) - -html: $(ANCHORCHECK) +html: $(ANCHORCHECK) $(MATHJAX) @(\ . $(VENV)/bin/activate ;\ sphinx-build $(SPHINXEXTRA) -b html -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) html ;\ echo "############################################" ;\ rst_anchor_check src/*.rst ;\ + python utils/check-packages.py -s ../src -d src ;\ env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\ python utils/check-styles.py -s ../src -d src ;\ echo "############################################" ;\ deactivate ;\ ) - -rm html/searchindex.js @rm -rf html/_sources @rm -rf html/PDF @rm -rf html/USER @@ -84,9 +83,11 @@ html: $(ANCHORCHECK) @rm -rf html/USER/.[sg]* @rm -rf html/USER/*/.[sg]* @rm -rf html/USER/*/*.[sg]* + @mkdir -p html/_static/mathjax + @cp -r $(MATHJAX)/es5 html/_static/mathjax/ @echo "Build finished. The HTML pages are in doc/html." -spelling: utils/sphinx-config/false_positives.txt +spelling: $(VENV) utils/sphinx-config/false_positives.txt @(\ . $(VENV)/bin/activate ;\ pip install sphinxcontrib-spelling ;\ @@ -96,7 +97,7 @@ spelling: utils/sphinx-config/false_positives.txt ) @echo "Spell check finished." -epub: +epub: $(VENV) @mkdir -p epub/JPG @rm -f LAMMPS.epub @cp src/JPG/lammps-logo.png epub/ @@ -128,6 +129,7 @@ pdf: $(ANCHORCHECK) sphinx-build $(SPHINXEXTRA) -b latex -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) latex ;\ echo "############################################" ;\ rst_anchor_check src/*.rst ;\ + python utils/check-packages.py -s ../src -d src ;\ env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\ python utils/check-styles.py -s ../src -d src ;\ echo "############################################" ;\ @@ -171,13 +173,20 @@ anchor_check : $(ANCHORCHECK) deactivate ;\ ) -style_check : +style_check : $(VENV) @(\ . $(VENV)/bin/activate ;\ python utils/check-styles.py -s ../src -d src ;\ deactivate ;\ ) +package_check : $(VENV) + @(\ + . $(VENV)/bin/activate ;\ + python utils/check-packages.py -s ../src -d src ;\ + deactivate ;\ + ) + # ------------------------------------------ $(VENV): @@ -190,6 +199,9 @@ $(VENV): deactivate;\ ) +$(MATHJAX): + @git clone --depth 1 https://github.com/mathjax/MathJax.git mathjax + $(TXT2RST) $(ANCHORCHECK): $(VENV) @( \ . $(VENV)/bin/activate; \ diff --git a/doc/src/Build_basics.rst b/doc/src/Build_basics.rst index 832b6c3f02..4788d93689 100644 --- a/doc/src/Build_basics.rst +++ b/doc/src/Build_basics.rst @@ -19,94 +19,115 @@ CMake and make: Serial vs parallel build ------------------------------------- -LAMMPS can be built to run in parallel using the ubiquitous `MPI (message-passing interface) `_ -library. Or it can built to run on a single processor (serial) -without MPI. It can also be built with support for OpenMP threading -(see more discussion below). +LAMMPS is written to use the ubiquitous `MPI (Message Passing Interface) +`_ library API +for distributed memory parallel computation. You need to have such a +library installed for building and running LAMMPS in parallel using a +domain decomposition parallelization. It is compatible with the MPI +standard version 2.x and later. LAMMPS can also be built into a +"serial" executable for use with a single processor using the bundled +MPI STUBS library. -**CMake variables**\ : +Independent of the distributed memory MPI parallelization, parts of +LAMMPS are also written with support for shared memory parallelization +using the OpenMP threading standard. A more detailed discussion of that +is below. +**CMake build**\ : -.. parsed-literal:: +.. code-block:: bash -D BUILD_MPI=value # yes or no, default is yes if CMake finds MPI, else no - -D BUILD_OMP=value # yes or no (default) + -D BUILD_OMP=value # yes or no, default is yes if a compatible compiler is detected -D LAMMPS_MACHINE=name # name = mpi, serial, mybox, titan, laptop, etc # no default value -The executable created by CMake (after running make) is lmp\_name. If -the LAMMPS\_MACHINE variable is not specified, the executable is just -lmp. Using BUILD\_MPI=no will produce a serial executable. +The executable created by CMake (after running make) is named *lmp* unless +the LAMMPS\_MACHINE option is set. When setting `LAMMPS_MACHINE=name` +the executable will be named *lmp\_name*\. Using `BUILD\_MPI=no` will +enforce building a serial executable using the MPI STUBS library. **Traditional make**\ : +The build with traditional makefiles has to be done inside the source folder `src`. -.. parsed-literal:: +.. code-block:: bash - cd lammps/src make mpi # parallel build, produces lmp_mpi using Makefile.mpi make serial # serial build, produces lmp_serial using Makefile/serial - make mybox # uses Makefile.mybox to produce lmp_mybox - -Serial build (see src/MAKE/Makefile.serial): + make mybox # uses Makefile.mybox to produce lmp_mybox -.. parsed-literal:: +Any "make machine" command will look up the make settings from a file +Makefile.machine, create a folder Obj\_machine with all objects and +generated files and an executable called *lmp\_machine*\ . The standard +parallel build with `make mpi` assumes a standard MPI installation with +MPI compiler wrappers where all necessary compiler and linker flags to +get access and link with the suitable MPI headers and libraries are set +by the wrapper programs. For other cases or the serial build, you have +to adjust the make file variables MPI\_INC, MPI\_PATH, MPI\_LIB as well +as CC and LINK. To enable OpenMP threading usually a compiler specific +flag needs to be added to the compile and link commands. For the GNU +compilers, this is *-fopenmp*\ , which can be added to the CC and LINK +makefile variables. +For the serial build the following make variables are set (see src/MAKE/Makefile.serial): + +.. code-block:: make + + CC = g++ + LINK = g++ MPI_INC = -I../STUBS MPI_PATH = -L../STUBS MPI_LIB = -lmpi_stubs -For a parallel build, if MPI is installed on your system in the usual -place (e.g. under /usr/local), you do not need to specify the 3 -variables MPI\_INC, MPI\_PATH, MPI\_LIB. The MPI wrapper on the compiler -(e.g. mpicxx, mpiCC) knows where to find the needed include and -library files. Failing this, these 3 variables can be used to specify -where the mpi.h file (MPI\_INC), and the MPI library files (MPI\_PATH) -are found, and the name of the library files (MPI\_LIB). +You also need to build the STUBS library for your platform before making +LAMMPS itself. A "make serial" build does this for you automatically, +otherwise, type "make mpi-stubs" from the src directory, or "make" from +the src/STUBS dir. If the build fails, you will need to edit the +STUBS/Makefile for your platform. The stubs library does not provide +MPI/IO functions required by some LAMMPS packages, e.g. MPIIO or USER-LB, +and thus is not compatible with those packages. -For a serial build, you need to specify the 3 variables, as shown -above. +.. note:: -For a serial LAMMPS build, use the dummy MPI library provided in -src/STUBS. You also need to build the STUBS library for your platform -before making LAMMPS itself. A "make serial" build does this for. -Otherwise, type "make mpi-stubs" from the src directory, or "make" -from the src/STUBS dir. If the build fails, you will need to edit the -STUBS/Makefile for your platform. + The file STUBS/mpi.c provides a CPU timer function called + MPI\_Wtime() that calls gettimeofday() . If your operating system + does not support gettimeofday() , you will need to insert code to + call another timer. Note that the ANSI-standard function clock() + rolls over after an hour or so, and is therefore insufficient for + timing long LAMMPS simulations. -The file STUBS/mpi.c provides a CPU timer function called MPI\_Wtime() -that calls gettimeofday() . If your system doesn't support -gettimeofday() , you'll need to insert code to call another timer. -Note that the ANSI-standard function clock() rolls over after an hour -or so, and is therefore insufficient for timing long LAMMPS -simulations. +**MPI and OpenMP support info**\ : -**CMake and make info**\ : +If you are installing MPI yourself to build a parallel LAMMPS +executable, we recommend either MPICH or OpenMPI which are regularly +used and tested with LAMMPS by the LAMMPS developers. MPICH can be +downloaded from the `MPICH home page `_ and +OpenMPI can be downloaded correspondingly from the `OpenMPI home page +`_. Other MPI packages should also work. No +specific vendor provided and standard compliant MPI library is currently +known to be incompatible with LAMMPS. If you are running on a large +parallel machine, your system admins or the vendor should have already +installed a version of MPI, which is likely to be faster than a +self-installed MPICH or OpenMPI, so you should study the provided +documentation to find out how to build and link with it. -If you are installing MPI yourself, we recommend MPICH2 from Argonne -National Laboratory or OpenMPI. MPICH can be downloaded from the -`Argonne MPI site `_. -OpenMPI can be downloaded from the `OpenMPI site `_. Other MPI packages should also work. -If you are running on a large parallel machine, your system admins or -the vendor should have already installed a version of MPI, which is -likely to be faster than a self-installed MPICH or OpenMPI, so find -out how to build and link with it. - -The majority of OpenMP (threading) support in LAMMPS is provided by -the USER-OMP package; see the :doc:`Speed omp ` doc page for -details. The USER-INTEL package also provides OpenMP support (it is +The majority of OpenMP (threading) support in LAMMPS is provided by the +USER-OMP package; see the :doc:`Speed omp ` doc page for +details. The USER-INTEL package also includes OpenMP threading (it is compatible with USER-OMP) and adds vectorization support when compiled -with the Intel compilers on top of that. Also, the KOKKOS package can -be compiled for using OpenMP threading. +with compatible compilers, in particular the Intel compilers on top of +OpenMP. Also, the KOKKOS package can be compiled to include OpenMP +threading. -However, there are a few commands in LAMMPS that have native OpenMP -support. These are commands in the MPIIO, SNAP, USER-DIFFRACTION, and -USER-DPD packages. In addition some packages support OpenMP threading -indirectly through the libraries they interface to: e.g. LATTE and -USER-COLVARS. See the :doc:`Packages details ` doc -page for more info on these packages and the doc pages for their -respective commands for OpenMP threading info. +In addition, there are a few commands in LAMMPS that have native OpenMP +support included as well. These are commands in the MPIIO, SNAP, +USER-DIFFRACTION, and USER-DPD packages. In addition some packages +support OpenMP threading indirectly through the libraries they interface +to: e.g. LATTE and USER-COLVARS. See the :doc:`Packages details +` doc page for more info on these packages and the doc +pages for their respective commands for OpenMP threading info. For CMake, if you use BUILD\_OMP=yes, you can use these packages and turn on their native OpenMP support and turn on their native OpenMP @@ -143,22 +164,37 @@ Choice of compiler and compile/link options --------------------------------------------------------- The choice of compiler and compiler flags can be important for -performance. Vendor compilers can produce faster code than -open-source compilers like GNU. On boxes with Intel CPUs, we suggest -trying the `Intel C++ compiler `_. +performance. Vendor provided compilers for a specific hardware can +produce faster code than open-source compilers like the GNU compilers. +On x86 hardware most popular compilers are quite similar in performance +of C/C++ code at high optimization levels. When using the USER-INTEL +package, there is a distinct advantage in using the `Intel C++ compiler +`_ due to much improved vectorization through SSE and AVX +instructions on compatible hardware as the source code includes changes +and compiler directives to enable high degrees of vectorization. .. _intel: https://software.intel.com/en-us/intel-compilers +On parallel clusters or supercomputers which use "environment modules" +for their compile/link environments, you can often access different +compilers by simply loading the appropriate module before building +LAMMPS. +**CMake build**\ : -On parallel clusters or supercomputers which use "modules" for their -compile/link environments, you can often access different compilers by -simply loading the appropriate module before building LAMMPS. +By default CMake will use a compiler it finds and it will add +optimization flags appropriate to that compiler and any +:doc:`accelerator packages ` you have included in the +build. -**CMake variables**\ : +You can tell CMake to look for a specific compiler with these variable +settings. Likewise you can specify the FLAGS variables if you want to +experiment with alternate optimization flags. You should specify all +3 compilers, so that the small number of LAMMPS source files written +in C or Fortran are built with a compiler consistent with the one used +for all the C++ files: - -.. parsed-literal:: +.. code-block:: bash -D CMAKE_CXX_COMPILER=name # name of C++ compiler -D CMAKE_C_COMPILER=name # name of C compiler @@ -168,42 +204,42 @@ simply loading the appropriate module before building LAMMPS. -D CMAKE_C_FLAGS=string # flags to use with C compiler -D CMAKE_Fortran_FLAGS=string # flags to use with Fortran compiler -By default CMake will use a compiler it finds and it will add -optimization flags appropriate to that compiler and any :doc:`accelerator packages ` you have included in the build. -You can tell CMake to look for a specific compiler with these variable -settings. Likewise you can specify the FLAGS variables if you want to -experiment with alternate optimization flags. You should specify all -3 compilers, so that the small number of LAMMPS source files written -in C or Fortran are built with a compiler consistent with the one used -for all the C++ files: +A few example command lines are: +.. code-block:: bash -.. parsed-literal:: - - Building with GNU Compilers: + # Building with GNU Compilers: cmake ../cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_Fortran_COMPILER=gfortran - Building with Intel Compilers: + # Building with Intel Compilers: cmake ../cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc -DCMAKE_Fortran_COMPILER=ifort - Building with LLVM/Clang Compilers: + # Building with LLVM/Clang Compilers: cmake ../cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_Fortran_COMPILER=flang +For compiling with the Clang/LLVM compilers a special CMake preset is +included that can be loaded with `-C ../cmake/presets/clang.cmake`. + .. note:: - When the cmake command completes, it prints info to the screen - as to which compilers it is using, and what flags will be used in the - compilation. Note that if the top-level compiler is mpicxx, it is - simply a wrapper on a real compiler. The underlying compiler info is - what will be listed in the CMake output. You should check to insure - you are using the compiler and optimization flags are the ones you - want. + When the cmake command completes, it prints a summary to the screen + which compilers it is using and what flags and settings will be used + for the compilation. Note that if the top-level compiler is mpicxx, + it is simply a wrapper on a real compiler. The underlying compiler + info is what CMake will try to determine and report. You should check + to confirm you are using the compiler and optimization flags you want. -**Makefile.machine settings**\ : +**Makefile.machine settings for traditional make**\ : + +The "compiler/linker settings" section of a Makefile.machine lists +compiler and linker settings for your C++ compiler, including +optimization flags. For a parallel build it is recommended to use +mpicxx or mpiCC, since these compiler wrappers will include a variety of +settings appropriate for your MPI installation and thus avoiding the +guesswork of finding the right flags. Parallel build (see src/MAKE/Makefile.mpi): - -.. parsed-literal:: +.. code-block:: bash CC = mpicxx CCFLAGS = -g -O3 @@ -212,33 +248,26 @@ Parallel build (see src/MAKE/Makefile.mpi): Serial build (see src/MAKE/Makefile.serial): - -.. parsed-literal:: +.. code-block:: make CC = g++ CCFLAGS = -g -O3 LINK = g++ LINKFLAGS = -g -O -The "compiler/linker settings" section of a Makefile.machine lists -compiler and linker settings for your C++ compiler, including -optimization flags. You should always use mpicxx or mpiCC for -a parallel build, since these compiler wrappers will include -a variety of settings appropriate for your MPI installation. - .. note:: - If you build LAMMPS with any :doc:`accelerator packages ` included, they have specific - optimization flags that are either required or recommended for optimal - performance. You need to include these in the CCFLAGS and LINKFLAGS - settings above. For details, see the individual package doc pages - listed on the :doc:`Speed packages ` doc page. Or - examine these files in the src/MAKE/OPTIONS directory. They - correspond to each of the 5 accelerator packages and their hardware - variants: + If you build LAMMPS with any :doc:`accelerator packages ` + included, there may be specific optimization flags that are either + required or recommended to enable required features and to achieve + optimal performance. You need to include these in the CCFLAGS and + LINKFLAGS settings above. For details, see the individual package + doc pages listed on the :doc:`Speed packages ` doc + page. Or examine these files in the src/MAKE/OPTIONS directory. + They correspond to each of the 5 accelerator packages and their + hardware variants: - -.. parsed-literal:: +.. code-block:: bash Makefile.opt # OPT package Makefile.omp # USER-OMP package @@ -249,10 +278,8 @@ a variety of settings appropriate for your MPI installation. Makefile.kokkos_omp # KOKKOS package for CPUs (OpenMP) Makefile.kokkos_phi # KOKKOS package for KNLs (OpenMP) - ---------- - .. _exe: Build LAMMPS as an executable or a library @@ -265,10 +292,13 @@ page for more info on coupling LAMMPS to other codes. See the :doc:`Python ` doc page for more info on wrapping and running LAMMPS from Python via its library interface. -**CMake variables**\ : +**CMake build**\ : +For CMake builds, you can select through setting CMake variables which +files the compilation produces during the configuration step. If none +are set, defaults are applied. -.. parsed-literal:: +.. code-block:: bash -D BUILD_EXE=value # yes (default) or no -D BUILD_LIB=value # yes or no (default) @@ -277,24 +307,32 @@ running LAMMPS from Python via its library interface. # no default value Setting BUILD\_EXE=no will not produce an executable. Setting -BUILD\_LIB=yes will produce a static library named liblammps.a. +BUILD\_LIB=yes will produce a static library named *liblammps.a*\ . Setting both BUILD\_LIB=yes and BUILD\_SHARED\_LIBS=yes will produce a -shared library named liblammps.so. If LAMMPS\_LIB\_SUFFIX is set the generated -libraries will be named liblammps\_name.a or liblammps\_name.so instead. +shared library named *liblammps.so* instead. If LAMMPS\_LIB\_SUFFIX is +set to *name* in addition, the name of the generated libraries will be +changed to either *liblammps\_name.a* or *liblammps\_name.so*\ , +respectively. **Traditional make**\ : +With the traditional makefile based build process, the choice of +the generated executable or library depends on the "mode" setting. +Several options are available and "mode=exe" is the default. -.. parsed-literal:: +.. code-block:: bash - cd lammps/src make machine # build LAMMPS executable lmp_machine + mkae mode=exe machine # same as "make machine" make mode=lib machine # build LAMMPS static lib liblammps_machine.a make mode=shlib machine # build LAMMPS shared lib liblammps_machine.so + make mode=shexe machine # same as "mode=exe" but uses objects from "mode=shlib" -The two library builds also create generic soft links, named -liblammps.a and liblammps.so, which point to the liblammps\_machine -files. +The two "exe" builds will generate and executable *lmp\_machine*\ , +while the two library builds will create a file *liblammps\_machine.a* +or *liblammps\_machine.so*\ . They will also create generic soft links, +named *liblammps.a* and *liblammps.so*\ , which point to the specific +*liblammps\_machine.a/so* files. **CMake and make info**\ : @@ -302,32 +340,40 @@ Note that for a shared library to be usable by a calling program, all the auxiliary libraries it depends on must also exist as shared libraries. This will be the case for libraries included with LAMMPS, such as the dummy MPI library in src/STUBS or any package libraries in -the lib/packages directory, since they are always built as shared -libraries using the -fPIC switch. However, if a library like MPI or -FFTW does not exist as a shared library, the shared library build will -generate an error. This means you will need to install a shared -library version of the auxiliary library. The build instructions for -the library should tell you how to do this. - -As an example, here is how to build and install the `MPICH library `_, a popular open-source version of MPI, distributed by -Argonne National Lab, as a shared library in the default -/usr/local/lib location: - -.. _mpich: http://www-unix.mcs.anl.gov/mpi +the lib/packages directory, since they are always built in a shared +library compatible way using the -fPIC switch. However, if a library +like MPI or FFTW does not exist as a shared library, the shared library +build may generate an error. This means you will need to install a +shared library version of the auxiliary library. The build instructions +for the library should tell you how to do this. +As an example, here is how to build and install the `MPICH library +`_, a popular open-source version of MPI, as a shared library +in the default /usr/local/lib location: +.. _mpich: https://www.mpich.org -.. parsed-literal:: +.. code-block:: bash ./configure --enable-shared make make install -You may need to use "sudo make install" in place of the last line if -you do not have write privileges for /usr/local/lib. The end result -should be the file /usr/local/lib/libmpich.so. +You may need to use "sudo make install" in place of the last line if you +do not have write privileges for /usr/local/lib. The end result should +be the file /usr/local/lib/libmpich.so. On many Linux installations the +folder "${HOME}/.local" is an alternative to using /usr/local and does +not require superuser or sudo access. In that case the configuration +step becomes: +.. code-block:: bash + + ./configure --enable-shared --prefix=${HOME}/.local + +Avoiding using "sudo" for custom software installation (i.e. from source +and not through a package manager tool provided by the OS) is generally +recommended to ensure the integrity of the system software installation. ---------- @@ -337,30 +383,39 @@ should be the file /usr/local/lib/libmpich.so. Build the LAMMPS documentation ---------------------------------------- -**CMake variable**\ : +The LAMMPS manual is written in `reStructuredText `_ format which +can be translated to different output format using the `Sphinx `_ +document generator tool. Currently the translation to HTML and PDF (via +LaTeX) are supported. For that to work a Python 3 interpreter and +internet access is required. For the documentation build a python +based virtual environment is set up in the folder doc/docenv and various +python packages are installed into that virtual environment via the pip +tool. The actual translation is then done via make commands. + +.. _rst: https://docutils.readthedocs.io/en/sphinx-docs/user/rst/quickstart.html +.. _sphinx: https://sphinx-doc.org + +**Documentation make option**\ : + +The following make commands can be issued in the doc folder of the +LAMMPS source distribution. + +.. code-block:: bash + + make html # create HTML doc pages in html directory + make pdf # create Developer.pdf and Manual.pdf in this directory + make fetch # fetch HTML and PDF files from LAMMPS web site + make clean # remove all intermediate files + make clean-all # reset the entire doc build environment + make anchor_check # scan for duplicate anchor labels + make style_check # check for complete and consistent style lists + make package_check # check for complete and consistent package lists + make spelling # spell-check the manual -.. parsed-literal:: - - -D BUILD_DOC=value # yes or no (default) - -This will create the HTML doc pages within the CMake build directory. -The reason to do this is if you want to "install" LAMMPS on a system -after the CMake build via "make install", and include the doc pages in -the install. - -**Traditional make**\ : - - -.. parsed-literal:: - - cd lammps/doc - make html # html doc pages - make pdf # single Manual.pdf file - -This will create a lammps/doc/html dir with the HTML doc pages so that -you can browse them locally on your system. Type "make" from the -lammps/doc dir to see other options. +Thus "make html" will create a "doc/html" directory with the HTML format +manual pages so that you can browse them with a web browser locally on +your system. .. note:: @@ -369,6 +424,19 @@ lammps/doc dir to see other options. `download page `_. +**CMake build option**\ : + +It is also possible to create the HTML version of the manual within +the :doc:`CMake build directory `. The reason for this +option is to include the installation of the HTML manual pages into +the "install" step when installing LAMMPS after the CMake build via +"make install". + +.. code-block:: bash + + -D BUILD_DOC=value # yes or no (default) + + ---------- @@ -380,19 +448,20 @@ Build LAMMPS tools Some tools described in :doc:`Auxiliary tools ` can be built directly using CMake or Make. -**CMake variable**\ : +**CMake build3**\ : -.. parsed-literal:: +.. code-block:: bash -D BUILD_TOOLS=value # yes or no (default) -The generated binaries will also become part of the LAMMPS installation (see below) +The generated binaries will also become part of the LAMMPS installation +(see below). **Traditional make**\ : -.. parsed-literal:: +.. code-block:: bash cd lammps/tools make all # build all binaries of tools @@ -416,10 +485,10 @@ a globally visible place on your system, for others to access. Note that you may need super-user privileges (e.g. sudo) if the directory you want to copy files to is protected. -**CMake variable**\ : +**CMake build**\ : -.. parsed-literal:: +.. code-block:: bash cmake -D CMAKE_INSTALL_PREFIX=path [options ...] ../cmake make # perform make after CMake command diff --git a/doc/src/Build_cmake.rst b/doc/src/Build_cmake.rst index ce103d978a..8314afaa0e 100644 --- a/doc/src/Build_cmake.rst +++ b/doc/src/Build_cmake.rst @@ -20,7 +20,7 @@ make command to build LAMMPS, which uses the created Makefile(s). Example: -.. parsed-literal:: +.. code-block:: bash cd lammps # change to the LAMMPS distribution directory mkdir build; cd build # create a new directory (folder) for build @@ -52,7 +52,7 @@ After compilation, you may optionally install the LAMMPS executable into your system with: -.. parsed-literal:: +.. code-block:: bash make install # optional, copy LAMMPS executable & library elsewhere @@ -115,7 +115,7 @@ folder, recreate the directory and start over. **Command-line version of CMake**\ : -.. parsed-literal:: +.. code-block:: bash cmake [options ...] /path/to/lammps/cmake # build from any dir cmake [options ...] ../cmake # build from lammps/build @@ -127,7 +127,7 @@ The argument can be preceeded or followed by various CMake command-line options. Several useful ones are: -.. parsed-literal:: +.. code-block:: bash -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 @@ -177,7 +177,7 @@ directory. **Curses version (terminal-style menu) of CMake**\ : -.. parsed-literal:: +.. code-block:: bash ccmake ../cmake @@ -195,7 +195,7 @@ more information. **GUI version of CMake**\ : -.. parsed-literal:: +.. code-block:: bash cmake-gui ../cmake @@ -216,7 +216,7 @@ for more information. Check if your machine already has CMake installed: -.. parsed-literal:: +.. code-block:: bash which cmake # do you have it? which cmake3 # version 3 may have this name @@ -226,10 +226,10 @@ On clusters or supercomputers which use environment modules to manage software packages, do this: -.. parsed-literal:: +.. code-block:: bash - module list # is a cmake module already loaded? - module avail # is a cmake module available? + module list # is a module for cmake already loaded? + module avail # is a module for cmake available? module load cmake3 # load cmake module with appropriate name Most Linux distributions offer pre-compiled cmake packages through diff --git a/doc/src/Build_development.rst b/doc/src/Build_development.rst index ef06a27035..f8eee73197 100644 --- a/doc/src/Build_development.rst +++ b/doc/src/Build_development.rst @@ -18,14 +18,14 @@ generated by the CMake build. To enable a more verbose output during compilation you can use the following option. -.. parsed-literal:: +.. code-block:: bash -D CMAKE_VERBOSE_MAKEFILE=value # value = no (default) or yes Another way of doing this without reconfiguration is calling make with variable VERBOSE set to 1: -.. parsed-literal:: +.. code-block:: bash make VERBOSE=1 @@ -48,7 +48,7 @@ it. Please note that they come with a performance hit. However, they are usually faster than using tools like Valgrind. -.. parsed-literal:: +.. 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 @@ -72,7 +72,7 @@ developers can run the tests directly on their workstation. this is incomplete and only represents a small subset of tests that we run -.. parsed-literal:: +.. code-block:: bash -D ENABLE_TESTING=value # enable simple run tests of LAMMPS, value = no (default) or yes -D LAMMPS_TESTING_SOURCE_DIR=path # path to lammps-testing repository (option if in custom location) @@ -81,7 +81,7 @@ developers can run the tests directly on their workstation. If you enable testing in the CMake build it will create an additional target called "test". You can run them with: -.. parsed-literal:: +.. code-block:: bash make test @@ -93,14 +93,14 @@ You can also collect code coverage metrics while running the tests by enabling coverage support during building. -.. parsed-literal:: +.. code-block:: bash -D ENABLE_COVERAGE=value # enable coverage measurements, value = no (default) or yes This will also add the following targets to generate coverage reports after running the LAMMPS executable: -.. parsed-literal:: +.. code-block:: bash make test # run tests first! make gen_coverage_html # generate coverage report in HTML format @@ -109,6 +109,6 @@ This will also add the following targets to generate coverage reports after runn These reports require GCOVR to be installed. The easiest way to do this to install it via pip: -.. parsed-literal:: +.. code-block:: bash pip install git+https://github.com/gcovr/gcovr.git diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index e1d3b52165..74c4e71dbd 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -5,10 +5,15 @@ When building with some packages, additional steps may be required, in addition to: -.. parsed-literal:: +.. code-block:: bash - -D PKG_NAME=yes # CMake - make yes-name # make + $ cmake -D PKG_NAME=yes + +or + +.. code-block:: bash + + $ make yes-name as described on the :doc:`Build\_package ` doc page. @@ -20,18 +25,35 @@ You may need to tell LAMMPS where it is found on your system. This is the list of packages that may require additional steps. -+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ -| :ref:`COMPRESS ` | :ref:`GPU ` | :ref:`KIM ` | :ref:`KOKKOS ` | :ref:`LATTE ` | :ref:`MESSAGE ` | -+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ -| :ref:`MSCG ` | :ref:`OPT ` | :ref:`POEMS ` | :ref:`PYTHON ` | :ref:`VORONOI ` | :ref:`USER-ADIOS ` | -+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ -| :ref:`USER-ATC ` | :ref:`USER-AWPMD ` | :ref:`USER-COLVARS ` | :ref:`USER-H5MD ` | :ref:`USER-INTEL ` | :ref:`USER-MOLFILE ` | -+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ -| :ref:`USER-NETCDF ` | :ref:`USER-PLUMED ` | :ref:`USER-OMP ` | :ref:`USER-QMMM ` | :ref:`USER-QUIP ` | :ref:`USER-SCAFACOS ` | -+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ -| :ref:`USER-SMD ` | :ref:`USER-VTK ` | | | | | -+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ +.. table_from_list:: + :columns: 6 + * :ref:`COMPRESS ` + * :ref:`GPU ` + * :ref:`KIM ` + * :ref:`KOKKOS ` + * :ref:`LATTE ` + * :ref:`MESSAGE ` + * :ref:`MSCG ` + * :ref:`OPT ` + * :ref:`POEMS ` + * :ref:`PYTHON ` + * :ref:`VORONOI ` + * :ref:`USER-ADIOS ` + * :ref:`USER-ATC ` + * :ref:`USER-AWPMD ` + * :ref:`USER-COLVARS ` + * :ref:`USER-H5MD ` + * :ref:`USER-INTEL ` + * :ref:`USER-MOLFILE ` + * :ref:`USER-NETCDF ` + * :ref:`USER-PLUMED ` + * :ref:`USER-OMP ` + * :ref:`USER-QMMM ` + * :ref:`USER-QUIP ` + * :ref:`USER-SCAFACOS ` + * :ref:`USER-SMD ` + * :ref:`USER-VTK ` ---------- @@ -49,15 +71,15 @@ available on your system. If CMake cannot find the library, you can set these variables: -.. parsed-literal:: +.. code-block:: bash -D ZLIB_INCLUDE_DIR=path # path to zlib.h header file -D ZLIB_LIBRARIES=path # path to libz.a (.so) file **Traditional make**\ : -If make cannot find the library, you can edit the -lib/compress/Makefile.lammps file to specify the paths and library +If make cannot find the library, you can edit the file +lib/compress/Makefile.lammps to specify the paths and library name. @@ -75,7 +97,7 @@ which GPU hardware to build for. **CMake build**\ : -.. parsed-literal:: +.. code-block:: bash -D GPU_API=value # value = opencl (default) or cuda -D GPU_PREC=value # precision setting @@ -125,12 +147,12 @@ using a command like these, which simply invoke the lib/gpu/Install.py script with the specified args: -.. parsed-literal:: +.. code-block:: bash - make lib-gpu # print help message - make lib-gpu args="-b" # build GPU library with default Makefile.linux - make lib-gpu args="-m xk7 -p single -o xk7.single" # create new Makefile.xk7.single, altered for single-precision - make lib-gpu args="-m mpi -a sm_60 -p mixed -b" # build GPU library with mixed precision and P100 using other settings in Makefile.mpi + $ make lib-gpu # print help message + $ make lib-gpu args="-b" # build GPU library with default Makefile.linux + $ make lib-gpu args="-m xk7 -p single -o xk7.single" # create new Makefile.xk7.single, altered for single-precision + $ make lib-gpu args="-m mpi -a sm_60 -p mixed -b" # build GPU library with mixed precision and P100 using other settings in Makefile.mpi Note that this procedure starts with a Makefile.machine in lib/gpu, as specified by the "-m" switch. For your convenience, machine makefiles @@ -181,7 +203,8 @@ use with LAMMPS. If you want to use the :doc:`kim_query ` command, you also need to have libcurl installed with the matching development headers and the curl-config tool. -See `Obtaining KIM Models `_ to +See the `Obtaining KIM Models `_ +web page 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 @@ -192,7 +215,7 @@ minutes to hours) to build. Of course you only need to do that once.) **CMake build**\ : -.. parsed-literal:: +.. code-block:: bash -D DOWNLOAD_KIM=value # download OpenKIM API v2 for build, value = no (default) or yes -D LMP_DEBUG_CURL=value # set libcurl verbose mode on/off, value = off (default) or on @@ -203,7 +226,7 @@ inside the CMake build directory. If the KIM library is already on your system (in a location CMake cannot find it), set the PKG\_CONFIG\_PATH environment variable so that libkim-api can be found. -For using OpenKIM web queries in LAMMPS. +*For using OpenKIM web queries in LAMMPS*\ : If LMP\_DEBUG\_CURL is set, the libcurl verbose mode will be on, and any libcurl calls within the KIM web query display a lot of information about @@ -229,16 +252,23 @@ step from the lammps/src dir, using a command like these, which simply invoke the lib/kim/Install.py script with the specified args. -.. parsed-literal:: +.. code-block:: bash - make lib-kim # print help message - make lib-kim args="-b " # (re-)install KIM API lib with only example models - make lib-kim args="-b -a Glue_Ercolessi_Adams_Al__MO_324507536345_001" # ditto plus one model - make lib-kim args="-b -a everything" # install KIM API lib with all models - make lib-kim args="-n -a EAM_Dynamo_Ackland_W__MO_141627196590_002" # add one model or model driver - make lib-kim args="-p /usr/local" # use an existing KIM API installation at the provided location - make lib-kim args="-p /usr/local -a EAM_Dynamo_Ackland_W__MO_141627196590_002" # ditto but add one model or driver + $ make lib-kim # print help message + $ make lib-kim args="-b " # (re-)install KIM API lib with only example models + $ make lib-kim args="-b -a Glue_Ercolessi_Adams_Al__MO_324507536345_001" # ditto plus one model + $ make lib-kim args="-b -a everything" # install KIM API lib with all models + $ make lib-kim args="-n -a EAM_Dynamo_Ackland_W__MO_141627196590_002" # add one model or model driver + $ make lib-kim args="-p /usr/local" # use an existing KIM API installation at the provided location + $ make lib-kim args="-p /usr/local -a EAM_Dynamo_Ackland_W__MO_141627196590_002" # ditto but add one model or driver +Settings for OpenKIM web queries discussed above need to be applied by adding +them to the LMP\_INC variable through editing the Makefile.machine you are +using. For example: + +.. code-block:: make + + LMP_INC = -DLMP_NO_SSL_CHECK ---------- @@ -287,7 +317,7 @@ case-sensitive values, e.g. BDW, not bdw. For multicore CPUs using OpenMP, set these 2 variables. -.. parsed-literal:: +.. code-block:: bash -D KOKKOS_ARCH=archCPU # archCPU = CPU from list above -D KOKKOS_ENABLE_OPENMP=yes @@ -295,7 +325,7 @@ For multicore CPUs using OpenMP, set these 2 variables. For Intel KNLs using OpenMP, set these 2 variables: -.. parsed-literal:: +.. code-block:: bash -D KOKKOS_ARCH=KNL -D KOKKOS_ENABLE_OPENMP=yes @@ -303,7 +333,7 @@ For Intel KNLs using OpenMP, set these 2 variables: For NVIDIA GPUs using CUDA, set these 4 variables: -.. parsed-literal:: +.. code-block:: bash -D KOKKOS_ARCH="archCPU;archGPU" # archCPU = CPU from list above that is hosting the GPU # archGPU = GPU from list above @@ -316,7 +346,7 @@ Kokkos library: lib/kokkos/bin/nvcc\_wrapper. The setting should include the full path name to the wrapper, e.g. -.. parsed-literal:: +.. code-block:: bash -D CMAKE_CXX_COMPILER=/home/username/lammps/lib/kokkos/bin/nvcc_wrapper @@ -329,7 +359,7 @@ src/MAKE/OPTIONS/Makefile.kokkos\* files for examples. For multicore CPUs using OpenMP: -.. parsed-literal:: +.. code-block:: make KOKKOS_DEVICES = OpenMP KOKKOS_ARCH = archCPU # archCPU = CPU from list above @@ -337,7 +367,7 @@ For multicore CPUs using OpenMP: For Intel KNLs using OpenMP: -.. parsed-literal:: +.. code-block:: make KOKKOS_DEVICES = OpenMP KOKKOS_ARCH = KNL @@ -345,7 +375,7 @@ For Intel KNLs using OpenMP: For NVIDIA GPUs using CUDA: -.. parsed-literal:: +.. code-block:: make KOKKOS_DEVICES = Cuda KOKKOS_ARCH = archCPU,archGPU # archCPU = CPU from list above that is hosting the GPU @@ -360,7 +390,7 @@ compiling CUDA files and use a C++ compiler for non-Kokkos, non-CUDA files. -.. parsed-literal:: +.. code-block:: make KOKKOS_ABSOLUTE_PATH = $(shell cd $(KOKKOS_PATH); pwd) export OMPI_CXX = $(KOKKOS_ABSOLUTE_PATH)/config/nvcc_wrapper @@ -381,7 +411,7 @@ library. **CMake build**\ : -.. parsed-literal:: +.. code-block:: bash -D DOWNLOAD_LATTE=value # download LATTE for build, value = no (default) or yes -D LATTE_LIBRARY=path # LATTE library file (only needed if a custom location) @@ -401,12 +431,12 @@ simply invokes the lib/latte/Install.py script with the specified args: -.. parsed-literal:: +.. code-block:: bash - make lib-latte # print help message - make lib-latte args="-b" # download and build in lib/latte/LATTE-master - make lib-latte args="-p $HOME/latte" # use existing LATTE installation in $HOME/latte - make lib-latte args="-b -m gfortran" # download and build in lib/latte and + $ make lib-latte # print help message + $ make lib-latte args="-b" # download and build in lib/latte/LATTE-master + $ make lib-latte args="-p $HOME/latte" # use existing LATTE installation in $HOME/latte + $ make lib-latte args="-b -m gfortran" # download and build in lib/latte and # copy Makefile.lammps.gfortran to Makefile.lammps Note that 3 symbolic (soft) links, "includelink" and "liblink" and @@ -431,7 +461,7 @@ be installed on your system. **CMake build**\ : -.. parsed-literal:: +.. code-block:: bash -D MESSAGE_ZMQ=value # build with ZeroMQ support, value = no (default) or yes -D ZMQ_LIBRARY=path # ZMQ library file (only needed if a custom location) @@ -446,11 +476,11 @@ one step from the lammps/src dir, using a command like these, which simply invoke the lib/message/Install.py script with the specified args: -.. parsed-literal:: +.. code-block:: bash - make lib-message # print help message - make lib-message args="-m -z" # build with MPI and socket (ZMQ) support - make lib-message args="-s" # build as serial lib with no ZMQ support + $ make lib-message # print help message + $ make lib-message args="-m -z" # build with MPI and socket (ZMQ) support + $ make lib-message args="-s" # build as serial lib with no ZMQ support The build should produce two files: lib/message/cslib/src/libmessage.a and lib/message/Makefile.lammps. The latter is copied from an @@ -475,7 +505,7 @@ lib/mscg/README and MSCG/Install files for more details. **CMake build**\ : -.. parsed-literal:: +.. code-block:: bash -D DOWNLOAD_MSCG=value # download MSCG for build, value = no (default) or yes -D MSCG_LIBRARY=path # MSCG library file (only needed if a custom location) @@ -496,14 +526,14 @@ step from the lammps/src dir, using a command like these, which simply invoke the lib/mscg/Install.py script with the specified args: -.. parsed-literal:: +.. code-block:: bash - make lib-mscg # print help message - make lib-mscg args="-b -m serial" # download and build in lib/mscg/MSCG-release-master + $ make lib-mscg # print help message + $ make lib-mscg args="-b -m serial" # download and build in lib/mscg/MSCG-release-master # with the settings compatible with "make serial" - make lib-mscg args="-b -m mpi" # download and build in lib/mscg/MSCG-release-master + $ make lib-mscg args="-b -m mpi" # download and build in lib/mscg/MSCG-release-master # with the settings compatible with "make mpi" - make lib-mscg args="-p /usr/local/mscg-release" # use the existing MS-CG installation in /usr/local/mscg-release + $ make lib-mscg args="-p /usr/local/mscg-release" # use the existing MS-CG installation in /usr/local/mscg-release Note that 2 symbolic (soft) links, "includelink" and "liblink", will be created in lib/mscg to point to the MS-CG src/installation dir. @@ -552,12 +582,12 @@ dir, using a command like these, which simply invoke the lib/poems/Install.py script with the specified args: -.. parsed-literal:: +.. code-block:: bash - make lib-poems # print help message - make lib-poems args="-m serial" # build with GNU g++ compiler (settings as with "make serial") - make lib-poems args="-m mpi" # build with default MPI C++ compiler (settings as with "make mpi") - make lib-poems args="-m icc" # build with Intel icc compiler + $ make lib-poems # print help message + $ make lib-poems args="-m serial" # build with GNU g++ compiler (settings as with "make serial") + $ make lib-poems args="-m mpi" # build with default MPI C++ compiler (settings as with "make mpi") + $ make lib-poems args="-m icc" # build with Intel icc compiler The build should produce two files: lib/poems/libpoems.a and lib/poems/Makefile.lammps. The latter is copied from an existing @@ -584,7 +614,7 @@ lib/python/README for more details. **CMake build**\ : -.. parsed-literal:: +.. code-block:: bash -D PYTHON_EXECUTABLE=path # path to Python executable to use @@ -620,7 +650,7 @@ To build with this package, you must download and build the `Voro++ library - make lib-voronoi args="-p $HOME/voro++" # use existing Voro++ installation in $HOME/voro++ - make lib-voronoi args="-b -v voro++0.4.6" # download and build the 0.4.6 version in lib/voronoi/voro++-0.4.6 + $ make lib-voronoi # print help message + $ make lib-voronoi args="-b" # download and build the default version in lib/voronoi/voro++- + $ make lib-voronoi args="-p $HOME/voro++" # use existing Voro++ installation in $HOME/voro++ + $ make lib-voronoi args="-b -v voro++0.4.6" # download and build the 0.4.6 version in lib/voronoi/voro++-0.4.6 Note that 2 symbolic (soft) links, "includelink" and "liblink", are created in lib/voronoi to point to the Voro++ src dir. When LAMMPS @@ -673,7 +703,7 @@ installation and the instructions below are followed for the respective build sy **CMake build**\ : -.. parsed-literal:: +.. code-block:: bash -D ADIOS2_DIR=path # path is where ADIOS 2.x is installed -D PKG_USER-ADIOS=yes @@ -683,16 +713,16 @@ installation and the instructions below are followed for the respective build sy Turn on the USER-ADIOS package before building LAMMPS. If the ADIOS 2.x software is installed in PATH, there is nothing else to do: -.. parsed-literal:: +.. code-block:: bash - make yes-user-adios + $ make yes-user-adios otherwise, set ADIOS2\_DIR environment variable when turning on the package: -.. parsed-literal:: +.. code-block:: bash - ADIOS2_DIR=path make yes-user-adios # path is where ADIOS 2.x is installed + $ ADIOS2_DIR=path make yes-user-adios # path is where ADIOS 2.x is installed ---------- @@ -719,12 +749,12 @@ dir, using a command like these, which simply invoke the lib/atc/Install.py script with the specified args: -.. parsed-literal:: +.. code-block:: bash - make lib-atc # print help message - make lib-atc args="-m serial" # build with GNU g++ compiler and MPI STUBS (settings as with "make serial") - make lib-atc args="-m mpi" # build with default MPI compiler (settings as with "make mpi") - make lib-atc args="-m icc" # build with Intel icc compiler + $ make lib-atc # print help message + $ make lib-atc args="-m serial" # build with GNU g++ compiler and MPI STUBS (settings as with "make serial") + $ make lib-atc args="-m mpi" # build with default MPI compiler (settings as with "make mpi") + $ make lib-atc args="-m icc" # build with Intel icc compiler The build should produce two files: lib/atc/libatc.a and lib/atc/Makefile.lammps. The latter is copied from an existing @@ -741,12 +771,12 @@ lib/linalg. In the latter case you also need to build the library in lib/linalg with a command like these: -.. parsed-literal:: +.. code-block:: bash - make lib-linalg # print help message - make lib-linalg args="-m serial" # build with GNU Fortran compiler (settings as with "make serial") - make lib-linalg args="-m mpi" # build with default MPI Fortran compiler (settings as with "make mpi") - make lib-linalg args="-m gfortran" # build with GNU Fortran compiler + $ make lib-linalg # print help message + $ make lib-linalg args="-m serial" # build with GNU Fortran compiler (settings as with "make serial") + $ make lib-linalg args="-m mpi" # build with default MPI Fortran compiler (settings as with "make mpi") + $ make lib-linalg args="-m gfortran" # build with GNU Fortran compiler ---------- @@ -770,12 +800,12 @@ dir, using a command like these, which simply invoke the lib/awpmd/Install.py script with the specified args: -.. parsed-literal:: +.. code-block:: bash - make lib-awpmd # print help message - make lib-awpmd args="-m serial" # build with GNU g++ compiler and MPI STUBS (settings as with "make serial") - make lib-awpmd args="-m mpi" # build with default MPI compiler (settings as with "make mpi") - make lib-awpmd args="-m icc" # build with Intel icc compiler + $ make lib-awpmd # print help message + $ make lib-awpmd args="-m serial" # build with GNU g++ compiler and MPI STUBS (settings as with "make serial") + $ make lib-awpmd args="-m mpi" # build with default MPI compiler (settings as with "make mpi") + $ make lib-awpmd args="-m icc" # build with Intel icc compiler The build should produce two files: lib/awpmd/libawpmd.a and lib/awpmd/Makefile.lammps. The latter is copied from an existing @@ -792,12 +822,12 @@ provided in lib/linalg. In the latter case you also need to build the library in lib/linalg with a command like these: -.. parsed-literal:: +.. code-block:: bash - make lib-linalg # print help message - make lib-linalg args="-m serial" # build with GNU Fortran compiler (settings as with "make serial") - make lib-linalg args="-m mpi" # build with default MPI Fortran compiler (settings as with "make mpi") - make lib-linalg args="-m gfortran" # build with GNU Fortran compiler + $ make lib-linalg # print help message + $ make lib-linalg args="-m serial" # build with GNU Fortran compiler (settings as with "make serial") + $ make lib-linalg args="-m mpi" # build with default MPI Fortran compiler (settings as with "make mpi") + $ make lib-linalg args="-m gfortran" # build with GNU Fortran compiler ---------- @@ -844,12 +874,12 @@ command like these, which simply invoke the lib/colvars/Install.py script with the specified args: -.. parsed-literal:: +.. code-block:: bash - make lib-colvars # print help message - make lib-colvars args="-m serial" # build with GNU g++ compiler (settings as with "make serial") - make lib-colvars args="-m mpi" # build with default MPI compiler (settings as with "make mpi") - make lib-colvars args="-m g++-debug" # build with GNU g++ compiler and colvars debugging enabled + $ make lib-colvars # print help message + $ make lib-colvars args="-m serial" # build with GNU g++ compiler (settings as with "make serial") + $ make lib-colvars args="-m mpi" # build with default MPI compiler (settings as with "make mpi") + $ make lib-colvars args="-m g++-debug" # build with GNU g++ compiler and colvars debugging enabled The "machine" argument of the "-m" flag is used to find a Makefile.machine to use as build recipe. If it does not already exist in lib/colvars, it will be @@ -858,8 +888,10 @@ core LAMMPS makefiles. Optional flags may be specified as environment variables: -COLVARS\_DEBUG=yes make lib-colvars args="-m machine" # Build with debug code (much slower) -COLVARS\_LEPTON=no make lib-colvars args="-m machine" # Build without Lepton (included otherwise) +.. code-block:: bash + + $ COLVARS_DEBUG=yes make lib-colvars args="-m machine" # Build with debug code (much slower) + $ COLVARS_LEPTON=no make lib-colvars args="-m machine" # Build without Lepton (included otherwise) The build should produce two files: the library lib/colvars/libcolvars.a (which also includes Lepton objects if enabled) and the specification file @@ -921,7 +953,7 @@ your environment. There are then two additional commands that control the manner in which PLUMED is obtained and linked into LAMMPS. -.. parsed-literal:: +.. code-block:: bash -D DOWNLOAD_PLUMED=value # download PLUMED for build, value = no (default) or yes -D PLUMED_MODE=value # Linkage mode for PLUMED, value = static (default), shared, or runtime @@ -957,12 +989,12 @@ Download/compilation/configuration of the plumed library can be done from the src folder through the following make args: -.. parsed-literal:: +.. code-block:: bash - make lib-plumed # print help message - make lib-plumed args="-b" # download and build PLUMED in lib/plumed/plumed2 - make lib-plumed args="-p $HOME/.local" # use existing PLUMED installation in $HOME/.local - make lib-plumed args="-p /usr/local -m shared" # use existing PLUMED installation in + $ make lib-plumed # print help message + $ make lib-plumed args="-b" # download and build PLUMED in lib/plumed/plumed2 + $ make lib-plumed args="-p $HOME/.local" # use existing PLUMED installation in $HOME/.local + $ make lib-plumed args="-p /usr/local -m shared" # use existing PLUMED installation in # /usr/local and use shared linkage mode Note that 2 symbolic (soft) links, "includelink" and "liblink" are @@ -973,10 +1005,10 @@ mode. After this step is completed, you can install the USER-PLUMED package and compile LAMMPS in the usual manner: -.. parsed-literal:: +.. code-block:: bash - make yes-user-plumed - make machine + $ make yes-user-plumed + $ make machine Once this compilation completes you should be able to run LAMMPS in the usual way. For shared linkage mode, libplumed.so must be found by the @@ -1024,10 +1056,10 @@ dir, using a command like these, which simply invoke the lib/h5md/Install.py script with the specified args: -.. parsed-literal:: +.. code-block:: bash - make lib-h5md # print help message - make lib-h5md args="-m h5cc" # build with h5cc compiler + $ make lib-h5md # print help message + $ make lib-h5md args="-m h5cc" # build with h5cc compiler The build should produce two files: lib/h5md/libch5md.a and lib/h5md/Makefile.lammps. The latter is copied from an existing @@ -1055,7 +1087,7 @@ on the :doc:`Speed intel ` doc page. **CMake build**\ : -.. parsed-literal:: +.. code-block:: bash -D INTEL_ARCH=value # value = cpu (default) or knl -D INTEL_LRT_MODE=value # value = threads, none, or c++11 @@ -1082,7 +1114,7 @@ additional information. For CPUs: -.. parsed-literal:: +.. code-block:: make OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits -qopt-zmm-usage=high CCFLAGS = -g -qopenmp -DLAMMPS_MEMALIGN=64 -no-offload -fno-alias -ansi-alias -restrict $(OPTFLAGS) @@ -1092,7 +1124,7 @@ For CPUs: For KNLs: -.. parsed-literal:: +.. code-block:: make OPTFLAGS = -xMIC-AVX512 -O2 -fp-model fast=2 -no-prec-div -qoverride-limits CCFLAGS = -g -qopenmp -DLAMMPS_MEMALIGN=64 -no-offload -fno-alias -ansi-alias -restrict $(OPTFLAGS) @@ -1111,7 +1143,7 @@ USER-MOLFILE package **CMake build**\ : -.. parsed-literal:: +.. code-block:: bash -D MOLFILE_INCLUDE_DIRS=path # (optional) path where VMD molfile plugin headers are installed -D PKG_USER-MOLFILE=yes @@ -1191,9 +1223,9 @@ See src/MAKE/OPTIONS/Makefile.omp for an example. .. parsed-literal:: - CCFLAGS: -fopenmp # for GNU Compilers + CCFLAGS: -fopenmp # for GNU and Clang Compilers CCFLAGS: -qopenmp -restrict # for Intel compilers on Linux - LINKFLAGS: -fopenmp # for GNU Compilers + LINKFLAGS: -fopenmp # for GNU and Clang Compilers LINKFLAGS: -qopenmp # for Intel compilers on Linux For other platforms and compilers, please consult the documentation @@ -1209,22 +1241,40 @@ how to address compatibility :ref:`issues with the 'default(none)' directive ` for +background information. This requires compatible Quantum Espresso +and LAMMPS versions. The current interface and makefiles have last +been verified to work in February 2020 with Quantum Espresso versions +6.3 to 6.5. **CMake build**\ : -The CMake build system currently does not support building the full -QM/MM-capable hybrid executable of LAMMPS and QE called pwqmmm.x. -You must use the traditional make build for this package. +When using CMake, building a LAMMPS library is required and it is +recommended to build a shared library, since any libraries built from +the sources in the *lib* folder (including the essential libqmmm.a) +are not included in the static LAMMPS library and (currently) not +installed, while their code is included in the shared LAMMPS library. +Thus a typical command line to configure building LAMMPS for USER-QMMM +would be: + +.. code-block:: bash + + cmake -C ../cmake/presets/minimal.cmake -D PKG_USER-QMMM=yes \ + -D BUILD_LIB=yes -DBUILD_SHARED_LIBS=yes ../cmake + +After completing the LAMMPS build and also configuring and compiling +Quantum ESPRESSO with external library support (via "make couple"), +go back to the lib/qmmm folder and follow the instructions on the +README file to build the combined LAMMPS/QE QM/MM executable +(pwqmmm.x) in the lib/qmmm folder. You need to make certain, that + **Traditional make**\ : @@ -1235,12 +1285,12 @@ lammps/src dir, using a command like these, which simply invoke the lib/qmmm/Install.py script with the specified args: -.. parsed-literal:: +.. code-block:: bash - make lib-qmmm # print help message - make lib-qmmm args="-m serial" # build with GNU Fortran compiler (settings as in "make serial") - make lib-qmmm args="-m mpi" # build with default MPI compiler (settings as in "make mpi") - make lib-qmmm args="-m gfortran" # build with GNU Fortran compiler + $ make lib-qmmm # print help message + $ make lib-qmmm args="-m serial" # build with GNU Fortran compiler (settings as in "make serial") + $ make lib-qmmm args="-m mpi" # build with default MPI compiler (settings as in "make mpi") + $ make lib-qmmm args="-m gfortran" # build with GNU Fortran compiler The build should produce two files: lib/qmmm/libqmmm.a and lib/qmmm/Makefile.lammps. The latter is copied from an existing @@ -1252,10 +1302,10 @@ a corresponding Makefile.lammps.machine file. You can then install QMMM package and build LAMMPS in the usual manner. After completing the LAMMPS build and compiling Quantum -ESPRESSO with external library support, go back to the lib/qmmm folder -and follow the instructions on the README file to build the combined -LAMMPS/QE QM/MM executable (pwqmmm.x) in the lib/qmmm folder. - +ESPRESSO with external library support (via "make couple"), go back to +the lib/qmmm folder and follow the instructions in the README file to +build the combined LAMMPS/QE QM/MM executable (pwqmmm.x) in the +lib/qmmm folder. ---------- @@ -1274,7 +1324,7 @@ lib/quip/README file for details on how to do this. **CMake build**\ : -.. parsed-literal:: +.. code-block:: bash -D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location) @@ -1310,7 +1360,7 @@ To build with this package, you must download and build the `ScaFaCoS Coulomb so **CMake build**\ : -.. parsed-literal:: +.. code-block:: bash -D DOWNLOAD_SCAFACOS=value # download ScaFaCoS for build, value = no (default) or yes -D SCAFACOS_LIBRARY=path # ScaFaCos library file (only needed if at custom location) @@ -1355,7 +1405,7 @@ Eigen3 is a template library, so you do not need to build it. **CMake build**\ : -.. parsed-literal:: +.. code-block:: bash -D DOWNLOAD_EIGEN3 # download Eigen3, value = no (default) or yes -D EIGEN3_INCLUDE_DIR=path # path to Eigen library (only needed if a custom location) @@ -1373,11 +1423,11 @@ the lammps/src dir, using a command like these, which simply invoke the lib/smd/Install.py script with the specified args: -.. parsed-literal:: +.. code-block:: bash - make lib-smd # print help message - make lib-smd args="-b" # download to lib/smd/eigen3 - make lib-smd args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3 + $ make lib-smd # print help message + $ make lib-smd args="-b" # download to lib/smd/eigen3 + $ make lib-smd args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3 Note that a symbolic (soft) link named "includelink" is created in lib/smd to point to the Eigen dir. When LAMMPS builds it will use diff --git a/doc/src/Build_link.rst b/doc/src/Build_link.rst index 1478eceaf8..365decd54d 100644 --- a/doc/src/Build_link.rst +++ b/doc/src/Build_link.rst @@ -3,62 +3,228 @@ Link LAMMPS as a library to another code LAMMPS can be used as a library by another application, including Python scripts. The files src/library.cpp and library.h define the -C-style API for using LAMMPS as a library. See the :doc:`Howto library ` doc page for a description of the -interface and how to extend it for your needs. +C-style API for using LAMMPS as a library. See the :doc:`Howto +library ` doc page for a description of the interface +and how to extend it for your needs. The :doc:`Build basics ` doc page explains how to build LAMMPS as either a shared or static library. This results in one of these 2 files: -liblammps.so # shared library -liblammps.a # static library +.. parsed-literal:: + liblammps.so # shared library + liblammps.a # static library + +.. note:: + + Care should be taken to use the same MPI library for the calling + code and the LAMMPS library. The library.h file includes mpi.h and + uses definitions from it so those need to be available and + consistent. When LAMMPS is compiled with the MPI STUBS library, + then its mpi.h file needs to be included. While it is technically + possible to use a full MPI library in the calling code and link to + a serial LAMMPS library compiled with MPI STUBS, it is recommended + to use the *same* MPI library for both, and then use MPI\_Comm\_split() + in the calling code to pass a suitable communicator with a subset + of MPI ranks to the function creating the LAMMPS instance. ---------- **Link with LAMMPS as a static library**\ : -The calling application can link to LAMMPS as a static library with a -link command like this: +The calling application can link to LAMMPS as a static library with +compilation and link commands as in the examples shown below. These +are examples for a code written in C in the file *caller.c*. +The benefit of linking to a static library is, that the resulting +executable is independent of that library since all required +executable code from the library is copied into the calling executable. -g++ caller.o -L/home/sjplimp/lammps/src -llammps -o caller +*CMake build*\ : -The -L argument is the path to where the liblammps.a file is. The --llammps argument is shorthand for the file liblammps.a. +This assumes that LAMMPS has been configured with "-D BUILD_LIB=yes" +and installed with "make install" and the PKG\_CONFIG\_PATH environment +variable updated to include the *liblammps.pc* file installed into the +configured destination folder, if needed. The commands to compile and +link the coupled executable are then: +.. code-block:: bash + + mpicc -c -O $(pkgconf liblammps --cflags) caller.c + mpicxx -o caller caller.o -$(pkgconf liblammps --libs) + + +*Traditional make*\ : + +This assumes that LAMMPS has been compiled in the folder +"${HOME}/lammps/src" with "make mode=lib mpi". The commands to compile +and link the coupled executable are then: + +.. code-block:: bash + + mpicc -c -O -I${HOME}/lammps/src caller.c + mpicxx -o caller caller.o -L${HOME}/lammps/src -llammps + +The *-I* argument is the path to the location of the *library.h* +header file containing the interface to the LAMMPS C-style library +interface. The *-L* argument is the path to where the *liblammps.a* +file is located. The *-llammps* argument is shorthand for telling the +compiler to link the file *liblammps.a*\ . + +However, it is only as simple as shown above for the case of a plain +LAMMPS library without any optional packages that depend on libraries +(bundled or external). Otherwise, you need to include all flags, +libraries, and paths for the coupled executable, that are also +required to link the LAMMPS executable. + +*CMake build*\ : + +When using CMake, additional libraries with sources in the lib folder +are built, but not included in liblammps.a and (currently) not +installed with "make install" and not included in the *pkgconfig* +configuration file. They can be found in the top level build folder, +but you have to determine the necessary link flags manually. It is +therefore recommended to either use the traditional make procedure to +build and link with a static library or build and link with a shared +library instead. + +*Traditional make*\ : + +After you have compiled a static LAMMPS library using the conventional +build system for example with "make mode=lib serial". And you also +have installed the POEMS package after building its bundled library in +lib/poems. Then the commands to build and link the coupled executable +change to: + +.. code-block:: bash + + gcc -c -O -I${HOME}/lammps/src/STUBS -I${HOME}/lammps/src -caller.c + g++ -o caller caller.o -L${HOME}/lammps/lib/poems \ + -L${HOME}/lammps/src/STUBS -L${HOME}/lammps/src -llammps -lpoems -lmpi_stubs + +Note, that you need to link with "g++" instead of "gcc", since LAMMPS +is C++ code. You can display the currently applied settings for building +LAMMPS for the "serial" machine target by using the command: + +.. code-block:: bash + + make mode=print serial + +Which should output something like: + +.. code-block:: bash + + # Compiler: + CXX=g++ + # Linker: + LD=g++ + # Compilation: + CXXFLAGS=-g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -I${HOME}/lammps/lib/poems -I${HOME}/lammps/src/STUBS + # Linking: + LDFLAGS=-g -O + # Libraries: + LDLIBS=-L${HOME}/lammps/lib/poems -L${HOME}/lammps/src/STUBS -lpoems -lmpi_stubs + +From this you can gather the necessary paths and flags. With +makefiles for other *machine* configurations you need to do the +equivalent and replace "serial" with the corresponding *machine* name +of the makefile. ---------- - **Link with LAMMPS as a shared library**\ : -If you wish to link to liblammps.so, the operating system finds shared -libraries to load at run-time using the environment variable -LD\_LIBRARY\_PATH. To enable this you can do one of two things: +When linking to LAMMPS built as a shared library, the situation +becomes much simpler, as all dependent libraries and objects are +included in the shared library, which is - technically speaking - +effectively a regular LAMMPS executable that is missing the `main()` +function. Thus those libraries need not to be specified when linking +the calling executable. Only the *-I* flags are needed. So the +example case from above of the serial version static LAMMPS library +with the POEMS package installed becomes: -(1) Copy the liblammps.so file to a location the system can find it, -such as /usr/local/lib. I.e. a directory already listed in your -LD\_LIBRARY\_PATH variable. You can type +*CMake build*\ : +The commands with a shared LAMMPS library compiled with the CMake +build process are the same as for the static library. -.. parsed-literal:: +.. code-block:: bash + + mpicc -c -O $(pkgconf liblammps --cflags) caller.c + mpicxx -o caller caller.o -$(pkgconf --libs) + +*Traditional make*\ : + +The commands with a shared LAMMPS library compiled with the +traditional make build using "make mode=shlib serial" becomes: + +.. code-block:: bash + + gcc -c -O -I${HOME}/lammps/src/STUBS -I${HOME}/lammps/src -caller.c + g++ -o caller caller.o -L${HOME}/lammps/src -llammps + +*Locating liblammps.so at runtime*\ : + +However, now the `liblammps.so` file is required at runtime and needs +to be in a folder, where the shared linker program of the operating +system can find it. This would be either a folder like "/usr/local/lib64" +or "${HOME}/.local/lib64" or a folder pointed to by the LD\_LIBRARY\_PATH +environment variable. You can type + +.. code-block:: bash printenv LD_LIBRARY_PATH to see what directories are in that list. -(2) Add the LAMMPS src directory (or the directory you perform CMake -build in) to your LD\_LIBRARY\_PATH, so that the current version of the -shared library is always available to programs that use it. +Or you can add the LAMMPS src directory (or the directory you performed +a CMake style build in) to your LD\_LIBRARY\_PATH, so that the current +version of the shared library is always available to programs that use it. -For the csh or tcsh shells, you would add something like this to your -~/.cshrc file: +For the Bourne or Korn shells (/bin/sh, /bin/ksh, /bin/bash etc.), you +would add something like this to your ~/.profile file: + +.. code-block:: bash + + LD_LIBRARY_PATH ${LD_LIBRARY_PATH-/usr/lib64}:${HOME}/lammps/src + export LD_LIBRARY_PATH + +For the csh or tcsh shells, you would equivalently add something like this +to your ~/.cshrc file: -.. parsed-literal:: +.. code-block:: csh - setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/sjplimp/lammps/src + setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${HOME}/lammps/src + +You can verify whether all required shared libraries are found with the +`ldd` tool. Example: + +.. code-block:: bash + + $ LD_LIBRARY_PATH=/home/user/lammps/src ldd caller + linux-vdso.so.1 (0x00007ffe729e0000) + liblammps.so => /home/user/lammps/src/liblammps.so (0x00007fc91bb9e000) + libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fc91b984000) + libm.so.6 => /lib64/libm.so.6 (0x00007fc91b83e000) + libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc91b824000) + libc.so.6 => /lib64/libc.so.6 (0x00007fc91b65b000) + /lib64/ld-linux-x86-64.so.2 (0x00007fc91c094000) + + +If a required library is missing, you would get a 'not found' entry: + +.. code-block:: bash + + $ ldd caller + linux-vdso.so.1 (0x00007ffd672fe000) + liblammps.so => not found + libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fb7c7e86000) + libm.so.6 => /usr/lib64/libm.so.6 (0x00007fb7c7d40000) + libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007fb7c7d26000) + libc.so.6 => /usr/lib64/libc.so.6 (0x00007fb7c7b5d000) + /lib64/ld-linux-x86-64.so.2 (0x00007fb7c80a2000) ---------- @@ -67,18 +233,20 @@ For the csh or tcsh shells, you would add something like this to your **Calling the LAMMPS library**\ : Either flavor of library (static or shared) allows one or more LAMMPS -objects to be instantiated from the calling program. +objects to be instantiated from the calling program. When used from a +C++ program, most of the symbols and functions in LAMMPS are wrapped +in a LAMMPS\_NS namespace; you can safely use any of its classes and +methods from within the calling code, as needed, and you will not incur +conflicts with functions and variables in your code that share the name. +This, however, does not extend to all additional libraries bundled with +LAMMPS in the lib folder and some of the low-level code of some packages. -When used from a C++ program, all of LAMMPS is wrapped in a LAMMPS\_NS -namespace; you can safely use any of its classes and methods from -within the calling code, as needed. - -When used from a C or Fortran program, the library has a simple +To be compatible with C, Fortran, Python programs, the library has a simple C-style interface, provided in src/library.cpp and src/library.h. See the :doc:`Python library ` doc page for a description of the Python interface to LAMMPS, which wraps the C-style -interface. +interface from a shared library through the ctypes python module. See the sample codes in examples/COUPLE/simple for examples of C++ and C and Fortran codes that invoke LAMMPS through its library interface. diff --git a/doc/src/Build_make.rst b/doc/src/Build_make.rst index c7db5dbb52..ebd1790e11 100644 --- a/doc/src/Build_make.rst +++ b/doc/src/Build_make.rst @@ -7,18 +7,33 @@ src/MAKE/MACHINES, src/MAKE/OPTIONS, or src/MAKE/MINE directory (see below). It can include various options for customizing your LAMMPS build with a number of global compilation options and features. +Those makefiles are written for and tested with GNU make and may not +be compatible with other make programs. In most cases, if the "make" +program is not GNU make, then there will be a GNU make program +available under the name "gmake". If GNU make or a compatible make is +not available, you may have to first install it or switch to building +with :doc:`CMake `. The makefiles of the traditional +make based build process and the scripts they are calling expect a few +additional tools to be available and functioning. + + * a Bourne shell compatible "Unix" shell program (often this is bash) + * a few shell utilities: ls, mv, ln, rm, grep, sed, tr, cat, touch, diff, dirname + * python (optional, required for "make lib-XXX" in the src folder) + To include LAMMPS packages (i.e. optional commands and styles) you -must install them first, as discussed on the :doc:`Build package ` doc page. If the packages require -provided or external libraries, you must build those libraries before -building LAMMPS. Building :doc:`LAMMPS with CMake ` can -automate all of this for many types of machines, especially -workstations, desktops and laptops, so we suggest you try it first. +must enable them first, as discussed on the :doc:`Build package +` doc page. If a packages requires (provided or +external) libraries, you must configure and build those libraries +**before** building LAMMPS itself and especially **before** enabling +such a package with "make yes-". Building :doc:`LAMMPS +with CMake ` can automate much of this for many types of +machines, especially workstations, desktops, and laptops, so we suggest +you try it first when building LAMMPS in those cases. -These commands perform a default LAMMPS build, producing the LAMMPS -executable lmp\_serial or lmp\_mpi in lammps/src: +The commands below perform a default LAMMPS build, producing the LAMMPS +executable lmp\_serial and lmp\_mpi in lammps/src: - -.. parsed-literal:: +.. code-block:: bash cd lammps/src make serial # build a serial LAMMPS executable @@ -42,18 +57,21 @@ re-compiled. .. note:: - When you build LAMMPS for the first time, a long list of \*.d - files will be printed out rapidly. This is not an error; it is the - Makefile doing its normal creation of dependencies. - + Before the actual compilation starts, LAMMPS will perform several + steps to collect information from the configuration and setup that + is then embedded into the executable. When you build LAMMPS for + the first time, it will also compile a tool to quickly assemble + a list of dependencies, that are required for the make program to + correctly detect which parts need to be recompiled after changes + were made to the sources. ---------- - -The lammps/src/MAKE tree contains all the Makefile.machine files -included in the LAMMPS distribution. Typing "make machine" uses -Makefile.machine. Thus the "make serial" or "make mpi" lines above -use Makefile.serial and Makefile.mpi. Others are in these dirs: +The lammps/src/MAKE tree contains the Makefile.machine files included +in the LAMMPS distribution. Typing "make machine" uses +*Makefile.machine*\ . Thus the "make serial" or "make mpi" lines above +use Makefile.serial and Makefile.mpi, respectively. Other makefiles +are in these directories: .. parsed-literal:: @@ -64,7 +82,7 @@ use Makefile.serial and Makefile.mpi. Others are in these dirs: Typing "make" lists all the available Makefile.machine files. A file with the same name can appear in multiple folders (not a good idea). -The order the dirs are searched is as follows: src/MAKE/MINE, +The order the directories are searched is as follows: src/MAKE/MINE, src/MAKE, src/MAKE/OPTIONS, src/MAKE/MACHINES. This gives preference to a customized file you put in src/MAKE/MINE. @@ -76,7 +94,7 @@ compilers, OS configurations, and LAMMPS itself keep changing, their settings may become outdated: -.. parsed-literal:: +.. code-block:: bash make mac # build serial LAMMPS on a Mac make mac_mpi # build parallel LAMMPS on a Mac diff --git a/doc/src/Build_package.rst b/doc/src/Build_package.rst index 7f2fe7f8ef..cd178161b3 100644 --- a/doc/src/Build_package.rst +++ b/doc/src/Build_package.rst @@ -14,10 +14,13 @@ package. In general there is no need to include a package if you never plan to use its features. If you get a run-time error that a LAMMPS command or style is -"Unknown", it is often because the command is contained in a package, -and your build did not include that package. Running LAMMPS with the -:doc:`-h command-line switch ` will print all the included -packages and commands for that executable. +"unknown", it is often because the command is contained in a package, +and your build did not include that package. If the command or style +*is* available in a package included in the LAMMPS distribution, +the error message will indicate which package would be needed. +Running LAMMPS with the :doc:`-h command-line switch ` +will print *all* optional commands and packages that were enabled +when building that executable. For the majority of packages, if you follow the single step below to include it, you can then build LAMMPS exactly the same as you would @@ -42,17 +45,17 @@ packages: The mechanism for including packages is simple but different for CMake versus make. -**CMake variables**\ : +**CMake build**\ : -.. parsed-literal:: +.. code-block:: bash -D PKG_NAME=value # yes or no (default) Examples: -.. parsed-literal:: +.. code-block:: bash -D PKG_MANYBODY=yes -D PKG_USER-INTEL=yes @@ -74,7 +77,7 @@ once with CMake. **Traditional make**\ : -.. parsed-literal:: +.. code-block:: bash cd lammps/src make ps # check which packages are currently installed @@ -85,7 +88,7 @@ once with CMake. Examples: -.. parsed-literal:: +.. code-block:: bash make no-rigid make yes-user-intel @@ -119,7 +122,7 @@ are already included. Likewise, if a package is excluded, other files dependent on that package are also excluded. When you download a LAMMPS tarball or download LAMMPS source files -from the Git or SVN repositories, no packages are pre-installed in the +from the git repository, no packages are pre-installed in the src directory. .. note:: @@ -136,9 +139,10 @@ src directory. **CMake shortcuts for installing many packages**\ : Instead of specifying all the CMake options via the command-line, -CMake allows initializing the variable cache using script files. These -are regular CMake files which can manipulate and set variables, and -can also contain control flow constructs. +CMake allows initializing its settings cache using script files. +These are regular CMake files which can manipulate and set CMake +variables (which represent selected options), and can also contain +control flow constructs for more complex operations. LAMMPS includes several of these files to define configuration "presets", similar to the options that exist for the Make based @@ -146,25 +150,19 @@ system. Using these files you can enable/disable portions of the available packages in LAMMPS. If you need a custom preset you can take one of them as a starting point and customize it to your needs. -+-------------------------------------------------------------+-----------------------------------------------------------+ -| 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/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 | -+-------------------------------------------------------------+-----------------------------------------------------------+ +.. 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/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 .. note:: - Running cmake this way manipulates the variable cache in your + Running cmake this way manipulates the CMake settings cache in your current build directory. You can combine multiple presets and options in a single cmake run, or change settings incrementally by running cmake with new flags. @@ -172,7 +170,7 @@ one of them as a starting point and customize it to your needs. **Example:** -.. parsed-literal:: +.. code-block:: bash # build LAMMPS with most commonly used packages, but then remove # those requiring additional library or tools, but still enable @@ -200,37 +198,30 @@ Just type "make" in lammps/src to see a one-line summary. These commands install/un-install sets of packages: -+-----------------------------------+-----------------------------------------------------+ -| make yes-all | install all packages | -+-----------------------------------+-----------------------------------------------------+ -| make no-all | un-install all packages | -+-----------------------------------+-----------------------------------------------------+ -| make yes-standard or make yes-std | install standard packages | -+-----------------------------------+-----------------------------------------------------+ -| make no-standard or make no-std | un-install standard packages | -+-----------------------------------+-----------------------------------------------------+ -| make yes-user | install user packages | -+-----------------------------------+-----------------------------------------------------+ -| make no-user | un-install user packages | -+-----------------------------------+-----------------------------------------------------+ -| make yes-lib | install packages that require extra libraries | -+-----------------------------------+-----------------------------------------------------+ -| make no-lib | un-install packages that require extra libraries | -+-----------------------------------+-----------------------------------------------------+ -| make yes-ext | install packages that require external libraries | -+-----------------------------------+-----------------------------------------------------+ -| make no-ext | un-install packages that require external libraries | -+-----------------------------------+-----------------------------------------------------+ +.. code-block:: bash + + make yes-all # install all packages + make no-all # uninstall all packages + make yes-standard or make yes-std # install standard packages + make no-standard or make no-std # uninstall standard packages + make yes-user # install user packages + make no-user # uninstall user packages + make yes-lib # install packages that require extra libraries + make no-lib # uninstall packages that require extra libraries + make yes-ext # install packages that require external libraries + make no-ext # uninstall packages that require external libraries which install/un-install various sets of packages. Typing "make package" will list all the these commands. .. note:: - Installing or un-installing a package works by simply copying - files back and forth between the main src directory and - sub-directories with the package name (e.g. src/KSPACE, src/USER-ATC), - so that the files are included or excluded when LAMMPS is built. + Installing or un-installing a package for the make based build process + works by simply copying files back and forth between the main source + directory src and the sub-directories with the package name (e.g. + src/KSPACE, src/USER-ATC), so that the files are included or excluded + when LAMMPS is built. Only source files in the src folder will be + compiled. The following make commands help manage files that exist in both the src directory and in package sub-directories. You do not normally @@ -257,4 +248,4 @@ Type "make package-overwrite" to overwrite files in the package sub-directories with src files. Type "make package-diff" to list all differences between pairs of -files in both the src dir and a package dir. +files in both the source directory and the package directory. diff --git a/doc/src/Build_settings.rst b/doc/src/Build_settings.rst index 273a598b1a..1e668ee95d 100644 --- a/doc/src/Build_settings.rst +++ b/doc/src/Build_settings.rst @@ -4,16 +4,15 @@ Optional build settings LAMMPS can be built with several optional settings. Each sub-section explain how to do this for building both with CMake and make. -| :ref:`C++11 standard compliance test ` when building all of LAMMPS -| :ref:`FFT library ` for use with the :doc:`kspace_style pppm ` command -| :ref:`Size of LAMMPS data types ` -| :ref:`Read or write compressed files ` -| :ref:`Output of JPG and PNG files ` via the :doc:`dump image ` command -| :ref:`Output of movie files ` via the :doc:`dump_movie ` command -| :ref:`Memory allocation alignment ` -| :ref:`Workaround for long long integers ` -| :ref:`Error handling exceptions ` when using LAMMPS as a library -| +* :ref:`C++11 standard compliance ` when building all of LAMMPS +* :ref:`FFT library ` for use with the :doc:`kspace_style pppm ` command +* :ref:`Size of LAMMPS data types ` +* :ref:`Read or write compressed files ` +* :ref:`Output of JPG and PNG files ` via the :doc:`dump image ` command +* :ref:`Output of movie files ` via the :doc:`dump_movie ` command +* :ref:`Memory allocation alignment ` +* :ref:`Workaround for long long integers ` +* :ref:`Error handling exceptions ` when using LAMMPS as a library ---------- @@ -21,45 +20,16 @@ explain how to do this for building both with CMake and make. .. _cxx11: -C++11 standard compliance test +C++11 standard compliance ------------------------------------------ The LAMMPS developers plan to transition to make the C++11 standard the minimum requirement for compiling LAMMPS. Currently this only applies to some packages like KOKKOS while the rest aims to be compatible with the C++98 standard. Most currently used compilers are compatible with C++11; some need -to set extra flags to switch. To determine the impact of requiring C++11, -we have added a simple compliance test to the source code, that will cause -the compilation to abort, if C++11 compliance is not available or enabled. -To bypass this check, you need to change a setting in the makefile or -when calling CMake. +to set extra flags to enable C++11 compliance. Example for GNU c++: -**CMake variable**\ : - - -.. parsed-literal:: - - -D DISABLE_CXX11_REQUIREMENT=yes - -You can set additional C++ compiler flags (beyond those selected by CMake) -through the CMAKE\_CXX\_FLAGS variable. Example for CentOS 7: - - -.. parsed-literal:: - - -D CMAKE_CXX_FLAGS="-O3 -g -fopenmp -DNDEBUG -std=c++11" - -**Makefile.machine setting**\ to bypass the C++11 test and compile in C++98 mode: - - -.. parsed-literal:: - - LMP_INC = -DLAMMPS_CXX98 - -**Makefile.machine setting**\ to enable the C++11 with older (but not too old) GNU c++ (e.g. on CentOS 7): - - -.. parsed-literal:: +.. code-block:: make CCFLAGS = -g -O3 -std=c++11 @@ -80,7 +50,7 @@ LAMMPS can use them if they are available on your system. **CMake variables**\ : -.. parsed-literal:: +.. code-block:: bash -D FFT=value # FFTW3 or MKL or KISS, default is FFTW3 if found, else KISS -D FFT_SINGLE=value # yes or no (default), no = double precision @@ -100,7 +70,7 @@ used. If CMake cannot detect the FFT library, you can set these variables to assist: -.. parsed-literal:: +.. code-block:: bash -D FFTW3_INCLUDE_DIRS=path # path to FFTW3 include files -D FFTW3_LIBRARIES=path # path to FFTW3 libraries @@ -112,7 +82,7 @@ to assist: **Makefile.machine settings**\ : -.. parsed-literal:: +.. code-block:: make FFT_INC = -DFFT_FFTW3 # -DFFT_FFTW3, -DFFT_FFTW (same as -DFFT_FFTW3), -DFFT_MKL, or -DFFT_KISS # default is KISS if not specified @@ -124,7 +94,7 @@ to assist: # default is FFT\_PACK\_ARRAY if not specified -.. parsed-literal:: +.. code-block:: make FFT_INC = -I/usr/local/include FFT_PATH = -L/usr/local/lib @@ -190,7 +160,7 @@ For FFTW3, do the following, which should produce the additional library libfftw3f.a or libfftw3f.so. -.. parsed-literal:: +.. code-block:: bash make clean ./configure --enable-single; make; make install @@ -218,14 +188,14 @@ adequate. **CMake variable**\ : -.. parsed-literal:: +.. code-block:: bash -D LAMMPS_SIZES=value # smallbig (default) or bigbig or smallsmall **Makefile.machine setting**\ : -.. parsed-literal:: +.. code-block:: make LMP_INC = -DLAMMPS_SMALLBIG # or -DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL @@ -296,21 +266,21 @@ following settings: **CMake variables**\ : -.. parsed-literal:: +.. code-block:: bash -D WITH_JPEG=value # yes or no - # default = yes if CMake finds JPEG files, else no + # default = yes if CMake finds JPEG files, else no -D WITH_PNG=value # yes or no - # default = yes if CMake finds PNG and ZLIB files, else no + # default = yes if CMake finds PNG and ZLIB files, else no -D WITH_FFMPEG=value # yes or no - # default = yes if CMake can find ffmpeg, else no + # default = yes if CMake can find ffmpeg, else no Usually these settings are all that is needed. If CMake cannot find the graphics header, library, executable files, you can set these variables: -.. parsed-literal:: +.. code-block:: bash -D JPEG_INCLUDE_DIR=path # path to jpeglib.h header file -D JPEG_LIBRARIES=path # path to libjpeg.a (.so) file @@ -323,7 +293,7 @@ variables: **Makefile.machine settings**\ : -.. parsed-literal:: +.. code-block:: make LMP_INC = -DLAMMPS_JPEG LMP_INC = -DLAMMPS_PNG @@ -337,7 +307,7 @@ As with CMake, you do not need to set JPG\_INC or JPG\_PATH, if make can find the graphics header and library files. You must specify JPG\_LIB with a list of graphics libraries to include in the link. You must insure ffmpeg is in a directory where LAMMPS can find it at runtime, -i.e. a dir in your PATH environment variable. +that is a directory in your PATH environment variable. **CMake and make info**\ : @@ -347,7 +317,7 @@ supports the "popen" function in the standard runtime library. .. note:: On some clusters with high-speed networks, using the fork() - library calls (required by popen()) can interfere with the fast + library call (required by popen()) can interfere with the fast communication library and lead to simulations using ffmpeg to hang or crash. @@ -367,7 +337,7 @@ gzip compression by several LAMMPS commands, including **CMake variables**\ : -.. parsed-literal:: +.. code-block:: bash -D WITH_GZIP=value # yes or no # default is yes if CMake can find gzip, else no @@ -376,7 +346,7 @@ gzip compression by several LAMMPS commands, including **Makefile.machine setting**\ : -.. parsed-literal:: +.. code-block:: make LMP_INC = -DLAMMPS_GZIP @@ -389,7 +359,7 @@ found by LAMMPS during a run. .. note:: On some clusters with high-speed networks, using the fork() - library calls (required by popen()) can interfere with the fast + library call (required by popen()) can interfere with the fast communication library and lead to simulations using compressed output or input to hang or crash. For selected operations, compressed file I/O is also available using a compression library instead, which is @@ -416,7 +386,7 @@ aligned on 64-byte boundaries. **CMake variable**\ : -.. parsed-literal:: +.. code-block:: bash -D LAMMPS_MEMALIGN=value # 0, 8, 16, 32, 64 (default) @@ -428,7 +398,7 @@ and this setting ignored. **Makefile.machine setting**\ : -.. parsed-literal:: +.. code-block:: make LMP_INC = -DLAMMPS_MEMALIGN=value # 8, 16, 32, 64 @@ -455,14 +425,14 @@ those systems: **CMake variable**\ : -.. parsed-literal:: +.. code-block:: bash -D LAMMPS_LONGLONG_TO_LONG=value # yes or no (default) **Makefile.machine setting**\ : -.. parsed-literal:: +.. code-block:: make LMP_INC = -DLAMMPS_LONGLONG_TO_LONG @@ -476,20 +446,21 @@ Exception handling when using LAMMPS as a library ------------------------------------------------------------------ This setting is useful when external codes drive LAMMPS as a library. -With this option enabled LAMMPS errors do not kill the caller. +With this option enabled, LAMMPS errors do not kill the calling code. Instead, the call stack is unwound and control returns to the caller, -e.g. to Python. +e.g. to Python. Of course the calling code has to be set up to +*catch* exceptions from within LAMMPS. **CMake variable**\ : -.. parsed-literal:: +.. code-block:: bash -D LAMMPS_EXCEPTIONS=value # yes or no (default) **Makefile.machine setting**\ : -.. parsed-literal:: +.. code-block:: make LMP_INC = -DLAMMPS_EXCEPTIONS diff --git a/doc/src/Commands_category.rst b/doc/src/Commands_category.rst index 6476c73bbb..00d06fed47 100644 --- a/doc/src/Commands_category.rst +++ b/doc/src/Commands_category.rst @@ -7,6 +7,7 @@ alphabetically. Style options for entries like fix, compute, pair etc. have their own pages where they are listed alphabetically. Initialization: +------------------------------ * :doc:`newton `, * :doc:`package `, @@ -15,6 +16,7 @@ Initialization: * :doc:`units ` Setup simulation box: +------------------------------ * :doc:`boundary `, * :doc:`box `, @@ -25,6 +27,7 @@ Setup simulation box: * :doc:`region ` Setup atoms: +------------------------------ * :doc:`atom_modify `, * :doc:`atom_style `, @@ -45,6 +48,7 @@ Setup atoms: * :doc:`velocity ` Force fields: +------------------------------ * :doc:`angle_coeff `, * :doc:`angle_style `, @@ -65,6 +69,7 @@ Force fields: * :doc:`special_bonds ` Settings: +------------------------------ * :doc:`comm_modify `, * :doc:`comm_style `, @@ -80,6 +85,7 @@ Settings: * :doc:`timestep ` Operations within timestepping (fixes) and diagnostics (computes): +------------------------------------------------------------------------------------------ * :doc:`compute `, * :doc:`compute_modify `, @@ -89,6 +95,7 @@ Operations within timestepping (fixes) and diagnostics (computes): * :doc:`unfix ` Output: +------------------------------ * :doc:`dump image `, * :doc:`dump movie `, @@ -105,6 +112,7 @@ Output: * :doc:`write_restart ` Actions: +------------------------------ * :doc:`minimize `, * :doc:`neb `, @@ -116,6 +124,7 @@ Actions: * :doc:`temper ` Input script control: +------------------------------ * :doc:`clear `, * :doc:`echo `, diff --git a/doc/src/Commands_parse.rst b/doc/src/Commands_parse.rst index ec1c8c1e46..83e7d439ef 100644 --- a/doc/src/Commands_parse.rst +++ b/doc/src/Commands_parse.rst @@ -9,134 +9,151 @@ file names or user-chosen ID strings. Here are 6 rules for how each line in the input script is parsed by LAMMPS: -(1) If the last printable character on the line is a "&" character, -the command is assumed to continue on the next line. The next line is -concatenated to the previous line by removing the "&" character and -line break. This allows long commands to be continued across two or -more lines. See the discussion of triple quotes in (6) for how to -continue a command across multiple line without using "&" characters. +.. _one: -(2) All characters from the first "#" character onward are treated as -comment and discarded. See an exception in (6). Note that a -comment after a trailing "&" character will prevent the command from -continuing on the next line. Also note that for multi-line commands a -single leading "#" will comment out the entire command. +1. If the last printable character on the line is a "&" character, the + command is assumed to continue on the next line. The next line is + concatenated to the previous line by removing the "&" character and + line break. This allows long commands to be continued across two or + more lines. See the discussion of triple quotes in :ref:`6 ` + for how to continue a command across multiple line without using "&" + characters. -.. code-block:: LAMMPS +.. _two: - # this is a comment +2. All characters from the first "#" character onward are treated as + comment and discarded. The exception to this rule is described in + :ref:`6 `. Note that a comment after a trailing "&" character + will prevent the command from continuing on the next line. Also note + that for multi-line commands a single leading "#" will comment out + the entire command. -(3) The line is searched repeatedly for $ characters, which indicate -variables that are replaced with a text string. See an exception in -(6). + .. code-block:: LAMMPS -If the $ is followed by curly brackets, then the variable name is the -text inside the curly brackets. If no curly brackets follow the $, -then the variable name is the single character immediately following -the $. Thus ${myTemp} and $x refer to variable names "myTemp" and -"x". + # this is a comment + timestep 1.0 # this is also a comment -How the variable is converted to a text string depends on what style -of variable it is; see the :doc:`variable ` doc page for details. -It can be a variable that stores multiple text strings, and return one -of them. The returned text string can be multiple "words" (space -separated) which will then be interpreted as multiple arguments in the -input command. The variable can also store a numeric formula which -will be evaluated and its numeric result returned as a string. +.. _three: -As a special case, if the $ is followed by parenthesis, then the text -inside the parenthesis is treated as an "immediate" variable and -evaluated as an :doc:`equal-style variable `. This is a way -to use numeric formulas in an input script without having to assign -them to variable names. For example, these 3 input script lines: +3. The line is searched repeatedly for $ characters, which indicate + variables that are replaced with a text string. The exception to + this rule is described in :ref:`6 `. + + If the $ is followed by text in curly brackets '{}', then the + variable name is the text inside the curly brackets. If no curly + brackets follow the $, then the variable name is the single character + immediately following the $. Thus ${myTemp} and $x refer to variables + named "myTemp" and "x", while "$xx" will be interpreted as a variable + named "x" followed by an "x" character. + + How the variable is converted to a text string depends on what style + of variable it is; see the :doc:`variable ` doc page for + details. It can be a variable that stores multiple text strings, and + return one of them. The returned text string can be multiple "words" + (space separated) which will then be interpreted as multiple + arguments in the input command. The variable can also store a + numeric formula which will be evaluated and its numeric result + returned as a string. + + As a special case, if the $ is followed by parenthesis "()", then the + text inside the parenthesis is treated as an "immediate" variable and + evaluated as an :doc:`equal-style variable `. This is a + way to use numeric formulas in an input script without having to + assign them to variable names. For example, these 3 input script + lines: + + .. code-block:: LAMMPS + + variable X equal (xlo+xhi)/2+sqrt(v_area) + region 1 block $X 2 INF INF EDGE EDGE + variable X delete + + can be replaced by: + + .. code-block:: LAMMPS + + region 1 block $((xlo+xhi)/2+sqrt(v_area)) 2 INF INF EDGE EDGE + + so that you do not have to define (or discard) a temporary variable, + "X" in this case. + + Additionally, the "immediate" variable expression may be followed by + a colon, followed by a C-style format string, e.g. ":%f" or ":%.10g". + The format string must be appropriate for a double-precision + floating-point value. The format string is used to output the result + of the variable expression evaluation. If a format string is not + specified a high-precision "%.20g" is used as the default. + + This can be useful for formatting print output to a desired precision: -.. code-block:: LAMMPS + .. code-block:: LAMMPS - variable X equal (xlo+xhi)/2+sqrt(v_area) - region 1 block $X 2 INF INF EDGE EDGE - variable X delete + print "Final energy per atom: $(pe/atoms:%10.3f) eV/atom" -can be replaced by + Note that neither the curly-bracket or immediate form of variables + can contain nested $ characters for other variables to substitute + for. Thus you may **NOT** do this: + .. code-block:: LAMMPS -.. code-block:: LAMMPS + variable a equal 2 + variable b2 equal 4 + print "B2 = ${b$a}" - region 1 block $((xlo+xhi)/2+sqrt(v_area)) 2 INF INF EDGE EDGE + Nor can you specify an expression like "$($x-1.0)" for an immediate + variable, but you could use $(v\_x-1.0), since the latter is valid + syntax for an :doc:`equal-style variable `. -so that you do not have to define (or discard) a temporary variable X. + See the :doc:`variable ` command for more details of how + strings are assigned to variables and evaluated, and how they can + be used in input script commands. -Additionally, the "immediate" variable expression may be followed by a -colon, followed by a C-style format string, e.g. ":%f" or ":%.10g". -The format string must be appropriate for a double-precision -floating-point value. The format string is used to output the result -of the variable expression evaluation. If a format string is not -specified a high-precision "%.20g" is used as the default. +.. _four: -This can be useful for formatting print output to a desired precision: +4. The line is broken into "words" separated by white-space (tabs, + spaces). Note that words can thus contain letters, digits, + underscores, or punctuation characters. +.. _five: + +5. The first word is the command name. All successive words in the line + are arguments. -.. code-block:: LAMMPS +.. _six: - print "Final energy per atom: $(pe/atoms:%10.3f) eV/atom" +6. If you want text with spaces to be treated as a single argument, it + can be enclosed in either single or double or triple quotes. A long + single argument enclosed in single or double quotes can span multiple + lines if the "&" character is used, as described above. When the + lines are concatenated together (and the "&" characters and line + breaks removed), the text will become a single line. If you want + multiple lines of an argument to retain their line breaks, the text + can be enclosed in triple quotes, in which case "&" characters are + not needed. For example: -Note that neither the curly-bracket or immediate form of variables can -contain nested $ characters for other variables to substitute for. -Thus you cannot do this: + .. code-block:: LAMMPS - -.. code-block:: LAMMPS - - variable a equal 2 - variable b2 equal 4 - print "B2 = ${b$a}" - -Nor can you specify this $($x-1.0) for an immediate variable, but -you could use $(v\_x-1.0), since the latter is valid syntax for an -:doc:`equal-style variable `. - -See the :doc:`variable ` command for more details of how -strings are assigned to variables and evaluated, and how they can be -used in input script commands. - -(4) The line is broken into "words" separated by white-space (tabs, -spaces). Note that words can thus contain letters, digits, -underscores, or punctuation characters. - -(5) The first word is the command name. All successive words in the -line are arguments. - -(6) If you want text with spaces to be treated as a single argument, -it can be enclosed in either single or double or triple quotes. A -long single argument enclosed in single or double quotes can span -multiple lines if the "&" character is used, as described above. When -the lines are concatenated together (and the "&" characters and line -breaks removed), the text will become a single line. If you want -multiple lines of an argument to retain their line breaks, the text -can be enclosed in triple quotes, in which case "&" characters are not -needed. For example: - - -.. code-block:: LAMMPS - - print "Volume = $v" - print 'Volume = $v' - if "${steps} > 1000" then quit - variable a string "red green blue & + print "Volume = $v" + print 'Volume = $v' + if "${steps} > 1000" then quit + variable a string "red green blue & purple orange cyan" - print """ - System volume = $v - System temperature = $t - """ + print """ + System volume = $v + System temperature = $t + """ -In each case, the single, double, or triple quotes are removed when -the single argument they enclose is stored internally. + In each case, the single, double, or triple quotes are removed when + the single argument they enclose is stored internally. -See the :doc:`dump modify format `, :doc:`print `, -:doc:`if `, and :doc:`python ` commands for examples. + See the :doc:`dump modify format `, :doc:`print + `, :doc:`if `, and :doc:`python ` commands for + examples. -A "#" or "$" character that is between quotes will not be treated as a -comment indicator in (2) or substituted for as a variable in (3). + A "#" or "$" character that is between quotes will not be treated as + a comment indicator in :ref:`2 ` or substituted for as a + variable in :ref:`3 `. .. note:: diff --git a/doc/src/Commands_structure.rst b/doc/src/Commands_structure.rst index cd96007bf2..9b5a466340 100644 --- a/doc/src/Commands_structure.rst +++ b/doc/src/Commands_structure.rst @@ -8,17 +8,20 @@ page. A LAMMPS input script typically has 4 parts: -1. Initialization -2. Atom definition -3. Settings -4. Run a simulation +1. :ref:`Initialization ` +2. :ref:`System definition ` +3. :ref:`Simulation settings ` +4. :ref:`Run a simulation ` The last 2 parts can be repeated as many times as desired. I.e. run a simulation, change some settings, run some more, etc. Each of the 4 parts is now described in more detail. Remember that almost all commands need only be used if a non-default value is desired. -(1) Initialization +.. _init: + +Initialization +------------------------------ Set parameters that need to be defined before atoms are created or read-in from a file. @@ -34,23 +37,33 @@ commands tell LAMMPS what kinds of force fields are being used: :doc:`angle_style `, :doc:`dihedral_style `, :doc:`improper_style `. -(2) Atom definition +.. _system: -There are 3 ways to define atoms in LAMMPS. Read them in from a data -or restart file via the :doc:`read_data ` or -:doc:`read_restart ` commands. These files can contain -molecular topology information. Or create atoms on a lattice (with no -molecular topology), using these commands: :doc:`lattice `, -:doc:`region `, :doc:`create_box `, -:doc:`create_atoms `. The entire set of atoms can be -duplicated to make a larger simulation using the -:doc:`replicate ` command. +System definition +------------------------------ -(3) Settings +There are 3 ways to define the simulation cell and reserve space for +force field info and fill it with atoms in LAMMPS. Read them in from +(1) a data file or (2) a restart file via the :doc:`read_data +` or :doc:`read_restart ` commands, +respectively. These files can also contain molecular topology +information. Or (3) create a simulation cell and fill it with atoms on +a lattice (with no molecular topology), using these commands: +:doc:`lattice `, :doc:`region `, :doc:`create_box +`, :doc:`create_atoms ` or +:doc:`read_dump `. + +The entire set of atoms can be duplicated to make a larger simulation +using the :doc:`replicate ` command. + +.. _settings: + +Simulation settings +------------------------------ Once atoms and molecular topology are defined, a variety of settings can be specified: force field coefficients, simulation parameters, -output options, etc. +output options, and more. Force field coefficients are set by these commands (they can also be set in the read-in files): :doc:`pair_coeff `, @@ -77,7 +90,10 @@ commands. Output options are set by the :doc:`thermo `, :doc:`dump `, and :doc:`restart ` commands. -(4) Run a simulation +.. _run: + +Run a simulation +------------------------------ A molecular dynamics simulation is run using the :doc:`run ` command. Energy minimization (molecular statics) is performed using diff --git a/doc/src/Eqs/e3b.jpg b/doc/src/Eqs/e3b.jpg deleted file mode 100644 index d3b07da409..0000000000 Binary files a/doc/src/Eqs/e3b.jpg and /dev/null differ diff --git a/doc/src/Eqs/e3b.tex b/doc/src/Eqs/e3b.tex deleted file mode 100644 index 550538bf35..0000000000 --- a/doc/src/Eqs/e3b.tex +++ /dev/null @@ -1,15 +0,0 @@ -\documentclass[12pt]{article} -\usepackage{amsmath} -\begin{document} - -\begin{align*} -E =& E_2 \sum_{i,j}e^{-k_2 r_{ij}} + E_A \sum_{\substack{i,j,k,\ell \\\in \textrm{type A}}} f(r_{ij})f(r_{k\ell}) + E_B \sum_{\substack{i,j,k,\ell \\\in \textrm{type B}}} f(r_{ij})f(r_{k\ell}) + E_C \sum_{\substack{i,j,k,\ell \\\in \textrm{type C}}} f(r_{ij})f(r_{k\ell}) \\ -f(r) =& e^{-k_3 r}s(r) \\ -s(r) =& \begin{cases} - 1 & rR_f\\ -\end{cases} -\end{align*} - -\end{document} diff --git a/doc/src/Eqs/eff_ECP1.jpg b/doc/src/Eqs/eff_ECP1.jpg deleted file mode 100644 index 3b8a3f8ff3..0000000000 Binary files a/doc/src/Eqs/eff_ECP1.jpg and /dev/null differ diff --git a/doc/src/Eqs/eff_ECP1.tex b/doc/src/Eqs/eff_ECP1.tex deleted file mode 100644 index ebd581163c..0000000000 --- a/doc/src/Eqs/eff_ECP1.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ -E_{Pauli(ECP_s)}=p_1\exp\left(-\frac{p_2r^2}{p_3+s^2} \right) -$$ - -\end{document} \ No newline at end of file diff --git a/doc/src/Eqs/eff_ECP2.jpg b/doc/src/Eqs/eff_ECP2.jpg deleted file mode 100644 index 195ed55e43..0000000000 Binary files a/doc/src/Eqs/eff_ECP2.jpg and /dev/null differ diff --git a/doc/src/Eqs/eff_ECP2.tex b/doc/src/Eqs/eff_ECP2.tex deleted file mode 100644 index 0c3c366562..0000000000 --- a/doc/src/Eqs/eff_ECP2.tex +++ /dev/null @@ -1,8 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ -E_{Pauli(ECP_p)}=p_1\left( \frac{2}{p_2/s+s/p_2} \right)\left( r-p_3s\right)^2\exp \left[ -\frac{p_4\left( r-p_3s \right)^2}{p_5+s^2} \right] -$$ - \end{document} \ No newline at end of file diff --git a/doc/src/Eqs/eff_KE.jpg b/doc/src/Eqs/eff_KE.jpg deleted file mode 100644 index 40eed0df65..0000000000 Binary files a/doc/src/Eqs/eff_KE.jpg and /dev/null differ diff --git a/doc/src/Eqs/eff_KE.tex b/doc/src/Eqs/eff_KE.tex deleted file mode 100644 index 9f9af2fa25..0000000000 --- a/doc/src/Eqs/eff_KE.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -E_{KE} = \frac{\hbar^2 }{{m_{e} }}\sum\limits_i {\frac{3}{{2s_i^2 }}} -$$ - -\end{document} diff --git a/doc/src/Eqs/eff_NN.jpg b/doc/src/Eqs/eff_NN.jpg deleted file mode 100644 index c3c52e19b4..0000000000 Binary files a/doc/src/Eqs/eff_NN.jpg and /dev/null differ diff --git a/doc/src/Eqs/eff_NN.tex b/doc/src/Eqs/eff_NN.tex deleted file mode 100644 index 4f9bb6d132..0000000000 --- a/doc/src/Eqs/eff_NN.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -E_{NN} = \frac{1}{{4\pi \varepsilon _0 }}\sum\limits_{i < j} {\frac{{Z_i Z_j }}{{R_{ij} }}} -$$ - -\end{document} diff --git a/doc/src/Eqs/eff_Ne.jpg b/doc/src/Eqs/eff_Ne.jpg deleted file mode 100644 index e23ceacc88..0000000000 Binary files a/doc/src/Eqs/eff_Ne.jpg and /dev/null differ diff --git a/doc/src/Eqs/eff_Ne.tex b/doc/src/Eqs/eff_Ne.tex deleted file mode 100644 index e6813b125c..0000000000 --- a/doc/src/Eqs/eff_Ne.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -E_{Ne} = - \frac{1}{{4\pi \varepsilon _0 }}\sum\limits_{i,j} {\frac{{Z_i }}{{R_{ij} }}Erf\left( {\frac{{\sqrt 2 R_{ij} }}{{s_j }}} \right)} -$$ - -\end{document} diff --git a/doc/src/Eqs/eff_Pauli.jpg b/doc/src/Eqs/eff_Pauli.jpg deleted file mode 100644 index 61bb8652e3..0000000000 Binary files a/doc/src/Eqs/eff_Pauli.jpg and /dev/null differ diff --git a/doc/src/Eqs/eff_Pauli.tex b/doc/src/Eqs/eff_Pauli.tex deleted file mode 100644 index b6b8070cc7..0000000000 --- a/doc/src/Eqs/eff_Pauli.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -E_{Pauli} = \sum\limits_{\sigma _i = \sigma _j } {E\left( { \uparrow \uparrow } \right)_{ij}} + \sum\limits_{\sigma _i \ne \sigma _j } {E\left( { \uparrow \downarrow } \right)_{ij}} -$$ - -\end{document} diff --git a/doc/src/Eqs/eff_ee.jpg b/doc/src/Eqs/eff_ee.jpg deleted file mode 100644 index aef84d0fd4..0000000000 Binary files a/doc/src/Eqs/eff_ee.jpg and /dev/null differ diff --git a/doc/src/Eqs/eff_ee.tex b/doc/src/Eqs/eff_ee.tex deleted file mode 100644 index 5d17e5557b..0000000000 --- a/doc/src/Eqs/eff_ee.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -E_{ee} = \frac{1}{{4\pi \varepsilon _0 }}\sum\limits_{i < j} {\frac{1}{{r_{ij} }}Erf\left( {\frac{{\sqrt 2 r_{ij} }}{{\sqrt {s_i^2 + s_j^2 } }}} \right)} -$$ - -\end{document} diff --git a/doc/src/Eqs/eff_energy_expression.jpg b/doc/src/Eqs/eff_energy_expression.jpg deleted file mode 100644 index e06fe8ff2f..0000000000 Binary files a/doc/src/Eqs/eff_energy_expression.jpg and /dev/null differ diff --git a/doc/src/Eqs/eff_energy_expression.tex b/doc/src/Eqs/eff_energy_expression.tex deleted file mode 100644 index f56380f646..0000000000 --- a/doc/src/Eqs/eff_energy_expression.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -U\left(R,r,s\right) = E_{NN} \left( R \right) + E_{Ne} \left( {R,r,s} \right) + E_{ee} \left( {r,s} \right) + E_{KE} \left( {r,s} \right) + E_{PR} \left( { \uparrow \downarrow ,S} \right) -$$ - -\end{document} diff --git a/doc/src/Eqs/fix_langevin_spin_sLLG.jpg b/doc/src/Eqs/fix_langevin_spin_sLLG.jpg deleted file mode 100644 index f83aadd9eb..0000000000 Binary files a/doc/src/Eqs/fix_langevin_spin_sLLG.jpg and /dev/null differ diff --git a/doc/src/Eqs/fix_langevin_spin_sLLG.tex b/doc/src/Eqs/fix_langevin_spin_sLLG.tex deleted file mode 100644 index 346dde9cec..0000000000 --- a/doc/src/Eqs/fix_langevin_spin_sLLG.tex +++ /dev/null @@ -1,14 +0,0 @@ -\documentclass[preview]{standalone} -\usepackage{varwidth} -\usepackage[utf8x]{inputenc} -\usepackage{amsmath, amssymb, graphics, setspace} - -\begin{document} -\begin{varwidth}{50in} - \begin{equation} - \frac{d \vec{s}_{i}}{dt} = \frac{1}{\left(1+\lambda^2 \right)} \left( \left( - \vec{\omega}_{i} +\vec{\eta} \right) \times \vec{s}_{i} + \lambda\, \vec{s}_{i} - \times\left( \vec{\omega}_{i} \times\vec{s}_{i} \right) \right), \nonumber - \end{equation} -\end{varwidth} -\end{document} diff --git a/doc/src/Eqs/fix_ti_spring_force.jpg b/doc/src/Eqs/fix_ti_spring_force.jpg deleted file mode 100644 index 584535a1bc..0000000000 Binary files a/doc/src/Eqs/fix_ti_spring_force.jpg and /dev/null differ diff --git a/doc/src/Eqs/fix_ti_spring_force.tex b/doc/src/Eqs/fix_ti_spring_force.tex deleted file mode 100644 index 356f7d3ccc..0000000000 --- a/doc/src/Eqs/fix_ti_spring_force.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentclass[12pt]{article} - -\usepackage{amsmath} - -\begin{document} - -$$ - F = \left( 1-\lambda \right) F_{\text{solid}} + \lambda F_{\text{harm}} -$$ - -\end{document} diff --git a/doc/src/Eqs/fix_ti_spring_function_1.jpg b/doc/src/Eqs/fix_ti_spring_function_1.jpg deleted file mode 100644 index ef2698f34b..0000000000 Binary files a/doc/src/Eqs/fix_ti_spring_function_1.jpg and /dev/null differ diff --git a/doc/src/Eqs/fix_ti_spring_function_1.tex b/doc/src/Eqs/fix_ti_spring_function_1.tex deleted file mode 100644 index 0673410b00..0000000000 --- a/doc/src/Eqs/fix_ti_spring_function_1.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - \lambda(\tau) = \tau -$$ - -\end{document} diff --git a/doc/src/Eqs/fix_ti_spring_function_2.jpg b/doc/src/Eqs/fix_ti_spring_function_2.jpg deleted file mode 100644 index 6f12b90c78..0000000000 Binary files a/doc/src/Eqs/fix_ti_spring_function_2.jpg and /dev/null differ diff --git a/doc/src/Eqs/fix_ti_spring_function_2.tex b/doc/src/Eqs/fix_ti_spring_function_2.tex deleted file mode 100644 index f2cb51e47d..0000000000 --- a/doc/src/Eqs/fix_ti_spring_function_2.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - \lambda(\tau) = \tau^5 \left( 70 \tau^4 - 315 \tau^3 + 540 \tau^2 - 420 \tau + 126 \right) -$$ - -\end{document} diff --git a/doc/src/Eqs/fld.jpg b/doc/src/Eqs/fld.jpg deleted file mode 100644 index 3d80d436ff..0000000000 Binary files a/doc/src/Eqs/fld.jpg and /dev/null differ diff --git a/doc/src/Eqs/fld.tex b/doc/src/Eqs/fld.tex deleted file mode 100644 index 7c75cfbe60..0000000000 --- a/doc/src/Eqs/fld.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ -F^{H} = -R_{FU}(U-U^{\infty}) + R_{FE}E^{\infty} -$$ - -\end{document} diff --git a/doc/src/Eqs/fld2.jpg b/doc/src/Eqs/fld2.jpg deleted file mode 100644 index 42de943c90..0000000000 Binary files a/doc/src/Eqs/fld2.jpg and /dev/null differ diff --git a/doc/src/Eqs/fld2.tex b/doc/src/Eqs/fld2.tex deleted file mode 100644 index 43adae11db..0000000000 --- a/doc/src/Eqs/fld2.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ --R_{FU}(U-U^{\infty}) = -R_{FE}E^{\infty} - F^{rest} -$$ - -\end{document} diff --git a/doc/src/Eqs/heat_flux_J.jpg b/doc/src/Eqs/heat_flux_J.jpg deleted file mode 100644 index cf3e220caa..0000000000 Binary files a/doc/src/Eqs/heat_flux_J.jpg and /dev/null differ diff --git a/doc/src/Eqs/heat_flux_J.tex b/doc/src/Eqs/heat_flux_J.tex deleted file mode 100644 index 53c0ff494a..0000000000 --- a/doc/src/Eqs/heat_flux_J.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} -\mathbf{J} & = & \frac{1}{V} \left[ \sum_i e_i \mathbf{v}_i - \sum_{i} \mathbf{S}_{i} \mathbf{v}_i \right] \\ -& = & \frac{1}{V} \left[ \sum_i e_i \mathbf{v}_i + \sum_{i r_{\rm out} \\ - E & = & C(r) \qquad \qquad \qquad r < r_{\rm in} \\ - & = & S(r) * C(r) \qquad \qquad r_{\rm in} < r < r_{\rm out} \\ - & = & 0 \qquad \qquad \qquad \qquad r > r_{\rm out} \\ - LJ(r) & = & 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - - \left(\frac{\sigma}{r}\right)^6 \right] \\ - C(r) & = & \frac{C q_i q_j}{ \epsilon r} \\ - S(r) & = & \frac{ \left[r_{\rm out}^2 - r^2\right]^2 - \left[r_{\rm out}^2 + 2r^2 - 3{r_{\rm in}^2}\right]} - { \left[r_{\rm out}^2 - {r_{\rm in}}^2\right]^3 } -\end{eqnarray*} - -\end{document} - - diff --git a/doc/src/Eqs/pair_class2.jpg b/doc/src/Eqs/pair_class2.jpg deleted file mode 100644 index abec072e79..0000000000 Binary files a/doc/src/Eqs/pair_class2.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_class2.tex b/doc/src/Eqs/pair_class2.tex deleted file mode 100644 index e2acc00bb6..0000000000 --- a/doc/src/Eqs/pair_class2.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - E = \epsilon \left[ 2 \left(\frac{\sigma}{r}\right)^9 - - 3 \left(\frac{\sigma}{r}\right)^6 \right] - \qquad r < r_c -$$ - -\end{document} \ No newline at end of file diff --git a/doc/src/Eqs/pair_cmm.jpg b/doc/src/Eqs/pair_cmm.jpg deleted file mode 100644 index 1ec60f7305..0000000000 Binary files a/doc/src/Eqs/pair_cmm.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_cmm.tex b/doc/src/Eqs/pair_cmm.tex deleted file mode 100644 index 9bab1e9002..0000000000 --- a/doc/src/Eqs/pair_cmm.tex +++ /dev/null @@ -1,16 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} - E = & \frac{27}{4} \epsilon \left[ \left(\frac{\sigma}{r}\right)^{9} - - \left(\frac{\sigma}{r}\right)^6 \right] & - \qquad r < r_c \\ - E = & \frac{3\sqrt{3}}{2} \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - - \left(\frac{\sigma}{r}\right)^4 \right] & - \qquad r < r_c \\ - E = & 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - - \left(\frac{\sigma}{r}\right)^6 \right] & - \qquad r < r_c -\end{eqnarray*} -\end{document} diff --git a/doc/src/Eqs/pair_colloid_cc.jpg b/doc/src/Eqs/pair_colloid_cc.jpg deleted file mode 100644 index a64094ddad..0000000000 Binary files a/doc/src/Eqs/pair_colloid_cc.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_colloid_cc.tex b/doc/src/Eqs/pair_colloid_cc.tex deleted file mode 100644 index e1485d325a..0000000000 --- a/doc/src/Eqs/pair_colloid_cc.tex +++ /dev/null @@ -1,31 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -\begin{eqnarray} -U_A &=& - \frac{A_{cc}}{6} \left[ - \frac{2 a_1 a_2}{r^2-\left(a_1+a_2\right)^2} - + \frac{2 a_1 a_2}{r^2 - \left(a_1 - a_2\right)^2} - + \mathrm{ln} - \left( - \frac{r^2-\left(a_1+a_2\right)^2}{r^2-\left(a_1-a_2\right)^2} - \right) - \right] \nonumber \\ -\nonumber \\ -U_R &=& \frac{A_{cc}}{37800} \frac{\sigma^6}{r} -\left[ \frac{}{} \right. \nonumber \\ - &&\qquad \frac{r^2-7r\left(a_1+a_2\right)+6\left(a_1^2+7a_1a_2+a_2^2\right)} - {\left(r-a_1-a_2\right)^7} \nonumber \\ - &&\qquad +\frac{r^2+7r\left(a_1+a_2\right)+6\left(a_1^2+7a_1a_2+a_2^2\right)} - {\left(r+a_1+a_2\right)^7} \nonumber \\ - &&\qquad -\frac{r^2+7r\left(a_1-a_2\right)+6\left(a_1^2-7a_1a_2+a_2^2\right)} - {\left(r+a_1-a_2\right)^7} \nonumber \\ - &&\qquad \left. -\frac{r^2-7r\left(a_1-a_2\right)+6\left(a_1^2-7a_1a_2+a_2^2\right)} - {\left(r-a_1+a_2\right)^7} - \right] \nonumber \\ -\nonumber \\ -U &=& U_A + U_R, \qquad r < r_c \nonumber -\end{eqnarray} - -\end{document} - diff --git a/doc/src/Eqs/pair_colloid_cs.jpg b/doc/src/Eqs/pair_colloid_cs.jpg deleted file mode 100644 index 8f5948fa54..0000000000 Binary files a/doc/src/Eqs/pair_colloid_cs.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_colloid_cs.tex b/doc/src/Eqs/pair_colloid_cs.tex deleted file mode 100644 index 760215ee08..0000000000 --- a/doc/src/Eqs/pair_colloid_cs.tex +++ /dev/null @@ -1,12 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -\begin{eqnarray} - U &=& \frac{2 ~ a^3 ~ \sigma^3 ~ A_{cs}}{9 \left( a^2 - r^2 \right)^3} - \left[ 1 - \frac{\left(5 ~ a^6+45~a^4~r^2+63~a^2~r^4+15~r^6\right) \sigma^6} - {15 \left(a-r\right)^6 \left( a+r \right)^6} \right], ~~ r < r_c \nonumber -\end{eqnarray} - -\end{document} - diff --git a/doc/src/Eqs/pair_colloid_ss.jpg b/doc/src/Eqs/pair_colloid_ss.jpg deleted file mode 100644 index 4ce19ba1e8..0000000000 Binary files a/doc/src/Eqs/pair_colloid_ss.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_colloid_ss.tex b/doc/src/Eqs/pair_colloid_ss.tex deleted file mode 100644 index 1cc511ed06..0000000000 --- a/doc/src/Eqs/pair_colloid_ss.tex +++ /dev/null @@ -1,12 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -\begin{eqnarray} - U &=& \frac{A_{ss}}{36} \left[ \left( \frac{\sigma}{r} - \right)^{12} - \left( \frac{ \sigma}{r} \right)^6 \right], ~~ - r < r_c \nonumber -\end{eqnarray} - -\end{document} - diff --git a/doc/src/Eqs/pair_comb1.jpg b/doc/src/Eqs/pair_comb1.jpg deleted file mode 100644 index e0711ca972..0000000000 Binary files a/doc/src/Eqs/pair_comb1.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_comb1.tex b/doc/src/Eqs/pair_comb1.tex deleted file mode 100644 index 82c6be056e..0000000000 --- a/doc/src/Eqs/pair_comb1.tex +++ /dev/null @@ -1,7 +0,0 @@ -\documentclass[12pt]{article} -\begin{document} \large -\begin{eqnarray*} -E_T & = & \sum_i [ E_i^{self} (q_i) + \sum_{j>i} [E_{ij}^{short} (r_{ij}, q_i, q_j) + E_{ij}^{Coul} (r_{ij}, q_i, q_j)] + \\ -&& E^{polar} (q_i, r_{ij}) + E^{vdW} (r_{ij}) + E^{barr} (q_i) + E^{corr} (r_{ij}, \theta_{jik})] \\ -\end{eqnarray*} -\end{document} diff --git a/doc/src/Eqs/pair_comb2.jpg b/doc/src/Eqs/pair_comb2.jpg deleted file mode 100644 index 8b0e5ba51a..0000000000 Binary files a/doc/src/Eqs/pair_comb2.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_comb2.tex b/doc/src/Eqs/pair_comb2.tex deleted file mode 100644 index 3ba72f0726..0000000000 --- a/doc/src/Eqs/pair_comb2.tex +++ /dev/null @@ -1,23 +0,0 @@ -\documentclass[10pt]{article} - -\begin{document} - -\begin{table}[h] -\begin{tabular}{|c|c|c|c|c|c|c|c|c|} -\hline - & $O$ & $Cu$ & $N$ & $C$ & $H$ & $Ti$ & $Zn$ & $Zr$ \\ \hline -$O$ & F & F & F & F & F & F & F & F\\ \hline -$Cu$ & F & F & P & F & F & P & F & P \\ \hline -$N$ & F & P & F & M & F & P & P & P \\ \hline -$C$ & F & F & M & F & F & M & M & M \\ \hline -$H$ & F & F & F & F & F & M & M & F \\ \hline -$Ti$ & F & P & P & M & M & F & P & P \\ \hline -$Zn$ & F & F & P & M & M & P & F & P \\ \hline -$Zr$ & F & P & P & M & F & P & P & F \\ \hline -\multicolumn{9}{l}{F: Fully optimized} \\ -\multicolumn{9}{l}{M: Only optimized for dimer molecule} \\ -\multicolumn{9}{l}{P: in Progress but have it from mixing rule} \\ -\end{tabular} -\end{table} - -\end{document} diff --git a/doc/src/Eqs/pair_cosine_squared.jpg b/doc/src/Eqs/pair_cosine_squared.jpg deleted file mode 100644 index 682800652d..0000000000 Binary files a/doc/src/Eqs/pair_cosine_squared.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_cosine_squared.tex b/doc/src/Eqs/pair_cosine_squared.tex deleted file mode 100644 index 96ac6a305e..0000000000 --- a/doc/src/Eqs/pair_cosine_squared.tex +++ /dev/null @@ -1,16 +0,0 @@ -\documentclass[12pt]{article} - -\usepackage{amsmath} - -\begin{document} - -\begin{align*} -E = -\begin{cases} --\epsilon& \quad r < \sigma \\ --\epsilon\cos\left(\frac{\pi\left(r - \sigma\right)}{2\left(r_c - \sigma\right)}\right)&\quad \sigma \leq r < r_c \\ -0& \quad r \geq r_c -\end{cases} -\end{align*} - -\end{document} diff --git a/doc/src/Eqs/pair_cosine_squared_wca.jpg b/doc/src/Eqs/pair_cosine_squared_wca.jpg deleted file mode 100644 index 086bc63673..0000000000 Binary files a/doc/src/Eqs/pair_cosine_squared_wca.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_cosine_squared_wca.tex b/doc/src/Eqs/pair_cosine_squared_wca.tex deleted file mode 100644 index c086be9306..0000000000 --- a/doc/src/Eqs/pair_cosine_squared_wca.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - E = \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - - 2\left(\frac{\sigma}{r}\right)^6 + 1\right] - , \quad r < \sigma -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_coul_diel.jpg b/doc/src/Eqs/pair_coul_diel.jpg deleted file mode 100644 index 70cb84f7a5..0000000000 Binary files a/doc/src/Eqs/pair_coul_diel.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_coul_diel.tex b/doc/src/Eqs/pair_coul_diel.tex deleted file mode 100644 index f0b893d887..0000000000 --- a/doc/src/Eqs/pair_coul_diel.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} -\pagestyle{empty} -\begin{document} - -\begin{eqnarray*} - E & = & \frac{Cq_iq_j}{\epsilon r} \left( \frac{\epsilon}{\epsilon_D(r)}-1\right) \qquad r < r_c \\ - \epsilon_D(r) & = & \frac{5.2+\epsilon}{2} + \frac{\epsilon-5.2}{2}\tanh\left(\frac{r-r_{me}}{\sigma_e}\right) -\end{eqnarray*} -\end{document} diff --git a/doc/src/Eqs/pair_coul_dsf.jpg b/doc/src/Eqs/pair_coul_dsf.jpg deleted file mode 100644 index a891b3ad15..0000000000 Binary files a/doc/src/Eqs/pair_coul_dsf.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_coul_dsf.tex b/doc/src/Eqs/pair_coul_dsf.tex deleted file mode 100644 index ec69680fc8..0000000000 --- a/doc/src/Eqs/pair_coul_dsf.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} -$$ - E = - q_iq_j \left[ \frac{\mbox{erfc} (\alpha r)}{r} - \frac{\mbox{erfc} (\alpha r_c)}{r_c} + - \left( \frac{\mbox{erfc} (\alpha r_c)}{r_c^2} + \frac{2\alpha}{\sqrt{\pi}}\frac{\exp (-\alpha^2 r^2_c)}{r_c} \right)(r-r_c) \right] \qquad r < r_c -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_coul_gauss.jpg b/doc/src/Eqs/pair_coul_gauss.jpg deleted file mode 100644 index c286650eb2..0000000000 Binary files a/doc/src/Eqs/pair_coul_gauss.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_coul_gauss.tex b/doc/src/Eqs/pair_coul_gauss.tex deleted file mode 100644 index 1eb9c05a6f..0000000000 --- a/doc/src/Eqs/pair_coul_gauss.tex +++ /dev/null @@ -1,15 +0,0 @@ -\documentclass[12pt]{article} - -\pagestyle{empty} -\begin{document} - -$$ - E = \frac{C_{q_i q_j}}{\epsilon r_{ij}}\,\, \textrm{erf}\left(\alpha_{ij} r_{ij}\right)\quad\quad\quad r < r_c -$$ - -\end{document} - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: t -%%% End: diff --git a/doc/src/Eqs/pair_coul_shield.jpg b/doc/src/Eqs/pair_coul_shield.jpg deleted file mode 100644 index 83eb059ac8..0000000000 Binary files a/doc/src/Eqs/pair_coul_shield.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_coul_shield.tex b/doc/src/Eqs/pair_coul_shield.tex deleted file mode 100644 index bd92fb6801..0000000000 --- a/doc/src/Eqs/pair_coul_shield.tex +++ /dev/null @@ -1,33 +0,0 @@ -\documentclass[aps,pr,onecolumn,superscriptaddress,noshowpacs,a4paper,15pt]{revtex4} -\pdfoutput=1 -\bibliographystyle{apsrev4} -\usepackage{color} -\usepackage{dcolumn} %Align table columns on decimal point -\usepackage{amssymb} -\usepackage{amsmath} -\usepackage{amsthm} -\usepackage{graphicx} -\usepackage[pdftex]{hyperref} -\hypersetup{colorlinks=true,citecolor=blue,linkcolor=red,urlcolor=blue} -\usepackage[all]{hypcap} -\newcommand{\red}{\color{red}} -\newcommand{\blue}{\color{blue}} -\definecolor{green}{rgb}{0,0.5,0} -\newcommand{\green}{\color{green}} -\newcommand{\white}{\color{white}} -%\newcommand{\cite}[1]{\hspace{-1 ex} % \nocite{#1}\citenum{#1}} -\thickmuskip=0.5\thickmuskip %shorter spaces in math - -\begin{document} -\begingroup -\Large -\begin{eqnarray*} - E & = & \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\[15pt] - V_{ij} & = & {\rm Tap}(r_{ij})\frac{\kappa q_i q_j}{\sqrt[3]{r_{ij}^3+(1/\lambda_{ij})^3}}\\[15pt] - {\rm Tap}(r_{ij}) & = & 20\left ( \frac{r_{ij}}{R_{cut}} \right )^7 - - 70\left ( \frac{r_{ij}}{R_{cut}} \right )^6 + - 84\left ( \frac{r_{ij}}{R_{cut}} \right )^5 - - 35\left ( \frac{r_{ij}}{R_{cut}} \right )^4 + 1 -\end{eqnarray*} -\endgroup -\end{document} diff --git a/doc/src/Eqs/pair_coul_wolf.jpg b/doc/src/Eqs/pair_coul_wolf.jpg deleted file mode 100644 index fd64cb6c03..0000000000 Binary files a/doc/src/Eqs/pair_coul_wolf.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_coul_wolf.tex b/doc/src/Eqs/pair_coul_wolf.tex deleted file mode 100644 index 4a6592638f..0000000000 --- a/doc/src/Eqs/pair_coul_wolf.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} -$$ - E_i = \frac{1}{2} \sum_{j \neq i} - \frac{q_i q_j {\rm erfc}(\alpha r_{ij})}{r_{ij}} + - \frac{1}{2} \sum_{j \neq i} - \frac{q_i q_j {\rm erf}(\alpha r_{ij})}{r_{ij}} \qquad r < r_c -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_coulgauss.jpg b/doc/src/Eqs/pair_coulgauss.jpg deleted file mode 100644 index bf84d90c4a..0000000000 Binary files a/doc/src/Eqs/pair_coulgauss.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_coulgauss.tex b/doc/src/Eqs/pair_coulgauss.tex deleted file mode 100644 index 216d3b3360..0000000000 --- a/doc/src/Eqs/pair_coulgauss.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - \thispagestyle{empty} -\begin{eqnarray*} - E &=& \frac{q_i q_j \mathrm{erf}\left( r/\sqrt{\gamma_1^2+\gamma_2^2} \right) }{\epsilon r_{ij}} -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_coulomb.jpg b/doc/src/Eqs/pair_coulomb.jpg deleted file mode 100644 index 39aaebac31..0000000000 Binary files a/doc/src/Eqs/pair_coulomb.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_coulomb.tex b/doc/src/Eqs/pair_coulomb.tex deleted file mode 100644 index 9dacdc1af3..0000000000 --- a/doc/src/Eqs/pair_coulomb.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - E = \frac{C q_i q_j}{\epsilon r} \qquad r < r_c -$$ - -\end{document} \ No newline at end of file diff --git a/doc/src/Eqs/pair_cs.jpg b/doc/src/Eqs/pair_cs.jpg deleted file mode 100644 index b870a3bdf4..0000000000 Binary files a/doc/src/Eqs/pair_cs.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_cs.tex b/doc/src/Eqs/pair_cs.tex deleted file mode 100644 index b7eacb8d5b..0000000000 --- a/doc/src/Eqs/pair_cs.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - E = \frac{C q_i q_j}{\epsilon (r + r_{min})} \qquad r \rightarrow 0 -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_debye.jpg b/doc/src/Eqs/pair_debye.jpg deleted file mode 100644 index 42bcb5cc63..0000000000 Binary files a/doc/src/Eqs/pair_debye.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_debye.tex b/doc/src/Eqs/pair_debye.tex deleted file mode 100644 index 392a6516ce..0000000000 --- a/doc/src/Eqs/pair_debye.tex +++ /dev/null @@ -1,8 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} -$$ - E = \frac{C q_i q_j}{\epsilon r} \exp(- \kappa r) \qquad r < r_c -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_dipole.jpg b/doc/src/Eqs/pair_dipole.jpg deleted file mode 100644 index e106c17c91..0000000000 Binary files a/doc/src/Eqs/pair_dipole.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_dipole.tex b/doc/src/Eqs/pair_dipole.tex deleted file mode 100644 index bc0ae82f80..0000000000 --- a/doc/src/Eqs/pair_dipole.tex +++ /dev/null @@ -1,38 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} -E_{LJ} & = & 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - - \left(\frac{\sigma}{r}\right)^6 \right] \\ -E_{qq} & = & \frac{q_i q_j}{r} \\ -E_{qp} & = & \frac{q}{r^3} (p \bullet \vec{r}) \\ -E_{pp} & = & \frac{1}{r^3} (\vec{p_i} \bullet \vec{p_j}) - - \frac{3}{r^5} (\vec{p_i} \bullet \vec{r}) (\vec{p_j} \bullet \vec{r}) -\end{eqnarray*} - -\begin{eqnarray*} -F_{qq} & = & \frac{q_i q_j}{r^3} \vec{r} \\ -F_{qp} & = & -\frac{q}{r^3} \vec{p} + \frac{3q}{r^5} - (\vec{p} \bullet \vec{r}) \vec{r} \\ -F_{pp} & = & \frac{3}{r^5} (\vec{p_i} \bullet \vec{p_j}) \vec{r} - - \frac{15}{r^7} (\vec{p_i} \bullet \vec{r}) - (\vec{p_j} \bullet \vec{r}) \vec{r} + - \frac{3}{r^5} \left[ (\vec{p_j} \bullet \vec{r}) \vec{p_i} + - (\vec{p_i} \bullet \vec{r}) \vec{p_j} \right] -\end{eqnarray*} - -\begin{eqnarray*} -T_{pq} = T_{ij} & = & \frac{q_j}{r^3} (\vec{p_i} \times \vec{r}) \\ -T_{qp} = T_{ji} & = & - \frac{q_i}{r^3} (\vec{p_j} \times \vec{r}) \\ -T_{pp} = T_{ij} & = & -\frac{1}{r^3} (\vec{p_i} \times \vec{p_j}) + - \frac{3}{r^5} (\vec{p_j} \bullet \vec{r}) - (\vec{p_i} \times \vec{r}) \\ -T_{pp} = T_{ji} & = & -\frac{1}{r^3} (\vec{p_j} \times \vec{p_i}) + - \frac{3}{r^5} (\vec{p_i} \bullet \vec{r}) - (\vec{p_j} \times \vec{r}) \\ -\end{eqnarray*} - -\end{document} - - diff --git a/doc/src/Eqs/pair_dipole_sf.jpg b/doc/src/Eqs/pair_dipole_sf.jpg deleted file mode 100644 index c591534550..0000000000 Binary files a/doc/src/Eqs/pair_dipole_sf.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_dipole_sf.tex b/doc/src/Eqs/pair_dipole_sf.tex deleted file mode 100644 index c653a37740..0000000000 --- a/doc/src/Eqs/pair_dipole_sf.tex +++ /dev/null @@ -1,51 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} -E_{LJ} & = & 4\epsilon \left\{ \left[ \left( \frac{\sigma}{r} \right)^{\!12} - - \left( \frac{\sigma}{r} \right)^{\!6} \right] + - \left[ 6\left( \frac{\sigma}{r_c} \right)^{\!12} - - 3\left(\frac{\sigma}{r_c}\right)^{\!6}\right]\left(\frac{r}{r_c}\right)^{\!2} - - 7\left( \frac{\sigma}{r_c} \right)^{\!12} + - 4\left( \frac{\sigma}{r_c} \right)^{\!6}\right\} \\ -E_{qq} & = & \frac{q_i q_j}{r}\left(1-\frac{r}{r_c}\right)^{\!2} \\ -E_{pq} & = & E_{ji} = -\frac{q}{r^3} \left[ 1 - - 3\left(\frac{r}{r_c}\right)^{\!2} + - 2\left(\frac{r}{r_c}\right)^{\!3}\right] (\vec{p}\bullet\vec{r}) \\ -E_{qp} & = & E_{ij} = \frac{q}{r^3} \left[ 1 - - 3\left(\frac{r}{r_c}\right)^{\!2} + - 2\left(\frac{r}{r_c}\right)^{\!3}\right] (\vec{p}\bullet\vec{r}) \\ -E_{pp} & = & \left[1-4\left(\frac{r}{r_c}\right)^{\!3} + - 3\left(\frac{r}{r_c}\right)^{\!4}\right]\left[\frac{1}{r^3} - (\vec{p_i} \bullet \vec{p_j}) - \frac{3}{r^5} - (\vec{p_i} \bullet \vec{r}) (\vec{p_j} \bullet \vec{r})\right] \\ -\end{eqnarray*} - -\begin{eqnarray*} -F_{LJ} & = & \left\{\left[48\epsilon \left(\frac{\sigma}{r}\right)^{\!12} - - 24\epsilon \left(\frac{\sigma}{r}\right)^{\!6} \right]\frac{1}{r^2} - - \left[48\epsilon \left(\frac{\sigma}{r_c}\right)^{\!12} - 24\epsilon - \left(\frac{\sigma}{r_c}\right)^{\!6} \right]\frac{1}{r_c^2}\right\}\vec{r}\\ -F_{qq} & = & \frac{q_i q_j}{r}\left(\frac{1}{r^2} - - \frac{1}{r_c^2}\right)\vec{r} \\ -F_{pq} &=& F_{ij } = -\frac{3q}{r^5} \left[ 1 - - \left(\frac{r}{r_c}\right)^{\!2}\right](\vec{p}\bullet\vec{r})\vec{r} + - \frac{q}{r^3}\left[1-3\left(\frac{r}{r_c}\right)^{\!2} + - 2\left(\frac{r}{r_c}\right)^{\!3}\right] \vec{p} \\ -F_{qp} &=& F_{ij} = \frac{3q}{r^5} \left[ 1 - - \left(\frac{r}{r_c}\right)^{\!2}\right] (\vec{p}\bullet\vec{r})\vec{r} - - \frac{q}{r^3}\left[1-3\left(\frac{r}{r_c}\right)^{\!2} + - 2\left(\frac{r}{r_c}\right)^{\!3}\right] \vec{p} \\ -F_{pp} & = &\frac{3}{r^5}\Bigg\{\left[1-\left(\frac{r}{r_c}\right)^{\!4}\right] - \left[(\vec{p_i}\bullet\vec{p_j}) - \frac{3}{r^2} (\vec{p_i}\bullet\vec{r}) - (\vec{p_j} \bullet \vec{r})\right] \vec{r} + \\ - & & \left[1 - - 4\left(\frac{r}{r_c}\right)^{\!3}+3\left(\frac{r}{r_c}\right)^{\!4}\right] - \left[ (\vec{p_j} \bullet \vec{r}) \vec{p_i} + (\vec{p_i} \bullet \vec{r}) - \vec{p_j} -\frac{2}{r^2} (\vec{p_i} \bullet \vec{r}) - (\vec{p_j} \bullet \vec{r})\vec{r}\right] \Bigg\} \\ -\end{eqnarray*} - -\end{document} - diff --git a/doc/src/Eqs/pair_dipole_sf2.jpg b/doc/src/Eqs/pair_dipole_sf2.jpg deleted file mode 100644 index b9e57becf6..0000000000 Binary files a/doc/src/Eqs/pair_dipole_sf2.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_dipole_sf2.tex b/doc/src/Eqs/pair_dipole_sf2.tex deleted file mode 100644 index 74758ba230..0000000000 --- a/doc/src/Eqs/pair_dipole_sf2.tex +++ /dev/null @@ -1,24 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} -T_{pq} = T_{ij} & = & \frac{q_j}{r^3} \left[ 1 - - 3\left(\frac{r}{r_c}\right)^{\!2} + - 2\left(\frac{r}{r_c}\right)^{\!3}\right] (\vec{p_i}\times\vec{r}) \\ -T_{qp} = T_{ji} & = & - \frac{q_i}{r^3} \left[ 1 - - 3\left(\frac{r}{r_c}\right)^{\!2} + - 2\left(\frac{r}{r_c}\right)^{\!3} \right] (\vec{p_j}\times\vec{r}) \\ -T_{pp} = T_{ij} & = & -\frac{1}{r^3}\left[1-4\left(\frac{r}{r_c}\right)^{\!3} + - e3\left(\frac{r}{r_c}\right)^{\!4}\right] (\vec{p_i} \times \vec{p_j}) + \\ - & & \frac{3}{r^5}\left[1-4\left(\frac{r}{r_c}\right)^{\!3} + - 3\left(\frac{r}{r_c}\right)^{\!4}\right] (\vec{p_j}\bullet\vec{r}) - (\vec{p_i} \times \vec{r}) \\ -T_{pp} = T_{ji} & = & -\frac{1}{r^3}\left[1-4\left(\frac{r}{r_c}\right)^{\!3} + - 3\left(\frac{r}{r_c}\right)^{\!4}\right](\vec{p_j} \times \vec{p_i}) + \\ - & & \frac{3}{r^5}\left[1-4\left(\frac{r}{r_c}\right)^{\!3} + - 3\left(\frac{r}{r_c}\right)^{\!4}\right] (\vec{p_i} \bullet \vec{r}) - (\vec{p_j} \times \vec{r}) \\ -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_dpd.jpg b/doc/src/Eqs/pair_dpd.jpg deleted file mode 100644 index e9bb8a69af..0000000000 Binary files a/doc/src/Eqs/pair_dpd.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_dpd.tex b/doc/src/Eqs/pair_dpd.tex deleted file mode 100644 index ba47f0d6b6..0000000000 --- a/doc/src/Eqs/pair_dpd.tex +++ /dev/null @@ -1,13 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} - \vec{f} & = & (F^C + F^D + F^R) \hat{r_{ij}} \qquad \qquad r < r_c \\ - F^C & = & A w(r) \\ - F^D & = & - \gamma w^2(r) (\hat{r_{ij}} \bullet \vec{v_{ij}}) \\ - F^R & = & \sigma w(r) \alpha (\Delta t)^{-1/2} \\ - w(r) & = & 1 - r/r_c -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_dpd_energy.jpg b/doc/src/Eqs/pair_dpd_energy.jpg deleted file mode 100644 index 868a1cea01..0000000000 Binary files a/doc/src/Eqs/pair_dpd_energy.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_dpd_energy.tex b/doc/src/Eqs/pair_dpd_energy.tex deleted file mode 100644 index dc3d2759d3..0000000000 --- a/doc/src/Eqs/pair_dpd_energy.tex +++ /dev/null @@ -1,12 +0,0 @@ -\documentclass[12pt]{article} -\pagestyle{empty} -\begin{document} - -\begin{eqnarray*} - du_{i}^{cond} & = & \kappa_{ij}(\frac{1}{\theta_{i}}-\frac{1}{\theta_{j}})\omega_{ij}^{2} + \alpha_{ij}\omega_{ij}\zeta_{ij}^{q}(\Delta{t})^{-1/2} \\ - du_{i}^{mech} & = & -\frac{1}{2}\gamma_{ij}\omega_{ij}^{2}(\frac{\vec{r_{ij}}}{r_{ij}}\bullet\vec{v_{ij}})^{2} - - \frac{\sigma^{2}_{ij}}{4}(\frac{1}{m_{i}}+\frac{1}{m_{j}})\omega_{ij}^{2} - - \frac{1}{2}\sigma_{ij}\omega_{ij}(\frac{\vec{r_{ij}}}{r_{ij}}\bullet\vec{v_{ij}})\zeta_{ij}(\Delta{t})^{-1/2} \\ -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_dpd_energy_terms.jpg b/doc/src/Eqs/pair_dpd_energy_terms.jpg deleted file mode 100644 index c717e15c76..0000000000 Binary files a/doc/src/Eqs/pair_dpd_energy_terms.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_dpd_energy_terms.tex b/doc/src/Eqs/pair_dpd_energy_terms.tex deleted file mode 100644 index c684cedc28..0000000000 --- a/doc/src/Eqs/pair_dpd_energy_terms.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentclass[12pt]{article} -\pagestyle{empty} -\begin{document} - -\begin{eqnarray*} - \alpha_{ij}^{2} & = & 2k_{B}\kappa_{ij} \\ - \sigma^{2}_{ij} & = & 2\gamma_{ij}k_{B}\Theta_{ij} \\ - \Theta_{ij}^{-1} & = & \frac{1}{2}(\frac{1}{\theta_{i}}+\frac{1}{\theta_{j}}) \\ -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_dpd_omega.jpg b/doc/src/Eqs/pair_dpd_omega.jpg deleted file mode 100644 index fd25f00f19..0000000000 Binary files a/doc/src/Eqs/pair_dpd_omega.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_dpd_omega.tex b/doc/src/Eqs/pair_dpd_omega.tex deleted file mode 100644 index fbd533abfa..0000000000 --- a/doc/src/Eqs/pair_dpd_omega.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} -\pagestyle{empty} -\begin{document} - -$$ - \omega_{ij} = 1 - \frac{r_{ij}}{r_{c}} -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_drip.jpg b/doc/src/Eqs/pair_drip.jpg deleted file mode 100644 index a94b4141b0..0000000000 Binary files a/doc/src/Eqs/pair_drip.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_drip.tex b/doc/src/Eqs/pair_drip.tex deleted file mode 100644 index 079a2cdf84..0000000000 --- a/doc/src/Eqs/pair_drip.tex +++ /dev/null @@ -1,14 +0,0 @@ -\documentclass[12pt]{article} -\usepackage{amsmath} -\usepackage{bm} - -\begin{document} - -\begin{eqnarray*} -E &=& \frac{1}{2} \sum_{i} \sum_{j\notin\text{layer}\,i} \phi_{ij} \\\phi_{ij} &=& f_\text{c}(x_r) \left[ e^{-\lambda(r_{ij} - z_0 )} \left[C+f(\rho_{ij})+ g(\rho_{ij}, \{\alpha_{ij}^{(m)}\}) \right]- A\left (\frac{z_0}{r_{ij}} \right)^6 \right] \\ -\end{eqnarray*} - - - - -\end{document} \ No newline at end of file diff --git a/doc/src/Eqs/pair_eam.jpg b/doc/src/Eqs/pair_eam.jpg deleted file mode 100644 index 95c86b4ced..0000000000 Binary files a/doc/src/Eqs/pair_eam.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_eam.tex b/doc/src/Eqs/pair_eam.tex deleted file mode 100644 index 2ea20b2198..0000000000 --- a/doc/src/Eqs/pair_eam.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - E_i = F_\alpha \left(\sum_{j \neq i}\ \rho_\beta (r_{ij})\right) + - \frac{1}{2} \sum_{j \neq i} \phi_{\alpha\beta} (r_{ij}) -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_eam_fs.jpg b/doc/src/Eqs/pair_eam_fs.jpg deleted file mode 100644 index fa72f8fc73..0000000000 Binary files a/doc/src/Eqs/pair_eam_fs.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_eam_fs.tex b/doc/src/Eqs/pair_eam_fs.tex deleted file mode 100644 index 32ca605e2e..0000000000 --- a/doc/src/Eqs/pair_eam_fs.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - E_i = F_\alpha \left(\sum_{j \neq i}\ - \rho_{\alpha\beta} (r_{ij})\right) + - \frac{1}{2} \sum_{j \neq i} \phi_{\alpha\beta} (r_{ij}) -$$ - -\end{document} \ No newline at end of file diff --git a/doc/src/Eqs/pair_edip.jpg b/doc/src/Eqs/pair_edip.jpg deleted file mode 100644 index 3933280480..0000000000 Binary files a/doc/src/Eqs/pair_edip.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_edip.tex b/doc/src/Eqs/pair_edip.tex deleted file mode 100644 index 27f5dd9eec..0000000000 --- a/doc/src/Eqs/pair_edip.tex +++ /dev/null @@ -1,22 +0,0 @@ -\documentclass[12pt]{article} - -\usepackage{amssymb,amsmath} - -\begin{document} - -\begin{eqnarray*} -E & = & \sum_{j \ne i} \phi_{2}(R_{ij}, Z_{i}) + \sum_{j \ne i} \sum_{k \ne i,k > j} \phi_{3}(R_{ij}, R_{ik}, Z_{i}) \\ -\phi_{2}(r, Z) & = & A\left[\left(\frac{B}{r}\right)^{\rho} - e^{-\beta Z^2}\right]exp{\left(\frac{\sigma}{r-a}\right)} \\ -\phi_{3}(R_{ij}, R_{ik}, Z_i) & = & exp{\left(\frac{\gamma}{R_{ij}-a}\right)}exp{\left(\frac{\gamma}{R_{ik}-a}\right)}h(cos\theta_{ijk},Z_i) \\ -Z_i & = & \sum_{m \ne i} f(R_{im}) \qquad - f(r) = \begin{cases} - 1 & \quad ra - \end{cases} \\ -h(l,Z) & = & \lambda [(1-e^{-Q(Z)(l+\tau(Z))^2}) + \eta Q(Z)(l+\tau(Z))^2 ] \\ -Q(Z) & = & Q_0 e^{-\mu Z} \qquad \tau(Z) = u_1 + u_2 (u_3 e^{-u_4 Z} - e^{-2u_4 Z}) -\end{eqnarray*} - -\end{document} - diff --git a/doc/src/Eqs/pair_edpd_force.jpg b/doc/src/Eqs/pair_edpd_force.jpg deleted file mode 100644 index fabb6f772e..0000000000 Binary files a/doc/src/Eqs/pair_edpd_force.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_edpd_force.tex b/doc/src/Eqs/pair_edpd_force.tex deleted file mode 100644 index f6a0ca0d3c..0000000000 --- a/doc/src/Eqs/pair_edpd_force.tex +++ /dev/null @@ -1,33 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - \mathbf{F}_{ij}^{C} = \alpha_{ij}{\omega_{C}}(r_{ij})\mathbf{e}_{ij}, -$$ - -$$ - \mathbf{F}_{ij}^{D} = -\gamma {\omega_{D}}(r_{ij})(\mathbf{e}_{ij} \cdot \mathbf{v}_{ij})\mathbf{e}_{ij}, -$$ - -$$ - \mathbf{F}_{ij}^{R} = \sigma {\omega_{R}}(r_{ij}){\xi_{ij}}\Delta t^{-1/2} \mathbf{e}_{ij}, -$$ - -$$ - \omega_{C}(r) = 1 - r/r_c, -$$ - -$$ - \alpha_{ij} = A\cdot k_B(T_i + T_j)/2, -$$ - -$$ - \omega_{D}(r) = \omega^2_{R}(r) = (1-r/r_c)^s, -$$ - -$$ - \sigma_{ij}^2 = 4\gamma k_B T_i T_j/(T_i + T_j), -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_edpd_gov.jpg b/doc/src/Eqs/pair_edpd_gov.jpg deleted file mode 100644 index 10b303a218..0000000000 Binary files a/doc/src/Eqs/pair_edpd_gov.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_edpd_gov.tex b/doc/src/Eqs/pair_edpd_gov.tex deleted file mode 100644 index 782cdec99e..0000000000 --- a/doc/src/Eqs/pair_edpd_gov.tex +++ /dev/null @@ -1,15 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - \frac{\mathrm{d}^2 \mathbf{r}_i}{\mathrm{d} t^2}= - \frac{\mathrm{d} \mathbf{v}_i}{\mathrm{d} t} - =\mathbf{F}_{i}=\sum_{i\neq j}(\mathbf{F}_{ij}^{C}+\mathbf{F}_{ij}^{D}+\mathbf{F}_{ij}^{R}), -$$ - -$$ - C_v\frac{\mathrm{d} T_i}{\mathrm{d} t}= q_{i} = \sum_{i\neq j}(q_{ij}^{C}+q_{ij}^{V}+q_{ij}^{R}), -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_edpd_heat.jpg b/doc/src/Eqs/pair_edpd_heat.jpg deleted file mode 100644 index b9256a1d13..0000000000 Binary files a/doc/src/Eqs/pair_edpd_heat.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_edpd_heat.tex b/doc/src/Eqs/pair_edpd_heat.tex deleted file mode 100644 index 241a1bad64..0000000000 --- a/doc/src/Eqs/pair_edpd_heat.tex +++ /dev/null @@ -1,29 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - q_i^C = \sum_{j \ne i} k_{ij} \omega_{CT}(r_{ij}) \left( \frac{1}{T_i} - \frac{1}{T_j} \right), -$$ - -$$ - q_i^V = \frac{1}{2 C_v}\sum_{j \ne i}{ \left\{ \omega_D(r_{ij})\left[\gamma_{ij} \left( \mathbf{e}_{ij} \cdot \mathbf{v}_{ij} \right)^2 - \frac{\left( \sigma _{ij} \right)^2}{m}\right] - \sigma _{ij} \omega_R(r_{ij})\left( \mathbf{e}_{ij} \cdot \mathbf{v}_{ij} \right){\xi_{ij}} \right\} }, -$$ - -$$ - q_i^R = \sum_{j \ne i} \beta _{ij} \omega_{RT}(r_{ij}) d {t^{ - 1/2}} \xi_{ij}^e, -$$ - -$$ - \omega_{CT}(r)=\omega_{RT}^2(r)=\left(1-r/r_{ct}\right)^{s_T}, -$$ - -$$ - k_{ij}=C_v^2\kappa(T_i + T_j)^2/4k_B, -$$ - -$$ - \beta_{ij}^2=2k_Bk_{ij}, -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_edpd_kappa.jpg b/doc/src/Eqs/pair_edpd_kappa.jpg deleted file mode 100644 index 158974d374..0000000000 Binary files a/doc/src/Eqs/pair_edpd_kappa.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_edpd_kappa.tex b/doc/src/Eqs/pair_edpd_kappa.tex deleted file mode 100644 index ac5ca9f740..0000000000 --- a/doc/src/Eqs/pair_edpd_kappa.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - \kappa = \frac{315k_B\upsilon }{2\pi \rho C_v r_{ct}^5}\frac{1}{Pr}, -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_eim1.jpg b/doc/src/Eqs/pair_eim1.jpg deleted file mode 100644 index c243120b2a..0000000000 Binary files a/doc/src/Eqs/pair_eim1.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_eim1.tex b/doc/src/Eqs/pair_eim1.tex deleted file mode 100644 index bfa5b6ebc4..0000000000 --- a/doc/src/Eqs/pair_eim1.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ -E = \frac{1}{2} \sum_{i=1}^{N} \sum_{j=i_1}^{i_N} \phi_{ij} \left(r_{ij}\right) + \sum_{i=1}^{N}E_i\left(q_i,\sigma_i\right) -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_eim2.jpg b/doc/src/Eqs/pair_eim2.jpg deleted file mode 100644 index 4896f658f1..0000000000 Binary files a/doc/src/Eqs/pair_eim2.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_eim2.tex b/doc/src/Eqs/pair_eim2.tex deleted file mode 100644 index d8c4181342..0000000000 --- a/doc/src/Eqs/pair_eim2.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -\begin{eqnarray*} -q_i & = & \sum_{j=i_1}^{i_N} \eta_{ji}\left(r_{ij}\right) \\ -\sigma_i & = & \sum_{j=i_1}^{i_N} q_j \cdot \psi_{ij} \left(r_{ij}\right) \\ -E_i\left(q_i,\sigma_i\right) & = & \frac{1}{2} \cdot q_i \cdot \sigma_i -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_eim3.jpg b/doc/src/Eqs/pair_eim3.jpg deleted file mode 100644 index 57366bc15d..0000000000 Binary files a/doc/src/Eqs/pair_eim3.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_eim3.tex b/doc/src/Eqs/pair_eim3.tex deleted file mode 100644 index 84343c6acf..0000000000 --- a/doc/src/Eqs/pair_eim3.tex +++ /dev/null @@ -1,25 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -\begin{eqnarray*} -\phi_{ij}\left(r\right) = \left\{ \begin{array}{lr} -\left[\frac{E_{b,ij}\beta_{ij}}{\beta_{ij}-\alpha_{ij}}\exp\left(-\alpha_{ij} \frac{r-r_{e,ij}}{r_{e,ij}}\right)-\frac{E_{b,ij}\alpha_{ij}}{\beta_{ij}-\alpha_{ij}}\exp\left(-\beta_{ij} \frac{r-r_{e,ij}}{r_{e,ij}}\right)\right]f_c\left(r,r_{e,ij},r_{c,\phi,ij}\right),& p_{ij}=1 \\ -\left[\frac{E_{b,ij}\beta_{ij}}{\beta_{ij}-\alpha_{ij}} \left(\frac{r_{e,ij}}{r}\right)^{\alpha_{ij}} -\frac{E_{b,ij}\alpha_{ij}}{\beta_{ij}-\alpha_{ij}} \left(\frac{r_{e,ij}}{r}\right)^{\beta_{ij}}\right]f_c\left(r,r_{e,ij},r_{c,\phi,ij}\right),& p_{ij}=2 -\end{array} -\right. -\end{eqnarray*} - -$$ -\eta_{ji} = A_{\eta,ij}\left(\chi_j-\chi_i\right)f_c\left(r,r_{s,\eta,ij},r_{c,\eta,ij}\right) -$$ - -$$ -\psi_{ij}\left(r\right) = A_{\psi,ij}\exp\left(-\zeta_{ij}r\right)f_c\left(r,r_{s,\psi,ij},r_{c,\psi,ij}\right) -$$ - -$$ -f_{c}\left(r,r_p,r_c\right) = 0.510204 erfc\left[\frac{1.64498\left(2r-r_p-r_c\right)}{r_c-r_p}\right] - 0.010204 -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_entropy.jpg b/doc/src/Eqs/pair_entropy.jpg deleted file mode 100644 index 44161e6aa0..0000000000 Binary files a/doc/src/Eqs/pair_entropy.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_entropy.tex b/doc/src/Eqs/pair_entropy.tex deleted file mode 100644 index 304c9d6138..0000000000 --- a/doc/src/Eqs/pair_entropy.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} -\thispagestyle{empty} - -$$ - s_S^i=-2\pi\rho k_B \int\limits_0^{r_m} \left [ g(r) \ln g(r) - g(r) + 1 \right ] r^2 dr , -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_entropy2.jpg b/doc/src/Eqs/pair_entropy2.jpg deleted file mode 100644 index db3dcb0ca7..0000000000 Binary files a/doc/src/Eqs/pair_entropy2.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_entropy2.tex b/doc/src/Eqs/pair_entropy2.tex deleted file mode 100644 index c91004840f..0000000000 --- a/doc/src/Eqs/pair_entropy2.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} -\thispagestyle{empty} - -$$ - g_m^i(r) = \frac{1}{4 \pi \rho r^2} \sum\limits_{j} \frac{1}{\sqrt{2 \pi \sigma^2}} e^{-(r-r_{ij})^2/(2\sigma^2)} , -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_entropy3.jpg b/doc/src/Eqs/pair_entropy3.jpg deleted file mode 100644 index 0d5e0025b7..0000000000 Binary files a/doc/src/Eqs/pair_entropy3.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_entropy3.tex b/doc/src/Eqs/pair_entropy3.tex deleted file mode 100644 index b0b3c76358..0000000000 --- a/doc/src/Eqs/pair_entropy3.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} -\thispagestyle{empty} - -$$ - \bar{s}_S^i = \frac{\sum_j s_S^j + s_S^i}{N + 1} , -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_exp6_rx.jpg b/doc/src/Eqs/pair_exp6_rx.jpg deleted file mode 100644 index 6ee321ea6d..0000000000 Binary files a/doc/src/Eqs/pair_exp6_rx.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_exp6_rx.tex b/doc/src/Eqs/pair_exp6_rx.tex deleted file mode 100644 index fe36aeaa34..0000000000 --- a/doc/src/Eqs/pair_exp6_rx.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} -\pagestyle{empty} -\begin{document} - -$$ -U_{ij}(r) = \frac{\epsilon}{\alpha-6}\{6exp[\alpha(1-\frac{r_{ij}}{R_{m}})]-\alpha(\frac{R_{m}}{r_{ij}})^6\} -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_exp6_rx_oneFluid.jpg b/doc/src/Eqs/pair_exp6_rx_oneFluid.jpg deleted file mode 100644 index 5059c02e90..0000000000 Binary files a/doc/src/Eqs/pair_exp6_rx_oneFluid.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_exp6_rx_oneFluid.tex b/doc/src/Eqs/pair_exp6_rx_oneFluid.tex deleted file mode 100644 index 2f2efd4fa1..0000000000 --- a/doc/src/Eqs/pair_exp6_rx_oneFluid.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentstyle[12pt]{article} -\pagestyle{empty} -\begin{document} - -\begin{eqnarray*} - R_{m}^{3} &=& \displaystyle\sum_{a}\displaystyle\sum_{b} x_{a}x_{b}R_{m,ab}^{3} \\ - \epsilon &=& \frac{1}{R_{m}^{3}}\displaystyle\sum_{a}\displaystyle\sum_{b} x_{a}x_{b}\epsilon_{ab}R_{m,ab}^{3} \\ - \alpha &=& \frac{1}{\epsilon R_{m}^{3}}\displaystyle\sum_{a}\displaystyle\sum_{b} x_{a}x_{b}\alpha_{ab}\epsilon_{ab}R_{m,ab}^{3} \\ -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_exp6_rx_oneFluid2.jpg b/doc/src/Eqs/pair_exp6_rx_oneFluid2.jpg deleted file mode 100644 index 7144aea4f4..0000000000 Binary files a/doc/src/Eqs/pair_exp6_rx_oneFluid2.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_exp6_rx_oneFluid2.tex b/doc/src/Eqs/pair_exp6_rx_oneFluid2.tex deleted file mode 100644 index 1d1214f229..0000000000 --- a/doc/src/Eqs/pair_exp6_rx_oneFluid2.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentstyle[12pt]{article} -\pagestyle{empty} -\begin{document} - -\begin{eqnarray*} - \epsilon_{ab} &=& \sqrt{\epsilon_{a}\epsilon_{b}} \\ - R_{m,ab} &=& \frac{R_{m,a}+R_{m,b}}{2} \\ - \alpha_{ab} &=& \sqrt{\alpha_{a}\alpha_{b}} \\ -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_gauss.jpg b/doc/src/Eqs/pair_gauss.jpg deleted file mode 100644 index 97c2f0ecb2..0000000000 Binary files a/doc/src/Eqs/pair_gauss.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_gauss.tex b/doc/src/Eqs/pair_gauss.tex deleted file mode 100644 index ed38e13943..0000000000 --- a/doc/src/Eqs/pair_gauss.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} -\pagestyle{empty} -\begin{document} - -$$ - E = - A \exp(-B r^2) \qquad r < r_c -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_gauss_cut.jpg b/doc/src/Eqs/pair_gauss_cut.jpg deleted file mode 100644 index e47bb8cc06..0000000000 Binary files a/doc/src/Eqs/pair_gauss_cut.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_gauss_cut.tex b/doc/src/Eqs/pair_gauss_cut.tex deleted file mode 100644 index 5d0bb430f3..0000000000 --- a/doc/src/Eqs/pair_gauss_cut.tex +++ /dev/null @@ -1,8 +0,0 @@ -\documentclass[12pt]{article} -\pagestyle{empty} -\begin{document} - -\begin{eqnarray*} - E = & \frac{H}{\sigma_h\sqrt{2\pi}} \exp\left[-\frac{(r-r_{mh})^2}{2\sigma_h^2}\right] -\end{eqnarray*} -\end{document} diff --git a/doc/src/Eqs/pair_gayberne.jpg b/doc/src/Eqs/pair_gayberne.jpg deleted file mode 100644 index e9b1f3ca93..0000000000 Binary files a/doc/src/Eqs/pair_gayberne.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_gayberne.tex b/doc/src/Eqs/pair_gayberne.tex deleted file mode 100644 index d3c199e826..0000000000 --- a/doc/src/Eqs/pair_gayberne.tex +++ /dev/null @@ -1,14 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ U ( \mathbf{A}_1, \mathbf{A}_2, \mathbf{r}_{12} ) = U_r ( -\mathbf{A}_1, \mathbf{A}_2, \mathbf{r}_{12}, \gamma ) \cdot \eta_{12} ( -\mathbf{A}_1, \mathbf{A}_2, \upsilon ) \cdot \chi_{12} ( \mathbf{A}_1, -\mathbf{A}_2, \mathbf{r}_{12}, \mu ) $$ - -$$ U_r = 4 \epsilon ( \varrho^{12} - \varrho^6) $$ - -$$ \varrho = \frac{\sigma}{ h_{12} + \gamma \sigma} $$ - -\end{document} diff --git a/doc/src/Eqs/pair_gayberne2.jpg b/doc/src/Eqs/pair_gayberne2.jpg deleted file mode 100644 index a4e6c6f70f..0000000000 Binary files a/doc/src/Eqs/pair_gayberne2.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_gayberne2.tex b/doc/src/Eqs/pair_gayberne2.tex deleted file mode 100644 index 6efb755774..0000000000 --- a/doc/src/Eqs/pair_gayberne2.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ \epsilon_a = \sigma \cdot { \frac{a}{ b \cdot c } }; \epsilon_b = -\sigma \cdot { \frac{b}{ a \cdot c } }; \epsilon_c = \sigma \cdot { -\frac{c}{ a \cdot b } } $$ - -\end{document} diff --git a/doc/src/Eqs/pair_gran_hertz.jpg b/doc/src/Eqs/pair_gran_hertz.jpg deleted file mode 100644 index 733875fee6..0000000000 Binary files a/doc/src/Eqs/pair_gran_hertz.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_gran_hertz.tex b/doc/src/Eqs/pair_gran_hertz.tex deleted file mode 100644 index d6e09493b2..0000000000 --- a/doc/src/Eqs/pair_gran_hertz.tex +++ /dev/null @@ -1,14 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - F_{hz} = \sqrt{\delta} \sqrt{\frac{R_i R_j}{R_i + R_j}} F_{hk} = - \sqrt{\delta} \sqrt{\frac{R_i R_j}{R_i + R_j}} - \Big[ (k_n \delta \mathbf{n}_{ij} - - m_{\mbox{\scriptsize{eff}}} \: \gamma_n \mathbf{ v}_n) - - (k_t \mathbf{ \Delta s}_t + - m_{\mbox{\scriptsize{eff}}} \: \gamma_t \mathbf{v}_t) \Big] -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_gran_hooke.jpg b/doc/src/Eqs/pair_gran_hooke.jpg deleted file mode 100644 index 36f34db6c6..0000000000 Binary files a/doc/src/Eqs/pair_gran_hooke.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_gran_hooke.tex b/doc/src/Eqs/pair_gran_hooke.tex deleted file mode 100644 index e1901e66a3..0000000000 --- a/doc/src/Eqs/pair_gran_hooke.tex +++ /dev/null @@ -1,12 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - F_{hk} = (k_n \delta \mathbf{n}_{ij} - - m_{\mbox{\scriptsize{eff}}} \gamma_n\mathbf{ v}_n) - - (k_t \mathbf{ \Delta s}_t + - m_{\mbox{\scriptsize{eff}}} \gamma_t \mathbf{v}_t) -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_gromacs.jpg b/doc/src/Eqs/pair_gromacs.jpg deleted file mode 100644 index 885c059e65..0000000000 Binary files a/doc/src/Eqs/pair_gromacs.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_gromacs.tex b/doc/src/Eqs/pair_gromacs.tex deleted file mode 100644 index 88dbe15909..0000000000 --- a/doc/src/Eqs/pair_gromacs.tex +++ /dev/null @@ -1,17 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -\begin{eqnarray*} -E_{LJ} & = & 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - - \left(\frac{\sigma}{r}\right)^6 \right] + S_{LJ}(r) - \qquad r < r_c \\ -E_C & = & \frac{C q_i q_j}{\epsilon r} + S_C(r) \qquad r < r_c \\ -S(r) & = & C \qquad r < r_1 \\ -S(r) & = & \frac{A}{3} (r - r_1)^3 + \frac{B}{4} (r - r_1)^4 + C \qquad r_1 < r < r_c \\ -A & = & (-3 E'(r_c) + (r_c - r_1) E''(r_c))/(r_c - r_1)^2 \\ -B & = & (2 E'(r_c) - (r_c - r_1) E''(r_c))/(r_c - r_1)^3 \\ -C & = & -E(r_c) + \frac{1}{2} (r_c - r_1) E'(r_c) - \frac{1}{12} (r_c - r_1)^2 E''(r_c)) \\ -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_hbond_dreiding.jpg b/doc/src/Eqs/pair_hbond_dreiding.jpg deleted file mode 100644 index b93044ed31..0000000000 Binary files a/doc/src/Eqs/pair_hbond_dreiding.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_hbond_dreiding.tex b/doc/src/Eqs/pair_hbond_dreiding.tex deleted file mode 100644 index 9663ee5608..0000000000 --- a/doc/src/Eqs/pair_hbond_dreiding.tex +++ /dev/null @@ -1,18 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} -\begin{eqnarray*} - E & = & \left[LJ(r) | Morse(r) \right] \qquad \qquad \qquad r < r_{\rm in} \\ - & = & S(r) * \left[LJ(r) | Morse(r) \right] \qquad \qquad r_{\rm in} < r < r_{\rm out} \\ - & = & 0 \qquad \qquad \qquad \qquad \qquad \qquad \qquad r > r_{\rm out} \\ - LJ(r) & = & AR^{-12}-BR^{-10}cos^n\theta= - \epsilon\left\lbrace 5\left[ \frac{\sigma}{r}\right]^{12}- - 6\left[ \frac{\sigma}{r}\right]^{10} \right\rbrace cos^n\theta\\ - Morse(r) & = & D_0\left\lbrace \chi^2 - 2\chi\right\rbrace cos^n\theta= - D_{0}\left\lbrace e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} - \right\rbrace cos^n\theta \\ - S(r) & = & \frac{ \left[r_{\rm out}^2 - r^2\right]^2 - \left[r_{\rm out}^2 + 2r^2 - 3{r_{\rm in}^2}\right]} - { \left[r_{\rm out}^2 - {r_{\rm in}}^2\right]^3 } -\end{eqnarray*} -\end{document} diff --git a/doc/src/Eqs/pair_ilp_graphene_hbn.jpg b/doc/src/Eqs/pair_ilp_graphene_hbn.jpg deleted file mode 100644 index b28c0c6dc9..0000000000 Binary files a/doc/src/Eqs/pair_ilp_graphene_hbn.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_ilp_graphene_hbn.tex b/doc/src/Eqs/pair_ilp_graphene_hbn.tex deleted file mode 100644 index 47ce30ac7c..0000000000 --- a/doc/src/Eqs/pair_ilp_graphene_hbn.tex +++ /dev/null @@ -1,42 +0,0 @@ -\documentclass[aps,pr,onecolumn,superscriptaddress,noshowpacs,a4paper,15pt]{revtex4} -\pdfoutput=1 -\bibliographystyle{apsrev4} -\usepackage{color} -\usepackage{dcolumn} %Align table columns on decimal point -\usepackage{amssymb} -\usepackage{amsmath} -\usepackage{amsthm} -\usepackage{graphicx} -\usepackage[pdftex]{hyperref} -\hypersetup{colorlinks=true,citecolor=blue,linkcolor=red,urlcolor=blue} -\usepackage[all]{hypcap} -\newcommand{\red}{\color{red}} -\newcommand{\blue}{\color{blue}} -\definecolor{green}{rgb}{0,0.5,0} -\newcommand{\green}{\color{green}} -\newcommand{\white}{\color{white}} -%\newcommand{\cite}[1]{\hspace{-1 ex} % \nocite{#1}\citenum{#1}} -\thickmuskip=0.5\thickmuskip %shorter spaces in math -% -\begin{document} -% -\begingroup -\Large -\begin{eqnarray*} - E & = & \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\[15pt] - V_{ij} & = & {\rm Tap}(r_{ij})\left \{ e^{-\alpha (r_{ij}/\beta -1)} - \left [ \epsilon + f(\rho_{ij}) + f(\rho_{ji})\right ] - - \frac{1}{1+e^{-d\left [ \left ( r_{ij}/\left (s_R \cdot r^{eff} \right ) \right )-1 \right ]}} - \cdot \frac{C_6}{r^6_{ij}} \right \}\\[15pt] - \rho_{ij}^2 & = & r_{ij}^2 - ({\bf r}_{ij} \cdot {\bf n}_i)^2 \\[15pt] - \rho_{ji}^2 & = & r_{ij}^2 - ({\bf r}_{ij} \cdot {\bf n}_j)^2 \\[15pt] - f(\rho) & = & C e^{ -( \rho / \delta )^2 }\\[15pt] - {\rm Tap}(r_{ij}) & = & 20\left ( \frac{r_{ij}}{R_{cut}} \right )^7 - - 70\left ( \frac{r_{ij}}{R_{cut}} \right )^6 + - 84\left ( \frac{r_{ij}}{R_{cut}} \right )^5 - - 35\left ( \frac{r_{ij}}{R_{cut}} \right )^4 + 1 -\end{eqnarray*} -\endgroup -% -\end{document} -% diff --git a/doc/src/Eqs/pair_kolmogorov_crespi_full.jpg b/doc/src/Eqs/pair_kolmogorov_crespi_full.jpg deleted file mode 100644 index 7ac14f3d0b..0000000000 Binary files a/doc/src/Eqs/pair_kolmogorov_crespi_full.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_kolmogorov_crespi_full.tex b/doc/src/Eqs/pair_kolmogorov_crespi_full.tex deleted file mode 100644 index 16bbc25abf..0000000000 --- a/doc/src/Eqs/pair_kolmogorov_crespi_full.tex +++ /dev/null @@ -1,33 +0,0 @@ -\documentclass[aps,pr,onecolumn,superscriptaddress,noshowpacs,a4paper,15pt]{revtex4} -\pdfoutput=1 -\bibliographystyle{apsrev4} -\usepackage{color} -\usepackage{dcolumn} %Align table columns on decimal point -\usepackage{amssymb} -\usepackage{amsmath} -\usepackage{amsthm} -\usepackage{graphicx} -\usepackage[pdftex]{hyperref} -\hypersetup{colorlinks=true,citecolor=blue,linkcolor=red,urlcolor=blue} -\usepackage[all]{hypcap} -\newcommand{\red}{\color{red}} -\newcommand{\blue}{\color{blue}} -\definecolor{green}{rgb}{0,0.5,0} -\newcommand{\green}{\color{green}} -\newcommand{\white}{\color{white}} -%\newcommand{\cite}[1]{\hspace{-1 ex} % \nocite{#1}\citenum{#1}} -\thickmuskip=0.5\thickmuskip %shorter spaces in math - -\begin{document} - -\begingroup -\Large -\begin{eqnarray*} - E & = & \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\[15pt] - V_{ij} & = & e^{-\lambda (r_{ij} -z_0)} \left [ C + f(\rho_{ij}) + f(\rho_{ji}) - A \left ( \frac{r_{ij}}{z_0}\right )^{-6} \right ] \\ - \rho_{ij}^2 & = & r_{ij}^2 - ({\bf r}_{ij}\cdot {\bf n}_{i})^2 \\[15pt] - \rho_{ji}^2 & = & r_{ij}^2 - ({\bf r}_{ij}\cdot {\bf n}_{j})^2 \\[15pt] - f(\rho) & = & e^{-(\rho/\delta)^2} \sum_{n=0}^2 C_{2n} { (\rho/\delta) }^{2n} -\end{eqnarray*} -\endgroup -\end{document} diff --git a/doc/src/Eqs/pair_kolmogorov_crespi_z.jpg b/doc/src/Eqs/pair_kolmogorov_crespi_z.jpg deleted file mode 100644 index 3d37ff25be..0000000000 Binary files a/doc/src/Eqs/pair_kolmogorov_crespi_z.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_kolmogorov_crespi_z.tex b/doc/src/Eqs/pair_kolmogorov_crespi_z.tex deleted file mode 100644 index fb7ebf8dc4..0000000000 --- a/doc/src/Eqs/pair_kolmogorov_crespi_z.tex +++ /dev/null @@ -1,13 +0,0 @@ -\documentclass[12pt]{article} -\thispagestyle{empty} - -\begin{document} - -\begin{eqnarray*} - E & = & \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\ - V_{ij} & = & e^{-\lambda(r_{ij} -z_0}) \left[ C + f(\rho_{ij}) + f(\rho_{ji}) \right] - A \left( \frac{r_{ij}}{z_0}\right)^{-6} + A \left( \frac{\textrm{cutoff}}{z_0}\right)^{-6} \\ - \rho_{ij}^2 = \rho_{ji}^2 & = & x_{ij}^2 + y_{ij}^2 ~\hspace{2cm} (\mathbf{n_i}\equiv\hat \mathbf{z})\\ - f(\rho) & = & e^{-(\rho/\delta)^2} \sum_{n=0}^2 C_{2n} \left( \rho/\delta \right) ^{2n} -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_lebedeva.png b/doc/src/Eqs/pair_lebedeva.png deleted file mode 100644 index af2ac87653..0000000000 Binary files a/doc/src/Eqs/pair_lebedeva.png and /dev/null differ diff --git a/doc/src/Eqs/pair_lj.jpg b/doc/src/Eqs/pair_lj.jpg deleted file mode 100644 index 49cf7f5eb9..0000000000 Binary files a/doc/src/Eqs/pair_lj.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_lj.tex b/doc/src/Eqs/pair_lj.tex deleted file mode 100644 index 011fb8b769..0000000000 --- a/doc/src/Eqs/pair_lj.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - E = 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - - \left(\frac{\sigma}{r}\right)^6 \right] - \qquad r < r_c -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_lj96.jpg b/doc/src/Eqs/pair_lj96.jpg deleted file mode 100644 index 6462de180e..0000000000 Binary files a/doc/src/Eqs/pair_lj96.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_lj96.tex b/doc/src/Eqs/pair_lj96.tex deleted file mode 100644 index e970624892..0000000000 --- a/doc/src/Eqs/pair_lj96.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - E = 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{9} - - \left(\frac{\sigma}{r}\right)^6 \right] - \qquad r < r_c -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_lj_cubic.jpg b/doc/src/Eqs/pair_lj_cubic.jpg deleted file mode 100644 index 69ec4f6e84..0000000000 Binary files a/doc/src/Eqs/pair_lj_cubic.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_lj_cubic.tex b/doc/src/Eqs/pair_lj_cubic.tex deleted file mode 100644 index e2e1b67dd7..0000000000 --- a/doc/src/Eqs/pair_lj_cubic.tex +++ /dev/null @@ -1,12 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -\begin{eqnarray*} - E &=& u_{LJ}(r) \qquad r \leq r_s \\ - &=& u_{LJ}(r_s) + (r-r_s) u'_{LJ}(r_s) - \frac{1}{6} A_3 (r-r_s)^3 \qquad r_s < r \leq r_c \\ - &=& 0 \qquad r > r_c -\end{eqnarray*} - - -\end{document} diff --git a/doc/src/Eqs/pair_lj_expand.jpg b/doc/src/Eqs/pair_lj_expand.jpg deleted file mode 100644 index e274818892..0000000000 Binary files a/doc/src/Eqs/pair_lj_expand.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_lj_expand.tex b/doc/src/Eqs/pair_lj_expand.tex deleted file mode 100644 index 0aaa2f44d8..0000000000 --- a/doc/src/Eqs/pair_lj_expand.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - E = 4 \epsilon \left[ \left(\frac{\sigma}{r - \Delta}\right)^{12} - - \left(\frac{\sigma}{r - \Delta}\right)^6 \right] - \qquad r < r_c + \Delta -$$ - -\end{document} \ No newline at end of file diff --git a/doc/src/Eqs/pair_lj_smooth.jpg b/doc/src/Eqs/pair_lj_smooth.jpg deleted file mode 100644 index d380fd345c..0000000000 Binary files a/doc/src/Eqs/pair_lj_smooth.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_lj_smooth.tex b/doc/src/Eqs/pair_lj_smooth.tex deleted file mode 100644 index 5aa5495c27..0000000000 --- a/doc/src/Eqs/pair_lj_smooth.tex +++ /dev/null @@ -1,15 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} - E & = & 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - - \left(\frac{\sigma}{r}\right)^6 \right] - \qquad r < r_{in} \\ - F & = & C_1 + C_2 (r - r_{in}) + C_3 (r - r_{in})^2 + C_4 (r - r_{in})^3 - \qquad r_{in} < r < r_c -\end{eqnarray*} - -\end{document} - - diff --git a/doc/src/Eqs/pair_lj_smooth_linear.jpg b/doc/src/Eqs/pair_lj_smooth_linear.jpg deleted file mode 100644 index b0626abae1..0000000000 Binary files a/doc/src/Eqs/pair_lj_smooth_linear.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_lj_smooth_linear.tex b/doc/src/Eqs/pair_lj_smooth_linear.tex deleted file mode 100644 index b8980f8d25..0000000000 --- a/doc/src/Eqs/pair_lj_smooth_linear.tex +++ /dev/null @@ -1,13 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} -\phi\left(r\right) & = & 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - - \left(\frac{\sigma}{r}\right)^6 \right] \\ -E\left(r\right) & = & \phi\left(r\right) - \phi\left(R_c\right) - \left(r - R_c\right) \left.\frac{d\phi}{d r} \right|_{r=R_c} \qquad r < R_c -\end{eqnarray*} - -\end{document} - - diff --git a/doc/src/Eqs/pair_lj_switch3.jpg b/doc/src/Eqs/pair_lj_switch3.jpg deleted file mode 100644 index a1f98ea2c2..0000000000 Binary files a/doc/src/Eqs/pair_lj_switch3.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_lj_switch3.tex b/doc/src/Eqs/pair_lj_switch3.tex deleted file mode 100644 index 29161fb2ef..0000000000 --- a/doc/src/Eqs/pair_lj_switch3.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - \thispagestyle{empty} - -\begin{eqnarray*} - E = 4\epsilon \left[ \left(\frac{\sigma}{r}\right)^{12}-\left(\frac{\sigma}{r}\right)^{6} \right] -% \qquad r < r_c \\ -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_local_density_energy.jpg b/doc/src/Eqs/pair_local_density_energy.jpg deleted file mode 100644 index 68e44ce9d9..0000000000 Binary files a/doc/src/Eqs/pair_local_density_energy.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_local_density_energy.tex b/doc/src/Eqs/pair_local_density_energy.tex deleted file mode 100644 index a77b513051..0000000000 --- a/doc/src/Eqs/pair_local_density_energy.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - U_{LD} = \sum_i F(\rho_i) -$$ - - -\end{document} -~ diff --git a/doc/src/Eqs/pair_local_density_energy_implement.jpg b/doc/src/Eqs/pair_local_density_energy_implement.jpg deleted file mode 100644 index bd1f65d542..0000000000 Binary files a/doc/src/Eqs/pair_local_density_energy_implement.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_local_density_energy_implement.tex b/doc/src/Eqs/pair_local_density_energy_implement.tex deleted file mode 100644 index 4b1f1c3df2..0000000000 --- a/doc/src/Eqs/pair_local_density_energy_implement.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -U_{LD} = \sum_k U_{LD}^{(k)} = \sum_i \left[ \sum_k a_\alpha^{(k)} F^{(k)} \left(\rho_i^{(k)}\right) \right] -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_local_density_energy_multi.jpg b/doc/src/Eqs/pair_local_density_energy_multi.jpg deleted file mode 100644 index df9dbfa5c8..0000000000 Binary files a/doc/src/Eqs/pair_local_density_energy_multi.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_local_density_energy_multi.tex b/doc/src/Eqs/pair_local_density_energy_multi.tex deleted file mode 100644 index 4ca0b7e8b9..0000000000 --- a/doc/src/Eqs/pair_local_density_energy_multi.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -U_{LD} = \sum_i a_\alpha F(\rho_i) -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_local_density_indicator_func.jpg b/doc/src/Eqs/pair_local_density_indicator_func.jpg deleted file mode 100644 index e038b2884d..0000000000 Binary files a/doc/src/Eqs/pair_local_density_indicator_func.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_local_density_indicator_func.tex b/doc/src/Eqs/pair_local_density_indicator_func.tex deleted file mode 100644 index aa595c96dc..0000000000 --- a/doc/src/Eqs/pair_local_density_indicator_func.tex +++ /dev/null @@ -1,16 +0,0 @@ -\documentclass[12pt]{article} -\usepackage[utf8]{inputenc} -\usepackage{amsmath} -\usepackage{amsfonts} - -\begin{document} -\[ - \varphi(r) = - \begin{cases} - 1 & r \le R_1 \\ - c_0 + c_2r^2 + c_4r^4 + c_6r^6 & r \in (R_1, R_2) \\ - 0 & r \ge R_2 - \end{cases} -\] - -\end{document} diff --git a/doc/src/Eqs/pair_local_density_ld.jpg b/doc/src/Eqs/pair_local_density_ld.jpg deleted file mode 100644 index 9e6a8e1b72..0000000000 Binary files a/doc/src/Eqs/pair_local_density_ld.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_local_density_ld.tex b/doc/src/Eqs/pair_local_density_ld.tex deleted file mode 100644 index 1affa67cd3..0000000000 --- a/doc/src/Eqs/pair_local_density_ld.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - - -$$ -\rho_i = \sum_{j \neq i} \varphi(r_{ij}) -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_local_density_ld_implement.jpg b/doc/src/Eqs/pair_local_density_ld_implement.jpg deleted file mode 100644 index e8b98125a2..0000000000 Binary files a/doc/src/Eqs/pair_local_density_ld_implement.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_local_density_ld_implement.tex b/doc/src/Eqs/pair_local_density_ld_implement.tex deleted file mode 100644 index 85ee8bad21..0000000000 --- a/doc/src/Eqs/pair_local_density_ld_implement.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - - -$$ -\rho_i^{(k)} = \sum_j b_\beta^{(k)} \varphi^{(k)} (r_{ij}) -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_local_density_ld_multi.jpg b/doc/src/Eqs/pair_local_density_ld_multi.jpg deleted file mode 100644 index feef991d49..0000000000 Binary files a/doc/src/Eqs/pair_local_density_ld_multi.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_local_density_ld_multi.tex b/doc/src/Eqs/pair_local_density_ld_multi.tex deleted file mode 100644 index c441288c5d..0000000000 --- a/doc/src/Eqs/pair_local_density_ld_multi.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - - -$$ -\rho_i = \sum_{j \neq i} b_\beta \varphi(r_{ij}) -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_lubricate.jpg b/doc/src/Eqs/pair_lubricate.jpg deleted file mode 100644 index 560591765a..0000000000 Binary files a/doc/src/Eqs/pair_lubricate.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_lubricate.tex b/doc/src/Eqs/pair_lubricate.tex deleted file mode 100644 index c7e3dd96ed..0000000000 --- a/doc/src/Eqs/pair_lubricate.tex +++ /dev/null @@ -1,17 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} - W & = & - a_{sq} | (v_1 - v_2) \bullet \mathbf{nn} |^2 - - a_{sh} | (\omega_1 + \omega_2) \bullet - (\mathbf{I} - \mathbf{nn}) - 2 \Omega_N |^2 - \\ - & & a_{pu} | (\omega_1 - \omega_2) \bullet (\mathbf{I} - \mathbf{nn}) |^2 - - a_{tw} | (\omega_1 - \omega_2) \bullet \mathbf{nn} |^2 \qquad r < r_c -\end{eqnarray*} - -$$ -\Omega_N = \mathbf{n} \times (v_1 - v_2) / r -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_mdf-1.jpg b/doc/src/Eqs/pair_mdf-1.jpg deleted file mode 100644 index fb0d9d644f..0000000000 Binary files a/doc/src/Eqs/pair_mdf-1.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_mdf-1.tex b/doc/src/Eqs/pair_mdf-1.tex deleted file mode 100644 index f3e6f36bcf..0000000000 --- a/doc/src/Eqs/pair_mdf-1.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - E_{smooth}(r) = E(r)*f(r) -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_mdf-2.jpg b/doc/src/Eqs/pair_mdf-2.jpg deleted file mode 100644 index ae6358e5cc..0000000000 Binary files a/doc/src/Eqs/pair_mdf-2.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_mdf-2.tex b/doc/src/Eqs/pair_mdf-2.tex deleted file mode 100644 index 9bb3be16c0..0000000000 --- a/doc/src/Eqs/pair_mdf-2.tex +++ /dev/null @@ -1,13 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -\begin{array}{lcl} -f(r) = 1.0 &\mathrm{for}& r < r_m \\ -f(r) = (1 - x)^3*(1+3x+6x^2) &\mathrm{for}& r_m < r < r_{cut} \\ -f(r) = 0.0 &\mathrm{for}& r >= r_{cut} \\ -\end{array} -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_mdf-3.jpg b/doc/src/Eqs/pair_mdf-3.jpg deleted file mode 100644 index 45a1a68e05..0000000000 Binary files a/doc/src/Eqs/pair_mdf-3.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_mdf-3.tex b/doc/src/Eqs/pair_mdf-3.tex deleted file mode 100644 index 6ba1444466..0000000000 --- a/doc/src/Eqs/pair_mdf-3.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - x = \frac{(r-r_m)}{(r_{cut}-r_m)} -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_mdf-4.jpg b/doc/src/Eqs/pair_mdf-4.jpg deleted file mode 100644 index 05d08c01a0..0000000000 Binary files a/doc/src/Eqs/pair_mdf-4.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_mdf-4.tex b/doc/src/Eqs/pair_mdf-4.tex deleted file mode 100644 index 948be2e40f..0000000000 --- a/doc/src/Eqs/pair_mdf-4.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - E(r) = 4\epsilon\Big[\Big(\frac{\sigma}{r}\Big)^{12} - \Big(\frac{\sigma}{r}\Big)^6\Big] -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_mdf-5.jpg b/doc/src/Eqs/pair_mdf-5.jpg deleted file mode 100644 index 9e047a50a8..0000000000 Binary files a/doc/src/Eqs/pair_mdf-5.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_mdf-5.tex b/doc/src/Eqs/pair_mdf-5.tex deleted file mode 100644 index 9b6a28c9d9..0000000000 --- a/doc/src/Eqs/pair_mdf-5.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - E(r) = A e^{(-r/\rho)} -\frac{C}{r^6} -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_mdf-6.jpg b/doc/src/Eqs/pair_mdf-6.jpg deleted file mode 100644 index 60bd7e3a9e..0000000000 Binary files a/doc/src/Eqs/pair_mdf-6.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_mdf-6.tex b/doc/src/Eqs/pair_mdf-6.tex deleted file mode 100644 index b80f6f69b5..0000000000 --- a/doc/src/Eqs/pair_mdf-6.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} -\pagestyle{empty} -\begin{document} - -$$ - E(r) = \frac{A}{r^{12}} - \frac{B}{r^{6}} -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_mdpd_force.jpg b/doc/src/Eqs/pair_mdpd_force.jpg deleted file mode 100644 index 9b0e573b79..0000000000 Binary files a/doc/src/Eqs/pair_mdpd_force.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_mdpd_force.tex b/doc/src/Eqs/pair_mdpd_force.tex deleted file mode 100644 index b5c8d9be4a..0000000000 --- a/doc/src/Eqs/pair_mdpd_force.tex +++ /dev/null @@ -1,17 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - \mathbf{F}_{ij}^C = Aw_c(r_{ij})\mathbf{e}_{ij} + B(\rho_i+\rho_j)w_d(r_{ij})\mathbf{e}_{ij}, -$$ - -$$ - \mathbf{F}_{ij}^{D} = -\gamma {\omega_{D}}(r_{ij})(\mathbf{e}_{ij} \cdot \mathbf{v}_{ij})\mathbf{e}_{ij}, -$$ - -$$ - \mathbf{F}_{ij}^{R} = \sigma {\omega_{R}}(r_{ij}){\xi_{ij}}\Delta t^{-1/2} \mathbf{e}_{ij}, -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_meam.jpg b/doc/src/Eqs/pair_meam.jpg deleted file mode 100644 index f6de50a998..0000000000 Binary files a/doc/src/Eqs/pair_meam.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_meam.tex b/doc/src/Eqs/pair_meam.tex deleted file mode 100644 index cb9bb1702e..0000000000 --- a/doc/src/Eqs/pair_meam.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - E = \sum_i \left\{ F_i(\bar{\rho}_i) - + \frac{1}{2} \sum_{i \neq j} \phi_{ij} (r_{ij}) \right\} -$$ - -\end{document} \ No newline at end of file diff --git a/doc/src/Eqs/pair_meam_spline.jpg b/doc/src/Eqs/pair_meam_spline.jpg deleted file mode 100644 index fd396d75bc..0000000000 Binary files a/doc/src/Eqs/pair_meam_spline.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_meam_spline.tex b/doc/src/Eqs/pair_meam_spline.tex deleted file mode 100644 index b4f58381a4..0000000000 --- a/doc/src/Eqs/pair_meam_spline.tex +++ /dev/null @@ -1,14 +0,0 @@ -\documentclass[12pt]{article} -\usepackage{amsmath} - -\begin{document} - -$$ - E=\sum_{i= r_\mathrm{c} - \end{array} \right. -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_tdpd_flux.jpg b/doc/src/Eqs/pair_tdpd_flux.jpg deleted file mode 100644 index 9da788ae9b..0000000000 Binary files a/doc/src/Eqs/pair_tdpd_flux.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_tdpd_flux.tex b/doc/src/Eqs/pair_tdpd_flux.tex deleted file mode 100644 index f753f16acf..0000000000 --- a/doc/src/Eqs/pair_tdpd_flux.tex +++ /dev/null @@ -1,21 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - Q_{ij}^D = -\kappa_{ij} w_{DC}(r_{ij}) \left( C_i - C_j \right), -$$ - -$$ - Q_{ij}^R = \epsilon_{ij}\left( C_i + C_j \right) w_{RC}(r_{ij}) \xi_{ij}, -$$ - -$$ - w_{DC}(r_{ij})=w^2_{RC}(r_{ij}) = (1 - r/r_{cc})^{\rm power\_{cc}}, -$$ - -$$ - \epsilon_{ij}^2 = m_s^2\kappa_{ij}\rho, -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_tdpd_force.jpg b/doc/src/Eqs/pair_tdpd_force.jpg deleted file mode 100644 index f6feb35397..0000000000 Binary files a/doc/src/Eqs/pair_tdpd_force.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_tdpd_force.tex b/doc/src/Eqs/pair_tdpd_force.tex deleted file mode 100644 index 49edff9700..0000000000 --- a/doc/src/Eqs/pair_tdpd_force.tex +++ /dev/null @@ -1,29 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - \mathbf{F}_{ij}^{C} = A{\omega_{C}}(r_{ij})\mathbf{e}_{ij}, -$$ - -$$ - \mathbf{F}_{ij}^{D} = -\gamma {\omega_{D}}(r_{ij})(\mathbf{e}_{ij} \cdot \mathbf{v}_{ij})\mathbf{e}_{ij}, -$$ - -$$ - \mathbf{F}_{ij}^{R} = \sigma {\omega_{R}}(r_{ij}){\xi_{ij}}\Delta t^{-1/2} \mathbf{e}_{ij}, -$$ - -$$ - \omega_{C}(r) = 1 - r/r_c, -$$ - -$$ - \omega_{D}(r) = \omega^2_{R}(r) = (1-r/r_c)^{\rm power\_f}, -$$ - -$$ - \sigma^2 = 2\gamma k_B T, -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_tdpd_gov.jpg b/doc/src/Eqs/pair_tdpd_gov.jpg deleted file mode 100644 index 0ed793a132..0000000000 Binary files a/doc/src/Eqs/pair_tdpd_gov.jpg and /dev/null differ diff --git a/doc/src/Eqs/pair_tdpd_gov.tex b/doc/src/Eqs/pair_tdpd_gov.tex deleted file mode 100644 index e4b5f5790a..0000000000 --- a/doc/src/Eqs/pair_tdpd_gov.tex +++ /dev/null @@ -1,13 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - \frac{\mathrm{d}^2 \mathbf{r}_i}{\mathrm{d} t^2} = \frac{\mathrm{d} \mathbf{v}_i}{\mathrm{d} t}=\mathbf{F}_{i}=\sum_{i\neq j}(\mathbf{F}_{ij}^{C}+\mathbf{F}_{ij}^{D}+\mathbf{F}_{ij}^{R}), -$$ - -$$ - \frac{\mathrm{d} C_{i}}{\mathrm{d} t}= Q_{i} = \sum_{i\neq j}(Q_{ij}^{D}+Q_{ij}^{R}) + Q_{i}^{S}, -$$ - -\end{document} diff --git a/doc/src/Eqs/polymorphic1.jpg b/doc/src/Eqs/polymorphic1.jpg deleted file mode 100644 index 4757cb7ad8..0000000000 Binary files a/doc/src/Eqs/polymorphic1.jpg and /dev/null differ diff --git a/doc/src/Eqs/polymorphic1.tex b/doc/src/Eqs/polymorphic1.tex deleted file mode 100644 index b4b925ccf8..0000000000 --- a/doc/src/Eqs/polymorphic1.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -E=\frac{1}{2}\sum_{i=1}^{i=N}\sum_{j=1}^{j=N}\left[\left(1-\delta_{ij}\right)\cdot U_{IJ}\left(r_{ij}\right)-\left(1-\eta_{ij}\right)\cdot F_{IJ}\left(r_{ij}\right)\cdot V_{IJ}\left(r_{ij}\right)\right] -$$ - -\end{document} diff --git a/doc/src/Eqs/polymorphic2.jpg b/doc/src/Eqs/polymorphic2.jpg deleted file mode 100644 index 05133f4849..0000000000 Binary files a/doc/src/Eqs/polymorphic2.jpg and /dev/null differ diff --git a/doc/src/Eqs/polymorphic2.tex b/doc/src/Eqs/polymorphic2.tex deleted file mode 100644 index 80b1c93821..0000000000 --- a/doc/src/Eqs/polymorphic2.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -X_{ij}=\sum_{k=i_1,k\neq i,j}^{i_N}W_{IK}\left(r_{ik}\right)\cdot G_{JIK}\left(\theta_{jik}\right)\cdot P_{IK}\left(\Delta r_{jik}\right) -\label{X_eq2} -$$ - -\end{document} diff --git a/doc/src/Eqs/polymorphic3.jpg b/doc/src/Eqs/polymorphic3.jpg deleted file mode 100644 index ba748e63c5..0000000000 Binary files a/doc/src/Eqs/polymorphic3.jpg and /dev/null differ diff --git a/doc/src/Eqs/polymorphic3.tex b/doc/src/Eqs/polymorphic3.tex deleted file mode 100644 index 71db8d81b0..0000000000 --- a/doc/src/Eqs/polymorphic3.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -\Delta r_{jik}=r_{ij}-\xi_{IJ}\cdot r_{ik} -\label{Dr_eq3} -$$ - -\end{document} diff --git a/doc/src/Eqs/polymorphic4.jpg b/doc/src/Eqs/polymorphic4.jpg deleted file mode 100644 index 7a094d6a21..0000000000 Binary files a/doc/src/Eqs/polymorphic4.jpg and /dev/null differ diff --git a/doc/src/Eqs/polymorphic4.tex b/doc/src/Eqs/polymorphic4.tex deleted file mode 100644 index b792df82a0..0000000000 --- a/doc/src/Eqs/polymorphic4.tex +++ /dev/null @@ -1,17 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} -\left\{\begin{array}{l} -\eta_{ij}=\delta_{ij},\xi_{IJ}=0 \\ -U_{IJ}\left(r\right)=A_{IJ}\cdot\epsilon_{IJ}\cdot \left(\frac{\sigma_{IJ}}{r}\right)^q\cdot \left[B_{IJ}\cdot \left(\frac{\sigma_{IJ}}{r}\right)^{p-q}-1\right]\cdot exp\left(\frac{\sigma_{IJ}}{r-a_{IJ}\cdot \sigma_{IJ}}\right) \\ -V_{IJ}\left(r\right)=\sqrt{\lambda_{IJ}\cdot \epsilon_{IJ}}\cdot exp\left(\frac{\gamma_{IJ}\cdot \sigma_{IJ}}{r-a_{IJ}\cdot \sigma_{IJ}}\right) \\ -F_{IJ}\left(X\right)=-X \\ -P_{IJ}\left(\Delta r\right)=1 \\ -W_{IJ}\left(r\right)=\sqrt{\lambda_{IJ}\cdot \epsilon_{IJ}}\cdot exp\left(\frac{\gamma_{IJ}\cdot \sigma_{IJ}}{r-a_{IJ}\cdot \sigma_{IJ}}\right) \\ -G_{JIK}\left(\theta\right)=\left(cos\theta+\frac{1}{3}\right)^2 -\end{array}\right. -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/polymorphic5.jpg b/doc/src/Eqs/polymorphic5.jpg deleted file mode 100644 index 500238b2a9..0000000000 Binary files a/doc/src/Eqs/polymorphic5.jpg and /dev/null differ diff --git a/doc/src/Eqs/polymorphic5.tex b/doc/src/Eqs/polymorphic5.tex deleted file mode 100644 index a5451b98d6..0000000000 --- a/doc/src/Eqs/polymorphic5.tex +++ /dev/null @@ -1,17 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} -\left\{\begin{array}{l} -\eta_{ij}=\delta_{ij},\xi_{IJ}=1 \\ -U_{IJ}\left(r\right)=\frac{D_{e,IJ}}{S_{IJ}-1}\cdot exp\left[-\beta_{IJ}\sqrt{2S_{IJ}\left(r-r_{e,IJ}\right)}\right]\cdot f_{c,IJ}\left(r\right) \\ -V_{IJ}\left(r\right)=\frac{S_{IJ}\cdot D_{e,IJ}}{S_{IJ}-1}\cdot exp\left[-\beta_{IJ}\sqrt{\frac{2}{S_{IJ}}\left(r-r_{e,IJ}\right)}\right]\cdot f_{c,IJ}\left(r\right) \\ -F_{IJ}\left(X\right)=\left(1+X\right)^{-\frac{1}{2}} \\ -P_{IJ}\left(\Delta r\right)=exp\left(2\mu_{IK}\cdot \Delta r\right) \\ -W_{IJ}\left(r\right)=f_{c,IK}\left(r\right) \\ -G_{JIK}\left(\theta\right)=\gamma_{IK}\left[1+\frac{c_{IK}^2}{d_{IK}^2}-\frac{c_{IK}^2}{d_{IK}^2+\left(h_{IK}+cos\theta\right)^2}\right] -\end{array}\right. -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/polymorphic6.jpg b/doc/src/Eqs/polymorphic6.jpg deleted file mode 100644 index 65ea78bf21..0000000000 Binary files a/doc/src/Eqs/polymorphic6.jpg and /dev/null differ diff --git a/doc/src/Eqs/polymorphic6.tex b/doc/src/Eqs/polymorphic6.tex deleted file mode 100644 index c8f9f2f25b..0000000000 --- a/doc/src/Eqs/polymorphic6.tex +++ /dev/null @@ -1,13 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} -f_{c,IJ}=\left\{\begin{array}{lr} -1, & r\leq r_{s,IJ} \\ -\frac{1}{2}+\frac{1}{2} cos \left[\frac{\pi \left(r-r_{s,IJ}\right)}{r_{c,IJ}-r_{s,IJ}}\right], & r_{s,IJ}` are not listed here. If such an error -occurs and is not self-explanatory, you'll need to look in the source +occurs and is not self-explanatory, you will need to look in the source code or contact the author of the package. Doc page with :doc:`WARNING messages ` diff --git a/doc/src/Errors_warnings.rst b/doc/src/Errors_warnings.rst index 4a0b21356a..cb4bdf3e3f 100644 --- a/doc/src/Errors_warnings.rst +++ b/doc/src/Errors_warnings.rst @@ -16,7 +16,7 @@ means that line #187 in the file src/domain.cpp generated the error. Looking in the source code may help you figure out what went wrong. Note that warning messages from :doc:`user-contributed packages ` are not listed here. If such a warning -occurs and is not self-explanatory, you'll need to look in the source +occurs and is not self-explanatory, you will need to look in the source code or contact the author of the package. Doc page with :doc:`ERROR messages ` diff --git a/doc/src/Examples.rst b/doc/src/Examples.rst index d2785378da..243ffdfd93 100644 --- a/doc/src/Examples.rst +++ b/doc/src/Examples.rst @@ -29,11 +29,12 @@ be quickly post-processed into a movie using commands described on the Animations of many of the examples can be viewed on the Movies section of the `LAMMPS web site `_. -There are two kinds of sub-directories in the examples dir. Lowercase -dirs contain one or a few simple, quick-to-run problems. Uppercase -dirs contain up to several complex scripts that illustrate a -particular kind of simulation method or model. Some of these run for -longer times, e.g. to measure a particular quantity. +There are two kinds of sub-directories in the examples folder. Lower +case named directories contain one or a few simple, quick-to-run +problems. Upper case named directories contain up to several complex +scripts that illustrate a particular kind of simulation method or +model. Some of these run for longer times, e.g. to measure a +particular quantity. Lists of both kinds of directories are given below. diff --git a/doc/src/Howto.rst b/doc/src/Howto.rst index 3a36c82674..05af2ffafc 100644 --- a/doc/src/Howto.rst +++ b/doc/src/Howto.rst @@ -5,7 +5,7 @@ These doc pages describe how to perform various tasks with LAMMPS, both for users and developers. The `glossary `_ website page also lists MD terminology with links to corresponding LAMMPS manual pages. The -example input scripts included in the examples dir of the LAMMPS +example input scripts included in the examples directory of the LAMMPS distribution and highlighted on the :doc:`Examples ` doc page also show how to setup and run various kinds of simulations. @@ -42,7 +42,7 @@ Settings howto .. toctree:: - :name: settings + :name: settings_howto :maxdepth: 1 Howto_2d @@ -58,7 +58,7 @@ Analysis howto .. toctree:: - :name: analysis + :name: analysis_howto :maxdepth: 1 Howto_output @@ -74,7 +74,7 @@ Force fields howto .. toctree:: - :name: force + :name: force_howto :maxdepth: 1 Howto_bioFF @@ -87,7 +87,7 @@ Packages howto .. toctree:: - :name: packages + :name: packages_howto :maxdepth: 1 Howto_spherical diff --git a/doc/src/Howto_2d.rst b/doc/src/Howto_2d.rst index 302ac78074..59060fbe1e 100644 --- a/doc/src/Howto_2d.rst +++ b/doc/src/Howto_2d.rst @@ -12,7 +12,7 @@ create\_atoms command will tile the 3d simulation box with a single z plane of atoms - e.g. -.. parsed-literal:: +.. code-block:: LAMMPS :doc:`create box ` 1 -10 10 -10 10 -0.25 0.25 diff --git a/doc/src/Howto_bash.rst b/doc/src/Howto_bash.rst index a77289317e..f8a5130b33 100644 --- a/doc/src/Howto_bash.rst +++ b/doc/src/Howto_bash.rst @@ -98,7 +98,7 @@ Installing prerequisite packages First upgrade all existing packages using -.. parsed-literal:: +.. code-block:: bash sudo apt update sudo apt upgrade -y @@ -107,7 +107,7 @@ Next install the following packages, which include compilers and libraries needed for various LAMMPS features: -.. parsed-literal:: +.. code-block:: bash sudo apt install -y build-essential ccache gfortran openmpi-bin libopenmpi-dev libfftw3-dev libjpeg-dev libpng12-dev python-dev python-virtualenv libblas-dev liblapack-dev libhdf5-serial-dev hdf5-tools @@ -127,7 +127,7 @@ Option 1: Downloading LAMMPS tarball using wget """"""""""""""""""""""""""""""""""""""""""""""" -.. parsed-literal:: +.. code-block:: bash wget http://lammps.sandia.gov/tars/lammps-stable.tar.gz tar xvzf lammps-stable.tar.gz @@ -137,7 +137,7 @@ Option 2: Obtaining LAMMPS code from GitHub """"""""""""""""""""""""""""""""""""""""""" -.. parsed-literal:: +.. code-block:: bash git clone https://github.com/lammps/lammps.git cd lammps @@ -151,7 +151,7 @@ Compiling serial version """""""""""""""""""""""" -.. parsed-literal:: +.. code-block:: bash cd src/ make -j 4 serial @@ -162,7 +162,7 @@ Compiling MPI version """"""""""""""""""""" -.. parsed-literal:: +.. code-block:: bash cd src/ make -j 4 mpi @@ -176,14 +176,14 @@ This will create an executable called lmp\_mpi in the src/ directory Finally, please note the absolute path of your src folder. You can get this using -.. parsed-literal:: +.. code-block:: bash pwd or -.. parsed-literal:: +.. code-block:: bash echo $PWD @@ -191,7 +191,7 @@ To run any examples you need the location of the executable. For now, let us save this location in a temporary variable -.. parsed-literal:: +.. code-block:: bash LAMMPS_DIR=$PWD @@ -206,7 +206,7 @@ Once compiled you can execute some of the LAMMPS examples. Switch into the examples/melt folder -.. parsed-literal:: +.. code-block:: bash cd ../examples/melt @@ -215,14 +215,14 @@ version is $LAMMPS\_DIR/lmp\_mpi. You can run the melt example with either version as follows: -.. parsed-literal:: +.. code-block:: bash $LAMMPS_DIR/lmp_serial -in in.melt or -.. parsed-literal:: +.. code-block:: bash mpirun -np 4 $LAMMPS_DIR/lmp_mpi -in in.melt @@ -236,21 +236,21 @@ You can avoid having to type the full path of your LAMMPS binary by adding its parent folder to the PATH environment variable as follows: -.. parsed-literal:: +.. code-block:: bash export PATH=$LAMMPS_DIR:$PATH Input scripts can then be run like this: -.. parsed-literal:: +.. code-block:: bash lmp_serial -in in.melt or -.. parsed-literal:: +.. code-block:: bash mpirun -np 4 lmp_mpi -in in.melt @@ -259,7 +259,7 @@ To persist this setting edit the $HOME/.bashrc file using your favorite editor and add this line -.. parsed-literal:: +.. code-block:: bash export PATH=/full/path/to/your/lammps/src:$PATH @@ -268,14 +268,14 @@ and add this line For an executable lmp\_serial with a full path -.. parsed-literal:: +.. code-block:: bash /home/richard/lammps/src/lmp_serial the PATH variable should be -.. parsed-literal:: +.. code-block:: bash export PATH=/home/richard/lammps/src:$PATH diff --git a/doc/src/Howto_chunk.rst b/doc/src/Howto_chunk.rst index 379225b13c..cedc05d9f4 100644 --- a/doc/src/Howto_chunk.rst +++ b/doc/src/Howto_chunk.rst @@ -151,7 +151,7 @@ properties: (1) Average velocity in each of 1000 2d spatial bins: -.. parsed-literal:: +.. code-block:: LAMMPS compute cc1 all chunk/atom bin/2d x 0.0 0.1 y lower 0.01 units reduced fix 1 all ave/chunk 100 10 1000 cc1 vx vy file tmp.out @@ -160,7 +160,7 @@ properties: velocity: -.. parsed-literal:: +.. code-block:: LAMMPS compute cc1 all chunk/atom bin/2d x 0.0 0.1 y lower 0.1 units reduced compute vbias all temp/profile 1 0 0 y 10 @@ -169,16 +169,16 @@ velocity: (3) Center of mass of each molecule: -.. parsed-literal:: +.. code-block:: LAMMPS compute cc1 all chunk/atom molecule compute myChunk all com/chunk cc1 - fix 1 all ave/time 100 1 100 c_myChunk[\*] file tmp.out mode vector + fix 1 all ave/time 100 1 100 c_myChunk[*] file tmp.out mode vector (4) Total force on each molecule and ave/max across all molecules: -.. parsed-literal:: +.. code-block:: LAMMPS compute cc1 all chunk/atom molecule fix 1 all ave/chunk 1000 1 1000 cc1 fx fy fz file tmp.out @@ -190,7 +190,7 @@ velocity: (5) Histogram of cluster sizes: -.. parsed-literal:: +.. code-block:: LAMMPS compute cluster all cluster/atom 1.0 compute cc1 all chunk/atom c_cluster compress yes diff --git a/doc/src/Howto_client_server.rst b/doc/src/Howto_client_server.rst index f2c6b6ce8b..e98a3c9a98 100644 --- a/doc/src/Howto_client_server.rst +++ b/doc/src/Howto_client_server.rst @@ -97,7 +97,7 @@ client or server code: * examples/COUPLE/lammps\_nwchem * examples/COUPLE/lammps\_vasp -The examples/message dir couples a client instance of LAMMPS to a +The examples/message directory couples a client instance of LAMMPS to a server instance of LAMMPS. The files in the *lammps\_mc* folder show how to couple LAMMPS as @@ -135,7 +135,7 @@ together to exchange MPI messages between them. For message exchange in *file*\ , *zmq*\ , or *mpi/two* modes: -.. parsed-literal:: +.. code-block:: bash % mpirun -np 1 lmp_mpi -log log.client < in.client & % mpirun -np 2 lmp_mpi -log log.server < in.server @@ -151,7 +151,7 @@ For message exchange in *mpi/one* mode: Launch both codes in a single mpirun command: -.. parsed-literal:: +.. code-block:: bash mpirun -np 2 lmp_mpi -mpicolor 0 -in in.message.client -log log.client : -np 4 lmp_mpi -mpicolor 1 -in in.message.server -log log.server diff --git a/doc/src/Howto_coreshell.rst b/doc/src/Howto_coreshell.rst index aae0dc77d6..bf600583c1 100644 --- a/doc/src/Howto_coreshell.rst +++ b/doc/src/Howto_coreshell.rst @@ -88,10 +88,10 @@ For the NaCL example problem, these pair style and bond style settings are used: -.. parsed-literal:: +.. code-block:: LAMMPS pair_style born/coul/long/cs 20.0 20.0 - pair_coeff \* \* 0.0 1.000 0.00 0.00 0.00 + pair_coeff * * 0.0 1.000 0.00 0.00 0.00 pair_coeff 3 3 487.0 0.23768 0.00 1.05 0.50 #Na-Na pair_coeff 3 4 145134.0 0.23768 0.00 6.99 8.70 #Na-Cl pair_coeff 4 4 405774.0 0.23768 0.00 72.40 145.40 #Cl-Cl @@ -132,7 +132,7 @@ this temperature be output for the overall system. For the NaCl example, this can be done as follows: -.. parsed-literal:: +.. code-block:: LAMMPS group cores type 1 2 group shells type 3 4 @@ -151,7 +151,7 @@ second argument in :doc:`fix modify ` and :doc:`thermo_modify ` resulting in: -.. parsed-literal:: +.. code-block:: LAMMPS (...) compute CSequ all temp/cs cores shells @@ -175,7 +175,7 @@ the pairs. This can be done by using the *bias* keyword of the :doc:`velocity ` command, e.g. -.. parsed-literal:: +.. code-block:: LAMMPS velocity all create 1427 134 bias yes temp CSequ velocity all scale 1427 temp CSequ @@ -212,7 +212,7 @@ pairs as chunks. For example if core/shell pairs are the only molecules: -.. parsed-literal:: +.. code-block:: LAMMPS read_data NaCl_CS_x0.1_prop.data compute prop all property/atom molecule @@ -223,7 +223,7 @@ For example if core/shell pairs are the only molecules: For example if core/shell pairs and other molecules are present: -.. parsed-literal:: +.. code-block:: LAMMPS fix csinfo all property/atom i_CSID # property/atom command read_data NaCl_CS_x0.1_prop.data fix csinfo NULL CS-Info # atom property added in the data-file diff --git a/doc/src/Howto_couple.rst b/doc/src/Howto_couple.rst index a46bb3f2f2..55c7d813d6 100644 --- a/doc/src/Howto_couple.rst +++ b/doc/src/Howto_couple.rst @@ -9,7 +9,7 @@ nodal points, compute a FE solution, and return interpolated forces on MD atoms. LAMMPS can be coupled to other codes in at least 4 ways. Each has -advantages and disadvantages, which you'll have to think about in the +advantages and disadvantages, which you will have to think about in the context of your application. diff --git a/doc/src/Howto_drude2.rst b/doc/src/Howto_drude2.rst index 0c2e08a431..1009eb5089 100644 --- a/doc/src/Howto_drude2.rst +++ b/doc/src/Howto_drude2.rst @@ -9,10 +9,8 @@ USER-DRUDE package activated. Then, the data file and input scripts have to be modified to include the Drude dipoles and how to handle them. - ---------- - **Overview of Drude induced dipoles** Polarizable atoms acquire an induced electric dipole moment under the @@ -35,7 +33,7 @@ polarizability :math:`\alpha` by .. math:: - \begin{equation} K_D = \frac 1 2\, \frac {q_D^2} \alpha\end{equation} + K_D = \frac 1 2\, \frac {q_D^2} \alpha Ideally, the mass of the Drude particle should be small, and the stiffness of the harmonic bond should be large, so that the Drude @@ -75,11 +73,8 @@ important features: #. The possibility to thermostat the additional degrees of freedom associated with the induced dipoles at very low temperature, in terms of the reduced coordinates of the Drude particles with respect to their cores. This makes the trajectory close to that of relaxed induced dipoles. #. The Drude dipoles on covalently bonded atoms interact too strongly due to the short distances, so an atom may capture the Drude particle (shell) of a neighbor, or the induced dipoles within the same molecule may align too much. To avoid this, damping at short of the interactions between the point charges composing the induced dipole can be done by :ref:`Thole ` functions. - - ---------- - **Preparation of the data file** The data file is similar to a standard LAMMPS data file for @@ -144,7 +139,7 @@ LAMMPS to recognize that you are using Drude oscillators, you should use the fix *drude*\ . The command is -.. parsed-literal:: +.. code-block:: LAMMPS fix DRUDE all drude C C C N N D D D @@ -165,7 +160,7 @@ space is required. Otherwise LAMMPS crashes and gives the required value. -.. parsed-literal:: +.. code-block:: LAMMPS read_data data-p.lmp extra/special/per/atom 1 @@ -179,7 +174,7 @@ include Coulomb interactions, for instance *lj/cut/coul/long* with 1.e-4: -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/cut/coul/long 10.0 kspace_style pppm 1.0e-4 @@ -190,14 +185,14 @@ interactions, their *epsilon* is 0. so the only *pair\_coeff* line that needs to be added is -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* 6\* 0.0 0.0 # All-DPs + pair_coeff * 6* 0.0 0.0 # All-DPs Now for the thermalization, the simplest choice is to use the :doc:`fix langevin/drude `. -.. parsed-literal:: +.. code-block:: LAMMPS fix LANG all langevin/drude 300. 100 12435 1. 20 13977 @@ -211,7 +206,7 @@ together with their DC. For this, ghost atoms need to know their velocities. Thus you need to add the following command: -.. parsed-literal:: +.. code-block:: LAMMPS comm_modify vel yes @@ -223,7 +218,7 @@ If the fix *shake* is used to constrain the C-H bonds, it should be invoked after the fix *langevin/drude* for more accuracy. -.. parsed-literal:: +.. code-block:: LAMMPS fix SHAKE ATOMS shake 0.0001 20 0 t 4 5 @@ -237,7 +232,7 @@ modification of forces but no position/velocity updates), the fix *nve* should be used in conjunction. -.. parsed-literal:: +.. code-block:: LAMMPS fix NVE all nve @@ -246,7 +241,7 @@ them in a *dump\_modify ... element ...* command, by adding the element type of the DPs. Here for instance -.. parsed-literal:: +.. code-block:: LAMMPS dump DUMP all custom 10 dump.lammpstrj id mol type element x y z ix iy iz dump_modify DUMP element C C O H H D D D @@ -260,7 +255,7 @@ temperatures of the DC-DP pair centers of mass and of the DPs relative to their DCs, you should use the :doc:`compute temp\_drude ` -.. parsed-literal:: +.. code-block:: LAMMPS compute TDRUDE all temp/drude @@ -269,7 +264,7 @@ using *thermo\_style custom* with respectively *c\_TDRUDE[1]* and *c\_TDRUDE[2]*. These should be close to 300.0 and 1.0 on average. -.. parsed-literal:: +.. code-block:: LAMMPS thermo_style custom step temp c_TDRUDE[1] c_TDRUDE[2] @@ -295,7 +290,7 @@ It is to be used as *hybrid/overlay* with any standard *coul* pair style. In our example, we would use -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid/overlay lj/cut/coul/long 10.0 thole 2.6 10.0 @@ -311,7 +306,7 @@ to complete the *pair\_coeff* section of the input file. In our example, this will look like: -.. parsed-literal:: +.. code-block:: LAMMPS pair_coeff 1 1 lj/cut/coul/long 0.0700 3.550 pair_coeff 1 2 lj/cut/coul/long 0.0700 3.550 @@ -323,8 +318,8 @@ example, this will look like: pair_coeff 3 3 lj/cut/coul/long 0.1700 3.070 pair_coeff 3 4 lj/cut/coul/long 0.0714 2.745 pair_coeff 4 4 lj/cut/coul/long 0.0300 2.420 - pair_coeff \* 5 lj/cut/coul/long 0.0000 0.000 - pair_coeff \* 6\* lj/cut/coul/long 0.0000 0.000 + pair_coeff * 5 lj/cut/coul/long 0.0000 0.000 + pair_coeff * 6* lj/cut/coul/long 0.0000 0.000 pair_coeff 1 1 thole 1.090 2.510 pair_coeff 1 2 thole 1.218 2.510 pair_coeff 1 3 thole 0.829 1.590 @@ -376,7 +371,7 @@ Using a Nose-Hoover barostat with the *langevin/drude* thermostat is straightforward using fix *nph* instead of *nve*\ . For example: -.. parsed-literal:: +.. code-block:: LAMMPS fix NPH all nph iso 1. 1. 500 @@ -391,7 +386,7 @@ the reverse transformation. For a NVT simulation, with the DCs and atoms at 300 K and the DPs at 1 K relative to their DC one would use -.. parsed-literal:: +.. code-block:: LAMMPS fix DIRECT all drude/transform/direct fix NVT1 ATOMS nvt temp 300. 300. 100 @@ -401,7 +396,7 @@ atoms at 300 K and the DPs at 1 K relative to their DC one would use For our phenol example, the groups would be defined as -.. parsed-literal:: +.. code-block:: LAMMPS group ATOMS type 1 2 3 4 5 # DCs and non-polarizable atoms group CORES type 1 2 3 # DCs @@ -415,7 +410,7 @@ center of mass of the whole system drifts faster and faster, the *fix momentum* can be used. For instance: -.. parsed-literal:: +.. code-block:: LAMMPS fix MOMENTUM all momentum 100 linear 1 1 1 @@ -430,7 +425,7 @@ the *fix\_modify* command for this. In the end, the block of instructions for thermostatting and barostatting will look like -.. parsed-literal:: +.. code-block:: LAMMPS compute TATOMS ATOMS temp fix DIRECT all drude/transform/direct @@ -454,7 +449,7 @@ review the different thermostats and ensemble combinations. NVT ensemble using Langevin thermostat: -.. parsed-literal:: +.. code-block:: LAMMPS comm_modify vel yes fix LANG all langevin/drude 300. 100 12435 1. 20 13977 @@ -464,7 +459,7 @@ NVT ensemble using Langevin thermostat: NVT ensemble using Nose-Hoover thermostat: -.. parsed-literal:: +.. code-block:: LAMMPS fix DIRECT all drude/transform/direct fix RIGID ATOMS rigid/nvt/small molecule temp 300. 300. 100 @@ -474,7 +469,7 @@ NVT ensemble using Nose-Hoover thermostat: NPT ensemble with Langevin thermostat: -.. parsed-literal:: +.. code-block:: LAMMPS comm_modify vel yes fix LANG all langevin/drude 300. 100 12435 1. 20 13977 @@ -484,7 +479,7 @@ NPT ensemble with Langevin thermostat: NPT ensemble using Nose-Hoover thermostat: -.. parsed-literal:: +.. code-block:: LAMMPS compute TATOM ATOMS temp fix DIRECT all drude/transform/direct diff --git a/doc/src/Howto_github.rst b/doc/src/Howto_github.rst index 9b9959d202..6e1bc5bb60 100644 --- a/doc/src/Howto_github.rst +++ b/doc/src/Howto_github.rst @@ -3,16 +3,14 @@ LAMMPS GitHub tutorial **written by Stefan Paquay** - ---------- - This document describes the process of how to use GitHub to integrate changes or additions you have made to LAMMPS into the official LAMMPS distribution. It uses the process of updating this very tutorial as an example to describe the individual steps and options. You need to be familiar with git and you may want to have a look at the -`Git book `_ to reacquaint yourself with some +`git book `_ to reacquaint yourself with some of the more advanced git features used below. As of fall 2016, submitting contributions to LAMMPS via pull requests @@ -84,14 +82,14 @@ First of all, create a clone of your version on github on your local machine via HTTPS: -.. parsed-literal:: +.. code-block:: bash $ git clone https://github.com//lammps.git or, if you have set up your GitHub account for using SSH keys, via SSH: -.. parsed-literal:: +.. code-block:: bash $ git clone git@github.com:/lammps.git @@ -111,7 +109,7 @@ To pull changes from upstream into this copy, you can go to the directory and use git pull: -.. parsed-literal:: +.. code-block:: bash $ cd mylammps $ git checkout master @@ -120,7 +118,7 @@ and use git pull: You can also add this URL as a remote: -.. parsed-literal:: +.. code-block:: bash $ git remote add lammps_upstream https://www.github.com/lammps/lammps @@ -130,7 +128,7 @@ workflow that updated this tutorial, and hence we will call the branch "github-tutorial-update": -.. parsed-literal:: +.. code-block:: bash $ git checkout -b github-tutorial-update master @@ -143,38 +141,39 @@ unrelated feature, you should switch branches! After everything is done, add the files to the branch and commit them: -.. parsed-literal:: +.. code-block:: bash $ git add doc/src/Howto_github.txt - $ git add doc/src/JPG/tutorial\*.png + $ git add doc/src/JPG/tutorial*.png .. warning:: - Do not use *git commit -a* (or *git add -A*\ ). The -a - flag (or -A flag) will automatically include \_all\\_ modified or new files + Do not use *git commit -a* (or *git add -A*\ ). The -a flag (or -A + flag) will automatically include **all** modified **and** new files and that is rarely the behavior you want. It can easily lead to - accidentally adding unrelated and unwanted changes into the repository. - Instead it is preferable to explicitly use *git add*\ , *git rm*\ , *git mv* - for adding, removing, renaming individual files, respectively, and then - *git commit* to finalize the commit. Carefully check all pending - changes with *git status* before committing them. If you find doing - this on the command line too tedious, consider using a GUI, for example - the one included in git distributions written in Tk, i.e. use *git gui* - (on some Linux distributions it may be required to install an additional - package to use it). + accidentally adding unrelated and unwanted changes into the + repository. Instead it is preferable to explicitly use *git add*\ , + *git rm*\ , *git mv* for adding, removing, renaming individual files, + respectively, and then *git commit* to finalize the commit. + Carefully check all pending changes with *git status* before + committing them. If you find doing this on the command line too + tedious, consider using a GUI, for example the one included in git + distributions written in Tk, i.e. use *git gui* (on some Linux + distributions it may be required to install an additional package to + use it). After adding all files, the change set can be committed with some useful message that explains the change. -.. parsed-literal:: +.. code-block:: bash $ git commit -m 'Finally updated the github tutorial' After the commit, the changes can be pushed to the same branch on GitHub: -.. parsed-literal:: +.. code-block:: bash $ git push @@ -183,7 +182,7 @@ not configured anything. If your local branch is not present on GitHub yet, it will ask you to add it by running -.. parsed-literal:: +.. code-block:: bash $ git push --set-upstream origin github-tutorial-update @@ -194,14 +193,14 @@ If you want to make really sure you push to the right repository (which is good practice), you can provide it explicitly: -.. parsed-literal:: +.. code-block:: bash $ git push origin or using an explicit URL: -.. parsed-literal:: +.. code-block:: bash $ git push git@github.com:Pakketeretet2/lammps.git @@ -410,10 +409,10 @@ Now, since in the meantime our local text for the tutorial also changed, we need to pull Axel's change back into our branch, and merge them: -.. parsed-literal:: +.. code-block:: bash $ git add Howto_github.txt - $ git add JPG/tutorial_reverse_pull_request\*.png + $ git add JPG/tutorial_reverse_pull_request*.png $ git commit -m "Updated text and images on reverse pull requests" $ git pull @@ -427,7 +426,7 @@ branch is now perfect as far as we are concerned, so we are going to commit and push again: -.. parsed-literal:: +.. code-block:: bash $ git add Howto_github.txt $ git add JPG/tutorial_reverse_pull_request6.png @@ -458,7 +457,7 @@ keep it a bit more tidy. Note that you first have to switch to another branch! -.. parsed-literal:: +.. code-block:: bash $ git checkout master $ git pull master @@ -474,7 +473,7 @@ Finally, if you delete the branch locally, you might want to push this to your remote(s) as well: -.. parsed-literal:: +.. code-block:: bash $ git push origin :github-tutorial-update diff --git a/doc/src/Howto_library.rst b/doc/src/Howto_library.rst index 3a859f697c..3e0ec01d31 100644 --- a/doc/src/Howto_library.rst +++ b/doc/src/Howto_library.rst @@ -59,17 +59,17 @@ details. wish. -.. parsed-literal:: +.. code-block:: c - void lammps_open(int, char \*\*, MPI_Comm, void \*\*) - void lammps_open_no_mpi(int, char \*\*, void \*\*) - void lammps_close(void \*) - int lammps_version(void \*) - void lammps_file(void \*, char \*) - char \*lammps_command(void \*, char \*) - void lammps_commands_list(void \*, int, char \*\*) - void lammps_commands_string(void \*, char \*) - void lammps_free(void \*) + void lammps_open(int, char **, MPI_Comm, void **) + void lammps_open_no_mpi(int, char **, void **) + void lammps_close(void *) + int lammps_version(void *) + void lammps_file(void *, char *) + char *lammps_command(void *, char *) + void lammps_commands_list(void *, int, char **) + void lammps_commands_string(void *, char *) + void lammps_free(void *) The lammps\_open() function is used to initialize LAMMPS, passing in a list of strings as if they were :doc:`command-line arguments ` when LAMMPS is run in stand-alone mode @@ -137,16 +137,16 @@ the documentation in the src/library.cpp file for details, including which quantities can be queried by name: -.. parsed-literal:: +.. code-block:: c - int lammps_extract_setting(void \*, char \*) - void \*lammps_extract_global(void \*, char \*) - void lammps_extract_box(void \*, double \*, double \*, - double \*, double \*, double \*, int \*, int \*) - void \*lammps_extract_atom(void \*, char \*) - void \*lammps_extract_compute(void \*, char \*, int, int) - void \*lammps_extract_fix(void \*, char \*, int, int, int, int) - void \*lammps_extract_variable(void \*, char \*, char \*) + int lammps_extract_setting(void *, char *) + void *lammps_extract_global(void *, char *) + void lammps_extract_box(void *, double *, double *, + double *, double *, double *, int *, int *) + void *lammps_extract_atom(void *, char *) + void *lammps_extract_compute(void *, char *, int, int) + void *lammps_extract_fix(void *, char *, int, int, int, int) + void *lammps_extract_variable(void *, char *, char *) The extract\_setting() function returns info on the size of data types (e.g. 32-bit or 64-bit atom IDs) used @@ -164,13 +164,13 @@ storage may be reallocated as LAMMPS runs, so you need to re-call the function to assure a current pointer or returned value(s). -.. parsed-literal:: +.. code-block:: c - double lammps_get_thermo(void \*, char \*) - int lammps_get_natoms(void \*) + double lammps_get_thermo(void *, char *) + int lammps_get_natoms(void *) - int lammps_set_variable(void \*, char \*, char \*) - void lammps_reset_box(void \*, double \*, double \*, double, double, double) + int lammps_set_variable(void *, char *, char *) + void lammps_reset_box(void *, double *, double *, double, double, double) The lammps\_get\_thermo() function returns the current value of a thermo keyword as a double precision value. @@ -188,13 +188,13 @@ simulation box, e.g. as part of restoring a previously extracted and saved state of a simulation. -.. parsed-literal:: +.. code-block:: c - void lammps_gather_atoms(void \*, char \*, int, int, void \*) - void lammps_gather_atoms_concat(void \*, char \*, int, int, void \*) - void lammps_gather_atoms_subset(void \*, char \*, int, int, int, int \*, void \*) - void lammps_scatter_atoms(void \*, char \*, int, int, void \*) - void lammps_scatter_atoms_subset(void \*, char \*, int, int, int, int \*, void \*) + void lammps_gather_atoms(void *, char *, int, int, void *) + void lammps_gather_atoms_concat(void *, char *, int, int, void *) + void lammps_gather_atoms_subset(void *, char *, int, int, int, int *, void *) + void lammps_scatter_atoms(void *, char *, int, int, void *) + void lammps_scatter_atoms_subset(void *, char *, int, int, int, int *, void *) The gather functions collect peratom info of the requested type (atom coords, atom types, forces, etc) from all processors, and returns the @@ -231,10 +231,10 @@ lammps\_scatter\_atoms\_subset() function takes a subset of IDs as an argument and only scatters those values to the owning atoms. -.. parsed-literal:: +.. code-block:: c - void lammps_create_atoms(void \*, int, tagint \*, int \*, double \*, double \*, - imageint \*, int) + void lammps_create_atoms(void *, int, tagint *, int *, double *, double *, + imageint *, int) The lammps\_create\_atoms() function takes a list of N atoms as input with atom types and coords (required), an optionally atom IDs and diff --git a/doc/src/Howto_multiple.rst b/doc/src/Howto_multiple.rst index 72787e6c29..42b58c041c 100644 --- a/doc/src/Howto_multiple.rst +++ b/doc/src/Howto_multiple.rst @@ -9,7 +9,7 @@ more timesteps, then you simply use the :doc:`run ` command multiple times. For example, this script -.. parsed-literal:: +.. code-block:: LAMMPS units lj atom_style atomic @@ -28,7 +28,7 @@ the :doc:`clear ` command can be used in between them to re-initialize LAMMPS. For example, this script -.. parsed-literal:: +.. code-block:: LAMMPS units lj atom_style atomic @@ -49,7 +49,7 @@ multiple times with different settings. For example, this script, named in.polymer -.. parsed-literal:: +.. code-block:: LAMMPS variable d index run1 run2 run3 run4 run5 run6 run7 run8 shell cd $d @@ -66,7 +66,7 @@ same system at 8 different temperatures, using a temperature variable and storing the output in different log and dump files, for example -.. parsed-literal:: +.. code-block:: LAMMPS variable a loop 8 variable t index 0.8 0.85 0.9 0.95 1.0 1.05 1.1 1.15 diff --git a/doc/src/Howto_replica.rst b/doc/src/Howto_replica.rst index 92d2455dd1..f9aca02dcd 100644 --- a/doc/src/Howto_replica.rst +++ b/doc/src/Howto_replica.rst @@ -38,7 +38,7 @@ run-time by using the :doc:`-partition command-line switch ` to lau which in this context are the same as replicas. E.g. these commands: -.. parsed-literal:: +.. code-block:: bash mpirun -np 16 lmp_linux -partition 8x2 -in in.temper mpirun -np 8 lmp_linux -partition 8x1 -in in.neb diff --git a/doc/src/Howto_restart.rst b/doc/src/Howto_restart.rst index 1459ed868f..484f09775b 100644 --- a/doc/src/Howto_restart.rst +++ b/doc/src/Howto_restart.rst @@ -22,7 +22,7 @@ of the LAMMPS distribution to see the original script that these 2 scripts are based on. If that script had the line -.. parsed-literal:: +.. code-block:: LAMMPS restart 50 tmp.restart @@ -33,7 +33,7 @@ This script could be used to read the 1st restart file and re-run the last 50 timesteps: -.. parsed-literal:: +.. code-block:: LAMMPS read_restart tmp.restart.50 @@ -63,14 +63,14 @@ As an alternate approach, the restart file could be converted to a data file as follows: -.. parsed-literal:: +.. code-block:: LAMMPS lmp_g++ -r tmp.restart.50 tmp.restart.data Then, this script could be used to re-run the last 50 steps: -.. parsed-literal:: +.. code-block:: LAMMPS units lj atom_style bond diff --git a/doc/src/Howto_spherical.rst b/doc/src/Howto_spherical.rst index b9f7f72131..066329a985 100644 --- a/doc/src/Howto_spherical.rst +++ b/doc/src/Howto_spherical.rst @@ -39,7 +39,7 @@ is often used in conjunction with spherical particles, via a command like -.. parsed-literal:: +.. code-block:: LAMMPS atom_style hybrid sphere dipole diff --git a/doc/src/Howto_viscosity.rst b/doc/src/Howto_viscosity.rst index ce738734f8..9e00c18732 100644 --- a/doc/src/Howto_viscosity.rst +++ b/doc/src/Howto_viscosity.rst @@ -63,7 +63,7 @@ Here is an example input script that calculates the viscosity of liquid Ar via the GK formalism: -.. parsed-literal:: +.. code-block:: LAMMPS # Sample LAMMPS input script for viscosity of liquid Ar @@ -73,7 +73,7 @@ liquid Ar via the GK formalism: variable dt equal 4.0 variable p equal 400 # correlation length variable s equal 5 # sample interval - variable d equal $p\*$s # dump interval + variable d equal $p*$s # dump interval # convert from LAMMPS real units to SI @@ -81,7 +81,7 @@ liquid Ar via the GK formalism: variable atm2Pa equal 101325.0 variable A2m equal 1.0e-10 variable fs2s equal 1.0e-15 - variable convert equal ${atm2Pa}\*${atm2Pa}\*${fs2s}\*${A2m}\*${A2m}\*${A2m} + variable convert equal ${atm2Pa}*${atm2Pa}*${fs2s}*${A2m}*${A2m}*${A2m} # setup problem @@ -93,7 +93,7 @@ liquid Ar via the GK formalism: create_atoms 1 box mass 1 39.948 pair_style lj/cut 13.0 - pair_coeff \* \* 0.2381 3.405 + pair_coeff * * 0.2381 3.405 timestep ${dt} thermo $d @@ -114,15 +114,15 @@ liquid Ar via the GK formalism: variable pyz equal pyz fix SS all ave/correlate $s $p $d & v_pxy v_pxz v_pyz type auto file S0St.dat ave running - variable scale equal ${convert}/(${kB}\*$T)\*$V\*$s\*${dt} - variable v11 equal trap(f_SS[3])\*${scale} - variable v22 equal trap(f_SS[4])\*${scale} - variable v33 equal trap(f_SS[5])\*${scale} + variable scale equal ${convert}/(${kB}*$T)*$V*$s*${dt} + variable v11 equal trap(f_SS[3])*${scale} + variable v22 equal trap(f_SS[4])*${scale} + variable v33 equal trap(f_SS[5])*${scale} thermo_style custom step temp press v_pxy v_pxz v_pyz v_v11 v_v22 v_v33 run 100000 variable v equal (v_v11+v_v22+v_v33)/3.0 variable ndens equal count(all)/vol - print "average viscosity: $v [Pa.s] @ $T K, ${ndens} /A\^3" + print "average viscosity: $v [Pa.s] @ $T K, ${ndens} /A^3" The fifth method is related to the above Green-Kubo method, but uses the Einstein formulation, analogous to the Einstein diff --git a/doc/src/Install.rst b/doc/src/Install.rst index 9f744ff05f..b2d72d61c8 100644 --- a/doc/src/Install.rst +++ b/doc/src/Install.rst @@ -19,7 +19,6 @@ need the source code. Install_tarball Install_git - Install_svn Install_patch These are the files and sub-directories in the LAMMPS distribution: diff --git a/doc/src/Install_conda.rst b/doc/src/Install_conda.rst index 7c69dcf745..9e63a14453 100644 --- a/doc/src/Install_conda.rst +++ b/doc/src/Install_conda.rst @@ -8,14 +8,14 @@ instructions to install `Miniconda `_, then create a conda environment (named `my-lammps-env` or whatever you prefer) for your lammps install: -.. parsed-literal:: +.. code-block:: bash % conda config --add channels conda-forge % conda create -n my-lammps-env Then, you can install lammps on your system with the following command: -.. parsed-literal:: +.. code-block:: bash % conda activate my-lammps-env % conda install lammps @@ -25,8 +25,7 @@ results in Conda also installing the `kim-api` binaries when LAMMPS is installed. In order to use potentials from `openkim.org `_, you can install the `openkim-models` package - -.. parsed-literal:: +.. code-block:: bash % conda install openkim-models @@ -36,9 +35,6 @@ Thanks to Jan Janssen (Max-Planck-Institut fuer Eisenforschung) for setting up the Conda capability. .. _conda_forge_lammps: https://github.com/conda-forge/lammps-feedstock/issues - .. _openkim: https://openkim.org - .. _conda: https://docs.conda.io/en/latest/index.html - .. _mini_conda_install: https://docs.conda.io/en/latest/miniconda.html diff --git a/doc/src/Install_git.rst b/doc/src/Install_git.rst index b1987bcd21..cda5df21c2 100644 --- a/doc/src/Install_git.rst +++ b/doc/src/Install_git.rst @@ -1,5 +1,5 @@ -Download source via Git -======================= +Download the LAMMPS source with git +=================================== All LAMMPS development is coordinated through the "LAMMPS GitHub site". If you clone the LAMMPS repository onto your local machine, it @@ -11,33 +11,30 @@ has several advantages: * You can submit your new features back to GitHub for inclusion in LAMMPS. -You must have `Git `_ installed on your system to communicate with -the public Git server for LAMMPS. +You must have `git `_ installed on your system to communicate with +the public git server for LAMMPS. .. warning:: - As of Oct 2016, the official home of public LAMMPS - development is on GitHub. The previously advertised LAMMPS git - repositories on git.lammps.org and bitbucket.org are now deprecated, - may not be up-to-date, and may go away at any time. + As of October 2016, the official home of public LAMMPS development is + on GitHub. The previously advertised LAMMPS git repositories on + git.lammps.org and bitbucket.org are now deprecated, and may go away at any time. -.. _git: http://git-scm.com +.. _git: https://git-scm.com - - -You can follow LAMMPS development on 3 different Git branches: +You can follow LAMMPS development on 3 different git branches: * **stable** : this branch is updated with every stable release * **unstable** : this branch is updated with every patch release * **master** : this branch continuously follows ongoing development -To access the Git repositories on your box, use the clone command to +To access the git repositories on your box, use the clone command to create a local copy of the LAMMPS repository with a command like: -.. parsed-literal:: +.. code-block:: bash - git clone -b unstable https://github.com/lammps/lammps.git mylammps + $ git clone -b unstable https://github.com/lammps/lammps.git mylammps where "mylammps" is the name of the directory you wish to create on your machine and "unstable" is one of the 3 branches listed above. @@ -53,33 +50,32 @@ typing "make html" from the doc directory. After initial cloning, as bug fixes and new features are added to LAMMPS, as listed on :doc:`this page `, you can stay -up-to-date by typing the following Git commands from within the +up-to-date by typing the following git commands from within the "mylammps" directory: -.. parsed-literal:: +.. code-block:: bash - git checkout unstable # not needed if you always stay in this branch - git checkout stable # use one of the 3 checkout commands - git checkout master - git pull + $ git checkout unstable # not needed if you always stay in this branch + $ git checkout stable # use one of the 3 checkout commands + $ git checkout master + $ git pull Doing a "pull" will not change any files you have added to the LAMMPS directory structure. It will also not change any existing LAMMPS files you have edited, unless those files have changed in the -repository. In that case, Git will attempt to merge the new +repository. In that case, git will attempt to merge the new repository file with your version of the file and tell you if there -are any conflicts. See the Git documentation for details. +are any conflicts. See the git documentation for details. If you want to access a particular previous release version of LAMMPS, you can instead "checkout" any version with a published tag. See the -output of "git tag -l" for the list of tags. The Git command to do +output of "git tag -l" for the list of tags. The git command to do this is as follows. +.. code-block:: bash -.. parsed-literal:: - - git checkout tagID + $ git checkout tagID Stable versions and what tagID to use for a particular stable version are discussed on :doc:`this page `. Note that this command @@ -93,11 +89,11 @@ checkout"), you still need to re-build LAMMPS if any source files have changed. To do this, you should cd to the src directory and type: -.. parsed-literal:: +.. code-block:: bash - make purge # remove any deprecated src files - make package-update # sync package files with src files - make foo # re-build for your machine (mpi, serial, etc) + $ make purge # remove any deprecated src files + $ make package-update # sync package files with src files + $ make foo # re-build for your machine (mpi, serial, etc) just as described on the :doc:`Install patch ` doc page, after a patch has been installed. @@ -107,15 +103,15 @@ after a patch has been installed. If you wish to edit/change a src file that is from a package, you should edit the version of the file inside the package sub-directory with src, then re-install the package. The version in - the src dir is merely a copy and will be wiped out if you type "make + the source directory is merely a copy and will be wiped out if you type "make package-update". .. warning:: The GitHub servers support both the "git://" and "https://" access protocols for anonymous read-only access. If you - have a correspondingly configured GitHub account, you may also use SSH - with "git@github.com:/lammps/lammps.git". + have a correspondingly configured GitHub account, you may also use + SSH access with the URL "git@github.com:lammps/lammps.git". The LAMMPS GitHub project is managed by Christoph Junghans (LANL, junghans at lanl.gov), Axel Kohlmeyer (Temple U, akohlmey at diff --git a/doc/src/Install_linux.rst b/doc/src/Install_linux.rst index 19f8fffc13..03acf55734 100644 --- a/doc/src/Install_linux.rst +++ b/doc/src/Install_linux.rst @@ -11,10 +11,8 @@ Binaries are available for different versions of Linux: | :ref:`Arch Linux build-script ` | - ---------- - .. _ubuntu: Pre-built Ubuntu Linux executables @@ -29,42 +27,37 @@ operating system. To install the appropriate personal-package archive (PPA), do the following once: +.. code-block:: bash -.. parsed-literal:: - - sudo add-apt-repository ppa:gladky-anton/lammps - sudo apt-get update + $ sudo add-apt-repository ppa:gladky-anton/lammps + $ sudo apt-get update To install LAMMPS do the following once: +.. code-block:: bash -.. parsed-literal:: - - sudo apt-get install lammps-daily + $ sudo apt-get install lammps-daily This downloads an executable named "lmp\_daily" to your box, which can then be used in the usual way to run input scripts: +.. code-block:: bash -.. parsed-literal:: - - lmp_daily -in in.lj + $ lmp_daily -in in.lj To update LAMMPS to the most current version, do the following: +.. code-block:: bash -.. parsed-literal:: - - sudo apt-get update + $ sudo apt-get update which will also update other packages on your system. To get a copy of the current documentation and examples: +.. code-block:: bash -.. parsed-literal:: - - sudo apt-get install lammps-daily-doc + $ sudo apt-get install lammps-daily-doc which will download the doc files in /usr/share/doc/lammps-daily-doc/doc and example problems in @@ -75,26 +68,27 @@ files and auxiliary tools. To un-install LAMMPS, do the following: +.. code-block:: bash -.. parsed-literal:: - - sudo apt-get remove lammps-daily + $ sudo apt-get remove lammps-daily Note that the lammps-daily executable is built with the following sequence of make commands, as if you had done the same with the unpacked tarball files in the src directory: -make yes-all; make no-lib; make openmpi +.. code-block:: bash + + $ make yes-all + $ make no-lib + $ make mpi Thus it builds with FFTW3 and OpenMPI. Thanks to Anton Gladky (gladky.anton at gmail.com) for setting up this Ubuntu package capability. - ---------- - .. _fedora: Pre-built Fedora Linux executables @@ -118,12 +112,11 @@ The same mechanism applies when loading the LAMMPS python module. To install LAMMPS with OpenMPI and run an input in.lj with 2 CPUs do: +.. code-block:: bash -.. parsed-literal:: - - dnf install lammps-openmpi - module load mpi/openmpi-x86_64 - mpirun -np 2 lmp -in in.lj + $ dnf install lammps-openmpi + $ module load mpi/openmpi-x86_64 + $ mpirun -np 2 lmp -in in.lj The "dnf install" command is needed only once. In case of a new LAMMPS stable release, "dnf update" will automatically update to the newer @@ -137,9 +130,9 @@ results in the above command also installing the `kim-api` binaries when LAMMPS is installed. In order to use potentials from `openkim.org `_, you can install the `openkim-models` package -.. parsed-literal:: +.. code-block:: bash - dnf install openkim-models + $ dnf install openkim-models Please use "lmp -help" to see which compilation options, packages, and styles are included in the binary. @@ -150,7 +143,6 @@ Thanks to Christoph Junghans (LANL) for making LAMMPS available in Fedora. ---------- - .. _epel: Pre-built EPEL Linux executable @@ -169,10 +161,8 @@ and styles are included in the binary. Thanks to Christoph Junghans (LANL) for making LAMMPS available in EPEL. - ---------- - .. _opensuse: Pre-built OpenSuse Linux executable @@ -181,18 +171,16 @@ Pre-built OpenSuse Linux executable A pre-built LAMMPS package for stable releases is available in OpenSuse as of Leap 15.0. You can install the package with: +.. code-block:: bash -.. parsed-literal:: - - zypper install lammps + $ zypper install lammps This includes support for OpenMPI. The name of the LAMMPS executable is *lmp*\ . Thus to run an input in parallel on 2 CPUs you would do: +.. code-block:: bash -.. parsed-literal:: - - mpirun -np 2 lmp -in in.lj + $ mpirun -np 2 lmp -in in.lj Please use "lmp -help" to see which compilation options, packages, and styles are included in the binary. @@ -202,16 +190,14 @@ results in the above command also installing the `kim-api` binaries when LAMMPS is installed. In order to use potentials from `openkim.org `_, you can install the `openkim-models` package -.. parsed-literal:: +.. code-block:: bash - zypper install openkim-models + $ zypper install openkim-models Thanks to Christoph Junghans (LANL) for making LAMMPS available in OpenSuse. - ---------- - .. _gentoo: Gentoo Linux executable @@ -221,7 +207,7 @@ LAMMPS is part of Gentoo's main package tree and can be installed by typing: -.. parsed-literal:: +.. code-block:: bash % emerge --ask lammps @@ -231,7 +217,7 @@ built on the your machine. Certain LAMMPS packages can be enable via USE flags, type -.. parsed-literal:: +.. code-block:: bash % equery uses lammps @@ -240,40 +226,32 @@ for details. Thanks to Nicolas Bock and Christoph Junghans (LANL) for setting up this Gentoo capability. - ---------- - .. _arch: Archlinux build-script --------------------------------- LAMMPS is available via Arch's unofficial Arch User repository (AUR). - There are three scripts available, named lammps, lammps-beta and lammps-git. They respectively package the stable, patch and git releases. To install, you will need to have the git package installed. You may use any of the above names in-place of lammps. - -.. parsed-literal:: +.. code-block:: bash $ git clone https://aur.archlinux.org/lammps.git - $ cd lammps - $ makepkg -s - - # makepkg -i + $ makepkg -i To update, you may repeat the above, or change into the cloned directory, and execute the following, after which, if there are any changes, you may use makepkg as above. - -.. parsed-literal:: +.. code-block:: bash $ git pull diff --git a/doc/src/Install_mac.rst b/doc/src/Install_mac.rst index 1a3c200f65..82d77446c8 100644 --- a/doc/src/Install_mac.rst +++ b/doc/src/Install_mac.rst @@ -11,7 +11,7 @@ After installing Homebrew, you can install LAMMPS on your system with the following commands: -.. parsed-literal:: +.. code-block:: bash % brew install lammps @@ -22,7 +22,7 @@ Once LAMMPS is installed, you can test the installation with the Lennard-Jones benchmark file: -.. parsed-literal:: +.. code-block:: bash % brew test lammps -v @@ -32,7 +32,7 @@ installed. In order to use potentials from `openkim.org `_, you can install the `openkim-models` package -.. parsed-literal:: +.. code-block:: bash % brew install openkim-models diff --git a/doc/src/Install_patch.rst b/doc/src/Install_patch.rst index 7569b0b146..9c06633f2c 100644 --- a/doc/src/Install_patch.rst +++ b/doc/src/Install_patch.rst @@ -2,9 +2,9 @@ Applying patches ================ It is easy to stay current with the most recent LAMMPS patch releases -if you use Git or SVN to track LAMMPS development. Instructions for -how to stay current are on the :doc:`Install git ` and -:doc:`Install svn ` doc pages. +if you use git to track the LAMMPS development. Instructions for +how to stay current are on the +:doc:`Download the LAMMPS source with git ` page. If you prefer to download a tarball, as described on the :doc:`Install git ` doc page, you can stay current by downloading "patch files" when new patch releases are made. A link to @@ -15,9 +15,9 @@ LAMMPS directory. .. note:: - You should not apply patch files to a local Git or SVN repo of - LAMMPS, only to an unpacked tarball. Use Git and SVN commands to - update repo versions of LAMMPS. + You should not apply patch files to a local git checkout of + LAMMPS, only to an unpacked tarball. Use git commands to + update such a version of the LAMMPS source code. Here are the steps to apply a patch file. Note that if your version of LAMMPS is several patch releases behind, you need to apply all the @@ -33,9 +33,9 @@ up to date. LAMMPS directory, where the redirected file is the name of the patch file. - .. parsed-literal:: + .. code-block:: bash - patch -bp1 < patch.12Dec16 + $ patch -bp1 < patch.12Dec16 * A list of updated files print out to the screen. The -b switch creates backup files of your originals (e.g. src/force.cpp.orig), so @@ -47,17 +47,17 @@ up to date. command removes deprecated src files if any were removed by the patch from package sub-directories. - .. parsed-literal:: + .. code-block:: bash - make purge - make package-update + $ make purge + $ make package-update * Re-build LAMMPS via the "make" command. .. warning:: - If you wish to edit/change a src file that is from a - package, you should edit the version of the file inside the package - sub-dir of src, then re-install the package. The version in the src - dir is merely a copy and will be wiped out if you type "make - package-update". + If you wish to edit/change a source file that is part of a package, + you should edit the version of the file inside the package folder in + src, and then re-install or update the package. The version in the + src directory is merely a copy and will be wiped out when you type + "make package-update". diff --git a/doc/src/Install_svn.rst b/doc/src/Install_svn.rst deleted file mode 100644 index 42d5d2e855..0000000000 --- a/doc/src/Install_svn.rst +++ /dev/null @@ -1,97 +0,0 @@ -Download source via SVN -======================= - -.. warning:: - - As of Oct 2016, SVN support is now implemented via a - git-to-subversion interface service on GitHub and no longer through a - mirror of the internal SVN repository at Sandia. - -You must have the `Subversion (SVN) client software `_ installed on -your system to communicate with the Git server in this mode. - -.. _svn: http://subversion.apache.org - - - -You can follow LAMMPS development on 3 different SVN branches: - -* **stable** : this branch is updated with every stable release -* **unstable** : this branch is updated with every patch release -* **master** : this branch continuously follows ongoing development - -The corresponding command lines to do an initial checkout are as -follows. (Note that unlike Git, you must perform a separate checkout -into a unique directory for each of the 3 branches.) - - -.. parsed-literal:: - - svn checkout https://github.com/lammps/lammps.git/branches/unstable mylammps - svn checkout https://github.com/lammps/lammps.git/branches/stable mylammps - svn checkout https://github.com/lammps/lammps.git/trunk mylammps - -where "mylammps" is the name of the directory you wish to create on -your machine. - -Once the command completes, your directory will contain the same files -as if you unpacked a current LAMMPS tarball, with the exception, that -the HTML documentation files are not included. They can be fetched -from the LAMMPS website by typing "make fetch" in the doc directory. -Or they can be generated from the content provided in doc/src by -typing "make html" from the doc directory. - -After initial checkout, as bug fixes and new features are added to -LAMMPS, as listed on :doc:`this page `, you can stay -up-to-date by typing the following SVN commands from within the -"mylammps" directory: - - -.. parsed-literal:: - - svn update - -You can also check if there are any updates by typing: - - -.. parsed-literal:: - - svn -qu status - -Doing an "update" will not change any files you have added to the -LAMMPS directory structure. It will also not change any existing -LAMMPS files you have edited, unless those files have changed in the -repository. In that case, SVN will attempt to merge the new -repository file with your version of the file and tell you if there -are any conflicts. See the SVN documentation for details. - -Please refer to the `subversion client support help pages on GitHub `_ -if you want to use advanced features like accessing particular -previous release versions via tags. - -Once you have updated your local files with an "svn update" (or "svn -co"), you still need to re-build LAMMPS if any source files have -changed. To do this, you should cd to the src directory and type: - - -.. parsed-literal:: - - make purge # remove any deprecated src files - make package-update # sync package files with src files - make foo # re-build for your machine (mpi, serial, etc) - -just as described on the :doc:`Install patch ` doc page, -after a patch has been installed. - -.. warning:: - - If you wish to edit/change a src file that is from a - package, you should edit the version of the file inside the package - sub-directory with src, then re-install the package. The version in - the src dir is merely a copy and will be wiped out if you type "make - package-update". - -The LAMMPS GitHub project is managed by Christoph Junghans (LANL, -junghans at lanl.gov), Axel Kohlmeyer (Temple U, akohlmey at -gmail.com) and Richard Berger (Temple U, richard.berger at -temple.edu). diff --git a/doc/src/Install_tarball.rst b/doc/src/Install_tarball.rst index ec2cb9a1de..1b04d8ac93 100644 --- a/doc/src/Install_tarball.rst +++ b/doc/src/Install_tarball.rst @@ -9,7 +9,6 @@ of the `LAMMPS website `_. .. _older: http://lammps.sandia.gov/tars .. _lws: http://lammps.sandia.gov - You have two choices of tarballs, either the most recent stable release or the most current patch release. Stable releases occur a few times per year, and undergo more testing before release. Patch @@ -25,27 +24,23 @@ Older versions of LAMMPS can also be downloaded from `this page `_. Once you have a tarball, unzip and untar it with the following command: +.. code-block:: bash -.. parsed-literal:: - - tar -xzvf lammps\*.tar.gz + $ tar -xzvf lammps\*.tar.gz This will create a LAMMPS directory with the version date in its name, e.g. lammps-23Jun18. - ---------- - You can also download a zip file via the "Clone or download" button on the `LAMMPS GitHub site `_. The file name will be lammps-master.zip which can be unzipped with the following command, to create a lammps-master dir: +.. code-block:: bash -.. parsed-literal:: - - unzip lammps\*.zip + $ unzip lammps\*.zip This version is the most up-to-date LAMMPS development version. It will have the date of the most recent patch release (see the file @@ -55,9 +50,6 @@ the next patch release tarball. .. _git: https://github.com/lammps/lammps - - - ---------- diff --git a/doc/src/Intro_features.rst b/doc/src/Intro_features.rst index 3c3419ce05..7c25a6f09b 100644 --- a/doc/src/Intro_features.rst +++ b/doc/src/Intro_features.rst @@ -4,17 +4,17 @@ LAMMPS features LAMMPS is a classical molecular dynamics (MD) code with these general classes of functionality: -* :ref:`General features ` -* :ref:`Particle and model types ` -* :ref:`Interatomic potentials (force fields) ` -* :ref:`Atom creation ` -* :ref:`Ensembles, constraints, and boundary conditions ` -* :ref:`Integrators ` -* :ref:`Diagnostics ` -* :ref:`Output ` -* :ref:`Multi-replica models ` -* :ref:`Pre- and post-processing ` -* :ref:`Specialized features (beyond MD itself) ` +1. :ref:`General features ` +2. :ref:`Particle and model types ` +3. :ref:`Interatomic potentials (force fields) ` +4. :ref:`Atom creation ` +5. :ref:`Ensembles, constraints, and boundary conditions ` +6. :ref:`Integrators ` +7. :ref:`Diagnostics ` +8. :ref:`Output ` +9. :ref:`Multi-replica models ` +10. :ref:`Pre- and post-processing ` +11. :ref:`Specialized features (beyond MD itself) ` ---------- diff --git a/doc/src/Intro_nonfeatures.rst b/doc/src/Intro_nonfeatures.rst index 53cbe1bdf3..6e0c85a6be 100644 --- a/doc/src/Intro_nonfeatures.rst +++ b/doc/src/Intro_nonfeatures.rst @@ -14,8 +14,8 @@ Specifically, LAMMPS was not conceived and designed for: * visualize your MD simulation interactively * plot your output data -Although over the years these limitations have been somewhat -reduced through features added to LAMMPS or external tools +Over the years some of these limitations have been reduced or +removed, through features added to LAMMPS or external tools that either closely interface with LAMMPS or extend LAMMPS. Here are suggestions on how to perform these tasks: diff --git a/doc/src/JPG/lammps-logo.png b/doc/src/JPG/lammps-logo.png index ae5ba2d8ad..438723b7f7 100644 Binary files a/doc/src/JPG/lammps-logo.png and b/doc/src/JPG/lammps-logo.png differ diff --git a/doc/src/Manual.rst b/doc/src/Manual.rst index 61b882394c..e74f0d9a6d 100644 --- a/doc/src/Manual.rst +++ b/doc/src/Manual.rst @@ -36,7 +36,6 @@ Once you are familiar with LAMMPS, you may want to bookmark :doc:`this page `_ You first create the ePUB file and then convert it with 'make mobi' +On the Kindle readers in particular, you also have support for +PDF files, so you could download and view the PDF version as an alternative. diff --git a/doc/src/Modify_contribute.rst b/doc/src/Modify_contribute.rst index 5e20d5c6bb..0fd333b568 100644 --- a/doc/src/Modify_contribute.rst +++ b/doc/src/Modify_contribute.rst @@ -77,15 +77,16 @@ one or more new class files which are invoked as a new style within a LAMMPS input script. If designed correctly, these additions typically do not require changes to the main core of LAMMPS; they are simply add-on files. If you think your new feature requires non-trivial -changes in core LAMMPS files, you'll need to `communicate with the developers `_, since we may or may -not want to make those changes. An example of a trivial change is -making a parent-class method "virtual" when you derive a new child -class from it. +changes in core LAMMPS files, you should `communicate with the +developers `_, since we may or +may not want to include those changes for some reason. An example of a +trivial change is making a parent-class method "virtual" when you derive +a new child class from it. Here is a checklist of steps you need to follow to submit a single file or user package for our consideration. Following these steps will save -both you and us time. See existing files in packages in the src dir for -examples. If you are uncertain, please ask. +both you and us time. Please have a look at the existing files in +packages in the src directory for examples. If you are uncertain, please ask. * All source files you provide must compile with the most current version of LAMMPS with multiple configurations. In particular you @@ -146,41 +147,39 @@ examples. If you are uncertain, please ask. would be nice for developers as well as users who try to read your code. -* You **must** also create a **documentation** file for each new command or - style you are adding to LAMMPS. For simplicity and convenience, the +* You **must** also create a **documentation** file for each new command + or style you are adding to LAMMPS. For simplicity and convenience, the documentation of groups of closely related commands or styles may be combined into a single file. This will be one file for a single-file feature. For a package, it might be several files. These are text - files with a .rst extension using the - `reStructuredText `_ markup language, that are then converted to HTML - and PDF using the `Sphinx `_ documentation - generator tool. Running Sphinx with the included configuration - requires Python 3.x. Configuration - settings and custom extensions for this conversion are included in - the source distribution, and missing python packages will be - transparently downloaded into a virtual environment via pip. Thus, - if your local system is missing required packages, you need access - to the internet. The translation can be as simple as doing - "make html pdf" in the doc folder. - As appropriate, the text files can include inline mathematical - expression or figures (see doc/JPG for examples). Additional PDF - files with further details (see doc/PDF for examples) may also be - included. The doc page should also include literature citations as - appropriate; see the bottom of doc/fix\_nh.rst for examples and - the earlier part of the same file for how to format the cite itself. - Citation labels must be unique across all .rst files. - The "Restrictions" section of the doc page should indicate if - your command is only available if LAMMPS is built with the - appropriate USER-MISC or USER-FOO package. - See other user package doc files for examples of how to do this. - Please run at least "make html" and carefully inspect and proofread - the resulting HTML format doc page before submitting your code. - Upon submission of a pull request, checks for error free completion - of the HTML and PDF build will be performed and also a spell check, - a check for correct anchors and labels, and a check for completeness - of references all styles in their corresponding tables and lists is - run. In case the spell check reports false positives they can be - added to the file doc/utils/sphinx-config/false_positives.txt + files with a .rst extension using the `reStructuredText `_ + markup language, that are then converted to HTML and PDF using the + `Sphinx `_ documentation generator tool. Running Sphinx with + the included configuration requires Python 3.x. Configuration + settings and custom extensions for this conversion are included in the + source distribution, and missing python packages will be transparently + downloaded into a virtual environment via pip. Thus, if your local + system is missing required packages, you need access to the + internet. The translation can be as simple as doing "make html pdf" in + the doc folder. As appropriate, the text files can include inline + mathematical expression or figures (see doc/JPG for examples). + Additional PDF files with further details (see doc/PDF for examples) + may also be included. The doc page should also include literature + citations as appropriate; see the bottom of doc/fix\_nh.rst for + examples and the earlier part of the same file for how to format the + cite itself. Citation labels must be unique across all .rst files. + The "Restrictions" section of the doc page should indicate if your + command is only available if LAMMPS is built with the appropriate + USER-MISC or USER-FOO package. See other user package doc files for + examples of how to do this. Please run at least "make html" and "make + spelling" and carefully inspect and proofread the resulting HTML + format doc page before submitting your code. Upon submission of a + pull request, checks for error free completion of the HTML and PDF + build will be performed and also a spell check, a check for correct + anchors and labels, and a check for completeness of references all + styles in their corresponding tables and lists is run. In case the + spell check reports false positives they can be added to the file + doc/utils/sphinx-config/false_positives.txt * For a new package (or even a single command) you should include one or more example scripts demonstrating its use. These should run in no diff --git a/doc/src/Modify_overview.rst b/doc/src/Modify_overview.rst index 33d8b0e2ff..495dc0fae8 100644 --- a/doc/src/Modify_overview.rst +++ b/doc/src/Modify_overview.rst @@ -10,15 +10,15 @@ computations are written in vanilla C-style code and operate on simple C-style data structures (vectors and arrays). Most of the new features described on the :doc:`Modify ` doc -page require you to write a new C++ derived class (except for -exceptions described below, where you can make small edits to existing -files). Creating a new class requires 2 files, a source code file -(\*.cpp) and a header file (\*.h). The derived class must provide -certain methods to work as a new option. Depending on how different -your new feature is compared to existing features, you can either -derive from the base class itself, or from a derived class that -already exists. Enabling LAMMPS to invoke the new class is as simple -as putting the two source files in the src dir and re-building LAMMPS. +page require you to write a new C++ derived class (except for exceptions +described below, where you can make small edits to existing files). +Creating a new class requires 2 files, a source code file (\*.cpp) and a +header file (\*.h). The derived class must provide certain methods to +work as a new option. Depending on how different your new feature is +compared to existing features, you can either derive from the base class +itself, or from a derived class that already exists. Enabling LAMMPS to +invoke the new class is as simple as putting the two source files in the +src directory and re-building LAMMPS. The advantage of C++ and its object-orientation is that all the code and variables needed to define the new feature are in the 2 files you @@ -32,14 +32,14 @@ If you wish to invoke those potentials in a LAMMPS input script with a command like -.. parsed-literal:: +.. code-block:: LAMMPS pair_style foo 0.1 3.5 then your pair\_foo.h file should be structured as follows: -.. parsed-literal:: +.. code-block:: c++ #ifdef PAIR_CLASS PairStyle(foo,PairFoo) @@ -58,7 +58,15 @@ the executable and can be invoked with a pair\_style command like the example above. Arguments like 0.1 and 3.5 can be defined and processed by your new class. -As illustrated by this pairwise example, many kinds of options are +.. note: + + With the traditional make process, simply adding the new files to the + src folder and compiling LAMMPS again for the desired configuration + with "make machine" is sufficient. When using CMake, you need to + re-run CMake with "cmake ." in the build folder to have it recognize + the added files and include them into the build system. + +As illustrated by this example pair style, many kinds of options are referred to in the LAMMPS documentation as the "style" of a particular command. @@ -66,11 +74,12 @@ The :doc:`Modify page ` lists all the common styles in LAMMPS, and discusses the header file for the base class that these styles are derived from. Public variables in that file are ones used and set by the derived classes which are also used by the base class. Sometimes -they are also used by the rest of LAMMPS. Virtual functions in the -base class header file which are set = 0 are ones you must define in -your new derived class to give it the functionality LAMMPS expects. -Virtual functions that are not set to 0 are functions you can -optionally define. +they are also used by the rest of LAMMPS. Pure functions, which means +functions declared as virtual in the base class header file which are +also set to 0, are functions you **must** implement in your new derived +class to give it the functionality LAMMPS expects. Virtual functions +that are not set to 0 are functions you may override or not. Those +are usually defined with an empty function body. Additionally, new output options can be added directly to the thermo.cpp, dump\_custom.cpp, and variable.cpp files. These are also @@ -82,21 +91,17 @@ functionality: * Think about whether what you want to do would be better as a pre- or post-processing step. Many computations are more easily and more quickly done that way. -* Don't do anything within the timestepping of a run that isn't - parallel. E.g. don't accumulate a bunch of data on a single processor - and analyze it. You run the risk of seriously degrading the parallel - efficiency. +* Do not try to do anything within the timestepping of a run that is not + parallel. For example do not accumulate a bunch of data on a single + processor and analyze it. You run the risk of seriously degrading + the parallel efficiency this way. * If your new feature reads arguments or writes output, make sure you follow the unit conventions discussed by the :doc:`units ` command. - - ---------- - .. _Foo: - **(Foo)** Foo, Morefoo, and Maxfoo, J of Classic Potentials, 75, 345 (1997). diff --git a/doc/src/Packages_details.rst b/doc/src/Packages_details.rst index bfadf87251..89157ece6d 100644 --- a/doc/src/Packages_details.rst +++ b/doc/src/Packages_details.rst @@ -24,37 +24,86 @@ page gives those details. pair, bond, angle, etc correspond to commands with the same style name as contained in the file name. -.. _lc: Commands_all.html +.. table_from_list:: + :columns: 6 -+------------------------------+--------------------------------+--------------------------------+------------------------------+--------------------------------+----------------------------------+ -| :ref:`ASPHERE ` | :ref:`BODY ` | :ref:`CLASS2 ` | :ref:`COLLOID ` | :ref:`COMPRESS ` | :ref:`CORESHELL ` | -+------------------------------+--------------------------------+--------------------------------+------------------------------+--------------------------------+----------------------------------+ -| :ref:`DIPOLE ` | :ref:`GPU ` | :ref:`GRANULAR ` | :ref:`KIM ` | :ref:`KOKKOS ` | :ref:`KSPACE ` | -+------------------------------+--------------------------------+--------------------------------+------------------------------+--------------------------------+----------------------------------+ -| :ref:`LATTE ` | :ref:`MANYBODY ` | :ref:`MC ` | :ref:`MESSAGE ` | :ref:`MISC ` | :ref:`MOLECULE ` | -+------------------------------+--------------------------------+--------------------------------+------------------------------+--------------------------------+----------------------------------+ -| :ref:`MPIIO ` | :ref:`MSCG ` | :ref:`OPT ` | :ref:`PERI ` | :ref:`POEMS ` | :ref:`PYTHON ` | -+------------------------------+--------------------------------+--------------------------------+------------------------------+--------------------------------+----------------------------------+ -| :ref:`QEQ ` | :ref:`REPLICA ` | :ref:`RIGID ` | :ref:`SHOCK ` | :ref:`SNAP ` | :ref:`SPIN ` | -+------------------------------+--------------------------------+--------------------------------+------------------------------+--------------------------------+----------------------------------+ -| :ref:`SRD ` | :ref:`VORONOI ` | | | | | -+------------------------------+--------------------------------+--------------------------------+------------------------------+--------------------------------+----------------------------------+ + * :ref:`ASPHERE ` + * :ref:`BODY ` + * :ref:`CLASS2 ` + * :ref:`COLLOID ` + * :ref:`COMPRESS ` + * :ref:`CORESHELL ` + * :ref:`DIPOLE ` + * :ref:`GPU ` + * :ref:`GRANULAR ` + * :ref:`KIM ` + * :ref:`KOKKOS ` + * :ref:`KSPACE ` + * :ref:`LATTE ` + * :ref:`MANYBODY ` + * :ref:`MC ` + * :ref:`MESSAGE ` + * :ref:`MISC ` + * :ref:`MOLECULE ` + * :ref:`MPIIO ` + * :ref:`MSCG ` + * :ref:`OPT ` + * :ref:`PERI ` + * :ref:`POEMS ` + * :ref:`PYTHON ` + * :ref:`QEQ ` + * :ref:`REPLICA ` + * :ref:`RIGID ` + * :ref:`SHOCK ` + * :ref:`SNAP ` + * :ref:`SPIN ` + * :ref:`SRD ` + * :ref:`VORONOI ` -+----------------------------------------+------------------------------------------------+------------------------------------+------------------------------------------+--------------------------------------+------------------------------------+ -| :ref:`USER-ADIOS ` | :ref:`USER-ATC ` | :ref:`USER-AWPMD ` | :ref:`USER-BOCS ` | :ref:`USER-CGDNA ` | :ref:`USER-CGSDK ` | -+----------------------------------------+------------------------------------------------+------------------------------------+------------------------------------------+--------------------------------------+------------------------------------+ -| :ref:`USER-COLVARS ` | :ref:`USER-DIFFRACTION ` | :ref:`USER-DPD ` | :ref:`USER-DRUDE ` | :ref:`USER-EFF ` | :ref:`USER-FEP ` | -+----------------------------------------+------------------------------------------------+------------------------------------+------------------------------------------+--------------------------------------+------------------------------------+ -| :ref:`USER-H5MD ` | :ref:`USER-INTEL ` | :ref:`USER-LB ` | :ref:`USER-MANIFOLD ` | :ref:`USER-MEAMC ` | :ref:`USER-MESO ` | -+----------------------------------------+------------------------------------------------+------------------------------------+------------------------------------------+--------------------------------------+------------------------------------+ -| :ref:`USER-MGPT ` | :ref:`USER-MISC ` | :ref:`USER-MOFFF ` | :ref:`USER-MOLFILE ` | :ref:`USER-NETCDF ` | :ref:`USER-OMP ` | -+----------------------------------------+------------------------------------------------+------------------------------------+------------------------------------------+--------------------------------------+------------------------------------+ -| :ref:`USER-PHONON ` | :ref:`USER-PLUMED ` | :ref:`USER-PTM ` | :ref:`USER-QMMM ` | :ref:`USER-QTB ` | :ref:`USER-QUIP ` | -+----------------------------------------+------------------------------------------------+------------------------------------+------------------------------------------+--------------------------------------+------------------------------------+ -| :ref:`USER-REAXC ` | :ref:`USER-SCAFACOS ` | :ref:`USER-SDPD ` | :ref:`USER-SMD ` | :ref:`USER-SMTBQ ` | :ref:`USER-SPH ` | -+----------------------------------------+------------------------------------------------+------------------------------------+------------------------------------------+--------------------------------------+------------------------------------+ -| :ref:`USER-TALLY ` | :ref:`USER-UEF ` | :ref:`USER-VTK ` | :ref:`USER-YAFF ` | | | -+----------------------------------------+------------------------------------------------+------------------------------------+------------------------------------------+--------------------------------------+------------------------------------+ + +.. table_from_list:: + :columns: 6 + + * :ref:`USER-ADIOS ` + * :ref:`USER-ATC ` + * :ref:`USER-AWPMD ` + * :ref:`USER-BOCS ` + * :ref:`USER-CGDNA ` + * :ref:`USER-CGSDK ` + * :ref:`USER-COLVARS ` + * :ref:`USER-DIFFRACTION ` + * :ref:`USER-DPD ` + * :ref:`USER-DRUDE ` + * :ref:`USER-EFF ` + * :ref:`USER-FEP ` + * :ref:`USER-H5MD ` + * :ref:`USER-INTEL ` + * :ref:`USER-LB ` + * :ref:`USER-MANIFOLD ` + * :ref:`USER-MEAMC ` + * :ref:`USER-MESO ` + * :ref:`USER-MGPT ` + * :ref:`USER-MISC ` + * :ref:`USER-MOFFF ` + * :ref:`USER-MOLFILE ` + * :ref:`USER-NETCDF ` + * :ref:`USER-OMP ` + * :ref:`USER-PHONON ` + * :ref:`USER-PLUMED ` + * :ref:`USER-PTM ` + * :ref:`USER-QMMM ` + * :ref:`USER-QTB ` + * :ref:`USER-QUIP ` + * :ref:`USER-REAXC ` + * :ref:`USER-SCAFACOS ` + * :ref:`USER-SDPD ` + * :ref:`USER-SMD ` + * :ref:`USER-SMTBQ ` + * :ref:`USER-SPH ` + * :ref:`USER-TALLY ` + * :ref:`USER-UEF ` + * :ref:`USER-VTK ` + * :ref:`USER-YAFF ` ---------- @@ -287,7 +336,8 @@ This package has :ref:`specific installation instructions ` on the :doc:`Bu * :doc:`Section 2.6 -sf gpu ` * :doc:`Section 2.6 -pk gpu ` * :doc:`package gpu ` -* `Commands all `_ pages (pair,kspace) for styles followed by (g) +* :doc:`Commands ` pages (:doc:`pair `, :doc:`kspace `) + for styles followed by (g) * `Benchmarks page `_ of web site @@ -430,7 +480,9 @@ This package has :ref:`specific installation instructions ` on the :doc: * :doc:`Section 2.6 -sf kk ` * :doc:`Section 2.6 -pk kokkos ` * :doc:`package kokkos ` -* `Commands all `_ pages (fix,compute,pair,etc) for styles followed by (k) +* Search the :doc:`commands ` pages (:doc:`fix `, :doc:`compute `, + :doc:`pair `, :doc:`bond, angle, dihedral, improper `, + :doc:`kspace `) for styles followed by (k) * `Benchmarks page `_ of web site @@ -466,7 +518,7 @@ different FFT options for your LAMPMS build. * :doc:`Howto tip4p ` * :doc:`Howto spc ` * :doc:`pair_style coul ` -* :doc:`Commands pair ` page for styles with "long" or "msm" in name +* Search the :doc:`pair style ` page for styles with "long" or "msm" in name * examples/peptide * bench/in.rhodo @@ -527,7 +579,7 @@ A variety of many-body and bond-order potentials. These include **Supporting info:** * src/MANYBODY: filenames -> commands -* :doc:`Commands pair ` page +* :doc:`Pair style ` page * examples/comb * examples/eim * examples/nb3d @@ -752,7 +804,7 @@ This package has :ref:`specific installation instructions ` on the :doc:`Bu * :doc:`Speed packages ` * :doc:`Speed opt ` * :doc:`Section 2.6 -sf opt ` -* :doc:`Commands pair ` for styles followed by (t) +* Search the :doc:`pair style ` page for styles followed by (t) * `Benchmarks page `_ of web site @@ -880,7 +932,7 @@ part of their formulation. ---------- -.. _PKG-REPLICA2: +.. _PKG-REPLICA: REPLICA package --------------- @@ -1223,11 +1275,10 @@ USER-CGDNA package **Contents:** -Several pair styles, a bond style, and integration fixes for -coarse-grained models of single- and double-stranded DNA based on the -oxDNA model of Doye, Louis and Ouldridge at the University of Oxford. -This includes Langevin-type rigid-body integrators with improved -stability. +Several pair styles, bond styles, and integration fixes for coarse-grained +modelling of single- and double-stranded DNA and RNA based on the oxDNA and +oxRNA model of Doye, Louis and Ouldridge. The package includes Langevin-type +rigid-body integrators with improved stability. **Author:** Oliver Henrich (University of Strathclyde, Glasgow). @@ -1237,8 +1288,10 @@ stability. * /src/USER-CGDNA/README * :doc:`pair_style oxdna/\* ` * :doc:`pair_style oxdna2/\* ` +* :doc:`pair_style oxrna2/\* ` * :doc:`bond_style oxdna/\* ` * :doc:`bond_style oxdna2/\* ` +* :doc:`bond_style oxrna2/\* ` * :doc:`fix nve/dotc/langevin ` @@ -1590,7 +1643,8 @@ This package has :ref:`specific installation instructions ` on the : * :doc:`Section 2.6 -sf intel ` * :doc:`Section 2.6 -pk intel ` * :doc:`package intel ` -* `Commands all `_ pages (fix,compute,pair,etc) for styles followed by (i) +* Search the :doc:`commands ` pages (:doc:`fix `, :doc:`compute `, + :doc:`pair `, :doc:`bond, angle, dihedral, improper `, :doc:`kspace `) for styles followed by (i) * src/USER-INTEL/TEST * `Benchmarks page `_ of web site @@ -1950,7 +2004,9 @@ This package has :ref:`specific installation instructions ` on the :do * :doc:`Section 2.6 -sf omp ` * :doc:`Section 2.6 -pk omp ` * :doc:`package omp ` -* `Commands all `_ pages (fix,compute,pair,etc) for styles followed by (o) +* Search the :doc:`commands ` pages (:doc:`fix `, :doc:`compute `, + :doc:`pair `, :doc:`bond, angle, dihedral, improper `, + :doc:`kspace `) for styles followed by (o) * `Benchmarks page `_ of web site @@ -2018,27 +2074,33 @@ USER-QMMM package **Contents:** -A :doc:`fix qmmm ` command which allows LAMMPS to be used in a -QM/MM simulation, currently only in combination with the `Quantum ESPRESSO `_ package. +A :doc:`fix qmmm ` command which allows LAMMPS to be used as +the MM code in a QM/MM simulation. This is currently only available +in combination with the `Quantum ESPRESSO `_ package. .. _espresso: http://www.quantum-espresso.org +To use this package you must have Quantum ESPRESSO (QE) available on +your system and include its coupling library in the compilation and +then compile LAMMPS as a library. For QM/MM calculations you then +build a custom binary with MPI support, that sets up 3 partitions with +MPI sub-communicators (for inter- and intra-partition communication) +and then calls the corresponding library interfaces on each partition +(2x LAMMPS and 1x QE). +The current implementation supports an ONIOM style mechanical coupling +and a multi-pole based electrostatic coupling to the Quantum ESPRESSO +plane wave DFT package. The QM/MM interface has been written in a +manner that coupling to other QM codes should be possible without +changes to LAMMPS itself. -To use this package you must have Quantum ESPRESSO available on your -system. +**Authors:** Axel Kohlmeyer (Temple U). Mariella Ippolito and Carlo Cavazzoni (CINECA, Italy) -The current implementation only supports an ONIOM style mechanical -coupling to the Quantum ESPRESSO plane wave DFT package. -Electrostatic coupling is in preparation and the interface has been -written in a manner that coupling to other QM codes should be possible -without changes to LAMMPS itself. - -**Author:** Axel Kohlmeyer (Temple U). **Install:** -This package has :ref:`specific installation instructions ` on the :doc:`Build extras ` doc page. +This package has :ref:`specific installation instructions ` +on the :doc:`Build extras ` doc page. **Supporting info:** diff --git a/doc/src/Packages_standard.rst b/doc/src/Packages_standard.rst index b0b70cb4ee..1e1daf69c6 100644 --- a/doc/src/Packages_standard.rst +++ b/doc/src/Packages_standard.rst @@ -75,7 +75,7 @@ package: +----------------------------------+--------------------------------------+----------------------------------------------------+-----------------------------------------------------+---------+ | :ref:`QEQ ` | QEq charge equilibration | :doc:`fix qeq ` | qeq | no | +----------------------------------+--------------------------------------+----------------------------------------------------+-----------------------------------------------------+---------+ -| :ref:`REPLICA ` | multi-replica methods | :doc:`Howto replica ` | tad | no | +| :ref:`REPLICA ` | multi-replica methods | :doc:`Howto replica ` | tad | no | +----------------------------------+--------------------------------------+----------------------------------------------------+-----------------------------------------------------+---------+ | :ref:`RIGID ` | rigid bodies and constraints | :doc:`fix rigid ` | rigid | no | +----------------------------------+--------------------------------------+----------------------------------------------------+-----------------------------------------------------+---------+ diff --git a/doc/src/Run_basics.rst b/doc/src/Run_basics.rst index 72b966c832..53acb9096f 100644 --- a/doc/src/Run_basics.rst +++ b/doc/src/Run_basics.rst @@ -1,25 +1,25 @@ Basics of running LAMMPS ======================== -LAMMPS is run from the command line, reading commands from a -file via the -in command line flag, or from standard input. +LAMMPS is run from the command line, reading commands from a file via +the -in command line flag, or from standard input. Using the "-in in.file" variant is recommended: -.. parsed-literal:: +.. code-block:: bash - lmp_serial < in.file - lmp_serial -in in.file - /path/to/lammps/src/lmp_serial < in.file - mpirun -np 4 lmp_mpi -in in.file - mpirun -np 8 /path/to//lammps/src/lmp_mpi -in in.file - mpirun -np 6 /usr/local/bin/lmp -in in.file + $ lmp_serial -in in.file + $ lmp_serial < in.file + $ /path/to/lammps/src/lmp_serial -i in.file + $ mpirun -np 4 lmp_mpi -in in.file + $ mpirun -np 8 /path/to//lammps/src/lmp_mpi -in in.file + $ mpirun -np 6 /usr/local/bin/lmp -in in.file -You normally run the LAMMPS command in the directory where your -input script is located. That is also where output files are -produced by default, unless you provide specific other paths in -your input script or on the command line. As in some of the -examples above, the LAMMPS executable itself can be placed elsewhere. +You normally run the LAMMPS command in the directory where your input +script is located. That is also where output files are produced by +default, unless you provide specific other paths in your input script or +on the command line. As in some of the examples above, the LAMMPS +executable itself can be placed elsewhere. .. note:: @@ -27,7 +27,8 @@ examples above, the LAMMPS executable itself can be placed elsewhere. in parallel with mpirun; for those systems the -in form is required. As LAMMPS runs it prints info to the screen and a logfile named -log.lammps. More info about output is given on the :doc:`Run output ` doc page. +*log.lammps*\ . More info about output is given on the +:doc:`Run output ` doc page. If LAMMPS encounters errors in the input script or while running a simulation it will print an ERROR message and stop or a WARNING @@ -35,26 +36,27 @@ message and continue. See the :doc:`Errors ` doc page for a discussion of the various kinds of errors LAMMPS can or can't detect, a list of all ERROR and WARNING messages, and what to do about them. - ---------- - -LAMMPS can run the same problem on any number of processors, including -a single processor. In theory you should get identical answers on any +LAMMPS can run the same problem on any number of processors, including a +single processor. In theory you should get identical answers on any number of processors and on any machine. In practice, numerical -round-off can cause slight differences and eventual divergence of -molecular dynamics phase space trajectories. See the :doc:`Errors common ` doc page for discussion of this. +round-off due to using floating-point math can cause slight differences +and an eventual divergence of molecular dynamics trajectories. See the +:doc:`Errors common ` doc page for discussion of this. -LAMMPS can run as large a problem as will fit in the physical memory -of one or more processors. If you run out of memory, you must run on -more processors or define a smaller problem. +LAMMPS can run as large a problem as will fit in the physical memory of +one or more processors. If you run out of memory, you must run on more +processors or define a smaller problem. The amount of memory needed and +how well it can be distributed across processors may vary based +on the models and settings and commands used. If you run LAMMPS in parallel via mpirun, you should be aware of the -:doc:`processors ` command which controls how MPI tasks are -mapped to the simulation box, as well as mpirun options that control -how MPI tasks are assigned to physical cores of the node(s) of the -machine you are running on. These settings can improve performance, -though the defaults are often adequate. +:doc:`processors ` command, which controls how MPI tasks are +mapped to the simulation box, as well as mpirun options that control how +MPI tasks are assigned to physical cores of the node(s) of the machine +you are running on. These settings can improve performance, though the +defaults are often adequate. For example, it is often important to bind MPI tasks (processes) to physical cores (processor affinity), so that the operating system does @@ -67,10 +69,10 @@ can set the number of threads per MPI task via the environment variable OMP\_NUM\_THREADS, before you launch LAMMPS: -.. parsed-literal:: +.. code-block:: bash - export OMP_NUM_THREADS=2 # bash - setenv OMP_NUM_THREADS 2 # csh or tcsh + $ export OMP_NUM_THREADS=2 # bash + $ setenv OMP_NUM_THREADS 2 # csh or tcsh This can also be done via the :doc:`package ` command or via the :doc:`-pk command-line switch ` which invokes the diff --git a/doc/src/Run_options.rst b/doc/src/Run_options.rst index 14bddd58fc..8ae558df24 100644 --- a/doc/src/Run_options.rst +++ b/doc/src/Run_options.rst @@ -26,10 +26,10 @@ letter abbreviation can be used: For example, the lmp\_mpi executable might be launched as follows: -.. parsed-literal:: +.. code-block:: bash - mpirun -np 16 lmp_mpi -v f tmp.out -l my.log -sc none -i in.alloy - mpirun -np 16 lmp_mpi -var f tmp.out -log my.log -screen none -in in.alloy + $ mpirun -np 16 lmp_mpi -v f tmp.out -l my.log -sc none -i in.alloy + $ mpirun -np 16 lmp_mpi -var f tmp.out -log my.log -screen none -in in.alloy ---------- @@ -438,7 +438,7 @@ is the same operation as if the following 2-line input script were run: -.. parsed-literal:: +.. code-block:: LAMMPS read_restart restartfile [remap] write_data datafile keyword value ... @@ -483,7 +483,7 @@ is the same operation as if the following 2-line input script were run: -.. parsed-literal:: +.. code-block:: LAMMPS read_restart restartfile [remap] write_dump group-ID dumpstyle dumpfile arg1 arg2 ... @@ -506,8 +506,7 @@ dump file to still be produced. The syntax following restartfile (or remap), namely - -.. parsed-literal:: +.. code-block:: LAMMPS group-ID dumpstyle dumpfile arg1 arg2 ... diff --git a/doc/src/Speed_bench.rst b/doc/src/Speed_bench.rst index 711d274052..c577bc426a 100644 --- a/doc/src/Speed_bench.rst +++ b/doc/src/Speed_bench.rst @@ -36,9 +36,9 @@ scalability on your machine. The bench directory includes a few log.\* files that show performance of these 5 problems on 1 or 4 cores of Linux desktop. The bench/FERMI -and bench/KEPLER dirs have input files and scripts and instructions +and bench/KEPLER directories have input files and scripts and instructions for running the same (or similar) problems using OpenMP or GPU or Xeon -Phi acceleration options. See the README files in those dirs and the +Phi acceleration options. See the README files in those directories and the :doc:`Speed packages ` doc pages for instructions on how to build LAMMPS and run on that kind of hardware. diff --git a/doc/src/Speed_packages.rst b/doc/src/Speed_packages.rst index 039b8c51a0..0526961a81 100644 --- a/doc/src/Speed_packages.rst +++ b/doc/src/Speed_packages.rst @@ -37,8 +37,6 @@ standard or user packages: Speed_omp Speed_opt -.. _lc: Commands_all.html - Inverting this list, LAMMPS currently has acceleration support for three kinds of hardware, via the listed packages: @@ -72,7 +70,7 @@ Lennard-Jones :doc:`pair_style lj/cut `: * :doc:`pair_style lj/cut/opt ` To see what accelerate styles are currently available for a particular -style, find the style name in the `Commands\_all `_ +style, find the style name in the :doc:`Commands ` style pages (fix,compute,pair,etc) and see what suffixes are listed (g,i,k,o,t) with it. The doc pages for individual commands (e.g. :doc:`pair lj/cut ` or :doc:`fix nve `) also list @@ -146,7 +144,7 @@ details. Likewise, the bench directory has FERMI and KEPLER and PHI sub-directories with Make.py commands and input scripts for using all the accelerator packages on various machines. See the README files in -those dirs. +those directories. As mentioned above, the `Benchmark page `_ of the LAMMPS web site gives performance results for the various accelerator packages for several diff --git a/doc/src/Tools.rst b/doc/src/Tools.rst index ae86286227..aae517ef08 100644 --- a/doc/src/Tools.rst +++ b/doc/src/Tools.rst @@ -92,7 +92,7 @@ These tools were written by Keir Novik while he was at Queen Mary University of London. Keir is no longer there and cannot support these tools which are out-of-date with respect to the current LAMMPS version (and maybe with respect to AMBER as well). Since we don't use -these tools at Sandia, you'll need to experiment with them and make +these tools at Sandia, you will need to experiment with them and make necessary modifications yourself. diff --git a/doc/src/change_box.rst b/doc/src/change_box.rst index 02f06ac681..b9bed3a0d6 100644 --- a/doc/src/change_box.rst +++ b/doc/src/change_box.rst @@ -1,13 +1,13 @@ -.. index:: change\_box +.. index:: change_box -change\_box command -=================== +change_box command +================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS change_box group-ID parameter args ... keyword args ... @@ -58,7 +58,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS change_box all xy final -2.0 z final 0.0 5.0 boundary p p f remap units box change_box all x scale 1.1 y volume z volume remap @@ -114,7 +114,7 @@ new owning processors. is non-periodic and atoms extend from 0 to 20 in all dimensions: -.. parsed-literal:: +.. code-block:: LAMMPS change_box all x final -10 20 create_atoms 1 single -5 5 5 # this will fail to insert an atom @@ -195,7 +195,7 @@ style, then both it and the current keyword apply to the keyword preceding "key". I.e. this sequence of keywords is allowed: -.. parsed-literal:: +.. code-block:: LAMMPS change_box all x scale 1.1 y volume z volume @@ -207,7 +207,7 @@ If the following command is used, then the z box length will shrink by the same 1.1 factor the x box length was increased by: -.. parsed-literal:: +.. code-block:: LAMMPS change_box all x scale 1.1 z volume @@ -217,16 +217,16 @@ y,z box lengths shrink so as to keep their relative aspect ratio constant: -.. parsed-literal:: +.. code-block:: LAMMPS - change_box all"x scale 1.1 y volume z volume + change_box all x scale 1.1 y volume z volume If the following command is used, then the final box will be a factor of 10% larger in x and y, and a factor of 21% smaller in z, so as to keep the volume constant: -.. parsed-literal:: +.. code-block:: LAMMPS change_box all x scale 1.1 z volume y scale 1.1 z volume diff --git a/doc/src/comm_modify.rst b/doc/src/comm_modify.rst index 67ce65e2a9..839b179e8b 100644 --- a/doc/src/comm_modify.rst +++ b/doc/src/comm_modify.rst @@ -1,13 +1,13 @@ -.. index:: comm\_modify +.. index:: comm_modify -comm\_modify command -==================== +comm_modify command +=================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS comm_modify keyword value ... @@ -30,14 +30,14 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS comm_modify mode multi comm_modify mode multi group solvent - comm_modift mode multi cutoff/multi 1 10.0 cutoff/multi 2\*4 15.0 + comm_modift mode multi cutoff/multi 1 10.0 cutoff/multi 2*4 15.0 comm_modify vel yes comm_modify mode single cutoff 5.0 vel yes - comm_modify cutoff/multi \* 0.0 + comm_modify cutoff/multi * 0.0 Description """"""""""" diff --git a/doc/src/comm_style.rst b/doc/src/comm_style.rst index bbafa21d62..37184794c1 100644 --- a/doc/src/comm_style.rst +++ b/doc/src/comm_style.rst @@ -1,13 +1,13 @@ -.. index:: comm\_style +.. index:: comm_style -comm\_style command -=================== +comm_style command +================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS comm_style style @@ -17,7 +17,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS comm_style brick comm_style tiled diff --git a/doc/src/compute_hma.rst b/doc/src/compute_hma.rst index c66c1d1650..e1b1d3e3a9 100644 --- a/doc/src/compute_hma.rst +++ b/doc/src/compute_hma.rst @@ -80,7 +80,7 @@ A detailed description of this method can be found in (:ref:`Moustafa _{HMA} = \frac{d}{2} (N-1) k_B T + \left< U + \frac{1}{2} F\bullet\Delta r \right>\end{equation} + \left< U\right>_{HMA} = \frac{d}{2} (N-1) k_B T + \left< U + \frac{1}{2} F\bullet\Delta r \right> where :math:`N` is the number of atoms in the system, :math:`k_B` is Boltzmann's constant, :math:`T` is the temperature, :math:`d` is the @@ -93,7 +93,7 @@ The pressure is computed by the formula: .. math:: - \begin{equation}\left< P\right>_{HMA} = \Delta \hat P + \left< P_{vir} + \frac{\beta \Delta \hat P - \rho}{d(N-1)} F\bullet\Delta r \right>\end{equation} + \left< P\right>_{HMA} = \Delta \hat P + \left< P_{vir} + \frac{\beta \Delta \hat P - \rho}{d(N-1)} F\bullet\Delta r \right> where :math:`\rho` is the number density of the system, :math:`\Delta \hat P` is the difference between the harmonic and lattice pressure, :math:`P_{vir}` is @@ -108,9 +108,9 @@ pressure and harmonic pressure. .. math:: - \begin{equation}\left_{HMA} = \frac{d}{2} (N-1) k_B + \frac{1}{k_B T^2} \left( \left< + \left_{HMA} = \frac{d}{2} (N-1) k_B + \frac{1}{k_B T^2} \left( \left< U_{HMA}^2 \right> - \left^2 \right) + \frac{1}{4 T} - \left< F\bullet\Delta r + \Delta r \bullet \Phi \bullet \Delta r \right>\end{equation} + \left< F\bullet\Delta r + \Delta r \bullet \Phi \bullet \Delta r \right> where :math:`\Phi` is the Hessian matrix. The compute hma command computes the full expression for :math:`C_V` except for the diff --git a/doc/src/compute_modify.rst b/doc/src/compute_modify.rst index 723f78df9f..d857472256 100644 --- a/doc/src/compute_modify.rst +++ b/doc/src/compute_modify.rst @@ -1,13 +1,13 @@ -.. index:: compute\_modify +.. index:: compute_modify -compute\_modify command -======================= +compute_modify command +====================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS compute_modify compute-ID keyword value ... @@ -30,7 +30,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS compute_modify myTemp extra/dof 0 compute_modify newtemp dynamic/dof yes extra/dof 600 diff --git a/doc/src/compute_smd_ulsph_num_neighs.rst b/doc/src/compute_smd_ulsph_num_neighs.rst index 7652d53915..baa53f4eda 100644 --- a/doc/src/compute_smd_ulsph_num_neighs.rst +++ b/doc/src/compute_smd_ulsph_num_neighs.rst @@ -7,7 +7,7 @@ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS compute ID group-ID smd/ulsph/num/neighs @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS compute 1 all smd/ulsph/num/neighs diff --git a/doc/src/compute_smd_ulsph_strain.rst b/doc/src/compute_smd_ulsph_strain.rst index a335c7add9..9f5a952778 100644 --- a/doc/src/compute_smd_ulsph_strain.rst +++ b/doc/src/compute_smd_ulsph_strain.rst @@ -7,7 +7,7 @@ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS compute ID group-ID smd/ulsph/strain @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS compute 1 all smd/ulsph/strain diff --git a/doc/src/compute_smd_ulsph_strain_rate.rst b/doc/src/compute_smd_ulsph_strain_rate.rst index b4485253b2..0145e86f7e 100644 --- a/doc/src/compute_smd_ulsph_strain_rate.rst +++ b/doc/src/compute_smd_ulsph_strain_rate.rst @@ -7,7 +7,7 @@ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS compute ID group-ID smd/ulsph/strain/rate @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS compute 1 all smd/ulsph/strain/rate diff --git a/doc/src/compute_smd_ulsph_stress.rst b/doc/src/compute_smd_ulsph_stress.rst index 52d3e69ec4..9295112478 100644 --- a/doc/src/compute_smd_ulsph_stress.rst +++ b/doc/src/compute_smd_ulsph_stress.rst @@ -7,7 +7,7 @@ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS compute ID group-ID smd/ulsph/stress @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS compute 1 all smd/ulsph/stress diff --git a/doc/src/create_atoms.rst b/doc/src/create_atoms.rst index c54fd675dc..bb3e7ba775 100644 --- a/doc/src/create_atoms.rst +++ b/doc/src/create_atoms.rst @@ -1,13 +1,13 @@ -.. index:: create\_atoms +.. index:: create_atoms -create\_atoms command +create_atoms command ===================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS create_atoms type style args keyword values ... @@ -29,7 +29,7 @@ Syntax * zero or more keyword/value pairs may be appended * keyword = *mol* or *basis* or *ratio* or *subset* or *remap* or *var* or *set* or *rotate* or *units* - .. parsed-literal:: + .. code-block:: LAMMPS *mol* value = template-ID seed template-ID = ID of molecule template specified in a separate :doc:`molecule ` command @@ -61,7 +61,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS create_atoms 1 box create_atoms 3 region regsphere basis 2 3 @@ -269,7 +269,7 @@ converts lattice spacings to distance. Click on the image for a larger version. -.. parsed-literal:: +.. code-block:: LAMMPS dimension 2 variable x equal 100 @@ -280,7 +280,7 @@ larger version. variable xx internal 0.0 variable yy internal 0.0 - variable v equal "(0.2\*v_y\*ylat \* cos(v_xx/xlat \* 2.0\*PI\*4.0/v_x) + 0.5\*v_y\*ylat - v_yy) > 0.0" + variable v equal "(0.2*v_y*ylat * cos(v_xx/xlat * 2.0*PI*4.0/v_x) + 0.5*v_y*ylat - v_yy) > 0.0" create_atoms 1 box var v set x xx set y yy write_dump all atom sinusoid.lammpstrj diff --git a/doc/src/create_bonds.rst b/doc/src/create_bonds.rst index 332b0ad0df..04749f0289 100644 --- a/doc/src/create_bonds.rst +++ b/doc/src/create_bonds.rst @@ -1,13 +1,13 @@ -.. index:: create\_bonds +.. index:: create_bonds -create\_bonds command -===================== +create_bonds command +==================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS create_bonds style args ... keyword value ... @@ -48,7 +48,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS create_bonds many all all 1 1.0 1.2 create_bonds many surf solvent 3 2.0 2.4 @@ -198,7 +198,7 @@ to only trigger the internal list to be created once, after the last bond (or angle, or dihedral, or improper) is added: -.. parsed-literal:: +.. code-block:: LAMMPS create_bonds single/bond 5 52 98 special no create_bonds single/bond 5 73 74 special no diff --git a/doc/src/create_box.rst b/doc/src/create_box.rst index 67690207f9..ee58323ae9 100644 --- a/doc/src/create_box.rst +++ b/doc/src/create_box.rst @@ -1,13 +1,13 @@ -.. index:: create\_box +.. index:: create_box -create\_box command -=================== +create_box command +================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS create_box N region-ID keyword value ... @@ -34,7 +34,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS create_box 2 mybox create_box 2 mybox bond/types 2 extra/bond/per/atom 1 diff --git a/doc/src/delete_atoms.rst b/doc/src/delete_atoms.rst index 97f4700612..7ad9c75550 100644 --- a/doc/src/delete_atoms.rst +++ b/doc/src/delete_atoms.rst @@ -1,13 +1,13 @@ -.. index:: delete\_atoms +.. index:: delete_atoms -delete\_atoms command -===================== +delete_atoms command +==================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS delete_atoms style args keyword value ... @@ -41,7 +41,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS delete_atoms group edge delete_atoms region sphere compress no diff --git a/doc/src/delete_bonds.rst b/doc/src/delete_bonds.rst index 11d9954647..37c52f8aff 100644 --- a/doc/src/delete_bonds.rst +++ b/doc/src/delete_bonds.rst @@ -1,19 +1,18 @@ -.. index:: delete\_bonds +.. index:: delete_bonds -delete\_bonds command -===================== +delete_bonds command +==================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS delete_bonds group-ID style arg keyword ... * group-ID = group ID -* style = *multi* or *atom* or *bond* or *angle* or *dihedral* or - *improper* or *stats* +* style = *multi* or *atom* or *bond* or *angle* or *dihedral* or *improper* or *stats* .. parsed-literal:: @@ -33,11 +32,11 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS delete_bonds frozen multi remove delete_bonds all atom 4 special - delete_bonds all bond 0\*3 special + delete_bonds all bond 0*3 special delete_bonds all stats Description diff --git a/doc/src/dihedral_charmm.rst b/doc/src/dihedral_charmm.rst index edaa22fe91..56eba0fe02 100644 --- a/doc/src/dihedral_charmm.rst +++ b/doc/src/dihedral_charmm.rst @@ -1,25 +1,25 @@ -.. index:: dihedral\_style charmm +.. index:: dihedral_style charmm -dihedral\_style charmm command -============================== +dihedral_style charmm command +============================= -dihedral\_style charmm/intel command -==================================== +dihedral_style charmm/intel command +=================================== -dihedral\_style charmm/kk command +dihedral_style charmm/kk command +================================ + +dihedral_style charmm/omp command ================================= -dihedral\_style charmm/omp command -================================== - -dihedral\_style charmmfsw command -================================= +dihedral_style charmmfsw command +================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style style @@ -29,7 +29,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style charmm dihedral_style charmmfsw @@ -44,7 +44,7 @@ The *charmm* and *charmmfsw* dihedral styles use the potential .. math:: - E = K [ 1 + \cos (n \phi - d) ] + E = K [ 1 + \cos (n \phi - d) ] See :ref:`(MacKerell) ` for a description of the CHARMM diff --git a/doc/src/dihedral_class2.rst b/doc/src/dihedral_class2.rst index b6afa130f0..f079314129 100644 --- a/doc/src/dihedral_class2.rst +++ b/doc/src/dihedral_class2.rst @@ -1,19 +1,19 @@ -.. index:: dihedral\_style class2 +.. index:: dihedral_style class2 -dihedral\_style class2 command -============================== +dihedral_style class2 command +============================= -dihedral\_style class2/omp command -================================== - -dihedral\_style class2/kk command +dihedral_style class2/omp command ================================= +dihedral_style class2/kk command +================================ + Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style class2 @@ -21,15 +21,15 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style class2 dihedral_coeff 1 100 75 100 70 80 60 - dihedral_coeff \* mbt 3.5945 0.1704 -0.5490 1.5228 - dihedral_coeff \* ebt 0.3417 0.3264 -0.9036 0.1368 0.0 -0.8080 1.0119 1.1010 + dihedral_coeff * mbt 3.5945 0.1704 -0.5490 1.5228 + dihedral_coeff * ebt 0.3417 0.3264 -0.9036 0.1368 0.0 -0.8080 1.0119 1.1010 dihedral_coeff 2 at 0.0 -0.1850 -0.7963 -2.0220 0.0 -0.3991 110.2453 105.1270 - dihedral_coeff \* aat -13.5271 110.2453 105.1270 - dihedral_coeff \* bb13 0.0 1.0119 1.1010 + dihedral_coeff * aat -13.5271 110.2453 105.1270 + dihedral_coeff * bb13 0.0 1.0119 1.1010 Description """"""""""" @@ -38,15 +38,15 @@ The *class2* dihedral style uses the potential .. math:: - E = & E_d + E_{mbt} + E_{ebt} + E_{at} + E_{aat} + E_{bb13} \\ - E_d = & \sum_{n=1}^{3} K_n [ 1 - \cos (n \phi - \phi_n) ] \\ - E_{mbt} = & (r_{jk} - r_2) [ A_1 \cos (\phi) + A_2 \cos (2\phi) + A_3 \cos (3\phi) ] \\ - E_{ebt} = & (r_{ij} - r_1) [ B_1 \cos (\phi) + B_2 \cos (2\phi) + B_3 \cos (3\phi) ] + \\ - & (r_{kl} - r_3) [ C_1 \cos (\phi) + C_2 \cos (2\phi) + C_3 \cos (3\phi) ] \\ - E_{at} = & (\theta_{ijk} - \theta_1) [ D_1 \cos (\phi) + D_2 \cos (2\phi) + D_3 \cos (3\phi) ] + \\ - & (\theta_{jkl} - \theta_2) [ E_1 \cos (\phi) + E_2 \cos (2\phi) + E_3 \cos (3\phi) ] \\ - E_{aat} = & M (\theta_{ijk} - \theta_1) (\theta_{jkl} - \theta_2) \cos (\phi) \\ - E_{bb13} = & N (r_{ij} - r_1) (r_{kl} - r_3) + E = & E_d + E_{mbt} + E_{ebt} + E_{at} + E_{aat} + E_{bb13} \\ + E_d = & \sum_{n=1}^{3} K_n [ 1 - \cos (n \phi - \phi_n) ] \\ + E_{mbt} = & (r_{jk} - r_2) [ A_1 \cos (\phi) + A_2 \cos (2\phi) + A_3 \cos (3\phi) ] \\ + E_{ebt} = & (r_{ij} - r_1) [ B_1 \cos (\phi) + B_2 \cos (2\phi) + B_3 \cos (3\phi) ] + \\ + & (r_{kl} - r_3) [ C_1 \cos (\phi) + C_2 \cos (2\phi) + C_3 \cos (3\phi) ] \\ + E_{at} = & (\theta_{ijk} - \theta_1) [ D_1 \cos (\phi) + D_2 \cos (2\phi) + D_3 \cos (3\phi) ] + \\ + & (\theta_{jkl} - \theta_2) [ E_1 \cos (\phi) + E_2 \cos (2\phi) + E_3 \cos (3\phi) ] \\ + E_{aat} = & M (\theta_{ijk} - \theta_1) (\theta_{jkl} - \theta_2) \cos (\phi) \\ + E_{bb13} = & N (r_{ij} - r_1) (r_{kl} - r_3) where :math:`E_d` is the dihedral term, :math:`E_{mbt}` is a middle-bond-torsion term, diff --git a/doc/src/dihedral_coeff.rst b/doc/src/dihedral_coeff.rst index be455b384b..491546d9e0 100644 --- a/doc/src/dihedral_coeff.rst +++ b/doc/src/dihedral_coeff.rst @@ -1,13 +1,13 @@ -.. index:: dihedral\_coeff +.. index:: dihedral_coeff -dihedral\_coeff command -======================= +dihedral_coeff command +====================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_coeff N args @@ -18,11 +18,11 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_coeff 1 80.0 1 3 - dihedral_coeff \* 80.0 1 3 0.5 - dihedral_coeff 2\* 80.0 1 3 0.5 + dihedral_coeff * 80.0 1 3 0.5 + dihedral_coeff 2* 80.0 1 3 0.5 Description """"""""""" @@ -46,9 +46,9 @@ for the same dihedral type. For example, these commands set the coeffs for all dihedral types, then overwrite the coeffs for just dihedral type 2: -.. parsed-literal:: +.. code-block:: LAMMPS - dihedral_coeff \* 80.0 1 3 + dihedral_coeff * 80.0 1 3 dihedral_coeff 2 200.0 1 3 A line in a data file that specifies dihedral coefficients uses the exact diff --git a/doc/src/dihedral_cosine_shift_exp.rst b/doc/src/dihedral_cosine_shift_exp.rst index bba7fc376f..e866b79170 100644 --- a/doc/src/dihedral_cosine_shift_exp.rst +++ b/doc/src/dihedral_cosine_shift_exp.rst @@ -1,16 +1,16 @@ -.. index:: dihedral\_style cosine/shift/exp +.. index:: dihedral_style cosine/shift/exp -dihedral\_style cosine/shift/exp command -======================================== +dihedral_style cosine/shift/exp command +======================================= -dihedral\_style cosine/shift/exp/omp command -============================================ +dihedral_style cosine/shift/exp/omp command +=========================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style cosine/shift/exp @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style cosine/shift/exp dihedral_coeff 1 10.0 45.0 2.0 @@ -30,7 +30,7 @@ The *cosine/shift/exp* dihedral style uses the potential .. math:: - E = -U_{min}\frac{e^{-a U(\theta,\theta_0)}-1}{e^a-1} \quad\mbox{with}\quad U(\theta,\theta_0)=-0.5 \left(1+\cos(\theta-\theta_0) \right) + E = -U_{min}\frac{e^{-a U(\theta,\theta_0)}-1}{e^a-1} \quad\mbox{with}\quad U(\theta,\theta_0)=-0.5 \left(1+\cos(\theta-\theta_0) \right) where :math:`U_{min}`, :math:`\theta`, and :math:`a` are defined for diff --git a/doc/src/dihedral_fourier.rst b/doc/src/dihedral_fourier.rst index 82afbb01d8..58f7ec9cb0 100644 --- a/doc/src/dihedral_fourier.rst +++ b/doc/src/dihedral_fourier.rst @@ -1,19 +1,19 @@ -.. index:: dihedral\_style fourier +.. index:: dihedral_style fourier -dihedral\_style fourier command -=============================== +dihedral_style fourier command +============================== -dihedral\_style fourier/intel command -===================================== +dihedral_style fourier/intel command +==================================== -dihedral\_style fourier/omp command -=================================== +dihedral_style fourier/omp command +================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style fourier @@ -21,7 +21,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style fourier dihedral_coeff 1 3 -0.846200 3 0.0 7.578800 1 0 0.138000 2 -180.0 @@ -33,7 +33,7 @@ The *fourier* dihedral style uses the potential: .. math:: - E = \sum_{i=1,m} K_i [ 1.0 + \cos ( n_i \phi - d_i ) ] + E = \sum_{i=1,m} K_i [ 1.0 + \cos ( n_i \phi - d_i ) ] The following coefficients must be defined for each dihedral type via the diff --git a/doc/src/dihedral_harmonic.rst b/doc/src/dihedral_harmonic.rst index 981b6dda4b..665d055269 100644 --- a/doc/src/dihedral_harmonic.rst +++ b/doc/src/dihedral_harmonic.rst @@ -1,22 +1,22 @@ -.. index:: dihedral\_style harmonic +.. index:: dihedral_style harmonic -dihedral\_style harmonic command -================================ +dihedral_style harmonic command +=============================== -dihedral\_style harmonic/intel command -====================================== +dihedral_style harmonic/intel command +===================================== -dihedral\_style harmonic/kk command +dihedral_style harmonic/kk command +================================== + +dihedral_style harmonic/omp command =================================== -dihedral\_style harmonic/omp command -==================================== - Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style harmonic @@ -24,7 +24,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style harmonic dihedral_coeff 1 80.0 1 2 @@ -36,7 +36,7 @@ The *harmonic* dihedral style uses the potential .. math:: - E = K [ 1 + d \cos (n \phi) ] + E = K [ 1 + d \cos (n \phi) ] The following coefficients must be defined for each dihedral type via the diff --git a/doc/src/dihedral_helix.rst b/doc/src/dihedral_helix.rst index 82df804a81..870331944d 100644 --- a/doc/src/dihedral_helix.rst +++ b/doc/src/dihedral_helix.rst @@ -1,16 +1,16 @@ -.. index:: dihedral\_style helix +.. index:: dihedral_style helix -dihedral\_style helix command -============================= +dihedral_style helix command +============================ -dihedral\_style helix/omp command -================================= +dihedral_style helix/omp command +================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style helix @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style helix dihedral_coeff 1 80.0 100.0 40.0 @@ -30,8 +30,8 @@ The *helix* dihedral style uses the potential .. math:: - E = A [1 - \cos(\theta)] + B [1 + \cos(3 \theta)] + - C [1 + \cos(\theta + \frac{\pi}{4})] + E = A [1 - \cos(\theta)] + B [1 + \cos(3 \theta)] + + C [1 + \cos(\theta + \frac{\pi}{4})] This coarse-grain dihedral potential is described in :ref:`(Guo) `. diff --git a/doc/src/dihedral_hybrid.rst b/doc/src/dihedral_hybrid.rst index 0aecb24d20..a2c962fab3 100644 --- a/doc/src/dihedral_hybrid.rst +++ b/doc/src/dihedral_hybrid.rst @@ -1,13 +1,13 @@ -.. index:: dihedral\_style hybrid +.. index:: dihedral_style hybrid -dihedral\_style hybrid command -============================== +dihedral_style hybrid command +============================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style hybrid style1 style2 ... @@ -17,11 +17,11 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style hybrid harmonic helix dihedral_coeff 1 harmonic 6.0 1 3 - dihedral_coeff 2\* helix 10 10 10 + dihedral_coeff 2* helix 10 10 10 Description """"""""""" diff --git a/doc/src/dihedral_multi_harmonic.rst b/doc/src/dihedral_multi_harmonic.rst index 68a24f59d6..8edd7bcd26 100644 --- a/doc/src/dihedral_multi_harmonic.rst +++ b/doc/src/dihedral_multi_harmonic.rst @@ -1,16 +1,16 @@ -.. index:: dihedral\_style multi/harmonic +.. index:: dihedral_style multi/harmonic -dihedral\_style multi/harmonic command -====================================== +dihedral_style multi/harmonic command +===================================== -dihedral\_style multi/harmonic/omp command -========================================== +dihedral_style multi/harmonic/omp command +========================================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style multi/harmonic @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style multi/harmonic dihedral_coeff 1 20 20 20 20 20 @@ -30,7 +30,7 @@ The *multi/harmonic* dihedral style uses the potential .. math:: - E = \sum_{n=1,5} A_n \cos^{n-1}(\phi) + E = \sum_{n=1,5} A_n \cos^{n-1}(\phi) The following coefficients must be defined for each dihedral type via the diff --git a/doc/src/dihedral_nharmonic.rst b/doc/src/dihedral_nharmonic.rst index 97403a3368..c34c523368 100644 --- a/doc/src/dihedral_nharmonic.rst +++ b/doc/src/dihedral_nharmonic.rst @@ -1,16 +1,16 @@ -.. index:: dihedral\_style nharmonic +.. index:: dihedral_style nharmonic -dihedral\_style nharmonic command +dihedral_style nharmonic command ================================= -dihedral\_style nharmonic/omp command +dihedral_style nharmonic/omp command ===================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style nharmonic @@ -18,10 +18,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style nharmonic - dihedral_coeff \* 3 10.0 20.0 30.0 + dihedral_coeff * 3 10.0 20.0 30.0 Description """"""""""" @@ -30,7 +30,7 @@ The *nharmonic* dihedral style uses the potential: .. math:: - E = \sum_{n=1,n} A_n \cos^{n-1}(\phi) + E = \sum_{n=1,n} A_n \cos^{n-1}(\phi) The following coefficients must be defined for each dihedral type via the diff --git a/doc/src/dihedral_none.rst b/doc/src/dihedral_none.rst index 1edba31372..d4520595d4 100644 --- a/doc/src/dihedral_none.rst +++ b/doc/src/dihedral_none.rst @@ -1,13 +1,13 @@ -.. index:: dihedral\_style none +.. index:: dihedral_style none -dihedral\_style none command -============================ +dihedral_style none command +=========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style none @@ -15,7 +15,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style none diff --git a/doc/src/dihedral_opls.rst b/doc/src/dihedral_opls.rst index ef431b92d2..a22bd8b8ab 100644 --- a/doc/src/dihedral_opls.rst +++ b/doc/src/dihedral_opls.rst @@ -1,22 +1,22 @@ -.. index:: dihedral\_style opls +.. index:: dihedral_style opls -dihedral\_style opls command -============================ +dihedral_style opls command +=========================== -dihedral\_style opls/intel command -================================== +dihedral_style opls/intel command +================================= -dihedral\_style opls/kk command +dihedral_style opls/kk command +============================== + +dihedral_style opls/omp command =============================== -dihedral\_style opls/omp command -================================ - Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style opls @@ -24,7 +24,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style opls dihedral_coeff 1 1.740 -0.157 0.279 0.00 # CT-CT-CT-CT @@ -38,8 +38,8 @@ The *opls* dihedral style uses the potential .. math:: - E = & \frac{1}{2} K_1 [1 + \cos(\phi)] + \frac{1}{2} K_2 [1 - \cos(2 \phi)] + \\ - & \frac{1}{2} K_3 [1 + \cos(3 \phi)] + \frac{1}{2} K_4 [1 - \cos(4 \phi)] + E = & \frac{1}{2} K_1 [1 + \cos(\phi)] + \frac{1}{2} K_2 [1 - \cos(2 \phi)] + \\ + & \frac{1}{2} K_3 [1 + \cos(3 \phi)] + \frac{1}{2} K_4 [1 - \cos(4 \phi)] Note that the usual 1/2 factor is not included in the K values. diff --git a/doc/src/dihedral_quadratic.rst b/doc/src/dihedral_quadratic.rst index 4bd425ad71..07d7eb0634 100644 --- a/doc/src/dihedral_quadratic.rst +++ b/doc/src/dihedral_quadratic.rst @@ -1,16 +1,16 @@ -.. index:: dihedral\_style quadratic +.. index:: dihedral_style quadratic -dihedral\_style quadratic command -================================= +dihedral_style quadratic command +================================ -dihedral\_style quadratic/omp command -===================================== +dihedral_style quadratic/omp command +==================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style quadratic @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style quadratic dihedral_coeff 100.0 80.0 @@ -30,7 +30,7 @@ The *quadratic* dihedral style uses the potential: .. math:: - E = K (\phi - \phi_0)^2 + E = K (\phi - \phi_0)^2 This dihedral potential can be used to keep a dihedral in a predefined diff --git a/doc/src/dihedral_spherical.rst b/doc/src/dihedral_spherical.rst index 795bd5ad4d..784a12c65e 100644 --- a/doc/src/dihedral_spherical.rst +++ b/doc/src/dihedral_spherical.rst @@ -1,13 +1,13 @@ -.. index:: dihedral\_style spherical +.. index:: dihedral_style spherical -dihedral\_style spherical command -================================= +dihedral_style spherical command +================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style spherical @@ -15,7 +15,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_coeff 1 1 286.1 1 124 1 1 90.0 0 1 90.0 0 dihedral_coeff 1 3 69.3 1 93.9 1 1 90 0 1 90 0 & @@ -32,10 +32,10 @@ The *spherical* dihedral style uses the potential: .. math:: - E(\phi,\theta_1,\theta_2) & = \sum_{i=1}^N\nolimits\ C_i\ \Phi_i(\phi)\ \Theta_{1i}(\theta_1)\ \Theta_{2i}(\theta_2) \\ - \Phi_{i}(\phi) & = u_i - \mathrm{cos}((\phi - a_i)K_i) \\ - \Theta_{1i}(\theta_1) & = v_i - \mathrm{cos}((\theta_1-b_i)L_i) \\ - \Theta_{2i}(\theta_2) & = w_i - \mathrm{cos}((\theta_2-c_i)M_i) + E(\phi,\theta_1,\theta_2) & = \sum_{i=1}^N\nolimits\ C_i\ \Phi_i(\phi)\ \Theta_{1i}(\theta_1)\ \Theta_{2i}(\theta_2) \\ + \Phi_{i}(\phi) & = u_i - \mathrm{cos}((\phi - a_i)K_i) \\ + \Theta_{1i}(\theta_1) & = v_i - \mathrm{cos}((\theta_1-b_i)L_i) \\ + \Theta_{2i}(\theta_2) & = w_i - \mathrm{cos}((\theta_2-c_i)M_i) For this dihedral style, the energy can be any function that combines the diff --git a/doc/src/dihedral_style.rst b/doc/src/dihedral_style.rst index 9091008340..59a28d034c 100644 --- a/doc/src/dihedral_style.rst +++ b/doc/src/dihedral_style.rst @@ -1,13 +1,13 @@ -.. index:: dihedral\_style +.. index:: dihedral_style -dihedral\_style command -======================= +dihedral_style command +====================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style style @@ -17,7 +17,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style harmonic dihedral_style multi/harmonic diff --git a/doc/src/dihedral_table.rst b/doc/src/dihedral_table.rst index 02a618b23b..a29e784ef5 100644 --- a/doc/src/dihedral_table.rst +++ b/doc/src/dihedral_table.rst @@ -1,16 +1,16 @@ -.. index:: dihedral\_style table +.. index:: dihedral_style table -dihedral\_style table command -============================= +dihedral_style table command +============================ -dihedral\_style table/omp command -================================= +dihedral_style table/omp command +================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style table style Ntable @@ -21,7 +21,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style table spline 400 dihedral_style table linear 1000 diff --git a/doc/src/dihedral_table_cut.rst b/doc/src/dihedral_table_cut.rst index 529a911e0b..81ebcacaef 100644 --- a/doc/src/dihedral_table_cut.rst +++ b/doc/src/dihedral_table_cut.rst @@ -1,13 +1,13 @@ -.. index:: dihedral\_style table/cut +.. index:: dihedral_style table/cut -dihedral\_style table/cut command -================================= +dihedral_style table/cut command +================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style table/cut style Ntable @@ -17,8 +17,7 @@ Syntax Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style table/cut spline 400 dihedral_style table/cut linear 1000 @@ -68,8 +67,8 @@ cutoff function: .. math:: - f(\theta) & = K \qquad\qquad\qquad\qquad\qquad\qquad \theta < \theta_1 \\ - f(\theta) & = K \left(1-\frac{(\theta - \theta_1)^2}{(\theta_2 - \theta_1)^2}\right) \qquad \theta_1 < \theta < \theta_2 + f(\theta) & = K \qquad\qquad\qquad\qquad\qquad\qquad \theta < \theta_1 \\ + f(\theta) & = K \left(1-\frac{(\theta - \theta_1)^2}{(\theta_2 - \theta_1)^2}\right) \qquad \theta_1 < \theta < \theta_2 The cutoff specifies an prefactor to the cutoff function. While this value diff --git a/doc/src/dihedral_zero.rst b/doc/src/dihedral_zero.rst index 38712957e8..be900ef13d 100644 --- a/doc/src/dihedral_zero.rst +++ b/doc/src/dihedral_zero.rst @@ -1,25 +1,24 @@ -.. index:: dihedral\_style zero +.. index:: dihedral_style zero -dihedral\_style zero command +dihedral_style zero command ============================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS - dihedral_style zero *nocoeff* + dihedral_style zero [nocoeff] Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS dihedral_style zero dihedral_style zero nocoeff - dihedral_coeff \* + dihedral_coeff * Description """"""""""" diff --git a/doc/src/displace_atoms.rst b/doc/src/displace_atoms.rst index 5d714c9625..57e6ac9986 100644 --- a/doc/src/displace_atoms.rst +++ b/doc/src/displace_atoms.rst @@ -1,13 +1,13 @@ -.. index:: displace\_atoms +.. index:: displace_atoms -displace\_atoms command -======================= +displace_atoms command +====================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS displace_atoms group-ID style args keyword value ... @@ -45,7 +45,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS displace_atoms top move 0 -5 0 units box displace_atoms flow ramp x 0.0 5.0 y 2.0 20.5 diff --git a/doc/src/dump_modify.rst b/doc/src/dump_modify.rst index 259a30d1cc..c035ea57a3 100644 --- a/doc/src/dump_modify.rst +++ b/doc/src/dump_modify.rst @@ -1,13 +1,13 @@ -.. index:: dump\_modify +.. index:: dump_modify -dump\_modify command -==================== +dump_modify command +=================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dump_modify dump-ID keyword values ... @@ -121,7 +121,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dump_modify 1 format line "%d %d %20.15g %g %g" scale yes dump_modify 1 format float %20.15g scale yes @@ -265,7 +265,7 @@ For example, the following commands will write snapshots at timesteps 0,10,20,30,100,200,300,1000,2000,etc: -.. parsed-literal:: +.. code-block:: LAMMPS variable s equal logfreq(10,3,10) dump 1 all atom 100 tmp.dump @@ -275,7 +275,7 @@ The following commands would write snapshots at the timesteps listed in file tmp.times: -.. parsed-literal:: +.. code-block:: LAMMPS variable f file tmp.times variable s equal next(f) @@ -372,7 +372,7 @@ settings, reverting all values to their default format. example, these commands: -.. parsed-literal:: +.. code-block:: LAMMPS compute 1 all property/local batom1 batom2 dump 1 all local 100 tmp.bonds index c_1[1] c_1[2] @@ -535,7 +535,7 @@ last snapshot. This can be accomplished with something the following commands: -.. parsed-literal:: +.. code-block:: LAMMPS variable Dhop equal 0.6 variable check atom "c_dsp[4] > v_Dhop" @@ -678,7 +678,7 @@ only dump atoms whose attribute has changed (or not changed). Three examples follow. -.. parsed-literal:: +.. code-block:: LAMMPS dump_modify ... thresh ix != LAST @@ -688,20 +688,20 @@ once and then crossed back between the two dump timesteps would not be included.) -.. parsed-literal:: +.. code-block:: LAMMPS region foo sphere 10 20 10 15 variable inregion atom rmask(foo) - dump_modify ... thresh v_inregion \|\^ LAST + dump_modify ... thresh v_inregion |^ LAST This will dump atoms which crossed the boundary of the spherical region since the last dump. -.. parsed-literal:: +.. code-block:: LAMMPS - variable charge atom "(q > 0.5) \|\| (q < -0.5)" - dump_modify ... thresh v_charge \|\^ LAST + variable charge atom "(q > 0.5) || (q < -0.5)" + dump_modify ... thresh v_charge |^ LAST This will dump atoms whose charge has changed from an absolute value less than 1/2 to greater than 1/2 (or vice versa) since the last dump. @@ -935,13 +935,13 @@ examples/pour/in.pour.2d.molecule input script for an example of how this is used. -.. parsed-literal:: +.. code-block:: LAMMPS variable colors string & "red green blue yellow white & purple pink orange lime gray" variable mol atom mol%10 - dump 1 all image 250 image.\*.jpg v_mol type & + dump 1 all image 250 image.*.jpg v_mol type & zoom 1.6 adiam 1.5 dump_modify 1 pad 5 amap 0 10 sa 1 10 ${colors} diff --git a/doc/src/dynamical_matrix.rst b/doc/src/dynamical_matrix.rst index 623ab4b4f1..b5ba6f2bf4 100644 --- a/doc/src/dynamical_matrix.rst +++ b/doc/src/dynamical_matrix.rst @@ -1,13 +1,13 @@ -.. index:: dynamical\_matrix +.. index:: dynamical_matrix -dynamical\_matrix command -========================= +dynamical_matrix command +======================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS dynamical_matrix group-ID style gamma args keyword value ... @@ -28,7 +28,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS dynamical_matrix 1 regular 0.000001 dynamical_matrix 1 eskm 0.000001 diff --git a/doc/src/fix_ave_correlate_long.rst b/doc/src/fix_ave_correlate_long.rst index dd84daaa75..d05c29c1a9 100644 --- a/doc/src/fix_ave_correlate_long.rst +++ b/doc/src/fix_ave_correlate_long.rst @@ -116,7 +116,7 @@ For the meaning of the additional optional keywords, see the :doc:`fix ave/corre **Restart, fix\_modify, output, run start/stop, minimize info:** -Contrary to doc:`fix ave/correlate `_ this fix +Contrary to :doc:`fix ave/correlate ` this fix does **not** provide access to its internal data to various output options. Since this fix in intended for the calculation of time correlation functions over very long MD simulations, the information diff --git a/doc/src/fix_client_md.rst b/doc/src/fix_client_md.rst index 85b0762d21..f274341a68 100644 --- a/doc/src/fix_client_md.rst +++ b/doc/src/fix_client_md.rst @@ -61,7 +61,7 @@ specify boundary conditions or force constraints in the usual way, which will be added to the per-atom forces returned by the server code. -See the examples/message dir for example scripts where LAMMPS is both +See the examples/message directory for example scripts where LAMMPS is both the "client" and/or "server" code for this kind of client/server MD simulation. The examples/message/README file explains how to launch LAMMPS and another code in tandem to perform a coupled simulation. diff --git a/doc/src/fix_drude_transform.rst b/doc/src/fix_drude_transform.rst index 4ee850c617..f29f258d27 100644 --- a/doc/src/fix_drude_transform.rst +++ b/doc/src/fix_drude_transform.rst @@ -54,58 +54,58 @@ Masses: .. math:: - \begin{equation} M' = M + m \end{equation} + M' = M + m .. math:: - \begin{equation} m' = \frac {M\, m } {M'} \end{equation} + m' = \frac {M\, m } {M'} Positions: .. math:: - \begin{equation} X' = \frac {M\, X + m\, x} {M'}\end{equation} + X' = \frac {M\, X + m\, x} {M'} .. math:: - \begin{equation} x' = x - X \end{equation} + x' = x - X Velocities: .. math:: - \begin{equation} V' = \frac {M\, V + m\, v} {M'}\end{equation} + V' = \frac {M\, V + m\, v} {M'} .. math:: - \begin{equation} v' = v - V \end{equation} + v' = v - V Forces: .. math:: - \begin{equation} F' = F + f \end{equation} + F' = F + f .. math:: - \begin{equation} f' = \frac { M\, f - m\, F} {M'}\end{equation} + f' = \frac { M\, f - m\, F} {M'} This transform conserves the total kinetic energy .. math:: - \begin{equation} \frac 1 2 \, (M\, V^2\ + m\, v^2) - = \frac 1 2 \, (M'\, V'^2\ + m'\, v'^2) \end{equation} + \frac 1 2 \, (M\, V^2\ + m\, v^2) + = \frac 1 2 \, (M'\, V'^2\ + m'\, v'^2) and the virial defined with absolute positions .. math:: - \begin{equation} X\, F + x\, f = X'\, F' + x'\, f' \end{equation} + X\, F + x\, f = X'\, F' + x'\, f' ---------- diff --git a/doc/src/fix_electron_stopping.rst b/doc/src/fix_electron_stopping.rst index d617eb9a45..095976dc53 100644 --- a/doc/src/fix_electron_stopping.rst +++ b/doc/src/fix_electron_stopping.rst @@ -55,7 +55,7 @@ to each atom as: .. math:: - \begin{equation}\vec{F}_i = \vec{F}^0_i - \frac{\vec{v}_i}{\|\vec{v}_i\|} \cdot S_e\end{equation} + \vec{F}_i = \vec{F}^0_i - \frac{\vec{v}_i}{\|\vec{v}_i\|} \cdot S_e where :math:`\vec{F}_i` is the resulting total force on the atom. :math:`\vec{F}^0_i` is the original force applied to the atom, :math:`\vec{v}_i` is diff --git a/doc/src/fix_ffl.rst b/doc/src/fix_ffl.rst index 07a483039f..37c0985294 100644 --- a/doc/src/fix_ffl.rst +++ b/doc/src/fix_ffl.rst @@ -49,12 +49,12 @@ by the equations .. math:: - \begin{equation} \frac {dq}{dt} = \frac{p}{m}, \end{equation} + \frac {dq}{dt} = \frac{p}{m}, .. math:: - \begin{equation} \frac {dp}{dt} = -\gamma p + W + F, \end{equation} + \frac {dp}{dt} = -\gamma p + W + F, where :math:`F` is the physical force, :math:`\gamma` is the friction coefficient, and :math:`W` is a Gaussian random force. diff --git a/doc/src/fix_langevin_drude.rst b/doc/src/fix_langevin_drude.rst index 712847ba5d..b87c8ef226 100644 --- a/doc/src/fix_langevin_drude.rst +++ b/doc/src/fix_langevin_drude.rst @@ -60,34 +60,34 @@ Velocities: .. math:: - \begin{equation} V' = \frac {M\, V + m\, v} {M'} \end{equation} + V' = \frac {M\, V + m\, v} {M'} .. math:: - \begin{equation} v' = v - V \end{equation} + v' = v - V Masses: .. math:: - \begin{equation} M' = M + m \end{equation} + M' = M + m .. math:: - \begin{equation} m' = \frac {M\, m } {M'} \end{equation} + m' = \frac {M\, m } {M'} The Langevin forces are computed as .. math:: - \begin{equation} F' = - \frac {M'} {\mathtt{damp\_com}}\, V' + F_r' \end{equation} + F' = - \frac {M'} {\mathtt{damp\_com}}\, V' + F_r' .. math:: - \begin{equation} f' = - \frac {m'} {\mathtt{damp\_drude}}\, v' + f_r' \end{equation} + f' = - \frac {m'} {\mathtt{damp\_drude}}\, v' + f_r' :math:`F_r'` is a random force proportional to :math:`\sqrt { \frac {2\, k_B \mathtt{Tcom}\, m'} {\mathrm dt\, \mathtt{damp\_com} } }`. @@ -98,12 +98,12 @@ transform: .. math:: - \begin{equation} F = \frac M {M'}\, F' - f' \end{equation} + F = \frac M {M'}\, F' - f' .. math:: - \begin{equation} f = \frac m {M'}\, F' + f' \end{equation} + f = \frac m {M'}\, F' + f' This fix also thermostats non-polarizable atoms in the group at temperature *Tcom*\ , as if they had a massless Drude partner. The diff --git a/doc/src/fix_modify.rst b/doc/src/fix_modify.rst index 4ac460952f..02b0de3a7a 100644 --- a/doc/src/fix_modify.rst +++ b/doc/src/fix_modify.rst @@ -1,13 +1,13 @@ -.. index:: fix\_modify +.. index:: fix_modify -fix\_modify command -=================== +fix_modify command +================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS fix_modify fix-ID keyword value ... @@ -33,7 +33,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS fix_modify 3 temp myTemp press myPress fix_modify 1 energy yes @@ -154,7 +154,7 @@ will give a warning if that is the case. Restrictions """""""""""" - none +none Related commands """""""""""""""" diff --git a/doc/src/fix_phonon.rst b/doc/src/fix_phonon.rst index 93572b27c6..57579b0fce 100644 --- a/doc/src/fix_phonon.rst +++ b/doc/src/fix_phonon.rst @@ -71,21 +71,21 @@ coefficients of the system in reciprocal space are given by .. math:: - \begin{equation}\mathbf{\Phi}_{k\alpha,k^\prime \beta}(\mathbf{q}) = k_B T \mathbf{G}^{-1}_{k\alpha,k^\prime \beta}(\mathbf{q})\end{equation} + \mathbf{\Phi}_{k\alpha,k^\prime \beta}(\mathbf{q}) = k_B T \mathbf{G}^{-1}_{k\alpha,k^\prime \beta}(\mathbf{q}) where :math:`\mathbf{G}` is the Green's functions coefficients given by .. math:: - \begin{equation}\mathbf{G}_{k\alpha,k^\prime \beta}(\mathbf{q}) = \left< \mathbf{u}_{k\alpha}(\mathbf{q}) \bullet \mathbf{u}_{k^\prime \beta}^*(\mathbf{q}) \right>\end{equation} + \mathbf{G}_{k\alpha,k^\prime \beta}(\mathbf{q}) = \left< \mathbf{u}_{k\alpha}(\mathbf{q}) \bullet \mathbf{u}_{k^\prime \beta}^*(\mathbf{q}) \right> where :math:`\left< \ldots \right>` denotes the ensemble average, and .. math:: - \begin{equation}\mathbf{u}_{k\alpha}(\mathbf{q}) = \sum_l \mathbf{u}_{l k \alpha} \exp{(i\mathbf{qr}_l)}\end{equation} + \mathbf{u}_{k\alpha}(\mathbf{q}) = \sum_l \mathbf{u}_{l k \alpha} \exp{(i\mathbf{qr}_l)} is the :math:`\alpha` component of the atomic displacement for the :math:`k` th atom in the unit cell in reciprocal space at :math:`\mathbf{q}`. In @@ -95,9 +95,9 @@ according to the following formula, .. math:: - \begin{equation}\mathbf{G}_{k\alpha,k^\prime \beta}(\mathbf{q}) = + \mathbf{G}_{k\alpha,k^\prime \beta}(\mathbf{q}) = \left< \mathbf{R}_{k \alpha}(\mathbf{q}) \bullet \mathbf{R}^*_{k^\prime \beta}(\mathbf{q}) \right> - - \left<\mathbf{R}\right>_{k \alpha}(\mathbf{q}) \bullet \left<\mathbf{R}\right>^*_{k^\prime \beta}(\mathbf{q})\end{equation} + - \left<\mathbf{R}\right>_{k \alpha}(\mathbf{q}) \bullet \left<\mathbf{R}\right>^*_{k^\prime \beta}(\mathbf{q}) where :math:`\mathbf{R}` is the instantaneous positions of atoms, and :math:`\left<\mathbf{R}\right>` is the averaged atomic positions. It @@ -110,8 +110,8 @@ Once the force constant matrix is known, the dynamical matrix .. math:: - \begin{equation}\mathbf{D}_{k\alpha, k^\prime\beta}(\mathbf{q}) = - (m_k m_{k^\prime})^{-\frac{1}{2}} \mathbf{\Phi}_{k \alpha, k^\prime \beta}(\mathbf{q})\end{equation} + \mathbf{D}_{k\alpha, k^\prime\beta}(\mathbf{q}) = + (m_k m_{k^\prime})^{-\frac{1}{2}} \mathbf{\Phi}_{k \alpha, k^\prime \beta}(\mathbf{q}) whose eigenvalues are exactly the phonon frequencies at :math:`\mathbf{q}`. diff --git a/doc/src/fix_smd_adjust_dt.rst b/doc/src/fix_smd_adjust_dt.rst index 4677c455f3..87e7d303b3 100644 --- a/doc/src/fix_smd_adjust_dt.rst +++ b/doc/src/fix_smd_adjust_dt.rst @@ -1,13 +1,13 @@ -.. index:: fix smd/adjust\_dt +.. index:: fix smd/adjust_dt -fix smd/adjust\_dt command -========================== +fix smd/adjust_dt command +========================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS fix ID group-ID smd/adjust_dt arg @@ -25,7 +25,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS fix 1 all smd/adjust_dt 0.1 diff --git a/doc/src/fix_smd_integrate_tlsph.rst b/doc/src/fix_smd_integrate_tlsph.rst index e153fec089..f2f10121e5 100644 --- a/doc/src/fix_smd_integrate_tlsph.rst +++ b/doc/src/fix_smd_integrate_tlsph.rst @@ -1,13 +1,13 @@ -.. index:: fix smd/integrate\_tlsph +.. index:: fix smd/integrate_tlsph -fix smd/integrate\_tlsph command -================================ +fix smd/integrate_tlsph command +=============================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS fix ID group-ID smd/integrate_tlsph keyword values @@ -26,7 +26,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS fix 1 all smd/integrate_tlsph fix 1 all smd/integrate_tlsph limit_velocity 1000 diff --git a/doc/src/fix_smd_integrate_ulsph.rst b/doc/src/fix_smd_integrate_ulsph.rst index d0fe508e4e..1bea4bfb15 100644 --- a/doc/src/fix_smd_integrate_ulsph.rst +++ b/doc/src/fix_smd_integrate_ulsph.rst @@ -1,13 +1,13 @@ -.. index:: fix smd/integrate\_ulsph +.. index:: fix smd/integrate_ulsph -fix smd/integrate\_ulsph command +fix smd/integrate_ulsph command ================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS fix ID group-ID smd/integrate_ulsph keyword @@ -26,8 +26,7 @@ limit\_velocity values = max\_velocity Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS fix 1 all smd/integrate_ulsph adjust_radius 1.02 25 50 fix 1 all smd/integrate_ulsph limit_velocity 1000 diff --git a/doc/src/fix_smd_move_triangulated_surface.rst b/doc/src/fix_smd_move_triangulated_surface.rst index 56fbccf2a6..d5796e0c99 100644 --- a/doc/src/fix_smd_move_triangulated_surface.rst +++ b/doc/src/fix_smd_move_triangulated_surface.rst @@ -1,13 +1,13 @@ -.. index:: fix smd/move\_tri\_surf +.. index:: fix smd/move_tri_surf -fix smd/move\_tri\_surf command -=============================== +fix smd/move_tri_surf command +============================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS fix ID group-ID smd/move_tri_surf keyword @@ -33,11 +33,11 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS - fix 1 tool smd/move_tri_surf \*LINEAR 20 20 10 - fix 2 tool smd/move_tri_surf \*WIGGLE 20 20 10 - fix 2 tool smd/move_tri_surf \*ROTATE 0 0 0 5 2 1 + fix 1 tool smd/move_tri_surf *LINEAR 20 20 10 + fix 2 tool smd/move_tri_surf *WIGGLE 20 20 10 + fix 2 tool smd/move_tri_surf *ROTATE 0 0 0 5 2 1 Description """"""""""" diff --git a/doc/src/fix_smd_wall_surface.rst b/doc/src/fix_smd_wall_surface.rst index 713569b372..a75a75ab27 100644 --- a/doc/src/fix_smd_wall_surface.rst +++ b/doc/src/fix_smd_wall_surface.rst @@ -1,13 +1,13 @@ -.. index:: fix smd/wall\_surface +.. index:: fix smd/wall_surface -fix smd/wall\_surface command -============================= +fix smd/wall_surface command +============================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS fix ID group-ID smd/wall_surface arg type mol-ID @@ -26,7 +26,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS fix stl_surf all smd/wall_surface tool.stl 2 65535 diff --git a/doc/src/improper_class2.rst b/doc/src/improper_class2.rst index 260348a668..e2bcc3829b 100644 --- a/doc/src/improper_class2.rst +++ b/doc/src/improper_class2.rst @@ -1,19 +1,19 @@ -.. index:: improper\_style class2 +.. index:: improper_style class2 -improper\_style class2 command -============================== +improper_style class2 command +============================= -improper\_style class2/omp command -================================== - -improper\_style class2/kk command +improper_style class2/omp command ================================= +improper_style class2/kk command +================================ + Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style class2 @@ -21,11 +21,11 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style class2 improper_coeff 1 100.0 0 - improper_coeff \* aa 0.0 0.0 0.0 115.06 130.01 115.06 + improper_coeff * aa 0.0 0.0 0.0 115.06 130.01 115.06 Description """"""""""" @@ -34,11 +34,11 @@ The *class2* improper style uses the potential .. math:: - E = & E_i + E_{aa} \\ - E_i = & K [ \frac{\chi_{ijkl} + \chi_{kjli} + \chi_{ljik}}{3} - \chi_0 ]^2 \\ - E_{aa} = & M_1 (\theta_{ijk} - \theta_1) (\theta_{kjl} - \theta_3) + \\ - & M_2 (\theta_{ijk} - \theta_1) (\theta_{ijl} - \theta_2) + \\ - & M_3 (\theta_{ijl} - \theta_2) (\theta_{kjl} - \theta_3) + E = & E_i + E_{aa} \\ + E_i = & K [ \frac{\chi_{ijkl} + \chi_{kjli} + \chi_{ljik}}{3} - \chi_0 ]^2 \\ + E_{aa} = & M_1 (\theta_{ijk} - \theta_1) (\theta_{kjl} - \theta_3) + \\ + & M_2 (\theta_{ijk} - \theta_1) (\theta_{ijl} - \theta_2) + \\ + & M_3 (\theta_{ijl} - \theta_2) (\theta_{kjl} - \theta_3) where :math:`E_i` is the improper term and :math:`E_{aa}` is an diff --git a/doc/src/improper_coeff.rst b/doc/src/improper_coeff.rst index 6415d9d3f4..d8974a6494 100644 --- a/doc/src/improper_coeff.rst +++ b/doc/src/improper_coeff.rst @@ -1,13 +1,13 @@ -.. index:: improper\_coeff +.. index:: improper_coeff -improper\_coeff command -======================= +improper_coeff command +====================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_coeff N args @@ -18,11 +18,11 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_coeff 1 300.0 0.0 - improper_coeff \* 80.2 -1 2 - improper_coeff \*4 80.2 -1 2 + improper_coeff * 80.2 -1 2 + improper_coeff *4 80.2 -1 2 Description """"""""""" @@ -48,9 +48,9 @@ the coeffs for all improper types, then overwrite the coeffs for just improper type 2: -.. parsed-literal:: +.. code-block:: LAMMPS - improper_coeff \* 300.0 0.0 + improper_coeff * 300.0 0.0 improper_coeff 2 50.0 0.0 A line in a data file that specifies improper coefficients uses the diff --git a/doc/src/improper_cossq.rst b/doc/src/improper_cossq.rst index e8f2032d80..39a1c014dc 100644 --- a/doc/src/improper_cossq.rst +++ b/doc/src/improper_cossq.rst @@ -1,16 +1,16 @@ -.. index:: improper\_style cossq +.. index:: improper_style cossq -improper\_style cossq command -============================= +improper_style cossq command +============================ -improper\_style cossq/omp command -================================= +improper_style cossq/omp command +================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style cossq @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style cossq improper_coeff 1 4.0 0.0 @@ -30,7 +30,7 @@ The *cossq* improper style uses the potential .. math:: - E = \frac{1}{2} K \cos^2{\left(\chi - \chi_0\right)} + E = \frac{1}{2} K \cos^2{\left(\chi - \chi_0\right)} where :math:`\chi` is the improper angle, :math:`\chi_0` is its diff --git a/doc/src/improper_cvff.rst b/doc/src/improper_cvff.rst index c1086797e2..4d1e0be059 100644 --- a/doc/src/improper_cvff.rst +++ b/doc/src/improper_cvff.rst @@ -1,19 +1,19 @@ -.. index:: improper\_style cvff +.. index:: improper_style cvff -improper\_style cvff command -============================ +improper_style cvff command +=========================== -improper\_style cvff/intel command -================================== +improper_style cvff/intel command +================================= -improper\_style cvff/omp command -================================ +improper_style cvff/omp command +=============================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style cvff @@ -21,7 +21,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style cvff improper_coeff 1 80.0 -1 4 diff --git a/doc/src/improper_distance.rst b/doc/src/improper_distance.rst index c29386e010..8917b6ed22 100644 --- a/doc/src/improper_distance.rst +++ b/doc/src/improper_distance.rst @@ -1,18 +1,20 @@ -.. index:: improper\_style distance +.. index:: improper_style distance -improper\_style distance command -================================ +improper_style distance command +=============================== Syntax """""" -improper\_style distance +.. code-block:: LAMMPS + + improper_style distance Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style distance improper_coeff 1 80.0 100.0 @@ -27,7 +29,7 @@ The *distance* improper style uses the potential E = K_2 d^2 + K_4 d^4 -where d is the distance between the central atom and the plane formed +where :math:`d` is the distance between the central atom and the plane formed by the other three atoms. If the 4 atoms in an improper quadruplet (listed in the data file read by the :doc:`read_data ` command) are ordered I,J,K,L then the I-atom is assumed to be the diff --git a/doc/src/improper_distharm.rst b/doc/src/improper_distharm.rst index 585285b88e..49c64ae133 100644 --- a/doc/src/improper_distharm.rst +++ b/doc/src/improper_distharm.rst @@ -1,18 +1,20 @@ -.. index:: improper\_style distharm +.. index:: improper_style distharm -improper\_style distharm command -================================ +improper_style distharm command +=============================== Syntax """""" -improper\_style distharm +.. code-block:: LAMMPS + + improper_style distharm Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style distharm improper_coeff 1 25.0 0.5 @@ -24,10 +26,10 @@ The *distharm* improper style uses the potential .. math:: - E = K (d - d_0)^2 + E = K (d - d_0)^2 -where d is the oriented distance between the central atom and the plane formed +where :math:`d` is the oriented distance between the central atom and the plane formed by the other three atoms. If the 4 atoms in an improper quadruplet (listed in the data file read by the :doc:`read_data ` command) are ordered I,J,K,L then the L-atom is assumed to be the diff --git a/doc/src/improper_fourier.rst b/doc/src/improper_fourier.rst index 734aa75eb9..18876e69c6 100644 --- a/doc/src/improper_fourier.rst +++ b/doc/src/improper_fourier.rst @@ -1,16 +1,16 @@ -.. index:: improper\_style fourier +.. index:: improper_style fourier -improper\_style fourier command -=============================== +improper_style fourier command +============================== -improper\_style fourier/omp command -=================================== +improper_style fourier/omp command +================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style fourier @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style fourier improper_coeff 1 100.0 0.0 1.0 0.5 1 diff --git a/doc/src/improper_harmonic.rst b/doc/src/improper_harmonic.rst index 666bd425e8..1fcaa181be 100644 --- a/doc/src/improper_harmonic.rst +++ b/doc/src/improper_harmonic.rst @@ -1,22 +1,22 @@ -.. index:: improper\_style harmonic +.. index:: improper_style harmonic -improper\_style harmonic command -================================ +improper_style harmonic command +=============================== -improper\_style harmonic/intel command -====================================== +improper_style harmonic/intel command +===================================== -improper\_style harmonic/kk command +improper_style harmonic/kk command +================================== + +improper_style harmonic/omp command =================================== -improper\_style harmonic/omp command -==================================== - Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style harmonic @@ -24,7 +24,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style harmonic improper_coeff 1 100.0 0 @@ -36,7 +36,7 @@ The *harmonic* improper style uses the potential .. math:: - E = K (\chi - \chi_0)^2 + E = K (\chi - \chi_0)^2 where :math:`\chi` is the improper angle, :math:`\chi_0` is its equilibrium diff --git a/doc/src/improper_hybrid.rst b/doc/src/improper_hybrid.rst index aac53bbb66..4696296ff5 100644 --- a/doc/src/improper_hybrid.rst +++ b/doc/src/improper_hybrid.rst @@ -1,13 +1,13 @@ -.. index:: improper\_style hybrid +.. index:: improper_style hybrid -improper\_style hybrid command -============================== +improper_style hybrid command +============================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style hybrid style1 style2 ... @@ -17,7 +17,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style hybrid harmonic helix improper_coeff 1 harmonic 120.0 30 diff --git a/doc/src/improper_inversion_harmonic.rst b/doc/src/improper_inversion_harmonic.rst index 86cdbc7c8f..f74ac78e07 100644 --- a/doc/src/improper_inversion_harmonic.rst +++ b/doc/src/improper_inversion_harmonic.rst @@ -1,13 +1,13 @@ -.. index:: improper\_style inversion/harmonic +.. index:: improper_style inversion/harmonic -improper\_style inversion/harmonic command -========================================== +improper_style inversion/harmonic command +========================================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style inversion/harmonic @@ -15,7 +15,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style inversion/harmonic improper_coeff 1 18.776340 0.000000 @@ -28,7 +28,7 @@ out-of-plane angle definition and uses an harmonic potential: .. math:: - E = K \left(\omega - \omega_0\right)^2 + E = K \left(\omega - \omega_0\right)^2 where :math:`K` is the force constant and :math:`\omega` is the angle diff --git a/doc/src/improper_none.rst b/doc/src/improper_none.rst index c194eebd0f..9037ba9892 100644 --- a/doc/src/improper_none.rst +++ b/doc/src/improper_none.rst @@ -1,13 +1,13 @@ -.. index:: improper\_style none +.. index:: improper_style none -improper\_style none command -============================ +improper_style none command +=========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style none @@ -15,7 +15,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style none diff --git a/doc/src/improper_ring.rst b/doc/src/improper_ring.rst index 1554439380..b09e353fd1 100644 --- a/doc/src/improper_ring.rst +++ b/doc/src/improper_ring.rst @@ -1,16 +1,16 @@ -.. index:: improper\_style ring +.. index:: improper_style ring -improper\_style ring command -============================ +improper_style ring command +=========================== -improper\_style ring/omp command -================================ +improper_style ring/omp command +=============================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style ring @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style ring improper_coeff 1 8000 70.5 diff --git a/doc/src/improper_sqdistharm.rst b/doc/src/improper_sqdistharm.rst index b9bf53ba34..b883d5e4f0 100644 --- a/doc/src/improper_sqdistharm.rst +++ b/doc/src/improper_sqdistharm.rst @@ -1,18 +1,19 @@ -.. index:: improper\_style sqdistharm +.. index:: improper_style sqdistharm -improper\_style sqdistharm command -================================== +improper_style sqdistharm command +================================= Syntax """""" -improper\_style sqdistharm +.. code-block:: LAMMPS + + improper_style sqdistharm Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS improper_style sqdistharm improper_coeff 1 50.0 0.1 @@ -24,8 +25,7 @@ The *sqdistharm* improper style uses the potential .. math:: - E = K (d^2 - {d_0}^2)^2 - + E = K (d^2 - {d_0}^2)^2 where :math:`d` is the distance between the central atom and the plane formed by the other three atoms. If the 4 atoms in an improper quadruplet diff --git a/doc/src/improper_style.rst b/doc/src/improper_style.rst index 463e66704b..4035f763df 100644 --- a/doc/src/improper_style.rst +++ b/doc/src/improper_style.rst @@ -1,13 +1,13 @@ -.. index:: improper\_style +.. index:: improper_style -improper\_style command -======================= +improper_style command +====================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style style @@ -17,7 +17,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style harmonic improper_style cvff @@ -118,6 +118,6 @@ Default """"""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style none diff --git a/doc/src/improper_umbrella.rst b/doc/src/improper_umbrella.rst index 33f549ffc8..cc690dc3b4 100644 --- a/doc/src/improper_umbrella.rst +++ b/doc/src/improper_umbrella.rst @@ -1,16 +1,16 @@ -.. index:: improper\_style umbrella +.. index:: improper_style umbrella -improper\_style umbrella command -================================ +improper_style umbrella command +=============================== -improper\_style umbrella/omp command -==================================== +improper_style umbrella/omp command +=================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style umbrella @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style umbrella improper_coeff 1 100.0 180.0 @@ -32,8 +32,8 @@ commonly referred to as a classic inversion and used in the .. math:: - E = & \frac{1}{2}K\left( \frac{1}{\sin\omega_0}\right) ^2 \left( \cos\omega - \cos\omega_0\right) ^2 \qquad \omega_0 \neq 0^o \\ - E = & K\left( 1-cos\omega\right) \qquad \omega_0 = 0^o + E = & \frac{1}{2}K\left( \frac{1}{\sin\omega_0}\right) ^2 \left( \cos\omega - \cos\omega_0\right) ^2 \qquad \omega_0 \neq 0^o \\ + E = & K\left( 1-cos\omega\right) \qquad \omega_0 = 0^o where :math:`K` is the force constant and :math:`\omega` is the angle between the IL diff --git a/doc/src/improper_zero.rst b/doc/src/improper_zero.rst index c745b69013..d1419f7618 100644 --- a/doc/src/improper_zero.rst +++ b/doc/src/improper_zero.rst @@ -1,25 +1,25 @@ -.. index:: improper\_style zero +.. index:: improper_style zero -improper\_style zero command -============================ +improper_style zero command +=========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS - improper_style zero *nocoeff* + improper_style zero [nocoeff] Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS improper_style zero improper_style zero nocoeff - improper_coeff \* + improper_coeff * Description """"""""""" diff --git a/doc/src/kim_commands.rst b/doc/src/kim_commands.rst index 704657bb68..aeab9fae56 100644 --- a/doc/src/kim_commands.rst +++ b/doc/src/kim_commands.rst @@ -1,22 +1,22 @@ -.. index:: kim\_init +.. index:: kim_init, kim_interactions, kim_query, kim_param -kim\_init command +kim_init command ================= -kim\_interactions command +kim_interactions command ========================= -kim\_query command +kim_query command ================== -kim\_param command +kim_param command ================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS kim_init model user_units unitarg kim_interactions typeargs @@ -56,7 +56,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 metal kim_interactions Si @@ -238,7 +238,7 @@ of a face-centered cubic (fcc) lattice for the Ercolessi and Adams (1994) potential for Al: -.. parsed-literal:: +.. code-block:: LAMMPS kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal boundary p p p @@ -293,15 +293,15 @@ meters, computes the total energy, and prints the cohesive energy in Joules regardless of the units of the IM. -.. parsed-literal:: +.. code-block:: LAMMPS kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 si unit_conversion_mode boundary p p p - lattice fcc 4.032e-10\*${_u_distance} + lattice fcc 4.032e-10*${_u_distance} region simbox block 0 1 0 1 0 1 units lattice create_box 1 simbox create_atoms 1 box - mass 1 4.480134e-26\*${_u_mass} + mass 1 4.480134e-26*${_u_mass} kim_interactions Al run 0 variable Ec_in_J equal (pe/count(all))/${_u_energy} @@ -320,11 +320,11 @@ dump file using the :doc:`read_dump ` command, the following can be done to convert the box and all atomic positions to the correct units: -.. parsed-literal:: +.. code-block:: LAMMPS - variable xyfinal equal xy\*${_u_distance} - variable xzfinal equal xz\*${_u_distance} - variable yzfinal equal yz\*${_u_distance} + variable xyfinal equal xy*${_u_distance} + variable xzfinal equal xz*${_u_distance} + variable yzfinal equal yz*${_u_distance} change_box all x scale ${_u_distance} & y scale ${_u_distance} & z scale ${_u_distance} & @@ -360,14 +360,14 @@ If the LAMMPS simulation has four atom types, where the first three are Si, and the fourth is C, the following *kim\_interactions* command would be used: -.. parsed-literal:: +.. code-block:: LAMMPS kim_interactions Si Si Si C Alternatively, for a model with a fixed mapping the command would be: -.. parsed-literal:: +.. code-block:: LAMMPS kim_interactions fixed_types @@ -379,7 +379,7 @@ the appropriate *pair\_coeff* command. For example, for the Ercolessi and Adams (1994) KIM PM for Al set by the following commands: -.. parsed-literal:: +.. code-block:: LAMMPS kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal ... @@ -390,10 +390,10 @@ Ercolessi and Adams (1994) KIM PM for Al set by the following commands: the *kim\_interactions* command executes the following LAMMPS input commands: -.. parsed-literal:: +.. code-block:: LAMMPS pair_style kim EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 - pair_coeff \* \* Al + pair_coeff * * Al For a KIM SM, the generated input commands may be more complex and require that LAMMPS is built with the required packages included @@ -403,7 +403,7 @@ For example, for the Strachan et al. (2003) ReaxFF SM set by the following commands: -.. parsed-literal:: +.. code-block:: LAMMPS kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real ... @@ -414,10 +414,10 @@ set by the following commands: the *kim\_interactions* command executes the following LAMMPS input commands: -.. parsed-literal:: +.. code-block:: LAMMPS pair_style reax/c lmp_control safezone 2.0 mincap 100 - pair_coeff \* \* ffield.reax.rdx C H N O + pair_coeff * * ffield.reax.rdx C H N O fix reaxqeq all qeq/reax 1 0.0 10.0 1.0e-6 param.qeq Note that the files *lmp\_control*, *ffield.reax.rdx* and *param.qeq* @@ -449,7 +449,7 @@ of an IM set by *kim\_init* for material properties archived in The syntax for the *kim\_query* command is as follows: -.. parsed-literal:: +.. code-block:: LAMMPS kim_query variable formatarg query_function queryargs @@ -509,7 +509,7 @@ or analysis phases of LAMMPS simulations. Some examples are given below. **Define an equilibrium fcc crystal** -.. parsed-literal:: +.. code-block:: LAMMPS kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal boundary p p p @@ -533,7 +533,7 @@ changed to: "lattice fcc ${a0}\*${\_u_distance}". **Define an equilibrium hcp crystal** -.. parsed-literal:: +.. code-block:: LAMMPS kim_init EAM_Dynamo_Mendelev_2007_Zr__MO_848899341753_000 metal boundary p p p @@ -556,14 +556,14 @@ input script more readable. **Define a crystal at finite temperature accounting for thermal expansion** -.. parsed-literal:: +.. code-block:: LAMMPS kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal boundary p p p kim_query a0 get_lattice_constant_cubic crystal=["fcc"] species=["Al"] units=["angstrom"] kim_query alpha get_linear_thermal_expansion_coefficient_cubic crystal=["fcc"] species=["Al"] units=["1/K"] temperature=[293.15] temperature_units=["K"] variable DeltaT equal 300 - lattice fcc ${a0}\*${alpha}\*${DeltaT} + lattice fcc ${a0}*${alpha}*${DeltaT} ... As in the previous example, the equilibrium lattice constant is obtained @@ -587,7 +587,7 @@ potential. **Compute defect formation energy** -.. parsed-literal:: +.. code-block:: LAMMPS kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal ... @@ -595,7 +595,7 @@ potential. ... which is stored in the variable *Etot* ... kim_query Ec get_cohesive_energy_cubic crystal=["fcc"] species=["Al"] units=["eV"] - variable Eform equal ${Etot} - count(all)\*${Ec} + variable Eform equal ${Etot} - count(all)*${Ec} ... The defect formation energy *Eform* is computed by subtracting from *Etot* the @@ -654,7 +654,7 @@ for details). The syntax for the *kim\_param* command is as follows: -.. parsed-literal:: +.. code-block:: LAMMPS kim_param get param_name index_range variable formatarg kim_param set param_name index_range values @@ -715,7 +715,7 @@ clarifications are provided below. **Getting a scalar parameter** -.. parsed-literal:: +.. code-block:: LAMMPS kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 metal ... @@ -729,7 +729,7 @@ LAMMPS variable. **Getting multiple scalar parameters with a single call** -.. parsed-literal:: +.. code-block:: LAMMPS kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 metal ... @@ -744,7 +744,7 @@ There are several options when getting a range of values from a parameter determined by the *formatarg* argument. -.. parsed-literal:: +.. code-block:: LAMMPS kim_init SW_ZhouWardMartin_2013_CdTeZnSeHgS__MO_503261197030_002 metal ... @@ -767,7 +767,7 @@ lambda retrieved by the *get* operation are placed in the LAMMPS variables is provided at the top of the model page. -.. parsed-literal:: +.. code-block:: LAMMPS kim_init SW_ZhouWardMartin_2013_CdTeZnSeHgS__MO_503261197030_002 metal ... @@ -789,7 +789,7 @@ as shown in the example. At each iteration of the loop *LAM\_VALUE* contains the current value of lambda. -.. parsed-literal:: +.. code-block:: LAMMPS kim_init SW_ZhouWardMartin_2013_CdTeZnSeHgS__MO_503261197030_002 metal ... @@ -804,7 +804,7 @@ the lambda array is appended to create the variable names. **Setting a scalar parameter** -.. parsed-literal:: +.. code-block:: LAMMPS kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 metal ... @@ -816,7 +816,7 @@ and *set* commands work together, so that a *get* following a *set* operation will return the new value that was set. For example: -.. parsed-literal:: +.. code-block:: LAMMPS ... kim_interactions Si @@ -849,7 +849,7 @@ be used when setting parameters. **Setting a range of values of a parameter** -.. parsed-literal:: +.. code-block:: LAMMPS kim_init SW_ZhouWardMartin_2013_CdTeZnSeHgS__MO_503261197030_002 metal ... diff --git a/doc/src/kspace_modify.rst b/doc/src/kspace_modify.rst index 087466a9e1..9c692997c9 100644 --- a/doc/src/kspace_modify.rst +++ b/doc/src/kspace_modify.rst @@ -1,13 +1,13 @@ -.. index:: kspace\_modify +.. index:: kspace_modify -kspace\_modify command -====================== +kspace_modify command +===================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS kspace_modify keyword value ... @@ -62,7 +62,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS kspace_modify mesh 24 24 30 order 6 kspace_modify slab 3.0 @@ -483,7 +483,8 @@ parameters, see the :doc:`Howto dispersion ` doc page. Restrictions """""""""""" - none + +none Related commands """""""""""""""" diff --git a/doc/src/kspace_style.rst b/doc/src/kspace_style.rst index 41a66078ae..921600a3e8 100644 --- a/doc/src/kspace_style.rst +++ b/doc/src/kspace_style.rst @@ -1,13 +1,13 @@ -.. index:: kspace\_style +.. index:: kspace_style -kspace\_style command -===================== +kspace_style command +==================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS kspace_style style value @@ -82,7 +82,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS kspace_style pppm 1.0e-4 kspace_style pppm/cg 1.0e-5 1.0e-6 @@ -94,12 +94,12 @@ Description """"""""""" Define a long-range solver for LAMMPS to use each timestep to compute -long-range Coulombic interactions or long-range 1/r\^6 interactions. +long-range Coulombic interactions or long-range :math:`1/r^6` interactions. Most of the long-range solvers perform their computation in K-space, hence the name of this command. When such a solver is used in conjunction with an appropriate pair -style, the cutoff for Coulombic or 1/r\^N interactions is effectively +style, the cutoff for Coulombic or :math:`1/r^N` interactions is effectively infinite. If the Coulombic case, this means each charge in the system interacts with charges in an infinite array of periodic images of the simulation domain. @@ -128,9 +128,9 @@ The *ewald* style performs a standard Ewald summation as described in any solid-state physics text. The *ewald/disp* style adds a long-range dispersion sum option for -1/r\^6 potentials and is useful for simulation of interfaces +:math:`1/r^6` potentials and is useful for simulation of interfaces :ref:`(Veld) `. It also performs standard Coulombic Ewald summations, -but in a more efficient manner than the *ewald* style. The 1/r\^6 +but in a more efficient manner than the *ewald* style. The :math:`1/r^6` capability means that Lennard-Jones or Buckingham potentials can be used without a cutoff, i.e. they become full long-range potentials. The *ewald/disp* style can also be used with point-dipoles, see @@ -153,8 +153,8 @@ to solve Poisson's equation on the mesh, then interpolates electric fields on the mesh points back to the atoms. It is closely related to the particle-mesh Ewald technique (PME) :ref:`(Darden) ` used in AMBER and CHARMM. The cost of traditional Ewald summation scales as -N\^(3/2) where N is the number of atoms in the system. The PPPM solver -scales as Nlog(N) due to the FFTs, so it is almost always a faster +:math:`N^{\frac{3}{2}}` where :math:`N` is the number of atoms in the system. The PPPM solver +scales as :math:`N \log{N}` due to the FFTs, so it is almost always a faster choice :ref:`(Pollock) `. The *pppm/cg* style is identical to the *pppm* style except that it @@ -244,7 +244,7 @@ The *msm* style invokes a multi-level summation method MSM solver, :ref:`(Hardy) ` or :ref:`(Hardy2) `, which maps atom charge to a 3d mesh, and uses a multi-level hierarchy of coarser and coarser meshes on which direct Coulomb solvers are done. This method does not -use FFTs and scales as N. It may therefore be faster than the other +use FFTs and scales as :math:`N`. It may therefore be faster than the other K-space solvers for relatively large problems when running on large core counts. MSM can also be used for non-periodic boundary conditions and for mixed periodic and non-periodic boundaries. @@ -466,7 +466,7 @@ Default """"""" -.. parsed-literal:: +.. code-block:: LAMMPS kspace_style none diff --git a/doc/src/min_modify.rst b/doc/src/min_modify.rst index 4714b17aa1..5628c65710 100644 --- a/doc/src/min_modify.rst +++ b/doc/src/min_modify.rst @@ -1,13 +1,13 @@ -.. index:: min\_modify +.. index:: min_modify -min\_modify command -=================== +min_modify command +================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS min_modify keyword values ... @@ -39,7 +39,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS min_modify dmax 0.2 min_modify integrator verlet tmax 4 @@ -91,20 +91,23 @@ The choice of a norm can be modified for the min styles *cg*\ , *sd*\ the 2-norm (Euclidean length) of the global force vector: .. math:: - || \vec{F} ||_{2} = \sqrt{\vec{F}_1+ \cdots + \vec{F}_N} + + || \vec{F} ||_{2} = \sqrt{\vec{F}_1+ \cdots + \vec{F}_N} The *max* norm computes the length of the 3-vector force for each atom (2-norm), and takes the maximum value of those across all atoms .. math:: - || \vec{F} ||_{max} = {\rm max}\left(||\vec{F}_1||, \cdots, ||\vec{F}_N||\right) + + || \vec{F} ||_{max} = {\rm max}\left(||\vec{F}_1||, \cdots, ||\vec{F}_N||\right) The *inf* norm takes the maximum component across the forces of all atoms in the system: .. math:: - || \vec{F} ||_{inf} = {\rm max}\left(|F_1^1|, |F_1^2|, |F_1^3| \cdots, |F_N^1|, |F_N^2|, |F_N^3|\right) + + || \vec{F} ||_{inf} = {\rm max}\left(|F_1^1|, |F_1^2|, |F_1^3| \cdots, |F_N^1|, |F_N^2|, |F_N^3|\right) For the min styles *spin*\ , *spin/cg* and *spin/lbfgs*\ , the force norm is replaced by the spin-torque norm. @@ -155,8 +158,9 @@ The :doc:`min_style ` *fire* is an optimized implementation of :doc:`min_style ` *fire/old*. It can however behave similarly to the *fire/old* style by using the following set of parameters: -.. parsed-literal:: - min_modify integrator eulerexplicit tmax 10.0 tmin 0.0 delaystep 5 & +.. code-block:: LAMMPS + + min_modify integrator eulerexplicit tmax 10.0 tmin 0.0 delaystep 5 & dtgrow 1.1 dtshrink 0.5 alpha0 0.1 alphashrink 0.99 & vdfmax 100000 halfstepback no initialdelay no diff --git a/doc/src/min_spin.rst b/doc/src/min_spin.rst index 7071d7e864..49db5c783a 100644 --- a/doc/src/min_spin.rst +++ b/doc/src/min_spin.rst @@ -1,19 +1,19 @@ -.. index:: min\_style spin +.. index:: min_style spin -min\_style spin command -======================= +min_style spin command +====================== -min\_style spin/cg command -========================== +min_style spin/cg command +========================= -min\_style spin/lbfgs command -============================= +min_style spin/lbfgs command +============================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS min_style spin min_style spin/cg @@ -23,7 +23,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS min_style spin/lbfgs min_modify line spin_cubic discrete_factor 10.0 @@ -38,7 +38,8 @@ Style *spin* defines a damped spin dynamics with an adaptive timestep, according to: .. math:: - \frac{d \vec{s}_{i}}{dt} = \lambda\, \vec{s}_{i} \times\left( \vec{\omega}_{i} \times\vec{s}_{i} \right) + + \frac{d \vec{s}_{i}}{dt} = \lambda\, \vec{s}_{i} \times\left( \vec{\omega}_{i} \times\vec{s}_{i} \right) with :math:`\lambda` a damping coefficient (similar to a Gilbert damping). :math:`\lambda` can be defined by setting the @@ -50,7 +51,8 @@ by the largest precession frequency that has to be solved in the system: .. math:: - {\Delta t}_{\rm max} = \frac{2\pi}{\kappa \left|\vec{\omega}_{\rm max} \right|} + + {\Delta t}_{\rm max} = \frac{2\pi}{\kappa \left|\vec{\omega}_{\rm max} \right|} with :math:`\left|\vec{\omega}_{\rm max}\right|` the norm of the largest precession frequency in the system (across all processes, and across all replicas if a diff --git a/doc/src/min_style.rst b/doc/src/min_style.rst index dffacab8a5..0382f0d075 100644 --- a/doc/src/min_style.rst +++ b/doc/src/min_style.rst @@ -1,13 +1,13 @@ -.. index:: min\_style +.. index:: min_style -min\_style command -================== +min_style command +================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS min_style style @@ -17,7 +17,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS min_style cg min_style spin @@ -148,7 +148,8 @@ instructions on how to use the accelerated styles effectively. Restrictions """""""""""" - none + +none Related commands """""""""""""""" @@ -159,7 +160,7 @@ Default """"""" -.. parsed-literal:: +.. code-block:: LAMMPS min_style cg diff --git a/doc/src/neigh_modify.rst b/doc/src/neigh_modify.rst index 77d450315a..dbf08d6726 100644 --- a/doc/src/neigh_modify.rst +++ b/doc/src/neigh_modify.rst @@ -1,13 +1,13 @@ -.. index:: neigh\_modify +.. index:: neigh_modify -neigh\_modify command -===================== +neigh_modify command +==================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS neigh_modify keyword values ... @@ -55,7 +55,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS neigh_modify every 2 delay 10 check yes page 100000 neigh_modify exclude type 2 3 @@ -185,7 +185,7 @@ atom can have. because LAMMPS doesn't error check these limits for every pairwise interaction (too costly), but only after all the particle's neighbors have been found. This problem usually means something is very wrong - with the way you've setup your problem (particle spacing, cutoff + with the way you have setup your problem (particle spacing, cutoff length, neighbor skin distance, etc). If you really expect that many neighbors per particle, then boost the *one* and *page* settings accordingly. diff --git a/doc/src/pair_awpmd.rst b/doc/src/pair_awpmd.rst index baef5d7209..8e353960f0 100644 --- a/doc/src/pair_awpmd.rst +++ b/doc/src/pair_awpmd.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style awpmd/cut +.. index:: pair_style awpmd/cut -pair\_style awpmd/cut command -============================= +pair_style awpmd/cut command +============================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style awpmd/cut Rc keyword value ... @@ -37,11 +37,11 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style awpmd/cut -1 pair_style awpmd/cut 40.0 uhf free - pair_coeff \* \* + pair_coeff * * pair_coeff 2 2 20.0 Description diff --git a/doc/src/pair_bop.rst b/doc/src/pair_bop.rst index f4b4ed903d..5cf3bbb4a8 100644 --- a/doc/src/pair_bop.rst +++ b/doc/src/pair_bop.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style bop +.. index:: pair_style bop -pair\_style bop command -======================= +pair_style bop command +====================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style bop keyword ... @@ -24,19 +24,19 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style bop - pair_coeff \* \* ../potentials/CdTe_bop Cd Te + pair_coeff * * ../potentials/CdTe_bop Cd Te pair_style bop save - pair_coeff \* \* ../potentials/CdTe.bop.table Cd Te Te + pair_coeff * * ../potentials/CdTe.bop.table Cd Te Te comm_modify cutoff 14.70 Description """"""""""" The *bop* pair style computes Bond-Order Potentials (BOP) based on -quantum mechanical theory incorporating both sigma and pi bonding. +quantum mechanical theory incorporating both :math:`\sigma` and :math:`\pi` bonding. By analytically deriving the BOP from quantum mechanical theory its transferability to different phases can approach that of quantum mechanical methods. This potential is similar to the original BOP @@ -53,47 +53,50 @@ discussed below. The BOP potential consists of three terms: -.. image:: Eqs/pair_bop.jpg - :align: center +.. math:: -where phi\_ij(r\_ij) is a short-range two-body function representing the -repulsion between a pair of ion cores, beta\_(sigma,ij)(r\_ij) and -beta\_(sigma,ij)(r\_ij) are respectively sigma and pi bond integrals, -THETA\_(sigma,ij) and THETA\_(pi,ij) are sigma and pi bond-orders, and -U\_prom is the promotion energy for sp-valent systems. + E = \frac{1}{2} \sum_{i=1}^{N} \sum_{j=i_1}^{i_N} \phi_{ij} \left( r_{ij} \right) - \sum_{i=1}^{N} \sum_{j=i_1}^{i_N} \beta_{\sigma,ij} \left( r_{ij} \right) \cdot \Theta_{\sigma,ij} - \sum_{i=1}^{N} \sum_{j=i_1}^{i_N} \beta_{\pi,ij} \left( r_{ij} \right) \cdot \Theta_{\pi,ij} + U_{prom} + + +where :math:`\phi_{ij}(r_{ij})` is a short-range two-body function +representing the repulsion between a pair of ion cores, +:math:`\beta_{\sigma,ij}(r_{ij})` and :math:`\beta_{\sigma,ij}(r_{ij})` +are respectively sigma and :math:`\pi` bond integrals, :math:`\Theta_{\sigma,ij}` +and :math:`\Theta_{\pi,ij}` are :math:`\sigma` and :math:`\pi` +bond-orders, and U\_prom is the promotion energy for sp-valent systems. The detailed formulas for this potential are given in Ward (:ref:`Ward `); here we provide only a brief description. -The repulsive energy phi\_ij(r\_ij) and the bond integrals -beta\_(sigma,ij)(r\_ij) and beta\_(phi,ij)(r\_ij) are functions of the -interatomic distance r\_ij between atom i and j. Each of these -potentials has a smooth cutoff at a radius of r\_(cut,ij). These +The repulsive energy :math:`\phi_{ij}(r_{ij})` and the bond integrals +:math:`\beta_{\sigma,ij}(r_{ij})` and :math:`\beta_{\phi,ij}(r_{ij})` are functions of the +interatomic distance :math:`r_{ij}` between atom *i* and *j*\ . Each of these +potentials has a smooth cutoff at a radius of :math:`r_{cut,ij}`. These smooth cutoffs ensure stable behavior at situations with high sampling near the cutoff such as melts and surfaces. The bond-orders can be viewed as environment-dependent local variables -that are ij bond specific. The maximum value of the sigma bond-order -(THETA\_sigma) is 1, while that of the pi bond-order (THETA\_pi) is 2, -attributing to a maximum value of the total bond-order -(THETA\_sigma+THETA\_pi) of 3. The sigma and pi bond-orders reflect the -ubiquitous single-, double-, and triple- bond behavior of -chemistry. Their analytical expressions can be derived from tight- -binding theory by recursively expanding an inter-site Green's function -as a continued fraction. To accurately represent the bonding with a -computationally efficient potential formulation suitable for MD -simulations, the derived BOP only takes (and retains) the first two -levels of the recursive representations for both the sigma and the pi -bond-orders. Bond-order terms can be understood in terms of molecular -orbital hopping paths based upon the Cyrot-Lackmann theorem -(:ref:`Pettifor\_1 `). The sigma bond-order with a half-full -valence shell is used to interpolate the bond-order expression that -incorporated explicit valance band filling. This pi bond-order -expression also contains also contains a three-member ring term that -allows implementation of an asymmetric density of states, which helps -to either stabilize or destabilize close-packed structures. The pi -bond-order includes hopping paths of length 4. This enables the -incorporation of dihedral angles effects. +that are ij bond specific. The maximum value of the :math:`\sigma` +bond-order (:math:`\Theta_{\sigma}` is 1, while that of the :math:`\pi` +bond-order (:math:`\Theta_{\pi}`) is 2, attributing to a maximum value +of the total bond-order (:math:`\Theta_{\sigma}+\Theta_{\pi}`) of 3. +The :math:`\sigma` and :math:`\pi` bond-orders reflect the ubiquitous +single-, double-, and triple- bond behavior of chemistry. Their +analytical expressions can be derived from tight- binding theory by +recursively expanding an inter-site Green's function as a continued +fraction. To accurately represent the bonding with a computationally +efficient potential formulation suitable for MD simulations, the derived +BOP only takes (and retains) the first two levels of the recursive +representations for both the :math:`\sigma` and the :math:`\pi` bond-orders. Bond-order +terms can be understood in terms of molecular orbital hopping paths +based upon the Cyrot-Lackmann theorem (:ref:`Pettifor\_1 `). +The :math:`\sigma` bond-order with a half-full valence shell is used to +interpolate the bond-order expression that incorporated explicit valance +band filling. This :math:`\pi` bond-order expression also contains also contains +a three-member ring term that allows implementation of an asymmetric +density of states, which helps to either stabilize or destabilize +close-packed structures. The :math:`\pi` bond-order includes hopping paths of +length 4. This enables the incorporation of dihedral angles effects. .. note:: diff --git a/doc/src/pair_born.rst b/doc/src/pair_born.rst index 1a7d3bae5e..1e0dfc5611 100644 --- a/doc/src/pair_born.rst +++ b/doc/src/pair_born.rst @@ -1,46 +1,46 @@ -.. index:: pair\_style born +.. index:: pair_style born -pair\_style born command -======================== +pair_style born command +======================= -pair\_style born/omp command -============================ +pair_style born/omp command +=========================== -pair\_style born/gpu command -============================ +pair_style born/gpu command +=========================== -pair\_style born/coul/long command -================================== - -pair\_style born/coul/long/gpu command -====================================== - -pair\_style born/coul/long/omp command -====================================== - -pair\_style born/coul/msm command +pair_style born/coul/long command ================================= -pair\_style born/coul/msm/omp command +pair_style born/coul/long/gpu command ===================================== -pair\_style born/coul/wolf command -================================== +pair_style born/coul/long/omp command +===================================== -pair\_style born/coul/wolf/gpu command -====================================== +pair_style born/coul/msm command +================================ -pair\_style born/coul/wolf/omp command -====================================== +pair_style born/coul/msm/omp command +==================================== -pair\_style born/coul/dsf command +pair_style born/coul/wolf command ================================= +pair_style born/coul/wolf/gpu command +===================================== + +pair_style born/coul/wolf/omp command +===================================== + +pair_style born/coul/dsf command +================================ + Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -71,29 +71,29 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style born 10.0 - pair_coeff \* \* 6.08 0.317 2.340 24.18 11.51 + pair_coeff * * 6.08 0.317 2.340 24.18 11.51 pair_coeff 1 1 6.08 0.317 2.340 24.18 11.51 pair_style born/coul/long 10.0 pair_style born/coul/long 10.0 8. - pair_coeff \* \* 6.08 0.317 2.340 24.18 11.51 + pair_coeff * * 6.08 0.317 2.340 24.18 11.51 pair_coeff 1 1 6.08 0.317 2.340 24.18 11.51 pair_style born/coul/msm 10.0 pair_style born/coul/msm 10.0 8.0 - pair_coeff \* \* 6.08 0.317 2.340 24.18 11.51 + pair_coeff * * 6.08 0.317 2.340 24.18 11.51 pair_coeff 1 1 6.08 0.317 2.340 24.18 11.51 pair_style born/coul/wolf 0.25 10.0 pair_style born/coul/wolf 0.25 10.0 9.0 - pair_coeff \* \* 6.08 0.317 2.340 24.18 11.51 + pair_coeff * * 6.08 0.317 2.340 24.18 11.51 pair_coeff 1 1 6.08 0.317 2.340 24.18 11.51 pair_style born/coul/dsf 0.1 10.0 12.0 - pair_coeff \* \* 0.0 1.00 0.00 0.00 0.00 + pair_coeff * * 0.0 1.00 0.00 0.00 0.00 pair_coeff 1 1 480.0 0.25 0.00 1.05 0.50 Description @@ -102,11 +102,15 @@ Description The *born* style computes the Born-Mayer-Huggins or Tosi/Fumi potential described in :ref:`(Fumi and Tosi) `, given by -.. image:: Eqs/pair_born.jpg - :align: center +.. math:: -where sigma is an interaction-dependent length parameter, rho is an -ionic-pair dependent length parameter, and Rc is the cutoff. + E = A \exp \left(\frac{\sigma - r}{\rho} \right) - + \frac{C}{r^6} + \frac{D}{r^8} \qquad r < r_c + + +where :math:`\sigma` is an interaction-dependent length parameter, +:math:`\rho` is an ionic-pair dependent length parameter, and +:math:`r_c` is the cutoff. The styles with *coul/long* or *coul/msm* add a Coulombic term as described for the :doc:`lj/cut ` pair styles. An additional @@ -138,8 +142,8 @@ above, or in the data file or restart files read by the commands, or by mixing as described below: * A (energy units) -* rho (distance units) -* sigma (distance units) +* :math:`\rho` (distance units) +* :math:`\sigma` (distance units) * C (energy units \* distance units\^6) * D (energy units \* distance units\^8) * cutoff (distance units) diff --git a/doc/src/pair_brownian.rst b/doc/src/pair_brownian.rst index 3f66365fb2..24c93551cf 100644 --- a/doc/src/pair_brownian.rst +++ b/doc/src/pair_brownian.rst @@ -1,22 +1,22 @@ -.. index:: pair\_style brownian +.. index:: pair_style brownian -pair\_style brownian command -============================ +pair_style brownian command +=========================== -pair\_style brownian/omp command +pair_style brownian/omp command ================================ -pair\_style brownian/poly command -================================= +pair_style brownian/poly command +================================ -pair\_style brownian/poly/omp command -===================================== +pair_style brownian/poly/omp command +==================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style mu flaglog flagfld cutinner cutoff t_target seed flagHI flagVF @@ -35,11 +35,11 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style brownian 1.5 1 1 2.01 2.5 2.0 5878567 (assuming radius = 1) pair_coeff 1 1 2.05 2.8 - pair_coeff \* \* + pair_coeff * * Description """"""""""" diff --git a/doc/src/pair_buck.rst b/doc/src/pair_buck.rst index b988593b20..7c09e7a0ed 100644 --- a/doc/src/pair_buck.rst +++ b/doc/src/pair_buck.rst @@ -1,61 +1,61 @@ -.. index:: pair\_style buck +.. index:: pair_style buck -pair\_style buck command +pair_style buck command ======================== -pair\_style buck/gpu command +pair_style buck/gpu command ============================ -pair\_style buck/intel command +pair_style buck/intel command ============================== -pair\_style buck/kk command +pair_style buck/kk command =========================== -pair\_style buck/omp command +pair_style buck/omp command ============================ -pair\_style buck/coul/cut command +pair_style buck/coul/cut command ================================= -pair\_style buck/coul/cut/gpu command +pair_style buck/coul/cut/gpu command ===================================== -pair\_style buck/coul/cut/intel command +pair_style buck/coul/cut/intel command ======================================= -pair\_style buck/coul/cut/kk command +pair_style buck/coul/cut/kk command ==================================== -pair\_style buck/coul/cut/omp command +pair_style buck/coul/cut/omp command ===================================== -pair\_style buck/coul/long command +pair_style buck/coul/long command ================================== -pair\_style buck/coul/long/gpu command +pair_style buck/coul/long/gpu command ====================================== -pair\_style buck/coul/long/intel command +pair_style buck/coul/long/intel command ======================================== -pair\_style buck/coul/long/kk command +pair_style buck/coul/long/kk command ===================================== -pair\_style buck/coul/long/omp command +pair_style buck/coul/long/omp command ====================================== -pair\_style buck/coul/msm command +pair_style buck/coul/msm command ================================= -pair\_style buck/coul/msm/omp command +pair_style buck/coul/msm/omp command ===================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -81,26 +81,26 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style buck 2.5 - pair_coeff \* \* 100.0 1.5 200.0 - pair_coeff \* \* 100.0 1.5 200.0 3.0 + pair_coeff * * 100.0 1.5 200.0 + pair_coeff * * 100.0 1.5 200.0 3.0 pair_style buck/coul/cut 10.0 pair_style buck/coul/cut 10.0 8.0 - pair_coeff \* \* 100.0 1.5 200.0 + pair_coeff * * 100.0 1.5 200.0 pair_coeff 1 1 100.0 1.5 200.0 9.0 pair_coeff 1 1 100.0 1.5 200.0 9.0 8.0 pair_style buck/coul/long 10.0 pair_style buck/coul/long 10.0 8.0 - pair_coeff \* \* 100.0 1.5 200.0 + pair_coeff * * 100.0 1.5 200.0 pair_coeff 1 1 100.0 1.5 200.0 9.0 pair_style buck/coul/msm 10.0 pair_style buck/coul/msm 10.0 8.0 - pair_coeff \* \* 100.0 1.5 200.0 + pair_coeff * * 100.0 1.5 200.0 pair_coeff 1 1 100.0 1.5 200.0 9.0 Description @@ -109,11 +109,13 @@ Description The *buck* style computes a Buckingham potential (exp/6 instead of Lennard-Jones 12/6) given by -.. image:: Eqs/pair_buck.jpg - :align: center +.. math:: -where rho is an ionic-pair dependent length parameter, and Rc is the -cutoff on both terms. + E = A e^{-r / \rho} - \frac{C}{r^6} \qquad r < r_c + + +where :math:`\rho` is an ionic-pair dependent length parameter, and +:math:`r_c` is the cutoff on both terms. The styles with *coul/cut* or *coul/long* or *coul/msm* add a Coulombic term as described for the :doc:`lj/cut ` pair styles. @@ -147,14 +149,14 @@ above, or in the data file or restart files read by the commands: * A (energy units) -* rho (distance units) +* :math:`\rho` (distance units) * C (energy-distance\^6 units) * cutoff (distance units) * cutoff2 (distance units) -The second coefficient, rho, must be greater than zero. -The coefficients A, rho, and C can be written as analytical expressions -of epsilon and sigma, in analogy to the Lennard-Jones potential +The second coefficient, :math:`\rho`, must be greater than zero. +The coefficients A,:math:`\rho`, and C can be written as analytical expressions +of :math:`\epsilon` and :math:`\sigma`, in analogy to the Lennard-Jones potential :ref:`(Khrapak) `. The latter 2 coefficients are optional. If not specified, the global diff --git a/doc/src/pair_buck6d_coul_gauss.rst b/doc/src/pair_buck6d_coul_gauss.rst index 90d82253e3..797f2a8cec 100644 --- a/doc/src/pair_buck6d_coul_gauss.rst +++ b/doc/src/pair_buck6d_coul_gauss.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style buck6d/coul/gauss/dsf +.. index:: pair_style buck6d/coul/gauss/dsf -pair\_style buck6d/coul/gauss/dsf command +pair_style buck6d/coul/gauss/dsf command +======================================== + +pair_style buck6d/coul/gauss/long command ========================================= -pair\_style buck6d/coul/gauss/long command -========================================== - Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -34,7 +34,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style buck6d/coul/gauss/dsf 0.9000 12.0000 pair_coeff 1 1 1030. 3.061 457.179 4.521 0.608 @@ -50,12 +50,14 @@ interactions following the MOF-FF force field after :ref:`(Schmid) `. The vdW term of the *buck6d* styles computes a dispersion damped Buckingham potential: -.. image:: Eqs/pair_buck6d.jpg - :align: center +.. math:: -where A and C are a force constant, kappa is an ionic-pair dependent + E = A e^{-\kappa r} - \frac{C}{r^6} \cdot \frac{1}{1 + D r^{14}} \qquad r < r_c \\ + + +where A and C are a force constant, :math:`\kappa` is an ionic-pair dependent reciprocal length parameter, D is a dispersion correction parameter, -and the cutoff Rc truncates the interaction distance. +and the cutoff :math:`r_c` truncates the interaction distance. The first term in the potential corresponds to the Buckingham repulsion term and the second term to the dispersion attraction with a damping correction analog to the Grimme correction used in DFT. @@ -78,14 +80,16 @@ distributions which effectively dampen electrostatic interactions for high charges at close distances. The electrostatic potential is thus evaluated as: -.. image:: Eqs/pair_coul_gauss.jpg - :align: center +.. math:: -where C is an energy-conversion constant, Qi and Qj are the -charges on the 2 atoms, epsilon is the dielectric constant which -can be set by the :doc:`dielectric ` command, alpha is -ion pair dependent damping parameter and erf() is the error-function. -The cutoff Rc truncates the interaction distance. + E = \frac{C_{q_i q_j}}{\epsilon r_{ij}}\,\, \textrm{erf}\left(\alpha_{ij} r_{ij}\right)\quad\quad\quad r < r_c + + +where C is an energy-conversion constant, :math:`q_i` and :math:`q_j` +are the charges on the 2 atoms, epsilon is the dielectric constant which +can be set by the :doc:`dielectric ` command, alpha is ion +pair dependent damping parameter and erf() is the error-function. The +cutoff Rc truncates the interaction distance. The style *buck6d/coul/gauss/dsf* computes the Coulomb interaction via the damped shifted force model described in :ref:`(Fennell) ` @@ -107,14 +111,14 @@ above, or in the data file or restart files read by the commands: * A (energy units) -* rho (distance\^-1 units) +* :math:`\rho` (distance\^-1 units) * C (energy-distance\^6 units) * D (distance\^14 units) -* alpha (distance\^-1 units) +* :math:`\alpha` (distance\^-1 units) * cutoff (distance units) -The second coefficient, rho, must be greater than zero. The latter -coefficient is optional. If not specified, the global vdW cutoff +The second coefficient, :math:`\rho`, must be greater than zero. The +latter coefficient is optional. If not specified, the global vdW cutoff is used. diff --git a/doc/src/pair_buck_long.rst b/doc/src/pair_buck_long.rst index 1a90bbc71f..1c6701463b 100644 --- a/doc/src/pair_buck_long.rst +++ b/doc/src/pair_buck_long.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style buck/long/coul/long +.. index:: pair_style buck/long/coul/long -pair\_style buck/long/coul/long command +pair_style buck/long/coul/long command ======================================= -pair\_style buck/long/coul/long/omp command +pair_style buck/long/coul/long/omp command =========================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style buck/long/coul/long flag_buck flag_coul cutoff (cutoff2) @@ -36,12 +36,12 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style buck/long/coul/long cut off 2.5 pair_style buck/long/coul/long cut long 2.5 4.0 pair_style buck/long/coul/long long long 4.0 - pair_coeff \* \* 1 1 + pair_coeff * * 1 1 pair_coeff 1 1 1 3 4 Description @@ -50,13 +50,12 @@ Description The *buck/long/coul/long* style computes a Buckingham potential (exp/6 instead of Lennard-Jones 12/6) and Coulombic potential, given by -.. image:: Eqs/pair_buck.jpg - :align: center +.. math:: -.. image:: Eqs/pair_coulomb.jpg - :align: center + E = & A e^{-r / \rho} - \frac{C}{r^6} \qquad r < r_c \\ + E = & \frac{C q_i q_j}{\epsilon r} \qquad r < r_c -Rc is the cutoff. If one cutoff is specified in the pair\_style +:math:`r_c` is the cutoff. If one cutoff is specified in the pair\_style command, it is used for both the Buckingham and Coulombic terms. If two cutoffs are specified, they are used as cutoffs for the Buckingham and Coulombic terms respectively. diff --git a/doc/src/pair_charmm.rst b/doc/src/pair_charmm.rst index 5a180ed271..78de46d23f 100644 --- a/doc/src/pair_charmm.rst +++ b/doc/src/pair_charmm.rst @@ -1,61 +1,61 @@ -.. index:: pair\_style lj/charmm/coul/charmm +.. index:: pair_style lj/charmm/coul/charmm -pair\_style lj/charmm/coul/charmm command +pair_style lj/charmm/coul/charmm command ========================================= -pair\_style lj/charmm/coul/charmm/intel command +pair_style lj/charmm/coul/charmm/intel command =============================================== -pair\_style lj/charmm/coul/charmm/kk command +pair_style lj/charmm/coul/charmm/kk command ============================================ -pair\_style lj/charmm/coul/charmm/omp command +pair_style lj/charmm/coul/charmm/omp command ============================================= -pair\_style lj/charmm/coul/charmm/implicit command +pair_style lj/charmm/coul/charmm/implicit command ================================================== -pair\_style lj/charmm/coul/charmm/implicit/kk command +pair_style lj/charmm/coul/charmm/implicit/kk command ===================================================== -pair\_style lj/charmm/coul/charmm/implicit/omp command +pair_style lj/charmm/coul/charmm/implicit/omp command ====================================================== -pair\_style lj/charmm/coul/long command +pair_style lj/charmm/coul/long command ======================================= -pair\_style lj/charmm/coul/long/gpu command +pair_style lj/charmm/coul/long/gpu command =========================================== -pair\_style lj/charmm/coul/long/intel command +pair_style lj/charmm/coul/long/intel command ============================================= -pair\_style lj/charmm/coul/long/kk command +pair_style lj/charmm/coul/long/kk command ========================================== -pair\_style lj/charmm/coul/long/opt command +pair_style lj/charmm/coul/long/opt command =========================================== -pair\_style lj/charmm/coul/long/omp command +pair_style lj/charmm/coul/long/omp command =========================================== -pair\_style lj/charmm/coul/msm command +pair_style lj/charmm/coul/msm command ====================================== -pair\_style lj/charmm/coul/msm/omp command +pair_style lj/charmm/coul/msm/omp command ========================================== -pair\_style lj/charmmfsw/coul/charmmfsh command +pair_style lj/charmmfsw/coul/charmmfsh command =============================================== -pair\_style lj/charmmfsw/coul/long command +pair_style lj/charmmfsw/coul/long command ========================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -88,30 +88,30 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/charmm/coul/charmm 8.0 10.0 pair_style lj/charmm/coul/charmm 8.0 10.0 7.0 9.0 pair_style lj/charmmfsw/coul/charmmfsh 10.0 12.0 pair_style lj/charmmfsw/coul/charmmfsh 10.0 12.0 9.0 - pair_coeff \* \* 100.0 2.0 + pair_coeff * * 100.0 2.0 pair_coeff 1 1 100.0 2.0 150.0 3.5 pair_style lj/charmm/coul/charmm/implicit 8.0 10.0 pair_style lj/charmm/coul/charmm/implicit 8.0 10.0 7.0 9.0 - pair_coeff \* \* 100.0 2.0 + pair_coeff * * 100.0 2.0 pair_coeff 1 1 100.0 2.0 150.0 3.5 pair_style lj/charmm/coul/long 8.0 10.0 pair_style lj/charmm/coul/long 8.0 10.0 9.0 pair_style lj/charmmfsw/coul/long 8.0 10.0 pair_style lj/charmmfsw/coul/long 8.0 10.0 9.0 - pair_coeff \* \* 100.0 2.0 + pair_coeff * * 100.0 2.0 pair_coeff 1 1 100.0 2.0 150.0 3.5 pair_style lj/charmm/coul/msm 8.0 10.0 pair_style lj/charmm/coul/msm 8.0 10.0 9.0 - pair_coeff \* \* 100.0 2.0 + pair_coeff * * 100.0 2.0 pair_coeff 1 1 100.0 2.0 150.0 3.5 Description @@ -160,8 +160,21 @@ artifacts. the CHARMM force field energies and forces, when using one of these two CHARMM pair styles. -.. image:: Eqs/pair_charmm.jpg - :align: center +.. math:: + + E = & LJ(r) \qquad \qquad \qquad r < r_{\rm in} \\ + = & S(r) * LJ(r) \qquad \qquad r_{\rm in} < r < r_{\rm out} \\ + = & 0 \qquad \qquad \qquad \qquad r > r_{\rm out} \\ + E = & C(r) \qquad \qquad \qquad r < r_{\rm in} \\ + = & S(r) * C(r) \qquad \qquad r_{\rm in} < r < r_{\rm out} \\ + = & 0 \qquad \qquad \qquad \qquad r > r_{\rm out} \\ + LJ(r) = & 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - + \left(\frac{\sigma}{r}\right)^6 \right] \\ + C(r) = & \frac{C q_i q_j}{ \epsilon r} \\ + S(r) = & \frac{ \left[r_{\rm out}^2 - r^2\right]^2 + \left[r_{\rm out}^2 + 2r^2 - 3{r_{\rm in}^2}\right]} + { \left[r_{\rm out}^2 - {r_{\rm in}}^2\right]^3 } + where S(r) is the energy switching function mentioned above for the *charmm* styles. See the :ref:`(Steinbach) ` paper for the @@ -209,14 +222,13 @@ above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands, or by mixing as described below: -* epsilon (energy units) -* sigma (distance units) -* epsilon\_14 (energy units) -* sigma\_14 (distance units) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) +* :math:`\epsilon_{14}` (energy units) +* :math:`\sigma_{14}` (distance units) -Note that sigma is defined in the LJ formula as the zero-crossing -distance for the potential, not as the energy minimum at 2\^(1/6) -sigma. +Note that :math:`\sigma` is defined in the LJ formula as the zero-crossing +distance for the potential, not as the energy minimum at :math:`2^{1/6} \sigma`. The latter 2 coefficients are optional. If they are specified, they are used in the LJ formula between 2 atoms of these types which are diff --git a/doc/src/pair_class2.rst b/doc/src/pair_class2.rst index 9579a1f408..3b005ed517 100644 --- a/doc/src/pair_class2.rst +++ b/doc/src/pair_class2.rst @@ -1,43 +1,43 @@ -.. index:: pair\_style lj/class2 +.. index:: pair_style lj/class2 -pair\_style lj/class2 command -============================= +pair_style lj/class2 command +============================ -pair\_style lj/class2/gpu command -================================= - -pair\_style lj/class2/kk command +pair_style lj/class2/gpu command ================================ -pair\_style lj/class2/omp command -================================= +pair_style lj/class2/kk command +=============================== -pair\_style lj/class2/coul/cut command -====================================== +pair_style lj/class2/omp command +================================ -pair\_style lj/class2/coul/cut/kk command +pair_style lj/class2/coul/cut command +===================================== + +pair_style lj/class2/coul/cut/kk command +======================================== + +pair_style lj/class2/coul/cut/omp command ========================================= -pair\_style lj/class2/coul/cut/omp command +pair_style lj/class2/coul/long command +====================================== + +pair_style lj/class2/coul/long/gpu command ========================================== -pair\_style lj/class2/coul/long command -======================================= +pair_style lj/class2/coul/long/kk command +========================================= -pair\_style lj/class2/coul/long/gpu command -=========================================== - -pair\_style lj/class2/coul/long/kk command +pair_style lj/class2/coul/long/omp command ========================================== -pair\_style lj/class2/coul/long/omp command -=========================================== - Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -60,7 +60,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/class2 10.0 pair_coeff \* \* 100.0 2.5 @@ -82,10 +82,14 @@ Description The *lj/class2* styles compute a 6/9 Lennard-Jones potential given by -.. image:: Eqs/pair_class2.jpg - :align: center +.. math:: -Rc is the cutoff. + E = \epsilon \left[ 2 \left(\frac{\sigma}{r}\right)^9 - + 3 \left(\frac{\sigma}{r}\right)^6 \right] + \qquad r < r_c + + +:math:`r_c` is the cutoff. The *lj/class2/coul/cut* and *lj/class2/coul/long* styles add a Coulombic term as described for the :doc:`lj/cut ` pair styles. @@ -98,8 +102,8 @@ above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands, or by mixing as described below: -* epsilon (energy units) -* sigma (distance units) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) * cutoff1 (distance units) * cutoff2 (distance units) @@ -121,11 +125,12 @@ specified in the pair\_style command. If the pair\_coeff command is not used to define coefficients for a -particular I != J type pair, the mixing rule for epsilon and sigma for -all class2 potentials is to use the *sixthpower* formulas documented -by the :doc:`pair_modify ` command. The :doc:`pair_modify mix ` setting is thus ignored for class2 potentials -for epsilon and sigma. However it is still followed for mixing the -cutoff distance. +particular I != J type pair, the mixing rule for :math:`\epsilon` and +:math:`\sigma` for all class2 potentials is to use the *sixthpower* +formulas documented by the :doc:`pair_modify ` command. +The :doc:`pair_modify mix ` setting is thus ignored for +class2 potentials for epsilon and sigma. However it is still followed +for mixing the cutoff distance. ---------- diff --git a/doc/src/pair_coeff.rst b/doc/src/pair_coeff.rst index dec45a5f11..3b8b93e3ff 100644 --- a/doc/src/pair_coeff.rst +++ b/doc/src/pair_coeff.rst @@ -1,13 +1,13 @@ -.. index:: pair\_coeff +.. index:: pair_coeff -pair\_coeff command -=================== +pair_coeff command +================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_coeff I J args @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_coeff 1 2 1.0 1.0 2.5 pair_coeff 2 \* 1.0 1.0 @@ -56,7 +56,7 @@ same I,J pair. For example, these commands set the coeffs for all I,J pairs, then overwrite the coeffs for just the I,J = 2,3 pair: -.. parsed-literal:: +.. code-block:: LAMMPS pair_coeff \* \* 1.0 1.0 2.5 pair_coeff 2 3 2.0 1.0 1.12 diff --git a/doc/src/pair_colloid.rst b/doc/src/pair_colloid.rst index 2e4feabfbf..f94c163e1d 100644 --- a/doc/src/pair_colloid.rst +++ b/doc/src/pair_colloid.rst @@ -1,19 +1,19 @@ -.. index:: pair\_style colloid +.. index:: pair_style colloid -pair\_style colloid command -=========================== +pair_style colloid command +========================== -pair\_style colloid/gpu command -=============================== +pair_style colloid/gpu command +============================== -pair\_style colloid/omp command -=============================== +pair_style colloid/omp command +============================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style colloid cutoff @@ -23,10 +23,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style colloid 10.0 - pair_coeff \* \* 25 1.0 10.0 10.0 + pair_coeff * * 25 1.0 10.0 10.0 pair_coeff 1 1 144 1.0 0.0 0.0 3.0 pair_coeff 1 2 75.398 1.0 0.0 10.0 9.0 pair_coeff 2 2 39.478 1.0 10.0 10.0 25.0 @@ -41,37 +41,64 @@ Lennard-Jones particle of size sigma. The colloid-colloid interaction energy is given by -.. image:: Eqs/pair_colloid_cc.jpg - :align: center +.. math:: -where A\_cc is the Hamaker constant, a1 and a2 are the radii of the two -colloidal particles, and Rc is the cutoff. This equation results from -describing each colloidal particle as an integrated collection of -Lennard-Jones particles of size sigma and is derived in -:ref:`(Everaers) `. + U_A = & - \frac{A_{cc}}{6} \left[ + \frac{2 a_1 a_2}{r^2-\left(a_1+a_2\right)^2} + + \frac{2 a_1 a_2}{r^2 - \left(a_1 - a_2\right)^2} + + \mathrm{ln} + \left( + \frac{r^2-\left(a_1+a_2\right)^2}{r^2-\left(a_1-a_2\right)^2} + \right) + \right] \\ + & \\ + U_R = & \frac{A_{cc}}{37800} \frac{\sigma^6}{r} + \biggl[ \frac{r^2-7r\left(a_1+a_2\right)+6\left(a_1^2+7a_1a_2+a_2^2\right)} + {\left(r-a_1-a_2\right)^7} \\ + &\qquad +\frac{r^2+7r\left(a_1+a_2\right)+6\left(a_1^2+7a_1a_2+a_2^2\right)} + {\left(r+a_1+a_2\right)^7} \\ + &\qquad -\frac{r^2+7r\left(a_1-a_2\right)+6\left(a_1^2-7a_1a_2+a_2^2\right)} + {\left(r+a_1-a_2\right)^7} \\ + &\qquad \left. -\frac{r^2-7r\left(a_1-a_2\right)+6\left(a_1^2-7a_1a_2+a_2^2\right)} + {\left(r-a_1+a_2\right)^7} + \right] \\ + & \\ + U = & U_A + U_R, \qquad r < r_c + +where :math:`A_{cc}` is the Hamaker constant, :math:`a_1` and :math:`a_2` are the +radii of the two colloidal particles, and :math:`r_c` is the cutoff. This +equation results from describing each colloidal particle as an +integrated collection of Lennard-Jones particles of size sigma and is +derived in :ref:`(Everaers) `. The colloid-solvent interaction energy is given by -.. image:: Eqs/pair_colloid_cs.jpg - :align: center +.. math:: -where A\_cs is the Hamaker constant, a is the radius of the colloidal -particle, and Rc is the cutoff. This formula is derived from the + U = \frac{2 ~ a^3 ~ \sigma^3 ~ A_{cs}}{9 \left( a^2 - r^2 \right)^3} + \left[ 1 - \frac{\left(5 ~ a^6+45~a^4~r^2+63~a^2~r^4+15~r^6\right) \sigma^6} + {15 \left(a-r\right)^6 \left( a+r \right)^6} \right], \quad r < r_c + +where :math:A_{cs}` is the Hamaker constant, *a* is the radius of the colloidal +particle, and :math:`r_c` is the cutoff. This formula is derived from the colloid-colloid interaction, letting one of the particle sizes go to zero. The solvent-solvent interaction energy is given by the usual Lennard-Jones formula -.. image:: Eqs/pair_colloid_ss.jpg - :align: center +.. math:: -with A\_ss set appropriately, which results from letting both particle -sizes go to zero. + U = \frac{A_{ss}}{36} \left[ \left( \frac{\sigma}{r} + \right)^{12} - \left( \frac{ \sigma}{r} \right)^6 \right], \quad + r < r_c -When used in combination with :doc:`pair_style yukawa/colloid `, the two terms become the so-called -DLVO potential, which combines electrostatic repulsion and van der -Waals attraction. +with :math:`A_{ss}` set appropriately, which results from letting both +particle sizes go to zero. + +When used in combination with :doc:`pair_style yukawa/colloid +`, the two terms become the so-called DLVO potential, +which combines electrostatic repulsion and van der Waals attraction. The following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples @@ -80,7 +107,7 @@ above, or in the data file or restart files read by the commands, or by mixing as described below: * A (energy units) -* sigma (distance units) +* :math:`\sigma` (distance units) * d1 (distance units) * d2 (distance units) * cutoff (distance units) @@ -88,19 +115,19 @@ commands, or by mixing as described below: A is the Hamaker energy prefactor and should typically be set as follows: -* A\_cc = colloid/colloid = 4 pi\^2 = 39.5 -* A\_cs = colloid/solvent = sqrt(A\_cc\*A\_ss) -* A\_ss = solvent/solvent = 144 (assuming epsilon = 1, so that 144/36 = 4) +* :math:`A_{cc}` = colloid/colloid = :math:`4 \pi^2 = 39.5` +* :math:`A_{cs}` = colloid/solvent = :math:`\sqrt{A_{cc} A_{ss}}` +* :math:`A_{ss}` = solvent/solvent = 144 (assuming epsilon = 1, so that 144/36 = 4) -Sigma is the size of the solvent particle or the constituent particles -integrated over in the colloidal particle and should typically be set -as follows: +:math:`\sigma` is the size of the solvent particle or the constituent +particles integrated over in the colloidal particle and should typically +be set as follows: -* Sigma\_cc = colloid/colloid = 1.0 -* Sigma\_cs = colloid/solvent = arithmetic mixing between colloid sigma and solvent sigma -* Sigma\_ss = solvent/solvent = 1.0 or whatever size the solvent particle is +* :math:`\sigma_{cc}` = colloid/colloid = 1.0 +* :math:`\sigma_{cs}` = colloid/solvent = arithmetic mixing between colloid :math:`\sigma` and solvent :math:`\sigma` +* :math:`\sigma_{ss}` = solvent/solvent = 1.0 or whatever size the solvent particle is -Thus typically Sigma\_cs = 1.0, unless the solvent particle's size != +Thus typically :math:`\sigma_{cs} = 1.0`, unless the solvent particle's size != 1.0. D1 and d2 are particle diameters, so that d1 = 2\*a1 and d2 = 2\*a2 in @@ -108,7 +135,7 @@ the formulas above. Both d1 and d2 must be values >= 0. If d1 > 0 and d2 > 0, then the pair interacts via the colloid-colloid formula above. If d1 = 0 and d2 = 0, then the pair interacts via the solvent-solvent formula. I.e. a d value of 0 is a Lennard-Jones -particle of size sigma. If either d1 = 0 or d2 = 0 and the other is +particle of size :math:`\sigma`. If either d1 = 0 or d2 = 0 and the other is larger, then the pair interacts via the colloid-solvent formula. Note that the diameter of a particular particle type may appear in diff --git a/doc/src/pair_comb.rst b/doc/src/pair_comb.rst index 7cbb1b4029..f7fe3dc55a 100644 --- a/doc/src/pair_comb.rst +++ b/doc/src/pair_comb.rst @@ -1,23 +1,26 @@ -.. index:: pair\_style comb +.. index:: pair_style comb -pair\_style comb command +pair_style comb command +======================= + +pair_style comb/omp command +=========================== + +pair_style comb3 command ======================== -pair\_style comb/omp command -============================ - -pair\_style comb3 command -========================= - Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style comb pair_style comb3 keyword + +.. parsed-literal:: + keyword = *polar* *polar* value = *polar_on* or *polar_off* = whether or not to include atomic polarization @@ -27,14 +30,14 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style comb - pair_coeff \* \* ../potentials/ffield.comb Si - pair_coeff \* \* ../potentials/ffield.comb Hf Si O + pair_coeff * * ../potentials/ffield.comb Si + pair_coeff * * ../potentials/ffield.comb Hf Si O pair_style comb3 polar_off - pair_coeff \* \* ../potentials/ffield.comb3 O Cu N C O + pair_coeff * * ../potentials/ffield.comb3 O Cu N C O Description """"""""""" @@ -45,19 +48,20 @@ third-generation COMB potential. These COMB potentials are described in :ref:`(COMB) ` and :ref:`(COMB3) `. Briefly, the total energy *ET* of a system of atoms is given by -.. image:: Eqs/pair_comb1.jpg - :align: center +.. math:: -where *Eiself* is the self-energy of atom *i* -(including atomic ionization energies and electron affinities), -*Eijshort* is the bond-order potential between -atoms *i* and *j*\ , -*EijCoul* is the Coulomb interactions, -*Epolar* is the polarization term for organic systems -(style *comb3* only), -*EvdW* is the van der Waals energy (style *comb3* only), -*Ebarr* is a charge barrier function, and -*Ecorr* are angular correction terms. + E_T = & \sum_i [ E_i^{self} (q_i) + \sum_{j>i} [E_{ij}^{short} (r_{ij}, q_i, q_j) + E_{ij}^{Coul} (r_{ij}, q_i, q_j)] + \\ + & E^{polar} (q_i, r_{ij}) + E^{vdW} (r_{ij}) + E^{barr} (q_i) + E^{corr} (r_{ij}, \theta_{jik})] + + +where :math:`E_i^{self}` is the self-energy of atom *i* (including +atomic ionization energies and electron affinities), +:math:`E_{ij}^{short}` is the bond-order potential between atoms *i* and +*j*\ , :math:`E_{ij}^{Coul}` is the Coulomb interactions, +:math:`E^{polar}` is the polarization term for organic systems (style +*comb3* only), :math:`E^{vdW}` is the van der Waals energy (style +*comb3* only), :math:`E^{barr}` is a charge barrier function, and +:math:`E^{corr}` are angular correction terms. The COMB potentials (styles *comb* and *comb3*\ ) are variable charge potentials. The equilibrium charge on each atom is calculated by the @@ -75,15 +79,15 @@ needed elements. These are mapped to LAMMPS atom types by specifying N additional arguments after the potential file in the pair\_coeff command, where N is the number of LAMMPS atom types. -For example, if your LAMMPS simulation of a Si/SiO2/ -HfO2 interface has 4 atom types, and you want the 1st and +For example, if your LAMMPS simulation of a Si/SiO2/ +HfO2 interface has 4 atom types, and you want the 1st and last to be Si, the 2nd to be Hf, and the 3rd to be O, and you would use the following pair\_coeff command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* ../potentials/ffield.comb Si Hf O Si + pair_coeff * * ../potentials/ffield.comb Si Hf O Si The first two arguments must be \* \* so as to span all LAMMPS atom types. The first and last Si arguments map LAMMPS atom types 1 and 4 @@ -101,11 +105,33 @@ Cu, Hf, Ti, O, their oxides and Zr, Zn and U metals. For style *comb3*\ , the potential file *ffield.comb3* contains all currently-available 3rd generation COMB parameterizations: O, Cu, N, C, H, Ti, Zn and Zr. The status of the optimization of the compounds, for -example Cu2O, TiN and hydrocarbons, are given in the +example Cu2O, TiN and hydrocarbons, are given in the following table: -.. image:: Eqs/pair_comb2.jpg - :align: center ++----+----+----+----+----+----+----+----+----+ +| | O | Cu | N | C | H | Ti | Zn | Zr | ++----+----+----+----+----+----+----+----+----+ +| O | F | F | F | F | F | F | F | F | ++----+----+----+----+----+----+----+----+----+ +| Cu | F | F | P | F | F | P | F | P | ++----+----+----+----+----+----+----+----+----+ +| N | F | P | F | M | F | P | P | P | ++----+----+----+----+----+----+----+----+----+ +| C | F | F | M | F | F | M | M | M | ++----+----+----+----+----+----+----+----+----+ +| H | F | F | F | F | F | M | M | F | ++----+----+----+----+----+----+----+----+----+ +| Ti | F | P | P | M | M | F | P | P | ++----+----+----+----+----+----+----+----+----+ +| Zn | F | F | P | M | M | P | F | P | ++----+----+----+----+----+----+----+----+----+ +| Zr | F | P | P | M | F | P | P | F | ++----+----+----+----+----+----+----+----+----+ + +* F = Fully optimized +* M = Only optimized for dimer molecule +* P = in progress, but have it from mixing rule + For style *comb3*\ , in addition to ffield.comb3, a special parameter file, *lib.comb3*\ , that is exclusively used for C/O/H systems, will be diff --git a/doc/src/pair_cosine_squared.rst b/doc/src/pair_cosine_squared.rst index e2d79f03d6..c29dda8224 100644 --- a/doc/src/pair_cosine_squared.rst +++ b/doc/src/pair_cosine_squared.rst @@ -1,20 +1,20 @@ -.. index:: pair\_style cosine/squared +.. index:: pair_style cosine/squared -pair\_style cosine/squared command -================================== +pair_style cosine/squared command +================================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style cosine/squared cutoff * cutoff = global cutoff for cosine-squared interactions (distance units) -.. parsed-literal:: +.. code-block:: LAMMPS pair_coeff i j eps sigma pair_coeff i j eps sigma cutoff @@ -31,7 +31,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style cosine/squared 3.0 pair_coeff \* \* 1.0 1.3 @@ -44,12 +44,19 @@ Description Style *cosine/squared* computes a potential of the form -.. image:: Eqs/pair_cosine_squared.jpg - :align: center +.. math:: -between two point particles, where (sigma, -epsilon) is the location of -the (rightmost) minimum of the potential, as explained in the syntax -section above. + E = + \begin{cases} + -\epsilon& \quad r < \sigma \\ + -\epsilon\cos\left(\frac{\pi\left(r - \sigma\right)}{2\left(r_c - \sigma\right)}\right)&\quad \sigma \leq r < r_c \\ + 0& \quad r \geq r_c + \end{cases} + + +between two point particles, where (:math:`\sigma, -\epsilon`) is the +location of the (rightmost) minimum of the potential, as explained in +the syntax section above. This potential was first used in (Cooke)\_#CKD for a coarse-grained lipid membrane model. It is generally very useful as a non-specific @@ -63,11 +70,15 @@ If the *wca* option is used then a Weeks-Chandler-Andersen potential (Weeks)\_#WCA is added to the above specified cosine-squared potential, specifically the following: -.. image:: Eqs/pair_cosine_squared_wca.jpg - :align: center +.. math:: -In this case, and this case only, the *sigma* parameter can be equal to -*cutoff* (sigma = cutoff) which will result in ONLY the WCA potential + E = \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - + 2\left(\frac{\sigma}{r}\right)^6 + 1\right] + , \quad r < \sigma + + +In this case, and this case only, the :math:`\sigma` parameter can be equal to +*cutoff* (:math:`\sigma =` cutoff) which will result in ONLY the WCA potential being used (and print a warning), so the minimum will be attained at (sigma, 0). This is a convenience feature that enables a purely repulsive potential to be used without a need to define an additional diff --git a/doc/src/pair_coul.rst b/doc/src/pair_coul.rst index 08778aab59..a5d0a0f42f 100644 --- a/doc/src/pair_coul.rst +++ b/doc/src/pair_coul.rst @@ -1,88 +1,88 @@ -.. index:: pair\_style coul/cut +.. index:: pair_style coul/cut -pair\_style coul/cut command -============================ +pair_style coul/cut command +=========================== -pair\_style coul/cut/gpu command -================================ - -pair\_style coul/cut/kk command +pair_style coul/cut/gpu command =============================== -pair\_style coul/cut/omp command -================================ - -pair\_style coul/debye command +pair_style coul/cut/kk command ============================== -pair\_style coul/debye/gpu command -================================== - -pair\_style coul/debye/kk command -================================= - -pair\_style coul/debye/omp command -================================== - -pair\_style coul/dsf command -============================ - -pair\_style coul/dsf/gpu command -================================ - -pair\_style coul/dsf/kk command +pair_style coul/cut/omp command =============================== -pair\_style coul/dsf/omp command -================================ - -pair\_style coul/long command +pair_style coul/debye command ============================= -pair\_style coul/long/omp command +pair_style coul/debye/gpu command ================================= -pair\_style coul/long/gpu command +pair_style coul/debye/kk command +================================ + +pair_style coul/debye/omp command ================================= -pair\_style coul/long/kk command -================================ +pair_style coul/dsf command +=========================== -pair\_style coul/msm command -============================ +pair_style coul/dsf/gpu command +=============================== -pair\_style coul/msm/omp command -================================ - -pair\_style coul/streitz command -================================ - -pair\_style coul/wolf command -============================= - -pair\_style coul/wolf/kk command -================================ - -pair\_style coul/wolf/omp command -================================= - -pair\_style tip4p/cut command -============================= - -pair\_style tip4p/long command +pair_style coul/dsf/kk command ============================== -pair\_style tip4p/cut/omp command -================================= +pair_style coul/dsf/omp command +=============================== -pair\_style tip4p/long/omp command -================================== +pair_style coul/long command +============================ + +pair_style coul/long/omp command +================================ + +pair_style coul/long/gpu command +================================ + +pair_style coul/long/kk command +=============================== + +pair_style coul/msm command +=========================== + +pair_style coul/msm/omp command +=============================== + +pair_style coul/streitz command +=============================== + +pair_style coul/wolf command +============================ + +pair_style coul/wolf/kk command +=============================== + +pair_style coul/wolf/omp command +================================ + +pair_style tip4p/cut command +============================ + +pair_style tip4p/long command +============================= + +pair_style tip4p/cut/omp command +================================ + +pair_style tip4p/long/omp command +================================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style coul/cut cutoff pair_style coul/debye kappa cutoff @@ -102,37 +102,37 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style coul/cut 2.5 - pair_coeff \* \* + pair_coeff * * pair_coeff 2 2 3.5 pair_style coul/debye 1.4 3.0 - pair_coeff \* \* + pair_coeff * * pair_coeff 2 2 3.5 pair_style coul/dsf 0.05 10.0 - pair_coeff \* \* + pair_coeff * * pair_style coul/long 10.0 - pair_coeff \* \* + pair_coeff * * pair_style coul/msm 10.0 - pair_coeff \* \* + pair_coeff * * pair_style coul/wolf 0.2 9.0 - pair_coeff \* \* + pair_coeff * * pair_style coul/streitz 12.0 ewald pair_style coul/streitz 12.0 wolf 0.30 - pair_coeff \* \* AlO.streitz Al O + pair_coeff * * AlO.streitz Al O pair_style tip4p/cut 1 2 7 8 0.15 12.0 - pair_coeff \* \* + pair_coeff * * pair_style tip4p/long 1 2 7 8 0.15 10.0 - pair_coeff \* \* + pair_coeff * * Description """"""""""" @@ -140,12 +140,14 @@ Description The *coul/cut* style computes the standard Coulombic interaction potential given by -.. image:: Eqs/pair_coulomb.jpg - :align: center +.. math:: + + E = \frac{C q_i q_j}{\epsilon r} \qquad r < r_c + where C is an energy-conversion constant, Qi and Qj are the charges on -the 2 atoms, and epsilon is the dielectric constant which can be set -by the :doc:`dielectric ` command. The cutoff Rc truncates +the 2 atoms, and :math:`\epsilon` is the dielectric constant which can be set +by the :doc:`dielectric ` command. The cutoff :math:`r_c` truncates the interaction distance. @@ -155,10 +157,12 @@ the interaction distance. Style *coul/debye* adds an additional exp() damping factor to the Coulombic term, given by -.. image:: Eqs/pair_debye.jpg - :align: center +.. math:: -where kappa is the Debye length. This potential is another way to + E = \frac{C q_i q_j}{\epsilon r} \exp(- \kappa r) \qquad r < r_c + + +where :math:`\kappa` is the Debye length. This potential is another way to mimic the screening effect of a polar solvent. @@ -168,10 +172,13 @@ mimic the screening effect of a polar solvent. Style *coul/dsf* computes Coulombic interactions via the damped shifted force model described in :ref:`Fennell `, given by: -.. image:: Eqs/pair_coul_dsf.jpg - :align: center +.. math:: -where *alpha* is the damping parameter and erfc() is the + E = q_iq_j \left[ \frac{\mbox{erfc} (\alpha r)}{r} - \frac{\mbox{erfc} (\alpha r_c)}{r_c} + + \left( \frac{\mbox{erfc} (\alpha r_c)}{r_c^2} + \frac{2\alpha}{\sqrt{\pi}}\frac{\exp (-\alpha^2 r^2_c)}{r_c} \right)(r-r_c) \right] \qquad r < r_c + + +where :math:`\alpha` is the damping parameter and erfc() is the complementary error-function. The potential corrects issues in the Wolf model (described below) to provide consistent forces and energies (the Wolf potential is not differentiable at the cutoff) and smooth @@ -184,16 +191,21 @@ decay to zero. Style *coul/wolf* computes Coulombic interactions via the Wolf summation method, described in :ref:`Wolf `, given by: -.. image:: Eqs/pair_coul_wolf.jpg - :align: center +.. math:: -where *alpha* is the damping parameter, and erc() and erfc() are + E_i = \frac{1}{2} \sum_{j \neq i} + \frac{q_i q_j {\rm erfc}(\alpha r_{ij})}{r_{ij}} + + \frac{1}{2} \sum_{j \neq i} + \frac{q_i q_j {\rm erf}(\alpha r_{ij})}{r_{ij}} \qquad r < r_c + + +where :math:`\alpha` is the damping parameter, and erc() and erfc() are error-function and complementary error-function terms. This potential is essentially a short-range, spherically-truncated, charge-neutralized, shifted, pairwise *1/r* summation. With a manipulation of adding and subtracting a self term (for i = j) to the first and second term on the right-hand-side, respectively, and a -small enough *alpha* damping parameter, the second term shrinks and +small enough :math:`\alpha` damping parameter, the second term shrinks and the potential becomes a rapidly-converging real-space summation. With a long enough cutoff and small enough alpha parameter, the energy and forces calculated by the Wolf summation method approach those of the @@ -215,11 +227,11 @@ the :doc:`pair_style hybrid/overlay ` command. Likewise, charge equilibration must be performed via the :doc:`fix qeq/slater ` command. For example: -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid/overlay coul/streitz 12.0 wolf 0.31 eam/alloy - pair_coeff \* \* coul/streitz AlO.streitz Al O - pair_coeff \* \* eam/alloy AlO.eam.alloy Al O + pair_coeff * * coul/streitz AlO.streitz Al O + pair_coeff * * eam/alloy AlO.eam.alloy Al O fix 1 all qeq/slater 1 12.0 1.0e-6 100 coul/streitz The keyword *wolf* in the coul/streitz command denotes computing @@ -229,7 +241,7 @@ coul/wolf potential above. Alternatively, Coulombic interactions can be computed via an Ewald summation. For example: -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid/overlay coul/streitz 12.0 ewald eam/alloy kspace_style ewald 1e-6 @@ -311,7 +323,7 @@ other. The following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples -above, or in the data file or restart files read by the +above, or in the data or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands, or by mixing as described below: @@ -323,7 +335,7 @@ global value specified in the pair\_style command is used. For *coul/long* and *coul/msm* no cutoff can be specified for an individual I,J type pair via the pair\_coeff command. All type pairs -use the same global Coulombic cutoff specified in the pair\_style +use the same global Coulomb cutoff specified in the pair\_style command. @@ -372,8 +384,8 @@ pressure. These pair styles write their information to :doc:`binary restart files `, 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 ` command. It does not support the +These pair styles can only be used via the *pair* keyword of the +:doc:`run_style respa ` command. They do not support the *inner*\ , *middle*\ , *outer* keywords. diff --git a/doc/src/pair_coul_diel.rst b/doc/src/pair_coul_diel.rst index 3c6090d3f7..47b93387d3 100644 --- a/doc/src/pair_coul_diel.rst +++ b/doc/src/pair_coul_diel.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style coul/diel +.. index:: pair_style coul/diel -pair\_style coul/diel command -============================= +pair_style coul/diel command +============================ -pair\_style coul/diel/omp command -================================= +pair_style coul/diel/omp command +================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style coul/diel cutoff @@ -20,7 +20,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style coul/diel 3.5 pair_coeff 1 4 78. 1.375 0.112 @@ -38,16 +38,19 @@ interaction coul/long or coul/cut. The transition is modeled by a hyperbolic function which is incorporated in the Coulomb correction term for small ion separations as follows -.. image:: Eqs/pair_coul_diel.jpg - :align: center +.. math:: -where r\_me is the inflection point of epsilon\_D(r) and sigma\_e is a slope + E = & \frac{Cq_iq_j}{\epsilon r} \left( \frac{\epsilon}{\epsilon_D(r)}-1\right) \qquad r < r_c \\ + \epsilon_D(r) = & \frac{5.2+\epsilon}{2} + \frac{\epsilon-5.2}{2}\tanh\left(\frac{r-r_{me}}{\sigma_e}\right) + + +where :math:`r_{me}` is the inflection point of :math:`\epsilon_D(r)` and :math:`\sigma_e` is a slope defining length scale. C is the same Coulomb conversion factor as in the pair\_styles coul/cut, coul/long, and coul/debye. In this way the Coulomb interaction between ions is corrected at small distances r. The lower limit of epsilon\_D(r->0)=5.2 due to dielectric saturation :ref:`(Stiles) ` while the Coulomb interaction reaches its bulk limit by setting -epsilon\_D(r->\infty)=epsilon, the bulk value of the solvent which is 78 +:math:`\epsilon_D(r \to \infty) = \epsilon`, the bulk value of the solvent which is 78 for water at 298K. Examples of the use of this type of Coulomb interaction include implicit @@ -63,11 +66,11 @@ above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands: -* epsilon (no units) -* r\_me (distance units) -* sigma\_e (distance units) +* :math:`\epsilon` (no units) +* :math:`r_{me}` (distance units) +* :math:`\sigma_e` (distance units) -The global cutoff (r\_c) specified in the pair\_style command is used. +The global cutoff (:math:`r_c`) specified in the pair\_style command is used. ---------- diff --git a/doc/src/pair_coul_shield.rst b/doc/src/pair_coul_shield.rst index e0b010a1f8..97df7d4a13 100644 --- a/doc/src/pair_coul_shield.rst +++ b/doc/src/pair_coul_shield.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style coul/shield +.. index:: pair_style coul/shield -pair\_style coul/shield command -=============================== +pair_style coul/shield command +============================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style coul/shield cutoff tap_flag @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style coul/shield 16.0 1 pair_coeff 1 2 0.70 @@ -39,22 +39,29 @@ the pair style :doc:`ilp/graphene/hbn ` molecule id and is recommended to use the "full" atom style, so that charge and molecule ID information is included. -.. image:: Eqs/pair_coul_shield.jpg - :align: center +.. math:: -Where Tap(r\_ij) is the taper function which provides a continuous cutoff -(up to third derivative) for inter-atomic separations larger than r\_c + E = & \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\ + V_{ij} = & {\rm Tap}(r_{ij})\frac{\kappa q_i q_j}{\sqrt[3]{r_{ij}^3+(1/\lambda_{ij})^3}}\\ + {\rm Tap}(r_{ij}) = & 20\left ( \frac{r_{ij}}{R_{cut}} \right )^7 - + 70\left ( \frac{r_{ij}}{R_{cut}} \right )^6 + + 84\left ( \frac{r_{ij}}{R_{cut}} \right )^5 - + 35\left ( \frac{r_{ij}}{R_{cut}} \right )^4 + 1 + + +Where Tap(:math:`r_{ij}`) is the taper function which provides a continuous cutoff +(up to third derivative) for inter-atomic separations larger than :math:`r_c` :ref:`(Leven1) `, :ref:`(Leven2) ` and :ref:`(Maaravi) `. -Here *lambda* is the shielding parameter that +Here :math:`\lambda` is the shielding parameter that eliminates the short-range singularity of the classical mono-polar electrostatic interaction expression :ref:`(Maaravi) `. -The shielding parameter *lambda* (1/distance units) must be defined for +The shielding parameter :math:`\lambda` (1/distance units) must be defined for each pair of atom types via the :doc:`pair_coeff ` command as in the example above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands: -The global cutoff (r\_c) specified in the pair\_style command is used. +The global cutoff (:math:`r_c`) specified in the pair\_style command is used. ---------- diff --git a/doc/src/pair_cs.rst b/doc/src/pair_cs.rst index c71d88a38c..ebbbdcaeca 100644 --- a/doc/src/pair_cs.rst +++ b/doc/src/pair_cs.rst @@ -1,40 +1,40 @@ -.. index:: pair\_style born/coul/dsf/cs +.. index:: pair_style born/coul/dsf/cs -pair\_style born/coul/dsf/cs command +pair_style born/coul/dsf/cs command ==================================== -pair\_style born/coul/long/cs command +pair_style born/coul/long/cs command ===================================== -pair\_style born/coul/long/cs/gpu command +pair_style born/coul/long/cs/gpu command ========================================= -pair\_style born/coul/wolf/cs command +pair_style born/coul/wolf/cs command ===================================== -pair\_style born/coul/wolf/cs/gpu command +pair_style born/coul/wolf/cs/gpu command ========================================= -pair\_style buck/coul/long/cs command +pair_style buck/coul/long/cs command ===================================== -pair\_style coul/long/cs command +pair_style coul/long/cs command ================================ -pair\_style coul/long/cs/gpu command +pair_style coul/long/cs/gpu command ==================================== -pair\_style coul/wolf/cs command +pair_style coul/wolf/cs command ================================ -pair\_style lj/cut/coul/long/cs command +pair_style lj/cut/coul/long/cs command ======================================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -71,33 +71,33 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style born/coul/dsf/cs 0.1 10.0 12.0 - pair_coeff \* \* 0.0 1.00 0.00 0.00 0.00 + pair_coeff * * 0.0 1.00 0.00 0.00 0.00 pair_coeff 1 1 480.0 0.25 0.00 1.05 0.50 pair_style born/coul/long/cs 10.0 8.0 pair_coeff 1 1 6.08 0.317 2.340 24.18 11.51 pair_style born/coul/wolf/cs 0.25 10.0 12.0 - pair_coeff \* \* 0.0 1.00 0.00 0.00 0.00 + pair_coeff * * 0.0 1.00 0.00 0.00 0.00 pair_coeff 1 1 480.0 0.25 0.00 1.05 0.50 pair_style buck/coul/long/cs 10.0 pair_style buck/coul/long/cs 10.0 8.0 - pair_coeff \* \* 100.0 1.5 200.0 + pair_coeff * * 100.0 1.5 200.0 pair_coeff 1 1 100.0 1.5 200.0 9.0 pair_style coul/long/cs 10.0 - pair_coeff \* \* + pair_coeff * * pair_style coul/wolf/cs 0.2 9.0 - pair_coeff \* \* + pair_coeff * * pair_style lj/cut/coul/long/cs 10.0 pair_style lj/cut/coul/long/cs 10.0 8.0 - pair_coeff \* \* 100.0 3.0 + pair_coeff * * 100.0 3.0 pair_coeff 1 1 100.0 3.5 9.0 Description @@ -138,12 +138,14 @@ is used to calculate the correction factor is extended by a minimal distance (r\_min = 1.0-6) when the interaction between a core/shell pair is treated, as follows -.. image:: Eqs/pair_cs.jpg - :align: center +.. math:: -where C is an energy-conversion constant, Qi and Qj are the charges on -the core and shell, epsilon is the dielectric constant and r\_min is the -minimal distance. + E = \frac{C q_i q_j}{\epsilon (r + r_{min})} \qquad r \rightarrow 0 + + +where C is an energy-conversion constant, :math:`q_i` and :math:`q_j` +are the charges on the core and shell, epsilon is the dielectric +constant and :math:`r_{min}` is the minimal distance. For styles that are not used with a long-range solver, i.e. those with "/dsf" or "/wolf" in the name, the only correction is the addition of diff --git a/doc/src/pair_dipole.rst b/doc/src/pair_dipole.rst index 0550bc1604..6d685f27c3 100644 --- a/doc/src/pair_dipole.rst +++ b/doc/src/pair_dipole.rst @@ -1,37 +1,37 @@ -.. index:: pair\_style lj/cut/dipole/cut +.. index:: pair_style lj/cut/dipole/cut -pair\_style lj/cut/dipole/cut command -===================================== +pair_style lj/cut/dipole/cut command +==================================== -pair\_style lj/cut/dipole/cut/gpu command -========================================= +pair_style lj/cut/dipole/cut/gpu command +======================================== -pair\_style lj/cut/dipole/cut/omp command -========================================= +pair_style lj/cut/dipole/cut/omp command +======================================== -pair\_style lj/sf/dipole/sf command -=================================== +pair_style lj/sf/dipole/sf command +================================== -pair\_style lj/sf/dipole/sf/gpu command -======================================= - -pair\_style lj/sf/dipole/sf/omp command -======================================= - -pair\_style lj/cut/dipole/long command +pair_style lj/sf/dipole/sf/gpu command ====================================== -pair\_style lj/cut/dipole/long/gpu command -========================================== +pair_style lj/sf/dipole/sf/omp command +====================================== -pair\_style lj/long/dipole/long command -======================================= +pair_style lj/cut/dipole/long command +===================================== + +pair_style lj/cut/dipole/long/gpu command +========================================= + +pair_style lj/long/dipole/long command +====================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/cut/dipole/cut cutoff (cutoff2) pair_style lj/sf/dipole/sf cutoff (cutoff2) @@ -61,23 +61,23 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/cut/dipole/cut 10.0 - pair_coeff \* \* 1.0 1.0 + pair_coeff * * 1.0 1.0 pair_coeff 2 3 1.0 1.0 2.5 4.0 pair_style lj/sf/dipole/sf 9.0 - pair_coeff \* \* 1.0 1.0 + pair_coeff * * 1.0 1.0 pair_coeff 2 3 1.0 1.0 2.5 4.0 scale 0.5 pair_coeff 2 3 1.0 1.0 2.5 4.0 pair_style lj/cut/dipole/long 10.0 - pair_coeff \* \* 1.0 1.0 + pair_coeff * * 1.0 1.0 pair_coeff 2 3 1.0 1.0 2.5 4.0 pair_style lj/long/dipole/long long long 3.5 10.0 - pair_coeff \* \* 1.0 1.0 + pair_coeff * * 1.0 1.0 pair_coeff 2 3 1.0 1.0 2.5 4.0 Description @@ -90,19 +90,45 @@ charge-charge (Eqq), charge-dipole (Eqp), and dipole-dipole (Epp) interactions are computed by these formulas for the energy (E), force (F), and torque (T) between particles I and J. -.. image:: Eqs/pair_dipole.jpg - :align: center +.. math:: -where qi and qj are the charges on the two particles, pi and pj are -the dipole moment vectors of the two particles, r is their separation -distance, and the vector r = Ri - Rj is the separation vector between -the two particles. Note that Eqq and Fqq are simply Coulombic energy -and force, Fij = -Fji as symmetric forces, and Tij != -Tji since the -torques do not act symmetrically. These formulas are discussed in -:ref:`(Allen) ` and in :ref:`(Toukmaji) `. + E_{LJ} = & 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - + \left(\frac{\sigma}{r}\right)^6 \right] \\ + E_{qq} = & \frac{q_i q_j}{r} \\ + E_{qp} = & \frac{q}{r^3} (p \bullet \vec{r}) \\ + E_{pp} = & \frac{1}{r^3} (\vec{p_i} \bullet \vec{p_j}) - + \frac{3}{r^5} (\vec{p_i} \bullet \vec{r}) (\vec{p_j} \bullet \vec{r}) \\ + & \\ + F_{qq} = & \frac{q_i q_j}{r^3} \vec{r} \\ + F_{qp} = & -\frac{q}{r^3} \vec{p} + \frac{3q}{r^5} + (\vec{p} \bullet \vec{r}) \vec{r} \\ + F_{pp} = & \frac{3}{r^5} (\vec{p_i} \bullet \vec{p_j}) \vec{r} - + \frac{15}{r^7} (\vec{p_i} \bullet \vec{r}) + (\vec{p_j} \bullet \vec{r}) \vec{r} + + \frac{3}{r^5} \left[ (\vec{p_j} \bullet \vec{r}) \vec{p_i} + + (\vec{p_i} \bullet \vec{r}) \vec{p_j} \right] \\ + & \\ + T_{pq} = T_{ij} = & \frac{q_j}{r^3} (\vec{p_i} \times \vec{r}) \\ + T_{qp} = T_{ji} = & - \frac{q_i}{r^3} (\vec{p_j} \times \vec{r}) \\ + T_{pp} = T_{ij} = & -\frac{1}{r^3} (\vec{p_i} \times \vec{p_j}) + + \frac{3}{r^5} (\vec{p_j} \bullet \vec{r}) + (\vec{p_i} \times \vec{r}) \\ + T_{pp} = T_{ji} = & -\frac{1}{r^3} (\vec{p_j} \times \vec{p_i}) + + \frac{3}{r^5} (\vec{p_i} \bullet \vec{r}) + (\vec{p_j} \times \vec{r}) + + +where :math:`q_i` and :math:`q_j` are the charges on the two particles, +:math:`\vec{p_i}` and :math:`\vec{p_j}` are the dipole moment vectors of +the two particles, r is their separation distance, and the vector r = +Ri - Rj is the separation vector between the two particles. Note that +Eqq and Fqq are simply Coulombic energy and force, Fij = -Fji as +symmetric forces, and Tij != -Tji since the torques do not act +symmetrically. These formulas are discussed in :ref:`(Allen) ` +and in :ref:`(Toukmaji) `. Also note, that in the code, all of these terms (except Elj) have a -C/epsilon prefactor, the same as the Coulombic term in the LJ + +:math:`C/\epsilon` prefactor, the same as the Coulombic term in the LJ + Coulombic pair styles discussed :doc:`here `. C is an energy-conversion constant and epsilon is the dielectric constant which can be set by the :doc:`dielectric ` command. The @@ -121,26 +147,85 @@ charge-dipole (Eqp), dipole-charge (Epq) and dipole-dipole (Epp) potentials are computed by these formulas for the energy (E), force (F), and torque (T) between particles I and J: -.. image:: Eqs/pair_dipole_sf.jpg - :align: center +.. math:: -.. image:: Eqs/pair_dipole_sf2.jpg - :align: center + E_{LJ} = & 4\epsilon \left\{ \left[ \left( \frac{\sigma}{r} \right)^{\!12} - + \left( \frac{\sigma}{r} \right)^{\!6} \right] + + \left[ 6\left( \frac{\sigma}{r_c} \right)^{\!12} - + 3\left(\frac{\sigma}{r_c}\right)^{\!6}\right]\left(\frac{r}{r_c}\right)^{\!2} + - 7\left( \frac{\sigma}{r_c} \right)^{\!12} + + 4\left( \frac{\sigma}{r_c} \right)^{\!6}\right\} \\ + E_{qq} = & \frac{q_i q_j}{r}\left(1-\frac{r}{r_c}\right)^{\!2} \\ + E_{pq} = & E_{ji} = -\frac{q}{r^3} \left[ 1 - + 3\left(\frac{r}{r_c}\right)^{\!2} + + 2\left(\frac{r}{r_c}\right)^{\!3}\right] (\vec{p}\bullet\vec{r}) \\ + E_{qp} = & E_{ij} = \frac{q}{r^3} \left[ 1 - + 3\left(\frac{r}{r_c}\right)^{\!2} + + 2\left(\frac{r}{r_c}\right)^{\!3}\right] (\vec{p}\bullet\vec{r}) \\ + E_{pp} = & \left[1-4\left(\frac{r}{r_c}\right)^{\!3} + + 3\left(\frac{r}{r_c}\right)^{\!4}\right]\left[\frac{1}{r^3} + (\vec{p_i} \bullet \vec{p_j}) - \frac{3}{r^5} + (\vec{p_i} \bullet \vec{r}) (\vec{p_j} \bullet \vec{r})\right] \\ + & \\ + + F_{LJ} = & \left\{\left[48\epsilon \left(\frac{\sigma}{r}\right)^{\!12} - + 24\epsilon \left(\frac{\sigma}{r}\right)^{\!6} \right]\frac{1}{r^2} - + \left[48\epsilon \left(\frac{\sigma}{r_c}\right)^{\!12} - 24\epsilon + \left(\frac{\sigma}{r_c}\right)^{\!6} \right]\frac{1}{r_c^2}\right\}\vec{r}\\ + F_{qq} = & \frac{q_i q_j}{r}\left(\frac{1}{r^2} - + \frac{1}{r_c^2}\right)\vec{r} \\ + F_{pq} = & F_{ij } = -\frac{3q}{r^5} \left[ 1 - + \left(\frac{r}{r_c}\right)^{\!2}\right](\vec{p}\bullet\vec{r})\vec{r} + + \frac{q}{r^3}\left[1-3\left(\frac{r}{r_c}\right)^{\!2} + + 2\left(\frac{r}{r_c}\right)^{\!3}\right] \vec{p} \\ + F_{qp} = & F_{ij} = \frac{3q}{r^5} \left[ 1 - + \left(\frac{r}{r_c}\right)^{\!2}\right] (\vec{p}\bullet\vec{r})\vec{r} - + \frac{q}{r^3}\left[1-3\left(\frac{r}{r_c}\right)^{\!2} + + 2\left(\frac{r}{r_c}\right)^{\!3}\right] \vec{p} \\ + F_{pp} = &\frac{3}{r^5}\Bigg\{\left[1-\left(\frac{r}{r_c}\right)^{\!4}\right] + \left[(\vec{p_i}\bullet\vec{p_j}) - \frac{3}{r^2} (\vec{p_i}\bullet\vec{r}) + (\vec{p_j} \bullet \vec{r})\right] \vec{r} + \\ + & \left[1 - + 4\left(\frac{r}{r_c}\right)^{\!3}+3\left(\frac{r}{r_c}\right)^{\!4}\right] + \left[ (\vec{p_j} \bullet \vec{r}) \vec{p_i} + (\vec{p_i} \bullet \vec{r}) + \vec{p_j} -\frac{2}{r^2} (\vec{p_i} \bullet \vec{r}) + (\vec{p_j} \bullet \vec{r})\vec{r}\right] \Bigg\} -where epsilon and sigma are the standard LJ parameters, r\_c is the -cutoff, qi and qj are the charges on the two particles, pi and pj are -the dipole moment vectors of the two particles, r is their separation -distance, and the vector r = Ri - Rj is the separation vector between -the two particles. Note that Eqq and Fqq are simply Coulombic energy -and force, Fij = -Fji as symmetric forces, and Tij != -Tji since the -torques do not act symmetrically. The shifted-force formula for the -Lennard-Jones potential is reported in :ref:`(Stoddard) `. The -original (non-shifted) formulas for the electrostatic potentials, -forces and torques can be found in :ref:`(Price) `. The shifted-force -electrostatic potentials have been obtained by applying equation 5.13 -of :ref:`(Allen) `. The formulas for the corresponding forces and -torques have been obtained by applying the 'chain rule' as in appendix -C.3 of :ref:`(Allen) `. +.. math:: + + T_{pq} = T_{ij} = & \frac{q_j}{r^3} \left[ 1 - + 3\left(\frac{r}{r_c}\right)^{\!2} + + 2\left(\frac{r}{r_c}\right)^{\!3}\right] (\vec{p_i}\times\vec{r}) \\ + T_{qp} = T_{ji} = & - \frac{q_i}{r^3} \left[ 1 - + 3\left(\frac{r}{r_c}\right)^{\!2} + + 2\left(\frac{r}{r_c}\right)^{\!3} \right] (\vec{p_j}\times\vec{r}) \\ + T_{pp} = T_{ij} = & -\frac{1}{r^3}\left[1-4\left(\frac{r}{r_c}\right)^{\!3} + + e3\left(\frac{r}{r_c}\right)^{\!4}\right] (\vec{p_i} \times \vec{p_j}) + \\ + & \frac{3}{r^5}\left[1-4\left(\frac{r}{r_c}\right)^{\!3} + + 3\left(\frac{r}{r_c}\right)^{\!4}\right] (\vec{p_j}\bullet\vec{r}) + (\vec{p_i} \times \vec{r}) \\ + T_{pp} = T_{ji} = & -\frac{1}{r^3}\left[1-4\left(\frac{r}{r_c}\right)^{\!3} + + 3\left(\frac{r}{r_c}\right)^{\!4}\right](\vec{p_j} \times \vec{p_i}) + \\ + & \frac{3}{r^5}\left[1-4\left(\frac{r}{r_c}\right)^{\!3} + + 3\left(\frac{r}{r_c}\right)^{\!4}\right] (\vec{p_i} \bullet \vec{r}) + (\vec{p_j} \times \vec{r}) + + +where :math:`\epsilon` and :math:`\sigma` are the standard LJ +parameters, :math:`r_c` is the cutoff, :math:`q_i` and :math:`q_j` are +the charges on the two particles, :math:`\vec{p_i}` and +:math:`\vec{p_j}` are the dipole moment vectors of the two particles, r +is their separation distance, and the vector r = Ri - Rj is the +separation vector between the two particles. Note that Eqq and Fqq are +simply Coulombic energy and force, Fij = -Fji as symmetric forces, and +Tij != -Tji since the torques do not act symmetrically. The +shifted-force formula for the Lennard-Jones potential is reported in +:ref:`(Stoddard) `. The original (non-shifted) formulas for +the electrostatic potentials, forces and torques can be found in +:ref:`(Price) `. The shifted-force electrostatic potentials have +been obtained by applying equation 5.13 of :ref:`(Allen) `. The +formulas for the corresponding forces and torques have been obtained by +applying the 'chain rule' as in appendix C.3 of :ref:`(Allen) `. If one cutoff is specified in the pair\_style command, it is used for both the LJ and Coulombic (q,p) terms. If two cutoffs are specified, @@ -195,8 +280,8 @@ above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands, or by mixing as described below: -* epsilon (energy units) -* sigma (distance units) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) * cutoff1 (distance units) * cutoff2 (distance units) diff --git a/doc/src/pair_dpd.rst b/doc/src/pair_dpd.rst index fde0463f14..a827627870 100644 --- a/doc/src/pair_dpd.rst +++ b/doc/src/pair_dpd.rst @@ -1,31 +1,31 @@ -.. index:: pair\_style dpd +.. index:: pair_style dpd -pair\_style dpd command -======================= +pair_style dpd command +====================== -pair\_style dpd/gpu command -=========================== +pair_style dpd/gpu command +========================== -pair\_style dpd/intel command -============================= +pair_style dpd/intel command +============================ -pair\_style dpd/omp command -=========================== +pair_style dpd/omp command +========================== -pair\_style dpd/tstat command -============================= +pair_style dpd/tstat command +============================ -pair\_style dpd/tstat/gpu command -================================= +pair_style dpd/tstat/gpu command +================================ -pair\_style dpd/tstat/omp command -================================= +pair_style dpd/tstat/omp command +================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style dpd T cutoff seed pair_style dpd/tstat Tstart Tstop cutoff seed @@ -39,14 +39,14 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style dpd 1.0 2.5 34387 - pair_coeff \* \* 3.0 1.0 + pair_coeff * * 3.0 1.0 pair_coeff 1 1 3.0 1.0 1.0 pair_style dpd/tstat 1.0 1.0 2.5 34387 - pair_coeff \* \* 1.0 + pair_coeff * * 1.0 pair_coeff 1 1 1.0 1.0 Description @@ -67,17 +67,25 @@ pair interaction and the thermostat for each pair of particles. For style *dpd*\ , the force on atom I due to atom J is given as a sum of 3 terms -.. image:: Eqs/pair_dpd.jpg - :align: center +.. math:: -where Fc is a conservative force, Fd is a dissipative force, and Fr is -a random force. Rij is a unit vector in the direction Ri - Rj, Vij is -the vector difference in velocities of the two atoms = Vi - Vj, alpha -is a Gaussian random number with zero mean and unit variance, dt is -the timestep size, and w(r) is a weighting factor that varies between -0 and 1. Rc is the cutoff. Sigma is set equal to sqrt(2 Kb T gamma), -where Kb is the Boltzmann constant and T is the temperature parameter -in the pair\_style command. + \vec{f} = & (F^C + F^D + F^R) \hat{r_{ij}} \qquad \qquad r < r_c \\ + F^C = & A w(r) \\ + F^D = & - \gamma w^2(r) (\hat{r_{ij}} \bullet \vec{v_{ij}}) \\ + F^R = & \sigma w(r) \alpha (\Delta t)^{-1/2} \\ + w(r) = & 1 - r/r_c + + +where :math:`F^C` is a conservative force, :math:`F^D` is a dissipative +force, and :math:`F^R` is a random force. :math:`r_{ij}` is a unit +vector in the direction :math:`r_i - r_j`, :math:`V_{ij} is the vector +difference in velocities of the two atoms :math:`= \vec{v}_i - +\vec{v}_j, :math:`\alpha` is a Gaussian random number with zero mean and +unit variance, dt is the timestep size, and w(r) is a weighting factor +that varies between 0 and 1. :math:`r_c` is the cutoff. :math:`\sigma` +is set equal to :math:`\sqrt{2 k_B T \gamma}`, where :math:`k_B` is the +Boltzmann constant and T is the temperature parameter in the pair\_style +command. For style *dpd/tstat*\ , the force on atom I due to atom J is the same as the above equation, except that the conservative Fc term is @@ -97,7 +105,7 @@ the examples above, or in the data file or restart files read by the commands: * A (force units) -* gamma (force/velocity units) +* :math:`\gamma` (force/velocity units) * cutoff (distance units) The last coefficient is optional. If not specified, the global DPD @@ -125,7 +133,6 @@ the work of :ref:`(Afshar) ` and :ref:`(Phillips) `. includes all the components of force listed above, including the random force. - ---------- diff --git a/doc/src/pair_dpd_fdt.rst b/doc/src/pair_dpd_fdt.rst index c893f68a1c..fecd602c50 100644 --- a/doc/src/pair_dpd_fdt.rst +++ b/doc/src/pair_dpd_fdt.rst @@ -1,19 +1,19 @@ -.. index:: pair\_style dpd/fdt +.. index:: pair_style dpd/fdt -pair\_style dpd/fdt command -=========================== +pair_style dpd/fdt command +========================== -pair\_style dpd/fdt/energy command -================================== +pair_style dpd/fdt/energy command +================================= -pair\_style dpd/fdt/energy/kk command -===================================== +pair_style dpd/fdt/energy/kk command +==================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -35,13 +35,13 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style dpd/fdt 300.0 2.5 34387 - pair_coeff \* \* 3.0 1.0 2.5 + pair_coeff * * 3.0 1.0 2.5 pair_style dpd/fdt/energy 2.5 34387 - pair_coeff \* \* 3.0 1.0 0.1 2.5 + pair_coeff * * 3.0 1.0 0.1 2.5 Description """"""""""" @@ -54,25 +54,34 @@ under isoenergetic and isoenthalpic conditions (see :ref:`(Lisal) `). For DPD simulations in general, the force on atom I due to atom J is given as a sum of 3 terms -.. image:: Eqs/pair_dpd.jpg - :align: center +.. math:: -where Fc is a conservative force, Fd is a dissipative force, and Fr is -a random force. Rij is a unit vector in the direction Ri - Rj, Vij is -the vector difference in velocities of the two atoms = Vi - Vj, alpha -is a Gaussian random number with zero mean and unit variance, dt is -the timestep size, and w(r) is a weighting factor that varies between -0 and 1. Rc is the cutoff. The weighting factor, omega\_ij, varies -between 0 and 1, and is chosen to have the following functional form: + \vec{f} = & (F^C + F^D + F^R) \hat{r_{ij}} \qquad \qquad r < r_c \\ + F^C = & A w(r) \\ + F^D = & - \gamma w^2(r) (\hat{r_{ij}} \bullet \vec{v_{ij}}) \\ + F^R = & \sigma w(r) \alpha (\Delta t)^{-1/2} \\ + w(r) = & 1 - r/r_c -.. image:: Eqs/pair_dpd_omega.jpg - :align: center + +where :math:`F^C` is a conservative force, :math:`F^D` is a dissipative +force, and :math:`F^R` is a random force. :math:`r_{ij}` is a unit +vector in the direction :math:`r_i - r_j`, :math:`V_{ij} is the vector +difference in velocities of the two atoms :math:`= \vec{v}_i - +\vec{v}_j, :math:`\alpha` is a Gaussian random number with zero mean and +unit variance, dt is the timestep size, and w(r) is a weighting factor +that varies between 0 and 1. Rc is the cutoff. The weighting factor, +:math:`\omega_{ij}`, varies between 0 and 1, and is chosen to have the +following functional form: + +.. math:: + + \omega_{ij} = 1 - \frac{r_{ij}}{r_{c}} Note that alternative definitions of the weighting function exist, but would have to be implemented as a separate pair style command. -For style *dpd/fdt*\ , the fluctuation-dissipation theorem defines gamma -to be set equal to sigma\*sigma/(2 T), where T is the set point +For style *dpd/fdt*\ , the fluctuation-dissipation theorem defines :math:`\gamma` +to be set equal to :math:`\sigma^2/(2 T)`, where T is the set point temperature specified as a pair style parameter in the above examples. The following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples above, @@ -80,33 +89,42 @@ or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands: * A (force units) -* sigma (force\*time\^(1/2) units) +* :math:`\sigma` (force\*time\^(1/2) units) * cutoff (distance units) The last coefficient is optional. If not specified, the global DPD cutoff is used. -Style *dpd/fdt/energy* is used to perform DPD simulations -under isoenergetic and isoenthalpic conditions. The fluctuation-dissipation -theorem defines gamma to be set equal to sigma\*sigma/(2 dpdTheta), where -dpdTheta is the average internal temperature for the pair. The particle -internal temperature is related to the particle internal energy through -a mesoparticle equation of state (see :doc:`fix eos `). The -differential internal conductive and mechanical energies are computed -within style *dpd/fdt/energy* as: +Style *dpd/fdt/energy* is used to perform DPD simulations under +isoenergetic and isoenthalpic conditions. The fluctuation-dissipation +theorem defines :math:`\gamma` to be set equal to :math:`sigma^2/(2 +\theta)`, where :math:theta` is the average internal temperature for the +pair. The particle internal temperature is related to the particle +internal energy through a mesoparticle equation of state (see :doc:`fix +eos `). The differential internal conductive and mechanical +energies are computed within style *dpd/fdt/energy* as: + +.. math:: + + du_{i}^{cond} = & \kappa_{ij}(\frac{1}{\theta_{i}}-\frac{1}{\theta_{j}})\omega_{ij}^{2} + \alpha_{ij}\omega_{ij}\zeta_{ij}^{q}(\Delta{t})^{-1/2} \\ + du_{i}^{mech} = & -\frac{1}{2}\gamma_{ij}\omega_{ij}^{2}(\frac{\vec{r_{ij}}}{r_{ij}}\bullet\vec{v_{ij}})^{2} - + \frac{\sigma^{2}_{ij}}{4}(\frac{1}{m_{i}}+\frac{1}{m_{j}})\omega_{ij}^{2} - + \frac{1}{2}\sigma_{ij}\omega_{ij}(\frac{\vec{r_{ij}}}{r_{ij}}\bullet\vec{v_{ij}})\zeta_{ij}(\Delta{t})^{-1/2} -.. image:: Eqs/pair_dpd_energy.jpg - :align: center where -.. image:: Eqs/pair_dpd_energy_terms.jpg - :align: center +.. math:: -Zeta\_ij\^q is a second Gaussian random number with zero mean and unit + \alpha_{ij}^{2} = & 2k_{B}\kappa_{ij} \\ + \sigma^{2}_{ij} = & 2\gamma_{ij}k_{B}\Theta_{ij} \\ + \Theta_{ij}^{-1} = & \frac{1}{2}(\frac{1}{\theta_{i}}+\frac{1}{\theta_{j}}) + + +:math:`\zeta_ij^q` is a second Gaussian random number with zero mean and unit variance that is used to compute the internal conductive energy. The -fluctuation-dissipation theorem defines alpha\*alpha to be set -equal to 2\*kB\*kappa, where kappa is the mesoparticle thermal +fluctuation-dissipation theorem defines :math:`alpha^2` to be set +equal to :math:2k_B\kappa`, where :math:`\kappa` is the mesoparticle thermal conductivity parameter. The following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples above, or in the data file or restart files @@ -114,8 +132,8 @@ read by the :doc:`read_data ` or :doc:`read_restart ` commands: * A (force units) -* sigma (force\*time\^(1/2) units) -* kappa (energy\*temperature/time units) +* :math:`\sigma` (force\*time\^(1/2) units) +* :math:`\kappa` (energy\*temperature/time units) * cutoff (distance units) The last coefficient is optional. If not specified, the global DPD diff --git a/doc/src/pair_drip.rst b/doc/src/pair_drip.rst index ca04efcece..e2dc88648f 100644 --- a/doc/src/pair_drip.rst +++ b/doc/src/pair_drip.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style drip +.. index:: pair_style drip -pair\_style drip command -======================== +pair_style drip command +======================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid/overlay drip [styles ...] @@ -17,19 +17,19 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid/overlay drip - pair_coeff \* \* none - pair_coeff \* \* drip C.drip C + pair_coeff * * none + pair_coeff * * drip C.drip C pair_style hybrid/overlay drip rebo - pair_coeff \* \* drip C.drip C - pair_coeff \* \* rebo CH.airebo C + pair_coeff * * drip C.drip C + pair_coeff * * rebo CH.airebo C pair_style hybrid/overlay drip rebo - pair_coeff \* \* drip C.drip C NULL - pair_coeff \* \* rebo CH.airebo C H + pair_coeff * * drip C.drip C NULL + pair_coeff * * rebo CH.airebo C H Description """"""""""" @@ -40,10 +40,13 @@ in :ref:`(Wen) `, which is based on the :ref:`(Kolmogorov) `. -.. image:: Eqs/e3b.jpg - :align: center +.. math:: + + E =& E_2 \sum_{i,j}e^{-k_2 r_{ij}} + E_A \sum_{\substack{i,j,k,\ell \\ + \in \textrm{type A}}} f(r_{ij})f(r_{k\ell}) + E_B \sum_{\substack{i,j,k,\ell \\ + \in \textrm{type B}}} f(r_{ij})f(r_{k\ell}) + E_C \sum_{\substack{i,j,k,\ell \\ + \in \textrm{type C}}} f(r_{ij})f(r_{k\ell}) \\ + f(r) =& e^{-k_3 r}s(r) \\ + s(r) =& \begin{cases} + 1 & rR_f\\ + \end{cases} + This potential was developed as a water model that includes the three-body cooperativity of hydrogen bonding explicitly. To use it in this way, it must be applied in conjunction with a conventional two-body water model, through *pair\_style hybrid/overlay*. @@ -103,7 +114,7 @@ If the neigh setting is too large, the pair style will use more memory than nece This pair style tallies a breakdown of the total E3B potential energy into sub-categories, which can be accessed via the :doc:`compute pair ` command as a vector of values of length 4. The 4 values correspond to the terms in the first equation above: the E2 term, the Ea term, the Eb term, and the Ec term. -See the examples/USER/e3b directory for a complete example script. +See the examples/USER/misc/e3b directory for a complete example script. ---------- diff --git a/doc/src/pair_eam.rst b/doc/src/pair_eam.rst index d3356007cd..82da121a79 100644 --- a/doc/src/pair_eam.rst +++ b/doc/src/pair_eam.rst @@ -1,76 +1,76 @@ -.. index:: pair\_style eam +.. index:: pair_style eam -pair\_style eam command -======================= +pair_style eam command +====================== -pair\_style eam/gpu command -=========================== - -pair\_style eam/intel command -============================= - -pair\_style eam/kk command +pair_style eam/gpu command ========================== -pair\_style eam/omp command -=========================== +pair_style eam/intel command +============================ -pair\_style eam/opt command -=========================== +pair_style eam/kk command +========================= -pair\_style eam/alloy command -============================= +pair_style eam/omp command +========================== -pair\_style eam/alloy/gpu command -================================= +pair_style eam/opt command +========================== -pair\_style eam/alloy/intel command -=================================== +pair_style eam/alloy command +============================ -pair\_style eam/alloy/kk command +pair_style eam/alloy/gpu command ================================ -pair\_style eam/alloy/omp command -================================= - -pair\_style eam/alloy/opt command -================================= - -pair\_style eam/cd command -========================== - -pair\_style eam/cd/omp command -============================== - -pair\_style eam/cd/old command -============================== - -pair\_style eam/cd/old/omp command +pair_style eam/alloy/intel command ================================== -pair\_style eam/fs command -========================== +pair_style eam/alloy/kk command +=============================== -pair\_style eam/fs/gpu command -============================== - -pair\_style eam/fs/intel command +pair_style eam/alloy/omp command ================================ -pair\_style eam/fs/kk command +pair_style eam/alloy/opt command +================================ + +pair_style eam/cd command +========================= + +pair_style eam/cd/omp command ============================= -pair\_style eam/fs/omp command -============================== +pair_style eam/cd/old command +============================= -pair\_style eam/fs/opt command -============================== +pair_style eam/cd/old/omp command +================================= + +pair_style eam/fs command +========================= + +pair_style eam/fs/gpu command +============================= + +pair_style eam/fs/intel command +=============================== + +pair_style eam/fs/kk command +============================ + +pair_style eam/fs/omp command +============================= + +pair_style eam/fs/opt command +============================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style @@ -80,20 +80,20 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style eam - pair_coeff \* \* cuu3 - pair_coeff 1\*3 1\*3 niu3.eam + pair_coeff * * cuu3 + pair_coeff 1*3 1\*3 niu3.eam pair_style eam/alloy - pair_coeff \* \* ../potentials/NiAlH_jea.eam.alloy Ni Al Ni Ni + pair_coeff * * ../potentials/NiAlH_jea.eam.alloy Ni Al Ni Ni pair_style eam/cd - pair_coeff \* \* ../potentials/FeCr.cdeam Fe Cr + pair_coeff * * ../potentials/FeCr.cdeam Fe Cr pair_style eam/fs - pair_coeff \* \* NiAlH_jea.eam.fs Ni Al Ni Ni + pair_coeff * * NiAlH_jea.eam.fs Ni Al Ni Ni Description """"""""""" @@ -102,8 +102,11 @@ Style *eam* computes pairwise interactions for metals and metal alloys using embedded-atom method (EAM) potentials :ref:`(Daw) `. The total energy Ei of an atom I is given by -.. image:: Eqs/pair_eam.jpg - :align: center +.. math:: + + E_i = F_\alpha \left(\sum_{j \neq i}\ \rho_\beta (r_{ij})\right) + + \frac{1}{2} \sum_{j \neq i} \phi_{\alpha\beta} (r_{ij}) + where F is the embedding energy which is a function of the atomic electron density rho, phi is a pair potential interaction, and alpha @@ -179,9 +182,9 @@ single argument: Thus the following command -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \*2 1\*2 cuu3.eam + pair_coeff *2 1*2 cuu3.eam will read the cuu3 potential file and use the tabulated Cu values for F, phi, rho that it contains for type pairs 1,1 and 2,2 (type pairs @@ -230,9 +233,9 @@ by LAMMPS to compute the pair potential term in the EAM energy expression as r\*phi, in units of eV-Angstroms, via the formula -.. parsed-literal:: +.. math:: - r\*phi = 27.2 \* 0.529 \* Zi \* Zj + r \cdot \phi = 27.2 \cdot 0.529 \cdot Z_i \cdot Z_j where 1 Hartree = 27.2 eV and 1 Bohr = 0.529 Angstroms. @@ -274,9 +277,9 @@ be Ni, and the 4th to be Al, you would use the following pair\_coeff command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* NiAlH_jea.eam.alloy Ni Ni Ni Al + pair_coeff * * NiAlH_jea.eam.alloy Ni Ni Ni Al The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Ni arguments map LAMMPS atom types 1,2,3 to the Ni @@ -371,8 +374,12 @@ alloys using a generalized form of EAM potentials due to Finnis and Sinclair :ref:`(Finnis) `. The total energy Ei of an atom I is given by -.. image:: Eqs/pair_eam_fs.jpg - :align: center +.. math:: + + E_i = F_\alpha \left(\sum_{j \neq i}\ + \rho_{\alpha\beta} (r_{ij})\right) + + \frac{1}{2} \sum_{j \neq i} \phi_{\alpha\beta} (r_{ij}) + This has the same form as the EAM formula above, except that rho is now a functional specific to the atomic types of both atoms I and J, @@ -395,9 +402,9 @@ For style *eam/fs*\ , the form of the pair\_coeff command is exactly the same as for style *eam/alloy*\ , e.g. -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* NiAlH_jea.eam.fs Ni Ni Ni Al + pair_coeff * * NiAlH_jea.eam.fs Ni Ni Ni Al where there are N additional arguments after the filename, where N is the number of LAMMPS atom types. See the :doc:`pair_coeff ` diff --git a/doc/src/pair_edip.rst b/doc/src/pair_edip.rst index 6cc388b3cc..5a054621ef 100644 --- a/doc/src/pair_edip.rst +++ b/doc/src/pair_edip.rst @@ -1,19 +1,19 @@ -.. index:: pair\_style edip +.. index:: pair_style edip -pair\_style edip command -======================== +pair_style edip command +======================= -pair\_style edip/omp command -============================ +pair_style edip/omp command +=========================== -pair\_style edip/multi command -============================== +pair_style edip/multi command +============================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style @@ -22,8 +22,10 @@ Syntax Examples """""""" -pair\_style edip -pair\_coeff \* \* Si.edip Si +.. code-block:: LAMMPS + + pair_style edip + pair_coeff * * Si.edip Si Description """"""""""" @@ -37,15 +39,27 @@ potentials, while *edip/multi* supports multi-element EDIP runs. In EDIP, the energy E of a system of atoms is -.. image:: Eqs/pair_edip.jpg - :align: center +.. math:: -where phi2 is a two-body term and phi3 is a three-body term. The -summations in the formula are over all neighbors J and K of atom I -within a cutoff distance = a. -Both terms depend on the local environment of atom I through its -effective coordination number defined by Z, which is unity for a -cutoff distance < c and gently goes to 0 at distance = a. + E = & \sum_{j \ne i} \phi_{2}(R_{ij}, Z_{i}) + \sum_{j \ne i} \sum_{k \ne i,k > j} \phi_{3}(R_{ij}, R_{ik}, Z_{i}) \\ + \phi_{2}(r, Z) = & A\left[\left(\frac{B}{r}\right)^{\rho} - e^{-\beta Z^2}\right]exp{\left(\frac{\sigma}{r-a}\right)} \\ + \phi_{3}(R_{ij}, R_{ik}, Z_i) = & exp{\left(\frac{\gamma}{R_{ij}-a}\right)}exp{\left(\frac{\gamma}{R_{ik}-a}\right)}h(cos\theta_{ijk},Z_i) \\ + Z_i = & \sum_{m \ne i} f(R_{im}) \qquad + f(r) = \begin{cases} + 1 & \quad ra + \end{cases} \\ + h(l,Z) = & \lambda [(1-e^{-Q(Z)(l+\tau(Z))^2}) + \eta Q(Z)(l+\tau(Z))^2 ] \\ + Q(Z) = & Q_0 e^{-\mu Z} \qquad \tau(Z) = u_1 + u_2 (u_3 e^{-u_4 Z} - e^{-2u_4 Z}) + + +where :math:`\phi_2` is a two-body term and :math:`\phi_3` is a +three-body term. The summations in the formula are over all neighbors J +and K of atom I within a cutoff distance = a. Both terms depend on the +local environment of atom I through its effective coordination number +defined by Z, which is unity for a cutoff distance < c and gently goes +to 0 at distance = a. Only a single pair\_coeff command is used with the *edip* style which specifies a EDIP potential file with parameters for all diff --git a/doc/src/pair_eff.rst b/doc/src/pair_eff.rst index fc4c5f0964..9a902054da 100644 --- a/doc/src/pair_eff.rst +++ b/doc/src/pair_eff.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style eff/cut +.. index:: pair_style eff/cut -pair\_style eff/cut command -=========================== +pair_style eff/cut command +========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style eff/cut cutoff keyword args ... @@ -29,13 +29,13 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style eff/cut 39.7 pair_style eff/cut 40.0 limit/eradius pair_style eff/cut 40.0 limit/eradius pressure/evirials pair_style eff/cut 40.0 ecp 1 Si 3 C - pair_coeff \* \* + pair_coeff * * pair_coeff 2 2 20.0 pair_coeff 1 s 0.320852 2.283269 0.814857 pair_coeff 3 p 22.721015 0.728733 1.103199 17.695345 6.693621 @@ -98,25 +98,19 @@ and the quantum-derived Pauli (E\_PR) and Kinetic energy interactions potentials between electrons (E\_KE) for a total energy expression given as, -.. image:: Eqs/eff_energy_expression.jpg - :align: center +.. math:: + + U\left(R,r,s\right) = E_{NN} \left( R \right) + E_{Ne} \left( {R,r,s} \right) + E_{ee} \left( {r,s} \right) + E_{KE} \left( {r,s} \right) + E_{PR} \left( { \uparrow \downarrow ,S} \right) The individual terms are defined as follows: -.. image:: Eqs/eff_KE.jpg - :align: center +.. math:: -.. image:: Eqs/eff_NN.jpg - :align: center - -.. image:: Eqs/eff_Ne.jpg - :align: center - -.. image:: Eqs/eff_ee.jpg - :align: center - -.. image:: Eqs/eff_Pauli.jpg - :align: center + E_{KE} = & \frac{\hbar^2 }{{m_{e} }}\sum\limits_i {\frac{3}{{2s_i^2 }}} \\ + E_{NN} = & \frac{1}{{4\pi \varepsilon _0 }}\sum\limits_{i < j} {\frac{{Z_i Z_j }}{{R_{ij} }}} \\ + E_{Ne} = & - \frac{1}{{4\pi \varepsilon _0 }}\sum\limits_{i,j} {\frac{{Z_i }}{{R_{ij} }}Erf\left( {\frac{{\sqrt 2 R_{ij} }}{{s_j }}} \right)} \\ + E_{ee} = & \frac{1}{{4\pi \varepsilon _0 }}\sum\limits_{i < j} {\frac{1}{{r_{ij} }}Erf\left( {\frac{{\sqrt 2 r_{ij} }}{{\sqrt {s_i^2 + s_j^2 } }}} \right)} \\ + E_{Pauli} = & \sum\limits_{\sigma _i = \sigma _j } {E\left( { \uparrow \uparrow } \right)_{ij}} + \sum\limits_{\sigma _i \ne \sigma _j } {E\left( { \uparrow \downarrow } \right)_{ij}} \\ where, s\_i correspond to the electron sizes, the sigmas i's to the fixed spins of the electrons, Z\_i to the charges on the nuclei, R\_ij @@ -229,11 +223,10 @@ representations, after the "ecp" keyword. Si. The ECP captures the orbital overlap between the core and valence electrons (i.e. Pauli repulsion) with one of the functional forms: -.. image:: Eqs/eff_ECP1.jpg - :align: center +.. math:: -.. image:: Eqs/eff_ECP2.jpg - :align: center + E_{Pauli(ECP_s)} = & p_1\exp\left(-\frac{p_2r^2}{p_3+s^2} \right) \\ + E_{Pauli(ECP_p)} = & p_1\left( \frac{2}{p_2/s+s/p_2} \right)\left( r-p_3s\right)^2\exp \left[ -\frac{p_4\left( r-p_3s \right)^2}{p_5+s^2} \right] Where the 1st form correspond to core interactions with s-type valence electrons and the 2nd to core interactions with p-type valence diff --git a/doc/src/pair_eim.rst b/doc/src/pair_eim.rst index 133a81c0dc..a3fee3fb96 100644 --- a/doc/src/pair_eim.rst +++ b/doc/src/pair_eim.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style eim +.. index:: pair_style eim -pair\_style eim command -======================= +pair_style eim command +====================== -pair\_style eim/omp command -=========================== +pair_style eim/omp command +========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style @@ -20,12 +20,12 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style eim - pair_coeff \* \* Na Cl ../potentials/ffield.eim Na Cl - pair_coeff \* \* Na Cl ffield.eim Na Na Na Cl - pair_coeff \* \* Na Cl ../potentials/ffield.eim Cl NULL Na + pair_coeff * * Na Cl ../potentials/ffield.eim Na Cl + pair_coeff * * Na Cl ffield.eim Na Na Na Cl + pair_coeff * * Na Cl ../potentials/ffield.eim Cl NULL Na Description """"""""""" @@ -34,30 +34,42 @@ Style *eim* computes pairwise interactions for ionic compounds using embedded-ion method (EIM) potentials :ref:`(Zhou) `. The energy of the system E is given by -.. image:: Eqs/pair_eim1.jpg - :align: center +.. math:: + + E = \frac{1}{2} \sum_{i=1}^{N} \sum_{j=i_1}^{i_N} \phi_{ij} \left(r_{ij}\right) + \sum_{i=1}^{N}E_i\left(q_i,\sigma_i\right) The first term is a double pairwise sum over the J neighbors of all I -atoms, where phi\_ij is a pair potential. The second term sums over +atoms, where :math:`\phi_{ij}` is a pair potential. The second term sums over the embedding energy E\_i of atom I, which is a function of its charge -q\_i and the electrical potential sigma\_i at its location. E\_i, q\_i, -and sigma\_i are calculated as +q\_i and the electrical potential :math:`\sigma_i` at its location. E\_i, q\_i, +and :math:`sigma_i` are calculated as -.. image:: Eqs/pair_eim2.jpg - :align: center +.. math:: -where eta\_ji is a pairwise function describing electron flow from atom -I to atom J, and psi\_ij is another pairwise function. The multi-body + q_i = & \sum_{j=i_1}^{i_N} \eta_{ji}\left(r_{ij}\right) \\ + \sigma_i = & \sum_{j=i_1}^{i_N} q_j \cdot \psi_{ij} \left(r_{ij}\right) \\ + E_i\left(q_i,\sigma_i\right) = & \frac{1}{2} \cdot q_i \cdot \sigma_i + +where :math:`\eta_{ji} is a pairwise function describing electron flow from atom +I to atom J, and :math:`\psi_{ij}` is another pairwise function. The multi-body nature of the EIM potential is a result of the embedding energy term. A complete list of all the pair functions used in EIM is summarized below -.. image:: Eqs/pair_eim3.jpg - :align: center +.. math:: -Here E\_b, r\_e, r\_(c,phi), alpha, beta, A\_(psi), zeta, r\_(s,psi), -r\_(c,psi), A\_(eta), r\_(s,eta), r\_(c,eta), chi, and pair function type -p are parameters, with subscripts ij indicating the two species of + \phi_{ij}\left(r\right) = & \left\{ \begin{array}{lr} + \left[\frac{E_{b,ij}\beta_{ij}}{\beta_{ij}-\alpha_{ij}}\exp\left(-\alpha_{ij} \frac{r-r_{e,ij}}{r_{e,ij}}\right)-\frac{E_{b,ij}\alpha_{ij}}{\beta_{ij}-\alpha_{ij}}\exp\left(-\beta_{ij} \frac{r-r_{e,ij}}{r_{e,ij}}\right)\right]f_c\left(r,r_{e,ij},r_{c,\phi,ij}\right),& p_{ij}=1 \\ + \left[\frac{E_{b,ij}\beta_{ij}}{\beta_{ij}-\alpha_{ij}} \left(\frac{r_{e,ij}}{r}\right)^{\alpha_{ij}} -\frac{E_{b,ij}\alpha_{ij}}{\beta_{ij}-\alpha_{ij}} \left(\frac{r_{e,ij}}{r}\right)^{\beta_{ij}}\right]f_c\left(r,r_{e,ij},r_{c,\phi,ij}\right),& p_{ij}=2 + \end{array} + \right.\\ + \eta_{ji} = & A_{\eta,ij}\left(\chi_j-\chi_i\right)f_c\left(r,r_{s,\eta,ij},r_{c,\eta,ij}\right) \\ + \psi_{ij}\left(r\right) = & A_{\psi,ij}\exp\left(-\zeta_{ij}r\right)f_c\left(r,r_{s,\psi,ij},r_{c,\psi,ij}\right) \\ + f_{c}\left(r,r_p,r_c\right) = & 0.510204 \mathrm{erfc}\left[\frac{1.64498\left(2r-r_p-r_c\right)}{r_c-r_p}\right] - 0.010204 + +Here :math:`E_b, r_e, r_(c,\phi), \alpha, \beta, A_(\psi), \zeta, r_(s,\psi), +r_(c,\psi), A_(\eta), r_(s,\eta), r_(c,\eta), \chi,` and pair function type +*p* are parameters, with subscripts *ij* indicating the two species of atoms in the atomic pair. .. note:: @@ -106,9 +118,9 @@ types and you want the 1st 3 to be Na, and the 4th to be Cl, you would use the following pair\_coeff command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* Na Cl ffield.eim Na Na Na Cl + pair_coeff * * Na Cl ffield.eim Na Na Na Cl The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. The filename is the EIM potential file. The Na and Cl arguments diff --git a/doc/src/pair_exp6_rx.rst b/doc/src/pair_exp6_rx.rst index c44c87ae17..453f6f9aa8 100644 --- a/doc/src/pair_exp6_rx.rst +++ b/doc/src/pair_exp6_rx.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style exp6/rx +.. index:: pair_style exp6/rx -pair\_style exp6/rx command -=========================== +pair_style exp6/rx command +========================== -pair\_style exp6/rx/kk command -============================== +pair_style exp6/rx/kk command +============================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style exp6/rx cutoff ... @@ -21,16 +21,16 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style exp6/rx 10.0 pair_style exp6/rx 10.0 fractional pair_style exp6/rx 10.0 molecular - pair_coeff \* \* exp6.params h2o h2o exponent 1.0 1.0 10.0 - pair_coeff \* \* exp6.params h2o 1fluid exponent 1.0 1.0 10.0 - pair_coeff \* \* exp6.params 1fluid 1fluid exponent 1.0 1.0 10.0 - pair_coeff \* \* exp6.params 1fluid 1fluid none 10.0 - pair_coeff \* \* exp6.params 1fluid 1fluid polynomial filename 10.0 + pair_coeff * * exp6.params h2o h2o exponent 1.0 1.0 10.0 + pair_coeff * * exp6.params h2o 1fluid exponent 1.0 1.0 10.0 + pair_coeff * * exp6.params 1fluid 1fluid exponent 1.0 1.0 10.0 + pair_coeff * * exp6.params 1fluid 1fluid none 10.0 + pair_coeff * * exp6.params 1fluid 1fluid polynomial filename 10.0 Description """"""""""" @@ -43,17 +43,20 @@ one CG particle can interact with a species in a neighboring CG particle through a site-site interaction potential model. The *exp6/rx* style computes an exponential-6 potential given by -.. image:: Eqs/pair_exp6_rx.jpg - :align: center +.. math:: -where the *epsilon* parameter determines the depth of the potential -minimum located at *Rm*\ , and *alpha* determines the softness of the repulsion. + U_{ij}(r) = \frac{\epsilon}{\alpha-6}\{6\exp[\alpha(1-\frac{r_{ij}}{R_{m}})]-\alpha(\frac{R_{m}}{r_{ij}})^6\} + + +where the :math:`\epsilon` parameter determines the depth of the +potential minimum located at :math:`R_m`, and :math:`\alpha` determines +the softness of the repulsion. The coefficients must be defined for each species in a given particle type via the :doc:`pair_coeff ` command as in the examples above, where the first argument is the filename that includes the exponential-6 parameters for each species. The file includes the -species tag followed by the *alpha*\ , *epsilon* and *Rm* +species tag followed by the :math:`\alpha, \epsilon` and :math:`R_m` parameters. The format of the file is described below. The second and third arguments specify the site-site interaction @@ -74,22 +77,22 @@ to scale the EXP-6 parameters as reactions occur. Currently, there are three scaling options: *exponent*\ , *polynomial* and *none*\ . Exponent scaling requires two additional arguments for scaling -the *Rm* and *epsilon* parameters, respectively. The scaling factor +the :math:`R_m` and :math:`\epsilon` parameters, respectively. The scaling factor is computed by phi\^exponent, where phi is the number of molecules represented by the coarse-grain particle and exponent is specified -as a pair coefficient argument for *Rm* and *epsilon*\ , respectively. -The *Rm* and *epsilon* parameters are multiplied by the scaling +as a pair coefficient argument for :math:`R_m` and :math:`\epsilon`, respectively. +The :math:`R_m` and :math:`\epsilon` parameters are multiplied by the scaling factor to give the scaled interaction parameters for the CG particle. Polynomial scaling requires a filename to be specified as a pair coeff argument. The file contains the coefficients to a fifth order -polynomial for the *alpha*\ , *epsilon* and *Rm* parameters that depend +polynomial for the :math:`\alpha`, :math:`\epsilon` and :math:`R_m` parameters that depend upon phi (the number of molecules represented by the CG particle). The format of a polynomial file is provided below. The *none* option to the scaling does not have any additional pair coeff arguments. This is equivalent to specifying the *exponent* option with -*Rm* and *epsilon* exponents of 0.0 and 0.0, respectively. +:math:`R_m` and :math:`\epsilon` exponents of 0.0 and 0.0, respectively. The final argument specifies the interaction cutoff (optional). @@ -133,23 +136,30 @@ between sections. Following a blank line, the next N lines list the species and their corresponding parameters. The first argument is the species tag, the -second argument is the exp6 tag, the 3rd argument is the *alpha* -parameter (energy units), the 4th argument is the *epsilon* parameter -(energy-distance\^6 units), and the 5th argument is the *Rm* parameter +second argument is the exp6 tag, the 3rd argument is the :math:`\alpha` +parameter (energy units), the 4th argument is the :math:`\epsilon` parameter +(energy-distance\^6 units), and the 5th argument is the :math:`R_m` parameter (distance units). If a species tag of "1fluid" is listed as a pair coefficient, a one-fluid approximation is specified where a concentration-dependent combination of the parameters is computed through the following equations: -.. image:: Eqs/pair_exp6_rx_oneFluid.jpg - :align: center +.. math:: + + R_{m}^{3} = & \sum_{a}\sum_{b} x_{a}x_{b}R_{m,ab}^{3} \\ + \epsilon = & \frac{1}{R_{m}^{3}}\sum_{a}\sum_{b} x_{a}x_{b}\epsilon_{ab}R_{m,ab}^{3} \\ + \alpha = & \frac{1}{\epsilon R_{m}^{3}}\sum_{a}\sum_{b} x_{a}x_{b}\alpha_{ab}\epsilon_{ab}R_{m,ab}^{3} where -.. image:: Eqs/pair_exp6_rx_oneFluid2.jpg - :align: center +.. math:: -and xa and xb are the mole fractions of a and b, respectively, which + \epsilon_{ab} = & \sqrt{\epsilon_{a}\epsilon_{b}} \\ + R_{m,ab} = & \frac{R_{m,a}+R_{m,b}}{2} \\ + \alpha_{ab} = & \sqrt{\alpha_{a}\alpha_{b}} + + +and :math:`x_a` and :math:`x_b` are the mole fractions of a and b, respectively, which comprise the gas mixture. diff --git a/doc/src/pair_extep.rst b/doc/src/pair_extep.rst index 4564bde074..4618c44804 100644 --- a/doc/src/pair_extep.rst +++ b/doc/src/pair_extep.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style extep +.. index:: pair_style extep -pair\_style extep command -========================= +pair_style extep command +======================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style extep @@ -15,10 +15,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style extep - pair_coeff \* \* BN.extep B N + pair_coeff * * BN.extep B N Description """"""""""" @@ -32,7 +32,7 @@ interactions as described in :ref:`(Los2017) `. Restrictions """""""""""" - none +none Related commands """""""""""""""" diff --git a/doc/src/pair_fep_soft.rst b/doc/src/pair_fep_soft.rst index 263b52cacf..2d81628c0d 100644 --- a/doc/src/pair_fep_soft.rst +++ b/doc/src/pair_fep_soft.rst @@ -1,70 +1,70 @@ -.. index:: pair\_style lj/cut/soft +.. index:: pair_style lj/cut/soft -pair\_style lj/cut/soft command -=============================== +pair_style lj/cut/soft command +============================== -pair\_style lj/cut/soft/omp command -=================================== - -pair\_style lj/cut/coul/cut/soft command -======================================== - -pair\_style lj/cut/coul/cut/soft/omp command -============================================ - -pair\_style lj/cut/coul/long/soft command -========================================= - -pair\_style lj/cut/coul/long/soft/omp command -============================================= - -pair\_style lj/cut/tip4p/long/soft command -========================================== - -pair\_style lj/cut/tip4p/long/soft/omp command -============================================== - -pair\_style lj/charmm/coul/long/soft command -============================================ - -pair\_style lj/charmm/coul/long/soft/omp command -================================================ - -pair\_style lj/class2/soft command +pair_style lj/cut/soft/omp command ================================== -pair\_style lj/class2/coul/cut/soft command -=========================================== - -pair\_style lj/class2/coul/long/soft command -============================================ - -pair\_style coul/cut/soft command -================================= - -pair\_style coul/cut/soft/omp command -===================================== - -pair\_style coul/long/soft command -================================== - -pair\_style coul/long/soft/omp command -====================================== - -pair\_style tip4p/long/soft command -=================================== - -pair\_style tip4p/long/soft/omp command +pair_style lj/cut/coul/cut/soft command ======================================= -pair\_style morse/soft command +pair_style lj/cut/coul/cut/soft/omp command +=========================================== + +pair_style lj/cut/coul/long/soft command +======================================== + +pair_style lj/cut/coul/long/soft/omp command +============================================ + +pair_style lj/cut/tip4p/long/soft command +========================================== + +pair_style lj/cut/tip4p/long/soft/omp command +============================================== + +pair_style lj/charmm/coul/long/soft command +============================================ + +pair_style lj/charmm/coul/long/soft/omp command +================================================ + +pair_style lj/class2/soft command +================================== + +pair_style lj/class2/coul/cut/soft command +=========================================== + +pair_style lj/class2/coul/long/soft command +============================================ + +pair_style coul/cut/soft command +================================= + +pair_style coul/cut/soft/omp command +===================================== + +pair_style coul/long/soft command +================================== + +pair_style coul/long/soft/omp command +====================================== + +pair_style tip4p/long/soft command +=================================== + +pair_style tip4p/long/soft/omp command +======================================= + +pair_style morse/soft command ============================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -128,50 +128,50 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/cut/soft 2.0 0.5 9.5 - pair_coeff \* \* 0.28 3.1 1.0 + pair_coeff * * 0.28 3.1 1.0 pair_coeff 1 1 0.28 3.1 1.0 9.5 pair_style lj/cut/coul/cut/soft 2.0 0.5 10.0 9.5 pair_style lj/cut/coul/cut/soft 2.0 0.5 10.0 9.5 9.5 - pair_coeff \* \* 0.28 3.1 1.0 + pair_coeff * * 0.28 3.1 1.0 pair_coeff 1 1 0.28 3.1 0.5 10.0 pair_coeff 1 1 0.28 3.1 0.5 10.0 9.5 pair_style lj/cut/coul/long/soft 2.0 0.5 10.0 9.5 pair_style lj/cut/coul/long/soft 2.0 0.5 10.0 9.5 9.5 - pair_coeff \* \* 0.28 3.1 1.0 + pair_coeff * * 0.28 3.1 1.0 pair_coeff 1 1 0.28 3.1 0.0 10.0 pair_coeff 1 1 0.28 3.1 0.0 10.0 9.5 pair_style lj/cut/tip4p/long/soft 1 2 7 8 0.15 2.0 0.5 10.0 9.8 pair_style lj/cut/tip4p/long/soft 1 2 7 8 0.15 2.0 0.5 10.0 9.8 9.5 - pair_coeff \* \* 0.155 3.1536 1.0 + pair_coeff * * 0.155 3.1536 1.0 pair_coeff 1 1 0.155 3.1536 1.0 9.5 pair_style lj/charmm/coul/long 2.0 0.5 10.0 8.0 10.0 pair_style lj/charmm/coul/long 2.0 0.5 10.0 8.0 10.0 9.0 - pair_coeff \* \* 0.28 3.1 1.0 + pair_coeff * * 0.28 3.1 1.0 pair_coeff 1 1 0.28 3.1 1.0 0.14 3.1 pair_style lj/class2/coul/long/soft 2.0 0.5 10.0 9.5 pair_style lj/class2/coul/long/soft 2.0 0.5 10.0 9.5 9.5 - pair_coeff \* \* 0.28 3.1 1.0 + pair_coeff * * 0.28 3.1 1.0 pair_coeff 1 1 0.28 3.1 0.0 10.0 pair_coeff 1 1 0.28 3.1 0.0 10.0 9.5 pair_style coul/long/soft 1.0 10.0 9.5 - pair_coeff \* \* 1.0 + pair_coeff * * 1.0 pair_coeff 1 1 1.0 9.5 pair_style tip4p/long/soft 1 2 7 8 0.15 2.0 0.5 10.0 9.8 - pair_coeff \* \* 1.0 + pair_coeff * * 1.0 pair_coeff 1 1 1.0 9.5 pair_style morse/soft 4 0.9 10.0 - pair_coeff \* \* 100.0 2.0 1.5 1.0 + pair_coeff * * 100.0 2.0 1.5 1.0 pair_coeff 1 1 100.0 2.0 1.5 1.0 3.0 Description diff --git a/doc/src/pair_gauss.rst b/doc/src/pair_gauss.rst index b4270eac30..911b1c1504 100644 --- a/doc/src/pair_gauss.rst +++ b/doc/src/pair_gauss.rst @@ -1,25 +1,25 @@ -.. index:: pair\_style gauss +.. index:: pair_style gauss -pair\_style gauss command -========================= +pair_style gauss command +======================== -pair\_style gauss/gpu command -============================= +pair_style gauss/gpu command +============================ -pair\_style gauss/omp command -============================= +pair_style gauss/omp command +============================ -pair\_style gauss/cut command -============================= +pair_style gauss/cut command +============================ -pair\_style gauss/cut/omp command -================================= +pair_style gauss/cut/omp command +================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style gauss cutoff pair_style gauss/cut cutoff @@ -30,10 +30,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style gauss 12.0 - pair_coeff \* \* 1.0 0.9 + pair_coeff * * 1.0 0.9 pair_coeff 1 4 1.0 0.9 10.0 pair_style gauss/cut 3.5 @@ -44,11 +44,13 @@ Description Style *gauss* computes a tethering potential of the form -.. image:: Eqs/pair_gauss.jpg - :align: center +.. math:: + + E = - A \exp(-B r^2) \qquad r < r_c + between an atom and its corresponding tether site which will typically -be a frozen atom in the simulation. Rc is the cutoff. +be a frozen atom in the simulation. :math:`r_c` is the cutoff. The following coefficients must be defined for each pair of atom types via the :doc:`pair_coeff ` command as in the examples above, @@ -66,17 +68,20 @@ is used. Style *gauss/cut* computes a generalized Gaussian interaction potential between pairs of particles: -.. image:: Eqs/pair_gauss_cut.jpg - :align: center +.. math:: -where H determines together with the standard deviation sigma\_h the -peak height of the Gaussian function, and r\_mh the peak position. -Examples of the use of the Gaussian potentials include implicit -solvent simulations of salt ions :ref:`(Lenart) ` and of surfactants -:ref:`(Jusufi) `. In these instances the Gaussian potential mimics -the hydration barrier between a pair of particles. The hydration -barrier is located at r\_mh and has a width of sigma\_h. The prefactor -determines the height of the potential barrier. + E = \frac{H}{\sigma_h\sqrt{2\pi}} \exp\left[-\frac{(r-r_{mh})^2}{2\sigma_h^2}\right] + + +where H determines together with the standard deviation :math:`\sigma_h` +the peak height of the Gaussian function, and :math:`r_{mh}` the peak +position. Examples of the use of the Gaussian potentials include +implicit solvent simulations of salt ions :ref:`(Lenart) ` and +of surfactants :ref:`(Jusufi) `. In these instances the +Gaussian potential mimics the hydration barrier between a pair of +particles. The hydration barrier is located at :math:`r_{mh}` and has a +width of :math:`\sigma_h`. The prefactor determines the height of the +potential barrier. The following coefficients must be defined for each pair of atom types via the :doc:`pair_coeff ` command as in the example above, @@ -85,17 +90,15 @@ or in the data file or restart files read by the commands: * H (energy \* distance units) -* r\_mh (distance units) -* sigma\_h (distance units) +* :math:`r_{mh}` (distance units) +* :math:`\sigma_h` (distance units) * cutoff (distance units) The last coefficient is optional. If not specified, the global cutoff is used. - ---------- - Styles with a *gpu*\ , *intel*\ , *kk*\ , *omp*\ , or *opt* suffix are functionally the same as the corresponding style without the suffix. They have been optimized to run faster, depending on your available @@ -172,7 +175,7 @@ To print this quantity to the log file (with a descriptive column heading) the following commands could be included in an input script: -.. parsed-literal:: +.. code-block:: LAMMPS compute gauss all pair gauss variable occ equal c_gauss[1] diff --git a/doc/src/pair_gayberne.rst b/doc/src/pair_gayberne.rst index f735c5a021..e69d30a834 100644 --- a/doc/src/pair_gayberne.rst +++ b/doc/src/pair_gayberne.rst @@ -1,22 +1,22 @@ -.. index:: pair\_style gayberne +.. index:: pair_style gayberne -pair\_style gayberne command -============================ +pair_style gayberne command +=========================== -pair\_style gayberne/gpu command -================================ +pair_style gayberne/gpu command +=============================== -pair\_style gayberne/intel command -================================== +pair_style gayberne/intel command +================================= -pair\_style gayberne/omp command -================================ +pair_style gayberne/omp command +=============================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style gayberne gamma upsilon mu cutoff @@ -29,10 +29,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style gayberne 1.0 1.0 1.0 10.0 - pair_coeff \* \* 1.0 1.7 1.7 3.4 3.4 1.0 1.0 1.0 + pair_coeff * * 1.0 1.7 1.7 3.4 3.4 1.0 1.0 1.0 Description """"""""""" @@ -41,24 +41,33 @@ The *gayberne* styles compute a Gay-Berne anisotropic LJ interaction :ref:`(Berardi) ` between pairs of ellipsoidal particles or an ellipsoidal and spherical particle via the formulas -.. image:: Eqs/pair_gayberne.jpg - :align: center +.. math:: -where A1 and A2 are the transformation matrices from the simulation -box frame to the body frame and r12 is the center to center vector -between the particles. Ur controls the shifted distance dependent -interaction based on the distance of closest approach of the two -particles (h12) and the user-specified shift parameter gamma. When -both particles are spherical, the formula reduces to the usual -Lennard-Jones interaction (see details below for when Gay-Berne treats -a particle as "spherical"). + U ( \mathbf{A}_1, \mathbf{A}_2, \mathbf{r}_{12} ) = & U_r ( + \mathbf{A}_1, \mathbf{A}_2, \mathbf{r}_{12}, \gamma ) \cdot \eta_{12} ( + \mathbf{A}_1, \mathbf{A}_2, \upsilon ) \cdot \chi_{12} ( \mathbf{A}_1, + \mathbf{A}_2, \mathbf{r}_{12}, \mu ) \\ + U_r = & 4 \epsilon ( \varrho^{12} - \varrho^6) \\ + \varrho = & \frac{\sigma}{ h_{12} + \gamma \sigma} + +where A1 and A2 are the transformation matrices from the simulation box +frame to the body frame and :math:`r_{12}` is the center to center +vector between the particles. :math:`U_r` controls the shifted distance +dependent interaction based on the distance of closest approach of the +two particles (:math:`h_{12}`) and the user-specified shift parameter +gamma. When both particles are spherical, the formula reduces to the +usual Lennard-Jones interaction (see details below for when Gay-Berne +treats a particle as "spherical"). For large uniform molecules it has been shown that the energy parameters are approximately representable in terms of local contact curvatures :ref:`(Everaers) `: -.. image:: Eqs/pair_gayberne2.jpg - :align: center +.. math:: + + \epsilon_a = \sigma \cdot { \frac{a}{ b \cdot c } }; \epsilon_b = + \sigma \cdot { \frac{b}{ a \cdot c } }; \epsilon_c = \sigma \cdot { + \frac{c}{ a \cdot b } } The variable names utilized as potential parameters are for the most part taken from :ref:`(Everaers) ` in order to be consistent with @@ -80,69 +89,72 @@ above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands, or by mixing as described below: -* epsilon = well depth (energy units) -* sigma = minimum effective particle radii (distance units) -* epsilon\_i_a = relative well depth of type I for side-to-side interactions -* epsilon\_i_b = relative well depth of type I for face-to-face interactions -* epsilon\_i_c = relative well depth of type I for end-to-end interactions -* epsilon\_j_a = relative well depth of type J for side-to-side interactions -* epsilon\_j_b = relative well depth of type J for face-to-face interactions -* epsilon\_j_c = relative well depth of type J for end-to-end interactions +* :math:`\epsilon` = well depth (energy units) +* :math:`\sigma` = minimum effective particle radii (distance units) +* :math:`\epsilon_{i,a}` = relative well depth of type I for side-to-side interactions +* :math:`\epsilon_{i,b}` = relative well depth of type I for face-to-face interactions +* :math:`\epsilon_{i,c}` = relative well depth of type I for end-to-end interactions +* :math:`\epsilon_{j,a}` = relative well depth of type J for side-to-side interactions +* :math:`\epsilon_{j,b}` = relative well depth of type J for face-to-face interactions +* :math:`\epsilon_{j,c}` = relative well depth of type J for end-to-end interactions * cutoff (distance units) The last coefficient is optional. If not specified, the global cutoff specified in the pair\_style command is used. -It is typical with the Gay-Berne potential to define *sigma* as the -minimum of the 3 shape diameters of the particles involved in an I,I -interaction, though this is not required. Note that this is a -different meaning for *sigma* than the :doc:`pair_style resquared ` potential uses. +It is typical with the Gay-Berne potential to define :math:`\sigma` as +the minimum of the 3 shape diameters of the particles involved in an I,I +interaction, though this is not required. Note that this is a different +meaning for :math:`\sigma` than the :doc:`pair_style resquared +` potential uses. -The epsilon\_i and epsilon\_j coefficients are actually defined for atom -types, not for pairs of atom types. Thus, in a series of pair\_coeff -commands, they only need to be specified once for each atom type. +The :math:`\epsilon_i` and :math:`\epsilon_j` coefficients are actually +defined for atom types, not for pairs of atom types. Thus, in a series +of pair\_coeff commands, they only need to be specified once for each +atom type. -Specifically, if any of epsilon\_i_a, epsilon\_i_b, epsilon\_i_c are -non-zero, the three values are assigned to atom type I. If all the -epsilon\_i values are zero, they are ignored. If any of epsilon\_j_a, -epsilon\_j_b, epsilon\_j_c are non-zero, the three values are assigned -to atom type J. If all three epsilon\_j values are zero, they are -ignored. Thus the typical way to define the epsilon\_i and epsilon\_j -coefficients is to list their values in "pair\_coeff I J" commands when -I = J, but set them to 0.0 when I != J. If you do list them when I != -J, you should insure they are consistent with their values in other -pair\_coeff commands, since only the last setting will be in effect. +Specifically, if any of :math:`\epsilon_{i,a}`, :math:`\epsilon_{i,b}`, +:math:`\epsilon_{i,c}` are non-zero, the three values are assigned to +atom type I. If all the :math:`\epsilon_i` values are zero, they are +ignored. If any of :math:`\epsilon_{j,a}`, :math:`\epsilon_{j,b}`, +:math:`\epsilon_{j,c}` are non-zero, the three values are assigned to +atom type J. If all three epsilon\_j values are zero, they are ignored. +Thus the typical way to define the :math:`\epsilon_i` and +:math:`\epsilon_j` coefficients is to list their values in "pair\_coeff +I J" commands when I = J, but set them to 0.0 when I != J. If you do +list them when I != J, you should insure they are consistent with their +values in other pair\_coeff commands, since only the last setting will +be in effect. Note that if this potential is being used as a sub-style of :doc:`pair_style hybrid `, and there is no "pair\_coeff I I" setting made for Gay-Berne for a particular type I (because I-I interactions are computed by another hybrid pair potential), then you -still need to insure the epsilon a,b,c coefficients are assigned to +still need to insure the :math:`\epsilon` a,b,c coefficients are assigned to that type. e.g. in a "pair\_coeff I J" command. .. note:: - If the epsilon a = b = c for an atom type, and if the shape of - the particle itself is spherical, meaning its 3 shape parameters are - all the same, then the particle is treated as an LJ sphere by the + If the :math:`\epsilon` a = b = c for an atom type, and if the shape + of the particle itself is spherical, meaning its 3 shape parameters + are all the same, then the particle is treated as an LJ sphere by the Gay-Berne potential. This is significant because if two LJ spheres interact, then the simple Lennard-Jones formula is used to compute their interaction energy/force using the specified epsilon and sigma as the standard LJ parameters. This is much cheaper to compute than - the full Gay-Berne formula. To treat the particle as a LJ sphere with - sigma = D, you should normally set epsilon a = b = c = 1.0, set the - pair\_coeff sigma = D, and also set the 3 shape parameters for the - particle to D. The one exception is that if the 3 shape parameters - are set to 0.0, which is a valid way in LAMMPS to specify a point - particle, then the Gay-Berne potential will treat that as shape - parameters of 1.0 (i.e. a LJ particle with sigma = 1), since it - requires finite-size particles. In this case you should still set the - pair\_coeff sigma to 1.0 as well. - + the full Gay-Berne formula. To treat the particle as a LJ sphere + with sigma = D, you should normally set :math:`\epsilon` a = b = c = + 1.0, set the pair\_coeff :math:`\sigma = D`, and also set the 3 shape + parameters for the particle to D. The one exception is that if the 3 + shape parameters are set to 0.0, which is a valid way in LAMMPS to + specify a point particle, then the Gay-Berne potential will treat + that as shape parameters of 1.0 (i.e. a LJ particle with + :math:`\sigma = 1`), since it requires finite-size particles. In + this case you should still set the pair\_coeff :math:`\sigma` to 1.0 + as well. ---------- - Styles with a *gpu*\ , *intel*\ , *kk*\ , *omp*\ , or *opt* suffix are functionally the same as the corresponding style without the suffix. They have been optimized to run faster, depending on your available diff --git a/doc/src/pair_gran.rst b/doc/src/pair_gran.rst index 7cc3ada389..3a75a410b1 100644 --- a/doc/src/pair_gran.rst +++ b/doc/src/pair_gran.rst @@ -1,31 +1,31 @@ -.. index:: pair\_style gran/hooke +.. index:: pair_style gran/hooke -pair\_style gran/hooke command -============================== +pair_style gran/hooke command +============================= -pair\_style gran/hooke/omp command -================================== +pair_style gran/hooke/omp command +================================= -pair\_style gran/hooke/history command -====================================== +pair_style gran/hooke/history command +===================================== -pair\_style gran/hooke/history/omp command -========================================== - -pair\_style gran/hooke/history/kk command +pair_style gran/hooke/history/omp command ========================================= -pair\_style gran/hertz/history command -====================================== +pair_style gran/hooke/history/kk command +======================================== -pair\_style gran/hertz/history/omp command -========================================== +pair_style gran/hertz/history command +===================================== + +pair_style gran/hertz/history/omp command +========================================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style Kn Kt gamma_n gamma_t xmu dampflag @@ -53,7 +53,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style gran/hooke/history 200000.0 NULL 50.0 NULL 0.5 1 pair_style gran/hooke 200000.0 70000.0 50.0 30.0 0.5 0 @@ -70,13 +70,25 @@ no force between the particles when r > d. The two Hookean styles use this formula: -.. image:: Eqs/pair_gran_hooke.jpg - :align: center +.. math:: + + F_{hk} = (k_n \delta \mathbf{n}_{ij} - + m_{eff} \gamma_n\mathbf{ v}_n) - + (k_t \mathbf{ \Delta s}_t + + m_{eff} \gamma_t \mathbf{v}_t) + The Hertzian style uses this formula: -.. image:: Eqs/pair_gran_hertz.jpg - :align: center +.. math:: + + F_{hz} = \sqrt{\delta} \sqrt{\frac{R_i R_j}{R_i + R_j}} F_{hk} = + \sqrt{\delta} \sqrt{\frac{R_i R_j}{R_i + R_j}} + \Big[ (k_n \delta \mathbf{n}_{ij} - + m_{eff} \: \gamma_n \mathbf{ v}_n) - + (k_t \mathbf{ \Delta s}_t + + m_{eff} \: \gamma_t \mathbf{v}_t) \Big] + In both equations the first parenthesized term is the normal force between the two particles and the second parenthesized term is the @@ -92,34 +104,35 @@ if *dampflag* is set to 0. The other quantities in the equations are as follows: -* delta = d - r = overlap distance of 2 particles -* Kn = elastic constant for normal contact -* Kt = elastic constant for tangential contact -* gamma\_n = viscoelastic damping constant for normal contact -* gamma\_t = viscoelastic damping constant for tangential contact -* m\_eff = Mi Mj / (Mi + Mj) = effective mass of 2 particles of mass Mi and Mj -* Delta St = tangential displacement vector between 2 particles which is truncated to satisfy a frictional yield criterion -* n\_ij = unit vector along the line connecting the centers of the 2 particles -* Vn = normal component of the relative velocity of the 2 particles -* Vt = tangential component of the relative velocity of the 2 particles +* :math:`\delta` = d - r = overlap distance of 2 particles +* :math:`K_n` = elastic constant for normal contact +* :math:`K_t` = elastic constant for tangential contact +* :math:`\gamma_n` = viscoelastic damping constant for normal contact +* :math:`\gamma_t` = viscoelastic damping constant for tangential contact +* :math:`m_{eff} = M_i M_j / (M_i + M_j) =` effective mass of 2 particles of mass M\_i and M\_j +* :math:`\mathbf{\Delta s}_t =` tangential displacement vector between 2 particles which is truncated to satisfy a frictional yield criterion +* :math:`n_{ij} =` unit vector along the line connecting the centers of the 2 particles +* :math:`V_n =` normal component of the relative velocity of the 2 particles +* :math:`V_t =` tangential component of the relative velocity of the 2 particles -The Kn, Kt, gamma\_n, and gamma\_t coefficients are specified as -parameters to the pair\_style command. If a NULL is used for Kt, then -a default value is used where Kt = 2/7 Kn. If a NULL is used for -gamma\_t, then a default value is used where gamma\_t = 1/2 gamma\_n. +The :math:`K_n`, :math:`K_t`, :math:`\gamma_n`, and :math:`\gamma_t` +coefficients are specified as parameters to the pair\_style command. If +a NULL is used for :math:`K_t`, then a default value is used where +:math:`K_t = 2/7 K_n`. If a NULL is used for :math:`\gamma_t`, then a +default value is used where :math:`\gamma_t = 1/2 \gamma_n`. The interpretation and units for these 4 coefficients are different in the Hookean versus Hertzian equations. The Hookean model is one where the normal push-back force for two overlapping particles is a linear function of the overlap distance. -Thus the specified Kn is in units of (force/distance). Note that this -push-back force is independent of absolute particle size (in the -monodisperse case) and of the relative sizes of the two particles (in -the polydisperse case). This model also applies to the other terms in -the force equation so that the specified gamma\_n is in units of -(1/time), Kt is in units of (force/distance), and gamma\_t is in units -of (1/time). +Thus the specified :math:`K_n` is in units of (force/distance). Note +that this push-back force is independent of absolute particle size (in +the monodisperse case) and of the relative sizes of the two particles +(in the polydisperse case). This model also applies to the other terms +in the force equation so that the specified :math:`\gamma_n` is in units +of (1/time), :math:`K_t` is in units of (force/distance), and +:math:`\gamma_t` is in units of (1/time). The Hertzian model is one where the normal push-back force for two overlapping particles is proportional to the area of overlap of the @@ -128,38 +141,39 @@ Thus Kn has units of force per area and is thus specified in units of (pressure). The effects of absolute particle size (monodispersity) and relative size (polydispersity) are captured in the radii-dependent pre-factors. When these pre-factors are carried through to the other -terms in the force equation it means that the specified gamma\_n is in -units of (1/(time\*distance)), Kt is in units of (pressure), and -gamma\_t is in units of (1/(time\*distance)). +terms in the force equation it means that the specified :math:`\gamma_n` is in +units of (1/(time\*distance)), :math:`K_t` is in units of (pressure), and +:math:`\gamma_t` is in units of (1/(time\*distance)). -Note that in the Hookean case, Kn can be thought of as a linear spring -constant with units of force/distance. In the Hertzian case, Kn is -like a non-linear spring constant with units of force/area or -pressure, and as shown in the :ref:`(Zhang) ` paper, Kn = 4G / -(3(1-nu)) where nu = the Poisson ratio, G = shear modulus = E / -(2(1+nu)), and E = Young's modulus. Similarly, Kt = 4G / (2-nu). -(NOTE: in an earlier version of the manual, we incorrectly stated that -Kt = 8G / (2-nu).) +Note that in the Hookean case, :math:`K_n` can be thought of as a linear +spring constant with units of force/distance. In the Hertzian case, +:math:`K_n` is like a non-linear spring constant with units of +force/area or pressure, and as shown in the :ref:`(Zhang) ` +paper, :math:`K_n = 4G / (3(1-\nu))` where :math:`\nu =` the Poisson ratio, +G = shear modulus = :math:`E / (2(1+\nu))`, and E = Young's modulus. Similarly, +:math:`K_t = 4G / (2-\nu)`. (NOTE: in an earlier version of the manual, we incorrectly +stated that :math:`K_t = 8G / (2-\nu)`.) -Thus in the Hertzian case Kn and Kt can be set to values that -corresponds to properties of the material being modeled. This is also -true in the Hookean case, except that a spring constant must be chosen -that is appropriate for the absolute size of particles in the model. -Since relative particle sizes are not accounted for, the Hookean -styles may not be a suitable model for polydisperse systems. +Thus in the Hertzian case :math:`K_n` and :math:`K_t` can be set to +values that corresponds to properties of the material being modeled. +This is also true in the Hookean case, except that a spring constant +must be chosen that is appropriate for the absolute size of particles in +the model. Since relative particle sizes are not accounted for, the +Hookean styles may not be a suitable model for polydisperse systems. .. note:: In versions of LAMMPS before 9Jan09, the equation for Hertzian - interactions did not include the sqrt(RiRj/Ri+Rj) term and thus was - not as accurate for polydisperse systems. For monodisperse systems, - sqrt(RiRj/Ri+Rj) is a constant factor that effectively scales all 4 - coefficients: Kn, Kt, gamma\_n, gamma\_t. Thus you can set the values - of these 4 coefficients appropriately in the current code to reproduce + interactions did not include the :math:`\sqrt{r_i r_j / (r_i + r_j)}` + term and thus was not as accurate for polydisperse systems. For + monodisperse systems, :math:`\sqrt{ r_i r_j /(r_i+r_j)}` is a + constant factor that effectively scales all 4 coefficients: + :math:`K_n, K_t, \gamma_n, \gamma_t`. Thus you can set the values of + these 4 coefficients appropriately in the current code to reproduce the results of a previous Hertzian monodisperse calculation. For example, for the common case of a monodisperse system with particles - of diameter 1, all 4 of these coefficients should now be set 2x larger - than they were previously. + of diameter 1, all 4 of these coefficients should now be set 2x + larger than they were previously. Xmu is also specified in the pair\_style command and is the upper limit of the tangential force through the Coulomb criterion Ft = xmu\*Fn, @@ -190,9 +204,9 @@ However you must still use the :doc:`pair_coeff ` for all pairs of granular atom types. For example the command -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* + pair_coeff * * should be used if all atoms in the simulation interact via a granular potential (i.e. one of the pair styles above is used). If a granular diff --git a/doc/src/pair_granular.rst b/doc/src/pair_granular.rst index c94061e396..6d5dfbdba8 100644 --- a/doc/src/pair_granular.rst +++ b/doc/src/pair_granular.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style granular +.. index:: pair_style granular -pair\_style granular command -============================ +pair_style granular command +=========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style granular cutoff @@ -17,22 +17,22 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style granular - pair_coeff \* \* hooke 1000.0 50.0 tangential linear_nohistory 1.0 0.4 damping mass_velocity + pair_coeff * * hooke 1000.0 50.0 tangential linear_nohistory 1.0 0.4 damping mass_velocity pair_style granular - pair_coeff \* \* hooke 1000.0 50.0 tangential linear_history 500.0 1.0 0.4 damping mass_velocity + pair_coeff * * hooke 1000.0 50.0 tangential linear_history 500.0 1.0 0.4 damping mass_velocity pair_style granular - pair_coeff \* \* hertz 1000.0 50.0 tangential mindlin 1000.0 1.0 0.4 + pair_coeff * * hertz 1000.0 50.0 tangential mindlin 1000.0 1.0 0.4 pair_style granular - pair_coeff \* \* hertz/material 1e8 0.3 0.3 tangential mindlin_rescale NULL 1.0 0.4 damping tsuji + pair_coeff * * hertz/material 1e8 0.3 0.3 tangential mindlin_rescale NULL 1.0 0.4 damping tsuji pair_style granular - pair_coeff 1 \* jkr 1000.0 500.0 0.3 10 tangential mindlin 800.0 1.0 0.5 rolling sds 500.0 200.0 0.5 twisting marshall + pair_coeff 1 * jkr 1000.0 500.0 0.3 10 tangential mindlin 800.0 1.0 0.5 rolling sds 500.0 200.0 0.5 twisting marshall pair_coeff 2 2 hertz 200.0 100.0 tangential linear_history 300.0 1.0 0.1 rolling sds 200.0 100.0 0.1 twisting marshall pair_style granular @@ -98,7 +98,7 @@ on particle *i* due to contact with particle *j* is given by: .. math:: - \begin{equation}\mathbf{F}_{ne, Hooke} = k_N \delta_{ij} \mathbf{n}\end{equation} + \mathbf{F}_{ne, Hooke} = k_N \delta_{ij} \mathbf{n} Where :math:`\delta_{ij} = R_i + R_j - \|\mathbf{r}_{ij}\|` is the particle overlap, :math:`R_i, R_j` are the particle radii, :math:`\mathbf{r}_{ij} = \mathbf{r}_i - \mathbf{r}_j` is the vector separating the two @@ -112,7 +112,7 @@ For the *hertz* model, the normal component of force is given by: .. math:: - \begin{equation}\mathbf{F}_{ne, Hertz} = k_N R_{eff}^{1/2}\delta_{ij}^{3/2} \mathbf{n}\end{equation} + \mathbf{F}_{ne, Hertz} = k_N R_{eff}^{1/2}\delta_{ij}^{3/2} \mathbf{n} Here, :math:`R_{eff} = \frac{R_i R_j}{R_i + R_j}` is the effective radius, denoted for simplicity as *R* from here on. For *hertz*\ , the @@ -124,7 +124,7 @@ For the *hertz/material* model, the force is given by: .. math:: - \begin{equation}\mathbf{F}_{ne, Hertz/material} = \frac{4}{3} E_{eff} R_{eff}^{1/2}\delta_{ij}^{3/2} \mathbf{n}\end{equation} + \mathbf{F}_{ne, Hertz/material} = \frac{4}{3} E_{eff} R_{eff}^{1/2}\delta_{ij}^{3/2} \mathbf{n} Here, :math:`E_{eff} = E = \left(\frac{1-\nu_i^2}{E_i} + \frac{1-\nu_j^2}{E_j}\right)^{-1}` is the effective Young's modulus, with :math:`\nu_i, \nu_j` the Poisson ratios of the particles of @@ -139,7 +139,7 @@ is simply Hertz with an additional attractive cohesion term: .. math:: - \begin{equation}\mathbf{F}_{ne, dmt} = \left(\frac{4}{3} E R^{1/2}\delta_{ij}^{3/2} - 4\pi\gamma R\right)\mathbf{n}\end{equation} + \mathbf{F}_{ne, dmt} = \left(\frac{4}{3} E R^{1/2}\delta_{ij}^{3/2} - 4\pi\gamma R\right)\mathbf{n} The *jkr* model is the :ref:`(Johnson-Kendall-Roberts) ` model, where the force is computed as: @@ -147,8 +147,7 @@ where the force is computed as: .. math:: - \begin{equation}\label{eq:force_jkr} - \mathbf{F}_{ne, jkr} = \left(\frac{4Ea^3}{3R} - 2\pi a^2\sqrt{\frac{4\gamma E}{\pi a}}\right)\mathbf{n}\end{equation} + \mathbf{F}_{ne, jkr} = \left(\frac{4Ea^3}{3R} - 2\pi a^2\sqrt{\frac{4\gamma E}{\pi a}}\right)\mathbf{n} Here, *a* is the radius of the contact zone, related to the overlap :math:`\delta` according to: @@ -156,7 +155,7 @@ Here, *a* is the radius of the contact zone, related to the overlap .. math:: - \begin{equation}\delta = a^2/R - 2\sqrt{\pi \gamma a/E}\end{equation} + \delta = a^2/R - 2\sqrt{\pi \gamma a/E} LAMMPS internally inverts the equation above to solve for *a* in terms of :math:`\delta`, then solves for the force in the previous @@ -179,7 +178,7 @@ following general form: .. math:: - \begin{equation}\mathbf{F}_{n,damp} = -\eta_n \mathbf{v}_{n,rel}\end{equation} + \mathbf{F}_{n,damp} = -\eta_n \mathbf{v}_{n,rel} Here, :math:`\mathbf{v}_{n,rel} = (\mathbf{v}_j - \mathbf{v}_i) \cdot \mathbf{n} \mathbf{n}` is the component of relative velocity along :math:`\mathbf{n}`. @@ -208,7 +207,7 @@ user-specified damping coefficient in the *normal* model: .. math:: - \begin{equation}\eta_n = \eta_{n0}\end{equation} + \eta_n = \eta_{n0} Here, :math:`\eta_{n0}` is the damping coefficient specified for the normal contact model, in units of *mass*\ /\ *time*\ . @@ -218,7 +217,7 @@ For *damping mass\_velocity*, the normal damping is given by: .. math:: - \begin{equation}\eta_n = \eta_{n0} m_{eff}\end{equation} + \eta_n = \eta_{n0} m_{eff} Here, :math:`\eta_{n0}` is the damping coefficient specified for the normal contact model, in units of *mass*\ /\ *time* and @@ -233,7 +232,7 @@ damping is given by: .. math:: - \begin{equation}\eta_n = \eta_{n0}\ a m_{eff}\end{equation} + \eta_n = \eta_{n0}\ a m_{eff} Here, *a* is the contact radius, given by :math:`a =\sqrt{R\delta}` for all models except *jkr*\ , for which it is given implicitly according @@ -247,7 +246,7 @@ the normal model is interpreted as a restitution coefficient .. math:: - \begin{equation}\eta_n = \alpha (m_{eff}k_n)^{1/2}\end{equation} + \eta_n = \alpha (m_{eff}k_n)^{1/2} For normal contact models based on material parameters, :math:`k_n = 4/3Ea`. The parameter :math:`\alpha` is related to the restitution coefficient *e* according to: @@ -255,7 +254,7 @@ coefficient *e* according to: .. math:: - \begin{equation}\alpha = 1.2728-4.2783e+11.087e^2-22.348e^3+27.467e^4-18.022e^5+4.8218e^6\end{equation} + \alpha = 1.2728-4.2783e+11.087e^2-22.348e^3+27.467e^4-18.022e^5+4.8218e^6 The dimensionless coefficient of restitution :math:`e` specified as part of the normal contact model parameters should be between 0 and 1, but @@ -267,7 +266,7 @@ damping components: .. math:: - \begin{equation}\mathbf{F}_n = \mathbf{F}_{ne} + \mathbf{F}_{n,damp}\end{equation} + \mathbf{F}_n = \mathbf{F}_{ne} + \mathbf{F}_{n,damp} ---------- @@ -295,14 +294,14 @@ gran/hooke* style. The tangential force (\mathbf{F}\_t\) is given by: .. math:: - \begin{equation}\mathbf{F}_t = -min(\mu_t F_{n0}, \|\mathbf{F}_\mathrm{t,damp}\|) \mathbf{t}\end{equation} + \mathbf{F}_t = -min(\mu_t F_{n0}, \|\mathbf{F}_\mathrm{t,damp}\|) \mathbf{t} The tangential damping force :math:`\mathbf{F}_\mathrm{t,damp}` is given by: .. math:: - \begin{equation}\mathbf{F}_\mathrm{t,damp} = -\eta_t \mathbf{v}_{t,rel}\end{equation} + \mathbf{F}_\mathrm{t,damp} = -\eta_t \mathbf{v}_{t,rel} The tangential damping prefactor :math:`\eta_t` is calculated by scaling the normal damping :math:`\eta_n` (see above): @@ -310,7 +309,7 @@ the normal damping :math:`\eta_n` (see above): .. math:: - \begin{equation}\eta_t = -x_{\gamma,t} \eta_n\end{equation} + \eta_t = -x_{\gamma,t} \eta_n The normal damping prefactor :math:`\eta_n` is determined by the choice of the *damping* keyword, as discussed above. Thus, the *damping* @@ -331,7 +330,7 @@ the normal force: .. math:: - \begin{equation}F_{n0} = \|\mathbf{F}_n\|\end{equation} + F_{n0} = \|\mathbf{F}_n\| For cohesive models such as *jkr* and *dmt*\ , the critical force is adjusted so that the critical tangential force approaches :math:`\mu_t F_{pulloff}`, see :ref:`Marshall `, equation 43, and @@ -341,7 +340,7 @@ form: .. math:: - \begin{equation}F_{n0} = \|\mathbf{F}_ne + 2 F_{pulloff}\|\end{equation} + F_{n0} = \|\mathbf{F}_ne + 2 F_{pulloff}\| Where :math:`F_{pulloff} = 3\pi \gamma R` for *jkr*\ , and :math:`F_{pulloff} = 4\pi \gamma R` for *dmt*\ . @@ -356,7 +355,7 @@ For *tangential linear\_history*, the tangential force is given by: .. math:: - \begin{equation}\mathbf{F}_t = -min(\mu_t F_{n0}, \|-k_t\mathbf{\xi} + \mathbf{F}_\mathrm{t,damp}\|) \mathbf{t}\end{equation} + \mathbf{F}_t = -min(\mu_t F_{n0}, \|-k_t\mathbf{\xi} + \mathbf{F}_\mathrm{t,damp}\|) \mathbf{t} Here, :math:`\mathbf{\xi}` is the tangential displacement accumulated during the entire duration of the contact: @@ -364,7 +363,7 @@ during the entire duration of the contact: .. math:: - \begin{equation}\mathbf{\xi} = \int_{t0}^t \mathbf{v}_{t,rel}(\tau) \mathrm{d}\tau\end{equation} + \mathbf{\xi} = \int_{t0}^t \mathbf{v}_{t,rel}(\tau) \mathrm{d}\tau This accumulated tangential displacement must be adjusted to account for changes in the frame of reference of the contacting pair of @@ -386,8 +385,7 @@ work: .. math:: - \begin{equation}\mathbf{\xi} = \left(\mathbf{\xi'} - (\mathbf{n} \cdot \mathbf{\xi'})\mathbf{n}\right) \frac{\|\mathbf{\xi'}\|}{\|\mathbf{\xi'}\| - \mathbf{n}\cdot\mathbf{\xi'}} - \label{eq:rotate_displacements}\end{equation} + \mathbf{\xi} = \left(\mathbf{\xi'} - (\mathbf{n} \cdot \mathbf{\xi'})\mathbf{n}\right) \frac{\|\mathbf{\xi'}\|}{\|\mathbf{\xi'}\| - \mathbf{n}\cdot\mathbf{\xi'}} Here, :math:`\mathbf{\xi'}` is the accumulated displacement prior to the current time step and :math:`\mathbf{\xi}` is the corrected @@ -404,7 +402,7 @@ discussion): .. math:: - \begin{equation}\mathbf{\xi} = -\frac{1}{k_t}\left(\mu_t F_{n0}\mathbf{t} + \mathbf{F}_{t,damp}\right)\end{equation} + \mathbf{\xi} = -\frac{1}{k_t}\left(\mu_t F_{n0}\mathbf{t} + \mathbf{F}_{t,damp}\right) The tangential force is added to the total normal force (elastic plus damping) to produce the total force on the particle. The tangential @@ -414,12 +412,12 @@ overlap region) to induce a torque on each particle according to: .. math:: - \begin{equation}\mathbf{\tau}_i = -(R_i - 0.5 \delta) \mathbf{n} \times \mathbf{F}_t\end{equation} + \mathbf{\tau}_i = -(R_i - 0.5 \delta) \mathbf{n} \times \mathbf{F}_t .. math:: - \begin{equation}\mathbf{\tau}_j = -(R_j - 0.5 \delta) \mathbf{n} \times \mathbf{F}_t\end{equation} + \mathbf{\tau}_j = -(R_j - 0.5 \delta) \mathbf{n} \times \mathbf{F}_t For *tangential mindlin*\ , the :ref:`Mindlin ` no-slip solution is used, which differs from the *linear\_history* option by an additional factor of *a*\ , the radius of the contact region. The tangential force is given by: @@ -427,7 +425,7 @@ option by an additional factor of *a*\ , the radius of the contact region. The t .. math:: - \begin{equation}\mathbf{F}_t = -min(\mu_t F_{n0}, \|-k_t a \mathbf{\xi} + \mathbf{F}_\mathrm{t,damp}\|) \mathbf{t}\end{equation} + \mathbf{F}_t = -min(\mu_t F_{n0}, \|-k_t a \mathbf{\xi} + \mathbf{F}_\mathrm{t,damp}\|) \mathbf{t} Here, *a* is the radius of the contact region, given by :math:`a =\sqrt{R\delta}` for all normal contact models, except for *jkr*\ , where it is given @@ -443,7 +441,7 @@ case, mixing of the shear modulus for different particle types *i* and .. math:: - \begin{equation}1/G = 2(2-\nu_i)(1+\nu_i)/E_i + 2(2-\nu_j)(1+\nu_j)/E_j\end{equation} + 1/G = 2(2-\nu_i)(1+\nu_i)/E_i + 2(2-\nu_j)(1+\nu_j)/E_j The *mindlin\_rescale* option uses the same form as *mindlin*\ , but the magnitude of the tangential displacement is re-scaled as the contact @@ -452,7 +450,7 @@ unloads, i.e. if :math:`a < a_{t_{n-1}}`: .. math:: - \begin{equation}\mathbf{\xi} = \mathbf{\xi_{t_{n-1}}} \frac{a}{a_{t_{n-1}}}\end{equation} + \mathbf{\xi} = \mathbf{\xi_{t_{n-1}}} \frac{a}{a_{t_{n-1}}} Here, :math:`t_{n-1}` indicates the value at the previous time step. This rescaling accounts for the fact that a decrease in the @@ -485,7 +483,7 @@ the tangential force: .. math:: - \begin{equation}\mathbf{F}_{roll,0} = k_{roll} \mathbf{\xi}_{roll} - \gamma_{roll} \mathbf{v}_{roll}\end{equation} + \mathbf{F}_{roll,0} = k_{roll} \mathbf{\xi}_{roll} - \gamma_{roll} \mathbf{v}_{roll} Here, :math:`\mathbf{v}_{roll} = -R(\mathbf{\Omega}_i - \mathbf{\Omega}_j) \times \mathbf{n}` is the relative rolling velocity, as given in :ref:`Wang et al ` and @@ -494,7 +492,7 @@ velocity, as given in :ref:`Wang et al ` and .. math:: - \begin{equation}\mathbf{\xi}_{roll} = \int_{t_0}^t \mathbf{v}_{roll} (\tau) \mathrm{d} \tau\end{equation} + \mathbf{\xi}_{roll} = \int_{t_0}^t \mathbf{v}_{roll} (\tau) \mathrm{d} \tau A Coulomb friction criterion truncates the rolling pseudo-force if it exceeds a critical value: @@ -502,7 +500,7 @@ exceeds a critical value: .. math:: - \begin{equation}\mathbf{F}_{roll} = min(\mu_{roll} F_{n,0}, \|\mathbf{F}_{roll,0}\|)\mathbf{k}\end{equation} + \mathbf{F}_{roll} = min(\mu_{roll} F_{n,0}, \|\mathbf{F}_{roll,0}\|)\mathbf{k} Here, :math:`\mathbf{k} = \mathbf{v}_{roll}/\|\mathbf{v}_{roll}\|` is the direction of the pseudo-force. As with tangential displacement, the rolling @@ -519,12 +517,12 @@ opposite torque on each particle, according to: .. math:: - \begin{equation}\tau_{roll,i} = R_{eff} \mathbf{n} \times \mathbf{F}_{roll}\end{equation} + \tau_{roll,i} = R_{eff} \mathbf{n} \times \mathbf{F}_{roll} .. math:: - \begin{equation}\tau_{roll,j} = -\tau_{roll,i}\end{equation} + \tau_{roll,j} = -\tau_{roll,i} ---------- @@ -551,7 +549,7 @@ the most straightforward treatment: .. math:: - \begin{equation}\tau_{twist,0} = -k_{twist}\xi_{twist} - \gamma_{twist}\Omega_{twist}\end{equation} + \tau_{twist,0} = -k_{twist}\xi_{twist} - \gamma_{twist}\Omega_{twist} Here :math:`\xi_{twist} = \int_{t_0}^t \Omega_{twist} (\tau) \mathrm{d}\tau` is the twisting angular displacement, and :math:`\Omega_{twist} = (\mathbf{\Omega}_i - \mathbf{\Omega}_j) \cdot \mathbf{n}` is the relative twisting angular velocity. The torque @@ -560,7 +558,7 @@ is then truncated according to: .. math:: - \begin{equation}\tau_{twist} = min(\mu_{twist} F_{n,0}, \tau_{twist,0})\end{equation} + \tau_{twist} = min(\mu_{twist} F_{n,0}, \tau_{twist,0}) Similar to the sliding and rolling displacement, the angular displacement is rescaled so that it corresponds to the critical value @@ -569,7 +567,7 @@ if the twisting torque exceeds this critical value: .. math:: - \begin{equation}\xi_{twist} = \frac{1}{k_{twist}} (\mu_{twist} F_{n,0}sgn(\Omega_{twist}) - \gamma_{twist}\Omega_{twist})\end{equation} + \xi_{twist} = \frac{1}{k_{twist}} (\mu_{twist} F_{n,0}sgn(\Omega_{twist}) - \gamma_{twist}\Omega_{twist}) For *twisting sds*\ , the coefficients :math:`k_{twist}, \gamma_{twist}` and :math:`\mu_{twist}` are simply the user input parameters that follow @@ -582,29 +580,29 @@ sliding friction coefficients, as discussed in .. math:: - \begin{equation}k_{twist} = 0.5k_ta^2\end{equation} + k_{twist} = 0.5k_ta^2 .. math:: - \begin{equation}\eta_{twist} = 0.5\eta_ta^2\end{equation} + \eta_{twist} = 0.5\eta_ta^2 .. math:: - \begin{equation}\mu_{twist} = \frac{2}{3}a\mu_t\end{equation} + \mu_{twist} = \frac{2}{3}a\mu_t Finally, the twisting torque on each particle is given by: .. math:: - \begin{equation}\mathbf{\tau}_{twist,i} = \tau_{twist}\mathbf{n}\end{equation} + \mathbf{\tau}_{twist,i} = \tau_{twist}\mathbf{n} .. math:: - \begin{equation}\mathbf{\tau}_{twist,j} = -\mathbf{\tau}_{twist,i}\end{equation} + \mathbf{\tau}_{twist,j} = -\mathbf{\tau}_{twist,i} ---------- @@ -690,7 +688,7 @@ models. In that case, the effective elastic modulus is computed as: .. math:: - \begin{equation}E_{eff,ij} = \left(\frac{1-\nu_i^2}{E_i} + \frac{1-\nu_j^2}{E_j}\right)^{-1}\end{equation} + E_{eff,ij} = \left(\frac{1-\nu_i^2}{E_i} + \frac{1-\nu_j^2}{E_j}\right)^{-1} If the *i-j* coefficients :math:`E_{ij}` and :math:`\nu_{ij}` are explicitly specified, the effective modulus is computed as: @@ -698,14 +696,14 @@ explicitly specified, the effective modulus is computed as: .. math:: - \begin{equation}E_{eff,ij} = \left(\frac{1-\nu_{ij}^2}{E_{ij}} + \frac{1-\nu_{ij}^2}{E_{ij}}\right)^{-1}\end{equation} + E_{eff,ij} = \left(\frac{1-\nu_{ij}^2}{E_{ij}} + \frac{1-\nu_{ij}^2}{E_{ij}}\right)^{-1} or .. math:: - \begin{equation}E_{eff,ij} = \frac{E_{ij}}{2(1-\nu_{ij})}\end{equation} + E_{eff,ij} = \frac{E_{ij}}{2(1-\nu_{ij})} These pair styles write their information to :doc:`binary restart files `, so a pair\_style command does not need to be specified in an input script that reads a restart file. diff --git a/doc/src/pair_gromacs.rst b/doc/src/pair_gromacs.rst index f49401553b..fd309c25a0 100644 --- a/doc/src/pair_gromacs.rst +++ b/doc/src/pair_gromacs.rst @@ -1,31 +1,31 @@ -.. index:: pair\_style lj/gromacs +.. index:: pair_style lj/gromacs -pair\_style lj/gromacs command -============================== +pair_style lj/gromacs command +============================= -pair\_style lj/gromacs/gpu command -================================== - -pair\_style lj/gromacs/kk command +pair_style lj/gromacs/gpu command ================================= -pair\_style lj/gromacs/omp command -================================== +pair_style lj/gromacs/kk command +================================ -pair\_style lj/gromacs/coul/gromacs command -=========================================== +pair_style lj/gromacs/omp command +================================= -pair\_style lj/gromacs/coul/gromacs/kk command +pair_style lj/gromacs/coul/gromacs command +========================================== + +pair_style lj/gromacs/coul/gromacs/kk command +============================================= + +pair_style lj/gromacs/coul/gromacs/omp command ============================================== -pair\_style lj/gromacs/coul/gromacs/omp command -=============================================== - Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -45,15 +45,15 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/gromacs 9.0 12.0 - pair_coeff \* \* 100.0 2.0 + pair_coeff * * 100.0 2.0 pair_coeff 2 2 100.0 2.0 8.0 10.0 pair_style lj/gromacs/coul/gromacs 9.0 12.0 pair_style lj/gromacs/coul/gromacs 8.0 10.0 7.0 9.0 - pair_coeff \* \* 100.0 2.0 + pair_coeff * * 100.0 2.0 Description """"""""""" @@ -64,21 +64,30 @@ smoothly to zero between an inner and outer cutoff. It is a commonly used potential in the `GROMACS `_ MD code and for the coarse-grained models of :ref:`(Marrink) `. -.. image:: Eqs/pair_gromacs.jpg - :align: center +.. math:: -r1 is the inner cutoff; rc is the outer cutoff. The coefficients A, B, -and C are computed by LAMMPS to perform the shifting and smoothing. -The function -S(r) is actually applied once to each term of the LJ formula and once -to the Coulombic formula, so there are 2 or 3 sets of A,B,C coefficients -depending on which pair\_style is used. The boundary conditions -applied to the smoothing function are as follows: S'(r1) = S''(r1) = 0, -S(rc) = -E(rc), S'(rc) = -E'(rc), and S''(rc) = -E''(rc), -where E(r) is the corresponding term -in the LJ or Coulombic potential energy function. -Single and double primes denote first and second -derivatives with respect to r, respectively. + E_{LJ} = & 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - + \left(\frac{\sigma}{r}\right)^6 \right] + S_{LJ}(r) + \qquad r < r_c \\ + E_C = & \frac{C q_i q_j}{\epsilon r} + S_C(r) \qquad r < r_c \\ + S(r) = & C \qquad r < r_1 \\ + S(r) = & \frac{A}{3} (r - r_1)^3 + \frac{B}{4} (r - r_1)^4 + C \qquad r_1 < r < r_c \\ + A = & (-3 E'(r_c) + (r_c - r_1) E''(r_c))/(r_c - r_1)^2 \\ + B = & (2 E'(r_c) - (r_c - r_1) E''(r_c))/(r_c - r_1)^3 \\ + C = & -E(r_c) + \frac{1}{2} (r_c - r_1) E'(r_c) - \frac{1}{12} (r_c - r_1)^2 E''(r_c) + + +:math:`r_1` is the inner cutoff; :math:`r_c` is the outer cutoff. The +coefficients A, B, and C are computed by LAMMPS to perform the shifting +and smoothing. The function S(r) is actually applied once to each term +of the LJ formula and once to the Coulombic formula, so there are 2 or 3 +sets of A,B,C coefficients depending on which pair\_style is used. The +boundary conditions applied to the smoothing function are as follows: +:math:`S'(r_1) = S''(r_1) = 0, S(r_c) = -E(r_c), S'(r_c) = -E'(r_c)`, +and :math:`S''(r_c) = -E''(r_c)`, where E(r) is the corresponding term +in the LJ or Coulombic potential energy function. Single and double +primes denote first and second derivatives with respect to r, +respectively. The inner and outer cutoff for the LJ and Coulombic terms can be the same or different depending on whether 2 or 4 arguments are used in @@ -91,14 +100,13 @@ above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands, or by mixing as described below: -* epsilon (energy units) -* sigma (distance units) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) * inner (distance units) * outer (distance units) Note that sigma is defined in the LJ formula as the zero-crossing -distance for the potential, not as the energy minimum at 2\^(1/6) -sigma. +distance for the potential, not as the energy minimum at :math:`2^{1/6} \sigma`. The last 2 coefficients are optional inner and outer cutoffs for style *lj/gromacs*\ . If not specified, the global *inner* and *outer* values diff --git a/doc/src/pair_gw.rst b/doc/src/pair_gw.rst index 08d689cf27..06dfd240b3 100644 --- a/doc/src/pair_gw.rst +++ b/doc/src/pair_gw.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style gw +.. index:: pair_style gw -pair\_style gw command -====================== +pair_style gw command +===================== -pair\_style gw/zbl command -========================== +pair_style gw/zbl command +========================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style @@ -19,14 +19,13 @@ Syntax Examples """""""" -pair\_style gw -pair\_coeff \* \* SiC.gw Si C C +.. code-block:: LAMMPS - -.. parsed-literal:: + pair_style gw + pair_coeff * * SiC.gw Si C C pair_style gw/zbl - pair_coeff \* \* SiC.gw.zbl C Si + pair_coeff * * SiC.gw.zbl C Si Description """"""""""" @@ -60,9 +59,9 @@ If your LAMMPS simulation has 4 atoms types and you want the first 3 to be Si, and the 4th to be C, you would use the following pair\_coeff command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* SiC.gw Si Si Si C + pair_coeff * * SiC.gw Si Si Si C The first 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Si arguments map LAMMPS atom types 1,2,3 to the Si diff --git a/doc/src/pair_hbond_dreiding.rst b/doc/src/pair_hbond_dreiding.rst index c1370a8b1c..1deaf35c39 100644 --- a/doc/src/pair_hbond_dreiding.rst +++ b/doc/src/pair_hbond_dreiding.rst @@ -1,22 +1,22 @@ -.. index:: pair\_style hbond/dreiding/lj +.. index:: pair_style hbond/dreiding/lj -pair\_style hbond/dreiding/lj command -===================================== +pair_style hbond/dreiding/lj command +==================================== -pair\_style hbond/dreiding/lj/omp command -========================================= - -pair\_style hbond/dreiding/morse command +pair_style hbond/dreiding/lj/omp command ======================================== -pair\_style hbond/dreiding/morse/omp command -============================================ +pair_style hbond/dreiding/morse command +======================================= + +pair_style hbond/dreiding/morse/omp command +=========================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style N inner_distance_cutoff outer_distance_cutoff angle_cutof @@ -31,7 +31,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid/overlay lj/cut 10.0 hbond/dreiding/lj 4 9.0 11.0 90 pair_coeff 1 2 hbond/dreiding/lj 3 i 9.5 2.75 4 9.0 11.0 90.0 @@ -46,15 +46,28 @@ The *hbond/dreiding* styles compute the Acceptor-Hydrogen-Donor (AHD) 3-body hydrogen bond interaction for the :doc:`DREIDING ` force field, given by: -.. image:: Eqs/pair_hbond_dreiding.jpg - :align: center +.. math:: -where Rin is the inner spline distance cutoff, Rout is the outer -distance cutoff, theta\_c is the angle cutoff, and n is the cosine -periodicity. + E = & \left[LJ(r) | Morse(r) \right] \qquad \qquad \qquad r < r_{\rm in} \\ + = & S(r) * \left[LJ(r) | Morse(r) \right] \qquad \qquad r_{\rm in} < r < r_{\rm out} \\ + = & 0 \qquad \qquad \qquad \qquad \qquad \qquad \qquad r > r_{\rm out} \\ + LJ(r) = & AR^{-12}-BR^{-10}cos^n\theta= + \epsilon\left\lbrace 5\left[ \frac{\sigma}{r}\right]^{12}- + 6\left[ \frac{\sigma}{r}\right]^{10} \right\rbrace cos^n\theta\\ + Morse(r) = & D_0\left\lbrace \chi^2 - 2\chi\right\rbrace cos^n\theta= + D_{0}\left\lbrace e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} + \right\rbrace cos^n\theta \\ + S(r) = & \frac{ \left[r_{\rm out}^2 - r^2\right]^2 + \left[r_{\rm out}^2 + 2r^2 - 3{r_{\rm in}^2}\right]} + { \left[r_{\rm out}^2 - {r_{\rm in}}^2\right]^3 } + + +where :math:`r_{\rm in}` is the inner spline distance cutoff, +:math:`r_{\rm out}` is the outer distance cutoff, :math:`\theta_c` is +the angle cutoff, and *n* is the cosine periodicity. Here, *r* is the radial distance between the donor (D) and acceptor -(A) atoms and *theta* is the bond angle between the acceptor, the +(A) atoms and :math:`\theta` is the bond angle between the acceptor, the hydrogen (H) and the donor atoms: .. image:: JPG/dreiding_hbond.jpg @@ -137,11 +150,11 @@ follows: * K = hydrogen atom type = 1 to Ntypes * donor flag = *i* or *j* -* epsilon (energy units) -* sigma (distance units) -* n = exponent in formula above -* distance cutoff Rin (distance units) -* distance cutoff Rout (distance units) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) +* *n* = exponent in formula above +* distance cutoff :math:`r_{\rm in}` (distance units) +* distance cutoff :math:`r_{\rm out}` (distance units) * angle cutoff (degrees) For the *hbond/dreiding/morse* style the list of coefficients is as @@ -149,12 +162,12 @@ follows: * K = hydrogen atom type = 1 to Ntypes * donor flag = *i* or *j* -* D0 (energy units) -* alpha (1/distance units) -* r0 (distance units) -* n = exponent in formula above -* distance cutoff Rin (distance units) -* distance cutoff Rout (distance units) +* :math:`D_0` (energy units) +* :math:`\alpha` (1/distance units) +* :math:`r_0` (distance units) +* *n* = exponent in formula above +* distance cutoff :math:`r_{\rm in}` (distance units) +* distance cutoff :math:`r_{out}` (distance units) * angle cutoff (degrees) A single hydrogen atom type K can be specified, or a wild-card asterisk @@ -169,13 +182,13 @@ flag is *j*\ , then the atom of type J in the pair\_coeff command is treated as the donor and I is the donor. This option is required because the :doc:`pair_coeff ` command requires that I <= J. -Epsilon and sigma are settings for the hydrogen bond potential based -on a Lennard-Jones functional form. Note that sigma is defined as the -zero-crossing distance for the potential, not as the energy minimum at -2\^(1/6) sigma. +:math:`\epsilon` and :math:`\sigma` are settings for the hydrogen bond +potential based on a Lennard-Jones functional form. Note that sigma is +defined as the zero-crossing distance for the potential, not as the +energy minimum at :math:`2^{1/6} \sigma`. -D0 and alpha and r0 are settings for the hydrogen bond potential based -on a Morse functional form. +:math:`D_0` and :math:`\alpha` and :math:`r_0` are settings for the +hydrogen bond potential based on a Morse functional form. The last 3 coefficients for both styles are optional. If not specified, the global n, distance cutoff, and angle cutoff specified @@ -240,7 +253,7 @@ To print these quantities to the log file (with a descriptive column heading) the following commands could be included in an input script: -.. parsed-literal:: +.. code-block:: LAMMPS compute hb all pair hbond/dreiding/lj variable n_hbond equal c_hb[1] #number hbonds diff --git a/doc/src/pair_hybrid.rst b/doc/src/pair_hybrid.rst index 747a865049..d8abec1f4a 100644 --- a/doc/src/pair_hybrid.rst +++ b/doc/src/pair_hybrid.rst @@ -1,22 +1,22 @@ -.. index:: pair\_style hybrid +.. index:: pair_style hybrid -pair\_style hybrid command -========================== +pair_style hybrid command +========================= -pair\_style hybrid/kk command -============================= +pair_style hybrid/kk command +============================ -pair\_style hybrid/overlay command -================================== +pair_style hybrid/overlay command +================================= -pair\_style hybrid/overlay/kk command -===================================== +pair_style hybrid/overlay/kk command +==================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid style1 args style2 args ... pair_style hybrid/overlay style1 args style2 args ... @@ -27,16 +27,16 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid lj/cut/coul/cut 10.0 eam lj/cut 5.0 - pair_coeff 1\*2 1\*2 eam niu3 + pair_coeff 1*2 1*2 eam niu3 pair_coeff 3 3 lj/cut/coul/cut 1.0 1.0 - pair_coeff 1\*2 3 lj/cut 0.5 1.2 + pair_coeff 1*2 3 lj/cut 0.5 1.2 pair_style hybrid/overlay lj/cut 2.5 coul/long 2.0 - pair_coeff \* \* lj/cut 1.0 1.0 - pair_coeff \* \* coul/long + pair_coeff * * lj/cut 1.0 1.0 + pair_coeff * * coul/long Description """"""""""" @@ -101,12 +101,12 @@ are Ni atoms, type 3 are LJ atoms with charges. The following commands would set up a hybrid simulation: -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid eam/alloy lj/cut/coul/cut 10.0 lj/cut 8.0 - pair_coeff \* \* eam/alloy nialhjea Ni Ni NULL + pair_coeff * * eam/alloy nialhjea Ni Ni NULL pair_coeff 3 3 lj/cut/coul/cut 1.0 1.0 - pair_coeff 1\*2 3 lj/cut 0.8 1.3 + pair_coeff 1*2 3 lj/cut 0.8 1.3 As an example of using the same pair style multiple times, consider a simulation with 2 atom types. Type 1 is Si, type 2 is C. The @@ -114,11 +114,11 @@ following commands would model the Si atoms with Tersoff, the C atoms with Tersoff, and the cross-interactions with Lennard-Jones: -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid lj/cut 2.5 tersoff tersoff - pair_coeff \* \* tersoff 1 Si.tersoff Si NULL - pair_coeff \* \* tersoff 2 C.tersoff NULL C + pair_coeff * * tersoff 1 Si.tersoff Si NULL + pair_coeff * * tersoff 2 C.tersoff NULL C pair_coeff 1 2 lj/cut 1.0 1.5 If pair coefficients are specified in the data file read via the @@ -159,14 +159,14 @@ normal usage of the pair\_coeff command. E.g. these two sets of commands are the same: -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/cut 2.5 - pair_coeff \* \* 1.0 1.0 + pair_coeff * * 1.0 1.0 pair_coeff 2 2 1.5 0.8 pair_style hybrid/overlay lj/cut 2.5 - pair_coeff \* \* lj/cut 1.0 1.0 + pair_coeff * * lj/cut 1.0 1.0 pair_coeff 2 2 lj/cut 1.5 0.8 Coefficients must be defined for each pair of atoms types via the @@ -190,7 +190,7 @@ LJ potential). Or, for *hybrid* and *hybrid/overlay* simulations, you can use this form of the pair\_coeff command in your input script: -.. parsed-literal:: +.. code-block:: LAMMPS pair_coeff 2 3 none @@ -230,7 +230,7 @@ setting sets the 1-4 interactions to non-zero scaling factors and then overrides them with 0.0 only for CHARMM: -.. parsed-literal:: +.. code-block:: LAMMPS special_bonds amber pair_hybrid lj/charmm/coul/long 8.0 10.0 lj/cut/coul/long 10.0 @@ -239,7 +239,7 @@ then overrides them with 0.0 only for CHARMM: The this input achieves the same effect: -.. parsed-literal:: +.. code-block:: LAMMPS special_bonds 0.0 0.0 0.1 pair_hybrid lj/charmm/coul/long 8.0 10.0 lj/cut/coul/long 10.0 @@ -254,7 +254,7 @@ interactions have been set to 0. Note the global settings are effectively *lj/coul 0.0 0.0 0.5* as required for OPLS/AA: -.. parsed-literal:: +.. code-block:: LAMMPS special_bonds lj/coul 1e-20 1e-20 0.5 pair_hybrid tersoff lj/cut/coul/long 12.0 @@ -323,14 +323,14 @@ surface, but not between surfaces. Then either of these two command sequences would implement that model: -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid tersoff - pair_coeff \* \* tersoff SiC.tersoff C C + pair_coeff * * tersoff SiC.tersoff C C pair_coeff 1 2 none pair_style tersoff - pair_coeff \* \* SiC.tersoff C C + pair_coeff * * SiC.tersoff C C neigh_modify exclude type 1 2 Either way, only neighbor lists with 1-1 or 2-2 interactions would be @@ -344,11 +344,11 @@ interactions, and AIREBO for C/C interactions. Si atoms are type 1; C atoms are type 2. Something like this will work: -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid/overlay tersoff airebo 3.0 - pair_coeff \* \* tersoff SiC.tersoff.custom Si C - pair_coeff \* \* airebo CH.airebo NULL C + pair_coeff * * tersoff SiC.tersoff.custom Si C + pair_coeff * * airebo CH.airebo NULL C Note that to prevent the Tersoff potential from computing C/C interactions, you would need to modify the SiC.tersoff file to turn @@ -436,4 +436,5 @@ Related commands :doc:`pair_coeff ` -**Default:** none +**Default:** +none diff --git a/doc/src/pair_ilp_graphene_hbn.rst b/doc/src/pair_ilp_graphene_hbn.rst index 8299a02d62..a727d87eb6 100644 --- a/doc/src/pair_ilp_graphene_hbn.rst +++ b/doc/src/pair_ilp_graphene_hbn.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style ilp/graphene/hbn +.. index:: pair_style ilp/graphene/hbn -pair\_style ilp/graphene/hbn command -==================================== +pair_style ilp/graphene/hbn command +=================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style [hybrid/overlay ...] ilp/graphene/hbn cutoff tap_flag @@ -18,15 +18,15 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid/overlay ilp/graphene/hbn 16.0 1 - pair_coeff \* \* ilp/graphene/hbn BNCH.ILP B N C + pair_coeff * * ilp/graphene/hbn BNCH.ILP B N C pair_style hybrid/overlay rebo tersoff ilp/graphene/hbn 16.0 coul/shield 16.0 - pair_coeff \* \* rebo CH.rebo NULL NULL C - pair_coeff \* \* tersoff BNC.tersoff B N NULL - pair_coeff \* \* ilp/graphene/hbn BNCH.ILP B N C + pair_coeff * * rebo CH.rebo NULL NULL C + pair_coeff * * tersoff BNC.tersoff B N NULL + pair_coeff * * ilp/graphene/hbn BNCH.ILP B N C pair_coeff 1 1 coul/shield 0.70 pair_coeff 1 2 coul/shield 0.695 pair_coeff 2 2 coul/shield 0.69 @@ -40,13 +40,27 @@ potential (ILP) potential as described in :ref:`(Leven1) `, The normals are calculated in the way as described in :ref:`(Kolmogorov) `. -.. image:: Eqs/pair_ilp_graphene_hbn.jpg - :align: center +.. math:: -Where Tap(r\_ij) is the taper function which provides a continuous -cutoff (up to third derivative) for interatomic separations larger than -r\_c :ref:`(Maaravi) `. The definitions of each parameter in the above -equation can be found in :ref:`(Leven1) ` and :ref:`(Maaravi) `. + E = & \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\ + V_{ij} = & {\rm Tap}(r_{ij})\left \{ e^{-\alpha (r_{ij}/\beta -1)} + \left [ \epsilon + f(\rho_{ij}) + f(\rho_{ji})\right ] - + \frac{1}{1+e^{-d\left [ \left ( r_{ij}/\left (s_R \cdot r^{eff} \right ) \right )-1 \right ]}} + \cdot \frac{C_6}{r^6_{ij}} \right \}\\ + \rho_{ij}^2 = & r_{ij}^2 - ({\bf r}_{ij} \cdot {\bf n}_i)^2 \\ + \rho_{ji}^2 = & r_{ij}^2 - ({\bf r}_{ij} \cdot {\bf n}_j)^2 \\ + f(\rho) = & C e^{ -( \rho / \delta )^2 } \\ + {\rm Tap}(r_{ij}) = & 20\left ( \frac{r_{ij}}{R_{cut}} \right )^7 - + 70\left ( \frac{r_{ij}}{R_{cut}} \right )^6 + + 84\left ( \frac{r_{ij}}{R_{cut}} \right )^5 - + 35\left ( \frac{r_{ij}}{R_{cut}} \right )^4 + 1 + + +Where :math:`\mathrm{Tap}(r_{ij})` is the taper function which provides +a continuous cutoff (up to third derivative) for interatomic separations +larger than :math:`r_c` :ref:`(Maaravi) `. The definitions of +each parameter in the above equation can be found in :ref:`(Leven1) +` and :ref:`(Maaravi) `. It is important to include all the pairs to build the neighbor list for calculating the normals. @@ -106,7 +120,7 @@ To print these quantities to the log file (with descriptive column headings) the following commands could be included in an input script: -.. parsed-literal:: +.. code-block:: LAMMPS compute 0 all pair ilp/graphene/hbn variable Evdw equal c_0[1] diff --git a/doc/src/pair_kim.rst b/doc/src/pair_kim.rst index 88a47f900a..72f4908b53 100644 --- a/doc/src/pair_kim.rst +++ b/doc/src/pair_kim.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style kim +.. index:: pair_style kim -pair\_style kim command -======================= +pair_style kim command +====================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style kim model @@ -17,10 +17,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style kim SW_StillingerWeber_1985_Si__MO_405512056662_005 - pair_coeff \* \* Si + pair_coeff * * Si Description """"""""""" @@ -68,9 +68,9 @@ If the LAMMPS simulation has four atom types, where the first three are Si, and the fourth is C, the following *pair\_coeff* command would be used: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* Si Si Si C + pair_coeff * * Si Si Si C The first two arguments must be \* \* so as to span all LAMMPS atom types. The first three Si arguments map LAMMPS atom types 1, 2, and 3 to Si as diff --git a/doc/src/pair_kolmogorov_crespi_full.rst b/doc/src/pair_kolmogorov_crespi_full.rst index 9d5d03da09..d8b1f6db12 100644 --- a/doc/src/pair_kolmogorov_crespi_full.rst +++ b/doc/src/pair_kolmogorov_crespi_full.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style kolmogorov/crespi/full +.. index:: pair_style kolmogorov/crespi/full -pair\_style kolmogorov/crespi/full command -========================================== +pair_style kolmogorov/crespi/full command +========================================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid/overlay kolmogorov/crespi/full cutoff tap_flag @@ -18,15 +18,15 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid/overlay kolmogorov/crespi/full 20.0 0 - pair_coeff \* \* none - pair_coeff \* \* kolmogorov/crespi/full CH.KC C C + pair_coeff * * none + pair_coeff * * kolmogorov/crespi/full CH.KC C C pair_style hybrid/overlay rebo kolmogorov/crespi/full 16.0 1 - pair_coeff \* \* rebo CH.rebo C H - pair_coeff \* \* kolmogorov/crespi/full CH_taper.KC C H + pair_coeff * * rebo CH.rebo C H + pair_coeff * * kolmogorov/crespi/full CH_taper.KC C H Description """"""""""" @@ -35,15 +35,21 @@ The *kolmogorov/crespi/full* style computes the Kolmogorov-Crespi (KC) interaction potential as described in :ref:`(Kolmogorov) `. No simplification is made, -.. image:: Eqs/pair_kolmogorov_crespi_full.jpg - :align: center +.. math:: + + E = & \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\ + V_{ij} = & e^{-\lambda (r_{ij} -z_0)} \left [ C + f(\rho_{ij}) + f(\rho_{ji}) - A \left ( \frac{r_{ij}}{z_0}\right )^{-6} \right ] \\ + \rho_{ij}^2 = & r_{ij}^2 - ({\bf r}_{ij}\cdot {\bf n}_{i})^2 \\ + \rho_{ji}^2 = & r_{ij}^2 - ({\bf r}_{ij}\cdot {\bf n}_{j})^2 \\ + f(\rho) & = e^{-(\rho/\delta)^2} \sum_{n=0}^2 C_{2n} { (\rho/\delta) }^{2n} + It is important to have a sufficiently large cutoff to ensure smooth forces and to include all the pairs to build the neighbor list for calculating the normals. Energies are shifted so that they go continuously to zero at the cutoff assuming that the exponential part of -*Vij* (first term) decays sufficiently fast. This shift is achieved by -the last term in the equation for *Vij* above. This is essential only +:math:`V_{ij}` (first term) decays sufficiently fast. This shift is achieved by +the last term in the equation for :math:`V_{ij}` above. This is essential only when the tapper function is turned off. The formula of taper function can be found in pair style :doc:`ilp/graphene/hbn `. @@ -94,7 +100,7 @@ To print these quantities to the log file (with descriptive column headings) the following commands could be included in an input script: -.. parsed-literal:: +.. code-block:: LAMMPS compute 0 all pair kolmogorov/crespi/full variable Evdw equal c_0[1] diff --git a/doc/src/pair_kolmogorov_crespi_z.rst b/doc/src/pair_kolmogorov_crespi_z.rst index 4ba7bf0f9f..c697226504 100644 --- a/doc/src/pair_kolmogorov_crespi_z.rst +++ b/doc/src/pair_kolmogorov_crespi_z.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style kolmogorov/crespi/z +.. index:: pair_style kolmogorov/crespi/z -pair\_style kolmogorov/crespi/z command -======================================= +pair_style kolmogorov/crespi/z command +====================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style [hybrid/overlay ...] kolmogorov/crespi/z cutoff @@ -15,14 +15,14 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid/overlay kolmogorov/crespi/z 20.0 - pair_coeff \* \* none + pair_coeff * * none pair_coeff 1 2 kolmogorov/crespi/z CC.KC C C pair_style hybrid/overlay rebo kolmogorov/crespi/z 14.0 - pair_coeff \* \* rebo CH.rebo C C + pair_coeff * * rebo CH.rebo C C pair_coeff 1 2 kolmogorov/crespi/z CC.KC C C Description @@ -32,13 +32,19 @@ The *kolmogorov/crespi/z* style computes the Kolmogorov-Crespi interaction potential as described in :ref:`(Kolmogorov) `. An important simplification is made, which is to take all normals along the z-axis. -.. image:: Eqs/pair_kolmogorov_crespi_z.jpg - :align: center +.. math:: + + E = & \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\ + V_{ij} = & e^{-\lambda(r_{ij} -z_0}) \left[ C + f(\rho_{ij}) + f(\rho_{ji}) \right] - A \left( \frac{r_{ij}}{z_0}\right)^{-6} + A \left( \frac{\textrm{cutoff}}{z_0}\right)^{-6} \\ + \rho_{ij}^2 = & \rho_{ji}^2 = x_{ij}^2 + y_{ij}^2 \qquad \qquad (\mathbf{n}_i \equiv \mathbf{\hat{z}}) \\ + f(\rho) = & e^{-(\rho/\delta)^2} \sum_{n=0}^2 C_{2n} \left( \rho/\delta \right)^{2n} + + It is important to have a sufficiently large cutoff to ensure smooth forces. Energies are shifted so that they go continuously to zero at the cutoff assuming -that the exponential part of *Vij* (first term) decays sufficiently fast. -This shift is achieved by the last term in the equation for *Vij* above. +that the exponential part of :math:`V_{ij}` (first term) decays sufficiently fast. +This shift is achieved by the last term in the equation for :math:`V_{ij}` above. This potential is intended for interactions between two layers of graphene. Therefore, to avoid interaction between layers in multi-layered materials, diff --git a/doc/src/pair_lcbop.rst b/doc/src/pair_lcbop.rst index 5430b2dd23..f492b79919 100644 --- a/doc/src/pair_lcbop.rst +++ b/doc/src/pair_lcbop.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style lcbop +.. index:: pair_style lcbop -pair\_style lcbop command -========================= +pair_style lcbop command +======================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lcbop @@ -15,10 +15,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lcbop - pair_coeff \* \* ../potentials/C.lcbop C + pair_coeff * * ../potentials/C.lcbop C Description """"""""""" @@ -43,9 +43,9 @@ As an example, if your LAMMPS simulation has 4 atom types and you want the 1st 3 to be C you would use the following pair\_coeff command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* C.lcbop C C C NULL + pair_coeff * * C.lcbop C C C NULL The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. The first C argument maps LAMMPS atom type 1 to the C element in the diff --git a/doc/src/pair_lebedeva_z.rst b/doc/src/pair_lebedeva_z.rst index 1389bf66aa..b78a29fb54 100644 --- a/doc/src/pair_lebedeva_z.rst +++ b/doc/src/pair_lebedeva_z.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style lebedeva/z +.. index:: pair_style lebedeva/z -pair\_style lebedeva/z command -============================== +pair_style lebedeva/z command +============================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style [hybrid/overlay ...] lebedeva/z cutoff @@ -15,14 +15,14 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid/overlay lebedeva/z 20.0 - pair_coeff \* \* none + pair_coeff * * none pair_coeff 1 2 lebedeva/z CC.Lebedeva C C pair_style hybrid/overlay rebo lebedeva/z 14.0 - pair_coeff \* \* rebo CH.rebo C C + pair_coeff * * rebo CH.rebo C C pair_coeff 1 2 lebedeva/z CC.Lebedeva C C Description @@ -32,13 +32,20 @@ The *lebedeva/z* style computes the Lebedeva interaction potential as described in :ref:`(Lebedeva et al.) `. An important simplification is made, which is to take all normals along the z-axis. -.. image:: Eqs/pair_lebedeva.png - :align: center +.. math:: + + E = & \frac{1}{2} \sum_i \sum_{i \neq j} V_{ij}\\ + V_{ij} = & B e^{-\alpha(r_{ij} - z_0)} \\ + & + C(1 + D_1\rho^2_{ij} + D_2\rho^4_{ij} e^{-\lambda_1\rho^2_{ij}} e^{-\lambda_2 (z^2_{ij} - z^2_0)} \\ + & - A \left(\frac{z_0}{r_ij}\right)^6 + A \left( \frac{z_0}{r_c} \right)^6 \\ + \rho^2_{ij} = & x^2_{ij} + y^2_{ij} \qquad (\mathbf{n_i} \equiv \mathbf{\hat{z}}) + + It is important to have a sufficiently large cutoff to ensure smooth forces. Energies are shifted so that they go continuously to zero at the cutoff assuming -that the exponential part of *Vij* (first term) decays sufficiently fast. -This shift is achieved by the last term in the equation for *Vij* above. +that the exponential part of :math:`V_{ij}` (first term) decays sufficiently fast. +This shift is achieved by the last term in the equation for :math:`V_{ij}` above. The parameter file (e.g. CC.Lebedeva), is intended for use with metal :doc:`units `, with energies in meV. An additional parameter, *S*\ , diff --git a/doc/src/pair_line_lj.rst b/doc/src/pair_line_lj.rst index 4c52e82b42..3840158fbc 100644 --- a/doc/src/pair_line_lj.rst +++ b/doc/src/pair_line_lj.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style line/lj +.. index:: pair_style line/lj -pair\_style line/lj command -=========================== +pair_style line/lj command +========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style line/lj cutoff @@ -17,10 +17,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style line/lj 3.0 - pair_coeff \* \* 1.0 1.0 1.0 0.8 1.12 + pair_coeff * * 1.0 1.0 1.0 0.8 1.12 pair_coeff 1 2 1.0 2.0 1.0 1.5 1.12 5.0 pair_coeff 1 2 1.0 0.0 1.0 1.0 2.5 diff --git a/doc/src/pair_lj.rst b/doc/src/pair_lj.rst index 4f41ce3a54..ff1b841223 100644 --- a/doc/src/pair_lj.rst +++ b/doc/src/pair_lj.rst @@ -1,115 +1,115 @@ -.. index:: pair\_style lj/cut +.. index:: pair_style lj/cut -pair\_style lj/cut command -========================== +pair_style lj/cut command +========================= -pair\_style lj/cut/gpu command -============================== - -pair\_style lj/cut/intel command -================================ - -pair\_style lj/cut/kk command +pair_style lj/cut/gpu command ============================= -pair\_style lj/cut/opt command -============================== +pair_style lj/cut/intel command +=============================== -pair\_style lj/cut/omp command -============================== +pair_style lj/cut/kk command +============================ -pair\_style lj/cut/coul/cut command -=================================== +pair_style lj/cut/opt command +============================= -pair\_style lj/cut/coul/cut/gpu command -======================================= +pair_style lj/cut/omp command +============================= -pair\_style lj/cut/coul/cut/kk command +pair_style lj/cut/coul/cut command +================================== + +pair_style lj/cut/coul/cut/gpu command ====================================== -pair\_style lj/cut/coul/cut/omp command -======================================= - -pair\_style lj/cut/coul/debye command +pair_style lj/cut/coul/cut/kk command ===================================== -pair\_style lj/cut/coul/debye/gpu command -========================================= - -pair\_style lj/cut/coul/debye/kk command -======================================== - -pair\_style lj/cut/coul/debye/omp command -========================================= - -pair\_style lj/cut/coul/dsf command -=================================== - -pair\_style lj/cut/coul/dsf/gpu command -======================================= - -pair\_style lj/cut/coul/dsf/kk command +pair_style lj/cut/coul/cut/omp command ====================================== -pair\_style lj/cut/coul/dsf/omp command -======================================= - -pair\_style lj/cut/coul/long command +pair_style lj/cut/coul/debye command ==================================== -pair\_style lj/cut/coul/long/gpu command +pair_style lj/cut/coul/debye/gpu command ======================================== -pair\_style lj/cut/coul/long/kk command +pair_style lj/cut/coul/debye/kk command ======================================= -pair\_style lj/cut/coul/long/intel command -========================================== - -pair\_style lj/cut/coul/long/opt command +pair_style lj/cut/coul/debye/omp command ======================================== -pair\_style lj/cut/coul/long/omp command -======================================== +pair_style lj/cut/coul/dsf command +================================== -pair\_style lj/cut/coul/msm command -=================================== +pair_style lj/cut/coul/dsf/gpu command +====================================== -pair\_style lj/cut/coul/msm/gpu command -======================================= - -pair\_style lj/cut/coul/msm/omp command -======================================= - -pair\_style lj/cut/coul/wolf command -==================================== - -pair\_style lj/cut/coul/wolf/omp command -======================================== - -pair\_style lj/cut/tip4p/cut command -==================================== - -pair\_style lj/cut/tip4p/cut/omp command -======================================== - -pair\_style lj/cut/tip4p/long command +pair_style lj/cut/coul/dsf/kk command ===================================== -pair\_style lj/cut/tip4p/long/gpu command +pair_style lj/cut/coul/dsf/omp command +====================================== + +pair_style lj/cut/coul/long command +=================================== + +pair_style lj/cut/coul/long/gpu command +======================================= + +pair_style lj/cut/coul/long/kk command +====================================== + +pair_style lj/cut/coul/long/intel command ========================================= -pair\_style lj/cut/tip4p/long/omp command -========================================= +pair_style lj/cut/coul/long/opt command +======================================= -pair\_style lj/cut/tip4p/long/opt command -========================================= +pair_style lj/cut/coul/long/omp command +======================================= + +pair_style lj/cut/coul/msm command +================================== + +pair_style lj/cut/coul/msm/gpu command +====================================== + +pair_style lj/cut/coul/msm/omp command +====================================== + +pair_style lj/cut/coul/wolf command +=================================== + +pair_style lj/cut/coul/wolf/omp command +======================================= + +pair_style lj/cut/tip4p/cut command +=================================== + +pair_style lj/cut/tip4p/cut/omp command +======================================= + +pair_style lj/cut/tip4p/long command +==================================== + +pair_style lj/cut/tip4p/long/gpu command +======================================== + +pair_style lj/cut/tip4p/long/omp command +======================================== + +pair_style lj/cut/tip4p/long/opt command +======================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -159,50 +159,50 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/cut 2.5 - pair_coeff \* \* 1 1 + pair_coeff * * 1 1 pair_coeff 1 1 1 1.1 2.8 pair_style lj/cut/coul/cut 10.0 pair_style lj/cut/coul/cut 10.0 8.0 - pair_coeff \* \* 100.0 3.0 + pair_coeff * * 100.0 3.0 pair_coeff 1 1 100.0 3.5 9.0 pair_coeff 1 1 100.0 3.5 9.0 9.0 pair_style lj/cut/coul/debye 1.5 3.0 pair_style lj/cut/coul/debye 1.5 2.5 5.0 - pair_coeff \* \* 1.0 1.0 + pair_coeff * * 1.0 1.0 pair_coeff 1 1 1.0 1.5 2.5 pair_coeff 1 1 1.0 1.5 2.5 5.0 pair_style lj/cut/coul/dsf 0.05 2.5 10.0 - pair_coeff \* \* 1.0 1.0 + pair_coeff * * 1.0 1.0 pair_coeff 1 1 1.0 1.0 2.5 pair_style lj/cut/coul/long 10.0 pair_style lj/cut/coul/long 10.0 8.0 - pair_coeff \* \* 100.0 3.0 + pair_coeff * * 100.0 3.0 pair_coeff 1 1 100.0 3.5 9.0 pair_style lj/cut/coul/msm 10.0 pair_style lj/cut/coul/msm 10.0 8.0 - pair_coeff \* \* 100.0 3.0 + pair_coeff * * 100.0 3.0 pair_coeff 1 1 100.0 3.5 9.0 pair_style lj/cut/tip4p/cut 1 2 7 8 0.15 12.0 pair_style lj/cut/tip4p/cut 1 2 7 8 0.15 12.0 10.0 - pair_coeff \* \* 100.0 3.0 + pair_coeff * * 100.0 3.0 pair_coeff 1 1 100.0 3.5 9.0 pair_style lj/cut/coul/wolf 0.2 5. 10.0 - pair_coeff \* \* 1.0 1.0 + pair_coeff * * 1.0 1.0 pair_coeff 1 1 1.0 1.0 2.5 pair_style lj/cut/tip4p/long 1 2 7 8 0.15 12.0 pair_style lj/cut/tip4p/long 1 2 7 8 0.15 12.0 10.0 - pair_coeff \* \* 100.0 3.0 + pair_coeff * * 100.0 3.0 pair_coeff 1 1 100.0 3.5 9.0 Description @@ -211,39 +211,51 @@ Description The *lj/cut* styles compute the standard 12/6 Lennard-Jones potential, given by -.. image:: Eqs/pair_lj.jpg - :align: center +.. math:: + + E = 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - + \left(\frac{\sigma}{r}\right)^6 \right] + \qquad r < r_c + Rc is the cutoff. Style *lj/cut/coul/cut* adds a Coulombic pairwise interaction given by -.. image:: Eqs/pair_coulomb.jpg - :align: center +.. math:: -where C is an energy-conversion constant, Qi and Qj are the charges on -the 2 atoms, and epsilon is the dielectric constant which can be set -by the :doc:`dielectric ` command. If one cutoff is -specified in the pair\_style command, it is used for both the LJ and -Coulombic terms. If two cutoffs are specified, they are used as -cutoffs for the LJ and Coulombic terms respectively. + E = \frac{C q_i q_j}{\epsilon r} \qquad r < r_c + + +where C is an energy-conversion constant, :math:`q_i` and :math:`q_j` +are the charges on the 2 atoms, and :math:`\epsilon` is the dielectric +constant which can be set by the :doc:`dielectric ` command. +If one cutoff is specified in the pair\_style command, it is used for +both the LJ and Coulombic terms. If two cutoffs are specified, they are +used as cutoffs for the LJ and Coulombic terms respectively. Style *lj/cut/coul/debye* adds an additional exp() damping factor to the Coulombic term, given by -.. image:: Eqs/pair_debye.jpg - :align: center +.. math:: -where kappa is the inverse of the Debye length. This potential is -another way to mimic the screening effect of a polar solvent. + E = \frac{C q_i q_j}{\epsilon r} \exp(- \kappa r) \qquad r < r_c + + +where :math:`\kappa` is the inverse of the Debye length. This potential +is another way to mimic the screening effect of a polar solvent. Style *lj/cut/coul/dsf* computes the Coulombic term via the damped shifted force model described in :ref:`Fennell `, given by: -.. image:: Eqs/pair_coul_dsf.jpg - :align: center +.. math:: -where *alpha* is the damping parameter and erfc() is the complementary + E = + q_iq_j \left[ \frac{\mbox{erfc} (\alpha r)}{r} - \frac{\mbox{erfc} (\alpha r_c)}{r_c} + + \left( \frac{\mbox{erfc} (\alpha r_c)}{r_c^2} + \frac{2\alpha}{\sqrt{\pi}}\frac{\exp (-\alpha^2 r^2_c)}{r_c} \right)(r-r_c) \right] \qquad r < r_c + + +where :math:`\alpha` is the damping parameter and erfc() is the complementary error-function. This potential is essentially a short-range, spherically-truncated, charge-neutralized, shifted, pairwise *1/r* summation. The potential is based on Wolf summation, proposed as an @@ -253,7 +265,7 @@ effectively short-ranged. In order for the electrostatic sum to be absolutely convergent, charge neutralization within the cutoff radius is enforced by shifting the potential through placement of image charges on the cutoff sphere. Convergence can often be improved by -setting *alpha* to a small non-zero value. +setting :math:`\alpha` to a small non-zero value. Styles *lj/cut/coul/long* and *lj/cut/coul/msm* compute the same Coulombic interactions as style *lj/cut/coul/cut* except that an @@ -267,21 +279,26 @@ computed in reciprocal space. Style *coul/wolf* adds a Coulombic pairwise interaction via the Wolf summation method, described in :ref:`Wolf `, given by: -.. image:: Eqs/pair_coul_wolf.jpg - :align: center +.. math:: -where *alpha* is the damping parameter, and erfc() is the -complementary error-function terms. This potential -is essentially a short-range, spherically-truncated, -charge-neutralized, shifted, pairwise *1/r* summation. With a -manipulation of adding and subtracting a self term (for i = j) to the -first and second term on the right-hand-side, respectively, and a -small enough *alpha* damping parameter, the second term shrinks and -the potential becomes a rapidly-converging real-space summation. With -a long enough cutoff and small enough alpha parameter, the energy and -forces calculated by the Wolf summation method approach those of the -Ewald sum. So it is a means of getting effective long-range -interactions with a short-range potential. + E_i = \frac{1}{2} \sum_{j \neq i} + \frac{q_i q_j {\rm erfc}(\alpha r_{ij})}{r_{ij}} + + \frac{1}{2} \sum_{j \neq i} + \frac{q_i q_j {\rm erf}(\alpha r_{ij})}{r_{ij}} \qquad r < r_c + + +where :math:`\alpha` is the damping parameter, and erfc() is the +complementary error-function terms. This potential is essentially a +short-range, spherically-truncated, charge-neutralized, shifted, +pairwise *1/r* summation. With a manipulation of adding and subtracting +a self term (for i = j) to the first and second term on the +right-hand-side, respectively, and a small enough :math:`\alpha` damping +parameter, the second term shrinks and the potential becomes a +rapidly-converging real-space summation. With a long enough cutoff and +small enough alpha parameter, the energy and forces calculated by the +Wolf summation method approach those of the Ewald sum. So it is a means +of getting effective long-range interactions with a short-range +potential. Styles *lj/cut/tip4p/cut* and *lj/cut/tip4p/long* implement the TIP4P water model of :ref:`(Jorgensen) `, which introduces a massless @@ -319,14 +336,13 @@ the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands, or by mixing as described below: -* epsilon (energy units) -* sigma (distance units) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) * cutoff1 (distance units) * cutoff2 (distance units) -Note that sigma is defined in the LJ formula as the zero-crossing -distance for the potential, not as the energy minimum at 2\^(1/6) -sigma. +Note that :math:`\sigma` is defined in the LJ formula as the zero-crossing +distance for the potential, not as the energy minimum at :math:`2^{\frac{1}{6}} \sigma`. The latter 2 coefficients are optional. If not specified, the global LJ and Coulombic cutoffs specified in the pair\_style command are used. @@ -346,10 +362,12 @@ pair\_style command. ---------- -A version of these styles with a soft core, *lj/cut/soft*\ , suitable for use in -free energy calculations, is part of the USER-FEP package and is documented with -the :doc:`pair_style */soft ` styles. The version with soft core is -only available if LAMMPS was built with that package. See the :doc:`Build package ` doc page for more info. +A version of these styles with a soft core, *lj/cut/soft*\ , suitable +for use in free energy calculations, is part of the USER-FEP package and +is documented with the :doc:`pair_style */soft ` +styles. The version with soft core is only available if LAMMPS was built +with that package. See the :doc:`Build package ` doc page +for more info. ---------- diff --git a/doc/src/pair_lj96.rst b/doc/src/pair_lj96.rst index 45f4cd783a..2f2dcc76e4 100644 --- a/doc/src/pair_lj96.rst +++ b/doc/src/pair_lj96.rst @@ -1,19 +1,19 @@ -.. index:: pair\_style lj96/cut +.. index:: pair_style lj96/cut -pair\_style lj96/cut command -============================ +pair_style lj96/cut command +=========================== -pair\_style lj96/cut/gpu command -================================ +pair_style lj96/cut/gpu command +=============================== -pair\_style lj96/cut/omp command -================================ +pair_style lj96/cut/omp command +=============================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj96/cut cutoff @@ -23,10 +23,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj96/cut 2.5 - pair_coeff \* \* 1.0 1.0 4.0 + pair_coeff * * 1.0 1.0 4.0 pair_coeff 1 1 1.0 1.0 Description @@ -35,10 +35,14 @@ Description The *lj96/cut* style compute a 9/6 Lennard-Jones potential, instead of the standard 12/6 potential, given by -.. image:: Eqs/pair_lj96.jpg - :align: center +.. math:: -Rc is the cutoff. + E = 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{9} - + \left(\frac{\sigma}{r}\right)^6 \right] + \qquad r < r_c + + +:math:`r_c` is the cutoff. The following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples @@ -46,8 +50,8 @@ above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands, or by mixing as described below: -* epsilon (energy units) -* sigma (distance units) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) * cutoff (distance units) The last coefficient is optional. If not specified, the global LJ @@ -111,7 +115,7 @@ details. Restrictions """""""""""" - none +none Related commands """""""""""""""" diff --git a/doc/src/pair_lj_cubic.rst b/doc/src/pair_lj_cubic.rst index aa30adc6ed..f975a65524 100644 --- a/doc/src/pair_lj_cubic.rst +++ b/doc/src/pair_lj_cubic.rst @@ -1,19 +1,19 @@ -.. index:: pair\_style lj/cubic +.. index:: pair_style lj/cubic -pair\_style lj/cubic command -============================ +pair_style lj/cubic command +=========================== -pair\_style lj/cubic/gpu command -================================ +pair_style lj/cubic/gpu command +=============================== -pair\_style lj/cubic/omp command -================================ +pair_style lj/cubic/omp command +=============================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/cubic @@ -21,10 +21,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/cubic - pair_coeff \* \* 1.0 0.8908987 + pair_coeff * * 1.0 0.8908987 Description """"""""""" @@ -39,15 +39,19 @@ point. The cubic coefficient A3 is chosen so that both energy and force go to zero at the cutoff distance. Outside the cutoff distance the energy and force are zero. -.. image:: Eqs/pair_lj_cubic.jpg - :align: center +.. math:: -The location of the inflection point rs is defined -by the LJ diameter, rs/sigma = (26/7)\^1/6. The cutoff distance -is defined by rc/rs = 67/48 or rc/sigma = 1.737.... + E & = u_{LJ}(r) \qquad r \leq r_s \\ + & = u_{LJ}(r_s) + (r-r_s) u'_{LJ}(r_s) - \frac{1}{6} A_3 (r-r_s)^3 \qquad r_s < r \leq r_c \\ + & = 0 \qquad r > r_c + + +The location of the inflection point :math:`r_s` is defined +by the LJ diameter, :math:`r_s/\sigma = (26/7)^{1/6}`. The cutoff distance +is defined by :math:`r_c/r_s = 67/48` or :math:`r_c/\sigma = 1.737...` The analytic expression for the the cubic coefficient -A3\*rmin\^3/epsilon = 27.93... is given in the paper by +:math:`A_3 r_{min}^3/\epsilon = 27.93...` is given in the paper by Holian and Ravelo :ref:`(Holian) `. This potential is commonly used to study the shock mechanics of FCC @@ -59,13 +63,13 @@ or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands, or by mixing as described below: -* epsilon (energy units) -* sigma (distance units) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) -Note that sigma is defined in the LJ formula as the zero-crossing -distance for the potential, not as the energy minimum, which is -located at rmin = 2\^(1/6)\*sigma. In the above example, sigma = -0.8908987, so rmin = 1. +Note that :math:`\sigma` is defined in the LJ formula as the +zero-crossing distance for the potential, not as the energy minimum, +which is located at :math:`r_{min} = 2^{\frac{1}{6}} \sigma`. In the +above example, :math:`\sigma = 0.8908987`, so :math:`r_{min} = 1.0`. ---------- diff --git a/doc/src/pair_lj_expand.rst b/doc/src/pair_lj_expand.rst index e2d2d644a1..8d69c760ad 100644 --- a/doc/src/pair_lj_expand.rst +++ b/doc/src/pair_lj_expand.rst @@ -1,28 +1,28 @@ -.. index:: pair\_style lj/expand +.. index:: pair_style lj/expand -pair\_style lj/expand command -============================= +pair_style lj/expand command +============================ -pair\_style lj/expand/gpu command -================================= - -pair\_style lj/expand/kk command +pair_style lj/expand/gpu command ================================ -pair\_style lj/expand/omp command -================================= +pair_style lj/expand/kk command +=============================== -pair\_style lj/expand/coul/long command -======================================= +pair_style lj/expand/omp command +================================ -pair\_style lj/expand/coul/long/gpu command -=========================================== +pair_style lj/expand/coul/long command +====================================== + +pair_style lj/expand/coul/long/gpu command +========================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/expand cutoff @@ -32,15 +32,15 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/expand 2.5 - pair_coeff \* \* 1.0 1.0 0.5 + pair_coeff * * 1.0 1.0 0.5 pair_coeff 1 1 1.0 1.0 -0.2 2.0 pair_style lj/expand/coul/long 2.5 pair_style lj/expand/coul/long 2.5 4.0 - pair_coeff \* \* 1.0 1.0 0.5 + pair_coeff * * 1.0 1.0 0.5 pair_coeff 1 1 1.0 1.0 -0.2 3.0 Description @@ -51,36 +51,40 @@ delta which can be useful when particles are of different sizes, since it is different that using different sigma values in a standard LJ formula: -.. image:: Eqs/pair_lj_expand.jpg - :align: center +.. math:: -Rc is the cutoff which does not include the delta distance. I.e. the -actual force cutoff is the sum of cutoff + delta. + E = 4 \epsilon \left[ \left(\frac{\sigma}{r - \Delta}\right)^{12} - + \left(\frac{\sigma}{r - \Delta}\right)^6 \right] + \qquad r < r_c + \Delta + + +:math:`r_c` is the cutoff which does not include the :math:`\Delta` +distance. I.e. the actual force cutoff is the sum of :math:`r_c + +\Delta`. For all of the *lj/expand* pair styles, the following coefficients must -be defined for each pair of atoms types via the -:doc:`pair_coeff ` command as in the examples above, or in -the data file or restart files read by the :doc:`read_data ` -or :doc:`read_restart ` commands, or by mixing as -described below: +be defined for each pair of atoms types via the :doc:`pair_coeff +` command as in the examples above, or in the data file or +restart files read by the :doc:`read_data ` or +:doc:`read_restart ` commands, or by mixing as described +below: -* epsilon (energy units) -* sigma (distance units) -* delta (distance units) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) +* :math:`\Delta` (distance units) * cutoff (distance units) -The delta values can be positive or negative. The last coefficient is -optional. If not specified, the global LJ cutoff is used. +The :math:`\Delta` values can be positive or negative. The last +coefficient is optional. If not specified, the global LJ cutoff is +used. For *lj/expand/coul/long* only the LJ cutoff can be specified since a Coulombic cutoff cannot be specified for an individual I,J type pair. All type pairs use the same global Coulombic cutoff specified in the pair\_style command. - ---------- - Styles with a *gpu*\ , *intel*\ , *kk*\ , *omp*\ , or *opt* suffix are functionally the same as the corresponding style without the suffix. They have been optimized to run faster, depending on your available @@ -135,7 +139,7 @@ This pair style can only be used via the *pair* keyword of the Restrictions """""""""""" - none +none Related commands """""""""""""""" diff --git a/doc/src/pair_lj_long.rst b/doc/src/pair_lj_long.rst index 82f3782dae..628eb40664 100644 --- a/doc/src/pair_lj_long.rst +++ b/doc/src/pair_lj_long.rst @@ -1,28 +1,28 @@ -.. index:: pair\_style lj/long/coul/long +.. index:: pair_style lj/long/coul/long -pair\_style lj/long/coul/long command +pair_style lj/long/coul/long command +==================================== + +pair_style lj/long/coul/long/intel command +========================================== + +pair_style lj/long/coul/long/omp command +======================================== + +pair_style lj/long/coul/long/opt command +======================================== + +pair_style lj/long/tip4p/long command ===================================== -pair\_style lj/long/coul/long/intel command -=========================================== - -pair\_style lj/long/coul/long/omp command +pair_style lj/long/tip4p/long/omp command ========================================= -pair\_style lj/long/coul/long/opt command -========================================= - -pair\_style lj/long/tip4p/long command -====================================== - -pair\_style lj/long/tip4p/long/omp command -========================================== - Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -59,34 +59,41 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/long/coul/long cut off 2.5 pair_style lj/long/coul/long cut long 2.5 4.0 pair_style lj/long/coul/long long long 2.5 4.0 - pair_coeff \* \* 1 1 + pair_coeff * * 1 1 pair_coeff 1 1 1 3 4 pair_style lj/long/tip4p/long long long 1 2 7 8 0.15 12.0 pair_style lj/long/tip4p/long long long 1 2 7 8 0.15 12.0 10.0 - pair_coeff \* \* 100.0 3.0 + pair_coeff * * 100.0 3.0 pair_coeff 1 1 100.0 3.5 9.0 Description """"""""""" -Style *lj/long/coul/long* computes the standard 12/6 Lennard-Jones and -Coulombic potentials, given by +Style *lj/long/coul/long* computes the standard 12/6 Lennard-Jones potential: -.. image:: Eqs/pair_lj.jpg - :align: center +.. math:: -.. image:: Eqs/pair_coulomb.jpg - :align: center + E = 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - + \left(\frac{\sigma}{r}\right)^6 \right] + \qquad r < r_c \\ -where C is an energy-conversion constant, Qi and Qj are the charges on -the 2 atoms, epsilon is the dielectric constant which can be set by -the :doc:`dielectric ` command, and Rc is the cutoff. If +with :math:`\epsilon` and :math:`\sigma` being the usual Lennard-Jones +potential parameters, plus the Coulomb potential, given by: + +.. math:: + + E = \frac{C q_i q_j}{\epsilon r} \qquad r < r_c + + +where C is an energy-conversion constant, :math:`q_i` and :math:`q_j` are the charges on +the 2 atoms, :math:`\epsilon` is the dielectric constant which can be set by +the :doc:`dielectric ` command, and :math:`r_c` is the cutoff. If one cutoff is specified in the pair\_style command, it is used for both the LJ and Coulombic terms. If two cutoffs are specified, they are used as cutoffs for the LJ and Coulombic terms respectively. @@ -147,8 +154,8 @@ above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands, or by mixing as described below: -* epsilon (energy units) -* sigma (distance units) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) * cutoff1 (distance units) * cutoff2 (distance units) diff --git a/doc/src/pair_lj_smooth.rst b/doc/src/pair_lj_smooth.rst index f5e0bd53a3..d4be64fcc1 100644 --- a/doc/src/pair_lj_smooth.rst +++ b/doc/src/pair_lj_smooth.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style lj/smooth +.. index:: pair_style lj/smooth -pair\_style lj/smooth command -============================= +pair_style lj/smooth command +============================ -pair\_style lj/smooth/omp command -================================= +pair_style lj/smooth/omp command +================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/smooth Rin Rc @@ -21,10 +21,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/smooth 8.0 10.0 - pair_coeff \* \* 10.0 1.5 + pair_coeff * * 10.0 1.5 pair_coeff 1 1 20.0 1.3 7.0 9.0 Description @@ -33,12 +33,18 @@ Description Style *lj/smooth* computes a LJ interaction with a force smoothing applied between the inner and outer cutoff. -.. image:: Eqs/pair_lj_smooth.jpg - :align: center +.. math:: + + E & = 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - + \left(\frac{\sigma}{r}\right)^6 \right] + \qquad r < r_{in} \\ + F & = C_1 + C_2 (r - r_{in}) + C_3 (r - r_{in})^2 + C_4 (r - r_{in})^3 + \qquad r_{in} < r < r_c + The polynomial coefficients C1, C2, C3, C4 are computed by LAMMPS to -cause the force to vary smoothly from the inner cutoff Rin to the -outer cutoff Rc. +cause the force to vary smoothly from the inner cutoff :math:`r_{in}` to the +outer cutoff :math:`r_c`. At the inner cutoff the force and its 1st derivative will match the non-smoothed LJ formula. At the outer cutoff the force @@ -58,13 +64,13 @@ above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands, or by mixing as described below: -* epsilon (energy units) -* sigma (distance units) -* inner (distance units) -* outer (distance units) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) +* :math:`r_{in}` (distance units) +* :math:`r_c` (distance units) The last 2 coefficients are optional inner and outer cutoffs. If not -specified, the global values for Rin and Rc are used. +specified, the global values for :math:`r_{in}` and :math:`r_c` are used. ---------- @@ -125,7 +131,7 @@ This pair style can only be used via the *pair* keyword of the Restrictions """""""""""" - none +none Related commands """""""""""""""" diff --git a/doc/src/pair_lj_smooth_linear.rst b/doc/src/pair_lj_smooth_linear.rst index 5eb09d972f..42da051b57 100644 --- a/doc/src/pair_lj_smooth_linear.rst +++ b/doc/src/pair_lj_smooth_linear.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style lj/smooth/linear +.. index:: pair_style lj/smooth/linear -pair\_style lj/smooth/linear command -==================================== +pair_style lj/smooth/linear command +=================================== -pair\_style lj/smooth/linear/omp command -======================================== +pair_style lj/smooth/linear/omp command +======================================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/smooth/linear cutoff @@ -20,10 +20,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/smooth/linear 2.5 - pair_coeff \* \* 1.0 1.0 + pair_coeff * * 1.0 1.0 pair_coeff 1 1 0.3 3.0 9.0 Description @@ -35,8 +35,12 @@ standard 12/6 Lennard-Jones function and subtracts a linear term based on the cutoff distance, so that both, the potential and the force, go continuously to zero at the cutoff Rc :ref:`(Toxvaerd) `: -.. image:: Eqs/pair_lj_smooth_linear.jpg - :align: center +.. math:: + + \phi\left(r\right) & = 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - + \left(\frac{\sigma}{r}\right)^6 \right] \\ + E\left(r\right) & = \phi\left(r\right) - \phi\left(R_c\right) - \left(r - R_c\right) \left.\frac{d\phi}{d r} \right|_{r=R_c} \qquad r < R_c + The following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples @@ -44,8 +48,8 @@ above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands, or by mixing as described below: -* epsilon (energy units) -* sigma (distance units) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) * cutoff (distance units) The last coefficient is optional. If not specified, the global diff --git a/doc/src/pair_lj_switch3_coulgauss_long.rst b/doc/src/pair_lj_switch3_coulgauss_long.rst index cc7263b36e..5f3a797040 100644 --- a/doc/src/pair_lj_switch3_coulgauss_long.rst +++ b/doc/src/pair_lj_switch3_coulgauss_long.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style lj/switch3/coulgauss/long +.. index:: pair_style lj/switch3/coulgauss/long -pair\_style lj/switch3/coulgauss/long command -============================================= +pair_style lj/switch3/coulgauss/long command +============================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -26,7 +26,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/switch3/coulgauss/long 12.0 3.0 pair_coeff 1 0.2 2.5 1.2 @@ -40,26 +40,35 @@ Description The *lj/switch3/coulgauss* style evaluates the LJ vdW potential -.. image:: Eqs/pair_lj_switch3.jpg - :align: center +.. math:: + + E = 4\epsilon \left[ \left(\frac{\sigma}{r}\right)^{12}-\left(\frac{\sigma}{r}\right)^{6} \right] , which goes smoothly to zero at the cutoff r\_c as defined by the switching function -.. image:: Eqs/pair_switch3.jpg - :align: center +.. math:: + + S_3(r) = \left\lbrace \begin{array}{ll} + 1 & \quad\mathrm{if}\quad r < r_\mathrm{c} - w \\ + 3x^2 - 2x^3 & \quad\mathrm{if}\quad r < r_\mathrm{c} \quad\mathrm{with\quad} x=\frac{r_\mathrm{c} - r}{w} \\ + 0 & \quad\mathrm{if}\quad r >= r_\mathrm{c} + \end{array} \right. + where w is the width defined in the arguments. This potential is combined with Coulomb interaction between Gaussian charge densities: -.. image:: Eqs/pair_coulgauss.jpg - :align: center +.. math:: -where qi and qj are the -charges on the 2 atoms, epsilon is the dielectric constant which -can be set by the :doc:`dielectric ` command, gamma\_i and gamma\_j -are the widths of the Gaussian charge distribution and erf() is the error-function. -This style has to be used in conjunction with the :doc:`kspace_style ` command + E = \frac{q_i q_j \mathrm{erf}\left( r/\sqrt{\gamma_1^2+\gamma_2^2} \right) }{\epsilon r_{ij}} + +where :math:`q_i` and :math:`q_j` are the charges on the 2 atoms, +:math:`\epsilon` is the dielectric constant which can be set by the +:doc:`dielectric ` command, :math:`\gamma_i` and +:math:`\gamma_j` are the widths of the Gaussian charge distribution and +erf() is the error-function. This style has to be used in conjunction +with the :doc:`kspace_style ` command If one cutoff is specified it is used for both the vdW and Coulomb terms. If two cutoffs are specified, the first is used as the cutoff @@ -71,10 +80,9 @@ above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands: -* epsilon (energy) -* sigma (distance) -* gamma (distance) - +* :math:`\epsilon` (energy) +* :math:`\sigma` (distance) +* :math:`\gamma` (distance) ---------- diff --git a/doc/src/pair_local_density.rst b/doc/src/pair_local_density.rst index ddcbf0c820..ed99d03c6f 100644 --- a/doc/src/pair_local_density.rst +++ b/doc/src/pair_local_density.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style local/density +.. index:: pair_style local/density -pair\_style local/density command -================================= +pair_style local/density command +================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style arg @@ -18,12 +18,12 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style local/density benzene_water.localdensity.table pair_style hybrid/overlay table spline 500 local/density - pair_coeff \* \* local/density benzene_water.localdensity.table + pair_coeff * * local/density benzene_water.localdensity.table Description """"""""""" @@ -62,22 +62,34 @@ upon initialization. A system of a single atom type (e.g., LJ argon) with a single local density (LD) potential would have an energy given by: -.. image:: Eqs/pair_local_density_energy.jpg - :align: center +.. math:: -where rho\_i is the LD at atom i and F(rho) is similar in spirit to the -embedding function used in EAM potentials. The LD at atom i is given by the sum + U_{LD} = \sum_i F(\rho_i) -.. image:: Eqs/pair_local_density_ld.jpg - :align: center -where phi is an indicator function that is one at r=0 and zero beyond a cutoff -distance R2. The choice of the functional form of phi is somewhat arbitrary, -but the following piecewise cubic function has proven sufficiently general: -:ref:`(Sanyal1) `, :ref:`(Sanyal2) ` :ref:`(Rosenberger) ` +where :math:`\rho_i` is the LD at atom *i* and :math:`F(\rho)` is +similar in spirit to the embedding function used in EAM potentials. The +LD at atom *i* is given by the sum -.. image:: Eqs/pair_local_density_indicator_func.jpg - :align: center +.. math:: + + \rho_i = \sum_{j \neq i} \varphi(r_{ij}) + + +where :math:`\varphi` is an indicator function that is one at r=0 and +zero beyond a cutoff distance R2. The choice of the functional form of +:math:`\varphi` is somewhat arbitrary, but the following piecewise cubic +function has proven sufficiently general: :ref:`(Sanyal1) `, +:ref:`(Sanyal2) ` :ref:`(Rosenberger) ` + +.. math:: + + \varphi(r) = + \begin{cases} + 1 & r \le R_1 \\ + c_0 + c_2r^2 + c_4r^4 + c_6r^6 & r \in (R_1, R_2) \\ + 0 & r \ge R_2 + \end{cases} The constants *c* are chosen so that the indicator function smoothly interpolates between 1 and 0 between the distances R1 and R2, which are @@ -100,34 +112,38 @@ pair style. Please see :ref:`(Sanyal1) ` for details of the derivation. The potential is easily generalized to systems involving multiple atom types: -.. image:: Eqs/pair_local_density_energy_multi.jpg - :align: center +.. math:: + + U_{LD} = \sum_i a_\alpha F(\rho_i) + with the LD expressed as -.. image:: Eqs/pair_local_density_ld_multi.jpg - :align: center +.. math:: -where alpha gives the type of atom i, beta the type of atom j, and the -coefficients a and b filter for atom types as specified by the user. a is -called the central atom filter as it determines to which atoms the -potential applies; a\_alpha = 1 if the LD potential applies to atom type alpha -else zero. On the other hand, b is called the neighbor atom filter because it -specifies which atom types to use in the calculation of the LD; b\_beta = 1 if -atom type beta contributes to the LD and zero otherwise. + \rho_i = \sum_{j \neq i} b_\beta \varphi(r_{ij}) + + +where :math:`\alpha` gives the type of atom *i*\ , :math:`\beta` the +type of atom *j*\ , and the coefficients *a* and *b* filter for atom +types as specified by the user. *a* is called the central atom filter as +it determines to which atoms the potential applies; :math:`a_{\alpha} = +1` if the LD potential applies to atom type alpha else zero. On the +other hand, *b* is called the neighbor atom filter because it specifies +which atom types to use in the calculation of the LD; :math:`b_{\beta} = +1` if atom type :math:`\beta` contributes to the LD and zero otherwise. .. note:: - Note that the potentials need not be symmetric with respect to atom types, - which is the reason for two distinct sets of coefficients a and b. An atom type - may contribute to the LD but not the potential, or to the potential but not the - LD. Such decisions are made by the user and should (ideally) be motivated on - physical grounds for the problem at hand. - + Note that the potentials need not be symmetric with respect to atom + types, which is the reason for two distinct sets of coefficients *a* + and *b*\ . An atom type may contribute to the LD but not the + potential, or to the potential but not the LD. Such decisions are + made by the user and should (ideally) be motivated on physical + grounds for the problem at hand. ---------- - **General form for implementation in LAMMPS:** Of course, a system with many atom types may have many different possible LD @@ -135,14 +151,18 @@ potentials, each with their own atom type filters, cutoffs, and embedding functions. The most general form of this potential as implemented in the pair\_style local/density is: -.. image:: Eqs/pair_local_density_energy_implement.jpg - :align: center +.. math:: -where, k is an index that spans the (arbitrary) number of applied LD potentials -N\_LD. Each LD is calculated as before with: + U_{LD} = \sum_k U_{LD}^{(k)} = \sum_i \left[ \sum_k a_\alpha^{(k)} F^{(k)} \left(\rho_i^{(k)}\right) \right] + + +where, *k* is an index that spans the (arbitrary) number of applied LD +potentials N\_LD. Each LD is calculated as before with: + +.. math:: + + \rho_i^{(k)} = \sum_j b_\beta^{(k)} \varphi^{(k)} (r_{ij}) -.. image:: Eqs/pair_local_density_ld_implement.jpg - :align: center The superscript on the indicator function phi simply indicates that it is associated with specific values of the cutoff distances R1(k) and R2(k). In @@ -154,10 +174,8 @@ one must specify: * the neighbor type filter b(k), where k = 1,2,...N\_LD * the LD potential function F(k)(rho), typically as a table that is later spline-interpolated - ---------- - **Tabulated input file format:** @@ -189,10 +207,8 @@ Lines 5 to 9+N\_rho constitute the first block. Thus the input file is separated each specifying its own upper and lower cutoffs, central and neighbor atoms, and potential. In general, blank lines anywhere are ignored. - ---------- - **Mixing, shift, table, tail correction, restart, info**\ : This pair style does not support automatic mixing. For atom type pairs alpha, beta and alpha != beta, even if LD potentials of type (alpha, alpha) and diff --git a/doc/src/pair_lubricate.rst b/doc/src/pair_lubricate.rst index 67e7c33879..6e2cefd091 100644 --- a/doc/src/pair_lubricate.rst +++ b/doc/src/pair_lubricate.rst @@ -1,22 +1,22 @@ -.. index:: pair\_style lubricate +.. index:: pair_style lubricate -pair\_style lubricate command -============================= +pair_style lubricate command +============================ -pair\_style lubricate/omp command +pair_style lubricate/omp command +================================ + +pair_style lubricate/poly command ================================= -pair\_style lubricate/poly command -================================== - -pair\_style lubricate/poly/omp command -====================================== +pair_style lubricate/poly/omp command +===================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style mu flaglog flagfld cutinner cutoff flagHI flagVF @@ -32,16 +32,16 @@ Syntax **Examples:** (all assume radius = 1) -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lubricate 1.5 1 1 2.01 2.5 pair_coeff 1 1 2.05 2.8 - pair_coeff \* \* + pair_coeff * * pair_style lubricate 1.5 1 1 2.01 2.5 - pair_coeff \* \* + pair_coeff * * variable mu equal ramp(1,2) - fix 1 all adapt 1 pair lubricate mu \* \* v_mu + fix 1 all adapt 1 pair lubricate mu * * v_mu Description """"""""""" @@ -51,8 +51,16 @@ interactions between mono-disperse finite-size spherical particles in a pairwise fashion. The interactions have 2 components. The first is Ball-Melrose lubrication terms via the formulas in :ref:`(Ball and Melrose) ` -.. image:: Eqs/pair_lubricate.jpg - :align: center +.. math:: + + W & = - a_{sq} | (v_1 - v_2) \bullet \mathbf{nn} |^2 - + a_{sh} | (\omega_1 + \omega_2) \bullet + (\mathbf{I} - \mathbf{nn}) - 2 \Omega_N |^2 - \\ + & a_{pu} | (\omega_1 - \omega_2) \bullet (\mathbf{I} - \mathbf{nn}) |^2 - + a_{tw} | (\omega_1 - \omega_2) \bullet \mathbf{nn} |^2 \qquad r < r_c \\ + & \\ + \Omega_N & = \mathbf{n} \times (v_1 - v_2) / r + which represents the dissipation W between two nearby particles due to their relative velocities in the presence of a background solvent with @@ -82,12 +90,14 @@ The other component is due to the Fast Lubrication Dynamics (FLD) approximation, described in :ref:`(Kumar) `, which can be represented by the following equation -.. image:: Eqs/fld.jpg - :align: center +.. math:: + + F^{H} = -R_{FU}(U-U^{\infty}) + R_{FE}E^{\infty} + where U represents the velocities and angular velocities of the -particles, U\^\ *infty* represents the velocity and the angular velocity -of the undisturbed fluid, and E\^\ *infty* represents the rate of strain +particles, :math:`U^{\infty}` represents the velocity and the angular velocity +of the undisturbed fluid, and :math:`E^{\infty}` represents the rate of strain tensor of the undisturbed fluid with viscosity *mu*\ . Again, note that this is dynamic viscosity which has units of mass/distance/time, not kinematic viscosity. Volume fraction corrections to R\_FU are included diff --git a/doc/src/pair_lubricateU.rst b/doc/src/pair_lubricateU.rst index 1c9cb7225d..44eff99158 100644 --- a/doc/src/pair_lubricateU.rst +++ b/doc/src/pair_lubricateU.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style lubricateU +.. index:: pair_style lubricateU -pair\_style lubricateU command -============================== +pair_style lubricateU command +============================= -pair\_style lubricateU/poly command -=================================== +pair_style lubricateU/poly command +================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style mu flaglog cutinner cutoff gdot flagHI flagVF @@ -26,11 +26,11 @@ Syntax **Examples:** (all assume radius = 1) -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lubricateU 1.5 1 2.01 2.5 0.01 1 1 pair_coeff 1 1 2.05 2.8 - pair_coeff \* \* + pair_coeff * * Description """"""""""" @@ -43,8 +43,16 @@ other types of interactions. The interactions have 2 components. The first is Ball-Melrose lubrication terms via the formulas in :ref:`(Ball and Melrose) ` -.. image:: Eqs/pair_lubricate.jpg - :align: center +.. math:: + + W & = - a_{sq} | (v_1 - v_2) \bullet \mathbf{nn} |^2 - + a_{sh} | (\omega_1 + \omega_2) \bullet + (\mathbf{I} - \mathbf{nn}) - 2 \Omega_N |^2 - \\ + & a_{pu} | (\omega_1 - \omega_2) \bullet (\mathbf{I} - \mathbf{nn}) |^2 - + a_{tw} | (\omega_1 - \omega_2) \bullet \mathbf{nn} |^2 \qquad r < r_c \\ + & \\ + \Omega_N & = \mathbf{n} \times (v_1 - v_2) / r + which represents the dissipation W between two nearby particles due to their relative velocities in the presence of a background solvent with @@ -75,13 +83,15 @@ The other component is due to the Fast Lubrication Dynamics (FLD) approximation, described in :ref:`(Kumar) `. The equation being solved to balance the forces and torques is -.. image:: Eqs/fld2.jpg - :align: center +.. math:: + + -R_{FU}(U-U^{\infty}) = -R_{FE}E^{\infty} - F^{rest} + where U represents the velocities and angular velocities of the -particles, U\^\ *infty* represents the velocities and the angular -velocities of the undisturbed fluid, and E\^\ *infty* represents the rate -of strain tensor of the undisturbed fluid flow with viscosity +particles, :math:`U^{\infty}` represents the velocities and the angular +velocities of the undisturbed fluid, and :math:`E^{\infty}` represents +the rate of strain tensor of the undisturbed fluid flow with viscosity *mu*\ . Again, note that this is dynamic viscosity which has units of mass/distance/time, not kinematic viscosity. Volume fraction corrections to R\_FU are included if *flagVF* is set to 1 (default). diff --git a/doc/src/pair_mdf.rst b/doc/src/pair_mdf.rst index 11725a5f7d..2ec6cfc0af 100644 --- a/doc/src/pair_mdf.rst +++ b/doc/src/pair_mdf.rst @@ -1,19 +1,19 @@ -.. index:: pair\_style lj/mdf +.. index:: pair_style lj/mdf -pair\_style lj/mdf command -========================== +pair_style lj/mdf command +========================= -pair\_style buck/mdf command -============================ +pair_style buck/mdf command +=========================== -pair\_style lennard/mdf command -=============================== +pair_style lennard/mdf command +============================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -38,18 +38,18 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/mdf 2.5 3.0 - pair_coeff \* \* 1.0 1.0 + pair_coeff * * 1.0 1.0 pair_coeff 1 1 1.1 2.8 3.0 3.2 pair_style buck 2.5 3.0 - pair_coeff \* \* 100.0 1.5 200.0 - pair_coeff \* \* 100.0 1.5 200.0 3.0 3.5 + pair_coeff * * 100.0 1.5 200.0 + pair_coeff * * 100.0 1.5 200.0 3.0 3.5 pair_style lennard/mdf 2.5 3.0 - pair_coeff \* \* 1.0 1.0 + pair_coeff * * 1.0 1.0 pair_coeff 1 1 1021760.3664 2120.317338 3.0 3.2 Description @@ -60,22 +60,29 @@ Lennard-Jones and Buckingham potential with the addition of a taper function that ramps the energy and force smoothly to zero between an inner and outer cutoff. -.. image:: Eqs/pair_mdf-1.jpg - :align: center +.. math:: + + E_{smooth}(r) = E(r)*f(r) + The tapering, *f(r)*\ , is done by using the Mei, Davenport, Fernando function :ref:`(Mei) `. -.. image:: Eqs/pair_mdf-2.jpg - :align: center +.. math:: + + f(r) & = 1.0 \qquad \qquad \mathrm{for} \qquad r < r_m \\ + f(r) & = (1 - x)^3*(1+3x+6x^2) \quad \mathrm{for} \qquad r_m < r < r_{cut} \\ + f(r) & = 0.0 \qquad \qquad \mathrm{for} \qquad r >= r_{cut} \\ where -.. image:: Eqs/pair_mdf-3.jpg - :align: center +.. math:: -Here *r\_m* is the inner cutoff radius and *r\_cut* is the outer cutoff -radius. + x = \frac{(r-r_m)}{(r_{cut}-r_m)} + + +Here :math:`r_m` is the inner cutoff radius and :math:`r_{cut}` is the +outer cutoff radius. ---------- @@ -84,48 +91,50 @@ radius. For the *lj/mdf* pair\_style, the potential energy, *E(r)*\ , is the standard 12-6 Lennard-Jones written in the epsilon/sigma form: -.. image:: Eqs/pair_mdf-4.jpg - :align: center +.. math:: + + E(r) = 4\epsilon\biggl[\bigl(\frac{\sigma}{r}\bigr)^{12} - \bigl(\frac{\sigma}{r}\bigr)^6\biggr] + Either the first two or all of the following coefficients must be -defined for each pair of atoms types via the pair\_coeff command as -in the examples above, or in the data file read by the -:doc:`read_data `. The two cutoffs default to the global -values and epsilon and sigma can also be determined by mixing as +defined for each pair of atoms types via the pair\_coeff command as in +the examples above, or in the data file read by the :doc:`read_data +`. The two cutoffs default to the global values and +:math:`\epsilon` and :math:`\sigma` can also be determined by mixing as described below: -* epsilon (energy units) -* sigma (distance units) -* r\_m (distance units) -* r\_\ *cut* (distance units) - +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) +* :math:`r_m` (distance units) +* :math:`r_{cut}` (distance units) ---------- - For the *buck/mdf* pair\_style, the potential energy, *E(r)*\ , is the standard Buckingham potential with three required coefficients. The two cutoffs can be omitted and default to the corresponding global values: -.. image:: Eqs/pair_mdf-5.jpg - :align: center +.. math:: -* A (energy units) -* \rho (distance units) -* C (energy-distance\^6 units) -* r\_m (distance units) -* r\_\ *cut* (distance units) + E(r) = A e^{(-r/\rho)} -\frac{C}{r^6} +* *A* (energy units) +* :math:`\rho` (distance units) +* *C* (energy-distance\^6 units) +* :math:`r_m` (distance units) +* :math:`r_{cut}` (distance units) + ---------- - For the *lennard/mdf* pair\_style, the potential energy, *E(r)*\ , is the standard 12-6 Lennard-Jones written in the A/B form: -.. image:: Eqs/pair_mdf-6.jpg - :align: center +.. math:: + + E(r) = \frac{A}{r^{12}} - \frac{B}{r^{6}} + The following coefficients must be defined for each pair of atoms types via the pair\_coeff command as in the examples above, or in the @@ -133,23 +142,21 @@ data file read by the read\_data commands, or by mixing as described below. The two cutoffs default to their global values and must be either both given or both left out: -* A (energy-distance\^12 units) -* B (energy-distance\^6 units) -* r\_m (distance units) -* r\_\ *cut* (distance units) - +* *A* (energy-distance\^12 units) +* *B* (energy-distance\^6 units) +* :math:`r_m` (distance units) +* :math:`r_{cut}` (distance units) ---------- - **Mixing, shift, table, tail correction, restart, rRESPA info**\ : -For atom type pairs I,J and I != J, the epsilon and sigma coefficients -and cutoff distances for the lj/mdf pair style can be mixed. -The default mix value is *geometric*\ . See the "pair\_modify" command -for details. The other two pair styles buck/mdf and lennard/mdf do not -support mixing, so all I,J pairs of coefficients must be specified -explicitly. +For atom type pairs I,J and I != J, the :math:`\epsilon` and +:math:`sigma` coefficients and cutoff distances for the lj/mdf pair +style can be mixed. The default mix value is *geometric*\ . See the +"pair\_modify" command for details. The other two pair styles buck/mdf +and lennard/mdf do not support mixing, so all I,J pairs of coefficients +must be specified explicitly. None of the lj/mdf, buck/mdf, or lennard/mdf pair styles supports the :doc:`pair_modify ` shift option or long-range @@ -161,14 +168,11 @@ to be specified in an input script that reads a restart file. These styles can only be used via the *pair* keyword of the :doc:`run_style respa ` command. They do not support the *inner*\ , *middle*\ , *outer* keywords. - ---------- - Restrictions """""""""""" - These pair styles can only be used if LAMMPS was built with the USER-MISC package. See the :doc:`Build package ` doc page for more info. diff --git a/doc/src/pair_meam_spline.rst b/doc/src/pair_meam_spline.rst index 222a058acf..7e91d6185a 100644 --- a/doc/src/pair_meam_spline.rst +++ b/doc/src/pair_meam_spline.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style meam/spline +.. index:: pair_style meam/spline -pair\_style meam/spline command -=============================== +pair_style meam/spline command +============================== -pair\_style meam/spline/omp command -=================================== +pair_style meam/spline/omp command +================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style meam/spline @@ -18,11 +18,11 @@ Examples """""""" -.. parsed-literal:: +.. code:: LAMMPS pair_style meam/spline - pair_coeff \* \* Ti.meam.spline Ti - pair_coeff \* \* Ti.meam.spline Ti Ti Ti + pair_coeff * * Ti.meam.spline Ti + pair_coeff * * Ti.meam.spline Ti Ti Ti Description """"""""""" @@ -32,27 +32,31 @@ using a variant of modified embedded-atom method (MEAM) potentials :ref:`(Lenosky) `. For a single species ("old-style") MEAM, the total energy E is given by -.. image:: Eqs/pair_meam_spline.jpg - :align: center +.. math:: -where rho\_i is the density at atom I, theta\_jik is the angle between -atoms J, I, and K centered on atom I. The five functions Phi, U, rho, -f, and g are represented by cubic splines. + E & =\sum_{i`, where the total energy E is given by -.. image:: Eqs/pair_meam_spline_multicomponent.jpg - :align: center +.. math:: -where the five functions Phi, U, rho, f, and g depend on the chemistry -of the atoms in the interaction. In particular, if there are N different -chemistries, there are N different U, rho, and f functions, while there -are N(N+1)/2 different Phi and g functions. The new style multicomponent -MEAM potential files are indicated by the second line in the file starts -with "meam/spline" followed by the number of elements and the name of each -element. + E &= \sum_{i`. We refer to it as MEAM+SW. The total energy E is given by -.. image:: Eqs/pair_meam_sw_spline.jpg - :align: center +.. math:: -where rho\_I is the density at atom I, theta\_JIK is the angle between -atoms J, I, and K centered on atom I. The seven functions -Phi, F, G, U, rho, f, and g are represented by cubic splines. + E & = E_{MEAM} + E_{SW} \\ + E_{MEAM} & = \sum _{IJ} \phi (r_{IJ}) + \sum _{I} U(\rho _I) \\ + E_{SW} & = \sum _{I} \sum _{JK} F(r_{IJ}) \, F(r_{IK}) \, G(\cos(\theta _{JIK})) \\ + \rho _I & = \sum _J \rho(r_{IJ}) + \sum _{JK} f(r_{IJ}) \, f(r_{IK}) \, g(\cos(\theta _{JIK})) + +where :math:`\rho_I` is the density at atom I, :math:`\theta_{JIK}` is +the angle between atoms J, I, and K centered on atom I. The seven +functions :math:`\phi, F, G, U, \rho, f,` and *g* are represented by +cubic splines. The cutoffs and the coefficients for these spline functions are listed in a parameter file which is specified by the diff --git a/doc/src/pair_meamc.rst b/doc/src/pair_meamc.rst index 95f46c30cf..60a6585e5b 100644 --- a/doc/src/pair_meamc.rst +++ b/doc/src/pair_meamc.rst @@ -1,27 +1,24 @@ -.. index:: pair\_style meam/c +.. index:: pair_style meam/c -pair\_style meam/c command -========================== +pair_style meam/c command +========================= Syntax """""" +.. code-block:: LAMMPS -.. parsed-literal:: - - pair_style style - -style = *meam/c* + pair_style meam/c Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style meam/c - pair_coeff \* \* ../potentials/library.meam Si ../potentials/si.meam Si - pair_coeff \* \* ../potentials/library.meam Ni Al NULL Ni Al Ni Ni + pair_coeff * * ../potentials/library.meam Si ../potentials/si.meam Si + pair_coeff * * ../potentials/library.meam Ni Al NULL Ni Al Ni Ni Description """"""""""" @@ -46,15 +43,18 @@ the 12 December 2018 release. In the MEAM formulation, the total energy E of a system of atoms is given by: -.. image:: Eqs/pair_meam.jpg - :align: center +.. math:: -where F is the embedding energy which is a function of the atomic -electron density rho, and phi is a pair potential interaction. The -pair interaction is summed over all neighbors J of atom I within the -cutoff distance. As with EAM, the multi-body nature of the MEAM -potential is a result of the embedding energy term. Details of the -computation of the embedding and pair energies, as implemented in + E = \sum_i \left\{ F_i(\bar{\rho}_i) + + \frac{1}{2} \sum_{i \neq j} \phi_{ij} (r_{ij}) \right\} + + +where *F* is the embedding energy which is a function of the atomic +electron density :math:`\rho`, and :math:`\phi` is a pair potential +interaction. The pair interaction is summed over all neighbors J of +atom I within the cutoff distance. As with EAM, the multi-body nature +of the MEAM potential is a result of the embedding energy term. Details +of the computation of the embedding and pair energies, as implemented in LAMMPS, are given in :ref:`(Gullet) ` and references therein. The various parameters in the MEAM formulas are listed in two files @@ -91,9 +91,9 @@ LAMMPS simulation has 4 atoms types and you want the 1st 3 to be Si, and the 4th to be C, you would use the following pair\_coeff command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* library.meam Si C sic.meam Si Si Si C + pair_coeff * * library.meam Si C sic.meam Si Si Si C The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. The two filenames are for the library and parameter file respectively. @@ -201,9 +201,9 @@ MEAM library file numbered in the order of how those elements were selected starting from 1. Thus for the example given below -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* library.meam Si C sic.meam Si Si Si C + pair_coeff * * library.meam Si C sic.meam Si Si Si C an index of 1 would refer to Si and an index of 2 to C. diff --git a/doc/src/pair_meso.rst b/doc/src/pair_meso.rst index 915461d485..a40ae3db10 100644 --- a/doc/src/pair_meso.rst +++ b/doc/src/pair_meso.rst @@ -1,22 +1,22 @@ -.. index:: pair\_style edpd +.. index:: pair_style edpd -pair\_style edpd command -======================== +pair_style edpd command +======================= -pair\_style mdpd command -======================== +pair_style mdpd command +======================= -pair\_style mdpd/rhosum command -=============================== +pair_style mdpd/rhosum command +============================== -pair\_style tdpd command -======================== +pair_style tdpd command +======================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -44,10 +44,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style edpd 1.58 9872598 - pair_coeff \* \* 18.75 4.5 0.41 1.58 1.42E-5 2.0 1.58 + pair_coeff * * 18.75 4.5 0.41 1.58 1.42E-5 2.0 1.58 pair_coeff 1 1 18.75 4.5 0.41 1.58 1.42E-5 2.0 1.58 power 10.54 -3.66 3.44 -4.10 pair_coeff 1 1 18.75 4.5 0.41 1.58 1.42E-5 2.0 1.58 power 10.54 -3.66 3.44 -4.10 kappa -0.44 -3.21 5.04 0.00 @@ -56,7 +56,7 @@ Examples pair_coeff 1 1 mdpd -40.0 25.0 18.0 1.0 0.75 pair_style tdpd 1.0 1.58 935662 - pair_coeff \* \* 18.75 4.5 0.41 1.58 1.58 1.0 1.0E-5 2.0 + pair_coeff * * 18.75 4.5 0.41 1.58 1.58 1.0 1.0E-5 2.0 pair_coeff 1 1 18.75 4.5 0.41 1.58 1.58 1.0 1.0E-5 2.0 3.0 1.0E-5 2.0 Description @@ -68,42 +68,57 @@ for eDPD particles following the formulations in evolution of an eDPD particle is governed by the conservation of momentum and energy given by -.. image:: Eqs/pair_edpd_gov.jpg - :align: center +.. math:: -where the three components of Fi -including the conservative force FijC, dissipative force FijD and random force FijR are expressed as + \frac{\mathrm{d}^2 \mathbf{r}_i}{\mathrm{d} t^2}= + \frac{\mathrm{d} \mathbf{v}_i}{\mathrm{d} t} + =\mathbf{F}_{i}=\sum_{i\neq j}(\mathbf{F}_{ij}^{C}+\mathbf{F}_{ij}^{D}+\mathbf{F}_{ij}^{R}) \\ + C_v\frac{\mathrm{d} T_i}{\mathrm{d} t}= q_{i} = \sum_{i\neq j}(q_{ij}^{C}+q_{ij}^{V}+q_{ij}^{R}), -.. image:: Eqs/pair_edpd_force.jpg - :align: center +where the three components of :math:`F_{i}` including the conservative +force :math:`F_{ij}^C`, dissipative force :math:`F_{ij}^D` and random +force :math:`F_{ij}^R` are expressed as -in which the exponent of the weighting function s can be defined as a temperature-dependent -variable. The heat flux between particles accounting for the -collisional heat flux qC, viscous -heat flux qV, and random heat flux -qR are given by +.. math:: -.. image:: Eqs/pair_edpd_heat.jpg - :align: center + \mathbf{F}_{ij}^{C} & = \alpha_{ij}{\omega_{C}}(r_{ij})\mathbf{e}_{ij} \\ + \mathbf{F}_{ij}^{D} & = -\gamma {\omega_{D}}(r_{ij})(\mathbf{e}_{ij} \cdot \mathbf{v}_{ij})\mathbf{e}_{ij} \\ + \mathbf{F}_{ij}^{R} & = \sigma {\omega_{R}}(r_{ij}){\xi_{ij}}\Delta t^{-1/2} \mathbf{e}_{ij} \\ + \omega_{C}(r) & = 1 - r/r_c \\ + \alpha_{ij} & = A\cdot k_B(T_i + T_j)/2 \\ + \omega_{D}(r) & = \omega^2_{R}(r) = (1-r/r_c)^s \\ + \sigma_{ij}^2 & = 4\gamma k_B T_i T_j/(T_i + T_j) -where the mesoscopic heat friction κ is given by +in which the exponent of the weighting function *s* can be defined as a +temperature-dependent variable. The heat flux between particles +accounting for the collisional heat flux :math:`q^C`, viscous heat flux +:math:`q^V`, and random heat flux :math:`q^R` are given by -.. image:: Eqs/pair_edpd_kappa.jpg - :align: center +.. math:: -with υ being the kinematic -viscosity. For more details, see Eq.(15) in :ref:`(Li2014\_JCP) `. + q_i^C & = \sum_{j \ne i} k_{ij} \omega_{CT}(r_{ij}) \left( \frac{1}{T_i} - \frac{1}{T_j} \right) \\ + q_i^V & = \frac{1}{2 C_v}\sum_{j \ne i}{ \left\{ \omega_D(r_{ij})\left[\gamma_{ij} \left( \mathbf{e}_{ij} \cdot \mathbf{v}_{ij} \right)^2 - \frac{\left( \sigma _{ij} \right)^2}{m}\right] - \sigma _{ij} \omega_R(r_{ij})\left( \mathbf{e}_{ij} \cdot \mathbf{v}_{ij} \right){\xi_{ij}} \right\} } \\ + q_i^R & = \sum_{j \ne i} \beta _{ij} \omega_{RT}(r_{ij}) d {t^{ - 1/2}} \xi_{ij}^e \\ + \omega_{CT}(r) & =\omega_{RT}^2(r)=\left(1-r/r_{ct}\right)^{s_T} \\ + k_{ij} & =C_v^2\kappa(T_i + T_j)^2/4k_B \\ + \beta_{ij}^2 & = 2k_Bk_{ij} + +where the mesoscopic heat friction :math:`\kappa` is given by + +.. math:: + + \kappa = \frac{315k_B\upsilon }{2\pi \rho C_v r_{ct}^5}\frac{1}{Pr}, + + +with :math:`\upsilon` being the kinematic viscosity. For more details, +see Eq.(15) in :ref:`(Li2014\_JCP) `. The following coefficients must be defined in eDPD system for each pair of atom types via the :doc:`pair_coeff ` command as in the examples above. * A (force units) -* gamma (force/velocity units) +* :math:`\gamma` (force/velocity units) * power\_f (positive real) * cutoff (distance units) * kappa (thermal conductivity units) @@ -112,104 +127,107 @@ the examples above. * optional keyword = power or kappa The keyword *power* or *kappa* is optional. Both "power" and "kappa" -require 4 parameters c1, c2, -c4, c4 showing the temperature dependence -of the exponent
s(T) = -power\_f\*(1+c1\*(T-1)+c2\*(T-1)2 -+c3\*(T-1)3+c4\*(T-1)4)
-and of the mesoscopic heat friction
-sT(T) = -kappa\*(1+c1\*(T-1)+c2\*(T-1)2 -+c3\*(T-1)3+c4\*(T-1)4)
-If the keyword *power* or *kappa* is not specified, the eDPD system -will use constant power\_f and kappa, which is independent to -temperature changes. +require 4 parameters :math:`c_1, c_2, c_3, c_4` showing the temperature +dependence of the exponent :math:`s(T) = \mathrm{power}_f ( 1+c_1 +(T-1) + c_2 (T-1)^2 + c_3 (T-1)^3 + c_4 (T-1)^4 )` and of the mesoscopic +heat friction :math:`s_T(T) = \kappa (1 + c_1 (T-1) + c_2 (T-1)^2 + c_3 +(T-1)^3 + c_4 (T-1)^4)`. If the keyword *power* or *kappa* is not +specified, the eDPD system will use constant power\_f and +:math:`\kappa`, which is independent to temperature changes. ---------- -The *mdpd/rhosum* style computes the local particle mass density rho -for mDPD particles by kernel function interpolation. +The *mdpd/rhosum* style computes the local particle mass density +:math:`\rho` for mDPD particles by kernel function interpolation. The following coefficients must be defined for each pair of atom types via the :doc:`pair_coeff ` command as in the examples above. * cutoff (distance units) - ---------- - The *mdpd* style computes the many-body interactions between mDPD particles following the formulations in :ref:`(Li2013\_POF) `. The dissipative and random forces are in the form same as the classical DPD, but the conservative force is local density dependent, which are given by -.. image:: Eqs/pair_mdpd_force.jpg - :align: center +.. math:: -where the first term in FC with a -negative coefficient A < 0 stands for an attractive force within an -interaction range rc, and the second -term with B > 0 is the density-dependent repulsive force within an -interaction range rd. + \mathbf{F}_{ij}^C & = Aw_c(r_{ij})\mathbf{e}_{ij} + B(\rho_i+\rho_j)w_d(r_{ij})\mathbf{e}_{ij} \\ + \mathbf{F}_{ij}^{D} & = -\gamma {\omega_{D}}(r_{ij})(\mathbf{e}_{ij} \cdot \mathbf{v}_{ij})\mathbf{e}_{ij} \\ + \mathbf{F}_{ij}^{R} & = \sigma {\omega_{R}}(r_{ij}){\xi_{ij}}\Delta t^{-1/2} \mathbf{e}_{ij} + +where the first term in :math:`F_C` with a negative coefficient :math:`A +< 0` stands for an attractive force within an interaction range +:math:`r_c`, and the second term with :math:`B > 0` is the +density-dependent repulsive force within an interaction range +:math:`r_d`. The following coefficients must be defined for each pair of atom types via the :doc:`pair_coeff ` command as in the examples above. * A (force units) * B (force units) -* gamma (force/velocity units) +* :math:`\gamma` (force/velocity units) * cutoff\_c (distance units) * cutoff\_d (distance units) - ---------- - The *tdpd* style computes the pairwise interactions and chemical concentration fluxes for tDPD particles following the formulations in :ref:`(Li2015\_JCP) `. The time evolution of a tDPD particle is governed by the conservation of momentum and concentration given by -.. image:: Eqs/pair_tdpd_gov.jpg - :align: center +.. math:: -where the three components of Fi -including the conservative force FijC, dissipative force FijD and random force FijR are expressed as + \frac{\mathrm{d}^2 \mathbf{r}_i}{\mathrm{d} t^2} & = \frac{\mathrm{d} \mathbf{v}_i}{\mathrm{d} t}=\mathbf{F}_{i}=\sum_{i\neq j}(\mathbf{F}_{ij}^{C}+\mathbf{F}_{ij}^{D}+\mathbf{F}_{ij}^{R}) \\ + \frac{\mathrm{d} C_{i}}{\mathrm{d} t} & = Q_{i} = \sum_{i\neq j}(Q_{ij}^{D}+Q_{ij}^{R}) + Q_{i}^{S} -.. image:: Eqs/pair_tdpd_force.jpg - :align: center +where the three components of :math:`F_{i}` including the conservative +force :math:`F_{ij}^C`, dissipative force :math:`F_{ij}^C` and random +force :math:`F_{ij}^C` are expressed as + +.. math:: + + \mathbf{F}_{ij}^{C} & = A{\omega_{C}}(r_{ij})\mathbf{e}_{ij} \\ + \mathbf{F}_{ij}^{D} & = -\gamma {\omega_{D}}(r_{ij})(\mathbf{e}_{ij} \cdot \mathbf{v}_{ij})\mathbf{e}_{ij} \\ + \mathbf{F}_{ij}^{R} & = \sigma {\omega_{R}}(r_{ij}){\xi_{ij}}\Delta t^{-1/2} \mathbf{e}_{ij} \\ + \omega_{C}(r) & = 1 - r/r_c \\ + \omega_{D}(r) & = \omega^2_{R}(r) = (1-r/r_c)^{\rm power\_f} \\ + \sigma^2 = 2\gamma k_B T The concentration flux between two tDPD particles includes the Fickian -flux QijD and random flux -QijR, which are given by +flux :math:`Q_{ij}^D` and random flux :math:`Q_{ij}^R`, which are given +by -.. image:: Eqs/pair_tdpd_flux.jpg - :align: center +.. math:: + + Q_{ij}^D & = -\kappa_{ij} w_{DC}(r_{ij}) \left( C_i - C_j \right) \\ + Q_{ij}^R & = \epsilon_{ij}\left( C_i + C_j \right) w_{RC}(r_{ij}) \xi_{ij} \\ + w_{DC}(r_{ij}) & =w^2_{RC}(r_{ij}) = (1 - r/r_{cc})^{\rm power\_{cc}} \\ + \epsilon_{ij}^2 & = m_s^2\kappa_{ij}\rho where the parameters kappa and epsilon determine the strength of the -Fickian and random fluxes. ms -is the mass of a single solute molecule. In general, ms is much smaller than the mass of -a tDPD particle m. For more details, see -:ref:`(Li2015\_JCP) `. +Fickian and random fluxes. :math:`m_s` is the mass of a single solute +molecule. In general, :math:`m_s` is much smaller than the mass of a +tDPD particle *m*\ . For more details, see :ref:`(Li2015\_JCP) +`. The following coefficients must be defined for each pair of atom types via the :doc:`pair_coeff ` command as in the examples above. * A (force units) -* gamma (force/velocity units) +* :math:`\gamma` (force/velocity units) * power\_f (positive real) * cutoff (distance units) * cutoff\_CC (distance units) -* kappa\_i (diffusivity units) -* epsilon\_i (diffusivity units) +* :math:`\kappa_i` (diffusivity units) +* :math:`\epsilon_i` (diffusivity units) * power\_cc\_i (positive real) The last 3 values must be repeated Nspecies times, so that values for @@ -218,10 +236,8 @@ the "I" suffix. In the first pair\_coeff example above for pair\_style tdpd, Nspecies = 1. In the second example, Nspecies = 2, so 3 additional coeffs are specified (for species 2). - ---------- - **Example scripts** There are example scripts for using all these pair styles in @@ -262,10 +278,8 @@ concentration profiles of the two chemical species as .. image:: JPG/examples_tdpd.jpg :align: center - ---------- - **Mixing, shift, table, tail correction, restart, rRESPA info**\ : The styles *edpd*\ , *mdpd*\ , *mdpd/rhosum* and *tdpd* do not support @@ -282,7 +296,6 @@ that reads a restart file. Restrictions """""""""""" - The pair styles *edpd*\ , *mdpd*\ , *mdpd/rhosum* and *tdpd* are part of the USER-MESO package. It is only enabled if LAMMPS was built with that package. See the :doc:`Build package ` doc page for diff --git a/doc/src/pair_mesocnt.rst b/doc/src/pair_mesocnt.rst index 41c47fc957..4aea500e79 100644 --- a/doc/src/pair_mesocnt.rst +++ b/doc/src/pair_mesocnt.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style mesocnt +.. index:: pair_style mesocnt -pair\_style mesocnt command -=========================== +pair_style mesocnt command +========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style mesocnt @@ -15,10 +15,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style mesocnt - pair_coeff \* \* 10_10.cnt + pair_coeff * * 10_10.cnt Description """"""""""" diff --git a/doc/src/pair_mgpt.rst b/doc/src/pair_mgpt.rst index 646bbac84a..3d33d7da26 100644 --- a/doc/src/pair_mgpt.rst +++ b/doc/src/pair_mgpt.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style mgpt +.. index:: pair_style mgpt -pair\_style mgpt command -======================== +pair_style mgpt command +======================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style mgpt @@ -15,14 +15,14 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style mgpt - pair_coeff \* \* Ta6.8x.mgpt.parmin Ta6.8x.mgpt.potin Omega + pair_coeff * * Ta6.8x.mgpt.parmin Ta6.8x.mgpt.potin Omega cp ~/lammps/potentials/Ta6.8x.mgpt.parmin parmin cp ~/lammps/potentials/Ta6.8x.mgpt.potin potin - pair_coeff \* \* parmin potin Omega volpress yes nbody 1234 precision double - pair_coeff \* \* parmin potin Omega volpress yes nbody 12 + pair_coeff * * parmin potin Omega volpress yes nbody 1234 precision double + pair_coeff * * parmin potin Omega volpress yes nbody 12 Description """"""""""" @@ -33,8 +33,13 @@ multi-ion interatomic potentials in d-band transition metals, with a volume-dependent, real-space total-energy functional for the N-ion elemental bulk material in the form -.. image:: Eqs/pair_mgpt.jpg - :align: center +.. math:: + + E_{\rm tot}({\bf R}_1 \ldots {\bf R}_N) = NE_{\rm vol}(\Omega ) + + \frac{1}{2} \sum _{i,j} \mbox{}^\prime \ v_2(ij;\Omega ) + + \frac{1}{6} \sum _{i,j,k} \mbox{}^\prime \ v_3(ijk;\Omega ) + + \frac{1}{24} \sum _{i,j,k,l} \mbox{}^\prime \ v_4(ijkl;\Omega ) + where the prime on each summation sign indicates the exclusion of all self-interaction terms from the summation. The leading volume term diff --git a/doc/src/pair_mie.rst b/doc/src/pair_mie.rst index 61eeb1f0f4..17018ddf97 100644 --- a/doc/src/pair_mie.rst +++ b/doc/src/pair_mie.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style mie/cut +.. index:: pair_style mie/cut -pair\_style mie/cut command -=========================== +pair_style mie/cut command +========================== -pair\_style mie/cut/gpu command -=============================== +pair_style mie/cut/gpu command +============================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style mie/cut cutoff @@ -20,7 +20,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style mie/cut 10.0 pair_coeff 1 1 0.72 3.40 23.00 6.66 @@ -32,14 +32,19 @@ Description The *mie/cut* style computes the Mie potential, given by -.. image:: Eqs/pair_mie.jpg - :align: center +.. math:: + + E = C \epsilon \left[ \left(\frac{\sigma}{r}\right)^{\gamma_{rep}} - \left(\frac{\sigma}{r}\right)^{\gamma_{att}} \right] + \qquad r < r_c + Rc is the cutoff and C is a function that depends on the repulsive and attractive exponents, given by: -.. image:: Eqs/pair_mie2.jpg - :align: center +.. math:: + + C = \left(\frac{\gamma_{rep}}{\gamma_{rep}-\gamma_{att}}\right) \left(\frac{\gamma_{rep}}{\gamma_{att}}\right)^{\left(\frac{\gamma_{att}}{\gamma_{rep}-\gamma_{att}}\right)} + Note that for 12/6 exponents, C is equal to 4 and the formula is the same as the standard Lennard-Jones potential. @@ -94,7 +99,7 @@ details. Restrictions """""""""""" - none +none Related commands """""""""""""""" diff --git a/doc/src/pair_mm3_switch3_coulgauss_long.rst b/doc/src/pair_mm3_switch3_coulgauss_long.rst index 865014e597..2b294574b1 100644 --- a/doc/src/pair_mm3_switch3_coulgauss_long.rst +++ b/doc/src/pair_mm3_switch3_coulgauss_long.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style mm3/switch3/coulgauss/long +.. index:: pair_style mm3/switch3/coulgauss/long -pair\_style mm3/switch3/coulgauss/long command +pair_style mm3/switch3/coulgauss/long command ============================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -26,7 +26,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style mm3/switch3/coulgauss/long 12.0 3.0 pair_coeff 1 0.2 2.5 1.2 @@ -40,26 +40,39 @@ Description The *mm3/switch3/coulgauss/long* style evaluates the MM3 vdW potential :ref:`(Allinger) ` -.. image:: Eqs/pair_mm3_switch3.jpg - :align: center +.. math:: + + E & = \epsilon_{ij} \left[ -2.25 \left(\frac{r_{v,ij}}{r_{ij}}\right)^6 + 1.84(10)^5 \exp\left[-12.0 r_{ij}/r_{v,ij}\right] \right] S_3(r_{ij}) \\ + r_{v,ij} & = r_{v,i} + r_{v,j} \\ + \epsilon_{ij} & = \sqrt{\epsilon_i \epsilon_j} + , which goes smoothly to zero at the cutoff r\_c as defined by the switching function -.. image:: Eqs/pair_switch3.jpg - :align: center +.. math:: + + S_3(r) = \left\lbrace \begin{array}{ll} + 1 & \quad\mathrm{if}\quad r < r_\mathrm{c} - w \\ + 3x^2 - 2x^3 & \quad\mathrm{if}\quad r < r_\mathrm{c} \quad\mathrm{with\quad} x=\frac{r_\mathrm{c} - r}{w} \\ + 0 & \quad\mathrm{if}\quad r >= r_\mathrm{c} + \end{array} \right. + where w is the width defined in the arguments. This potential is combined with Coulomb interaction between Gaussian charge densities: -.. image:: Eqs/pair_coulgauss.jpg - :align: center +.. math:: -where qi and qj are the -charges on the 2 atoms, epsilon is the dielectric constant which -can be set by the :doc:`dielectric ` command, gamma\_i and gamma\_j -are the widths of the Gaussian charge distribution and erf() is the error-function. -This style has to be used in conjunction with the :doc:`kspace_style ` command + E = \frac{q_i q_j \mathrm{erf}\left( r/\sqrt{\gamma_1^2+\gamma_2^2} \right) }{\epsilon r_{ij}} + + +where :math:`q_i` and :math:`q_j` are the charges on the 2 atoms, +epsilon is the dielectric constant which can be set by the +:doc:`dielectric ` command, ::math:`\gamma_i` and +:math:`\gamma_j` are the widths of the Gaussian charge distribution and +erf() is the error-function. This style has to be used in conjunction +with the :doc:`kspace_style ` command If one cutoff is specified it is used for both the vdW and Coulomb terms. If two cutoffs are specified, the first is used as the cutoff @@ -71,14 +84,12 @@ above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands: -* epsilon (energy) -* r\_v (distance) -* gamma (distance) - +* :math:`\epsilon` (energy) +* :math:`r_v` (distance) +* :math:`\gamma` (distance) ---------- - **Mixing, shift, table, tail correction, restart, rRESPA info**\ : Mixing rules are fixed for this style as defined above. diff --git a/doc/src/pair_modify.rst b/doc/src/pair_modify.rst index 68ab45457c..7a7923c0cc 100644 --- a/doc/src/pair_modify.rst +++ b/doc/src/pair_modify.rst @@ -1,13 +1,13 @@ -.. index:: pair\_modify +.. index:: pair_modify -pair\_modify command -==================== +pair_modify command +=================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_modify keyword values ... @@ -44,7 +44,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_modify shift yes mix geometric pair_modify tail yes @@ -63,12 +63,12 @@ specified parameters are by default modified for all the hybrid sub-styles. .. note:: - The behavior for hybrid pair styles can be changed by using the *pair* - keyword, which allows selection of a specific sub-style to apply all - remaining keywords to. - The *special* and *compute/tally* keywords can **only** be - used in conjunction with the *pair* keyword. See further details about - these 3 keywords below. + The behavior for hybrid pair styles can be changed by using the *pair* + keyword, which allows selection of a specific sub-style to apply all + remaining keywords to. + The *special* and *compute/tally* keywords can **only** be + used in conjunction with the *pair* keyword. See further details about + these 3 keywords below. The *mix* keyword affects pair coefficients for interactions between atoms of type I and J, when I != J and the coefficients are not diff --git a/doc/src/pair_momb.rst b/doc/src/pair_momb.rst index d923bd7b90..81a3eb3320 100644 --- a/doc/src/pair_momb.rst +++ b/doc/src/pair_momb.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style momb +.. index:: pair_style momb -pair\_style momb command -======================== +pair_style momb command +======================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style momb cutoff s6 d @@ -19,7 +19,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style momb 12.0 0.75 20.0 pair_style hybrid/overlay eam/fs lj/charmm/coul/long 10.0 12.0 momb 12.0 0.75 20.0 morse 5.5 @@ -36,30 +36,31 @@ described comprehensively in :ref:`(Fichthorn) ` and :ref:`(Zhou) `. Grimme's method is widely used to correct for dispersion in density functional theory calculations. -.. image:: Eqs/pair_momb.jpg - :align: center +.. math:: + + E & = D_0 [\exp^{-2 \alpha (r-r_0)} - 2\exp^{-\alpha (r-r_0)}] - s_6 \frac{C_6}{r^6} f_{damp}(r,R_r) \\ + f_{damp}(r,R_r) & = \frac{1}{1 + \exp^{-d(r/R_r - 1)}} + For the *momb* pair style, the following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples above, or in the data file or restart files read by the :doc:`read_data ` as described below: -* D0 (energy units) -* alpha (1/distance units) -* r0 (distance units) -* C6 (energy\*distance\^6 units) -* Rr (distance units, typically sum of atomic vdW radii) - +* :math:`D_0` (energy units) +* :math:`\alpha` (1/distance units) +* :math:`r_0` (distance units) +* :math:`C_6` (energy\*distance\^6 units) +* :math:`R_r` (distance units, typically sum of atomic vdW radii) ---------- - Restrictions """""""""""" - This style is part of the USER-MISC package. It is only enabled if -LAMMPS is built with that package. See the :doc:`Build package ` doc page on for more info. +LAMMPS is built with that package. See the :doc:`Build package +` doc page on for more info. Related commands """""""""""""""" @@ -74,18 +75,12 @@ Related commands .. _Grimme: - - **(Grimme)** Grimme, J Comput Chem, 27(15), 1787-1799 (2006). .. _Fichthorn: - - **(Fichthorn)** Fichthorn, Balankura, Qi, CrystEngComm, 18(29), 5410-5417 (2016). .. _Zhou4: - - **(Zhou)** Zhou, Saidi, Fichthorn, J Phys Chem C, 118(6), 3366-3374 (2014). diff --git a/doc/src/pair_morse.rst b/doc/src/pair_morse.rst index 1eb3d53ed0..eb0666d3cb 100644 --- a/doc/src/pair_morse.rst +++ b/doc/src/pair_morse.rst @@ -1,31 +1,31 @@ -.. index:: pair\_style morse +.. index:: pair_style morse -pair\_style morse command -========================= +pair_style morse command +======================== -pair\_style morse/gpu command -============================= - -pair\_style morse/omp command -============================= - -pair\_style morse/opt command -============================= - -pair\_style morse/smooth/linear command -======================================= - -pair\_style morse/smooth/linear/omp command -=========================================== - -pair\_style morse/kk command +pair_style morse/gpu command ============================ +pair_style morse/omp command +============================ + +pair_style morse/opt command +============================ + +pair_style morse/smooth/linear command +====================================== + +pair_style morse/smooth/linear/omp command +========================================== + +pair_style morse/kk command +=========================== + Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -44,11 +44,11 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style morse 2.5 pair_style morse/smooth/linear 2.5 - pair_coeff \* \* 100.0 2.0 1.5 + pair_coeff * * 100.0 2.0 1.5 pair_coeff 1 1 100.0 2.0 1.5 3.0 Description @@ -56,8 +56,11 @@ Description Style *morse* computes pairwise interactions with the formula -.. image:: Eqs/pair_morse.jpg - :align: center +.. math:: + + E = D_0 \left[ e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} \right] + \qquad r < r_c + Rc is the cutoff. @@ -83,8 +86,11 @@ The *morse/smooth/linear* variant is similar to the lj/smooth/linear variant in that it adds to the potential a shift and a linear term so that both, potential energy and force, go to zero at the cut-off: -.. image:: Eqs/pair_morse_smooth_linear.jpg - :align: center +.. math:: + + \phi\left(r\right) & = D_0 \left[ e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} \right] \qquad r < r_c \\ + E\left(r\right) & = \phi\left(r\right) - \phi\left(R_c\right) - \left(r - R_c\right) \left.\frac{d\phi}{d r} \right|_{r=R_c} \qquad r < R_c + The syntax of the pair\_style and pair\_coeff commands are the same for the *morse* and *morse/smooth/linear* styles. @@ -93,10 +99,12 @@ the *morse* and *morse/smooth/linear* styles. ---------- -A version of the *morse* style with a soft core, *morse/soft*\ , suitable for use in -free energy calculations, is part of the USER-FEP package and is documented with -the :doc:`pair_style */soft ` styles. The version with soft core is only -available if LAMMPS was built with that package. See the :doc:`Build package ` doc page for more info. +A version of the *morse* style with a soft core, *morse/soft*\ , +suitable for use in free energy calculations, is part of the USER-FEP +package and is documented with the :doc:`pair_style */soft +` styles. The version with soft core is only available if +LAMMPS was built with that package. See the :doc:`Build package +` doc page for more info. ---------- diff --git a/doc/src/pair_multi_lucy.rst b/doc/src/pair_multi_lucy.rst index 6363dd9b7d..39b641361e 100644 --- a/doc/src/pair_multi_lucy.rst +++ b/doc/src/pair_multi_lucy.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style multi/lucy +.. index:: pair_style multi/lucy -pair\_style multi/lucy command -============================== +pair_style multi/lucy command +============================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style multi/lucy style N keyword ... @@ -18,10 +18,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style multi/lucy linear 1000 - pair_coeff \* \* multibody.table ENTRY1 7.0 + pair_coeff * * multibody.table ENTRY1 7.0 Description """"""""""" @@ -30,29 +30,37 @@ Style *multi/lucy* computes a density-dependent force following from the many-body form described in :ref:`(Moore) ` and :ref:`(Warren) ` as -.. image:: Eqs/pair_multi_lucy.jpg - :align: center +.. math:: -which consists of a density-dependent function, A(rho), and a -radial-dependent weight function, omegaDD(rij). The radial-dependent -weight function, omegaDD(rij), is taken as the Lucy function: + F_{i}^{DD}(\rho_i,\rho_j,r_{ij}) = \frac{1}{2} \omega_{DD}\left(r_{ij}\right) + \left[A\left(\rho_i\right) + A\left(\rho_j\right)\right]e_{ij} + + +which consists of a density-dependent function, :math:`A(\rho)`, and a +radial-dependent weight function, :math:`\omega_{DD}(r_{ij})`. The +radial-dependent weight function, :math:`\omega_{DD}(r_{ij})`, is taken +as the Lucy function: + +.. math:: + + \omega_{DD}\left(r_{ij}\right) = \left(1+\frac{3r_{ij}}{r_{cut}}\right)\left(1+\frac{r_{ij}}{r_{cut}}\right)^3 -.. image:: Eqs/pair_multi_lucy2.jpg - :align: center The density-dependent energy for a given particle is given by: -.. image:: Eqs/pair_multi_lucy_energy.jpg - :align: center +.. math:: + + u_{i}^{DD}\left(\rho_{i}\right) = \frac{\pi r_{cut}^4}{84} \int_{\rho_0}^{\rho_i} A\left(\rho'\right) d\rho' + See the supporting information of :ref:`(Brennan) ` or the publication by :ref:`(Moore) ` for more details on the functional form. -An interpolation table is used to evaluate the density-dependent -energy (Integral(A(rho)drho) and force (A(rho)). Note that the -pre-factor to the energy is computed after the interpolation, thus the -Integral(A(rho)drho will have units of energy / length\^4. +An interpolation table is used to evaluate the density-dependent energy +(:math:`\int A(\rho') d\rho'`) and force (:math:`A(\rho')`). Note that +the pre-factor to the energy is computed after the interpolation, thus +the :math:`\int A(\rho') d \rho'` will have units of energy / length\^4. The interpolation table is created as a pre-computation by fitting cubic splines to the file values and interpolating the @@ -137,23 +145,24 @@ as-is to perform spline interpolation. In this case, the table values can be spaced in *density* uniformly or however you wish to position table values in regions of large gradients. -If used, the parameters "R" or "RSQ" are followed by 2 values *rlo* -and *rhi*\ . If specified, the density associated with each density-dependent -energy and force value is computed from these 2 values (at high accuracy), rather -than using the (low-accuracy) value listed in each line of the table. -The density values in the table file are ignored in this case. -For "R", distances uniformly spaced between *rlo* and *rhi* are -computed; for "RSQ", squared distances uniformly spaced between -*rlo\*rlo* and *rhi\*rhi* are computed. +If used, the parameters "R" or "RSQ" are followed by 2 values *rlo* and +*rhi*\ . If specified, the density associated with each +density-dependent energy and force value is computed from these 2 values +(at high accuracy), rather than using the (low-accuracy) value listed in +each line of the table. The density values in the table file are +ignored in this case. For "R", distances uniformly spaced between *rlo* +and *rhi* are computed; for "RSQ", squared distances uniformly spaced +between *rlo\*rlo* and *rhi\*rhi* are computed. .. note:: - If you use "R" or "RSQ", the tabulated distance values in the - file are effectively ignored, and replaced by new values as described - in the previous paragraph. If the density value in the table is not - very close to the new value (i.e. round-off difference), then you will - be assigning density-dependent energy and force values to a different density, - which is probably not what you want. LAMMPS will warn if this is occurring. + If you use "R" or "RSQ", the tabulated distance values in the file + are effectively ignored, and replaced by new values as described in + the previous paragraph. If the density value in the table is not + very close to the new value (i.e. round-off difference), then you + will be assigning density-dependent energy and force values to a + different density, which is probably not what you want. LAMMPS will + warn if this is occurring. Following a blank line, the next N lines list the tabulated values. On each line, the 1st value is the index from 1 to N, the 2nd value is diff --git a/doc/src/pair_multi_lucy_rx.rst b/doc/src/pair_multi_lucy_rx.rst index 5a56cfb48e..e057b184f7 100644 --- a/doc/src/pair_multi_lucy_rx.rst +++ b/doc/src/pair_multi_lucy_rx.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style multi/lucy/rx +.. index:: pair_style multi/lucy/rx -pair\_style multi/lucy/rx command -================================= +pair_style multi/lucy/rx command +================================ -pair\_style multi/lucy/rx/kk command -==================================== +pair_style multi/lucy/rx/kk command +=================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style multi/lucy/rx style N keyword ... @@ -22,13 +22,13 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style multi/lucy/rx linear 1000 pair_style multi/lucy/rx linear 1000 fractional pair_style multi/lucy/rx linear 1000 molecular - pair_coeff \* \* multibody.table ENTRY1 h2o h2o 7.0 - pair_coeff \* \* multibody.table ENTRY1 h2o 1fluid 7.0 + pair_coeff * * multibody.table ENTRY1 h2o h2o 7.0 + pair_coeff * * multibody.table ENTRY1 h2o 1fluid 7.0 Description """"""""""" @@ -43,29 +43,37 @@ particle through a site-site interaction potential model. Style following from the many-body form described in :ref:`(Moore) ` and :ref:`(Warren) ` as -.. image:: Eqs/pair_multi_lucy.jpg - :align: center +.. math:: -which consists of a density-dependent function, A(rho), and a -radial-dependent weight function, omegaDD(rij). The radial-dependent -weight function, omegaDD(rij), is taken as the Lucy function: + F_{i}^{DD}(\rho_i,\rho_j,r_{ij}) = \frac{1}{2} \omega_{DD}\left(r_{ij}\right) + \left[A\left(\rho_i\right) + A\left(\rho_j\right)\right]e_{ij} + + +which consists of a density-dependent function, :math:`A(\rho)`, and a +radial-dependent weight function, :math:`\omega_{DD}(r_{ij})`. The +radial-dependent weight function, :math:`\omega_{DD}(r_{ij})`, is taken +as the Lucy function: + +.. math:: + + \omega_{DD}\left(r_{ij}\right) = \left(1+\frac{3r_{ij}}{r_{cut}}\right)\left(1+\frac{r_{ij}}{r_{cut}}\right)^3 -.. image:: Eqs/pair_multi_lucy2.jpg - :align: center The density-dependent energy for a given particle is given by: -.. image:: Eqs/pair_multi_lucy_energy.jpg - :align: center +.. math:: + + u_{i}^{DD}\left(\rho_{i}\right) = \frac{\pi r_{cut}^4}{84} \int_{\rho_0}^{\rho_i} A\left(\rho'\right) d\rho' + See the supporting information of :ref:`(Brennan) ` or the publication by :ref:`(Moore) ` for more details on the functional form. -An interpolation table is used to evaluate the density-dependent -energy (Integral(A(rho)drho) and force (A(rho)). Note that the -pre-factor to the energy is computed after the interpolation, thus the -Integral(A(rho)drho will have units of energy / length\^4. +An interpolation table is used to evaluate the density-dependent energy +(:math:`\int A(\rho') d \rho'`) and force (:math:`A(\rho')`). Note that +the pre-factor to the energy is computed after the interpolation, thus +the :math:`\int A(\rho') d\rho'` will have units of energy / length\^4. The interpolation table is created as a pre-computation by fitting cubic splines to the file values and interpolating the diff --git a/doc/src/pair_nb3b_harmonic.rst b/doc/src/pair_nb3b_harmonic.rst index 2f2270a6a5..48a7038fb2 100644 --- a/doc/src/pair_nb3b_harmonic.rst +++ b/doc/src/pair_nb3b_harmonic.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style nb3b/harmonic +.. index:: pair_style nb3b/harmonic -pair\_style nb3b/harmonic command -================================= +pair_style nb3b/harmonic command +================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style nb3b/harmonic @@ -15,10 +15,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style nb3b/harmonic - pair_coeff \* \* MgOH.nb3bharmonic Mg O H + pair_coeff * * MgOH.nb3bharmonic Mg O H Description """"""""""" @@ -26,10 +26,12 @@ Description This pair style computes a non-bonded 3-body harmonic potential for the energy E of a system of atoms as -.. image:: Eqs/pair_nb3b_harmonic.jpg - :align: center +.. math:: -where *theta\_0* is the equilibrium value of the angle and *K* is a + E = K (\theta - \theta_0)^2 + + +where :math:`\theta_0` is the equilibrium value of the angle and *K* is a prefactor. Note that the usual 1/2 factor is included in *K*\ . The form of the potential is identical to that used in angle\_style *harmonic*\ , but in this case, the atoms do not need to be explicitly bonded. @@ -52,9 +54,9 @@ want the 1st 3 to be Si, and the 4th to be C, you would use the following pair\_coeff command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* SiC.nb3b.harmonic Si Si Si C + pair_coeff * * SiC.nb3b.harmonic Si Si Si C The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Si arguments map LAMMPS atom types 1,2,3 to the Si @@ -76,15 +78,15 @@ triplet of elements. Each entry has six arguments. The first three are atom types as referenced in the LAMMPS input file. The first argument specifies the central atom. The fourth argument indicates the *K* parameter. The -fifth argument indicates *theta\_0*. The sixth argument indicates a +fifth argument indicates :math:`\theta_0`. The sixth argument indicates a separation cutoff in Angstroms. For a given entry, if the second and third arguments are identical, then the entry is for a cutoff for the distance between types 1 and 2 -(values for *K* and *theta\_0* are irrelevant in this case). +(values for *K* and :math:`\theta_0` are irrelevant in this case). -For a given entry, if the first three arguments are all different, -then the entry is for the *K* and *theta\_0* parameters (the cutoff in +For a given entry, if the first three arguments are all different, then +the entry is for the *K* and :math:`\theta_0` parameters (the cutoff in this case is irrelevant). It is required that the potential file contains entries for *all* diff --git a/doc/src/pair_nm.rst b/doc/src/pair_nm.rst index 6d319c6d06..27bb11fe65 100644 --- a/doc/src/pair_nm.rst +++ b/doc/src/pair_nm.rst @@ -1,28 +1,28 @@ -.. index:: pair\_style nm/cut +.. index:: pair_style nm/cut -pair\_style nm/cut command -========================== +pair_style nm/cut command +========================= -pair\_style nm/cut/coul/cut command +pair_style nm/cut/coul/cut command +================================== + +pair_style nm/cut/coul/long command =================================== -pair\_style nm/cut/coul/long command -==================================== +pair_style nm/cut/omp command +============================= -pair\_style nm/cut/omp command -============================== +pair_style nm/cut/coul/cut/omp command +====================================== -pair\_style nm/cut/coul/cut/omp command +pair_style nm/cut/coul/long/omp command ======================================= -pair\_style nm/cut/coul/long/omp command -======================================== - Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -46,18 +46,18 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style nm/cut 12.0 - pair_coeff \* \* 0.01 5.4 8.0 7.0 + pair_coeff * * 0.01 5.4 8.0 7.0 pair_coeff 1 1 0.01 4.4 7.0 6.0 pair_style nm/cut/coul/cut 12.0 15.0 - pair_coeff \* \* 0.01 5.4 8.0 7.0 + pair_coeff * * 0.01 5.4 8.0 7.0 pair_coeff 1 1 0.01 4.4 7.0 6.0 pair_style nm/cut/coul/long 12.0 15.0 - pair_coeff \* \* 0.01 5.4 8.0 7.0 + pair_coeff * * 0.01 5.4 8.0 7.0 pair_coeff 1 1 0.01 4.4 7.0 6.0 Description diff --git a/doc/src/pair_none.rst b/doc/src/pair_none.rst index 43f56d20bc..11a4a79163 100644 --- a/doc/src/pair_none.rst +++ b/doc/src/pair_none.rst @@ -1,13 +1,12 @@ -.. index:: pair\_style none +.. index:: pair_style none -pair\_style none command -======================== +pair_style none command +======================= Syntax """""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style none @@ -15,7 +14,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style none @@ -43,7 +42,7 @@ building of a neighbor lists, but compute no pairwise interactions. Restrictions """""""""""" - none +none Related commands """""""""""""""" diff --git a/doc/src/pair_oxdna.rst b/doc/src/pair_oxdna.rst index 8faef5decd..f24520f473 100644 --- a/doc/src/pair_oxdna.rst +++ b/doc/src/pair_oxdna.rst @@ -1,29 +1,29 @@ -.. index:: pair\_style oxdna/excv +.. index:: pair_style oxdna/excv -pair\_style oxdna/excv command -============================== - -pair\_style oxdna/stk command +pair_style oxdna/excv command ============================= -pair\_style oxdna/hbond command -=============================== +pair_style oxdna/stk command +============================ -pair\_style oxdna/xstk command +pair_style oxdna/hbond command ============================== -pair\_style oxdna/coaxstk command -================================= +pair_style oxdna/xstk command +============================= + +pair_style oxdna/coaxstk command +================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style1 - pair_coeff \* \* style2 args + pair_coeff * * style2 args * style1 = *hybrid/overlay oxdna/excv oxdna/stk oxdna/hbond oxdna/xstk oxdna/coaxstk* @@ -46,16 +46,16 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid/overlay oxdna/excv oxdna/stk oxdna/hbond oxdna/xstk oxdna/coaxstk - pair_coeff \* \* oxdna/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 - pair_coeff \* \* oxdna/stk seqdep 0.1 1.3448 2.6568 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 - pair_coeff \* \* oxdna/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 + pair_coeff * * oxdna/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 + pair_coeff * * oxdna/stk seqdep 0.1 1.3448 2.6568 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 + pair_coeff * * oxdna/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 1 4 oxdna/hbond seqdep 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 2 3 oxdna/hbond seqdep 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 - pair_coeff \* \* oxdna/xstk 47.5 0.575 0.675 0.495 0.655 2.25 0.791592653589793 0.58 1.7 1.0 0.68 1.7 1.0 0.68 1.5 0 0.65 1.7 0.875 0.68 1.7 0.875 0.68 - pair_coeff \* \* oxdna/coaxstk 46.0 0.4 0.6 0.22 0.58 2.0 2.541592653589793 0.65 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 -0.65 2.0 -0.65 + pair_coeff * * oxdna/xstk 47.5 0.575 0.675 0.495 0.655 2.25 0.791592653589793 0.58 1.7 1.0 0.68 1.7 1.0 0.68 1.5 0 0.65 1.7 0.875 0.68 1.7 0.875 0.68 + pair_coeff * * oxdna/coaxstk 46.0 0.4 0.6 0.22 0.58 2.0 2.541592653589793 0.65 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 -0.65 2.0 -0.65 Description """"""""""" diff --git a/doc/src/pair_oxdna2.rst b/doc/src/pair_oxdna2.rst index 8c903f023f..368a203b8a 100644 --- a/doc/src/pair_oxdna2.rst +++ b/doc/src/pair_oxdna2.rst @@ -1,32 +1,32 @@ -.. index:: pair\_style oxdna2/excv +.. index:: pair_style oxdna2/excv -pair\_style oxdna2/excv command -=============================== - -pair\_style oxdna2/stk command +pair_style oxdna2/excv command ============================== -pair\_style oxdna2/hbond command -================================ +pair_style oxdna2/stk command +============================= -pair\_style oxdna2/xstk command +pair_style oxdna2/hbond command =============================== -pair\_style oxdna2/coaxstk command -================================== +pair_style oxdna2/xstk command +============================== -pair\_style oxdna2/dh command -============================= +pair_style oxdna2/coaxstk command +================================= + +pair_style oxdna2/dh command +============================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style1 - pair_coeff \* \* style2 args + pair_coeff * * style2 args * style1 = *hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh* @@ -53,17 +53,17 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh - pair_coeff \* \* oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 - pair_coeff \* \* oxdna2/stk seqdep 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 - pair_coeff \* \* oxdna2/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 + pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 + pair_coeff * * oxdna2/stk seqdep 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 + pair_coeff * * oxdna2/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 1 4 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 pair_coeff 2 3 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 - pair_coeff \* \* oxdna2/xstk 47.5 0.575 0.675 0.495 0.655 2.25 0.791592653589793 0.58 1.7 1.0 0.68 1.7 1.0 0.68 1.5 0 0.65 1.7 0.875 0.68 1.7 0.875 0.68 - pair_coeff \* \* oxdna2/coaxstk 58.5 0.4 0.6 0.22 0.58 2.0 2.891592653589793 0.65 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 40.0 3.116592653589793 - pair_coeff \* \* oxdna2/dh 0.1 0.5 0.815 + pair_coeff * * oxdna2/xstk 47.5 0.575 0.675 0.495 0.655 2.25 0.791592653589793 0.58 1.7 1.0 0.68 1.7 1.0 0.68 1.5 0 0.65 1.7 0.875 0.68 1.7 0.875 0.68 + pair_coeff * * oxdna2/coaxstk 58.5 0.4 0.6 0.22 0.58 2.0 2.891592653589793 0.65 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 40.0 3.116592653589793 + pair_coeff * * oxdna2/dh 0.1 0.5 0.815 Description """"""""""" diff --git a/doc/src/pair_peri.rst b/doc/src/pair_peri.rst index f9f183ea27..5f74f98554 100644 --- a/doc/src/pair_peri.rst +++ b/doc/src/pair_peri.rst @@ -1,28 +1,28 @@ -.. index:: pair\_style peri/pmb +.. index:: pair_style peri/pmb -pair\_style peri/pmb command -============================ +pair_style peri/pmb command +=========================== -pair\_style peri/pmb/omp command -================================ +pair_style peri/pmb/omp command +=============================== -pair\_style peri/lps command -============================ +pair_style peri/lps command +=========================== -pair\_style peri/lps/omp command -================================ +pair_style peri/lps/omp command +=============================== -pair\_style peri/ves command -============================ +pair_style peri/ves command +=========================== -pair\_style peri/eps command -============================ +pair_style peri/eps command +=========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style @@ -32,19 +32,19 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style peri/pmb - pair_coeff \* \* 1.6863e22 0.0015001 0.0005 0.25 + pair_coeff * * 1.6863e22 0.0015001 0.0005 0.25 pair_style peri/lps - pair_coeff \* \* 14.9e9 14.9e9 0.0015001 0.0005 0.25 + pair_coeff * * 14.9e9 14.9e9 0.0015001 0.0005 0.25 pair_style peri/ves - pair_coeff \* \* 14.9e9 14.9e9 0.0015001 0.0005 0.25 0.5 0.001 + pair_coeff * * 14.9e9 14.9e9 0.0015001 0.0005 0.25 0.5 0.001 pair_style peri/eps - pair_coeff \* \* 14.9e9 14.9e9 0.0015001 0.0005 0.25 118.43 + pair_coeff * * 14.9e9 14.9e9 0.0015001 0.0005 0.25 118.43 Description """"""""""" diff --git a/doc/src/pair_polymorphic.rst b/doc/src/pair_polymorphic.rst index d623480a85..b19f3b9f3b 100644 --- a/doc/src/pair_polymorphic.rst +++ b/doc/src/pair_polymorphic.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style polymorphic +.. index:: pair_style polymorphic -pair\_style polymorphic command -=============================== +pair_style polymorphic command +============================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style polymorphic @@ -17,13 +17,13 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style polymorphic - pair_coeff \* \* TlBr_msw.polymorphic Tl Br - pair_coeff \* \* AlCu_eam.polymorphic Al Cu - pair_coeff \* \* GaN_tersoff.polymorphic Ga N - pair_coeff \* \* GaN_sw.polymorphic GaN + pair_coeff * * TlBr_msw.polymorphic Tl Br + pair_coeff * * AlCu_eam.polymorphic Al Cu + pair_coeff * * GaN_tersoff.polymorphic Ga N + pair_coeff * * GaN_sw.polymorphic GaN Description """"""""""" @@ -31,64 +31,131 @@ Description The *polymorphic* pair style computes a 3-body free-form potential (:ref:`Zhou `) for the energy E of a system of atoms as -.. image:: Eqs/polymorphic1.jpg - :align: center +.. math:: -.. image:: Eqs/polymorphic2.jpg - :align: center + E & = \frac{1}{2}\sum_{i=1}^{i=N}\sum_{j=1}^{j=N}\left[\left(1-\delta_{ij}\right)\cdot U_{IJ}\left(r_{ij}\right)-\left(1-\eta_{ij}\right)\cdot F_{IJ}\left(r_{ij}\right)\cdot V_{IJ}\left(r_{ij}\right)\right] \\ + X_{ij} & = \sum_{k=i_1,k\neq i,j}^{i_N}W_{IK}\left(r_{ik}\right)\cdot G_{JIK}\left(\theta_{jik}\right)\cdot P_{IK}\left(\Delta r_{jik}\right) \\ + \Delta r_{jik} & = r_{ij}-\xi_{IJ}\cdot r_{ik} -.. image:: Eqs/polymorphic3.jpg - :align: center +where I, J, K represent species of atoms i, j, and k, :math:`i_1, ..., +i_N` represents a list of *i*\ 's neighbors, :math:`\delta_{ij}` is a +Dirac constant (i.e., :math:`\delta_{ij} = 1` when :math:`i = j`, and +:math:`\delta_{ij} = 0` otherwise), :math:`\eta_{ij}` is similar +constant that can be set either to :math:`\eta_{ij} = \delta_{ij}` or +:math:`\eta_{ij} = 1 - \delta_{ij}` depending on the potential type, +:math:`U_{IJ}(r_{ij})`, :math:`V_{IJ}(r_{ij})`, :math:`W_{IK}(r_{ik})` +are pair functions, :math:`G_{JIK}(\cos(\theta))` is an angular +function, :math:`P_{IK}(\Delta r_{jik})` is a function of atomic spacing +differential :math:`\Delta r_{jik} = r_{ij} - \xi_{IJ} \cdot r_{ik}` +with :math:`\xi_{IJ}` being a pair-dependent parameter, and +:math:`F_{IJ}(X_{ij})` is a function of the local environment variable +:math:`X_{ij}`. This generic potential is fully defined once the +constants :math:`\eta_{ij}` and :math:`\xi_{IJ}`, and the six functions +:math:`U_{IJ}(r_{ij})`, :math:`V_{IJ}(r_{ij})`, :math:`W_{IK}(r_{ik})`, +:math:`G_{JIK}(\cos(\theta))`, :math:`P_{IK}(\Delta r_{jik})`, and +:math:`F_{IJ}(X_{ij})` are given. Note that these six functions are all +one dimensional, and hence can be provided in an analytic or tabular +form. This allows users to design different potentials solely based on a +manipulation of these functions. For instance, the potential reduces to +Stillinger-Weber potential (:ref:`SW `) if we set -where I, J, K represent species of atoms i, j, and k, i\_1, ..., i\_N -represents a list of i's neighbors, delta\_ij is a Direc constant -(i.e., delta\_ij = 1 when i = j, and delta\_ij = 0 otherwise), eta\_ij is -similar constant that can be set either to eta\_ij = delta\_ij or eta\_ij -= 1 - delta\_ij depending on the potential type, U\_IJ(r\_ij), -V\_IJ(r\_ij), W\_IK(r\_ik) are pair functions, G\_JIK(cos(theta)) is an -angular function, P\_IK(delta r\_jik) is a function of atomic spacing -differential delta r\_jik = r\_ij - xi\_IJ\*r\_ik with xi\_IJ being a -pair-dependent parameter, and F\_IJ(X\_ij) is a function of the local -environment variable X\_ij. This generic potential is fully defined -once the constants eta\_ij and xi\_IJ, and the six functions U\_IJ(r\_ij), -V\_IJ(r\_ij), W\_IK(r\_ik), G\_JIK(cos(theta)), P\_IK(delta r\_jik), and -F\_IJ(X\_ij) are given. Note that these six functions are all one -dimensional, and hence can be provided in an analytic or tabular -form. This allows users to design different potentials solely based on -a manipulation of these functions. For instance, the potential reduces -to Stillinger-Weber potential (:ref:`SW `) if we set +.. math:: + + \left\{\begin{array}{l} + \eta_{ij} = \delta_{ij},\xi_{IJ}=0 \\ + U_{IJ}\left(r\right)=A_{IJ}\cdot\epsilon_{IJ}\cdot \left(\frac{\sigma_{IJ}}{r}\right)^q\cdot \left[B_{IJ}\cdot \left(\frac{\sigma_{IJ}}{r}\right)^{p-q}-1\right]\cdot exp\left(\frac{\sigma_{IJ}}{r-a_{IJ}\cdot \sigma_{IJ}}\right) \\ + V_{IJ}\left(r\right)=\sqrt{\lambda_{IJ}\cdot \epsilon_{IJ}}\cdot exp\left(\frac{\gamma_{IJ}\cdot \sigma_{IJ}}{r-a_{IJ}\cdot \sigma_{IJ}}\right) \\ + F_{IJ}\left(X\right)=-X \\ + P_{IJ}\left(\Delta r\right)=1 \\ + W_{IJ}\left(r\right)=\sqrt{\lambda_{IJ}\cdot \epsilon_{IJ}}\cdot exp\left(\frac{\gamma_{IJ}\cdot \sigma_{IJ}}{r-a_{IJ}\cdot \sigma_{IJ}}\right) \\ + G_{JIK}\left(\theta\right)=\left(cos\theta+\frac{1}{3}\right)^2 + \end{array}\right. -.. image:: Eqs/polymorphic4.jpg - :align: center The potential reduces to Tersoff types of potential (:ref:`Tersoff ` or :ref:`Albe `) if we set -.. image:: Eqs/polymorphic5.jpg - :align: center +.. math:: + + \left\{\begin{array}{l} + \eta_{ij}=\delta_{ij},\xi_{IJ}=1 \\ + U_{IJ}\left(r\right)=\frac{D_{e,IJ}}{S_{IJ}-1}\cdot exp\left[-\beta_{IJ}\sqrt{2S_{IJ}\left(r-r_{e,IJ}\right)}\right]\cdot f_{c,IJ}\left(r\right) \\ + V_{IJ}\left(r\right)=\frac{S_{IJ}\cdot D_{e,IJ}}{S_{IJ}-1}\cdot exp\left[-\beta_{IJ}\sqrt{\frac{2}{S_{IJ}}\left(r-r_{e,IJ}\right)}\right]\cdot f_{c,IJ}\left(r\right) \\ + F_{IJ}\left(X\right)=\left(1+X\right)^{-\frac{1}{2}} \\ + P_{IJ}\left(\Delta r\right)=exp\left(2\mu_{IK}\cdot \Delta r\right) \\ + W_{IJ}\left(r\right)=f_{c,IK}\left(r\right) \\ + G_{JIK}\left(\theta\right)=\gamma_{IK}\left[1+\frac{c_{IK}^2}{d_{IK}^2}-\frac{c_{IK}^2}{d_{IK}^2+\left(h_{IK}+cos\theta\right)^2}\right] + \end{array}\right. + + +.. math:: + + f_{c,IJ}=\left\{\begin{array}{lr} + 1, & r\leq r_{s,IJ} \\ + \frac{1}{2}+\frac{1}{2} cos \left[\frac{\pi \left(r-r_{s,IJ}\right)}{r_{c,IJ}-r_{s,IJ}}\right], & r_{s,IJ}`) type if we set -.. image:: Eqs/polymorphic7.jpg - :align: center +.. math:: -.. image:: Eqs/polymorphic6.jpg - :align: center + \left\{\begin{array}{l} + \eta_{ij}=\delta_{ij},\xi_{IJ}=1 \\ + U_{IJ}\left(r\right)=\left\{\begin{array}{lr} + A_{IJ}\cdot exp\left(-\lambda_{1,IJ}\cdot r\right)\cdot f_{c,IJ}\left(r\right), & r\leq r_{s,1,IJ} \\ + A_{IJ}\cdot exp\left(-\lambda_{1,IJ}\cdot r\right)\cdot f_{c,IJ}\left(r\right)\cdot f_{c,1,IJ}\left(r\right), & r_{s,1,IJ}`) if we set -.. image:: Eqs/polymorphic9.jpg - :align: center +.. math:: -In the embedded atom method case, phi\_IJ(r\_ij) is the pair energy, -F\_I(X) is the embedding energy, X is the local electron density, and -f\_K(r) is the atomic electron density function. + \left\{\begin{array}{l} + \eta_{ij}=1-\delta_{ij},\xi_{IJ}=0 \\ + U_{IJ}\left(r\right)=\phi_{IJ}\left(r\right) \\ + V_{IJ}\left(r\right)=1 \\ + F_{II}\left(X\right)=-2F_I\left(X\right) \\ + P_{IJ}\left(\Delta r\right)=1 \\ + W_{IJ}\left(r\right)=f_{K}\left(r\right) \\ + G_{JIK}\left(\theta\right)=1 + \end{array}\right. + + +In the embedded atom method case, :math:`\phi_{IJ}(r_{ij})` is the pair +energy, :math:`F_I(X)` is the embedding energy, *X* is the local +electron density, and :math:`f_K(r)` is the atomic electron density function. If the tabulated functions are created using the parameters of sw, tersoff, and eam potentials, the polymorphic pair style will produce @@ -114,10 +181,10 @@ LAMMPS atom types: See the pair\_coeff doc page for alternate ways to specify the path for the potential file. Several files for polymorphic potentials are -included in the potentials dir of the LAMMPS distribution. They have a -"poly" suffix. +included in the potentials directory of the LAMMPS distribution. They +have a "poly" suffix. -As an example, imagine the SiC\_tersoff.polymorphic file has tabulated +As an example, imagine the SiC\_tersoff.poly file has tabulated functions for Si-C tersoff potential. If your LAMMPS simulation has 4 atoms types and you want the 1st 3 to be Si, and the 4th to be C, you would use the following pair\_coeff command: @@ -125,7 +192,7 @@ would use the following pair\_coeff command: .. parsed-literal:: - pair_coeff \* \* SiC_tersoff.polymorphic Si Si Si C + pair_coeff \* \* SiC_tersoff.poly Si Si Si C The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Si arguments map LAMMPS atom types 1,2,3 to the @@ -144,15 +211,16 @@ and are ignored by LAMMPS. The next line lists two numbers: .. parsed-literal:: - ntypes eta + ntypes :math:`\eta` Here ntypes represent total number of species defined in the potential -file, and eta = 0 or 1. The number ntypes must equal the total number -of different species defined in the pair\_coeff command. When eta = 1, -eta\_ij defined in the potential functions above is set to 1 - -delta\_ij, otherwise eta\_ij is set to delta\_ij. The next ntypes lines -each lists two numbers and a character string representing atomic -number, atomic mass, and name of the species of the ntypes elements: +file, and :math:`\eta = 0` or 1. The number ntypes must equal the total +number of different species defined in the pair\_coeff command. When +:math:`\eta = 1`, :math:\eta_{ij}` defined in the potential functions +above is set to :math:`1 - \delta_{ij}`, otherwise :math:`\eta_{ij}` is +set to :math:`\delta_{ij}`. The next ntypes lines each lists two numbers +and a character string representing atomic number, atomic mass, and name +of the species of the ntypes elements: .. parsed-literal:: @@ -167,18 +235,18 @@ The next ntypes\*(ntypes+1)/2 lines contain two numbers: .. parsed-literal:: - cut xi (1) - cut xi (2) + cut :math:`xi` (1) + cut :math:`xi` (2) ... - cut xi (ntypes\*(ntypes+1)/2) + cut :math:`xi` (ntypes\*(ntypes+1)/2) -Here cut means the cutoff distance of the pair functions, xi is the -same as defined in the potential functions above. The +Here cut means the cutoff distance of the pair functions, :math:`\xi` is +the same as defined in the potential functions above. The ntypes\*(ntypes+1)/2 lines are related to the pairs according to the -sequence of first ii (self) pairs, i = 1, 2, ..., ntypes, and then -then ij (cross) pairs, i = 1, 2, ..., ntypes-1, and j = i+1, i+2, ..., -ntypes (i.e., the sequence of the ij pairs follows 11, 22, ..., 12, -13, 14, ..., 23, 24, ...). +sequence of first ii (self) pairs, i = 1, 2, ..., ntypes, and then then +ij (cross) pairs, i = 1, 2, ..., ntypes-1, and j = i+1, i+2, ..., ntypes +(i.e., the sequence of the ij pairs follows 11, 22, ..., 12, 13, 14, +..., 23, 24, ...). The final blocks of the potential file are the U, V, W, P, G, and F functions are listed sequentially. First, U functions are given for @@ -200,8 +268,8 @@ point, (x1,x2)=range and then followed by n values evaluated uniformly over these argument ranges. The valid argument ranges of the functions are between 0 <= r <= cut for the U(r), V(r), W(r) functions, -cutmax <= delta\_r <= cutmax for the P(delta\_r) functions, --1 <= costheta <= 1 for the G(costheta) functions, and 0 <= X <= maxX -for the F(X) functions. +-1 <= :math:`\cos\theta` <= 1 for the G(:math:`\cos\theta`) functions, +and 0 <= X <= maxX for the F(X) functions. **Mixing, shift, table tail correction, restart**\ : diff --git a/doc/src/pair_python.rst b/doc/src/pair_python.rst index 3545a83003..23c83ed52e 100644 --- a/doc/src/pair_python.rst +++ b/doc/src/pair_python.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style python +.. index:: pair_style python -pair\_style python command -========================== +pair_style python command +========================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style python cutoff @@ -17,14 +17,14 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style python 2.5 - pair_coeff \* \* py_pot.LJCutMelt lj + pair_coeff * * py_pot.LJCutMelt lj pair_style hybrid/overlay coul/long 12.0 python 12.0 - pair_coeff \* \* coul/long - pair_coeff \* \* python py_pot.LJCutSPCE OW NULL + pair_coeff * * coul/long + pair_coeff * * python py_pot.LJCutSPCE OW NULL Description """"""""""" @@ -62,9 +62,9 @@ two are supposed to be using the 'LJ1' parameters and the third the 'LJ2' parameters, then you would use the following pair\_coeff command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* py_pot.LJCutMelt LJ1 LJ1 LJ2 + pair_coeff * * py_pot.LJCutMelt LJ1 LJ1 LJ2 The first two arguments **must** be \* \* so as to span all LAMMPS atom types. The first two LJ1 arguments map LAMMPS atom types 1 and 2 to @@ -83,10 +83,10 @@ placeholders for atom types that will be used with other potentials. The python potential file has to start with the following code: -.. parsed-literal:: +.. code-block:: python - from __future_\_ import print_function - # + from __future__ import print_function + class LAMMPSPairPotential(object): def __init__(self): self.pmap=dict() @@ -115,7 +115,7 @@ Here is an example for a single type Lennard-Jones potential class which the parameters epsilon and sigma are both 1.0: -.. parsed-literal:: +.. code-block:: python class LJCutMelt(LAMMPSPairPotential): def __init__(self): @@ -140,7 +140,7 @@ value of the internal potential parameter data structure. Following the *LJCutMelt* example, here are the two functions: -.. parsed-literal:: +.. code-block:: python def compute_force(self,rsq,itype,jtype): coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] @@ -181,10 +181,10 @@ the *LJCutMelt* example, here are the two functions: for an example LAMMPS input of how to build a table file: -.. parsed-literal:: +.. code-block:: LAMMPS pair_style python 2.5 - pair_coeff \* \* py_pot.LJCutMelt lj + pair_coeff * * py_pot.LJCutMelt lj shell rm -f melt.table pair_write 1 1 2000 rsq 0.01 2.5 lj1_lj2.table lj @@ -199,7 +199,7 @@ After switching the pair style to *table*\ , the potential tables need to be assigned to the LAMMPS atom types like this: -.. parsed-literal:: +.. code-block:: LAMMPS pair_style table linear 2000 pair_coeff 1 1 melt.table lj diff --git a/doc/src/pair_quip.rst b/doc/src/pair_quip.rst index 304edced31..4c91677f08 100644 --- a/doc/src/pair_quip.rst +++ b/doc/src/pair_quip.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style quip +.. index:: pair_style quip -pair\_style quip command -======================== +pair_style quip command +======================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style quip @@ -15,11 +15,11 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style quip - pair_coeff \* \* gap_example.xml "Potential xml_label=GAP_2014_5_8_60_17_10_38_466" 14 - pair_coeff \* \* sw_example.xml "IP SW" 14 + pair_coeff * * gap_example.xml "Potential xml_label=GAP_2014_5_8_60_17_10_38_466" 14 + pair_coeff * * sw_example.xml "IP SW" 14 Description """"""""""" diff --git a/doc/src/pair_reaxc.rst b/doc/src/pair_reaxc.rst index 9f433fe237..ee5eb878c8 100644 --- a/doc/src/pair_reaxc.rst +++ b/doc/src/pair_reaxc.rst @@ -1,19 +1,19 @@ -.. index:: pair\_style reax/c +.. index:: pair_style reax/c -pair\_style reax/c command -========================== +pair_style reax/c command +========================= -pair\_style reax/c/kk command +pair_style reax/c/kk command +============================ + +pair_style reax/c/omp command ============================= -pair\_style reax/c/omp command -============================== - Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style reax/c cfile keyword value @@ -35,13 +35,13 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style reax/c NULL pair_style reax/c controlfile checkqeq no pair_style reax/c NULL lgvdw yes pair_style reax/c NULL safezone 1.6 mincap 100 - pair_coeff \* \* ffield.reax C H O N + pair_coeff * * ffield.reax C H O N Description """"""""""" @@ -189,7 +189,7 @@ To print these quantities to the log file (with descriptive column headings) the following commands could be included in an input script: -.. parsed-literal:: +.. code-block:: LAMMPS compute reax all pair reax/c variable eb equal c_reax[1] @@ -227,9 +227,9 @@ the LAMMPS atom type 1 and 2 to be C, type 3 to be N, and type 4 to be H, you would use the following pair\_coeff command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* ffield.reax C C N H + pair_coeff * * ffield.reax C C N H ---------- diff --git a/doc/src/pair_resquared.rst b/doc/src/pair_resquared.rst index 0f287e150e..a28549c344 100644 --- a/doc/src/pair_resquared.rst +++ b/doc/src/pair_resquared.rst @@ -1,19 +1,19 @@ -.. index:: pair\_style resquared +.. index:: pair_style resquared -pair\_style resquared command -============================= +pair_style resquared command +============================ -pair\_style resquared/gpu command -================================= +pair_style resquared/gpu command +================================ -pair\_style resquared/omp command -================================= +pair_style resquared/omp command +================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style resquared cutoff @@ -23,10 +23,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style resquared 10.0 - pair_coeff \* \* 1.0 1.0 1.7 3.4 3.4 1.0 1.0 1.0 + pair_coeff * * 1.0 1.0 1.7 3.4 3.4 1.0 1.0 1.0 Description """"""""""" @@ -35,8 +35,8 @@ Style *resquared* computes the RE-squared anisotropic interaction :ref:`(Everaers) `, :ref:`(Babadi) ` between pairs of ellipsoidal and/or spherical Lennard-Jones particles. For ellipsoidal interactions, the potential considers the ellipsoid as being comprised -of small spheres of size sigma. LJ particles are a single sphere of -size sigma. The distinction is made to allow the pair style to make +of small spheres of size :math:`\sigma`. LJ particles are a single sphere of +size :math:`\sigma`. The distinction is made to allow the pair style to make efficient calculations of ellipsoid/solvent interactions. Details for the equations used are given in the references below and @@ -54,20 +54,21 @@ above, or in the data file or restart files read by the commands: * A12 = Energy Prefactor/Hamaker constant (energy units) -* sigma = atomic interaction diameter (distance units) -* epsilon\_i_a = relative well depth of type I for side-to-side interactions -* epsilon\_i_b = relative well depth of type I for face-to-face interactions -* epsilon\_i_c = relative well depth of type I for end-to-end interactions -* epsilon\_j_a = relative well depth of type J for side-to-side interactions -* epsilon\_j_b = relative well depth of type J for face-to-face interactions -* epsilon\_j_c = relative well depth of type J for end-to-end interactions +* :math:`\sigma` = atomic interaction diameter (distance units) +* :math:`\epsilon_{i,a}` = relative well depth of type I for side-to-side interactions +* :math:`\epsilon_{i,b}` = relative well depth of type I for face-to-face interactions +* :math:`\epsilon_{i,c}` = relative well depth of type I for end-to-end interactions +* :math:`\epsilon_{j,a}` = relative well depth of type J for side-to-side interactions +* :math:`\epsilon_{j,b}` = relative well depth of type J for face-to-face interactions +* :math:`\epsilon_{j,c}` = relative well depth of type J for end-to-end interactions * cutoff (distance units) The parameters used depend on the type of the interacting particles, i.e. ellipsoids or LJ spheres. The type of a particle is determined by the diameters specified for its 3 shape parameters. If all 3 shape parameters = 0.0, then the particle is treated as an LJ sphere. The -epsilon\_i_\* or epsilon\_j_\* parameters are ignored for LJ spheres. If +:math:`\epsilon_{i,*}` or :math:`\epsilon_{j,*}` parameters are ignored +for LJ spheres. If the 3 shape parameters are > 0.0, then the particle is treated as an ellipsoid (even if the 3 parameters are equal to each other). @@ -79,20 +80,23 @@ the formulas in the supplementary document referenced above. A12 is the Hamaker constant as described in :ref:`(Everaers) `. In LJ units: -.. image:: Eqs/pair_resquared.jpg - :align: center +.. math:: -where rho gives the number density of the spherical particles -composing the ellipsoids and epsilon\_LJ determines the interaction -strength of the spherical particles. + A_{12} = 4\pi^2\epsilon_{\mathrm{LJ}}(\rho\sigma^3)^2 + + +where :math:`\rho` gives the number density of the spherical particles +composing the ellipsoids and :math:`\epsilon_{\mathrm{LJ}}` determines +the interaction strength of the spherical particles. For ellipsoid/LJ sphere interactions, the interaction is also computed by the formulas in the supplementary document referenced above. A12 has a modified form (see `here `_ for details): -.. image:: Eqs/pair_resquared2.jpg - :align: center +.. math:: + + A_{12} = 4\pi^2\epsilon_{\mathrm{LJ}}(\rho\sigma^3) For ellipsoid/LJ sphere interactions, a correction to the distance- of-closest approach equation has been implemented to reduce the error @@ -103,33 +107,35 @@ using the standard Lennard-Jones formula, which is much cheaper to compute than the ellipsoidal formulas. A12 is used as epsilon in the standard LJ formula: -.. image:: Eqs/pair_resquared3.jpg - :align: center +.. math:: -and the specified *sigma* is used as the sigma in the standard LJ -formula. + A_{12} = \epsilon_{\mathrm{LJ}} + +and the specified :math:`\sigma` is used as the :math:`\sigma` in the +standard LJ formula. When one of both of the interacting particles are ellipsoids, then -*sigma* specifies the diameter of the continuous distribution of -constituent particles within each ellipsoid used to model the -RE-squared potential. Note that this is a different meaning for -*sigma* than the :doc:`pair_style gayberne ` potential -uses. +:math:`\sigma` specifies the diameter of the continuous distribution of +constituent particles within each ellipsoid used to model the RE-squared +potential. Note that this is a different meaning for :math:`\sigma` +than the :doc:`pair_style gayberne ` potential uses. -The epsilon\_i and epsilon\_j coefficients are defined for atom types, -not for pairs of atom types. Thus, in a series of pair\_coeff -commands, they only need to be specified once for each atom type. +The :math:`\epsilon_i` and :math:`\epsilon_j` coefficients are defined +for atom types, not for pairs of atom types. Thus, in a series of +pair\_coeff commands, they only need to be specified once for each atom +type. -Specifically, if any of epsilon\_i_a, epsilon\_i_b, epsilon\_i_c are -non-zero, the three values are assigned to atom type I. If all the -epsilon\_i values are zero, they are ignored. If any of epsilon\_j_a, -epsilon\_j_b, epsilon\_j_c are non-zero, the three values are assigned -to atom type J. If all three epsilon\_i values are zero, they are -ignored. Thus the typical way to define the epsilon\_i and epsilon\_j -coefficients is to list their values in "pair\_coeff I J" commands when -I = J, but set them to 0.0 when I != J. If you do list them when I != -J, you should insure they are consistent with their values in other -pair\_coeff commands. +Specifically, if any of :math:`\epsilon_{i,a}`, :math:`\epsilon_{i,b}`, +:math:`\epsilon_{i,c}` are non-zero, the three values are assigned to +atom type I. If all the :math:`\epsilon_i` values are zero, they are +ignored. If any of :math:`\epsilon_{j,a}`, :math:`\epsilon_{j,b}`, +:math:`\epsilon_{j,c}` are non-zero, the three values are assigned to +atom type J. If all three :math:`\epsilon_i` values are zero, they are +ignored. Thus the typical way to define the :math:`\epsilon_i` and +:math:`\epsilon_j` coefficients is to list their values in "pair\_coeff +I J" commands when I = J, but set them to 0.0 when I != J. If you do +list them when I != J, you should insure they are consistent with their +values in other pair\_coeff commands. Note that if this potential is being used as a sub-style of :doc:`pair_style hybrid `, and there is no "pair\_coeff I I" @@ -142,8 +148,11 @@ For large uniform molecules it has been shown that the epsilon\_\*\_\* energy parameters are approximately representable in terms of local contact curvatures :ref:`(Everaers) `: -.. image:: Eqs/pair_resquared4.jpg - :align: center +.. math:: + + \epsilon_a = \sigma \cdot { \frac{a}{ b \cdot c } }; \epsilon_b = + \sigma \cdot { \frac{b}{ a \cdot c } }; \epsilon_c = \sigma \cdot { + \frac{c}{ a \cdot b } } where a, b, and c give the particle diameters. diff --git a/doc/src/pair_sdk.rst b/doc/src/pair_sdk.rst index 6277c82be9..ba28262813 100644 --- a/doc/src/pair_sdk.rst +++ b/doc/src/pair_sdk.rst @@ -1,37 +1,37 @@ -.. index:: pair\_style lj/sdk +.. index:: pair_style lj/sdk -pair\_style lj/sdk command -========================== +pair_style lj/sdk command +========================= -pair\_style lj/sdk/gpu command -============================== - -pair\_style lj/sdk/kk command +pair_style lj/sdk/gpu command ============================= -pair\_style lj/sdk/omp command -============================== +pair_style lj/sdk/kk command +============================ -pair\_style lj/sdk/coul/long command -==================================== +pair_style lj/sdk/omp command +============================= -pair\_style lj/sdk/coul/long/gpu command -======================================== - -pair\_style lj/sdk/coul/long/omp command -======================================== - -pair\_style lj/sdk/coul/msm command +pair_style lj/sdk/coul/long command =================================== -pair\_style lj/sdk/coul/msm/omp command +pair_style lj/sdk/coul/long/gpu command ======================================= +pair_style lj/sdk/coul/long/omp command +======================================= + +pair_style lj/sdk/coul/msm command +================================== + +pair_style lj/sdk/coul/msm/omp command +====================================== + Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -51,7 +51,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/sdk 2.5 pair_coeff 1 1 lj12_6 1 1.1 2.8 @@ -70,8 +70,18 @@ Description The *lj/sdk* styles compute a 9/6, 12/4, or 12/6 Lennard-Jones potential, given by -.. image:: Eqs/pair_cmm.jpg - :align: center +.. math:: + + E = & \frac{27}{4} \epsilon \left[ \left(\frac{\sigma}{r}\right)^{9} - + \left(\frac{\sigma}{r}\right)^6 \right] + \qquad r < r_c \\ + E = & \frac{3\sqrt{3}}{2} \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - + \left(\frac{\sigma}{r}\right)^4 \right] + \qquad r < r_c \\ + E = & 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - + \left(\frac{\sigma}{r}\right)^6 \right] + \qquad r < r_c + as required for the SDK Coarse-grained MD parameterization discussed in :ref:`(Shinoda) ` and :ref:`(DeVane) `. Rc is the cutoff. diff --git a/doc/src/pair_sdpd_taitwater_isothermal.rst b/doc/src/pair_sdpd_taitwater_isothermal.rst index 00608b6610..7a60fdef65 100644 --- a/doc/src/pair_sdpd_taitwater_isothermal.rst +++ b/doc/src/pair_sdpd_taitwater_isothermal.rst @@ -1,13 +1,12 @@ -.. index:: pair\_style sdpd/taitwater/isothermal +.. index:: pair_style sdpd/taitwater/isothermal -pair\_style sdpd/taitwater/isothermal command -============================================= +pair_style sdpd/taitwater/isothermal command +============================================ Syntax """""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sdpd/taitwater/isothermal temperature viscosity seed @@ -18,11 +17,10 @@ Syntax Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sdpd/taitwater/isothermal 300. 1. 28681 - pair_coeff \* \* 1000.0 1430.0 2.4 + pair_coeff * * 1000.0 1430.0 2.4 Description """"""""""" @@ -47,11 +45,13 @@ imagine for a mesoscopic particle. The pressure forces between particles will be computed according to Tait's equation of state: -.. image:: Eqs/pair_sph_tait.jpg - :align: center +.. math:: -where gamma = 7 and B = c\_0\^2 rho\_0 / gamma, with rho\_0 being the -reference density and c\_0 the reference speed of sound. + p = B \left[(\frac{\rho}{\rho_0})^{\gamma} - 1\right] + +where :math:`\gamma = 7` and :math:`B = c_0^2 \rho_0 / \gamma`, with +:math:`\rho_0` being the reference density and :math:`c_0` the reference +speed of sound. The laminar viscosity and the random forces will be computed according to formulas described in :ref:`(Espanol and Revenga) `. @@ -75,11 +75,10 @@ The following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples above. -* rho0 reference density (mass/volume units) -* c0 reference soundspeed (distance/time units) +* :math:`\rho_0` reference density (mass/volume units) +* :math:`c_0` reference soundspeed (distance/time units) * h kernel function cutoff (distance units) - ---------- @@ -107,7 +106,8 @@ if LAMMPS was built with that package. See the :doc:`Build package `, :doc:`pair sph/rhosum ` +:doc:`pair coeff `, :doc:`pair sph/rhosum `, +:doc:`pair sph/taitwater ` Default """"""" diff --git a/doc/src/pair_smd_hertz.rst b/doc/src/pair_smd_hertz.rst index d3070c08c5..6395c76a1b 100644 --- a/doc/src/pair_smd_hertz.rst +++ b/doc/src/pair_smd_hertz.rst @@ -1,21 +1,23 @@ -.. index:: pair\_style smd/hertz +.. index:: pair_style smd/hertz -pair\_style smd/hertz command -============================= +pair_style smd/hertz command +============================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style smd/hertz scale_factor Examples """""""" -pair\_style smd/hertz 1.0 -pair\_coeff 1 1 +.. code-block:: LAMMPS + + pair_style smd/hertz 1.0 + pair_coeff 1 1 Description """"""""""" diff --git a/doc/src/pair_smd_tlsph.rst b/doc/src/pair_smd_tlsph.rst index 56570ddd5f..4b5d7cf1cc 100644 --- a/doc/src/pair_smd_tlsph.rst +++ b/doc/src/pair_smd_tlsph.rst @@ -1,20 +1,21 @@ -.. index:: pair\_style smd/tlsph +.. index:: pair_style smd/tlsph -pair\_style smd/tlsph command -============================= +pair_style smd/tlsph command +============================ Syntax """""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style smd/tlsph args Examples """""""" -pair\_style smd/tlsph +.. code-block:: LAMMPS + + pair_style smd/tlsph Description """"""""""" @@ -26,11 +27,11 @@ Smooth-Particle Hydrodynamics algorithm. This pair style is invoked with the following command: -.. parsed-literal:: +.. code-block:: LAMMPS pair_style smd/tlsph - pair_coeff i j \*COMMON rho0 E nu Q1 Q2 hg Cp & - \*END + pair_coeff i j *COMMON rho0 E nu Q1 Q2 hg Cp & + *END Here, *i* and *j* denote the *LAMMPS* particle types for which this pair style is defined. Note that *i* and *j* must be equal, i.e., no diff --git a/doc/src/pair_smd_triangulated_surface.rst b/doc/src/pair_smd_triangulated_surface.rst index 78edd2683b..14495d6b06 100644 --- a/doc/src/pair_smd_triangulated_surface.rst +++ b/doc/src/pair_smd_triangulated_surface.rst @@ -1,21 +1,22 @@ -.. index:: pair\_style smd/tri\_surface +.. index:: pair_style smd/tri_surface -pair\_style smd/tri\_surface command -==================================== +pair_style smd/tri\_surface command +=================================== Syntax """""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style smd/tri_surface scale_factor Examples """""""" -pair\_style smd/tri\_surface 1.0 -pair\_coeff 1 1 +.. code-block:: LAMMPS + + pair_style smd/tri_surface 1.0 + pair_coeff 1 1 Description """"""""""" diff --git a/doc/src/pair_smd_ulsph.rst b/doc/src/pair_smd_ulsph.rst index 8586a072db..32a49b14ea 100644 --- a/doc/src/pair_smd_ulsph.rst +++ b/doc/src/pair_smd_ulsph.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style smd/ulsph +.. index:: pair_style smd/ulsph -pair\_style smd/ulsph command +pair_style smd/ulsph command ============================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style smd/ulsph args @@ -22,9 +22,9 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS - pair_style smd/ulsph \*DENSITY_CONTINUITY \*VELOCITY_GRADIENT \*NO_GRADIENT_CORRECTION + pair_style smd/ulsph *DENSITY_CONTINUITY *VELOCITY_GRADIENT *NO_GRADIENT_CORRECTION Description """"""""""" @@ -36,11 +36,11 @@ Smooth-Particle Hydrodynamics algorithm. This pair style is invoked similar to the following command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_style smd/ulsph \*DENSITY_CONTINUITY \*VELOCITY_GRADIENT \*NO_GRADIENT_CORRECTION - pair_coeff i j \*COMMON rho0 c0 Q1 Cp hg & - \*END + pair_style smd/ulsph *DENSITY_CONTINUITY *VELOCITY_GRADIENT *NO_GRADIENT_CORRECTION + pair_coeff i j *COMMON rho0 c0 Q1 Cp hg & + *END Here, *i* and *j* denote the *LAMMPS* particle types for which this pair style is defined. Note that *i* and *j* can be different, i.e., diff --git a/doc/src/pair_smtbq.rst b/doc/src/pair_smtbq.rst index 6296517f66..843e8ce2ca 100644 --- a/doc/src/pair_smtbq.rst +++ b/doc/src/pair_smtbq.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style smtbq +.. index:: pair_style smtbq -pair\_style smtbq command -========================= +pair_style smtbq command +======================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style smtbq @@ -15,10 +15,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style smtbq - pair_coeff \* \* ffield.smtbq.Al2O3 O Al + pair_coeff * * ffield.smtbq.Al2O3 O Al Description """"""""""" @@ -28,21 +28,27 @@ tight-Binding QEq) potential as described in :ref:`SMTB-Q\_1 ` and :ref:`SMTB-Q\_2 `. Briefly, the energy of metallic-oxygen systems is given by three contributions: -.. image:: Eqs/pair_smtbq1.jpg - :align: center +.. math:: -where *Etot* is the total potential energy of the system, -*EES* is the electrostatic part of the total energy, -*EOO* is the interaction between oxygen atoms and -*EMO* is a short-range interaction between metal and oxygen -atoms. This interactions depend on interatomic distance -*rij* and/or the charge *Qi* of atoms -*i*\ . Cut-off function enables smooth convergence to zero interaction. + E_{tot} & = E_{ES} + E_{OO} + E_{MO} \\ + E_{ES} & = \sum_i{\biggl[ \chi_{i}^{0}Q_i + \frac{1}{2}J_{i}^{0}Q_{i}^{2} + + \frac{1}{2} \sum_{j\neq i}{ J_{ij}(r_{ij})f_{cut}^{R_{coul}}(r_{ij})Q_i Q_j } \biggr] } \\ + E_{OO} & = \sum_{i,j}^{i,j = O}{\biggl[Cexp( -\frac{r_{ij}}{\rho} ) - Df_{cut}^{r_1^{OO}r_2^{OO}}(r_{ij}) exp(Br_{ij})\biggr]} \\ + E_{MO} & = \sum_i{E_{cov}^{i} + \sum_{j\neq i}{ Af_{cut}^{r_{c1}r_{c2}}(r_{ij})exp\bigl[-p(\frac{r_{ij}}{r_0} -1) \bigr] } } + + +where :math:`E_{tot}` is the total potential energy of the system, +:math:`E_{ES}` is the electrostatic part of the total energy, +:math:`E_{OO}` is the interaction between oxygen atoms and +:math:`E_{MO}` is a short-range interaction between metal and oxygen +atoms. This interactions depend on interatomic distance :math:`r_{ij}` +and/or the charge :math:`Q_{i}` of atoms *i*\ . Cut-off function enables +smooth convergence to zero interaction. The parameters appearing in the upper expressions are set in the ffield.SMTBQ.Syst file where Syst corresponds to the selected system -(e.g. field.SMTBQ.Al2O3). Examples for TiO2, -Al2O3 are provided. A single pair\_coeff command +(e.g. field.SMTBQ.Al2O3). Examples for TiO2, +Al2O3 are provided. A single pair\_coeff command is used with the SMTBQ styles which provides the path to the potential file with parameters for needed elements. These are mapped to LAMMPS atom types by specifying additional arguments after the potential @@ -52,25 +58,25 @@ atom type 1 has to be oxygen and atom type 2 Ti. The following pair\_coeff command should then be used: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* PathToLammps/potentials/ffield.smtbq.TiO2 O Ti + pair_coeff * * PathToLammps/potentials/ffield.smtbq.TiO2 O Ti The electrostatic part of the energy consists of two components self-energy of atom *i* in the form of a second order charge dependent polynomial and a long-range Coulombic electrostatic interaction. The latter uses the wolf summation method described in :ref:`Wolf `, -spherically truncated at a longer cutoff, *Rcoul*\ . The +spherically truncated at a longer cutoff, :math:`R_{coul}`. The charge of each ion is modeled by an orbital Slater which depends on the principal quantum number (\ *n*\ ) of the outer orbital shared by the ion. -Interaction between oxygen, *EOO*\ , consists of two parts, +Interaction between oxygen, :math:`E_{OO}`, consists of two parts, an attractive and a repulsive part. The attractive part is effective -only at short range (< r2OO). The attractive +only at short range (< :math:`r_2^{OO}`). The attractive contribution was optimized to study surfaces reconstruction -(e.g. :ref:`SMTB-Q\_2 ` in TiO2) and is not necessary +(e.g. :ref:`SMTB-Q\_2 ` in TiO2) and is not necessary for oxide bulk modeling. The repulsive part is the Pauli interaction between the electron clouds of oxygen. The Pauli repulsion and the coulombic electrostatic interaction have same cut off value. In the @@ -78,43 +84,50 @@ ffield.SMTBQ.Syst, the keyword *'buck'* allows to consider only the repulsive O-O interactions. The keyword *'buckPlusAttr'* allows to consider the repulsive and the attractive O-O interactions. -The short-range interaction between metal-oxygen, *EMO* is +The short-range interaction between metal-oxygen, :math:`E_{MO}` is based on the second moment approximation of the density of states with a N-body potential for the band energy term, -*Eicov*\ , and a Born-Mayer type repulsive terms +:math:`E^i_{cov}`, and a Born-Mayer type repulsive terms as indicated by the keyword *'second\_moment'* in the ffield.SMTBQ.Syst. The energy band term is given by: -.. image:: Eqs/pair_smtbq2.jpg - :align: center +.. math:: -where *ηi* is the stoichiometry of atom *i*\ , -*δQi* is the charge delocalization of atom *i*\ , + E_{cov}^{i(i=M,O)} & = - \biggl\{\eta_i(\mu \xi^{0})^2 f_{cut}^{r_{c1}r_{c2}}(r_{ij}) + \biggl( \sum_{j(j=O,M)}{ exp[ -2q(\frac{r_{ij}}{r_0} - 1)] } \biggr) + \delta Q_i \bigl( 2\frac{n_0}{\eta_i} - \delta Q_i \bigr) \biggr\}^{1/2} \\ + \delta Q_i & = | Q_i^{F} | - | Q_i | + + +where :math:\eta_i` is the stoichiometry of atom *i*\ , +:math:`\delta Q_i` is the charge delocalization of atom *i*\ , compared to its formal charge -*QFi*\ . n0, the number of hybridized +:math:`Q^F_i`. :math:`n_0`, the number of hybridized orbitals, is calculated with to the atomic orbitals shared -*di* and the stoichiometry -*ηi*\ . *rc1* and *rc2* are the two +:math:`d_i` and the stoichiometry +:math:`\eta_i`. :math:`r_{c1}` and :math:`r_{c2}` are the two cutoff radius around the fourth neighbors in the cutoff function. -In the formalism used here, *ξ0* is the energy -parameter. *ξ0* is in tight-binding approximation the +In the formalism used here, :math:`\xi^0` is the energy +parameter. :math:`\xi^0` is in tight-binding approximation the hopping integral between the hybridized orbitals of the cation and the anion. In the literature we find many ways to write the hopping integral depending on whether one takes the point of view of the anion or cation. These are equivalent vision. The correspondence between the two visions is explained in appendix A of the article in the -SrTiO3 :ref:`SMTB-Q\_3 ` (parameter *β* shown in -this article is in fact the *βO*\ ). To summarize the -relationship between the hopping integral *ξ0* and the -others, we have in an oxide CnOm the following +SrTiO3 :ref:`SMTB-Q\_3 ` (parameter :math:`\beta` shown in +this article is in fact the :math:`\beta_O`). To summarize the +relationship between the hopping integral :math:`\xi^O` and the +others, we have in an oxide CnOm the following relationship: -.. image:: Eqs/pair_smtbq3.jpg - :align: center +.. math:: -Thus parameter μ, indicated above, is given by : μ = (√n -+ √m) ⁄ 2 + \xi^0 & = \frac{\xi_O}{m} = \frac{\xi_C}{n} \\ + \frac{\beta_O}{\sqrt{m}} & = \frac{\beta_C}{\sqrt{n}} = \xi^0 \frac{\sqrt{m}+\sqrt{n}}{2} + + +Thus parameter :math:`\mu`, indicated above, is given by :math:`\mu = (\sqrt{n} + \sqrt{m}) / 2` The potential offers the possibility to consider the polarizability of the electron clouds of oxygen by changing the slater radius of the @@ -123,7 +136,7 @@ rS* in the ffield.SMTBQ.Syst. This change in radius is performed according to the method developed by E. Maras :ref:`SMTB-Q\_2 `. This method needs to determine the number of nearest neighbors around the oxygen. This calculation is based on -first (\ *r1n*\ ) and second (\ *r2n*\ ) distances +first (:math:`r_{1n}`) and second (:math:`r_{2n}`) distances neighbors. The SMTB-Q potential is a variable charge potential. The equilibrium @@ -132,8 +145,8 @@ equalization (QEq) method. See :ref:`Rick ` for further detail. One can adjust the frequency, the maximum number of iterative loop and the convergence of the equilibrium charge calculation. To obtain the energy conservation in NVE thermodynamic ensemble, we recommend to use -a convergence parameter in the interval 10-5 - -10-6 eV. +a convergence parameter in the interval 10e-5 - +10e-6 eV. The ffield.SMTBQ.Syst files are provided for few systems. They consist of nine parts and the lines beginning with '#' are comments (note that @@ -144,8 +157,8 @@ quotation marks (''). 1) Number of different element in the oxide: -* Nelem= 2 or 3 -* Divided line +* N_elem= 2 or 3 +* Dividing line 2) Atomic parameters @@ -153,10 +166,10 @@ For the anion (oxygen) * Name of element (char) and stoichiometry in oxide * Formal charge and mass of element -* Principal quantum number of outer orbital (\ *n*\ ), electronegativity (\ *χ0i*\ ) and hardness (\ *J0i*\ ) -* Ionic radius parameters : max coordination number (\ *coordBB* = 6 by default), bulk coordination number *(coordB)*\ , surface coordination number *(coordS)* and *rBB, rB and rS* the slater radius for each coordination number. (note : If you don't want to change the slater radius, use three identical radius values) -* Number of orbital shared by the element in the oxide (\ *di*\ ) -* Divided line +* Principal quantum number of outer orbital n), electronegativity (:math:`\xi^0_i`) and hardness (:math:`J^0_i`) +* Ionic radius parameters : max coordination number (\ *coordBB* = 6 by default), bulk coordination number *(coordB)*\ , surface coordination number *(coordS)* and *rBB, rB and rS* the slater radius for each coordination number. (**note : If you don't want to change the slater radius, use three identical radius values**) +* Number of orbital shared by the element in the oxide (:math:`d_i`) +* Dividing line For each cations (metal): @@ -164,41 +177,41 @@ For each cations (metal): * Formal charge and mass of element * Number of electron in outer orbital *(ne)*\ , electronegativity (\ *χ0i*\ ), hardness (\ *J0i*\ ) and *rSalter* the slater radius for the cation. * Number of orbitals shared by the elements in the oxide (\ *di*\ ) -* Divided line +* Dividing line 3) Potential parameters: * Keyword for element1, element2 and interaction potential ('second\_moment' or 'buck' or 'buckPlusAttr') between element 1 and 2. If the potential is 'second\_moment', specify 'oxide' or 'metal' for metal-oxygen or metal-metal interactions respectively. * Potential parameter:

If type of potential is 'second\_moment' : *A (eV)*\ , *p*\ , *ξ0* (eV) and *q*
*rc1* (Å), *rc2* (Å) and *r0* (Å)
If type of potential is 'buck' : *C* (eV) and *ρ* (Å)
If type of potential is 'buckPlusAttr' : *C* (eV) and *ρ* (Å)
*D* (eV), *B* (Å-1), *r1OO* (Å) and *r2OO* (Å)
-* Divided line +* Dividing line 4) Tables parameters: * Cutoff radius for the Coulomb interaction (\ *Rcoul*\ ) * Starting radius (\ *rmin* = 1,18845 Å) and increments (\ *dr* = 0,001 Å) for creating the potential table. -* Divided line +* Dividing line 5) Rick model parameter: * *Nevery* : parameter to set the frequency (\ *1/Nevery*\ ) of the charge resolution. The charges are evaluated each *Nevery* time steps. * Max number of iterative loop (\ *loopmax*\ ) and precision criterion (\ *prec*\ ) in eV of the charge resolution -* Divided line +* Dividing line 6) Coordination parameter: * First (\ *r1n*\ ) and second (\ *r2n*\ ) neighbor distances in Å -* Divided line +* Dividing line 7) Charge initialization mode: * Keyword (\ *QInitMode*\ ) and initial oxygen charge (\ *Qinit*\ ). If keyword = 'true', all oxygen charges are initially set equal to *Qinit*\ . The charges on the cations are initially set in order to respect the neutrality of the box. If keyword = 'false', all atom charges are initially set equal to 0 if you use "create\_atom"#create\_atom command or the charge specified in the file structure using :doc:`read_data ` command. -* Divided line +* Dividing line 8) Mode for the electronegativity equalization (Qeq) * Keyword mode:
 
QEqAll (one QEq group) \| no parameters
QEqAllParallel (several QEq groups) \| no parameters
Surface \| zlim (QEq only for z>zlim)
* Parameter if necessary -* Divided line +* Dividing line 9) Verbose diff --git a/doc/src/pair_snap.rst b/doc/src/pair_snap.rst index 84c33bdd50..4f3734aab7 100644 --- a/doc/src/pair_snap.rst +++ b/doc/src/pair_snap.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style snap +.. index:: pair_style snap -pair\_style snap command -======================== +pair_style snap command +======================= -pair\_style snap/kk command -=========================== +pair_style snap/kk command +========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style snap @@ -18,10 +18,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style snap - pair_coeff \* \* InP.snapcoeff InP.snapparam In In P P + pair_coeff * * InP.snapcoeff InP.snapparam In In P P Description """"""""""" @@ -38,12 +38,14 @@ In SNAP, the total energy is decomposed into a sum over atom energies. The energy of atom *i* is expressed as a weighted sum over bispectrum components. -.. image:: Eqs/pair_snap.jpg - :align: center +.. math:: -where *B\_k\^i* is the *k*\ -th bispectrum component of atom *i*\ , -and *beta\_k\^alpha\_i* is the corresponding linear coefficient -that depends on *alpha\_i*, the SNAP element of atom *i*\ . The + E^i_{SNAP}(B_1^i,...,B_K^i) = \beta^{\alpha_i}_0 + \sum_{k=1}^K \beta_k^{\alpha_i} B_k^i + + +where :math:`B_k^i` is the *k*\ -th bispectrum component of atom *i*\ , +and :math:`\beta_k^{\alpha_i}` is the corresponding linear coefficient +that depends on :math:\alpha_i`, the SNAP element of atom *i*\ . The number of bispectrum components used and their definitions depend on the value of *twojmax* defined in the SNAP parameter file described below. @@ -69,9 +71,9 @@ types, with the first two being indium and the 3rd and 4th being phophorous, the pair\_coeff command would look like this: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* snap InP.snapcoeff InP.snapparam In In P P + pair_coeff * * snap InP.snapcoeff InP.snapparam In In P P The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. The two filenames are for the coefficient and parameter files, respectively. @@ -104,16 +106,16 @@ combines the *snap* and *zbl* pair styles. It is invoked by the following commands: -.. parsed-literal:: +.. code-block:: LAMMPS - variable zblcutinner equal 4 - variable zblcutouter equal 4.8 - variable zblz equal 73 - pair_style hybrid/overlay & - zbl ${zblcutinner} ${zblcutouter} snap - pair_coeff \* \* zbl 0.0 - pair_coeff 1 1 zbl ${zblz} - pair_coeff \* \* snap Ta06A.snapcoeff Ta06A.snapparam Ta + variable zblcutinner equal 4 + variable zblcutouter equal 4.8 + variable zblz equal 73 + pair_style hybrid/overlay & + zbl ${zblcutinner} ${zblcutouter} snap + pair_coeff \* \* zbl 0.0 + pair_coeff 1 1 zbl ${zblz} + pair_coeff \* \* snap Ta06A.snapcoeff Ta06A.snapparam Ta It is convenient to keep these commands in a separate file that can be inserted in any LAMMPS input script using the :doc:`include ` diff --git a/doc/src/pair_soft.rst b/doc/src/pair_soft.rst index a5e29ef0ab..f1fa0af802 100644 --- a/doc/src/pair_soft.rst +++ b/doc/src/pair_soft.rst @@ -1,19 +1,19 @@ -.. index:: pair\_style soft +.. index:: pair_style soft -pair\_style soft command -======================== +pair_style soft command +======================= -pair\_style soft/gpu command -============================ +pair_style soft/gpu command +=========================== -pair\_style soft/omp command -============================ +pair_style soft/omp command +=========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style soft cutoff @@ -23,24 +23,27 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style soft 1.0 - pair_coeff \* \* 10.0 + pair_coeff * * 10.0 pair_coeff 1 1 10.0 3.0 pair_style soft 1.0 - pair_coeff \* \* 0.0 + pair_coeff * * 0.0 variable prefactor equal ramp(0,30) - fix 1 all adapt 1 pair soft a \* \* v_prefactor + fix 1 all adapt 1 pair soft a * * v_prefactor Description """"""""""" Style *soft* computes pairwise interactions with the formula -.. image:: Eqs/pair_soft.jpg - :align: center +.. math:: + + E = A \left[ 1 + \cos\left(\frac{\pi r}{r_c}\right) \right] + \qquad r < r_c + It is useful for pushing apart overlapping atoms, since it does not blow up as r goes to 0. A is a pre-factor that can be made to vary in @@ -80,10 +83,10 @@ all pairwise interactions from 0.0 at the beginning to 30.0 at the end of a run: -.. parsed-literal:: +.. code-block:: LAMMPS variable prefactor equal ramp(0,30) - fix 1 all adapt 1 pair soft a \* \* v_prefactor + fix 1 all adapt 1 pair soft a * * v_prefactor Note that a formula defined by an :doc:`equal-style variable ` can use the current timestep, elapsed time in the current run, elapsed diff --git a/doc/src/pair_sph_heatconduction.rst b/doc/src/pair_sph_heatconduction.rst index 3322a1aa10..efd4b426da 100644 --- a/doc/src/pair_sph_heatconduction.rst +++ b/doc/src/pair_sph_heatconduction.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style sph/heatconduction +.. index:: pair_style sph/heatconduction -pair\_style sph/heatconduction command -====================================== +pair_style sph/heatconduction command +===================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sph/heatconduction @@ -15,10 +15,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sph/heatconduction - pair_coeff \* \* 1.0 2.4 + pair_coeff * * 1.0 2.4 Description """"""""""" diff --git a/doc/src/pair_sph_idealgas.rst b/doc/src/pair_sph_idealgas.rst index da38341ded..2e1a2b9d53 100644 --- a/doc/src/pair_sph_idealgas.rst +++ b/doc/src/pair_sph_idealgas.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style sph/idealgas +.. index:: pair_style sph/idealgas -pair\_style sph/idealgas command -================================ +pair_style sph/idealgas command +=============================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sph/idealgas @@ -15,10 +15,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sph/idealgas - pair_coeff \* \* 1.0 2.4 + pair_coeff * * 1.0 2.4 Description """"""""""" @@ -26,13 +26,15 @@ Description The sph/idealgas style computes pressure forces between particles according to the ideal gas equation of state: -.. image:: Eqs/pair_sph_ideal.jpg - :align: center +.. math:: -where gamma = 1.4 is the heat capacity ratio, rho is the local -density, and e is the internal energy per unit mass. This pair style -also computes Monaghan's artificial viscosity to prevent particles -from interpenetrating :ref:`(Monaghan) `. + p = (\gamma - 1) \rho e + + +where :math:`\gamma = 1.4` is the heat capacity ratio, :math:`\rho` is +the local density, and e is the internal energy per unit mass. This +pair style also computes Monaghan's artificial viscosity to prevent +particles from interpenetrating :ref:`(Monaghan) `. See `this PDF guide `_ to using SPH in LAMMPS. @@ -41,7 +43,7 @@ The following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples above. -* nu artificial viscosity (no units) +* :math:`\nu` artificial viscosity (no units) * h kernel function cutoff (distance units) diff --git a/doc/src/pair_sph_lj.rst b/doc/src/pair_sph_lj.rst index d69fd1ba0a..45b611e441 100644 --- a/doc/src/pair_sph_lj.rst +++ b/doc/src/pair_sph_lj.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style sph/lj +.. index:: pair_style sph/lj -pair\_style sph/lj command -========================== +pair_style sph/lj command +========================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sph/lj @@ -15,10 +15,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sph/lj - pair_coeff \* \* 1.0 2.4 + pair_coeff * * 1.0 2.4 Description """"""""""" @@ -37,7 +37,7 @@ The following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples above. -* nu artificial viscosity (no units) +* :math:`\nu` artificial viscosity (no units) * h kernel function cutoff (distance units) diff --git a/doc/src/pair_sph_rhosum.rst b/doc/src/pair_sph_rhosum.rst index dad7b1852a..68f55021e3 100644 --- a/doc/src/pair_sph_rhosum.rst +++ b/doc/src/pair_sph_rhosum.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style sph/rhosum +.. index:: pair_style sph/rhosum -pair\_style sph/rhosum command -============================== +pair_style sph/rhosum command +============================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sph/rhosum Nstep @@ -17,10 +17,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sph/rhosum 10 - pair_coeff \* \* 2.4 + pair_coeff * * 2.4 Description """"""""""" diff --git a/doc/src/pair_sph_taitwater.rst b/doc/src/pair_sph_taitwater.rst index 35bc64e578..ae200ee024 100644 --- a/doc/src/pair_sph_taitwater.rst +++ b/doc/src/pair_sph_taitwater.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style sph/taitwater +.. index:: pair_style sph/taitwater -pair\_style sph/taitwater command -================================= +pair_style sph/taitwater command +================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sph/taitwater @@ -15,10 +15,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sph/taitwater - pair_coeff \* \* 1000.0 1430.0 1.0 2.4 + pair_coeff * * 1000.0 1430.0 1.0 2.4 Description """"""""""" @@ -26,11 +26,14 @@ Description The sph/taitwater style computes pressure forces between SPH particles according to Tait's equation of state: -.. image:: Eqs/pair_sph_tait.jpg - :align: center +.. math:: -where gamma = 7 and B = c\_0\^2 rho\_0 / gamma, with rho\_0 being the -reference density and c\_0 the reference speed of sound. + p = B \biggl[\left(\frac{\rho}{\rho_0}\right)^{\gamma} - 1\biggr] + + +where :math:`\gamma = 7` and :math:`B = c_0^2 \rho_0 / \gamma`, with +:math:`\rho_0` being the reference density and :math:`c_0` the reference +speed of sound. This pair style also computes Monaghan's artificial viscosity to prevent particles from interpenetrating :ref:`(Monaghan) `. @@ -42,9 +45,9 @@ The following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples above. -* rho0 reference density (mass/volume units) -* c0 reference soundspeed (distance/time units) -* nu artificial viscosity (no units) +* :math:`\rho_0` reference density (mass/volume units) +* :math:`c_0` reference soundspeed (distance/time units) +* :math:`\nu` artificial viscosity (no units) * h kernel function cutoff (distance units) diff --git a/doc/src/pair_sph_taitwater_morris.rst b/doc/src/pair_sph_taitwater_morris.rst index 8a89702341..c4dcb87758 100644 --- a/doc/src/pair_sph_taitwater_morris.rst +++ b/doc/src/pair_sph_taitwater_morris.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style sph/taitwater/morris +.. index:: pair_style sph/taitwater/morris -pair\_style sph/taitwater/morris command -======================================== +pair_style sph/taitwater/morris command +======================================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sph/taitwater/morris @@ -15,10 +15,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sph/taitwater/morris - pair_coeff \* \* 1000.0 1430.0 1.0 2.4 + pair_coeff * * 1000.0 1430.0 1.0 2.4 Description """"""""""" @@ -26,11 +26,14 @@ Description The sph/taitwater/morris style computes pressure forces between SPH particles according to Tait's equation of state: -.. image:: Eqs/pair_sph_tait.jpg - :align: center +.. math:: -where gamma = 7 and B = c\_0\^2 rho\_0 / gamma, with rho\_0 being the -reference density and c\_0 the reference speed of sound. + p = B \biggl[\left(\frac{\rho}{\rho_0}\right)^{\gamma} - 1\biggr] + + +where :math:`\gamma = 7` and :math:`B = c_0^2 \rho_0 / \gamma`, with +:math:`\rho_0` being the reference density and :math:`c_0` the reference +speed of sound. This pair style also computes laminar viscosity :ref:`(Morris) `. @@ -41,9 +44,9 @@ The following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples above. -* rho0 reference density (mass/volume units) -* c0 reference soundspeed (distance/time units) -* nu dynamic viscosity (mass\*distance/time units) +* :math:`\rho_0` reference density (mass/volume units) +* :math:`c_0` reference soundspeed (distance/time units) +* :math:`\nu` dynamic viscosity (mass\*distance/time units) * h kernel function cutoff (distance units) diff --git a/doc/src/pair_spin_dipole.rst b/doc/src/pair_spin_dipole.rst index 5c7c5306c8..d1d35f9b8d 100644 --- a/doc/src/pair_spin_dipole.rst +++ b/doc/src/pair_spin_dipole.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style spin/dipole/cut +.. index:: pair_style spin/dipole/cut -pair\_style spin/dipole/cut command +pair_style spin/dipole/cut command +================================== + +pair_style spin/dipole/long command =================================== -pair\_style spin/dipole/long command -==================================== - Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style spin/dipole/cut cutoff pair_style spin/dipole/long cutoff @@ -22,15 +22,14 @@ Syntax Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style spin/dipole/cut 10.0 - pair_coeff \* \* 10.0 + pair_coeff * * 10.0 pair_coeff 2 3 8.0 pair_style spin/dipole/long 9.0 - pair_coeff \* \* 10.0 + pair_coeff * * 10.0 pair_coeff 2 3 6.0 Description @@ -43,12 +42,38 @@ The magnetic dipole-dipole interactions are computed by the following formulas for the magnetic energy, magnetic precession vector omega and mechanical force between particles I and J. -.. image:: Eqs/pair_spin_dipole.jpg - :align: center +.. math:: -where si and sj are the spin on two magnetic particles, -r is their separation distance, and the vector e = (Ri - Rj)/\|Ri - Rj\| -is the direction vector between the two particles. + \mathcal{H}_{\rm long} & = + -\frac{\mu_{0} \left( \mu_B\right)^2}{4\pi} + \sum_{i,j,i\neq j}^{N} + \frac{g_i g_j}{r_{ij}^3} + \biggl(3 + \left(\vec{e}_{ij}\cdot \vec{s}_{i}\right) + \left(\vec{e}_{ij}\cdot \vec{s}_{j}\right) + -\vec{s}_i\cdot\vec{s}_j \biggr) \\ + \mathbf{\omega}_i & = + \frac{\mu_0 (\mu_B)^2}{4\pi\hbar}\sum_{j} + \frac{g_i g_j}{r_{ij}^3} + \, \biggl( + 3\,(\vec{e}_{ij}\cdot\vec{s}_{j})\vec{e}_{ij} + -\vec{s}_{j} \biggr) \\ + \mathbf{F}_i & = + \frac{3\, \mu_0 (\mu_B)^2}{4\pi} \sum_j + \frac{g_i g_j}{r_{ij}^4} + \biggl[\bigl( (\vec{s}_i\cdot\vec{s}_j) + -5(\vec{e}_{ij}\cdot\vec{s}_i) + (\vec{e}_{ij}\cdot\vec{s}_j)\bigr) \vec{e}_{ij}+ + \bigl( + (\vec{e}_{ij}\cdot\vec{s}_i)\vec{s}_j+ + (\vec{e}_{ij}\cdot\vec{s}_j)\vec{s}_i + \bigr) + \biggr] + +where :math:`\vec{s}_i` and :math:`\vec{s}_j` are the spin on two magnetic +particles, r is their separation distance, and the vector :math:`\vec{e}_{ij} += \frac{r_i - r_j}{\left| r_i - r_j \right|}` is the direction vector +between the two particles. Style *spin/dipole/long* computes long-range magnetic dipole-dipole interaction. diff --git a/doc/src/pair_spin_dmi.rst b/doc/src/pair_spin_dmi.rst index 719c546365..6ef65dfa93 100644 --- a/doc/src/pair_spin_dmi.rst +++ b/doc/src/pair_spin_dmi.rst @@ -1,13 +1,12 @@ -.. index:: pair\_style spin/dmi +.. index:: pair_style spin/dmi -pair\_style spin/dmi command -============================ +pair_style spin/dmi command +=========================== Syntax """""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style spin/dmi cutoff @@ -17,11 +16,10 @@ Syntax Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style spin/dmi 4.0 - pair_coeff \* \* dmi 2.6 0.001 1.0 0.0 0.0 + pair_coeff * * dmi 2.6 0.001 1.0 0.0 0.0 pair_coeff 1 2 dmi 4.0 0.00109 0.0 0.0 1.0 Description @@ -32,15 +30,19 @@ between pairs of magnetic spins. According to the expression reported in :ref:`(Rohart) `, one has the following DM energy: -.. image:: Eqs/pair_spin_dmi_interaction.jpg - :align: center +.. math:: -where si and sj are two neighboring magnetic spins of two particles, -eij = (ri - rj)/\|ri-rj\| is the unit vector between sites i and j, -and D is the DM vector defining the intensity (in eV) and the direction -of the interaction. + \mathbf{H}_{dm} = \sum_{{ i,j}=1,i\neq j}^{N} + \left( \vec{e}_{ij} \times \vec{D} \right) + \cdot\left(\vec{s}_{i}\times \vec{s}_{j}\right), -In :ref:`(Rohart) `, D is defined as the direction normal to the film oriented +where :math:`\vec{s}_i` and :math:`\vec{s}_j` are two neighboring magnetic spins of +two particles, :math:`\vec{e}_ij = \frac{r_i - r_j}{\left| r_i - r_j \right|}` +is the unit vector between sites *i* and *j*, and :math:`\vec{D}` is the +DM vector defining the intensity (in eV) and the direction of the +interaction. + +In :ref:`(Rohart) `, :math:`\vec{D}` is defined as the direction normal to the film oriented from the high spin-orbit layer to the magnetic ultra-thin film. The application of a spin-lattice Poisson bracket to this energy (as described @@ -48,8 +50,11 @@ in :ref:`(Tranchida) `) allows to derive a magnetic torque omega, an mechanical force F (for spin-lattice calculations only) for each magnetic particle i: -.. image:: Eqs/pair_spin_dmi_forces.jpg - :align: center +.. math:: + + \vec{\omega}_i = -\frac{1}{\hbar} \sum_{j}^{Neighb} \vec{s}_{j}\times \left(\vec{e}_{ij}\times \vec{D} \right) + ~~{\rm and}~~ + \vec{F}_i = -\sum_{j}^{Neighb} \frac{1}{r_{ij}} \vec{D} \times \left( \vec{s}_{i}\times \vec{s}_{j} \right) More details about the derivation of these torques/forces are reported in :ref:`(Tranchida) `. @@ -93,11 +98,8 @@ Related commands ---------- - .. _Rohart: - - .. _Tranchida5: **(Rohart)** Rohart and Thiaville, diff --git a/doc/src/pair_spin_exchange.rst b/doc/src/pair_spin_exchange.rst index 1393e47cdd..b2ad9a8f69 100644 --- a/doc/src/pair_spin_exchange.rst +++ b/doc/src/pair_spin_exchange.rst @@ -1,7 +1,7 @@ -.. index:: pair\_style spin/exchange +.. index:: pair_style spin/exchange -pair\_style spin/exchange command -================================= +pair_style spin/exchange command +================================ Syntax """""" diff --git a/doc/src/pair_spin_magelec.rst b/doc/src/pair_spin_magelec.rst index 63361ece2b..526806959f 100644 --- a/doc/src/pair_spin_magelec.rst +++ b/doc/src/pair_spin_magelec.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style spin/magelec +.. index:: pair_style spin/magelec -pair\_style spin/magelec command +pair_style spin/magelec command ================================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style spin/magelec cutoff @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style spin/magelec 4.5 pair_coeff \* \* magelec 4.5 0.00109 1.0 1.0 1.0 @@ -30,24 +30,29 @@ Style *spin/me* computes a magneto-electric interaction between pairs of magnetic spins. According to the derivation reported in :ref:`(Katsura) `, this interaction is defined as: -.. image:: Eqs/pair_spin_me_interaction.jpg - :align: center +.. math:: -where si and sj are neighboring magnetic spins of two particles, -eij = (ri - rj)/\|ri-rj\| is the normalized separation vector between the -two particles, and E is an electric polarization vector. -The norm and direction of E are giving the intensity and the -direction of a screened dielectric atomic polarization (in eV). + \vec{\omega}_i & = -\frac{1}{\hbar} \sum_{j}^{Neighb} \vec{s}_{j}\times\vec{D}(r_{ij}) \\ + \vec{F}_i & = -\sum_{j}^{Neighb} \frac{\partial D(r_{ij})}{\partial r_{ij}} \left(\vec{s}_{i}\times \vec{s}_{j} \right) \cdot \vec{r}_{ij} + +where :math:`\vec{s}_i` and :math:`\vec{s}_j` are neighboring magnetic +spins of two particles. From this magneto-electric interaction, each spin i will be submitted to a magnetic torque omega, and its associated atom can be submitted to a force F for spin-lattice calculations (see :doc:`fix nve/spin `), such as: -.. image:: Eqs/pair_spin_me_forces.jpg - :align: center +.. math:: + + \vec{F}^{i} & = -\sum_{j}^{Neighbor} \left( \vec{s}_{i}\times \vec{s}_{j} \right) \times \vec{E} \\ + \vec{\omega}^{i} = -\frac{1}{\hbar} \sum_{j}^{Neighbor} \vec{s}_j \times \left(\vec{E}\times r_{ij} \right) + +with h the Planck constant (in metal units) and :math:`\vec{E}` an +electric polarization vector. The norm and direction of E are giving +the intensity and the direction of a screened dielectric atomic +polarization (in eV). -with h the Planck constant (in metal units). More details about the derivation of these torques/forces are reported in :ref:`(Tranchida) `. diff --git a/doc/src/pair_srp.rst b/doc/src/pair_srp.rst index 822bd0dddb..8762f3e4a9 100644 --- a/doc/src/pair_srp.rst +++ b/doc/src/pair_srp.rst @@ -1,12 +1,14 @@ -.. index:: pair\_style srp +.. index:: pair_style srp -pair\_style srp command -======================= +pair_style srp command +====================== Syntax """""" -pair\_style srp cutoff btype dist keyword value ... +.. code-block:: LAMMPS + + pair_style srp cutoff btype dist keyword value ... * cutoff = global cutoff for SRP interactions (distance units) * btype = bond type to apply SRP interactions to (can be wildcard, see below) @@ -25,7 +27,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid dpd 1.0 1.0 12345 srp 0.8 1 mid exclude yes pair_coeff 1 1 dpd 60.0 4.5 1.0 diff --git a/doc/src/pair_style.rst b/doc/src/pair_style.rst index 5fedfcbf30..96d8eb1d04 100644 --- a/doc/src/pair_style.rst +++ b/doc/src/pair_style.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style +.. index:: pair_style -pair\_style command -=================== +pair_style command +================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -18,7 +18,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style lj/cut 2.5 pair_style eam/alloy @@ -354,6 +354,6 @@ Default """"""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style none diff --git a/doc/src/pair_sw.rst b/doc/src/pair_sw.rst index 2df9958ba1..39ece6ea97 100644 --- a/doc/src/pair_sw.rst +++ b/doc/src/pair_sw.rst @@ -1,37 +1,36 @@ -.. index:: pair\_style sw +.. index:: pair_style sw -pair\_style sw command -====================== +pair_style sw command +===================== -pair\_style sw/gpu command -========================== - -pair\_style sw/intel command -============================ - -pair\_style sw/kk command +pair_style sw/gpu command ========================= -pair\_style sw/omp command -========================== +pair_style sw/intel command +=========================== + +pair_style sw/kk command +======================== + +pair_style sw/omp command +========================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sw Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style sw - pair_coeff \* \* si.sw Si - pair_coeff \* \* GaN.sw Ga N Ga + pair_coeff * * si.sw Si + pair_coeff * * GaN.sw Ga N Ga Description """"""""""" @@ -74,10 +73,9 @@ Si and C. If your LAMMPS simulation has 4 atoms types and you want the 1st 3 to be Si, and the 4th to be C, you would use the following pair\_coeff command: +.. code-block:: LAMMPS -.. parsed-literal:: - - pair_coeff \* \* SiC.sw Si Si Si C + pair_coeff * * SiC.sw Si Si Si C The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Si arguments map LAMMPS atom types 1,2,3 to the Si diff --git a/doc/src/pair_table.rst b/doc/src/pair_table.rst index 042e989209..9bfd22f8dc 100644 --- a/doc/src/pair_table.rst +++ b/doc/src/pair_table.rst @@ -1,22 +1,22 @@ -.. index:: pair\_style table +.. index:: pair_style table -pair\_style table command -========================= +pair_style table command +======================== -pair\_style table/gpu command -============================= - -pair\_style table/kk command +pair_style table/gpu command ============================ -pair\_style table/omp command -============================= +pair_style table/kk command +=========================== + +pair_style table/omp command +============================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style table style N keyword ... @@ -29,14 +29,13 @@ Syntax Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style table linear 1000 pair_style table linear 1000 pppm pair_style table bitmap 12 - pair_coeff \* 3 morse.table ENTRY1 - pair_coeff \* 3 morse.table ENTRY1 7.0 + pair_coeff * 3 morse.table ENTRY1 + pair_coeff * 3 morse.table ENTRY1 7.0 Description """"""""""" @@ -276,7 +275,7 @@ This pair style can only be used via the *pair* keyword of the Restrictions """""""""""" - none +none Related commands """""""""""""""" diff --git a/doc/src/pair_table_rx.rst b/doc/src/pair_table_rx.rst index 38e431ff5c..c98e3372e0 100644 --- a/doc/src/pair_table_rx.rst +++ b/doc/src/pair_table_rx.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style table/rx +.. index:: pair_style table/rx -pair\_style table/rx command -============================ +pair_style table/rx command +=========================== -pair\_style table/rx/kk command -=============================== +pair_style table/rx/kk command +============================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style table style N ... @@ -21,15 +21,14 @@ Syntax Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style table/rx linear 1000 pair_style table/rx linear 1000 fractional pair_style table/rx linear 1000 molecular - pair_coeff \* \* rxn.table ENTRY1 h2o h2o 10.0 - pair_coeff \* \* rxn.table ENTRY1 1fluid 1fluid 10.0 - pair_coeff \* 3 rxn.table ENTRY1 h2o no2 10.0 + pair_coeff * * rxn.table ENTRY1 h2o h2o 10.0 + pair_coeff * * rxn.table ENTRY1 1fluid 1fluid 10.0 + pair_coeff * 3 rxn.table ENTRY1 h2o no2 10.0 Description """"""""""" diff --git a/doc/src/pair_tersoff.rst b/doc/src/pair_tersoff.rst index f2e44d0362..655a4bb47a 100644 --- a/doc/src/pair_tersoff.rst +++ b/doc/src/pair_tersoff.rst @@ -1,31 +1,30 @@ -.. index:: pair\_style tersoff +.. index:: pair_style tersoff -pair\_style tersoff command -=========================== +pair_style tersoff command +========================== -pair\_style tersoff/table command -================================= +pair_style tersoff/table command +================================ -pair\_style tersoff/gpu command -=============================== - -pair\_style tersoff/intel command -================================= - -pair\_style tersoff/kk command +pair_style tersoff/gpu command ============================== -pair\_style tersoff/omp command -=============================== +pair_style tersoff/intel command +================================ -pair\_style tersoff/table/omp command -===================================== +pair_style tersoff/kk command +============================= + +pair_style tersoff/omp command +============================== + +pair_style tersoff/table/omp command +==================================== Syntax """""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style @@ -35,14 +34,14 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style tersoff - pair_coeff \* \* Si.tersoff Si - pair_coeff \* \* SiC.tersoff Si C Si + pair_coeff * * Si.tersoff Si + pair_coeff * * SiC.tersoff Si C Si pair_style tersoff/table - pair_coeff \* \* SiCGe.tersoff Si(D) + pair_coeff * * SiCGe.tersoff Si(D) Description """"""""""" @@ -97,9 +96,9 @@ and C. If your LAMMPS simulation has 4 atoms types and you want the pair\_coeff command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* SiC.tersoff Si Si Si C + pair_coeff * * SiC.tersoff Si Si Si C The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Si arguments map LAMMPS atom types 1,2,3 to the Si diff --git a/doc/src/pair_tersoff_mod.rst b/doc/src/pair_tersoff_mod.rst index 94cc9300ed..bcbeb6f138 100644 --- a/doc/src/pair_tersoff_mod.rst +++ b/doc/src/pair_tersoff_mod.rst @@ -1,28 +1,28 @@ -.. index:: pair\_style tersoff/mod +.. index:: pair_style tersoff/mod -pair\_style tersoff/mod command -=============================== +pair_style tersoff/mod command +============================== -pair\_style tersoff/mod/c command -================================= +pair_style tersoff/mod/c command +================================ -pair\_style tersoff/mod/gpu command -=================================== - -pair\_style tersoff/mod/kk command +pair_style tersoff/mod/gpu command ================================== -pair\_style tersoff/mod/omp command -=================================== +pair_style tersoff/mod/kk command +================================= -pair\_style tersoff/mod/c/omp command -===================================== +pair_style tersoff/mod/omp command +================================== + +pair_style tersoff/mod/c/omp command +==================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style tersoff/mod @@ -31,14 +31,13 @@ Syntax Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style tersoff/mod - pair_coeff \* \* Si.tersoff.mod Si Si + pair_coeff * * Si.tersoff.mod Si Si pair_style tersoff/mod/c - pair_coeff \* \* Si.tersoff.modc Si Si + pair_coeff * * Si.tersoff.modc Si Si Description """"""""""" @@ -51,22 +50,22 @@ E of a system of atoms as .. math:: - E & = \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\ - V_{ij} & = f_C(r_{ij}) \left[ f_R(r_{ij}) + b_{ij} f_A(r_{ij}) \right] \\ - f_C(r) & = \left\{ \begin{array} {r@{\quad:\quad}l} - 1 & r < R - D \\ - \frac{1}{2} - \frac{9}{16} \sin \left( \frac{\pi}{2} \frac{r-R}{D} \right) - \frac{1}{16} \sin \left( \frac{3\pi}{2} \frac{r-R}{D} \right) & - R-D < r < R + D \\ - 0 & r > R + D - \end{array} \right. \\ - f_R(r) & = A \exp (-\lambda_1 r) \\ - f_A(r) & = -B \exp (-\lambda_2 r) \\ - b_{ij} & = \left( 1 + {\zeta_{ij}}^\eta \right)^{-\frac{1}{2n}} \\ - \zeta_{ij} & = \sum_{k \neq i,j} f_C(r_{ik}) g(\theta_{ijk}) - \exp \left[ \alpha (r_{ij} - r_{ik})^\beta \right] \\ - g(\theta) & = c_1 + g_o(\theta) g_a(\theta) \\ - g_o(\theta) & = \frac{c_2 (h - \cos \theta)^2}{c_3 + (h - \cos \theta)^2} \\ - g_a(\theta) & = 1 + c_4 \exp \left[ -c_5 (h - \cos \theta)^2 \right] \\ + E & = \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\ + V_{ij} & = f_C(r_{ij}) \left[ f_R(r_{ij}) + b_{ij} f_A(r_{ij}) \right] \\ + f_C(r) & = \left\{ \begin{array} {r@{\quad:\quad}l} + 1 & r < R - D \\ + \frac{1}{2} - \frac{9}{16} \sin \left( \frac{\pi}{2} \frac{r-R}{D} \right) - \frac{1}{16} \sin \left( \frac{3\pi}{2} \frac{r-R}{D} \right) & + R-D < r < R + D \\ + 0 & r > R + D + \end{array} \right. \\ + f_R(r) & = A \exp (-\lambda_1 r) \\ + f_A(r) & = -B \exp (-\lambda_2 r) \\ + b_{ij} & = \left( 1 + {\zeta_{ij}}^\eta \right)^{-\frac{1}{2n}} \\ + \zeta_{ij} & = \sum_{k \neq i,j} f_C(r_{ik}) g(\theta_{ijk}) + \exp \left[ \alpha (r_{ij} - r_{ik})^\beta \right] \\ + g(\theta) & = c_1 + g_o(\theta) g_a(\theta) \\ + g_o(\theta) & = \frac{c_2 (h - \cos \theta)^2}{c_3 + (h - \cos \theta)^2} \\ + g_a(\theta) & = 1 + c_4 \exp \left[ -c_5 (h - \cos \theta)^2 \right] \\ where :math:`f_R` is a two-body term and :math:`f_A` includes three-body interactions. @@ -77,7 +76,7 @@ formulation of the V\_ij term, where it contains an additional c0 term. .. math:: - V_{ij} & = f_C(r_{ij}) \left[ f_R(r_{ij}) + b_{ij} f_A(r_{ij}) + c_0 \right] + V_{ij} & = f_C(r_{ij}) \left[ f_R(r_{ij}) + b_{ij} f_A(r_{ij}) + c_0 \right] The modified cutoff function :math:`f_C` proposed by :ref:`(Murty) ` and @@ -105,9 +104,9 @@ If your LAMMPS simulation has 3 Si atoms types, you would use the following pair\_coeff command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* Si.tersoff_mod Si Si Si + pair_coeff * * Si.tersoff_mod Si Si Si The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. The three Si arguments map LAMMPS atom types 1,2,3 to the Si element diff --git a/doc/src/pair_tersoff_zbl.rst b/doc/src/pair_tersoff_zbl.rst index e60de64f28..19cbafa192 100644 --- a/doc/src/pair_tersoff_zbl.rst +++ b/doc/src/pair_tersoff_zbl.rst @@ -1,22 +1,22 @@ -.. index:: pair\_style tersoff/zbl +.. index:: pair_style tersoff/zbl -pair\_style tersoff/zbl command -=============================== +pair_style tersoff/zbl command +============================== -pair\_style tersoff/zbl/gpu command -=================================== - -pair\_style tersoff/zbl/kk command +pair_style tersoff/zbl/gpu command ================================== -pair\_style tersoff/zbl/omp command -=================================== +pair_style tersoff/zbl/kk command +================================= + +pair_style tersoff/zbl/omp command +================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style tersoff/zbl @@ -24,10 +24,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style tersoff/zbl - pair_coeff \* \* SiC.tersoff.zbl Si C Si + pair_coeff * * SiC.tersoff.zbl Si C Si Description """"""""""" @@ -106,9 +106,9 @@ want the 1st 3 to be Si, and the 4th to be C, you would use the following pair\_coeff command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* SiC.tersoff Si Si Si C + pair_coeff * * SiC.tersoff Si Si Si C The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Si arguments map LAMMPS atom types 1,2,3 to the Si diff --git a/doc/src/pair_thole.rst b/doc/src/pair_thole.rst index 538d555b0d..68dc270500 100644 --- a/doc/src/pair_thole.rst +++ b/doc/src/pair_thole.rst @@ -1,19 +1,19 @@ -.. index:: pair\_style thole +.. index:: pair_style thole -pair\_style thole command -========================= +pair_style thole command +======================== -pair\_style lj/cut/thole/long command -===================================== +pair_style lj/cut/thole/long command +==================================== -pair\_style lj/cut/thole/long/omp command -========================================= +pair_style lj/cut/thole/long/omp command +======================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -35,12 +35,12 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style hybrid/overlay ... thole 2.6 12.0 pair_coeff 1 1 thole 1.0 pair_coeff 1 2 thole 1.0 2.6 10.0 - pair_coeff \* 2 thole 1.0 2.6 + pair_coeff * 2 thole 1.0 2.6 pair_style lj/cut/thole/long 2.6 12.0 @@ -73,9 +73,9 @@ short distances by a function .. math:: - \begin{equation} T_{ij}(r_{ij}) = 1 - \left( 1 + + T_{ij}(r_{ij}) = 1 - \left( 1 + \frac{s_{ij} r_{ij} }{2} \right) - \exp \left( - s_{ij} r_{ij} \right) \end{equation} + \exp \left( - s_{ij} r_{ij} \right) This function results from an adaptation to point charges :ref:`(Noskov) ` of the dipole screening scheme originally proposed @@ -90,9 +90,9 @@ between the atom-specific values. .. math:: - \begin{equation} s_{ij} = \frac{ a_{ij} }{ + s_{ij} = \frac{ a_{ij} }{ (\alpha_{ij})^{1/3} } = \frac{ (a_i + a_j)/2 }{ - [(\alpha_i\alpha_j)^{1/2}]^{1/3} } \end{equation} + [(\alpha_i\alpha_j)^{1/2}]^{1/3} } The damping function is only applied to the interactions between the point charges representing the induced dipoles on polarizable sites, @@ -168,12 +168,12 @@ are defined using .. math:: - \begin{equation} \alpha_{ij} = \sqrt{\alpha_i\alpha_j}\end{equation} + \alpha_{ij} = \sqrt{\alpha_i\alpha_j} .. math:: - \begin{equation} a_{ij} = \frac 1 2 (a_i + a_j)\end{equation} + a_{ij} = \frac 1 2 (a_i + a_j) Restrictions """""""""""" diff --git a/doc/src/pair_tri_lj.rst b/doc/src/pair_tri_lj.rst index c5fbd90e1d..9d021f79a4 100644 --- a/doc/src/pair_tri_lj.rst +++ b/doc/src/pair_tri_lj.rst @@ -1,13 +1,12 @@ -.. index:: pair\_style tri/lj +.. index:: pair_style tri/lj -pair\_style tri/lj command -========================== +pair_style tri/lj command +========================= Syntax """""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style tri/lj cutoff @@ -16,11 +15,10 @@ cutoff = global cutoff for interactions (distance units) Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style tri/lj 3.0 - pair_coeff \* \* 1.0 1.0 + pair_coeff * * 1.0 1.0 pair_coeff 1 1 1.0 1.5 2.5 Description diff --git a/doc/src/pair_ufm.rst b/doc/src/pair_ufm.rst index c8a7e42743..bf567bb821 100644 --- a/doc/src/pair_ufm.rst +++ b/doc/src/pair_ufm.rst @@ -1,22 +1,22 @@ -.. index:: pair\_style ufm +.. index:: pair_style ufm -pair\_style ufm command -======================= +pair_style ufm command +====================== -pair\_style ufm/gpu command -=========================== +pair_style ufm/gpu command +========================== -pair\_style ufm/omp command -=========================== +pair_style ufm/omp command +========================== -pair\_style ufm/opt command -=========================== +pair_style ufm/opt command +========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style ufm cutoff @@ -25,17 +25,16 @@ Syntax Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS pair_style ufm 4.0 pair_coeff 1 1 100.0 1.0 2.5 - pair_coeff \* \* 100.0 1.0 + pair_coeff * * 100.0 1.0 pair_style ufm 4.0 - pair_coeff \* \* 10.0 1.0 + pair_coeff * * 10.0 1.0 variable prefactor equal ramp(10,100) - fix 1 all adapt 1 pair ufm epsilon \* \* v_prefactor + fix 1 all adapt 1 pair ufm epsilon * * v_prefactor Description """"""""""" @@ -45,7 +44,7 @@ Style *ufm* computes pairwise interactions using the Uhlenbeck-Ford model (UFM) .. math:: E & = -\varepsilon\, \ln{\left[1-\exp{\left(-r^{2}/\sigma^{2}\right)}\right]} \qquad r < r_c \\ - \varepsilon & = p\,k_B\,T + \varepsilon & = p\,k_B\,T where :math:`r_c` is the cutoff, :math:`\sigma` is a distance-scale and @@ -75,10 +74,10 @@ all pairwise interactions from 10.0 at the beginning to 100.0 at the end of a run: -.. parsed-literal:: +.. code-block:: LAMMPS variable prefactor equal ramp(10,100) - fix 1 all adapt 1 pair ufm epsilon \* \* v_prefactor + fix 1 all adapt 1 pair ufm epsilon * * v_prefactor .. note:: @@ -144,7 +143,7 @@ This pair style can only be used via the *pair* keyword of the Restrictions """""""""""" - none +none Related commands """""""""""""""" diff --git a/doc/src/pair_vashishta.rst b/doc/src/pair_vashishta.rst index 2dde0482be..f3e9ce1db0 100644 --- a/doc/src/pair_vashishta.rst +++ b/doc/src/pair_vashishta.rst @@ -1,28 +1,28 @@ -.. index:: pair\_style vashishta +.. index:: pair_style vashishta -pair\_style vashishta command -============================= +pair_style vashishta command +============================ -pair\_style vashishta/gpu command -================================= - -pair\_style vashishta/omp command -================================= - -pair\_style vashishta/kk command +pair_style vashishta/gpu command ================================ -pair\_style vashishta/table command -=================================== +pair_style vashishta/omp command +================================ -pair\_style vashishta/table/omp command -======================================= +pair_style vashishta/kk command +=============================== + +pair_style vashishta/table command +================================== + +pair_style vashishta/table/omp command +====================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style args @@ -41,13 +41,13 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style vashishta - pair_coeff \* \* SiC.vashishta Si C + pair_coeff * * SiC.vashishta Si C pair_style vashishta/table 100000 0.2 - pair_coeff \* \* SiC.vashishta Si C + pair_coeff * * SiC.vashishta Si C Description """"""""""" @@ -65,10 +65,10 @@ The potential for the energy U of a system of atoms is .. math:: - U & = \sum_i^N \sum_{j > i}^N U_{ij}^{(2)} (r_{ij}) + \sum_i^N \sum_{j \neq i}^N \sum_{k > j, k \neq i}^N U_{ijk}^{(3)} (r_{ij}, r_{ik}, \theta_{ijk}) \\ - U_{ij}^{(2)} (r) & = \frac{H_{ij}}{r^{\eta_{ij}}} + \frac{Z_i Z_j}{r}\exp(-r/\lambda_{1,ij}) - \frac{D_{ij}}{r^4}\exp(-r/\lambda_{4,ij}) - \frac{W_{ij}}{r^6}, r < r_{c,{ij}} \\ - U_{ijk}^{(3)}(r_{ij},r_{ik},\theta_{ijk}) & = B_{ijk} \frac{\left[ \cos \theta_{ijk} - \cos \theta_{0ijk} \right]^2} {1+C_{ijk}\left[ \cos \theta_{ijk} - \cos \theta_{0ijk} \right]^2} \times \\ - & \exp \left( \frac{\gamma_{ij}}{r_{ij} - r_{0,ij}} \right) \exp \left( \frac{\gamma_{ik}}{r_{ik} - r_{0,ik}} \right), r_{ij} < r_{0,ij}, r_{ik} < r_{0,ik} + U & = \sum_i^N \sum_{j > i}^N U_{ij}^{(2)} (r_{ij}) + \sum_i^N \sum_{j \neq i}^N \sum_{k > j, k \neq i}^N U_{ijk}^{(3)} (r_{ij}, r_{ik}, \theta_{ijk}) \\ + U_{ij}^{(2)} (r) & = \frac{H_{ij}}{r^{\eta_{ij}}} + \frac{Z_i Z_j}{r}\exp(-r/\lambda_{1,ij}) - \frac{D_{ij}}{r^4}\exp(-r/\lambda_{4,ij}) - \frac{W_{ij}}{r^6}, r < r_{c,{ij}} \\ + U_{ijk}^{(3)}(r_{ij},r_{ik},\theta_{ijk}) & = B_{ijk} \frac{\left[ \cos \theta_{ijk} - \cos \theta_{0ijk} \right]^2} {1+C_{ijk}\left[ \cos \theta_{ijk} - \cos \theta_{0ijk} \right]^2} \times \\ + & \exp \left( \frac{\gamma_{ij}}{r_{ij} - r_{0,ij}} \right) \exp \left( \frac{\gamma_{ik}}{r_{ik} - r_{0,ik}} \right), r_{ij} < r_{0,ij}, r_{ik} < r_{0,ik} where we follow the notation used in :ref:`Branicio2009 `. @@ -109,9 +109,9 @@ the 1st 3 to be Si, and the 4th to be C, you would use the following pair\_coeff command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* SiC.vashishta Si Si Si C + pair_coeff * * SiC.vashishta Si Si Si C The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Si arguments map LAMMPS atom types 1,2,3 to the Si diff --git a/doc/src/pair_write.rst b/doc/src/pair_write.rst index 7a67bcc5bd..69639e3f99 100644 --- a/doc/src/pair_write.rst +++ b/doc/src/pair_write.rst @@ -1,13 +1,13 @@ -.. index:: pair\_write +.. index:: pair_write -pair\_write command -=================== +pair_write command +================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_write itype jtype N style inner outer file keyword Qi Qj @@ -23,7 +23,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_write 1 3 500 r 1.0 10.0 table.txt LJ pair_write 1 1 1000 rsq 2.0 8.0 table.txt Yukawa_1_1 -0.5 0.5 diff --git a/doc/src/pair_yukawa.rst b/doc/src/pair_yukawa.rst index b7cb6818d2..15b9f0fc0b 100644 --- a/doc/src/pair_yukawa.rst +++ b/doc/src/pair_yukawa.rst @@ -1,22 +1,22 @@ -.. index:: pair\_style yukawa +.. index:: pair_style yukawa -pair\_style yukawa command -========================== +pair_style yukawa command +========================= -pair\_style yukawa/gpu command -============================== - -pair\_style yukawa/omp command -============================== - -pair\_style yukawa/kk command +pair_style yukawa/gpu command ============================= +pair_style yukawa/omp command +============================= + +pair_style yukawa/kk command +============================ + Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style yukawa kappa cutoff @@ -27,11 +27,11 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style yukawa 2.0 2.5 pair_coeff 1 1 100.0 2.3 - pair_coeff \* \* 100.0 + pair_coeff * * 100.0 Description """"""""""" diff --git a/doc/src/pair_yukawa_colloid.rst b/doc/src/pair_yukawa_colloid.rst index 2c337bdb94..c8659cb157 100644 --- a/doc/src/pair_yukawa_colloid.rst +++ b/doc/src/pair_yukawa_colloid.rst @@ -1,19 +1,19 @@ -.. index:: pair\_style yukawa/colloid +.. index:: pair_style yukawa/colloid -pair\_style yukawa/colloid command -================================== +pair_style yukawa/colloid command +================================= -pair\_style yukawa/colloid/gpu command -====================================== +pair_style yukawa/colloid/gpu command +===================================== -pair\_style yukawa/colloid/omp command -====================================== +pair_style yukawa/colloid/omp command +===================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style yukawa/colloid kappa cutoff @@ -24,11 +24,11 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style yukawa/colloid 2.0 2.5 pair_coeff 1 1 100.0 2.3 - pair_coeff \* \* 100.0 + pair_coeff * * 100.0 Description """"""""""" diff --git a/doc/src/pair_zbl.rst b/doc/src/pair_zbl.rst index bffcf9fbda..f2f310dae9 100644 --- a/doc/src/pair_zbl.rst +++ b/doc/src/pair_zbl.rst @@ -1,22 +1,22 @@ -.. index:: pair\_style zbl +.. index:: pair_style zbl -pair\_style zbl command -======================= +pair_style zbl command +====================== -pair\_style zbl/gpu command -=========================== - -pair\_style zbl/kk command +pair_style zbl/gpu command ========================== -pair\_style zbl/omp command -=========================== +pair_style zbl/kk command +========================= + +pair_style zbl/omp command +========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style zbl inner outer @@ -27,10 +27,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style zbl 3.0 4.0 - pair_coeff \* \* 73.0 73.0 + pair_coeff * * 73.0 73.0 pair_coeff 1 1 14.0 14.0 Description @@ -45,9 +45,9 @@ energy due to a pair of atoms at a distance r\_ij is given by: .. math:: - E^{ZBL}_{ij} & = \frac{1}{4\pi\epsilon_0} \frac{Z_i Z_j \,e^2}{r_{ij}} \phi(r_{ij}/a)+ S(r_{ij})\\ - a & = \frac{0.46850}{Z_{i}^{0.23} + Z_{j}^{0.23}}\\ - \phi(x) & = 0.18175e^{-3.19980x} + 0.50986e^{-0.94229x} + 0.28022e^{-0.40290x} + 0.02817e^{-0.20162x}\\ + E^{ZBL}_{ij} & = \frac{1}{4\pi\epsilon_0} \frac{Z_i Z_j \,e^2}{r_{ij}} \phi(r_{ij}/a)+ S(r_{ij})\\ + a & = \frac{0.46850}{Z_{i}^{0.23} + Z_{j}^{0.23}}\\ + \phi(x) & = 0.18175e^{-3.19980x} + 0.50986e^{-0.94229x} + 0.28022e^{-0.40290x} + 0.02817e^{-0.20162x}\\ where *e* is the electron charge, :math:`\epsilon_0` is the electrical permittivity of vacuum, and :math:`Z_i` and :math:`Z_j` are the nuclear diff --git a/doc/src/pair_zero.rst b/doc/src/pair_zero.rst index d03cd03f76..0a9db6472a 100644 --- a/doc/src/pair_zero.rst +++ b/doc/src/pair_zero.rst @@ -1,15 +1,15 @@ -.. index:: pair\_style zero +.. index:: pair_style zero -pair\_style zero command -======================== +pair_style zero command +======================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS - pair_style zero cutoff *nocoeff* + pair_style zero cutoff [nocoeff] * zero = style name of this pair style * cutoff = global cutoff (distance units) @@ -19,12 +19,12 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style zero 10.0 pair_style zero 5.0 nocoeff - pair_coeff \* \* - pair_coeff 1 2\*4 3.0 + pair_coeff * * + pair_coeff 1 2*4 3.0 Description """"""""""" @@ -84,7 +84,7 @@ and *outer* keywords of the :doc:`run_style respa ` command. Restrictions """""""""""" - none +none Related commands """""""""""""""" diff --git a/doc/src/python.rst b/doc/src/python.rst index 79818dc719..a92b2d8446 100644 --- a/doc/src/python.rst +++ b/doc/src/python.rst @@ -50,7 +50,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS python pForce input 2 v_x 20.0 return v_f format fff file force.py python pForce invoke @@ -58,7 +58,7 @@ Examples python factorial input 1 myN return v_fac format ii here """ def factorial(n): if n == 1: return n - return n \* factorial(n-1) + return n * factorial(n-1) """ python loop input 1 SELF return v_value format pf here """ @@ -69,10 +69,10 @@ Examples # loop N times, increasing cutoff each time for i in range(N): - cut = cut0 + i\*0.1 - lmp.set_variable("cut",cut) # set a variable in LAMMPS + cut = cut0 + i*0.1 + lmp.set_variable("cut",cut) # set a variable in LAMMPS lmp.command("pair_style lj/cut ${cut}") # LAMMPS commands - lmp.command("pair_coeff \* \* 1.0 1.0") + lmp.command("pair_coeff * * 1.0 1.0") lmp.command("run 100") """ @@ -163,7 +163,7 @@ variable. This must match the *func* setting for this command. For example these two commands would be self-consistent: -.. parsed-literal:: +.. code-block:: LAMMPS variable foo python myMultiply python myMultiply return v_foo format f file funcs.py @@ -262,7 +262,7 @@ consider this function loaded with two global variables defined outside the function: -.. parsed-literal:: +.. code-block:: python nsteplast = -1 nvaluelast = 0 @@ -328,7 +328,7 @@ a pointer to LAMMPS. The mechanism for doing this in your Python function is as follows: -.. parsed-literal:: +.. code-block:: python def foo(lmpptr,...): from lammps import lammps @@ -337,15 +337,15 @@ Python function is as follows: ... The function definition must include a variable (lmpptr in this case) -which corresponds to SELF in the python command. The first line of -the function imports the Python module lammps.py in the python dir of +which corresponds to SELF in the python command. The first line of the +function imports the Python module lammps.py in the python directory of the distribution. The second line creates a Python object "lmp" which -wraps the instance of LAMMPS that called the function. The -"ptr=lmpptr" argument is what makes that happen. The third line -invokes the command() function in the LAMMPS library interface. It -takes a single string argument which is a LAMMPS input script command -for LAMMPS to execute, the same as if it appeared in your input -script. In this case, LAMMPS should output +wraps the instance of LAMMPS that called the function. The "ptr=lmpptr" +argument is what makes that happen. The third line invokes the +command() function in the LAMMPS library interface. It takes a single +string argument which is a LAMMPS input script command for LAMMPS to +execute, the same as if it appeared in your input script. In this case, +LAMMPS should output .. parsed-literal:: @@ -364,7 +364,7 @@ A more interesting example is in the examples/python/in.python script which loads and runs the following function from examples/python/funcs.py: -.. parsed-literal:: +.. code-block:: python def loop(N,cut0,thresh,lmpptr): print "LOOP ARGS",N,cut0,thresh,lmpptr @@ -373,13 +373,13 @@ which loads and runs the following function from examples/python/funcs.py: natoms = lmp.get_natoms() for i in range(N): - cut = cut0 + i\*0.1 + cut = cut0 + i*0.1 lmp.set_variable("cut",cut) # set a variable in LAMMPS lmp.command("pair_style lj/cut ${cut}") # LAMMPS command #lmp.command("pair_style lj/cut %d" % cut) # LAMMPS command option - lmp.command("pair_coeff \* \* 1.0 1.0") # ditto + lmp.command("pair_coeff * * 1.0 1.0") # ditto lmp.command("run 10") # ditto pe = lmp.extract_compute("thermo_pe",0,0) # extract total PE from LAMMPS print "PE",pe/natoms,thresh @@ -486,7 +486,7 @@ in your Python function is failing, because you have not initialized the variable foo: -.. parsed-literal:: +.. code-block:: python foo += 1 @@ -494,7 +494,7 @@ If you put one (or more) statements inside a "try" statement, like this: -.. parsed-literal:: +.. code-block:: python import exceptions print "Inside simple function" diff --git a/doc/src/read_data.rst b/doc/src/read_data.rst index ce466108cf..ea36675bc6 100644 --- a/doc/src/read_data.rst +++ b/doc/src/read_data.rst @@ -1,13 +1,13 @@ -.. index:: read\_data +.. index:: read_data -read\_data command -================== +read_data command +================= Syntax """""" - -.. parsed-literal:: + +.. code-block:: LAMMPS read_data file keyword args ... @@ -54,7 +54,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS read_data data.lj read_data ../run7/data.polymer.gz @@ -1401,7 +1401,7 @@ appear. These are listed in the same order they appear as listed above. Thus if -.. parsed-literal:: +.. code-block:: LAMMPS atom_style hybrid electron sphere diff --git a/doc/src/read_dump.rst b/doc/src/read_dump.rst index acf08866a9..5de1e8f25d 100644 --- a/doc/src/read_dump.rst +++ b/doc/src/read_dump.rst @@ -1,13 +1,13 @@ -.. index:: read\_dump +.. index:: read_dump -read\_dump command -================== +read_dump command +================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS read_dump file Nstep field1 field2 ... keyword values ... @@ -56,7 +56,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS read_dump dump.file 5000 x y z read_dump dump.xyz 5 x y z box no format xyz diff --git a/doc/src/read_restart.rst b/doc/src/read_restart.rst index 06f4ddb2e3..e4c7a7b7cf 100644 --- a/doc/src/read_restart.rst +++ b/doc/src/read_restart.rst @@ -1,13 +1,13 @@ -.. index:: read\_restart +.. index:: read_restart -read\_restart command -===================== +read_restart command +==================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS read_restart file flag @@ -18,13 +18,13 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS read_restart save.10000 read_restart save.10000 remap - read_restart restart.\* - read_restart restart.\*.mpiio - read_restart poly.\*.% remap + read_restart restart.* + read_restart restart.*.mpiio + read_restart poly.*.% remap Description """"""""""" @@ -125,7 +125,7 @@ MPI-IO requires two steps. First, build LAMMPS with its MPIIO package installed, e.g. -.. parsed-literal:: +.. code-block:: bash make yes-mpiio # installs the MPIIO package make mpi # build LAMMPS for your platform diff --git a/doc/src/reset_ids.rst b/doc/src/reset_ids.rst index 3bcc0a5b61..29b8c1ca70 100644 --- a/doc/src/reset_ids.rst +++ b/doc/src/reset_ids.rst @@ -1,13 +1,13 @@ -.. index:: reset\_ids +.. index:: reset_ids -reset\_ids command -================== +reset_ids command +================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS reset_ids @@ -15,7 +15,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS reset_ids @@ -54,7 +54,7 @@ as the :doc:`create_atoms ` command explains. Restrictions """""""""""" - none +none Related commands """""""""""""""" diff --git a/doc/src/reset_timestep.rst b/doc/src/reset_timestep.rst index e287605fbb..5dcaf9daf4 100644 --- a/doc/src/reset_timestep.rst +++ b/doc/src/reset_timestep.rst @@ -1,13 +1,13 @@ -.. index:: reset\_timestep +.. index:: reset_timestep -reset\_timestep command -======================= +reset_timestep command +====================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS reset_timestep N @@ -17,7 +17,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS reset_timestep 0 reset_timestep 4000000 @@ -37,7 +37,7 @@ was written. Restrictions """""""""""" - none +none This command cannot be used when any fixes are defined that keep track of elapsed time to perform certain kinds of time-dependent operations. diff --git a/doc/src/run_style.rst b/doc/src/run_style.rst index 663e61b308..7008f6f6bf 100644 --- a/doc/src/run_style.rst +++ b/doc/src/run_style.rst @@ -1,13 +1,13 @@ -.. index:: run\_style +.. index:: run_style -run\_style command -================== +run_style command +================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS run_style style args @@ -57,8 +57,7 @@ Syntax Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS run_style verlet run_style respa 4 2 2 2 bond 1 dihedral 2 pair 3 kspace 4 @@ -112,16 +111,16 @@ match the integer multiple constraint. See the to control this, e.g. -.. parsed-literal:: +.. code-block:: LAMMPS - procssors \* \* \* part 1 2 multiple + processors * * * part 1 2 multiple You can also use the :doc:`partition ` command to explicitly specify the processor layout on each partition. E.g. for 2 partitions of 60 and 15 processors each: -.. parsed-literal:: +.. code-block:: LAMMPS partition yes 1 processors 3 4 5 partition yes 2 processors 3 1 5 @@ -235,7 +234,7 @@ settings for use of the *respa* style without SHAKE in biomolecular simulations: -.. parsed-literal:: +.. code-block:: LAMMPS timestep 4.0 run_style respa 4 2 2 2 inner 2 4.5 6.0 middle 3 8.0 10.0 outer 4 @@ -257,7 +256,7 @@ settings can be used for biomolecular simulations with SHAKE and rRESPA: -.. parsed-literal:: +.. code-block:: LAMMPS fix 2 all shake 0.000001 500 0 m 1.0 a 1 timestep 4.0 @@ -273,7 +272,7 @@ slow modes in the simulation. For example, a system of slowly-moving charged polymer chains could be setup as follows: -.. parsed-literal:: +.. code-block:: LAMMPS timestep 4.0 run_style respa 2 8 @@ -292,7 +291,7 @@ In real units, for a pure LJ fluid at liquid density, with a sigma of seem to work well: -.. parsed-literal:: +.. code-block:: LAMMPS timestep 36.0 run_style respa 3 3 4 inner 1 3.0 4.0 middle 2 6.0 7.0 outer 3 @@ -342,7 +341,7 @@ Default """"""" -.. parsed-literal:: +.. code-block:: LAMMPS run_style verlet diff --git a/doc/src/special_bonds.rst b/doc/src/special_bonds.rst index 1306535f0b..8c9a082c28 100644 --- a/doc/src/special_bonds.rst +++ b/doc/src/special_bonds.rst @@ -1,13 +1,13 @@ -.. index:: special\_bonds +.. index:: special_bonds -special\_bonds command -====================== +special_bonds command +===================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS special_bonds keyword values ... @@ -34,7 +34,7 @@ Syntax Examples: -.. parsed-literal:: +.. code-block:: LAMMPS special_bonds amber special_bonds charmm @@ -216,7 +216,7 @@ default, then the 2,5 interaction will also be weighted by 0.5. time incrementally. E.g. these two commands: -.. parsed-literal:: +.. code-block:: LAMMPS special_bonds lj 0.0 1.0 1.0 special_bonds coul 0.0 0.0 1.0 @@ -224,7 +224,7 @@ default, then the 2,5 interaction will also be weighted by 0.5. are not the same as -.. parsed-literal:: +.. code-block:: LAMMPS special_bonds lj 0.0 1.0 1.0 coul 0.0 0.0 1.0 @@ -250,7 +250,7 @@ their default values before modifying them, each time the Restrictions """""""""""" - none +none Related commands """""""""""""""" diff --git a/doc/src/thermo_modify.rst b/doc/src/thermo_modify.rst index a1ae2516d8..1fa84a40f4 100644 --- a/doc/src/thermo_modify.rst +++ b/doc/src/thermo_modify.rst @@ -1,13 +1,13 @@ -.. index:: thermo\_modify +.. index:: thermo_modify -thermo\_modify command -====================== +thermo_modify command +===================== Syntax """""" - -.. parsed-literal:: + +.. code-block:: LAMMPS thermo_modify keyword value ... @@ -33,7 +33,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS thermo_modify lost ignore flush yes thermo_modify temp myTemp format 3 %15.8g @@ -175,7 +175,7 @@ user to override the default. Restrictions """""""""""" - none +none Related commands """""""""""""""" diff --git a/doc/src/thermo_style.rst b/doc/src/thermo_style.rst index 4b2b875e56..bb549cadf1 100644 --- a/doc/src/thermo_style.rst +++ b/doc/src/thermo_style.rst @@ -1,13 +1,12 @@ -.. index:: thermo\_style +.. index:: thermo_style -thermo\_style command -===================== +thermo_style command +==================== Syntax """""" - -.. parsed-literal:: +.. code-block:: LAMMPS thermo_style style args @@ -89,13 +88,12 @@ Syntax Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS thermo_style multi thermo_style custom step temp pe etotal press vol thermo_style custom step temp etotal c_myTemp v_abc - thermo_style custom step temp etotal c_myTemp[\*] v_abc + thermo_style custom step temp etotal c_myTemp[*] v_abc Description """"""""""" @@ -155,7 +153,7 @@ default this is done by using a *temperature* compute which is created when LAMMPS starts up, as if this command had been issued: -.. parsed-literal:: +.. code-block:: LAMMPS compute thermo_temp all temp @@ -174,7 +172,7 @@ using a *pressure* compute which is created when LAMMPS starts up, as if this command had been issued: -.. parsed-literal:: +.. code-block:: LAMMPS compute thermo_press all pressure thermo_temp @@ -193,7 +191,7 @@ be computed: "pe", "etotal", "ebond", etc. This is done by using a command had been issued: -.. parsed-literal:: +.. code-block:: LAMMPS compute thermo_pe all pe @@ -286,7 +284,7 @@ if the timer is expired, it is negative. This allows for example to exit loops cleanly, if the timeout is expired with: -.. parsed-literal:: +.. code-block:: LAMMPS if "$(timeremain) < 0.0" then "quit 0" @@ -337,10 +335,10 @@ are equivalent, since the :doc:`compute temp ` command creates a global vector with 6 values. -.. parsed-literal:: +.. code-block:: LAMMPS compute myTemp all temp - thermo_style custom step temp etotal c_myTemp[\*] + thermo_style custom step temp etotal c_myTemp[*] thermo_style custom step temp etotal & c_myTemp[1] c_myTemp[2] c_myTemp[3] & c_myTemp[4] c_myTemp[5] c_myTemp[6] @@ -441,6 +439,6 @@ Default """"""" -.. parsed-literal:: +.. code-block:: LAMMPS thermo_style one diff --git a/doc/src/third_order.rst b/doc/src/third_order.rst index 464ce82cf2..3356bd007f 100644 --- a/doc/src/third_order.rst +++ b/doc/src/third_order.rst @@ -1,13 +1,13 @@ -.. index:: third\_order +.. index:: third_order -third\_order command -==================== +third_order command +=================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS third_order group-ID style delta args keyword value ... @@ -28,7 +28,7 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS third_order 1 regular 0.000001 third_order 1 eskm 0.000001 diff --git a/doc/src/write_coeff.rst b/doc/src/write_coeff.rst index d7c82cbeb6..67e0c1e48b 100644 --- a/doc/src/write_coeff.rst +++ b/doc/src/write_coeff.rst @@ -1,23 +1,23 @@ -.. index:: write\_coeff +.. index:: write_coeff -write\_coeff command -==================== +write_coeff command +=================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS write_coeff file - file = name of data file to write out +* file = name of data file to write out Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS write_coeff polymer.coeff diff --git a/doc/src/write_data.rst b/doc/src/write_data.rst index 3d7b7cf607..31f4bb64ac 100644 --- a/doc/src/write_data.rst +++ b/doc/src/write_data.rst @@ -1,13 +1,13 @@ -.. index:: write\_data +.. index:: write_data -write\_data command +write_data command =================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS write_data file keyword value ... @@ -29,10 +29,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS write_data data.polymer - write_data data.\* + write_data data.* Description """"""""""" diff --git a/doc/src/write_dump.rst b/doc/src/write_dump.rst index ae0975cf11..54a55db6c6 100644 --- a/doc/src/write_dump.rst +++ b/doc/src/write_dump.rst @@ -1,13 +1,13 @@ -.. index:: write\_dump +.. index:: write_dump -write\_dump command -=================== +write_dump command +================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS write_dump group-ID style file dump-args modify dump_modify-args @@ -23,15 +23,15 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS write_dump all atom dump.atom write_dump subgroup atom dump.run.bin - write_dump all custom dump.myforce.\* id type x y vx fx + write_dump all custom dump.myforce.* id type x y vx fx write_dump flow custom dump.%.myforce id type c_myF[3] v_ke modify sort id write_dump all xyz system.xyz modify sort id element O H - write_dump all image snap\*.jpg type type size 960 960 modify backcolor white - write_dump all image snap\*.jpg element element & + write_dump all image snap*.jpg type type size 960 960 modify backcolor white + write_dump all image snap*.jpg element element & bond atom 0.3 shiny 0.1 ssao yes 6345 0.2 size 1600 1600 & modify backcolor white element C C O H N C C C O H H S O H diff --git a/doc/src/write_restart.rst b/doc/src/write_restart.rst index 503b585cc3..cade19c0dc 100644 --- a/doc/src/write_restart.rst +++ b/doc/src/write_restart.rst @@ -1,13 +1,13 @@ -.. index:: write\_restart +.. index:: write_restart -write\_restart command -====================== +write_restart command +===================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS write_restart file keyword value ... @@ -28,11 +28,11 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS write_restart restart.equil write_restart restart.equil.mpiio - write_restart poly.%.\* nfile 10 + write_restart poly.%.* nfile 10 Description """"""""""" @@ -63,7 +63,7 @@ versions 2.0 and above. Using MPI-IO requires two steps. First, build LAMMPS with its MPIIO package installed, e.g. -.. parsed-literal:: +.. code-block:: bash make yes-mpiio # installs the MPIIO package make mpi # build LAMMPS for your platform diff --git a/doc/utils/check-packages.py b/doc/utils/check-packages.py new file mode 100755 index 0000000000..99968f9a22 --- /dev/null +++ b/doc/utils/check-packages.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 + +from __future__ import print_function +from glob import glob +from argparse import ArgumentParser +import os, re, sys + +parser = ArgumentParser(prog='check-packages.py', + description="Check package table completeness") + +parser.add_argument("-v", "--verbose", + action='store_const', + const=True, default=False, + help="Enable verbose output") + +parser.add_argument("-d", "--doc", + help="Path to LAMMPS documentation sources") +parser.add_argument("-s", "--src", + help="Path to LAMMPS sources") + +args = parser.parse_args() +verbose = args.verbose +src = args.src +doc = args.doc + +if not args.src or not args.doc: + parser.print_help() + sys.exit(1) + +if not os.path.isdir(src): + sys.exit("LAMMPS source path %s does not exist" % src) + +if not os.path.isdir(doc): + sys.exit("LAMMPS documentation source path %s does not exist" % doc) + +pkgdirs = glob(os.path.join(src, '[A-Z][A-Z]*')) +dirs = re.compile(".*/([0-9A-Z-]+)$") +user = re.compile("USER-.*") + +stdpkg = [] +usrpkg = [] + +# find package names and add to standard and user package lists. +# anything starting with at least two upper case characters, is a +# folder, and is not called 'MAKE' is a package + +for d in pkgdirs: + pkg = dirs.match(d)[1] + if not os.path.isdir(os.path.join(src,pkg)): continue + if pkg in ['DEPEND','MAKE','STUBS']: continue + if user.match(pkg): + usrpkg.append(pkg) + else: + stdpkg.append(pkg) + +print("Found %d standard and %d user packages" % (len(stdpkg),len(usrpkg))) + +counter = 0 +fp = open(os.path.join(doc,'Packages_standard.rst')) +text = fp.read() +fp.close() +matches = re.findall(':ref:`([A-Z0-9-]+) <[A-Z0-9-]+>`',text,re.MULTILINE) +for p in stdpkg: + if not p in matches: + ++counter + print("Standard package %s missing in Packages_standard.rst" + % p) + +fp = open(os.path.join(doc,'Packages_user.rst')) +text = fp.read() +fp.close() +matches = re.findall(':ref:`([A-Z0-9-]+) <[A-Z0-9-]+>`',text,re.MULTILINE) +for p in usrpkg: + if not p in matches: + ++counter + print("User package %s missing in Packages_user.rst" + % p) + +fp = open(os.path.join(doc,'Packages_details.rst')) +text = fp.read() +fp.close() +matches = re.findall(':ref:`([A-Z0-9]+) `',text,re.MULTILINE) +for p in stdpkg: + if not p in matches: + ++counter + print("Standard package %s missing in Packages_details.rst" + % p) +matches = re.findall(':ref:`(USER-[A-Z0-9]+) `',text,re.MULTILINE) +for p in usrpkg: + if not p in matches: + ++counter + print("User package %s missing in Packages_details.rst" + % p) + +if counter: + print("Found %d issue(s) with package lists" % counter) + diff --git a/doc/utils/sphinx-config/LAMMPSLexer.py b/doc/utils/sphinx-config/LAMMPSLexer.py index 6436be410d..3ff23439de 100644 --- a/doc/utils/sphinx-config/LAMMPSLexer.py +++ b/doc/utils/sphinx-config/LAMMPSLexer.py @@ -35,7 +35,7 @@ class LAMMPSLexer(RegexLexer): (r'[\w_\.\[\]]+', Name), (r'\$[\w_]+', Name.Variable), (r'\s+', Whitespace), - (r'[\+\-\*\/&=<>]', Operator), + (r'[\+\-\*\^\|\/\!%&=<>]', Operator), ], 'variable' : [ ('[^\}]+', Name.Variable), diff --git a/doc/utils/sphinx-config/conf.py b/doc/utils/sphinx-config/conf.py index 3e16963f01..a9f9cb952a 100644 --- a/doc/utils/sphinx-config/conf.py +++ b/doc/utils/sphinx-config/conf.py @@ -60,7 +60,7 @@ master_doc = 'Manual' # General information about the project. project = 'LAMMPS' -copyright = '2013 Sandia Corporation' +copyright = '2003-2020 Sandia Corporation' def get_lammps_version(): import os @@ -128,7 +128,9 @@ html_theme = 'lammps_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -#html_theme_options = {} +html_theme_options = { + 'logo_only' : True +} # Add any paths that contain custom themes here, relative to this directory. html_theme_path = ['_themes'] @@ -142,7 +144,7 @@ html_title = "LAMMPS documentation" # The name of an image file (relative to this directory) to place at the top # of the sidebar. -#html_logo = None +html_logo = 'lammps-logo.png' # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 @@ -210,6 +212,9 @@ if 'epub' in sys.argv: else: html_math_renderer = 'mathjax' +# use relative path for mathjax, so it is looked for in the +# html tree and the manual becomes readable when offline +mathjax_path = 'mathjax/es5/tex-mml-chtml.js' # -- Options for LaTeX output --------------------------------------------- latex_elements = { diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index bd44de0761..a0a0535c71 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -173,6 +173,7 @@ backcolor Baczewski Bagi Bagnold +Bkappa Bal balancer Balankura @@ -315,6 +316,7 @@ Caswell Cates cauchy cauchystat +Cavazzoni Cavium Cawkwell cbecker @@ -612,7 +614,7 @@ dimgray dipolar dir Direc -dirs +dirname discoverable discretization discretized @@ -642,6 +644,7 @@ Donadio dotc Doty doxygen +downarrow Doye dpd DPD @@ -1238,6 +1241,7 @@ iostreams iparam ipi ipp +Ippolito IPv IPython Isele @@ -1293,6 +1297,7 @@ Janssens Jaramillo Jarzynski jatempl +javascript jcp jea jec @@ -1406,6 +1411,7 @@ Kraus Kremer Kress Kronik +ksh kspace Kspace KSpace @@ -1540,6 +1546,7 @@ Liu Livermore lj llammps +LLVM lm lmp lmpptr @@ -1616,6 +1623,7 @@ manybody MANYBODY Maras Marchetti +Mariella Marrink Marroquin Marsaglia @@ -1630,6 +1638,7 @@ Masuhiro Matchett Materias mathbf +mathjax matlab matplotlib Matsubara @@ -2610,6 +2619,7 @@ Shenderova Shi Shiga Shinoda +shlib shockvel si SiC @@ -2689,6 +2699,7 @@ sqdistharm sqrt src srd +sright Srinivasan Srolovitz srp @@ -2961,6 +2972,7 @@ uInfParallel uk ul ulb +Uleft uloop ulsph uMech @@ -2993,6 +3005,7 @@ unsplit unstrained untar untilted +uparrow upenn upto Urbakh diff --git a/doc/utils/sphinx-config/lammps-logo.png b/doc/utils/sphinx-config/lammps-logo.png new file mode 120000 index 0000000000..37d35bece1 --- /dev/null +++ b/doc/utils/sphinx-config/lammps-logo.png @@ -0,0 +1 @@ +../../src/JPG/lammps-logo.png \ No newline at end of file diff --git a/examples/USER/e3b/README b/examples/USER/misc/e3b/README similarity index 100% rename from examples/USER/e3b/README rename to examples/USER/misc/e3b/README diff --git a/examples/USER/e3b/e3b_box.data b/examples/USER/misc/e3b/e3b_box.data similarity index 100% rename from examples/USER/e3b/e3b_box.data rename to examples/USER/misc/e3b/e3b_box.data diff --git a/examples/USER/e3b/in.e3b-tip4p2005 b/examples/USER/misc/e3b/in.e3b-tip4p2005 similarity index 100% rename from examples/USER/e3b/in.e3b-tip4p2005 rename to examples/USER/misc/e3b/in.e3b-tip4p2005 diff --git a/examples/USER/e3b/log.29Mar2019.e3b-tip4p2005.g++.1 b/examples/USER/misc/e3b/log.29Mar2019.e3b-tip4p2005.g++.1 similarity index 100% rename from examples/USER/e3b/log.29Mar2019.e3b-tip4p2005.g++.1 rename to examples/USER/misc/e3b/log.29Mar2019.e3b-tip4p2005.g++.1 diff --git a/examples/USER/e3b/log.29Mar2019.e3b-tip4p2005.g++.4 b/examples/USER/misc/e3b/log.29Mar2019.e3b-tip4p2005.g++.4 similarity index 100% rename from examples/USER/e3b/log.29Mar2019.e3b-tip4p2005.g++.4 rename to examples/USER/misc/e3b/log.29Mar2019.e3b-tip4p2005.g++.4 diff --git a/lib/Install.py b/lib/Install.py index d5c41f9ad0..284ef6888b 100644 --- a/lib/Install.py +++ b/lib/Install.py @@ -45,8 +45,11 @@ if not args.machine and not args.extramake: sys.exit(HELP) machine = args.machine -extraflag = not args.extramake -suffix = args.extramake +extraflag = args.extramake +if extraflag: + suffix = args.extramake +else: + suffix = 'empty' # set lib from working dir diff --git a/lib/qmmm/Makefile.gfortran-cmake b/lib/qmmm/Makefile.gfortran-cmake new file mode 100644 index 0000000000..7a467a5e1c --- /dev/null +++ b/lib/qmmm/Makefile.gfortran-cmake @@ -0,0 +1,82 @@ +# -*- Makefile -*- for coupling LAMMPS to PWscf for QM/MM molecular dynamics +# adapted for the case of compiling LAMMPS with CMake. This assumes that +# LAMMPS was configured to build a shared library and installed with "make install" +# as it used the PKG config configuration file. You may need to extend +# the PKG_CONFIG_PATH environment variable to have pkgconf find the liblammps.pc file. +# This is set up for using GNU Fortran and OpenMPI to compile both LAMMPS and QE + +# this file will be copied to Makefile.lammps +EXTRAMAKE = Makefile.lammps.empty + +# top level directory of Quantum ESPRESSO 6.3 or later (tested up to QE 6.5) +QETOPDIR=$(HOME)/compile/espresso + +# import compiler settings from Quantum ESPRESSO +sinclude $(QETOPDIR)/make.inc + +# FLAGS for compiling and linking the pwqmmm.x executable +MPICXX=mpicxx +MPICXXFLAGS=-DOMPI_SKIP_MPICXX=1 -O2 -Wall -g -fPIC\ + -I../../src -I$(QETOPDIR)/COUPLE/include + +# location of required libraries +# part 1: hi-level libraries for building pw.x +PWOBJS = \ +$(QETOPDIR)/COUPLE/src/libqecouple.a \ +$(QETOPDIR)/PW/src/libpw.a \ +$(QETOPDIR)/Modules/libqemod.a +# part 2: lo-level libraries for all of Q-E +LIBOBJS = \ +$(QETOPDIR)/FFTXlib/libqefft.a \ +$(QETOPDIR)/dft-d3/libdftd3qe.a \ +$(QETOPDIR)/KS_Solvers/PPCG/libppcg.a \ +$(QETOPDIR)/KS_Solvers/CG/libcg.a \ +$(QETOPDIR)/KS_Solvers/Davidson/libdavid.a \ +$(QETOPDIR)/UtilXlib/libutil.a \ +$(QETOPDIR)/LAXlib/libqela.a \ +$(QETOPDIR)/clib/clib.a \ +$(QETOPDIR)/iotk/src/libiotk.a + +# add support for fortran runtimes for compiler and MPI library +# those are automatically included when linking QE executables, +# since they use mpifort/mpif90 to link, but we are using the +# C++ MPI compiler wrapper instead, so those need to be added +# as a dependency for QE objects and libraries +QELIBS += -lgfortran -lmpi_mpifh + +# part 3: add-on libraries and main library for LAMMPS +sinclude ../../src/Makefile.package +LAMMPSFLAGS = $(shell pkgconf liblammps --cflags) +LAMMPSLIB = $(shell pkgconf liblammps --libs) + +# part 4: local QM/MM library and progams +SRC=pwqmmm.c libqmmm.c +OBJ=$(SRC:%.c=%.o) + + +default: libqmmm.a + +all : tldeps libqmmm.a pwqmmm.x + +pwqmmm.x : pwqmmm.o $(PWOBJS) $(LIBOBJS) + $(MPICXX) $(LDFLAGS) -o $@ $^ $(LAMMPSLIB) $(QELIBS) $(LIBS) + +libqmmm.a: libqmmm.o + $(AR) $(ARFLAGS) $@ $^ + @cp $(EXTRAMAKE) Makefile.lammps + +%.o: %.c + $(MPICXX) -c $(LAMMPSFLAGS) $(MPICXXFLAGS) $< -o $@ + +tldeps: + ( cd $(QETOPDIR) ; $(MAKE) $(MFLAGS) couple || exit 1) + $(MAKE) -C ../../src $(MFLAGS) $(LAMMPSCFG) + $(MAKE) -C ../../src $(MFLAGS) mode=lib $(LAMMPSCFG) + +clean : + -rm -f *.x *.o *.a *~ *.F90 *.d *.mod *.i *.L + +# explicit dependencies + +pwqmmm.o: pwqmmm.c libqmmm.h +libqmmm.o: libqmmm.c libqmmm.h diff --git a/lib/qmmm/README b/lib/qmmm/README index 9046cf59de..13d17c055e 100644 --- a/lib/qmmm/README +++ b/lib/qmmm/README @@ -1,4 +1,5 @@ QM/MM support library +===================== Axel Kohlmeyer, akohlmey@gmail.com Temple University, Philadelphia and ICTP, Trieste @@ -13,25 +14,26 @@ performing QM/MM molecular dynamics simulations. More information on Quantum ESPRESSO can be found at: http://www.quantum-espresso.org The interface code itself is designed so it can also be combined with -other QM codes, however only support for Quantum ESPRESSO is currently -the only option. Adding support for a different QM code will require -to write a new version of the top-level wrapper code, pwqmmm.c, and -also an interface layer into the QM code similar to the one in QE. +other QM codes, however coupling to Quantum ESPRESSO is currently the +only available option. Adding support for a different QM code will +require to write a new version of the top-level wrapper code, pwqmmm.c, +and also an interface layer into the QM code similar to the one in QE. -You can type "make lib-qmmm" from the src directory to see help on how -to build this library (steps 1 and 2 below) via make commands, or you -can do the same thing by typing "python Install.py" from within this -directory, or you can do it manually by following the instructions -below. +LAMMPS has support for two build systems, the traditional make based +one and a newer one based on CMake. You have to build LAMMPS as a +library with the USER-QMMM package included and for that you need to +also build the libqmmm.a library in this folder. -However you perform steps 1 and 2, you will need to perform steps 3 -and 4 manually, as outlined below. +Below you will find some description of the steps needed in either case. +However you build LAMMPS and the liblammps and libqmmm libraries, you +will need to perform the remaining steps manually, as outlined below. ------------------------------------------------- -WARNING: This is experimental code under developement and is provided -at this early stage to encourage others to write interfaces to other -QM codes. Please test *very* carefully before using this software for +WARNING: This is code depending on two software packages that are +independently maitained and are under continuous active developement. +It is thus much easier to break the QM/MM interface without noticing. +Thus please test *very* carefully before using this software for production calculations. At this point, both mechanical and multipole based electrostatic @@ -40,17 +42,92 @@ molecules as included in the two example folders. ------------------------------------------------- -Building the QM/MM executable has to be done in multiple stages. +Building the QM/MM executable has to be done in multiple stages + +Building with CMake for LAMMPS +============================== + +Step 1) + +Go to the top-level folder of the LAMMPS source code and create +a custom build folder (e.g. build-qmmm) and create a suitable +build configuration with CMake: + + mkdir build-qmmm + cd build-qmmm + cmake -C ../cmake/presets/minimal.cmake -D PKG_USER-QMMM=yes \ + -D BUILD_LIB=yes -DBUILD_SHARED_LIBS=yes ../cmake + make + make install + +This will build a LAMMPS executable "lmp" and a shared library +"liblammps.so" and install them and additional configuration and +supporting files into the ${HOME}/.local directory tree (unless +you set -D CMAKE_INSTALL_PREFIX to a different location). If the +installation is not into a system folder, you need to update +the LD_LIBRARY_PATH and PKG_CONFIG_PATH environment variables. + + LD_LIBRARY_PATH=${LD_LIBRARY_PATH-/usr/lib64}:${HOME}/.local/lib64 + PKG_CONFIG_PATH=${PKG_CONFIG_PATH-/usr/lib64/pkgconfig}:${HOME}/.local/lib64/pkgconfig + export LD_LIBRARY_PATH PKG_CONFIG_PATH + +The standalone LAMMPS executable is not capable of doing QM/MM +calculations itself, but it will be needed to run all MM calculations +for equilibration and testing and also to confirm that the classical +part of the code is set up correctly. + +Step 2) + +Build a standalone pw.x executable from source code in the Quantum +ESPRESSO directory and also make the "couple" target. This is typically +done with: + + ./configure + make pw couple + +You may need to review and edit the make.inc file created by configure. +Make certain, that both LAMMPS and QE use the same MPI library and +compatible compilers. In the examples here we assume GNU compilers +(gfortran, gcc, g++) and OpenMPI. + +Building the standalone pw.x binary is needed to confirm that +corresponding QM input is working correctly and to run test calculations +on the QM atoms only. + +Step 3) + +Go back to this folder (lib/qmmm) and now review the file +Makefile.gfortran-cmake and make adjustments to the makefile variables +according to the comments in the file. You probably need to adjust +the QETOPDIR variable to point to the location of your QE +compilation/installation. +Please also check that the command "pkgconf liblammps --libs" works. +Then you should be able to compile the QM/MM executable with: + + make -f Makefile.gfortran-cmake pwqmmm.x + +If this is successful, you should be able to run a QM/MM calculation +and can try the examples in the example-mc and example-ec folders: + + mpirun -np 4 ../pwqmmm.x qmmm.inp 2 + + +Building with traditional make for LAMMPS +========================================= + Step 1) -Build the qmmm coupling library in this directory using one of the -provided Makefile. files or create your own, specific to -your compiler and system. For example with: -make -f Makefile.gfortran +Go to src folder under the top-level folder of the LAMMPS source code +and build the qmmm coupling library in this directory using one of +the provided Makefile. files. E.g. for use with GNU fortran: + make lib-qmmm args="-m gfortran" + +This file is specific to your compiler and system. You may need to +create a specific one for your choice of compilers, MPI, and OS. When you are done building this library, two new files should -exist in this directory: +exist in this directory (lib/qmmm): libqmmm.a the library LAMMPS will link against Makefile.lammps settings the LAMMPS Makefile will import @@ -60,21 +137,42 @@ Makefile.lammps.empty file. Currently no additional dependencies for this library exist. Step 2) + Build a standalone LAMMPS executable as described in the LAMMPS documentation and include the USER-QMMM package. This executable is not functional for QM/MM, but it will usually be needed to run all MM calculations for equilibration and testing and also to confirm that the classical part of the code is set up correctly. +Also build a the LAMMPS library. This can be a static library +or a shared library. For example for a static library with the +minimum set of packages required for the examples here: + + make yes-molecule yes-kspace yes-rigid yes-user-qmmm + make mpi + make mode=lib mpi Step 3) -Build a standalone pw.x executable in the Quantum ESPRESSO directory -and also make the "couple" target. Building the standalone pw.x -binary is also needed to confirm that corresponding QM input is -working correctly and to run test calculations on QM atoms only. + +Build a standalone pw.x executable from source code in the Quantum +ESPRESSO directory and also make the "couple" target. This is typically +done with: + + ./configure + make pw couple + +You may need to review and edit the make.inc file created by configure. +Make certain, that both LAMMPS and QE use the same MPI library and +compatible compilers. In the examples here we assume GNU compilers +(gfortran, gcc, g++) and OpenMPI. + +Building the standalone pw.x binary is needed to confirm that +corresponding QM input is working correctly and to run test calculations +on the QM atoms only. Step 4) + To compile and link the final QM/MM executable, which combines the -compiled sources from both packages, you have to return to the lib/qmmm +compiled code from both packages, you have to return to the lib/qmmm directory and now edit the Makefile. for the Makefile configuration used to compile LAMMPS and also update the directory and library settings for the Quantum ESPRESSO installation. diff --git a/src/Makefile b/src/Makefile index 5db09db65a..5ca583aa11 100644 --- a/src/Makefile +++ b/src/Makefile @@ -247,6 +247,11 @@ ifeq ($(mode),shlib) @rm -f $(SHLINK) @ln -s $(SHLIB) $(SHLINK) endif +ifeq ($(mode),print) + @cd $(objdir); \ + $(MAKE) $(MFLAGS) "OBJ = $(OBJLIB)" "INC = $(INC)" \ + "EXE = ../$(SHLIB)" -f ../Makefile.print +endif # Remove machine-specific object files diff --git a/src/Makefile.print b/src/Makefile.print new file mode 100644 index 0000000000..8398eb2589 --- /dev/null +++ b/src/Makefile.print @@ -0,0 +1,22 @@ +# Makefile to allow printing current COMPILER/LINKER flags and settings + +print: do-print + +include Makefile + +# get location of the LAMMPS tree +LMPDIR=$(shell echo $${PWD} | sed -e 's,/src/Obj_[+0-9a-z_-]\+$$,,') + +do-print: + @echo '# LAMMPS source tree is in:' $(LMPDIR) + @echo '# Compiler: ' + @echo CXX=$(CC) + @echo '# Linker: ' + @echo LD=$(LINK) + @echo '# Compilation: ' + @echo CXXFLAGS=$(CCFLAGS) $(EXTRA_INC) | sed -e s,-I\\.\\./\\.\\./,-I${LMPDIR}/,g -e s,-I\\.\\./,-I${LMPDIR}/src/,g -e s,$(HOME),\\$$\\{HOME\\},g + @echo '# Linking: ' + @echo LDFLAGS=$(LINKFLAGS) + @echo '# Libraries: ' + @echo LDLIBS=$(EXTRA_PATH) $(EXTRA_LIB) $(LIB) | sed -e s,-L\\.\\./\\.\\./,-L${LMPDIR}/,g -e s,-L\\.\\./,-L${LMPDIR}/src/,g -e s,$(HOME),\\$$\\{HOME\\},g +