Compare commits
78 Commits
patch_15Ma
...
patch_5Jun
| Author | SHA1 | Date | |
|---|---|---|---|
| 0849e03d1b | |||
| 045c312c49 | |||
| 47c6cd86f2 | |||
| 27cd78b96d | |||
| dd97a7540e | |||
| 272c536326 | |||
| 0b13fbe733 | |||
| 021f0c1fc6 | |||
| 5d96ecff25 | |||
| c76b79f021 | |||
| a981626948 | |||
| 5f79a9ef80 | |||
| 674e3975a8 | |||
| d0286b3de1 | |||
| 983f3adbb4 | |||
| 58a88dff95 | |||
| 0ba38aa072 | |||
| 2e63280f87 | |||
| 68eab23cf8 | |||
| 6175f2dce8 | |||
| dc1e31506e | |||
| 68d69955d0 | |||
| 5f657b9184 | |||
| 3e4fd3dade | |||
| 3e05b983c1 | |||
| d8a30a9697 | |||
| 972a7a5c4d | |||
| 311aebf7ff | |||
| 16a254f6bd | |||
| 80d906d445 | |||
| 8b169d97f5 | |||
| f73c848ee4 | |||
| 4243af30d7 | |||
| 9d51ee17b0 | |||
| c903a110fe | |||
| 02e7dd5716 | |||
| 1a5c3c6dcb | |||
| daac3f7102 | |||
| 3bf0a4ba63 | |||
| 9cc16c4f33 | |||
| 8dcd6fc48c | |||
| a48f1cbf00 | |||
| d3cbccff35 | |||
| 29d36ffec0 | |||
| fec2f8f69b | |||
| c0cfceb95c | |||
| 12fcf5f5ef | |||
| cb8d89855d | |||
| c8d50c04a4 | |||
| e3e5a962b0 | |||
| e133c60ff5 | |||
| 97be57be7b | |||
| 5523c9e7f6 | |||
| e82e1c695a | |||
| 2ee02cfadd | |||
| cfad0634ac | |||
| bd05228c71 | |||
| 0f1e4b0504 | |||
| d0c6484fb0 | |||
| 0349e9fee9 | |||
| 55116db8fb | |||
| 1041934568 | |||
| 50082c287d | |||
| e3823a521c | |||
| 35bb2ac2a3 | |||
| c7eb9a8626 | |||
| fb8d31422d | |||
| 27a2d0cbd4 | |||
| 7b264d35fa | |||
| 80431612c7 | |||
| db74f14f33 | |||
| 69c1a7954a | |||
| f2113ab04a | |||
| dc40886d23 | |||
| 6ee002d6cf | |||
| d640c712f8 | |||
| 9166001041 | |||
| 2fbf86a58d |
@ -87,7 +87,8 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" BTYPE)
|
||||
# this is fast, so check for it all the time
|
||||
message(STATUS "Running check for auto-generated files from make-based build system")
|
||||
file(GLOB SRC_AUTOGEN_FILES ${LAMMPS_SOURCE_DIR}/style_*.h)
|
||||
list(APPEND SRC_AUTOGEN_FILES ${LAMMPS_SOURCE_DIR}/lmpinstalledpkgs.h ${LAMMPS_SOURCE_DIR}/lmpgitversion.h)
|
||||
file(GLOB SRC_AUTOGEN_PACKAGES ${LAMMPS_SOURCE_DIR}/packages_*.h)
|
||||
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${LAMMPS_SOURCE_DIR}/lmpinstalledpkgs.h ${LAMMPS_SOURCE_DIR}/lmpgitversion.h)
|
||||
foreach(_SRC ${SRC_AUTOGEN_FILES})
|
||||
get_filename_component(FILENAME "${_SRC}" NAME)
|
||||
if(EXISTS ${LAMMPS_SOURCE_DIR}/${FILENAME})
|
||||
@ -172,21 +173,17 @@ set(LAMMPS_LINK_LIBS)
|
||||
set(LAMMPS_DEPS)
|
||||
set(LAMMPS_API_DEFINES)
|
||||
|
||||
set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS DIPOLE GRANULAR
|
||||
KSPACE MANYBODY MC MESSAGE MISC MOLECULE PERI REPLICA RIGID SHOCK
|
||||
SPIN SNAP SRD KIM PYTHON MSCG MPIIO VORONOI POEMS LATTE USER-ATC USER-AWPMD
|
||||
USER-BOCS USER-CGDNA USER-MESO USER-CGSDK USER-COLVARS USER-DIFFRACTION
|
||||
USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-LB USER-MANIFOLD
|
||||
USER-MEAMC USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF
|
||||
USER-PHONON USER-PLUMED USER-PTM USER-QTB USER-REAXC USER-SCAFACOS
|
||||
USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-VTK
|
||||
USER-QUIP USER-QMMM USER-YAFF USER-ADIOS)
|
||||
set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE
|
||||
GRANULAR KSPACE LATTE MANYBODY MC MESSAGE MISC MOLECULE PERI POEMS QEQ
|
||||
REPLICA RIGID SHOCK SPIN SNAP SRD KIM PYTHON MSCG MPIIO VORONOI
|
||||
USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-MESO USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-LB
|
||||
USER-MANIFOLD USER-MEAMC USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-PHONON USER-PLUMED USER-PTM USER-QTB USER-REAXC
|
||||
USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF
|
||||
USER-VTK USER-QUIP USER-QMMM USER-YAFF USER-ADIOS)
|
||||
set(ACCEL_PACKAGES USER-OMP KOKKOS OPT USER-INTEL GPU)
|
||||
set(OTHER_PACKAGES CORESHELL QEQ)
|
||||
foreach(PKG ${DEFAULT_PACKAGES})
|
||||
option(PKG_${PKG} "Build ${PKG} Package" OFF)
|
||||
endforeach()
|
||||
foreach(PKG ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
|
||||
foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES})
|
||||
option(PKG_${PKG} "Build ${PKG} Package" OFF)
|
||||
endforeach()
|
||||
|
||||
@ -203,7 +200,6 @@ endif()
|
||||
|
||||
include_directories(${LAMMPS_SOURCE_DIR})
|
||||
|
||||
|
||||
if(PKG_USER-ADIOS)
|
||||
# The search for ADIOS2 must come before MPI because
|
||||
# it includes its own MPI search with the latest FindMPI.cmake
|
||||
@ -213,7 +209,6 @@ if(PKG_USER-ADIOS)
|
||||
list(APPEND LAMMPS_LINK_LIBS adios2::adios2)
|
||||
endif()
|
||||
|
||||
|
||||
# do MPI detection after language activation, if MPI for these language is required
|
||||
find_package(MPI QUIET)
|
||||
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
|
||||
@ -233,7 +228,6 @@ else()
|
||||
list(APPEND LAMMPS_LINK_LIBS mpi_stubs)
|
||||
endif()
|
||||
|
||||
|
||||
set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallsmall: all 32-bit, smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)")
|
||||
set(LAMMPS_SIZES_VALUES smallbig bigbig smallsmall)
|
||||
set_property(CACHE LAMMPS_SIZES PROPERTY STRINGS ${LAMMPS_SIZES_VALUES})
|
||||
@ -322,7 +316,18 @@ pkg_depends(USER-SCAFACOS MPI)
|
||||
|
||||
include(CheckIncludeFileCXX)
|
||||
find_package(OpenMP QUIET)
|
||||
option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND})
|
||||
|
||||
# TODO: this is a temporary workaround until a better solution is found. AK 2019-05-30
|
||||
# GNU GCC 9.x uses settings incompatible with our use of 'default(none)' in OpenMP pragmas
|
||||
# where we assume older GCC semantics. For the time being, we disable OpenMP by default
|
||||
# for GCC 9.x and beyond. People may manually turn it on, but need to run the script
|
||||
# src/USER-OMP/hack_openmp_for_pgi_gcc9.sh on all sources to make it compatible with gcc 9.
|
||||
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.99.9))
|
||||
option(BUILD_OMP "Build with OpenMP support" OFF)
|
||||
else()
|
||||
option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND})
|
||||
endif()
|
||||
|
||||
if(BUILD_OMP)
|
||||
find_package(OpenMP REQUIRED)
|
||||
check_include_file_cxx(omp.h HAVE_OMP_H_INCLUDE)
|
||||
@ -446,7 +451,6 @@ else()
|
||||
set(CUDA_REQUEST_PIC)
|
||||
endif()
|
||||
|
||||
|
||||
if(PKG_VORONOI)
|
||||
find_package(VORO)
|
||||
if(VORO_FOUND)
|
||||
@ -895,6 +899,8 @@ foreach(PKG ${DEFAULT_PACKAGES})
|
||||
list(APPEND LIB_SOURCES ${${PKG}_SOURCES})
|
||||
include_directories(${${PKG}_SOURCES_DIR})
|
||||
endif()
|
||||
|
||||
RegisterPackages(${${PKG}_SOURCES_DIR})
|
||||
endforeach()
|
||||
|
||||
# packages that need defines set
|
||||
@ -913,6 +919,8 @@ foreach(PKG ${ACCEL_PACKAGES})
|
||||
|
||||
# check for package files in src directory due to old make system
|
||||
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
|
||||
|
||||
RegisterPackages(${${PKG}_SOURCES_DIR})
|
||||
endforeach()
|
||||
|
||||
##############################################
|
||||
@ -961,7 +969,6 @@ if(PKG_USER-H5MD)
|
||||
include_directories(${HDF5_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
|
||||
######################################################################
|
||||
# packages which selectively include variants based on enabled styles
|
||||
# e.g. accelerator packages
|
||||
@ -1438,10 +1445,12 @@ endif()
|
||||
######################################################
|
||||
# Generate style headers based on global list of
|
||||
# styles registered during package selection
|
||||
# Generate packages headers from all packages
|
||||
######################################################
|
||||
set(LAMMPS_STYLE_HEADERS_DIR ${CMAKE_CURRENT_BINARY_DIR}/styles)
|
||||
|
||||
GenerateStyleHeaders(${LAMMPS_STYLE_HEADERS_DIR})
|
||||
GeneratePackagesHeaders(${LAMMPS_STYLE_HEADERS_DIR})
|
||||
|
||||
include_directories(${LAMMPS_STYLE_HEADERS_DIR})
|
||||
|
||||
@ -1450,7 +1459,7 @@ include_directories(${LAMMPS_STYLE_HEADERS_DIR})
|
||||
######################################
|
||||
set(temp "#ifndef LMP_INSTALLED_PKGS_H\n#define LMP_INSTALLED_PKGS_H\n")
|
||||
set(temp "${temp}const char * LAMMPS_NS::LAMMPS::installed_packages[] = {\n")
|
||||
set(temp_PKG_LIST ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
|
||||
set(temp_PKG_LIST ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES})
|
||||
list(SORT temp_PKG_LIST)
|
||||
foreach(PKG ${temp_PKG_LIST})
|
||||
if(PKG_${PKG})
|
||||
@ -1529,8 +1538,6 @@ if(BUILD_EXE)
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Build documentation
|
||||
###############################################################################
|
||||
@ -1683,7 +1690,7 @@ endif()
|
||||
###############################################################################
|
||||
# Print package summary
|
||||
###############################################################################
|
||||
foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
|
||||
foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES})
|
||||
if(PKG_${PKG})
|
||||
message(STATUS "Building package: ${PKG}")
|
||||
endif()
|
||||
|
||||
@ -181,3 +181,88 @@ function(DetectBuildSystemConflict lammps_src_dir)
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction(DetectBuildSystemConflict)
|
||||
|
||||
|
||||
function(FindPackagesHeaders path style_class file_pattern headers)
|
||||
file(GLOB files "${path}/${file_pattern}*.h")
|
||||
get_property(plist GLOBAL PROPERTY ${headers})
|
||||
|
||||
foreach(file_name ${files})
|
||||
file(STRINGS ${file_name} is_style LIMIT_COUNT 1 REGEX ${style_class})
|
||||
if(is_style)
|
||||
list(APPEND plist ${file_name})
|
||||
endif()
|
||||
endforeach()
|
||||
set_property(GLOBAL PROPERTY ${headers} "${plist}")
|
||||
endfunction(FindPackagesHeaders)
|
||||
|
||||
function(RegisterPackages search_path)
|
||||
FindPackagesHeaders(${search_path} ANGLE_CLASS angle_ PKGANGLE ) # angle ) # force
|
||||
FindPackagesHeaders(${search_path} ATOM_CLASS atom_vec_ PKGATOM_VEC ) # atom ) # atom atom_vec_hybrid
|
||||
FindPackagesHeaders(${search_path} BODY_CLASS body_ PKGBODY ) # body ) # atom_vec_body
|
||||
FindPackagesHeaders(${search_path} BOND_CLASS bond_ PKGBOND ) # bond ) # force
|
||||
FindPackagesHeaders(${search_path} COMMAND_CLASS "[^.]" PKGCOMMAND ) # command ) # input
|
||||
FindPackagesHeaders(${search_path} COMPUTE_CLASS compute_ PKGCOMPUTE ) # compute ) # modify
|
||||
FindPackagesHeaders(${search_path} DIHEDRAL_CLASS dihedral_ PKGDIHEDRAL ) # dihedral ) # force
|
||||
FindPackagesHeaders(${search_path} DUMP_CLASS dump_ PKGDUMP ) # dump ) # output write_dump
|
||||
FindPackagesHeaders(${search_path} FIX_CLASS fix_ PKGFIX ) # fix ) # modify
|
||||
FindPackagesHeaders(${search_path} IMPROPER_CLASS improper_ PKGIMPROPER ) # improper ) # force
|
||||
FindPackagesHeaders(${search_path} INTEGRATE_CLASS "[^.]" PKGINTEGRATE ) # integrate ) # update
|
||||
FindPackagesHeaders(${search_path} KSPACE_CLASS "[^.]" PKGKSPACE ) # kspace ) # force
|
||||
FindPackagesHeaders(${search_path} MINIMIZE_CLASS min_ PKGMINIMIZE ) # minimize ) # update
|
||||
FindPackagesHeaders(${search_path} NBIN_CLASS nbin_ PKGNBIN ) # nbin ) # neighbor
|
||||
FindPackagesHeaders(${search_path} NPAIR_CLASS npair_ PKGNPAIR ) # npair ) # neighbor
|
||||
FindPackagesHeaders(${search_path} NSTENCIL_CLASS nstencil_ PKGNSTENCIL ) # nstencil ) # neighbor
|
||||
FindPackagesHeaders(${search_path} NTOPO_CLASS ntopo_ PKGNTOPO ) # ntopo ) # neighbor
|
||||
FindPackagesHeaders(${search_path} PAIR_CLASS pair_ PKGPAIR ) # pair ) # force
|
||||
FindPackagesHeaders(${search_path} READER_CLASS reader_ PKGREADER ) # reader ) # read_dump
|
||||
FindPackagesHeaders(${search_path} REGION_CLASS region_ PKGREGION ) # region ) # domain
|
||||
endfunction(RegisterPackages)
|
||||
|
||||
function(CreatePackagesHeader path filename)
|
||||
set(temp "")
|
||||
if(ARGC GREATER 2)
|
||||
list(REMOVE_AT ARGV 0 1)
|
||||
foreach(FNAME ${ARGV})
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${FNAME}")
|
||||
get_filename_component(DNAME ${FNAME} DIRECTORY)
|
||||
get_filename_component(DNAME ${DNAME} NAME)
|
||||
get_filename_component(FNAME ${FNAME} NAME)
|
||||
set(temp "${temp}#undef PACKAGE\n#define PACKAGE \"${DNAME}\"\n")
|
||||
set(temp "${temp}#include \"${DNAME}/${FNAME}\"\n")
|
||||
endforeach()
|
||||
endif()
|
||||
message(STATUS "Generating ${filename}...")
|
||||
file(WRITE "${path}/${filename}.tmp" "${temp}" )
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${path}/${filename}.tmp" "${path}/${filename}")
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${path}/${filename}")
|
||||
endfunction(CreatePackagesHeader)
|
||||
|
||||
function(GeneratePackagesHeader path property style)
|
||||
get_property(files GLOBAL PROPERTY ${property})
|
||||
CreatePackagesHeader("${path}" "packages_${style}.h" ${files})
|
||||
endfunction(GeneratePackagesHeader)
|
||||
|
||||
function(GeneratePackagesHeaders output_path)
|
||||
GeneratePackagesHeader(${output_path} PKGANGLE angle ) # force
|
||||
GeneratePackagesHeader(${output_path} PKGATOM_VEC atom ) # atom atom_vec_hybrid
|
||||
GeneratePackagesHeader(${output_path} PKGBODY body ) # atom_vec_body
|
||||
GeneratePackagesHeader(${output_path} PKGBOND bond ) # force
|
||||
GeneratePackagesHeader(${output_path} PKGCOMMAND command ) # input
|
||||
GeneratePackagesHeader(${output_path} PKGCOMPUTE compute ) # modify
|
||||
GeneratePackagesHeader(${output_path} PKGDIHEDRAL dihedral ) # force
|
||||
GeneratePackagesHeader(${output_path} PKGDUMP dump ) # output write_dump
|
||||
GeneratePackagesHeader(${output_path} PKGFIX fix ) # modify
|
||||
GeneratePackagesHeader(${output_path} PKGIMPROPER improper ) # force
|
||||
GeneratePackagesHeader(${output_path} PKGINTEGRATE integrate ) # update
|
||||
GeneratePackagesHeader(${output_path} PKGKSPACE kspace ) # force
|
||||
GeneratePackagesHeader(${output_path} PKGMINIMIZE minimize ) # update
|
||||
GeneratePackagesHeader(${output_path} PKGNBIN nbin ) # neighbor
|
||||
GeneratePackagesHeader(${output_path} PKGNPAIR npair ) # neighbor
|
||||
GeneratePackagesHeader(${output_path} PKGNSTENCIL nstencil ) # neighbor
|
||||
GeneratePackagesHeader(${output_path} PKGNTOPO ntopo ) # neighbor
|
||||
GeneratePackagesHeader(${output_path} PKGPAIR pair ) # force
|
||||
GeneratePackagesHeader(${output_path} PKGREADER reader ) # read_dump
|
||||
GeneratePackagesHeader(${output_path} PKGREGION region ) # domain
|
||||
endfunction(GeneratePackagesHeaders)
|
||||
|
||||
|
||||
@ -211,7 +211,7 @@ $(VENV):
|
||||
@( \
|
||||
$(VIRTUALENV) -p $(PYTHON) $(VENV); \
|
||||
. $(VENV)/bin/activate; \
|
||||
pip install Sphinx==1.7.6; \
|
||||
pip install Sphinx; \
|
||||
deactivate;\
|
||||
)
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
.TH LAMMPS "15 May 2019" "2019-05-15"
|
||||
.TH LAMMPS "5 June 2019" "2019-06-05"
|
||||
.SH NAME
|
||||
.B LAMMPS
|
||||
\- Molecular Dynamics Simulator.
|
||||
|
||||
@ -30,7 +30,6 @@ This is the list of packages that may require additional steps.
|
||||
"KIM"_#kim,
|
||||
"KOKKOS"_#kokkos,
|
||||
"LATTE"_#latte,
|
||||
"MEAM"_#meam,
|
||||
"MESSAGE"_#message,
|
||||
"MSCG"_#mscg,
|
||||
"OPT"_#opt,
|
||||
@ -351,49 +350,6 @@ the compiler you use on your system to build LATTE.
|
||||
|
||||
:line
|
||||
|
||||
MEAM package :h4,link(meam)
|
||||
|
||||
NOTE: the use of the MEAM package is discouraged, as it has been
|
||||
superseded by the USER-MEAMC package, which is a direct translation of
|
||||
the Fortran code in the MEAM library to C++. The code in USER-MEAMC
|
||||
should be functionally equivalent to the MEAM package, fully supports
|
||||
use of "pair_style hybrid"_pair_hybrid.html (the MEAM package does
|
||||
not), and has optimizations that make it significantly faster than the
|
||||
MEAM package.
|
||||
|
||||
[CMake build]:
|
||||
|
||||
No additional settings are needed besides "-D PKG_MEAM=yes".
|
||||
|
||||
[Traditional make]:
|
||||
|
||||
Before building LAMMPS, you must build the MEAM library in lib/meam.
|
||||
You can build the MEAM library manually if you prefer; follow the
|
||||
instructions in lib/meam/README. You can also do it in one step from
|
||||
the lammps/src dir, using a command like these, which simply invoke
|
||||
the lib/meam/Install.py script with the specified args:
|
||||
|
||||
make lib-meam # print help message
|
||||
make lib-meam args="-m mpi" # build with default Fortran compiler compatible with your MPI library
|
||||
make lib-meam args="-m serial" # build with compiler compatible with "make serial" (GNU Fortran)
|
||||
make lib-meam args="-m ifort" # build with Intel Fortran compiler using Makefile.ifort :pre
|
||||
|
||||
NOTE: You should test building the MEAM library with both the Intel
|
||||
and GNU compilers to see if a simulation runs faster with one versus
|
||||
the other on your system.
|
||||
|
||||
The build should produce two files: lib/meam/libmeam.a and
|
||||
lib/meam/Makefile.lammps. The latter is copied from an existing
|
||||
Makefile.lammps.* and has settings needed to link C++ (LAMMPS) with
|
||||
Fortran (MEAM library). Typically the two compilers used for LAMMPS
|
||||
and the MEAM library need to be consistent (e.g. both Intel or both
|
||||
GNU compilers). If necessary, you can edit/create a new
|
||||
lib/meam/Makefile.machine file for your system, which should define an
|
||||
EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine
|
||||
file.
|
||||
|
||||
:line
|
||||
|
||||
MESSAGE package :h4,link(message)
|
||||
|
||||
This package can optionally include support for messaging via sockets,
|
||||
|
||||
@ -41,7 +41,6 @@ packages:
|
||||
"KIM"_Build_extras.html#kim,
|
||||
"KOKKOS"_Build_extras.html#kokkos,
|
||||
"LATTE"_Build_extras.html#latte,
|
||||
"MEAM"_Build_extras.html#meam,
|
||||
"MESSAGE"_Build_extras.html#message,
|
||||
"MSCG"_Build_extras.html#mscg,
|
||||
"OPT"_Build_extras.html#opt,
|
||||
|
||||
@ -33,6 +33,11 @@ commands in it are used to define a LAMMPS simulation.
|
||||
Commands_bond
|
||||
Commands_kspace
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
Commands_removed
|
||||
|
||||
END_RST -->
|
||||
|
||||
<!-- HTML_ONLY -->
|
||||
@ -49,5 +54,7 @@ END_RST -->
|
||||
"Bond, angle, dihedral, improper commands"_Commands_bond.html
|
||||
"KSpace solvers"_Commands_kspace.html :all(b)
|
||||
|
||||
"Removed commands and packages"_Commands_removed.html :all(b)
|
||||
|
||||
<!-- END_HTML_ONLY -->
|
||||
|
||||
|
||||
66
doc/src/Commands_removed.txt
Normal file
66
doc/src/Commands_removed.txt
Normal file
@ -0,0 +1,66 @@
|
||||
"Higher level section"_Commands.html - "LAMMPS WWW Site"_lws - "LAMMPS
|
||||
Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Commands.html)
|
||||
|
||||
:line
|
||||
|
||||
Removed commands and packages :h3
|
||||
|
||||
This page lists LAMMPS commands and packages that have been removed from
|
||||
the distribution and provides suggestions for alternatives or replacements.
|
||||
LAMMPS has special dummy styles implemented, that will stop LAMMPS and
|
||||
print a suitable error message in most cases, when a style/command is used
|
||||
that has been removed.
|
||||
|
||||
Fix ave/spatial and fix ave/spatial/sphere :h4
|
||||
|
||||
The fixes ave/spatial and ave/spatial/sphere have been removed from LAMMPS
|
||||
since they were superseded by the more general and extensible "chunk
|
||||
infrastructure". Here the system is partitioned in one of many possible
|
||||
ways through the "compute chunk/atom"_compute_chunk_atom.html command
|
||||
and then averaging is done using "fix ave/chunk"_fix_ave_chunk.html.
|
||||
Please refer to the "chunk HOWTO"_Howto_chunk.html section for an overview.
|
||||
|
||||
MEAM package :h4
|
||||
|
||||
The MEAM package has been removed since it was superseded by the
|
||||
"USER-MEAMC package"_Package_details.html#PKG-USER-MEAMC. The code in
|
||||
the USER-MEAMC package is a translation of the Fortran code of MEAM into C++,
|
||||
which removes several restrictions (e.g. there can be multiple instances
|
||||
in hybrid pair styles) and allows for some optimizations leading
|
||||
to better performance. The new pair style "meam/c"_pair_meamc.html has
|
||||
the exact same syntax as the old "meam" pair style and thus pair style
|
||||
"meam"_pair_meamc.html is an alias to the new style and backward
|
||||
compatibility of old inputs is preserved.
|
||||
|
||||
REAX package :h4
|
||||
|
||||
The REAX package has been removed since it was superseded by the
|
||||
"USER-REAXC package"_Package_details.html#PKG-USER-REAXC. The USER-REAXC
|
||||
package has been tested to yield equivalent results to the REAX package,
|
||||
offers better performance, supports OpenMP multi-threading via USER-OMP,
|
||||
and GPU and threading parallelization through KOKKOS. The new pair styles
|
||||
are not syntax compatible with the removed reax pair style, so input
|
||||
files will have to be adapted.
|
||||
|
||||
USER-CUDA package :h4
|
||||
|
||||
The USER-CUDA package had been removed, since it had been unmaintained
|
||||
for a long time and had known bugs and problems. Significant parts of
|
||||
the design were transferred to the
|
||||
"KOKKOS package"_Package_details.html#PKG-KOKKOS, which has similar
|
||||
performance characteristics on Nvidia GPUs. Both, the KOKKOS
|
||||
and the "GPU package"_Package_details.html#PKG-GPU are maintained
|
||||
and allow running LAMMPS with GPU acceleration.
|
||||
|
||||
restart2data tool :h4
|
||||
|
||||
The functionality of the restart2data tool has been folded into the
|
||||
LAMMPS executable directly instead of having a separate tool. A
|
||||
combination of the commands "read_restart"_read_restart.html and
|
||||
"write_data"_write_data.html can be used to the same effect. For added
|
||||
convenience this conversion can also be triggered by "command line
|
||||
flags"_Run_options.html
|
||||
@ -610,6 +610,62 @@ This means there is something invalid about the topology definitions. :dd
|
||||
|
||||
The data file header lists bonds but no bond types. :dd
|
||||
|
||||
{Bond/react: Cannot use fix bond/react with non-molecular systems} :dt
|
||||
|
||||
Only systems with bonds that can be changed can be used. Atom_style
|
||||
template does not qualify. :dd
|
||||
|
||||
{Bond/react: Rmax cutoff is longer than pairwise cutoff} :dt
|
||||
|
||||
This is not allowed because bond creation is done using the pairwise
|
||||
neighbor list. :dd
|
||||
|
||||
{Bond/react: Molecule template ID for fix bond/react does not exist} :dt
|
||||
|
||||
A valid molecule template must have been created with the molecule
|
||||
command. :dd
|
||||
|
||||
{Bond/react: Reaction templates must contain the same number of atoms} :dt
|
||||
|
||||
There should be a one-to-one correspondence between atoms in the
|
||||
pre-reacted and post-reacted templates, as specified by the map file. :dd
|
||||
|
||||
{Bond/react: Unknown section in map file} :dt
|
||||
|
||||
Please ensure reaction map files are properly formatted. :dd
|
||||
|
||||
{Bond/react: Atom affected by reaction too close to template edge} :dt
|
||||
|
||||
This means an atom which changes type during the reaction is too close
|
||||
to an 'edge' atom defined in the superimpose file. This could cause
|
||||
incorrect assignment of bonds, angle, etc. Generally, this means you
|
||||
must include more atoms in your templates, such that there are at
|
||||
least two atoms between each atom involved in the reaction and an edge
|
||||
atom. :dd
|
||||
|
||||
{Bond/react: Fix bond/react needs ghost atoms from farther away} :dt
|
||||
|
||||
This is because a processor needs to superimpose the entire unreacted
|
||||
molecule template onto simulation atoms it knows about. The
|
||||
comm_modify cutoff command can be used to extend the communication
|
||||
range. :dd
|
||||
|
||||
{Bond/react: A deleted atom cannot remain bonded to an atom that is not deleted} :dt
|
||||
|
||||
Self-explanatory. :dd
|
||||
|
||||
{Bond/react special bond generation overflow} :dt
|
||||
|
||||
The number of special bonds per-atom created by a reaction exceeds the
|
||||
system setting. See the read_data or create_box command for how to
|
||||
specify this value. :dd
|
||||
|
||||
{Bond/react topology/atom exceed system topology/atom} :dt
|
||||
|
||||
The number of bonds, angles etc per-atom created by a reaction exceeds
|
||||
the system setting. See the read_data or create_box command for how to
|
||||
specify this value. :dd
|
||||
|
||||
{Both restart files must use % or neither} :dt
|
||||
|
||||
Self-explanatory. :dd
|
||||
@ -5828,6 +5884,12 @@ Must have periodic x,y dimensions and non-periodic z dimension to use
|
||||
Must have periodic x,y dimensions and non-periodic z dimension to use
|
||||
2d slab option with pppm/disp. :dd
|
||||
|
||||
{Incorrect conversion in format string} :dt
|
||||
|
||||
A format style variable was not using either a %f, a %g, or a %e conversion.
|
||||
Or an immediate variable with format suffix was not using either
|
||||
a %f, a %g or a %e conversion in the format suffix. :dd
|
||||
|
||||
{Incorrect element names in ADP potential file} :dt
|
||||
|
||||
The element names in the ADP file do not match those requested. :dd
|
||||
@ -7448,6 +7510,11 @@ The Atoms section of a data file must come before a Triangles section. :dd
|
||||
The Atoms section of a data file must come before a Velocities
|
||||
section. :dd
|
||||
|
||||
{Must re-specify non-restarted pair style (xxx) after read_restart} :dt
|
||||
|
||||
For pair styles, that do not store their settings in a restart file,
|
||||
it must be defined with a new 'pair_style' command after read_restart. :dd
|
||||
|
||||
{Must set both respa inner and outer} :dt
|
||||
|
||||
Cannot use just the inner or outer option with respa without using the
|
||||
@ -9990,25 +10057,25 @@ quote. :dd
|
||||
|
||||
Self-explanatory. :dd
|
||||
|
||||
{Unexpected end of AngleCoeffs section} :dt
|
||||
{Unexpected empty line in AngleCoeffs section} :dt
|
||||
|
||||
Read a blank line. :dd
|
||||
Read a blank line where there should be coefficient data. :dd
|
||||
|
||||
{Unexpected end of BondCoeffs section} :dt
|
||||
{Unexpected empty line in BondCoeffs section} :dt
|
||||
|
||||
Read a blank line. :dd
|
||||
Read a blank line where there should be coefficient data. :dd
|
||||
|
||||
{Unexpected end of DihedralCoeffs section} :dt
|
||||
{Unexpected empty line in DihedralCoeffs section} :dt
|
||||
|
||||
Read a blank line. :dd
|
||||
Read a blank line where there should be coefficient data. :dd
|
||||
|
||||
{Unexpected end of ImproperCoeffs section} :dt
|
||||
{Unexpected empty line in ImproperCoeffs section} :dt
|
||||
|
||||
Read a blank line. :dd
|
||||
Read a blank line where there should be coefficient data. :dd
|
||||
|
||||
{Unexpected end of PairCoeffs section} :dt
|
||||
{Unexpected empty line in PairCoeffs section} :dt
|
||||
|
||||
Read a blank line. :dd
|
||||
Read a blank line where there should be coefficient data. :dd
|
||||
|
||||
{Unexpected end of custom file} :dt
|
||||
|
||||
@ -10049,19 +10116,19 @@ create_box command. :dd
|
||||
A universe or uloop style variable must specify a number of values >= to the
|
||||
number of processor partitions. :dd
|
||||
|
||||
{Unknown angle style} :dt
|
||||
{Unrecognized angle style} :dt
|
||||
|
||||
The choice of angle style is unknown. :dd
|
||||
|
||||
{Unknown atom style} :dt
|
||||
{Unrecognized atom style} :dt
|
||||
|
||||
The choice of atom style is unknown. :dd
|
||||
|
||||
{Unknown body style} :dt
|
||||
{Unrecognized body style} :dt
|
||||
|
||||
The choice of body style is unknown. :dd
|
||||
|
||||
{Unknown bond style} :dt
|
||||
{Unrecognized bond style} :dt
|
||||
|
||||
The choice of bond style is unknown. :dd
|
||||
|
||||
@ -10077,23 +10144,23 @@ Self-explanatory. :dd
|
||||
|
||||
Self-explanatory. :dd
|
||||
|
||||
{Unknown command: %s} :dt
|
||||
{Unrecognized command: %s} :dt
|
||||
|
||||
The command is not known to LAMMPS. Check the input script. :dd
|
||||
|
||||
{Unknown compute style} :dt
|
||||
{Unrecognized compute style} :dt
|
||||
|
||||
The choice of compute style is unknown. :dd
|
||||
|
||||
{Unknown dihedral style} :dt
|
||||
{Unrecognized dihedral style} :dt
|
||||
|
||||
The choice of dihedral style is unknown. :dd
|
||||
|
||||
{Unknown dump reader style} :dt
|
||||
{Unrecognized dump reader style} :dt
|
||||
|
||||
The choice of dump reader style via the format keyword is unknown. :dd
|
||||
|
||||
{Unknown dump style} :dt
|
||||
{Unrecognized dump style} :dt
|
||||
|
||||
The choice of dump style is unknown. :dd
|
||||
|
||||
@ -10101,7 +10168,7 @@ The choice of dump style is unknown. :dd
|
||||
|
||||
Self-explanatory. :dd
|
||||
|
||||
{Unknown fix style} :dt
|
||||
{Unrecognized fix style} :dt
|
||||
|
||||
The choice of fix style is unknown. :dd
|
||||
|
||||
@ -10109,7 +10176,7 @@ The choice of fix style is unknown. :dd
|
||||
|
||||
A section of the data file cannot be read by LAMMPS. :dd
|
||||
|
||||
{Unknown improper style} :dt
|
||||
{Unrecognized improper style} :dt
|
||||
|
||||
The choice of improper style is unknown. :dd
|
||||
|
||||
@ -10117,7 +10184,7 @@ The choice of improper style is unknown. :dd
|
||||
|
||||
One or more specified keywords are not recognized. :dd
|
||||
|
||||
{Unknown kspace style} :dt
|
||||
{Unrecognized kspace style} :dt
|
||||
|
||||
The choice of kspace style is unknown. :dd
|
||||
|
||||
@ -10133,7 +10200,7 @@ Self-explanatory. :dd
|
||||
|
||||
Self-explanatory. :dd
|
||||
|
||||
{Unknown pair style} :dt
|
||||
{Unrecognized pair style} :dt
|
||||
|
||||
The choice of pair style is unknown. :dd
|
||||
|
||||
@ -10141,7 +10208,7 @@ The choice of pair style is unknown. :dd
|
||||
|
||||
The choice of sub-style is unknown. :dd
|
||||
|
||||
{Unknown region style} :dt
|
||||
{Unrecognized region style} :dt
|
||||
|
||||
The choice of region style is unknown. :dd
|
||||
|
||||
|
||||
@ -82,6 +82,11 @@ bond/angle/dihedral. LAMMPS computes this by taking the maximum bond
|
||||
length, multiplying by the number of bonds in the interaction (e.g. 3
|
||||
for a dihedral) and adding a small amount of stretch. :dd
|
||||
|
||||
{Bond/react: An atom in 'react #%d' changes bond connectivity but not atom type} :dt
|
||||
|
||||
You may want to double-check that all atom types are properly assigned
|
||||
in the post-reaction template. :dd
|
||||
|
||||
{Both groups in compute group/group have a net charge; the Kspace boundary correction to energy will be non-zero} :dt
|
||||
|
||||
Self-explanatory. :dd
|
||||
|
||||
@ -52,13 +52,14 @@ Lowercase directories :h4
|
||||
|
||||
accelerate: run with various acceleration options (OpenMP, GPU, Phi)
|
||||
airebo: polyethylene with AIREBO potential
|
||||
atm: Axilrod-Teller-Muto potential example
|
||||
balance: dynamic load balancing, 2d system
|
||||
body: body particles, 2d system
|
||||
cmap: CMAP 5-body contributions to CHARMM force field
|
||||
colloid: big colloid particles in a small particle solvent, 2d system
|
||||
comb: models using the COMB potential
|
||||
coreshell: core/shell model using CORESHELL package
|
||||
controller: use of fix controller as a thermostat
|
||||
coreshell: core/shell model using CORESHELL package
|
||||
crack: crack propagation in a 2d solid
|
||||
deposit: deposit atoms and molecules on a surface
|
||||
dipole: point dipolar particles, 2d system
|
||||
@ -70,10 +71,13 @@ friction: frictional contact of spherical asperities between 2d surfaces
|
||||
gcmc: Grand Canonical Monte Carlo (GCMC) via the fix gcmc command
|
||||
granregion: use of fix wall/region/gran as boundary on granular particles
|
||||
hugoniostat: Hugoniostat shock dynamics
|
||||
hyper: global and local hyperdynamics of diffusion on Pt surface
|
||||
indent: spherical indenter into a 2d solid
|
||||
kim: use of potentials in Knowledge Base for Interatomic Models (KIM)
|
||||
latte: examples for using fix latte for DFTB via the LATTE library
|
||||
meam: MEAM test for SiC and shear (same as shear examples)
|
||||
melt: rapid melt of 3d LJ system
|
||||
message: demos for LAMMPS client/server coupling with the MESSAGE package
|
||||
micelle: self-assembly of small lipid-like molecules into 2d bilayers
|
||||
min: energy minimization of 2d LJ melt
|
||||
mscg: parameterize a multi-scale coarse-graining (MSCG) model
|
||||
@ -88,6 +92,7 @@ pour: pouring of granular particles into a 3d box, then chute flow
|
||||
prd: parallel replica dynamics of vacancy diffusion in bulk Si
|
||||
python: using embedded Python in a LAMMPS input script
|
||||
qeq: use of the QEQ package for charge equilibration
|
||||
rdf-adf: computing radial and angle distribution functions for water
|
||||
reax: RDX and TATB models using the ReaxFF
|
||||
rigid: rigid bodies modeled as independent or coupled
|
||||
shear: sideways shear applied to 2d solid, with and without a void
|
||||
@ -95,6 +100,7 @@ snap: NVE dynamics for BCC tantalum crystal using SNAP potential
|
||||
srd: stochastic rotation dynamics (SRD) particles as solvent
|
||||
streitz: use of Streitz/Mintmire potential with charge equilibration
|
||||
tad: temperature-accelerated dynamics of vacancy diffusion in bulk Si
|
||||
threebody: regression test input for a variety of manybody potentials
|
||||
vashishta: use of the Vashishta potential
|
||||
voronoi: Voronoi tesselation via compute voronoi/atom command :tb(s=:)
|
||||
|
||||
@ -131,8 +137,10 @@ COUPLE: examples of how to use LAMMPS as a library
|
||||
DIFFUSE: compute diffusion coefficients via several methods
|
||||
ELASTIC: compute elastic constants at zero temperature
|
||||
ELASTIC_T: compute elastic constants at finite temperature
|
||||
HEAT: compute thermal conductivity for LJ and water via fix ehex
|
||||
KAPPA: compute thermal conductivity via several methods
|
||||
MC: using LAMMPS in a Monte Carlo mode to relax the energy of a system
|
||||
SPIN: examples for features of the SPIN package
|
||||
USER: examples for USER packages and USER-contributed commands
|
||||
VISCOSITY: compute viscosity via several methods :tb(s=:)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!-- HTML_ONLY -->
|
||||
<HEAD>
|
||||
<TITLE>LAMMPS Users Manual</TITLE>
|
||||
<META NAME="docnumber" CONTENT="15 May 2019 version">
|
||||
<META NAME="docnumber" CONTENT="5 Jun 2019 version">
|
||||
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
|
||||
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
|
||||
</HEAD>
|
||||
@ -21,7 +21,7 @@
|
||||
:line
|
||||
|
||||
LAMMPS Documentation :c,h1
|
||||
15 May 2019 version :c,h2
|
||||
5 Jun 2019 version :c,h2
|
||||
|
||||
"What is a LAMMPS version?"_Manual_version.html
|
||||
|
||||
|
||||
@ -208,7 +208,7 @@ available on your system.
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#compress on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -358,7 +358,7 @@ developed the pair style.
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#kim on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -404,7 +404,7 @@ lib/kokkos.
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#kokkos on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -477,7 +477,7 @@ Cawkwell, Anders Niklasson, and Christian Negre.
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#latte on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -654,7 +654,7 @@ University of Chicago.
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#mscg on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -686,7 +686,7 @@ and Vincent Natoli (Stone Ridge Technolgy).
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#opt on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -743,7 +743,7 @@ connections at hinge points.
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#poems on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -775,7 +775,7 @@ lib/python/README for more details.
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#python on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -965,7 +965,7 @@ and LBNL.
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#voronoi on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -1017,7 +1017,7 @@ atomic information to continuum fields.
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#user-atc on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -1044,7 +1044,7 @@ model.
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#user-awpmd on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -1184,7 +1184,7 @@ Tribello.
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#user-plumed on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -1362,7 +1362,7 @@ H5MD format.
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#user-h5md on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -1400,7 +1400,7 @@ NOTE: the USER-INTEL package contains styles that require using the
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#user-intel on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -1620,7 +1620,7 @@ at
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#user-molfile on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -1660,7 +1660,7 @@ tools:
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#user-netcdf on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -1704,7 +1704,7 @@ install/un-install the package and build LAMMPS in the usual manner:
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#user-omp on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -1788,7 +1788,7 @@ without changes to LAMMPS itself.
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#user-qmmm on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -1846,7 +1846,7 @@ on your system.
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#user-quip on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -1964,7 +1964,7 @@ Dynamics, Ernst Mach Institute, Germany).
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#user-smd on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
@ -2090,7 +2090,7 @@ system.
|
||||
[Install:]
|
||||
|
||||
This package has "specific installation
|
||||
instructions"_Build_extras.html#gpu on the "Build
|
||||
instructions"_Build_extras.html#user-vtk on the "Build
|
||||
extras"_Build_extras.html doc page.
|
||||
|
||||
[Supporting info:]
|
||||
|
||||
@ -15,8 +15,9 @@ compute ID group-ID coord/atom cstyle args ... :pre
|
||||
ID, group-ID are documented in "compute"_compute.html command :ulb,l
|
||||
coord/atom = style name of this compute command :l
|
||||
cstyle = {cutoff} or {orientorder} :l
|
||||
{cutoff} args = cutoff typeN
|
||||
{cutoff} args = cutoff \[group group2-ID\] typeN
|
||||
cutoff = distance within which to count coordination neighbors (distance units)
|
||||
group {group2-ID} = select group-ID to restrict which atoms to consider for coordination number (optional)
|
||||
typeN = atom type for Nth coordination count (see asterisk form below)
|
||||
{orientorder} args = orientorderID threshold
|
||||
orientorderID = ID of an orientorder/atom compute
|
||||
@ -28,6 +29,7 @@ cstyle = {cutoff} or {orientorder} :l
|
||||
compute 1 all coord/atom cutoff 2.0
|
||||
compute 1 all coord/atom cutoff 6.0 1 2
|
||||
compute 1 all coord/atom cutoff 6.0 2*4 5*8 *
|
||||
compute 1 solute coord/atom cutoff 2.0 group solvent
|
||||
compute 1 all coord/atom orientorder 2 0.5 :pre
|
||||
|
||||
[Description:]
|
||||
@ -38,9 +40,14 @@ meaning of the resulting value depend on the {cstyle} keyword used.
|
||||
|
||||
The {cutoff} cstyle calculates one or more traditional coordination
|
||||
numbers for each atom. A coordination number is defined as the number
|
||||
of neighbor atoms with specified atom type(s) that are within the
|
||||
specified cutoff distance from the central atom. Atoms not in the
|
||||
specified group are included in the coordination number tally.
|
||||
of neighbor atoms with specified atom type(s), and optionally within
|
||||
the specified group, that are within the specified cutoff distance from
|
||||
the central atom. The compute group selects only the central atoms; all
|
||||
neighboring atoms, unless selected by type, type range, or group option,
|
||||
are included in the coordination number tally.
|
||||
|
||||
The optional {group} keyword allows to specify from which group atoms
|
||||
contribute to the coordination number. Default setting is group 'all'.
|
||||
|
||||
The {typeN} keywords allow specification of which atom types
|
||||
contribute to each coordination number. One coordination number is
|
||||
@ -122,7 +129,9 @@ explained above.
|
||||
"compute cluster/atom"_compute_cluster_atom.html
|
||||
"compute orientorder/atom"_compute_orientorder_atom.html
|
||||
|
||||
[Default:] none
|
||||
[Default:]
|
||||
|
||||
group = all
|
||||
|
||||
:line
|
||||
|
||||
|
||||
@ -141,11 +141,16 @@ specify if this should be done.
|
||||
|
||||
This fix writes the state of the fix to "binary restart
|
||||
files"_restart.html. This includes information about the random
|
||||
number generator seed, the next timestep for MC exchanges, etc. See
|
||||
number generator seed, the next timestep for MC exchanges, the number
|
||||
of exchange attempts and successes etc. See
|
||||
the "read_restart"_read_restart.html command for info on how to
|
||||
re-specify a fix in an input script that reads a restart file, so that
|
||||
the operation of the fix continues in an uninterrupted fashion.
|
||||
|
||||
NOTE: For this to work correctly, the timestep must [not] be changed
|
||||
after reading the restart with "reset_timestep"_reset_timestep.html.
|
||||
The fix will try to detect it and stop with an error.
|
||||
|
||||
None of the "fix_modify"_fix_modify.html options are relevant to this
|
||||
fix.
|
||||
|
||||
|
||||
@ -18,8 +18,8 @@ fix ID group-ID bond/react common_keyword values ...
|
||||
|
||||
ID, group-ID are documented in "fix"_fix.html command. Group-ID is ignored. :ulb,l
|
||||
bond/react = style name of this fix command :l
|
||||
zero or more common keyword/value pairs may be appended directly after 'bond/react' :l
|
||||
these apply to all reaction specifications (below) :l
|
||||
the common keyword/values may be appended directly after 'bond/react' :l
|
||||
this applies to all reaction specifications (below) :l
|
||||
common_keyword = {stabilization} :l
|
||||
{stabilization} values = {no} or {yes} {group-ID} {xmax}
|
||||
{no} = no reaction site stabilization
|
||||
@ -136,10 +136,12 @@ words, can be customized for each reaction, or reaction step):
|
||||
A check for possible new reaction sites is performed every {Nevery}
|
||||
timesteps.
|
||||
|
||||
Two conditions must be met for a reaction to occur. First a bonding
|
||||
atom pair must be identified. Second, the topology surrounding the
|
||||
bonding atom pair must match the topology of the pre-reaction
|
||||
template. If both these conditions are met, the reaction site is
|
||||
Three physical conditions must be met for a reaction to occur. First,
|
||||
a bonding atom pair must be identified within the reaction distance
|
||||
cutoffs. Second, the topology surrounding the bonding atom pair must
|
||||
match the topology of the pre-reaction template. Finally, any reaction
|
||||
constraints listed in the map file (see below) must be satisfied. If
|
||||
all of these conditions are met, the reaction site is eligible to be
|
||||
modified to match the post-reaction template.
|
||||
|
||||
A bonding atom pair will be identified if several conditions are met.
|
||||
@ -203,14 +205,24 @@ new types must also be defined during the setup of a given simulation.
|
||||
A discussion of correctly handling this is also provided on the
|
||||
"molecule"_molecule.html command page.
|
||||
|
||||
NOTE: When a reaction occurs, it is possible that the resulting
|
||||
topology/atom (e.g. special bonds, dihedrals, etc.) exceeds that of
|
||||
the existing system and reaction templates. As when inserting
|
||||
molecules, enough space for this increased topology/atom must be
|
||||
reserved by using the relevant "extra" keywords to the
|
||||
"read_data"_read_data.html or "create_box"_create_box.html commands.
|
||||
|
||||
The map file is a text document with the following format:
|
||||
|
||||
A map file has a header and a body. The header of map file the
|
||||
contains one mandatory keyword and three optional keywords. The
|
||||
mandatory keyword is 'equivalences' and the optional keywords are
|
||||
'edgeIDs' and 'deleteIDs' and 'customIDs':
|
||||
contains one mandatory keyword and four optional keywords. The
|
||||
mandatory keyword is 'equivalences':
|
||||
|
||||
N {equivalences} = # of atoms N in the reaction molecule templates :pre
|
||||
|
||||
The optional keywords are 'edgeIDs', 'deleteIDs', 'customIDs' and
|
||||
'constraints':
|
||||
|
||||
N {equivalences} = # of atoms N in the reaction molecule templates
|
||||
N {edgeIDs} = # of edge atoms N in the pre-reacted molecule template
|
||||
N {deleteIDs} = # of atoms N that are specified for deletion
|
||||
N {customIDs} = # of atoms N that are specified for a custom update
|
||||
@ -244,8 +256,8 @@ A sample map file is given below:
|
||||
|
||||
# this is a map file :pre
|
||||
|
||||
2 edgeIDs
|
||||
7 equivalences :pre
|
||||
7 equivalences
|
||||
2 edgeIDs :pre
|
||||
|
||||
BondingIDs :pre
|
||||
|
||||
@ -297,26 +309,25 @@ can allow for the possibility of one or more reverse reactions.
|
||||
|
||||
The optional keywords deal with the probability of a given reaction
|
||||
occurring as well as the stable equilibration of each reaction site as
|
||||
it occurs.
|
||||
it occurs:
|
||||
|
||||
The {prob} keyword can affect whether an eligible reaction actually
|
||||
occurs. The fraction setting must be a value between 0.0 and 1.0. A
|
||||
uniform random number between 0.0 and 1.0 is generated and the
|
||||
The {prob} keyword can affect whether or not an eligible reaction
|
||||
actually occurs. The fraction setting must be a value between 0.0 and
|
||||
1.0. A uniform random number between 0.0 and 1.0 is generated and the
|
||||
eligible reaction only occurs if the random number is less than the
|
||||
fraction. Up to N reactions are permitted to occur, as optionally
|
||||
specified by the {max_rxn} keyword.
|
||||
|
||||
The {stabilize_steps} keyword allows for the specification of how many
|
||||
timesteps a reaction site is stabilized before being returned to the
|
||||
overall system thermostat.
|
||||
|
||||
In order to produce the most physical behavior, this 'reaction site
|
||||
equilibration time' should be tuned to be as small as possible while
|
||||
retaining stability for a given system or reaction step. After a
|
||||
limited number of case studies, this number has been set to a default
|
||||
of 60 timesteps. Ideally, it should be individually tuned for each fix
|
||||
reaction step. Note that in some situations, decreasing rather than
|
||||
increasing this parameter will result in an increase in stability.
|
||||
overall system thermostat. In order to produce the most physical
|
||||
behavior, this 'reaction site equilibration time' should be tuned to
|
||||
be as small as possible while retaining stability for a given system
|
||||
or reaction step. After a limited number of case studies, this number
|
||||
has been set to a default of 60 timesteps. Ideally, it should be
|
||||
individually tuned for each fix reaction step. Note that in some
|
||||
situations, decreasing rather than increasing this parameter will
|
||||
result in an increase in stability.
|
||||
|
||||
The {update_edges} keyword can increase the number of atoms whose
|
||||
atomic charges are updated, when the pre-reaction template contains
|
||||
@ -324,11 +335,11 @@ edge atoms. When the value is set to 'charges,' all atoms' atomic
|
||||
charges are updated to those specified by the post-reaction template,
|
||||
including atoms near the edge of reaction templates. When the value is
|
||||
set to 'custom,' an additional section must be included in the map
|
||||
file that specifies whether to update charges, on a per-atom basis.
|
||||
The format of this section is detailed above. Listing a pre-reaction
|
||||
atom ID with a value of 'charges' will force the update of the atom's
|
||||
charge, even if it is near a template edge. Atoms not near a template
|
||||
edge are unaffected by this setting.
|
||||
file that specifies whether or not to update charges, on a per-atom
|
||||
basis. The format of this section is detailed above. Listing a
|
||||
pre-reaction atom ID with a value of 'charges' will force the update
|
||||
of the atom's charge, even if it is near a template edge. Atoms not
|
||||
near a template edge are unaffected by this setting.
|
||||
|
||||
A few other considerations:
|
||||
|
||||
|
||||
@ -261,6 +261,10 @@ next timestep for deposition, etc. See the
|
||||
a fix in an input script that reads a restart file, so that the
|
||||
operation of the fix continues in an uninterrupted fashion.
|
||||
|
||||
NOTE: For this to work correctly, the timestep must [not] be changed
|
||||
after reading the restart with "reset_timestep"_reset_timestep.html.
|
||||
The fix will try to detect it and stop with an error.
|
||||
|
||||
None of the "fix_modify"_fix_modify.html options are relevant to this
|
||||
fix. No global or per-atom quantities are stored by this fix for
|
||||
access by various "output commands"_Howto_output.html. No parameter
|
||||
|
||||
@ -373,11 +373,16 @@ adds all inserted atoms of the specified type to the
|
||||
|
||||
This fix writes the state of the fix to "binary restart
|
||||
files"_restart.html. This includes information about the random
|
||||
number generator seed, the next timestep for MC exchanges, etc. See
|
||||
number generator seed, the next timestep for MC exchanges, the number
|
||||
of MC step attempts and successes etc. See
|
||||
the "read_restart"_read_restart.html command for info on how to
|
||||
re-specify a fix in an input script that reads a restart file, so that
|
||||
the operation of the fix continues in an uninterrupted fashion.
|
||||
|
||||
NOTE: For this to work correctly, the timestep must [not] be changed
|
||||
after reading the restart with "reset_timestep"_reset_timestep.html.
|
||||
The fix will try to detect it and stop with an error.
|
||||
|
||||
None of the "fix_modify"_fix_modify.html options are relevant to this
|
||||
fix.
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ This pair style does not support the "pair_modify"_pair_modify.html
|
||||
shift, table, and tail options.
|
||||
|
||||
This pair style does not write its information to "binary restart
|
||||
files"_restart.html, since it is stored in potential files. Thus, you
|
||||
files"_restart.html. Thus, you
|
||||
need to re-specify the pair_style and pair_coeff commands in an input
|
||||
script that reads a restart file.
|
||||
|
||||
|
||||
@ -92,10 +92,6 @@ pairs from the neighbor list. This needs to be very carefully tested,
|
||||
because it may remove pairs from the neighbor list that are still
|
||||
required.
|
||||
|
||||
Pair style {quip} cannot be used with pair style {hybrid}, only
|
||||
with {hybrid/overlay} and only the {quip} sub-style is applied to
|
||||
all atom types.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"pair_coeff"_pair_coeff.html
|
||||
|
||||
@ -865,7 +865,7 @@ The {is_active()} function allows to query for active settings which
|
||||
are grouped by categories. Currently supported categories and
|
||||
arguments are:
|
||||
|
||||
{package} (argument = {cuda} or {gpu} or {intel} or {kokkos} or {omp})
|
||||
{package} (argument = {gpu} or {intel} or {kokkos} or {omp})
|
||||
{newton} (argument = {pair} or {bond} or {any})
|
||||
{pair} (argument = {single} or {respa} or {manybody} or {tail} or {shift})
|
||||
{comm_style} (argument = {brick} or {tiled})
|
||||
@ -894,7 +894,7 @@ kspace_style pppm :pre
|
||||
|
||||
Example 2: use r-RESPA with inner/outer cutoff, if supported by pair style, otherwise fall back to using pair and reducing the outer time step
|
||||
|
||||
timestep $(2.0*(1.0+*is_active(pair,respa))
|
||||
timestep $(2.0*(1.0+2.0*is_active(pair,respa))
|
||||
if $(is_active(pair,respa)) then "run_style respa 4 3 2 2 improper 1 inner 2 5.5 7.0 outer 3 kspace 4" else "run_style respa 3 3 2 improper 1 pair 2 kspace 3" :pre
|
||||
|
||||
The {is_defined()} function allows to query categories like {compute},
|
||||
|
||||
@ -2708,6 +2708,7 @@ Thiaville
|
||||
Thibaudeau
|
||||
Thijsse
|
||||
Thirumalai
|
||||
threebody
|
||||
thrid
|
||||
ThunderX
|
||||
thylakoid
|
||||
@ -2843,6 +2844,7 @@ unoptimized
|
||||
unpadded
|
||||
unphysical
|
||||
unphysically
|
||||
unreacted
|
||||
unscaled
|
||||
unsets
|
||||
unsmoothed
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
This directory contains 4 input scripts for carrying out NEMD
|
||||
simulations of thermal gradients for a Lennard-Jones fluid and SPC/E
|
||||
water using the HEX/a (fix heat) and eHEX/a (fix ehex) algorithms.
|
||||
water using the HEX/a (fix ehex w/ hex option) and eHEX/a (fix ehex) algorithms.
|
||||
|
||||
All input scripts are part of the supplementary (open access) material
|
||||
supporting the publication of Wirnsberger et al. [J. Chem. Phys. 143,
|
||||
|
||||
@ -64,37 +64,37 @@ balance: dynamic load balancing, 2d system
|
||||
body: body particles, 2d system
|
||||
cmap: CMAP 5-body contributions to CHARMM force field
|
||||
colloid: big colloid particles in a small particle solvent, 2d system
|
||||
comb: models using the COMB potential
|
||||
comb: models using the COMB potential
|
||||
coreshell: adiabatic core/shell model
|
||||
controller: use of fix controller as a thermostat
|
||||
crack: crack propagation in a 2d solid
|
||||
crack: crack propagation in a 2d solid
|
||||
deposit: deposition of atoms and molecules onto a 3d substrate
|
||||
dipole: point dipolar particles, 2d system
|
||||
dreiding: methanol via Dreiding FF
|
||||
eim: NaCl using the EIM potential
|
||||
ellipse: ellipsoidal particles in spherical solvent, 2d system
|
||||
flow: Couette and Poiseuille flow in a 2d channel
|
||||
flow: Couette and Poiseuille flow in a 2d channel
|
||||
friction: frictional contact of spherical asperities between 2d surfaces
|
||||
gcmc: Grand Canonical Monte Carlo (GCMC) via the fix gcmc command
|
||||
granregion: use of fix wall/region/gran as boundary on granular particles
|
||||
hugoniostat: Hugoniostat shock dynamics
|
||||
hyper: global and local hyperdynamics of diffusion on Pt surface
|
||||
indent: spherical indenter into a 2d solid
|
||||
indent: spherical indenter into a 2d solid
|
||||
kim: use of potentials in Knowledge Base for Interatomic Models (KIM)
|
||||
latte: use of LATTE density-functional tight-binding quantum code
|
||||
meam: MEAM test for SiC and shear (same as shear examples)
|
||||
melt: rapid melt of 3d LJ system
|
||||
meam: MEAM test for SiC and shear (same as shear examples)
|
||||
melt: rapid melt of 3d LJ system
|
||||
message: client/server coupling of 2 codes
|
||||
micelle: self-assembly of small lipid-like molecules into 2d bilayers
|
||||
min: energy minimization of 2d LJ melt
|
||||
min: energy minimization of 2d LJ melt
|
||||
mscg: parameterize a multi-scale coarse-graining (MSCG) model
|
||||
msst: MSST shock dynamics
|
||||
msst: MSST shock dynamics
|
||||
nb3b: use of nonbonded 3-body harmonic pair style
|
||||
neb: nudged elastic band (NEB) calculation for barrier finding
|
||||
nemd: non-equilibrium MD of 2d sheared system
|
||||
neb: nudged elastic band (NEB) calculation for barrier finding
|
||||
nemd: non-equilibrium MD of 2d sheared system
|
||||
obstacle: flow around two voids in a 2d channel
|
||||
peptide: dynamics of a small solvated peptide chain (5-mer)
|
||||
peri: Peridynamic model of cylinder impacted by indenter
|
||||
peri: Peridynamic model of cylinder impacted by indenter
|
||||
pour: pouring of granular particles into a 3d box, then chute flow
|
||||
prd: parallel replica dynamics of vacancy diffusion in bulk Si
|
||||
python: use of PYTHON package to invoke Python code from input script
|
||||
@ -107,6 +107,7 @@ srd: stochastic rotation dynamics (SRD) particles as solvent
|
||||
snap: NVE dynamics for BCC tantalum crystal using SNAP potential
|
||||
streitz: Streitz-Mintmire potential for Al2O3
|
||||
tad: temperature-accelerated dynamics of vacancy diffusion in bulk Si
|
||||
threebody: regression test input for a variety of manybody potentials
|
||||
vashishta: models using the Vashishta potential
|
||||
voronoi: Voronoi tesselation via compute voronoi/atom command
|
||||
|
||||
@ -117,9 +118,7 @@ cp ../../src/lmp_mpi . # copy LAMMPS executable to this dir
|
||||
lmp_mpi -in in.indent # run the problem
|
||||
|
||||
Running the simulation produces the files {dump.indent} and
|
||||
{log.lammps}. You can visualize the dump file as follows:
|
||||
|
||||
../../tools/xmovie/xmovie -scale dump.indent
|
||||
{log.lammps}.
|
||||
|
||||
If you uncomment the dump image line(s) in the input script a series
|
||||
of JPG images will be produced by the run. These can be viewed
|
||||
|
||||
1
src/.gitignore
vendored
1
src/.gitignore
vendored
@ -5,6 +5,7 @@
|
||||
/lmp_*
|
||||
|
||||
/style_*.h
|
||||
/packages_*.h
|
||||
/lmpinstalledpkgs.h
|
||||
/lmpgitversion.h
|
||||
|
||||
|
||||
@ -200,6 +200,7 @@ void NeighBondKokkos<DeviceType>::build_topology_kk()
|
||||
{
|
||||
atomKK->sync(execution_space, X_MASK | TAG_MASK);
|
||||
int nall = atom->nlocal + atom->nghost;
|
||||
int nmax = atom->nmax;
|
||||
|
||||
nlocal = atom->nlocal;
|
||||
x = atomKK->k_x.view<DeviceType>();
|
||||
@ -215,7 +216,9 @@ void NeighBondKokkos<DeviceType>::build_topology_kk()
|
||||
|
||||
int* map_array_host = atom->get_map_array();
|
||||
int map_size = atom->get_map_size();
|
||||
k_map_array = DAT::tdual_int_1d("NeighBond:map_array",map_size);
|
||||
int map_maxarray = atom->get_map_maxarray();
|
||||
if (map_maxarray > k_map_array.extent(0))
|
||||
k_map_array = DAT::tdual_int_1d("NeighBond:map_array",map_maxarray);
|
||||
for (int i=0; i<map_size; i++)
|
||||
k_map_array.h_view[i] = map_array_host[i];
|
||||
k_map_array.template modify<LMPHostType>();
|
||||
@ -223,7 +226,8 @@ void NeighBondKokkos<DeviceType>::build_topology_kk()
|
||||
map_array = k_map_array.view<DeviceType>();
|
||||
|
||||
int* sametag_host = atomKK->sametag;
|
||||
k_sametag = DAT::tdual_int_1d("NeighBond:sametag",nall);
|
||||
if (nmax > k_sametag.extent(0))
|
||||
k_sametag = DAT::tdual_int_1d("NeighBond:sametag",nmax);
|
||||
for (int i=0; i<nall; i++)
|
||||
k_sametag.h_view[i] = sametag_host[i];
|
||||
k_sametag.template modify<LMPHostType>();
|
||||
|
||||
@ -569,13 +569,13 @@ void PairEAMAlloyKokkos<DeviceType>::operator()(TagPairEAMAlloyKernelA<NEIGHFLAG
|
||||
d_rhor_spline(d_type2rhor_ji,m,5))*p + d_rhor_spline(d_type2rhor_ji,m,6);
|
||||
if (NEWTON_PAIR || j < nlocal) {
|
||||
const int d_type2rhor_ij = d_type2rhor(itype,jtype);
|
||||
rho[j] += ((d_rhor_spline(d_type2rhor_ij,m,3)*p + d_rhor_spline(d_type2rhor_ij,m,4))*p +
|
||||
a_rho[j] += ((d_rhor_spline(d_type2rhor_ij,m,3)*p + d_rhor_spline(d_type2rhor_ij,m,4))*p +
|
||||
d_rhor_spline(d_type2rhor_ij,m,5))*p + d_rhor_spline(d_type2rhor_ij,m,6);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
rho[i] += rhotmp;
|
||||
a_rho[i] += rhotmp;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -569,13 +569,13 @@ void PairEAMFSKokkos<DeviceType>::operator()(TagPairEAMFSKernelA<NEIGHFLAG,NEWTO
|
||||
d_rhor_spline(d_type2rhor_ji,m,5))*p + d_rhor_spline(d_type2rhor_ji,m,6);
|
||||
if (NEWTON_PAIR || j < nlocal) {
|
||||
const int d_type2rhor_ij = d_type2rhor(itype,jtype);
|
||||
rho[j] += ((d_rhor_spline(d_type2rhor_ij,m,3)*p + d_rhor_spline(d_type2rhor_ij,m,4))*p +
|
||||
a_rho[j] += ((d_rhor_spline(d_type2rhor_ij,m,3)*p + d_rhor_spline(d_type2rhor_ij,m,4))*p +
|
||||
d_rhor_spline(d_type2rhor_ij,m,5))*p + d_rhor_spline(d_type2rhor_ij,m,6);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
rho[i] += rhotmp;
|
||||
a_rho[i] += rhotmp;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -771,10 +771,13 @@ double FixAtomSwap::memory_usage()
|
||||
void FixAtomSwap::write_restart(FILE *fp)
|
||||
{
|
||||
int n = 0;
|
||||
double list[4];
|
||||
double list[6];
|
||||
list[n++] = random_equal->state();
|
||||
list[n++] = random_unequal->state();
|
||||
list[n++] = next_reneighbor;
|
||||
list[n++] = ubuf(next_reneighbor).d;
|
||||
list[n++] = nswap_attempts;
|
||||
list[n++] = nswap_successes;
|
||||
list[n++] = ubuf(update->ntimestep).d;
|
||||
|
||||
if (comm->me == 0) {
|
||||
int size = n * sizeof(double);
|
||||
@ -798,5 +801,12 @@ void FixAtomSwap::restart(char *buf)
|
||||
seed = static_cast<int> (list[n++]);
|
||||
random_unequal->reset(seed);
|
||||
|
||||
next_reneighbor = static_cast<int> (list[n++]);
|
||||
next_reneighbor = (bigint) ubuf(list[n++]).i;
|
||||
|
||||
nswap_attempts = static_cast<int>(list[n++]);
|
||||
nswap_successes = static_cast<int>(list[n++]);
|
||||
|
||||
bigint ntimestep_restart = (bigint) ubuf(list[n++]).i;
|
||||
if (ntimestep_restart != update->ntimestep)
|
||||
error->all(FLERR,"Must not reset timestep when restarting fix atom/swap");
|
||||
}
|
||||
|
||||
@ -2531,10 +2531,19 @@ double FixGCMC::memory_usage()
|
||||
void FixGCMC::write_restart(FILE *fp)
|
||||
{
|
||||
int n = 0;
|
||||
double list[4];
|
||||
double list[12];
|
||||
list[n++] = random_equal->state();
|
||||
list[n++] = random_unequal->state();
|
||||
list[n++] = next_reneighbor;
|
||||
list[n++] = ubuf(next_reneighbor).d;
|
||||
list[n++] = ntranslation_attempts;
|
||||
list[n++] = ntranslation_successes;
|
||||
list[n++] = nrotation_attempts;
|
||||
list[n++] = nrotation_successes;
|
||||
list[n++] = ndeletion_attempts;
|
||||
list[n++] = ndeletion_successes;
|
||||
list[n++] = ninsertion_attempts;
|
||||
list[n++] = ninsertion_successes;
|
||||
list[n++] = ubuf(update->ntimestep).d;
|
||||
|
||||
if (comm->me == 0) {
|
||||
int size = n * sizeof(double);
|
||||
@ -2558,7 +2567,20 @@ void FixGCMC::restart(char *buf)
|
||||
seed = static_cast<int> (list[n++]);
|
||||
random_unequal->reset(seed);
|
||||
|
||||
next_reneighbor = static_cast<int> (list[n++]);
|
||||
next_reneighbor = (bigint) ubuf(list[n++]).i;
|
||||
|
||||
ntranslation_attempts = list[n++];
|
||||
ntranslation_successes = list[n++];
|
||||
nrotation_attempts = list[n++];
|
||||
nrotation_successes = list[n++];
|
||||
ndeletion_attempts = list[n++];
|
||||
ndeletion_successes = list[n++];
|
||||
ninsertion_attempts = list[n++];
|
||||
ninsertion_successes = list[n++];
|
||||
|
||||
bigint ntimestep_restart = (bigint) ubuf(list[n++]).i;
|
||||
if (ntimestep_restart != update->ntimestep)
|
||||
error->all(FLERR,"Must not reset timestep when restarting fix gcmc");
|
||||
}
|
||||
|
||||
void FixGCMC::grow_molecule_arrays(int nmolatoms) {
|
||||
|
||||
@ -798,11 +798,12 @@ void FixDeposit::options(int narg, char **arg)
|
||||
void FixDeposit::write_restart(FILE *fp)
|
||||
{
|
||||
int n = 0;
|
||||
double list[4];
|
||||
double list[5];
|
||||
list[n++] = random->state();
|
||||
list[n++] = ninserted;
|
||||
list[n++] = nfirst;
|
||||
list[n++] = next_reneighbor;
|
||||
list[n++] = ubuf(next_reneighbor).d;
|
||||
list[n++] = ubuf(update->ntimestep).d;
|
||||
|
||||
if (comm->me == 0) {
|
||||
int size = n * sizeof(double);
|
||||
@ -823,7 +824,11 @@ void FixDeposit::restart(char *buf)
|
||||
seed = static_cast<int> (list[n++]);
|
||||
ninserted = static_cast<int> (list[n++]);
|
||||
nfirst = static_cast<int> (list[n++]);
|
||||
next_reneighbor = static_cast<int> (list[n++]);
|
||||
next_reneighbor = (bigint) ubuf(list[n++]).i;
|
||||
|
||||
bigint ntimestep_restart = (bigint) ubuf(list[n++]).i;
|
||||
if (ntimestep_restart != update->ntimestep)
|
||||
error->all(FLERR,"Must not reset timestep when restarting this fix");
|
||||
|
||||
random->reset(seed);
|
||||
}
|
||||
|
||||
72
src/Make.sh
72
src/Make.sh
@ -55,6 +55,34 @@ style () {
|
||||
fi
|
||||
}
|
||||
|
||||
packages () {
|
||||
list=`grep -sl $1 */$2*.h`
|
||||
if (test -e packages_$3.tmp) then
|
||||
rm -f packages_$3.tmp
|
||||
fi
|
||||
for file in $list; do
|
||||
dir="\"`dirname $file`\""
|
||||
echo "#undef PACKAGE" >> packages_$3.tmp
|
||||
echo "#define PACKAGE $dir" >> packages_$3.tmp
|
||||
qfile="\"$file\""
|
||||
echo "#include $qfile" >> packages_$3.tmp
|
||||
done
|
||||
if (test ! -e packages_$3.tmp) then
|
||||
if (test ! -e packages_$3.h) then
|
||||
touch packages_$3.h
|
||||
elif (test "`cat packages_$3.h`" != "") then
|
||||
rm -f packages_$3.h
|
||||
touch packages_$3.h
|
||||
fi
|
||||
elif (test ! -e packages_$3.h) then
|
||||
mv packages_$3.tmp packages_$3.h
|
||||
elif (test "`diff --brief packages_$3.h packages_$3.tmp`" != "") then
|
||||
mv packages_$3.tmp packages_$3.h
|
||||
else
|
||||
rm -f packages_$3.tmp
|
||||
fi
|
||||
}
|
||||
|
||||
# create individual style files
|
||||
# called by "make machine"
|
||||
# col 1 = string to search for
|
||||
@ -63,28 +91,30 @@ style () {
|
||||
# col 4 = file that includes the style file
|
||||
# col 5 = optional 2nd file that includes the style file
|
||||
|
||||
if (test $1 = "style") then
|
||||
cmd=$1
|
||||
|
||||
style ANGLE_CLASS angle_ angle force
|
||||
style ATOM_CLASS atom_vec_ atom atom atom_vec_hybrid
|
||||
style BODY_CLASS body_ body atom_vec_body
|
||||
style BOND_CLASS bond_ bond force
|
||||
style COMMAND_CLASS "" command input
|
||||
style COMPUTE_CLASS compute_ compute modify
|
||||
style DIHEDRAL_CLASS dihedral_ dihedral force
|
||||
style DUMP_CLASS dump_ dump output write_dump
|
||||
style FIX_CLASS fix_ fix modify
|
||||
style IMPROPER_CLASS improper_ improper force
|
||||
style INTEGRATE_CLASS "" integrate update
|
||||
style KSPACE_CLASS "" kspace force
|
||||
style MINIMIZE_CLASS min_ minimize update
|
||||
style NBIN_CLASS nbin_ nbin neighbor
|
||||
style NPAIR_CLASS npair_ npair neighbor
|
||||
style NSTENCIL_CLASS nstencil_ nstencil neighbor
|
||||
style NTOPO_CLASS ntopo_ ntopo neighbor
|
||||
style PAIR_CLASS pair_ pair force
|
||||
style READER_CLASS reader_ reader read_dump
|
||||
style REGION_CLASS region_ region domain
|
||||
if (test $cmd = "style") || (test $cmd = "packages") then
|
||||
|
||||
$cmd ANGLE_CLASS angle_ angle force
|
||||
$cmd ATOM_CLASS atom_vec_ atom atom atom_vec_hybrid
|
||||
$cmd BODY_CLASS body_ body atom_vec_body
|
||||
$cmd BOND_CLASS bond_ bond force
|
||||
$cmd COMMAND_CLASS "" command input
|
||||
$cmd COMPUTE_CLASS compute_ compute modify
|
||||
$cmd DIHEDRAL_CLASS dihedral_ dihedral force
|
||||
$cmd DUMP_CLASS dump_ dump output write_dump
|
||||
$cmd FIX_CLASS fix_ fix modify
|
||||
$cmd IMPROPER_CLASS improper_ improper force
|
||||
$cmd INTEGRATE_CLASS "" integrate update
|
||||
$cmd KSPACE_CLASS "" kspace force
|
||||
$cmd MINIMIZE_CLASS min_ minimize update
|
||||
$cmd NBIN_CLASS nbin_ nbin neighbor
|
||||
$cmd NPAIR_CLASS npair_ npair neighbor
|
||||
$cmd NSTENCIL_CLASS nstencil_ nstencil neighbor
|
||||
$cmd NTOPO_CLASS ntopo_ ntopo neighbor
|
||||
$cmd PAIR_CLASS pair_ pair force
|
||||
$cmd READER_CLASS reader_ reader read_dump
|
||||
$cmd REGION_CLASS region_ region domain
|
||||
|
||||
# edit Makefile.lib, for creating non-shared lib
|
||||
# called by "make makelib"
|
||||
|
||||
@ -205,6 +205,7 @@ gitversion:
|
||||
-f MAKE/MACHINES/Makefile.$@ -o -f MAKE/MINE/Makefile.$@
|
||||
@if [ ! -d $(objdir) ]; then mkdir $(objdir); fi
|
||||
@$(SHELL) Make.sh style
|
||||
@$(SHELL) Make.sh packages
|
||||
@$(MAKE) $(MFLAGS) lmpinstalledpkgs.h gitversion
|
||||
@echo 'Compiling LAMMPS for machine $@'
|
||||
@if [ -f MAKE/MACHINES/Makefile.$@ ]; \
|
||||
|
||||
@ -22,6 +22,30 @@ style_nbin.h
|
||||
style_npair.h
|
||||
style_nstencil.h
|
||||
style_ntopo.h
|
||||
# auto-generated packages files
|
||||
packages_angle.h
|
||||
packages_atom.h
|
||||
packages_body.h
|
||||
packages_bond.h
|
||||
packages_command.h
|
||||
packages_compute.h
|
||||
packages_dihedral.h
|
||||
packages_dump.h
|
||||
packages_fix.h
|
||||
packages_improper.h
|
||||
packages_integrate.h
|
||||
packages_kspace.h
|
||||
packages_minimize.h
|
||||
packages_pair.h
|
||||
packages_reader.h
|
||||
packages_region.h
|
||||
packages_neigh_bin.h
|
||||
packages_neigh_pair.h
|
||||
packages_neigh_stencil.h
|
||||
packages_nbin.h
|
||||
packages_npair.h
|
||||
packages_nstencil.h
|
||||
packages_ntopo.h
|
||||
# other auto-generated files
|
||||
lmpinstalledpkgs.h
|
||||
lmpgitversion.h
|
||||
|
||||
@ -148,12 +148,20 @@ int MPI_Finalize()
|
||||
|
||||
double MPI_Wtime()
|
||||
{
|
||||
#if defined(_MSC_VER)
|
||||
double t;
|
||||
|
||||
t = GetTickCount();
|
||||
t /= 1000.0;
|
||||
return t;
|
||||
#else
|
||||
double time;
|
||||
struct timeval tv;
|
||||
|
||||
gettimeofday(&tv,NULL);
|
||||
time = 1.0 * tv.tv_sec + 1.0e-6 * tv.tv_usec;
|
||||
return time;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -308,8 +308,7 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) :
|
||||
onemol->check_attributes(0);
|
||||
twomol->check_attributes(0);
|
||||
if (onemol->natoms != twomol->natoms)
|
||||
error->all(FLERR,"Post-reacted template must contain the same "
|
||||
"number of atoms as the pre-reacted template");
|
||||
error->all(FLERR,"Bond/react: Reaction templates must contain the same number of atoms");
|
||||
get_molxspecials();
|
||||
read(i);
|
||||
fclose(fp);
|
||||
@ -324,7 +323,7 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) :
|
||||
delete [] files;
|
||||
|
||||
if (atom->molecular != 1)
|
||||
error->all(FLERR,"Cannot use fix bond/react with non-molecular systems");
|
||||
error->all(FLERR,"Bond/react: Cannot use fix bond/react with non-molecular systems");
|
||||
|
||||
// check if bonding atoms are 1-2, 1-3, or 1-4 bonded neighbors
|
||||
// if so, we don't need non-bonded neighbor list
|
||||
@ -472,17 +471,19 @@ FixBondReact::~FixBondReact()
|
||||
delete [] guess_branch;
|
||||
delete [] pioneer_count;
|
||||
|
||||
char **newarg;
|
||||
newarg = new char*[2];
|
||||
newarg[0] = master_group;
|
||||
newarg[1] = (char *) "delete";
|
||||
group->assign(2,newarg);
|
||||
if (stabilization_flag == 1) {
|
||||
newarg[0] = exclude_group;
|
||||
if (group) {
|
||||
char **newarg;
|
||||
newarg = new char*[2];
|
||||
newarg[0] = master_group;
|
||||
newarg[1] = (char *) "delete";
|
||||
group->assign(2,newarg);
|
||||
delete [] exclude_group;
|
||||
if (stabilization_flag == 1) {
|
||||
newarg[0] = exclude_group;
|
||||
group->assign(2,newarg);
|
||||
delete [] exclude_group;
|
||||
}
|
||||
delete [] newarg;
|
||||
}
|
||||
delete [] newarg;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -663,7 +664,7 @@ void FixBondReact::init()
|
||||
// check cutoff for iatomtype,jatomtype
|
||||
for (int i = 0; i < nreacts; i++) {
|
||||
if (force->pair == NULL || cutsq[i][1] > force->pair->cutsq[iatomtype[i]][jatomtype[i]])
|
||||
error->all(FLERR,"Fix bond/react cutoff is longer than pairwise cutoff");
|
||||
error->all(FLERR,"Bond/react: Fix bond/react cutoff is longer than pairwise cutoff");
|
||||
}
|
||||
|
||||
// need a half neighbor list, built every Nevery steps
|
||||
@ -1172,7 +1173,7 @@ void FixBondReact::superimpose_algorithm()
|
||||
// let's go ahead and catch the simplest of hangs
|
||||
//if (hang_catch > onemol->natoms*4)
|
||||
if (hang_catch > atom->nlocal*30) {
|
||||
error->one(FLERR,"Excessive iteration of superimpose algorithm");
|
||||
error->one(FLERR,"Bond/react: Excessive iteration of superimpose algorithm");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1285,7 +1286,7 @@ void FixBondReact::make_a_guess()
|
||||
|
||||
for (int i = 0; i < nxspecial[atom->map(glove[pion][1])][0]; i++) {
|
||||
if (atom->map(xspecial[atom->map(glove[pion][1])][i]) < 0) {
|
||||
error->all(FLERR,"Fix bond/react needs ghost atoms from further away1"); // parallel issues.
|
||||
error->all(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away1"); // parallel issues.
|
||||
}
|
||||
if (i_limit_tags[(int)atom->map(xspecial[atom->map(glove[pion][1])][i])] != 0) {
|
||||
status = GUESSFAIL;
|
||||
@ -1396,7 +1397,7 @@ void FixBondReact::check_a_neighbor()
|
||||
|
||||
//another check for ghost atoms. perhaps remove the one in make_a_guess
|
||||
if (atom->map(glove[(int)onemol_xspecial[pion][neigh]-1][1]) < 0) {
|
||||
error->all(FLERR,"Fix bond/react needs ghost atoms from further away2");
|
||||
error->all(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away2");
|
||||
}
|
||||
|
||||
for (int j = 0; j < onemol_nxspecial[onemol_xspecial[pion][neigh]-1][0]; j++) {
|
||||
@ -1448,7 +1449,7 @@ void FixBondReact::check_a_neighbor()
|
||||
|
||||
//another check for ghost atoms. perhaps remove the one in make_a_guess
|
||||
if (atom->map(glove[(int)onemol_xspecial[pion][neigh]-1][1]) < 0) {
|
||||
error->all(FLERR,"Fix bond/react needs ghost atoms from further away3");
|
||||
error->all(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away3");
|
||||
}
|
||||
|
||||
for (int ii = 0; ii < onemol_nxspecial[onemol_xspecial[pion][neigh]-1][0]; ii++) {
|
||||
@ -1490,7 +1491,7 @@ void FixBondReact::crosscheck_the_neighbor()
|
||||
glove[onemol_xspecial[pion][trace]-1][0] == 0) {
|
||||
|
||||
if (avail_guesses == MAXGUESS) {
|
||||
error->warning(FLERR,"Fix bond/react failed because MAXGUESS set too small. ask developer for info");
|
||||
error->warning(FLERR,"Bond/react: Fix bond/react failed because MAXGUESS set too small. ask developer for info");
|
||||
status = GUESSFAIL;
|
||||
return;
|
||||
}
|
||||
@ -1559,7 +1560,7 @@ void FixBondReact::inner_crosscheck_loop()
|
||||
|
||||
//another check for ghost atoms. perhaps remove the one in make_a_guess
|
||||
if (atom->map(glove[(int)onemol_xspecial[pion][neigh]-1][1]) < 0) {
|
||||
error->all(FLERR,"Fix bond/react needs ghost atoms from further away4");
|
||||
error->all(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away4");
|
||||
}
|
||||
|
||||
if (guess_branch[avail_guesses-1] == 0) avail_guesses--;
|
||||
@ -1720,7 +1721,7 @@ void FixBondReact::find_landlocked_atoms(int myrxn)
|
||||
// if atoms change types, but aren't landlocked, that's bad
|
||||
for (int i = 0; i < twomol->natoms; i++) {
|
||||
if (twomol->type[i] != onemol->type[equivalences[i][1][myrxn]-1] && landlocked_atoms[i][myrxn] == 0)
|
||||
error->one(FLERR,"Atom affected by reaction too close to template edge");
|
||||
error->one(FLERR,"Bond/react: Atom affected by reaction too close to template edge");
|
||||
}
|
||||
|
||||
// additionally, if a bond changes type, but neither involved atom is landlocked, bad
|
||||
@ -1736,7 +1737,7 @@ void FixBondReact::find_landlocked_atoms(int myrxn)
|
||||
onemol_batom = onemol->bond_atom[onemol_atomi-1][m];
|
||||
if (onemol_batom == equivalences[twomol_atomj-1][1][myrxn]) {
|
||||
if (twomol->bond_type[i][j] != onemol->bond_type[onemol_atomi-1][m]) {
|
||||
error->one(FLERR,"Bond type affected by reaction too close to template edge");
|
||||
error->one(FLERR,"Bond/react: Bond type affected by reaction too close to template edge");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1746,7 +1747,7 @@ void FixBondReact::find_landlocked_atoms(int myrxn)
|
||||
onemol_batom = onemol->bond_atom[onemol_atomj-1][m];
|
||||
if (onemol_batom == equivalences[i][1][myrxn]) {
|
||||
if (twomol->bond_type[i][j] != onemol->bond_type[onemol_atomj-1][m]) {
|
||||
error->one(FLERR,"Bond type affected by reaction too close to template edge");
|
||||
error->one(FLERR,"Bond/react: Bond type affected by reaction too close to template edge");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1762,7 +1763,7 @@ void FixBondReact::find_landlocked_atoms(int myrxn)
|
||||
int ii = reverse_equiv[i][1][myrxn] - 1;
|
||||
for (int j = 0; j < twomol_nxspecial[ii][0]; j++) {
|
||||
if (delete_atoms[equivalences[twomol_xspecial[ii][j]-1][1][myrxn]-1][myrxn] == 0) {
|
||||
error->one(FLERR,"A deleted atom cannot remain bonded to an atom that is not deleted");
|
||||
error->one(FLERR,"Bond/react: A deleted atom cannot remain bonded to an atom that is not deleted");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1773,7 +1774,7 @@ void FixBondReact::find_landlocked_atoms(int myrxn)
|
||||
for (int i = 0; i < twomol->natoms; i++) {
|
||||
if (twomol_nxspecial[i][0] != onemol_nxspecial[equivalences[i][1][myrxn]-1][0] && landlocked_atoms[i][myrxn] == 0) {
|
||||
char str[128];
|
||||
sprintf(str,"An atom in 'react #%d' changes bond connectivity but not atom type",myrxn+1);
|
||||
sprintf(str,"Bond/react: An atom in 'react #%d' changes bond connectivity but not atom type",myrxn+1);
|
||||
error->warning(FLERR,str);
|
||||
break;
|
||||
}
|
||||
@ -2261,7 +2262,7 @@ void FixBondReact::update_everything()
|
||||
if (landlocked_atoms[j][rxnID] == 1) {
|
||||
for (int k = 0; k < nspecial[atom->map(update_mega_glove[jj+1][i])][2]; k++) {
|
||||
if (atom->map(special[atom->map(update_mega_glove[jj+1][i])][k]) < 0) {
|
||||
error->all(FLERR,"Fix bond/react needs ghost atoms from further away - most likely too many processors");
|
||||
error->all(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away - most likely too many processors");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2322,6 +2323,8 @@ void FixBondReact::update_everything()
|
||||
nspecial[atom->map(update_mega_glove[jj+1][i])][1]++;
|
||||
nspecial[atom->map(update_mega_glove[jj+1][i])][2]++;
|
||||
}
|
||||
if (nspecial[atom->map(update_mega_glove[jj+1][i])][2] > atom->maxspecial)
|
||||
error->one(FLERR,"Bond/react special bond generation overflow");
|
||||
for (int n = nspecial[atom->map(update_mega_glove[jj+1][i])][2]-1; n > insert_num; n--) {
|
||||
special[atom->map(update_mega_glove[jj+1][i])][n] = special[atom->map(update_mega_glove[jj+1][i])][n-1];
|
||||
}
|
||||
@ -2383,6 +2386,8 @@ void FixBondReact::update_everything()
|
||||
bond_type[atom->map(update_mega_glove[jj+1][i])][insert_num] = twomol->bond_type[j][p];
|
||||
bond_atom[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[equivalences[twomol->bond_atom[j][p]-1][1][rxnID]][i];
|
||||
num_bond[atom->map(update_mega_glove[jj+1][i])]++;
|
||||
if (num_bond[atom->map(update_mega_glove[jj+1][i])] > atom->bond_per_atom)
|
||||
error->one(FLERR,"Bond/react topology/atom exceed system topology/atom");
|
||||
delta_bonds++;
|
||||
}
|
||||
}
|
||||
@ -2457,6 +2462,8 @@ void FixBondReact::update_everything()
|
||||
angle_atom2[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[equivalences[twomol->angle_atom2[j][p]-1][1][rxnID]][i];
|
||||
angle_atom3[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[equivalences[twomol->angle_atom3[j][p]-1][1][rxnID]][i];
|
||||
num_angle[atom->map(update_mega_glove[jj+1][i])]++;
|
||||
if (num_angle[atom->map(update_mega_glove[jj+1][i])] > atom->angle_per_atom)
|
||||
error->one(FLERR,"Bond/react topology/atom exceed system topology/atom");
|
||||
delta_angle++;
|
||||
}
|
||||
}
|
||||
@ -2538,6 +2545,8 @@ void FixBondReact::update_everything()
|
||||
dihedral_atom3[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[equivalences[twomol->dihedral_atom3[j][p]-1][1][rxnID]][i];
|
||||
dihedral_atom4[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[equivalences[twomol->dihedral_atom4[j][p]-1][1][rxnID]][i];
|
||||
num_dihedral[atom->map(update_mega_glove[jj+1][i])]++;
|
||||
if (num_dihedral[atom->map(update_mega_glove[jj+1][i])] > atom->dihedral_per_atom)
|
||||
error->one(FLERR,"Bond/react topology/atom exceed system topology/atom");
|
||||
delta_dihed++;
|
||||
}
|
||||
}
|
||||
@ -2619,6 +2628,8 @@ void FixBondReact::update_everything()
|
||||
improper_atom3[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[equivalences[twomol->improper_atom3[j][p]-1][1][rxnID]][i];
|
||||
improper_atom4[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[equivalences[twomol->improper_atom4[j][p]-1][1][rxnID]][i];
|
||||
num_improper[atom->map(update_mega_glove[jj+1][i])]++;
|
||||
if (num_improper[atom->map(update_mega_glove[jj+1][i])] > atom->improper_per_atom)
|
||||
error->one(FLERR,"Bond/react topology/atom exceed system topology/atom");
|
||||
delta_imprp++;
|
||||
}
|
||||
}
|
||||
@ -2716,7 +2727,7 @@ void FixBondReact::read(int myrxn)
|
||||
|
||||
// skip 1st line of file
|
||||
eof = fgets(line,MAXLINE,fp);
|
||||
if (eof == NULL) error->one(FLERR,"Unexpected end of superimpose file");
|
||||
if (eof == NULL) error->one(FLERR,"Bond/react: Unexpected end of superimpose file");
|
||||
|
||||
// read header lines
|
||||
// skip blank lines or lines that start with "#"
|
||||
@ -2770,7 +2781,7 @@ void FixBondReact::read(int myrxn)
|
||||
DeleteAtoms(line, myrxn);
|
||||
} else if (strcmp(keyword,"Constraints") == 0) {
|
||||
Constraints(line, myrxn);
|
||||
} else error->one(FLERR,"Unknown section in superimpose file");
|
||||
} else error->one(FLERR,"Bond/react: Unknown section in map file");
|
||||
|
||||
parse_keyword(1,line,keyword);
|
||||
|
||||
@ -2778,13 +2789,13 @@ void FixBondReact::read(int myrxn)
|
||||
|
||||
// error check
|
||||
if (bondflag == 0 || equivflag == 0)
|
||||
error->all(FLERR,"Superimpose file missing BondingIDs or Equivalences section\n");
|
||||
error->all(FLERR,"Bond/react: Map file missing BondingIDs or Equivalences section\n");
|
||||
|
||||
if (update_edges_flag[myrxn] == 2 && customedgesflag == 0)
|
||||
error->all(FLERR,"Map file must have a Custom Edges section when using 'update_edges custom'\n");
|
||||
error->all(FLERR,"Bond/react: Map file must have a Custom Edges section when using 'update_edges custom'\n");
|
||||
|
||||
if (update_edges_flag[myrxn] != 2 && customedgesflag == 1)
|
||||
error->all(FLERR,"Specify 'update_edges custom' to include Custom Edges section in map file\n");
|
||||
error->all(FLERR,"Bond/react: Specify 'update_edges custom' to include Custom Edges section in map file\n");
|
||||
}
|
||||
|
||||
void FixBondReact::EdgeIDs(char *line, int myrxn)
|
||||
@ -2830,7 +2841,7 @@ void FixBondReact::CustomEdges(char *line, int myrxn)
|
||||
else if (strcmp(edgemode,"charges") == 0)
|
||||
custom_edges[tmp-1][myrxn] = 1;
|
||||
else
|
||||
error->one(FLERR,"Illegal value in 'Custom Edges' section of map file");
|
||||
error->one(FLERR,"Bond/react: Illegal value in 'Custom Edges' section of map file");
|
||||
}
|
||||
delete [] edgemode;
|
||||
}
|
||||
@ -2861,7 +2872,7 @@ void FixBondReact::Constraints(char *line, int myrxn)
|
||||
constraints[myrxn][3] = tmp[2]*tmp[2]; // using square of distance
|
||||
constraints[myrxn][4] = tmp[3]*tmp[3];
|
||||
} else
|
||||
error->one(FLERR,"Illegal constraint type in 'Constraints' section of map file");
|
||||
error->one(FLERR,"Bond/react: Illegal constraint type in 'Constraints' section of map file");
|
||||
}
|
||||
delete [] constraint_type;
|
||||
}
|
||||
@ -2871,7 +2882,7 @@ void FixBondReact::open(char *file)
|
||||
fp = fopen(file,"r");
|
||||
if (fp == NULL) {
|
||||
char str[128];
|
||||
snprintf(str,128,"Cannot open superimpose file %s",file);
|
||||
snprintf(str,128,"Bond/react: Cannot open map file %s",file);
|
||||
error->one(FLERR,str);
|
||||
}
|
||||
}
|
||||
@ -2884,7 +2895,7 @@ void FixBondReact::readline(char *line)
|
||||
else n = strlen(line) + 1;
|
||||
}
|
||||
MPI_Bcast(&n,1,MPI_INT,0,world);
|
||||
if (n == 0) error->all(FLERR,"Unexpected end of superimpose file");
|
||||
if (n == 0) error->all(FLERR,"Bond/react: Unexpected end of map file");
|
||||
MPI_Bcast(line,n,MPI_CHAR,0,world);
|
||||
}
|
||||
|
||||
|
||||
@ -189,47 +189,65 @@ Self-explanatory. Check the input script syntax and compare to the
|
||||
documentation for the command. You can use -echo screen as a
|
||||
command-line option when running LAMMPS to see the offending line.
|
||||
|
||||
E: Invalid exclude group name
|
||||
E: Bond/react: Cannot use fix bond/react with non-molecular systems
|
||||
|
||||
Exclude group name should not previously be defined.
|
||||
|
||||
E: Cannot use fix bond/react with non-molecular systems
|
||||
|
||||
Only systems with bonds that can be changed can be used. Atom_style
|
||||
Only systems with bonds that can be changed can be used. Atom_style
|
||||
template does not qualify.
|
||||
|
||||
E: Fix bond/react cutoff is longer than pairwise cutoff
|
||||
E: Bond/react: Rmax cutoff is longer than pairwise cutoff
|
||||
|
||||
This is not allowed because bond creation is done using the
|
||||
pairwise neighbor list.
|
||||
This is not allowed because bond creation is done using the pairwise
|
||||
neighbor list.
|
||||
|
||||
E: Molecule template ID for fix bond/react does not exist
|
||||
E: Bond/react: Molecule template ID for fix bond/react does not exist
|
||||
|
||||
A valid molecule template must have been created with the molecule command.
|
||||
A valid molecule template must have been created with the molecule
|
||||
command.
|
||||
|
||||
E: Superimpose file errors:
|
||||
E: Bond/react: Reaction templates must contain the same number of atoms
|
||||
|
||||
Please ensure superimpose file is properly formatted.
|
||||
There should be a one-to-one correspondence between atoms in the
|
||||
pre-reacted and post-reacted templates, as specified by the map file.
|
||||
|
||||
E: Atom affected by reaction too close to template edge
|
||||
E: Bond/react: Unknown section in map file
|
||||
|
||||
Please ensure reaction map files are properly formatted.
|
||||
|
||||
E: Bond/react: Atom affected by reaction too close to template edge
|
||||
|
||||
This means an atom which changes type during the reaction is too close
|
||||
to an 'edge' atom defined in the superimpose file. This could cause incorrect
|
||||
assignment of bonds, angle, etc. Generally, this means you must include
|
||||
more atoms in your templates, such that there are at least two atoms
|
||||
between each atom involved in the reaction and an edge atom.
|
||||
to an 'edge' atom defined in the superimpose file. This could cause
|
||||
incorrect assignment of bonds, angle, etc. Generally, this means you
|
||||
must include more atoms in your templates, such that there are at
|
||||
least two atoms between each atom involved in the reaction and an edge
|
||||
atom.
|
||||
|
||||
E: Fix bond/react needs ghost atoms from farther away
|
||||
E: Bond/react: Fix bond/react needs ghost atoms from farther away
|
||||
|
||||
This is because a processor needs to superimpose the entire unreacted
|
||||
molecule template onto simulation atoms it can 'see.' The comm_modify cutoff
|
||||
command can be used to extend the communication range.
|
||||
molecule template onto simulation atoms it knows about. The
|
||||
comm_modify cutoff command can be used to extend the communication
|
||||
range.
|
||||
|
||||
E: Excessive iteration of superimpose algorithm
|
||||
E: Bond/react: A deleted atom cannot remain bonded to an atom that is not deleted
|
||||
|
||||
You may have discovered a bug! But first, please double check that your
|
||||
molecule template atom types, bond types, etc. are consistent with your simulation,
|
||||
and that all atoms affected by a reaction are sufficently separated from edge atoms.
|
||||
If this issue persists, please contact the developer.
|
||||
Self-explanatory.
|
||||
|
||||
W: Bond/react: An atom in 'react #%d' changes bond connectivity but not atom type
|
||||
|
||||
You may want to double-check that all atom types are properly assigned
|
||||
in the post-reaction template.
|
||||
|
||||
E: Bond/react special bond generation overflow
|
||||
|
||||
The number of special bonds per-atom created by a reaction exceeds the
|
||||
system setting. See the read_data or create_box command for how to
|
||||
specify this value.
|
||||
|
||||
E: Bond/react topology/atom exceed system topology/atom
|
||||
|
||||
The number of bonds, angles etc per-atom created by a reaction exceeds
|
||||
the system setting. See the read_data or create_box command for how to
|
||||
specify this value.
|
||||
|
||||
*/
|
||||
|
||||
@ -41,8 +41,6 @@ void PairREBOOMP::settings(int narg, char ** /* arg */)
|
||||
void PairREBOOMP::spline_init() {
|
||||
PairAIREBO::spline_init();
|
||||
|
||||
int i,j,k;
|
||||
|
||||
PCCf[0][2] = 0.007860700254745;
|
||||
PCCf[0][3] = 0.016125364564267;
|
||||
PCCf[1][1] = 0.003026697473481;
|
||||
|
||||
@ -39,11 +39,16 @@ using namespace LAMMPS_NS;
|
||||
|
||||
PairQUIP::PairQUIP(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
single_enable = 0;
|
||||
restartinfo = 0;
|
||||
one_coeff = 1;
|
||||
no_virial_fdotr_compute = 1;
|
||||
manybody_flag = 1;
|
||||
single_enable = 0;
|
||||
restartinfo = 0;
|
||||
one_coeff = 1;
|
||||
no_virial_fdotr_compute = 1;
|
||||
manybody_flag = 1;
|
||||
|
||||
map = NULL;
|
||||
quip_potential = NULL;
|
||||
quip_file = NULL;
|
||||
quip_string = NULL;
|
||||
}
|
||||
|
||||
PairQUIP::~PairQUIP()
|
||||
@ -52,8 +57,10 @@ PairQUIP::~PairQUIP()
|
||||
memory->destroy(setflag);
|
||||
memory->destroy(cutsq);
|
||||
delete [] map;
|
||||
delete [] quip_potential;
|
||||
}
|
||||
delete [] quip_potential;
|
||||
delete [] quip_file;
|
||||
delete [] quip_string;
|
||||
}
|
||||
|
||||
void PairQUIP::compute(int eflag, int vflag)
|
||||
@ -100,14 +107,14 @@ void PairQUIP::compute(int eflag, int vflag)
|
||||
jnum = numneigh[i];
|
||||
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
quip_neigh[iquip] = (jlist[jj] & NEIGHMASK) + 1;
|
||||
iquip++;
|
||||
quip_neigh[iquip] = (jlist[jj] & NEIGHMASK) + 1;
|
||||
iquip++;
|
||||
}
|
||||
}
|
||||
|
||||
atomic_numbers = new int[ntotal];
|
||||
for (ii = 0; ii < ntotal; ii++)
|
||||
atomic_numbers[ii] = map[type[ii]-1];
|
||||
atomic_numbers[ii] = map[type[ii]];
|
||||
|
||||
quip_local_e = new double [ntotal];
|
||||
quip_force = new double [ntotal*3];
|
||||
@ -211,17 +218,20 @@ void PairQUIP::compute(int eflag, int vflag)
|
||||
global settings
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairQUIP::settings(int narg, char **/*arg*/)
|
||||
void PairQUIP::settings(int narg, char ** /* arg */)
|
||||
{
|
||||
if (narg != 0) error->all(FLERR,"Illegal pair_style command");
|
||||
if (strcmp(force->pair_style,"hybrid") == 0)
|
||||
error->all(FLERR,"Pair style quip is only compatible with hybrid/overlay");
|
||||
|
||||
// check if linked to the correct QUIP library API version
|
||||
// as of 2017-07-19 this is API_VERSION 1
|
||||
if (quip_lammps_api_version() != 1)
|
||||
error->all(FLERR,"QUIP LAMMPS wrapper API version is not compatible "
|
||||
"with this version of LAMMPS");
|
||||
|
||||
// QUIP potentials are parameterized in metal units
|
||||
|
||||
if (strcmp("metal",update->unit_style) != 0)
|
||||
error->all(FLERR,"QUIP potentials require 'metal' units");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -234,48 +244,58 @@ void PairQUIP::allocate()
|
||||
|
||||
setflag = memory->create(setflag,n+1,n+1,"pair:setflag");
|
||||
cutsq = memory->create(cutsq,n+1,n+1,"pair:cutsq");
|
||||
map = new int[n];
|
||||
map = new int[n+1];
|
||||
}
|
||||
|
||||
void PairQUIP::coeff(int narg, char **arg)
|
||||
{
|
||||
if (!allocated) allocate();
|
||||
if (!allocated) allocate();
|
||||
|
||||
int n = atom->ntypes;
|
||||
int n = atom->ntypes;
|
||||
if (narg != (4+n)) {
|
||||
char str[1024];
|
||||
sprintf(str,"Number of arguments %d is not correct, it should be %d", narg, 4+n);
|
||||
error->all(FLERR,str);
|
||||
}
|
||||
|
||||
// ensure I,J args are * *
|
||||
|
||||
for (int i = 1; i <= n; i++){
|
||||
for (int j = 1; j <= n; j++) {
|
||||
setflag[i][j] = 1;
|
||||
if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0)
|
||||
error->all(FLERR,"Incorrect args for pair coefficients");
|
||||
|
||||
n_quip_file = strlen(arg[2]);
|
||||
quip_file = new char[n_quip_file+1];
|
||||
strcpy(quip_file,arg[2]);
|
||||
|
||||
n_quip_string = strlen(arg[3]);
|
||||
quip_string = new char[n_quip_string+1];
|
||||
strcpy(quip_string,arg[3]);
|
||||
|
||||
for (int i = 4; i < narg; i++) {
|
||||
if (strcmp(arg[i],"NULL") == 0)
|
||||
map[i-3] = -1;
|
||||
else
|
||||
map[i-3] = force->inumeric(FLERR,arg[i]);
|
||||
}
|
||||
|
||||
// clear setflag since coeff() called once with I,J = * *
|
||||
|
||||
n = atom->ntypes;
|
||||
for (int i = 1; i <= n; i++)
|
||||
for (int j = i; j <= n; j++)
|
||||
setflag[i][j] = 0;
|
||||
|
||||
// set setflag i,j for type pairs where both are mapped to elements
|
||||
|
||||
int count = 0;
|
||||
for (int i = 1; i <= n; i++)
|
||||
for (int j = i; j <= n; j++)
|
||||
if (map[i] >= 0 && map[j] >= 0) {
|
||||
setflag[i][j] = 1;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (narg != (4+n)) {
|
||||
char str[1024];
|
||||
sprintf(str,"Number of arguments %d is not correct, it should be %d", narg, 4+n);
|
||||
error->all(FLERR,str);
|
||||
}
|
||||
|
||||
if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0)
|
||||
error->all(FLERR,"Incorrect args for pair coefficients");
|
||||
|
||||
n_quip_file = strlen(arg[2]);
|
||||
quip_file = new char[n_quip_file+1];
|
||||
strcpy(quip_file,arg[2]);
|
||||
|
||||
n_quip_string = strlen(arg[3]);
|
||||
quip_string = new char[n_quip_string+1];
|
||||
strcpy(quip_string,arg[3]);
|
||||
|
||||
for (int i = 4; i < narg; i++) {
|
||||
|
||||
if (0 == sscanf(arg[i],"%d",&map[i-4])) {
|
||||
char str[1024];
|
||||
sprintf(str,"Incorrect atomic number %s at position %d",arg[i],i);
|
||||
error->all(FLERR,str);
|
||||
}
|
||||
}
|
||||
if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients");
|
||||
|
||||
// Initialise potential
|
||||
// First call initialises potential via the fortran code in memory, and returns the necessary size
|
||||
|
||||
@ -26,10 +26,10 @@ extern "C"
|
||||
{
|
||||
int quip_lammps_api_version();
|
||||
void quip_lammps_wrapper(int*, int*, int*, int*,
|
||||
int*, int*, int*,
|
||||
int*, int*, double*,
|
||||
int*, int*, double*,
|
||||
double*, double*, double*, double*, double*);
|
||||
int*, int*, int*,
|
||||
int*, int*, double*,
|
||||
int*, int*, double*,
|
||||
double*, double*, double*, double*, double*);
|
||||
void quip_lammps_potential_initialise(int*, int*, double*, char*, int*, char*, int*);
|
||||
}
|
||||
|
||||
|
||||
@ -34,8 +34,16 @@ double t_end;
|
||||
|
||||
double Get_Time( )
|
||||
{
|
||||
#if defined(_MSC_VER)
|
||||
double t;
|
||||
|
||||
t = GetTickCount();
|
||||
t /= 1000.0;
|
||||
return t;
|
||||
#else
|
||||
gettimeofday(&tim, NULL );
|
||||
return( tim.tv_sec + (tim.tv_usec / 1000000.0) );
|
||||
#endif
|
||||
}
|
||||
|
||||
int Tokenize( char* s, char*** tok )
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
#include "math_const.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "utils.h"
|
||||
|
||||
#ifdef LMP_USER_INTEL
|
||||
#include "neigh_request.h"
|
||||
@ -509,7 +510,7 @@ AtomVec *Atom::new_avec(const char *style, int trysuffix, int &sflag)
|
||||
return avec_creator(lmp);
|
||||
}
|
||||
|
||||
error->all(FLERR,"Unknown atom style");
|
||||
error->all(FLERR,utils::check_packages_for_style("atom",style,lmp).c_str());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@ -286,6 +286,7 @@ class Atom : protected Pointers {
|
||||
|
||||
inline int* get_map_array() {return map_array;};
|
||||
inline int get_map_size() {return map_tag_max+1;};
|
||||
inline int get_map_maxarray() {return map_maxarray+1;};
|
||||
|
||||
bigint memory_usage();
|
||||
int memcheck(const char *);
|
||||
@ -361,7 +362,7 @@ E: Atom IDs must be used for molecular systems
|
||||
|
||||
Atom IDs are used to identify and find partner atoms in bonds.
|
||||
|
||||
E: Unknown atom style
|
||||
E: Unrecognized atom style
|
||||
|
||||
The choice of atom style is unknown.
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
#include "fix.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "utils.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -96,7 +97,7 @@ void AtomVecBody::process_args(int narg, char **arg)
|
||||
#undef BodyStyle
|
||||
#undef BODY_CLASS
|
||||
|
||||
else error->all(FLERR,"Unknown body style");
|
||||
else error->all(FLERR,utils::check_packages_for_style("body",arg[0],lmp).c_str());
|
||||
|
||||
bptr->avec = this;
|
||||
icp = bptr->icp;
|
||||
|
||||
@ -130,7 +130,7 @@ E: Invalid atom_style body command
|
||||
|
||||
No body style argument was provided.
|
||||
|
||||
E: Unknown body style
|
||||
E: Unrecognized body style
|
||||
|
||||
The choice of body style is unknown.
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
#include "force.h"
|
||||
#include "pair.h"
|
||||
#include "comm.h"
|
||||
#include "group.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
@ -37,10 +38,12 @@ using namespace LAMMPS_NS;
|
||||
ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg),
|
||||
typelo(NULL), typehi(NULL), cvec(NULL), carray(NULL),
|
||||
id_orientorder(NULL), normv(NULL)
|
||||
group2(NULL), id_orientorder(NULL), normv(NULL)
|
||||
{
|
||||
if (narg < 5) error->all(FLERR,"Illegal compute coord/atom command");
|
||||
|
||||
jgroup = group->find("all");
|
||||
jgroupbit = group->bitmask[jgroup];
|
||||
cstyle = NONE;
|
||||
|
||||
if (strcmp(arg[3],"cutoff") == 0) {
|
||||
@ -48,18 +51,29 @@ ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
double cutoff = force->numeric(FLERR,arg[4]);
|
||||
cutsq = cutoff*cutoff;
|
||||
|
||||
ncol = narg-5 + 1;
|
||||
int iarg = 5;
|
||||
if ((narg > 6) && (strcmp(arg[5],"group") == 0)) {
|
||||
int len = strlen(arg[6])+1;
|
||||
group2 = new char[len];
|
||||
strcpy(group2,arg[6]);
|
||||
iarg += 2;
|
||||
jgroup = group->find(group2);
|
||||
if (jgroup == -1)
|
||||
error->all(FLERR,"Compute coord/atom group2 ID does not exist");
|
||||
jgroupbit = group->bitmask[jgroup];
|
||||
}
|
||||
|
||||
ncol = narg-iarg + 1;
|
||||
int ntypes = atom->ntypes;
|
||||
typelo = new int[ncol];
|
||||
typehi = new int[ncol];
|
||||
|
||||
if (narg == 5) {
|
||||
if (narg == iarg) {
|
||||
ncol = 1;
|
||||
typelo[0] = 1;
|
||||
typehi[0] = ntypes;
|
||||
} else {
|
||||
ncol = 0;
|
||||
int iarg = 5;
|
||||
while (iarg < narg) {
|
||||
force->bounds(FLERR,arg[iarg],ntypes,typelo[ncol],typehi[ncol]);
|
||||
if (typelo[ncol] > typehi[ncol])
|
||||
@ -106,6 +120,7 @@ ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
ComputeCoordAtom::~ComputeCoordAtom()
|
||||
{
|
||||
delete [] group2;
|
||||
delete [] typelo;
|
||||
delete [] typehi;
|
||||
memory->destroy(cvec);
|
||||
@ -143,12 +158,6 @@ void ComputeCoordAtom::init()
|
||||
neighbor->requests[irequest]->half = 0;
|
||||
neighbor->requests[irequest]->full = 1;
|
||||
neighbor->requests[irequest]->occasional = 1;
|
||||
|
||||
int count = 0;
|
||||
for (int i = 0; i < modify->ncompute; i++)
|
||||
if (strcmp(modify->compute[i]->style,"coord/atom") == 0) count++;
|
||||
if (count > 1 && comm->me == 0)
|
||||
error->warning(FLERR,"More than one compute coord/atom");
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -229,13 +238,15 @@ void ComputeCoordAtom::compute_peratom()
|
||||
j = jlist[jj];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
jtype = type[j];
|
||||
delx = xtmp - x[j][0];
|
||||
dely = ytmp - x[j][1];
|
||||
delz = ztmp - x[j][2];
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
if (rsq < cutsq && jtype >= typelo[0] && jtype <= typehi[0])
|
||||
n++;
|
||||
if (mask[j] & jgroupbit) {
|
||||
jtype = type[j];
|
||||
delx = xtmp - x[j][0];
|
||||
dely = ytmp - x[j][1];
|
||||
delz = ztmp - x[j][2];
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
if (rsq < cutsq && jtype >= typelo[0] && jtype <= typehi[0])
|
||||
n++;
|
||||
}
|
||||
}
|
||||
|
||||
cvec[i] = n;
|
||||
|
||||
@ -45,6 +45,9 @@ class ComputeCoordAtom : public Compute {
|
||||
double *cvec;
|
||||
double **carray;
|
||||
|
||||
char *group2;
|
||||
int jgroup,jgroupbit;
|
||||
|
||||
class ComputeOrientOrderAtom *c_orientorder;
|
||||
char *id_orientorder;
|
||||
double threshold;
|
||||
@ -94,8 +97,4 @@ E: Compute coord/atom cutoff is longer than pairwise cutoff
|
||||
Cannot compute coordination at distances longer than the pair cutoff,
|
||||
since those atoms are not in the neighbor list.
|
||||
|
||||
W: More than one compute coord/atom
|
||||
|
||||
It is not efficient to use compute coord/atom more than once.
|
||||
|
||||
*/
|
||||
|
||||
@ -40,6 +40,7 @@
|
||||
#include "math_const.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "utils.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathConst;
|
||||
@ -1715,6 +1716,9 @@ void Domain::add_region(int narg, char **arg)
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp(arg[1],"none") == 0)
|
||||
error->all(FLERR,"Unrecognized region style 'none'");
|
||||
|
||||
if (find_region(arg[0]) >= 0) error->all(FLERR,"Reuse of region ID");
|
||||
|
||||
// extend Region list if necessary
|
||||
@ -1753,12 +1757,10 @@ void Domain::add_region(int narg, char **arg)
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(arg[1],"none") == 0) error->all(FLERR,"Unknown region style");
|
||||
if (region_map->find(arg[1]) != region_map->end()) {
|
||||
RegionCreator region_creator = (*region_map)[arg[1]];
|
||||
regions[nregion] = region_creator(lmp, narg, arg);
|
||||
}
|
||||
else error->all(FLERR,"Unknown region style");
|
||||
} else error->all(FLERR,utils::check_packages_for_style("region",arg[1],lmp).c_str());
|
||||
|
||||
// initialize any region variables via init()
|
||||
// in case region is used between runs, e.g. to print a variable
|
||||
|
||||
@ -269,7 +269,7 @@ E: Reuse of region ID
|
||||
|
||||
A region ID cannot be used twice.
|
||||
|
||||
E: Unknown region style
|
||||
E: Unrecognized region style
|
||||
|
||||
The choice of region style is unknown.
|
||||
|
||||
|
||||
@ -258,9 +258,7 @@ Pair *Force::new_pair(const char *style, int trysuffix, int &sflag)
|
||||
return pair_creator(lmp);
|
||||
}
|
||||
|
||||
char str[128];
|
||||
sprintf(str,"Unknown pair style %s",style);
|
||||
error->all(FLERR,str);
|
||||
error->all(FLERR,utils::check_packages_for_style("pair",style,lmp).c_str());
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -373,9 +371,7 @@ Bond *Force::new_bond(const char *style, int trysuffix, int &sflag)
|
||||
return bond_creator(lmp);
|
||||
}
|
||||
|
||||
char str[128];
|
||||
sprintf(str,"Unknown bond style %s",style);
|
||||
error->all(FLERR,str);
|
||||
error->all(FLERR,utils::check_packages_for_style("bond",style,lmp).c_str());
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -454,9 +450,7 @@ Angle *Force::new_angle(const char *style, int trysuffix, int &sflag)
|
||||
return angle_creator(lmp);
|
||||
}
|
||||
|
||||
char str[128];
|
||||
sprintf(str,"Unknown angle style %s",style);
|
||||
error->all(FLERR,str);
|
||||
error->all(FLERR,utils::check_packages_for_style("angle",style,lmp).c_str());
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -536,9 +530,7 @@ Dihedral *Force::new_dihedral(const char *style, int trysuffix, int &sflag)
|
||||
return dihedral_creator(lmp);
|
||||
}
|
||||
|
||||
char str[128];
|
||||
sprintf(str,"Unknown dihedral style %s",style);
|
||||
error->all(FLERR,str);
|
||||
error->all(FLERR,utils::check_packages_for_style("dihedral",style,lmp).c_str());
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -617,9 +609,7 @@ Improper *Force::new_improper(const char *style, int trysuffix, int &sflag)
|
||||
return improper_creator(lmp);
|
||||
}
|
||||
|
||||
char str[128];
|
||||
sprintf(str,"Unknown improper style %s",style);
|
||||
error->all(FLERR,str);
|
||||
error->all(FLERR,utils::check_packages_for_style("improper",style,lmp).c_str());
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -702,9 +692,7 @@ KSpace *Force::new_kspace(const char *style, int trysuffix, int &sflag)
|
||||
return kspace_creator(lmp);
|
||||
}
|
||||
|
||||
char str[128];
|
||||
sprintf(str,"Unknown kspace style %s",style);
|
||||
error->all(FLERR,str);
|
||||
error->all(FLERR,utils::check_packages_for_style("kspace",style,lmp).c_str());
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
27
src/force.h
27
src/force.h
@ -159,35 +159,36 @@ class Force : protected Pointers {
|
||||
|
||||
E: Must re-specify non-restarted pair style (%s) after read_restart
|
||||
|
||||
UNDOCUMENTED
|
||||
For pair styles, that do not store their settings in a restart file,
|
||||
it must be defined with a new 'pair_style' command after read_restart.
|
||||
|
||||
E: Unknown pair style %s
|
||||
E: Unrecognized pair style %s
|
||||
|
||||
UNDOCUMENTED
|
||||
The choice of pair style is unknown.
|
||||
|
||||
E: Unknown bond style %s
|
||||
E: Unrecognized bond style %s
|
||||
|
||||
UNDOCUMENTED
|
||||
The choice of bond style is unknown.
|
||||
|
||||
E: Unknown angle style %s
|
||||
E: Unrecognized angle style %s
|
||||
|
||||
UNDOCUMENTED
|
||||
The choice of angle style is unknown.
|
||||
|
||||
E: Unknown dihedral style %s
|
||||
E: Unrecognized dihedral style %s
|
||||
|
||||
UNDOCUMENTED
|
||||
The choice of dihedral style is unknown.
|
||||
|
||||
E: Unknown improper style %s
|
||||
E: Unrecognized improper style %s
|
||||
|
||||
UNDOCUMENTED
|
||||
The choice of improper style is unknown.
|
||||
|
||||
E: Cannot yet use KSpace solver with grid with comm style tiled
|
||||
|
||||
This is current restriction in LAMMPS.
|
||||
|
||||
E: Unknown kspace style %s
|
||||
E: Unrecognized kspace style %s
|
||||
|
||||
UNDOCUMENTED
|
||||
The choice of kspace style is unknown.
|
||||
|
||||
E: Illegal ... command
|
||||
|
||||
|
||||
@ -50,6 +50,7 @@
|
||||
#include "accelerator_kokkos.h"
|
||||
#include "error.h"
|
||||
#include "memory.h"
|
||||
#include "utils.h"
|
||||
|
||||
#ifdef _OPENMP
|
||||
#include <omp.h>
|
||||
@ -526,6 +527,11 @@ void Input::substitute(char *&str, char *&str2, int &max, int &max2, int flag)
|
||||
*fmtflag='\0';
|
||||
}
|
||||
|
||||
// quick check for proper format string
|
||||
|
||||
if (!utils::strmatch(fmtstr,"%[0-9 ]*\\.[0-9]+[efgEFG]"))
|
||||
error->all(FLERR,"Incorrect conversion in format string");
|
||||
|
||||
snprintf(immediate,256,fmtstr,variable->compute_equal(var));
|
||||
value = immediate;
|
||||
|
||||
|
||||
@ -173,6 +173,11 @@ E: Unbalanced quotes in input line
|
||||
No matching end double quote was found following a leading double
|
||||
quote.
|
||||
|
||||
E: Incorrect conversion in format string
|
||||
|
||||
An immediate variable with format suffix was not using
|
||||
either a %f, a %g, or a %e conversion in the format suffix.
|
||||
|
||||
E: Input line quote not followed by white-space
|
||||
|
||||
An end quote must be followed by white-space.
|
||||
|
||||
172
src/lammps.cpp
172
src/lammps.cpp
@ -14,6 +14,8 @@
|
||||
#include <mpi.h>
|
||||
#include <cstring>
|
||||
#include <cctype>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "lammps.h"
|
||||
#include "style_angle.h"
|
||||
#include "style_atom.h"
|
||||
@ -54,10 +56,29 @@
|
||||
#include "lmpinstalledpkgs.h"
|
||||
#include "lmpgitversion.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
static void print_style(FILE *fp, const char *str, int &pos);
|
||||
|
||||
struct LAMMPS_NS::package_styles_lists {
|
||||
std::map<std::string,std::string> angle_styles;
|
||||
std::map<std::string,std::string> atom_styles;
|
||||
std::map<std::string,std::string> body_styles;
|
||||
std::map<std::string,std::string> bond_styles;
|
||||
std::map<std::string,std::string> command_styles;
|
||||
std::map<std::string,std::string> compute_styles;
|
||||
std::map<std::string,std::string> dihedral_styles;
|
||||
std::map<std::string,std::string> dump_styles;
|
||||
std::map<std::string,std::string> fix_styles;
|
||||
std::map<std::string,std::string> improper_styles;
|
||||
std::map<std::string,std::string> integrate_styles;
|
||||
std::map<std::string,std::string> kspace_styles;
|
||||
std::map<std::string,std::string> minimize_styles;
|
||||
std::map<std::string,std::string> pair_styles;
|
||||
std::map<std::string,std::string> reader_styles;
|
||||
std::map<std::string,std::string> region_styles;
|
||||
};
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
start up LAMMPS
|
||||
allocate fundamental classes (memory, error, universe, input)
|
||||
@ -86,6 +107,8 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) :
|
||||
|
||||
initclock = MPI_Wtime();
|
||||
|
||||
init_pkg_lists();
|
||||
|
||||
// check if -mpi is first arg
|
||||
// if so, then 2 apps were launched with one mpirun command
|
||||
// this means passed communicator (e.g. MPI_COMM_WORLD) is bigger than LAMMPS
|
||||
@ -693,6 +716,8 @@ LAMMPS::~LAMMPS()
|
||||
delete universe;
|
||||
delete error;
|
||||
delete memory;
|
||||
|
||||
delete pkg_lists;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -867,6 +892,149 @@ void LAMMPS::destroy()
|
||||
python = NULL;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
initialize lists of styles in packages
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void LAMMPS::init_pkg_lists()
|
||||
{
|
||||
pkg_lists = new package_styles_lists;
|
||||
#define PACKAGE "UNKNOWN"
|
||||
#define ANGLE_CLASS
|
||||
#define AngleStyle(key,Class) \
|
||||
pkg_lists->angle_styles[#key] = PACKAGE;
|
||||
#include "packages_angle.h"
|
||||
#undef AngleStyle
|
||||
#undef ANGLE_CLASS
|
||||
#define ATOM_CLASS
|
||||
#define AtomStyle(key,Class) \
|
||||
pkg_lists->atom_styles[#key] = PACKAGE;
|
||||
#include "packages_atom.h"
|
||||
#undef AtomStyle
|
||||
#undef ATOM_CLASS
|
||||
#define BODY_CLASS
|
||||
#define BodyStyle(key,Class) \
|
||||
pkg_lists->body_styles[#key] = PACKAGE;
|
||||
#include "packages_body.h"
|
||||
#undef BodyStyle
|
||||
#undef BODY_CLASS
|
||||
#define BOND_CLASS
|
||||
#define BondStyle(key,Class) \
|
||||
pkg_lists->bond_styles[#key] = PACKAGE;
|
||||
#include "packages_bond.h"
|
||||
#undef BondStyle
|
||||
#undef BOND_CLASS
|
||||
#define COMMAND_CLASS
|
||||
#define CommandStyle(key,Class) \
|
||||
pkg_lists->command_styles[#key] = PACKAGE;
|
||||
#include "packages_command.h"
|
||||
#undef CommandStyle
|
||||
#undef COMMAND_CLASS
|
||||
#define COMPUTE_CLASS
|
||||
#define ComputeStyle(key,Class) \
|
||||
pkg_lists->compute_styles[#key] = PACKAGE;
|
||||
#include "packages_compute.h"
|
||||
#undef ComputeStyle
|
||||
#undef COMPUTE_CLASS
|
||||
#define DIHEDRAL_CLASS
|
||||
#define DihedralStyle(key,Class) \
|
||||
pkg_lists->dihedral_styles[#key] = PACKAGE;
|
||||
#include "packages_dihedral.h"
|
||||
#undef DihedralStyle
|
||||
#undef DIHEDRAL_CLASS
|
||||
#define DUMP_CLASS
|
||||
#define DumpStyle(key,Class) \
|
||||
pkg_lists->dump_styles[#key] = PACKAGE;
|
||||
#include "packages_dump.h"
|
||||
#undef DumpStyle
|
||||
#undef DUMP_CLASS
|
||||
#define FIX_CLASS
|
||||
#define FixStyle(key,Class) \
|
||||
pkg_lists->fix_styles[#key] = PACKAGE;
|
||||
#include "packages_fix.h"
|
||||
#undef FixStyle
|
||||
#undef FIX_CLASS
|
||||
#define IMPROPER_CLASS
|
||||
#define ImproperStyle(key,Class) \
|
||||
pkg_lists->improper_styles[#key] = PACKAGE;
|
||||
#include "packages_improper.h"
|
||||
#undef ImproperStyle
|
||||
#undef IMPROPER_CLASS
|
||||
#define INTEGRATE_CLASS
|
||||
#define IntegrateStyle(key,Class) \
|
||||
pkg_lists->integrate_styles[#key] = PACKAGE;
|
||||
#include "packages_integrate.h"
|
||||
#undef IntegrateStyle
|
||||
#undef INTEGRATE_CLASS
|
||||
#define KSPACE_CLASS
|
||||
#define KSpaceStyle(key,Class) \
|
||||
pkg_lists->kspace_styles[#key] = PACKAGE;
|
||||
#include "packages_kspace.h"
|
||||
#undef KSpaceStyle
|
||||
#undef KSPACE_CLASS
|
||||
#define MINIMIZE_CLASS
|
||||
#define MinimizeStyle(key,Class) \
|
||||
pkg_lists->minimize_styles[#key] = PACKAGE;
|
||||
#include "packages_minimize.h"
|
||||
#undef MinimizeStyle
|
||||
#undef MINIMIZE_CLASS
|
||||
#define PAIR_CLASS
|
||||
#define PairStyle(key,Class) \
|
||||
pkg_lists->pair_styles[#key] = PACKAGE;
|
||||
#include "packages_pair.h"
|
||||
#undef PairStyle
|
||||
#undef PAIR_CLASS
|
||||
#define READER_CLASS
|
||||
#define ReaderStyle(key,Class) \
|
||||
pkg_lists->reader_styles[#key] = PACKAGE;
|
||||
#include "packages_reader.h"
|
||||
#undef ReaderStyle
|
||||
#undef READER_CLASS
|
||||
#define REGION_CLASS
|
||||
#define RegionStyle(key,Class) \
|
||||
pkg_lists->region_styles[#key] = PACKAGE;
|
||||
#include "packages_region.h"
|
||||
#undef RegionStyle
|
||||
#undef REGION_CLASS
|
||||
}
|
||||
|
||||
bool LAMMPS::is_installed_pkg(const char *pkg)
|
||||
{
|
||||
for (int i=0; installed_packages[i] != NULL; ++i)
|
||||
if (strcmp(installed_packages[i],pkg) == 0) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#define check_for_match(style,list,name) \
|
||||
if (strcmp(list,#style) == 0) { \
|
||||
std::map<std::string,std::string> &styles(pkg_lists-> style ## _styles); \
|
||||
if (styles.find(name) != styles.end()) { \
|
||||
return styles[name].c_str(); \
|
||||
} \
|
||||
}
|
||||
|
||||
const char *LAMMPS::match_style(const char *style, const char *name)
|
||||
{
|
||||
check_for_match(angle,style,name);
|
||||
check_for_match(atom,style,name);
|
||||
check_for_match(body,style,name);
|
||||
check_for_match(bond,style,name);
|
||||
check_for_match(command,style,name);
|
||||
check_for_match(compute,style,name);
|
||||
check_for_match(dump,style,name);
|
||||
check_for_match(fix,style,name);
|
||||
check_for_match(compute,style,name);
|
||||
check_for_match(improper,style,name);
|
||||
check_for_match(integrate,style,name);
|
||||
check_for_match(kspace,style,name);
|
||||
check_for_match(minimize,style,name);
|
||||
check_for_match(pair,style,name);
|
||||
check_for_match(reader,style,name);
|
||||
check_for_match(region,style,name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
help message for command line options and styles present in executable
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
@ -63,7 +63,9 @@ class LAMMPS {
|
||||
|
||||
class CiteMe *citeme; // citation info
|
||||
|
||||
const char *match_style(const char *style, const char *name);
|
||||
static const char * installed_packages[];
|
||||
static bool is_installed_pkg(const char *pkg);
|
||||
|
||||
static const bool has_git_info;
|
||||
static const char git_commit[];
|
||||
@ -79,6 +81,8 @@ class LAMMPS {
|
||||
void print_config(FILE *); // print compile time settings
|
||||
|
||||
private:
|
||||
struct package_styles_lists *pkg_lists;
|
||||
void init_pkg_lists();
|
||||
void help();
|
||||
LAMMPS() {}; // prohibit using the default constructor
|
||||
LAMMPS(const LAMMPS &) {}; // prohibit using the copy constructor
|
||||
|
||||
@ -18,8 +18,8 @@
|
||||
#define pclose _pclose
|
||||
#define strdup _strdup
|
||||
|
||||
// the following functions ared defined to get rid of
|
||||
// 'ambiguous call to overloaded function' error in VSS for mismathched type arguments
|
||||
// the following functions are defined to get rid of
|
||||
// 'ambiguous call to overloaded function' error in VSS for mismatched type arguments
|
||||
#if !defined(__MINGW32__)
|
||||
inline double pow(int i, int j){
|
||||
return pow((double)i,j);
|
||||
|
||||
@ -893,11 +893,8 @@ void Modify::add_fix(int narg, char **arg, int trysuffix)
|
||||
fix[ifix] = fix_creator(lmp,narg,arg);
|
||||
}
|
||||
|
||||
if (fix[ifix] == NULL) {
|
||||
char str[128];
|
||||
snprintf(str,128,"Unknown fix style %s",arg[2]);
|
||||
error->all(FLERR,str);
|
||||
}
|
||||
if (fix[ifix] == NULL)
|
||||
error->all(FLERR,utils::check_packages_for_style("fix",arg[2],lmp).c_str());
|
||||
|
||||
// check if Fix is in restart_global list
|
||||
// if yes, pass state info to the Fix so it can reset itself
|
||||
@ -1195,11 +1192,8 @@ void Modify::add_compute(int narg, char **arg, int trysuffix)
|
||||
compute[ncompute] = compute_creator(lmp,narg,arg);
|
||||
}
|
||||
|
||||
if (compute[ncompute] == NULL) {
|
||||
char str[128];
|
||||
snprintf(str,128,"Unknown compute style %s",arg[2]);
|
||||
error->all(FLERR,str);
|
||||
}
|
||||
if (compute[ncompute] == NULL)
|
||||
error->all(FLERR,utils::check_packages_for_style("compute",arg[2],lmp).c_str());
|
||||
|
||||
ncompute++;
|
||||
}
|
||||
|
||||
@ -224,9 +224,9 @@ The ID and style of a fix match for a fix you are changing with a fix
|
||||
command, but the new group you are specifying does not match the old
|
||||
group.
|
||||
|
||||
E: Unknown fix style %s
|
||||
E: Unrecognized fix style %s
|
||||
|
||||
UNDOCUMENTED
|
||||
The choice of fix style is unknown.
|
||||
|
||||
E: Could not find fix_modify ID
|
||||
|
||||
@ -240,9 +240,9 @@ E: Reuse of compute ID
|
||||
|
||||
A compute ID cannot be used twice.
|
||||
|
||||
E: Unknown compute style %s
|
||||
E: Unrecognized compute style %s
|
||||
|
||||
UNDOCUMENTED
|
||||
The choice of compute style is unknown.
|
||||
|
||||
E: Could not find compute_modify ID
|
||||
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
#include "write_restart.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "utils.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -585,8 +586,7 @@ void Output::add_dump(int narg, char **arg)
|
||||
if (dump_map->find(arg[2]) != dump_map->end()) {
|
||||
DumpCreator dump_creator = (*dump_map)[arg[2]];
|
||||
dump[ndump] = dump_creator(lmp, narg, arg);
|
||||
}
|
||||
else error->all(FLERR,"Unknown dump style");
|
||||
} else error->all(FLERR,utils::check_packages_for_style("dump",arg[2],lmp).c_str());
|
||||
|
||||
every_dump[ndump] = force->inumeric(FLERR,arg[3]);
|
||||
if (every_dump[ndump] <= 0) error->all(FLERR,"Illegal dump command");
|
||||
|
||||
@ -152,7 +152,7 @@ E: Invalid dump frequency
|
||||
|
||||
Dump frequency must be 1 or greater.
|
||||
|
||||
E: Unknown dump style
|
||||
E: Unrecognized dump style
|
||||
|
||||
The choice of dump style is unknown.
|
||||
|
||||
|
||||
@ -1768,7 +1768,8 @@ void ReadData::paircoeffs()
|
||||
next = strchr(buf,'\n');
|
||||
*next = '\0';
|
||||
parse_coeffs(buf,NULL,1,2,toffset);
|
||||
if (narg == 0) error->all(FLERR,"Unexpected end of PairCoeffs section");
|
||||
if (narg == 0)
|
||||
error->all(FLERR,"Unexpected empty line in PairCoeffs section");
|
||||
force->pair->coeff(narg,arg);
|
||||
buf = next + 1;
|
||||
}
|
||||
@ -1794,7 +1795,8 @@ void ReadData::pairIJcoeffs()
|
||||
next = strchr(buf,'\n');
|
||||
*next = '\0';
|
||||
parse_coeffs(buf,NULL,0,2,toffset);
|
||||
if (narg == 0) error->all(FLERR,"Unexpected end of PairCoeffs section");
|
||||
if (narg == 0)
|
||||
error->all(FLERR,"Unexpected empty line in PairCoeffs section");
|
||||
force->pair->coeff(narg,arg);
|
||||
buf = next + 1;
|
||||
}
|
||||
@ -1818,7 +1820,8 @@ void ReadData::bondcoeffs()
|
||||
next = strchr(buf,'\n');
|
||||
*next = '\0';
|
||||
parse_coeffs(buf,NULL,0,1,boffset);
|
||||
if (narg == 0) error->all(FLERR,"Unexpected end of BondCoeffs section");
|
||||
if (narg == 0)
|
||||
error->all(FLERR,"Unexpected empty line in BondCoeffs section");
|
||||
force->bond->coeff(narg,arg);
|
||||
buf = next + 1;
|
||||
}
|
||||
@ -1844,7 +1847,7 @@ void ReadData::anglecoeffs(int which)
|
||||
if (which == 0) parse_coeffs(buf,NULL,0,1,aoffset);
|
||||
else if (which == 1) parse_coeffs(buf,"bb",0,1,aoffset);
|
||||
else if (which == 2) parse_coeffs(buf,"ba",0,1,aoffset);
|
||||
if (narg == 0) error->all(FLERR,"Unexpected end of AngleCoeffs section");
|
||||
if (narg == 0) error->all(FLERR,"Unexpected empty line in AngleCoeffs section");
|
||||
force->angle->coeff(narg,arg);
|
||||
buf = next + 1;
|
||||
}
|
||||
@ -1873,7 +1876,8 @@ void ReadData::dihedralcoeffs(int which)
|
||||
else if (which == 3) parse_coeffs(buf,"at",0,1,doffset);
|
||||
else if (which == 4) parse_coeffs(buf,"aat",0,1,doffset);
|
||||
else if (which == 5) parse_coeffs(buf,"bb13",0,1,doffset);
|
||||
if (narg == 0) error->all(FLERR,"Unexpected end of DihedralCoeffs section");
|
||||
if (narg == 0)
|
||||
error->all(FLERR,"Unexpected empty line in DihedralCoeffs section");
|
||||
force->dihedral->coeff(narg,arg);
|
||||
buf = next + 1;
|
||||
}
|
||||
@ -1898,7 +1902,7 @@ void ReadData::impropercoeffs(int which)
|
||||
*next = '\0';
|
||||
if (which == 0) parse_coeffs(buf,NULL,0,1,ioffset);
|
||||
else if (which == 1) parse_coeffs(buf,"aa",0,1,ioffset);
|
||||
if (narg == 0) error->all(FLERR,"Unexpected end of ImproperCoeffs section");
|
||||
if (narg == 0) error->all(FLERR,"Unexpected empty line in ImproperCoeffs section");
|
||||
force->improper->coeff(narg,arg);
|
||||
buf = next + 1;
|
||||
}
|
||||
@ -2092,6 +2096,10 @@ void ReadData::parse_coeffs(char *line, const char *addstr,
|
||||
word = strtok(NULL," \t\n\r\f");
|
||||
}
|
||||
|
||||
// to avoid segfaults on empty lines
|
||||
|
||||
if (narg == 0) return;
|
||||
|
||||
if (noffset) {
|
||||
int value = force->inumeric(FLERR,arg[0]);
|
||||
sprintf(argoffset1,"%d",value+offset);
|
||||
|
||||
@ -533,25 +533,25 @@ E: Too many lines in one body in data file - boost MAXBODY
|
||||
MAXBODY is a setting at the top of the src/read_data.cpp file.
|
||||
Set it larger and re-compile the code.
|
||||
|
||||
E: Unexpected end of PairCoeffs section
|
||||
E: Unexpected empty line in PairCoeffs section
|
||||
|
||||
Read a blank line.
|
||||
Read a blank line where there should be coefficient data.
|
||||
|
||||
E: Unexpected end of BondCoeffs section
|
||||
E: Unexpected empty line in BondCoeffs section
|
||||
|
||||
Read a blank line.
|
||||
Read a blank line where there should be coefficient data.
|
||||
|
||||
E: Unexpected end of AngleCoeffs section
|
||||
E: Unexpected empty line in AngleCoeffs section
|
||||
|
||||
Read a blank line.
|
||||
Read a blank line where there should be coefficient data.
|
||||
|
||||
E: Unexpected end of DihedralCoeffs section
|
||||
E: Unexpected empty line in DihedralCoeffs section
|
||||
|
||||
Read a blank line.
|
||||
Read a blank line where there should be coefficient data.
|
||||
|
||||
E: Unexpected end of ImproperCoeffs section
|
||||
E: Unexpected empty line in ImproperCoeffs section
|
||||
|
||||
Read a blank line.
|
||||
Read a blank line where there should be coefficient data.
|
||||
|
||||
E: Cannot open gzipped file
|
||||
|
||||
|
||||
@ -40,6 +40,7 @@
|
||||
#include "variable.h"
|
||||
#include "error.h"
|
||||
#include "memory.h"
|
||||
#include "utils.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -266,7 +267,7 @@ void ReadDump::setup_reader(int narg, char **arg)
|
||||
|
||||
// unrecognized style
|
||||
|
||||
else error->all(FLERR,"Unknown dump reader style");
|
||||
else error->all(FLERR,utils::check_packages_for_style("reader",readerstyle,lmp).c_str());
|
||||
|
||||
// pass any arguments to readers
|
||||
|
||||
|
||||
@ -134,7 +134,7 @@ E: Dump file does not contain requested snapshot
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
E: Unknown dump reader style
|
||||
E: Unrecognized dump reader style
|
||||
|
||||
The choice of dump reader style via the format keyword is unknown.
|
||||
|
||||
|
||||
@ -11,8 +11,10 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <mpi.h>
|
||||
#include <cstring>
|
||||
#include "utils.h"
|
||||
#include "lammps.h"
|
||||
#include "error.h"
|
||||
|
||||
/*! \file utils.cpp */
|
||||
@ -123,6 +125,24 @@ void utils::sfgets(const char *srcname, int srcline, char *s, int size,
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
std::string utils::check_packages_for_style(std::string style,
|
||||
std::string name, LAMMPS *lmp)
|
||||
{
|
||||
std::string errmsg = "Unrecognized " + style + " style '" + name + "'";
|
||||
const char *pkg = lmp->match_style(style.c_str(),name.c_str());
|
||||
|
||||
if (pkg) {
|
||||
errmsg += " is part of the " + std::string(pkg) + " package";
|
||||
if (lmp->is_installed_pkg(pkg))
|
||||
errmsg += ", but seems to be missing because of a dependency";
|
||||
else
|
||||
errmsg += " which is not enabled in this LAMMPS binary.";
|
||||
}
|
||||
return errmsg;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
extern "C" {
|
||||
/* Typedef'd pointer to get abstract datatype. */
|
||||
typedef struct regex_t *re_t;
|
||||
|
||||
10
src/utils.h
10
src/utils.h
@ -23,6 +23,7 @@ namespace LAMMPS_NS {
|
||||
|
||||
// forward declarations
|
||||
class Error;
|
||||
class LAMMPS;
|
||||
|
||||
namespace utils {
|
||||
|
||||
@ -66,6 +67,15 @@ namespace LAMMPS_NS {
|
||||
*/
|
||||
void sfgets(const char *srcname, int srcline, char *s, int size,
|
||||
FILE *fp, const char *filename, Error *error);
|
||||
|
||||
/** \brief Report if a requested style is in a package or may have a typo
|
||||
*
|
||||
* \param style type of style that is to be checked for
|
||||
* \param name name of style that was not found
|
||||
* \param lmp pointer to top-level LAMMPS class instance
|
||||
* \return string usable for error messages
|
||||
*/
|
||||
std::string check_packages_for_style(std::string style, std::string name, LAMMPS *lmp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -38,6 +38,7 @@
|
||||
#include "memory.h"
|
||||
#include "info.h"
|
||||
#include "error.h"
|
||||
#include "utils.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathConst;
|
||||
@ -383,6 +384,8 @@ void Variable::set(int narg, char **arg)
|
||||
num[nvar] = 3;
|
||||
which[nvar] = 0;
|
||||
pad[nvar] = 0;
|
||||
if (!utils::strmatch(arg[3],"%[0-9 ]*\\.[0-9]+[efgEFG]"))
|
||||
error->all(FLERR,"Incorrect conversion in format string");
|
||||
data[nvar] = new char*[num[nvar]];
|
||||
copy(2,&arg[2],data[nvar]);
|
||||
data[nvar][2] = new char[VALUELENGTH];
|
||||
|
||||
@ -210,6 +210,10 @@ E: Invalid variable style with next command
|
||||
Variable styles {equal} and {world} cannot be used in a next
|
||||
command.
|
||||
|
||||
E: Incorrect conversion in format string
|
||||
|
||||
A format style variable was not using either a %f, a %g, or a %e conversion.
|
||||
|
||||
E: Next command must list all universe and uloop variables
|
||||
|
||||
This is to insure they stay in sync.
|
||||
|
||||
@ -1 +1 @@
|
||||
#define LAMMPS_VERSION "15 May 2019"
|
||||
#define LAMMPS_VERSION "5 Jun 2019"
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
#include "input.h"
|
||||
#include "update.h"
|
||||
#include "error.h"
|
||||
#include "utils.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -64,7 +65,7 @@ void WriteDump::command(int narg, char **arg)
|
||||
#include "style_dump.h"
|
||||
#undef DUMP_CLASS
|
||||
|
||||
else error->all(FLERR,"Unknown dump style");
|
||||
else error->all(FLERR,utils::check_packages_for_style("dump",arg[1],lmp).c_str());
|
||||
|
||||
if (modindex < narg) dump->modify_params(narg-modindex-1,&arg[modindex+1]);
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ Self-explanatory. Check the input script syntax and compare to the
|
||||
documentation for the command. You can use -echo screen as a
|
||||
command-line option when running LAMMPS to see the offending line.
|
||||
|
||||
E: Unknown dump style
|
||||
E: Unrecognized dump style
|
||||
|
||||
The choice of dump style is unknown.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user